1 // Copyright (C) 2002-2012 Nikolaus Gebhardt
\r
2 // This file is part of the "Irrlicht Engine".
\r
3 // For conditions of distribution and use, see copyright notice in irrlicht.h
\r
5 #ifndef __C_IMAGE_LOADER_TGA_H_INCLUDED__
\r
6 #define __C_IMAGE_LOADER_TGA_H_INCLUDED__
\r
8 #include "IrrCompileConfig.h"
\r
10 #include "IImageLoader.h"
\r
18 // byte-align structures
\r
19 #include "irrpack.h"
\r
21 // these structs are also used in the TGA writer
\r
26 u8 FirstEntryIndex[2];
\r
28 u8 ColorMapEntrySize;
\r
39 u32 ExtensionOffset;
\r
40 u32 DeveloperOffset;
\r
44 // Default alignment
\r
45 #include "irrunpack.h"
\r
48 Surface Loader for targa images
\r
50 class CImageLoaderTGA : public IImageLoader
\r
54 //! returns true if the file maybe is able to be loaded by this class
\r
55 //! based on the file extension (e.g. ".tga")
\r
56 bool isALoadableFileExtension(const io::path& filename) const override;
\r
58 //! returns true if the file maybe is able to be loaded by this class
\r
59 bool isALoadableFileFormat(io::IReadFile* file) const override;
\r
61 //! creates a surface from the file
\r
62 IImage* loadImage(io::IReadFile* file) const override;
\r
66 //! loads a compressed tga. Was written and sent in by Jon Pry, thank you very much!
\r
67 u8* loadCompressedImage(io::IReadFile *file, const STGAHeader& header) const;
\r
70 } // end namespace video
\r
71 } // end namespace irr
\r