aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/irrlicht-1.8/source/Irrlicht/CImageLoaderTGA.h
diff options
context:
space:
mode:
authorDavid Walter Seikel2013-01-13 18:54:10 +1000
committerDavid Walter Seikel2013-01-13 18:54:10 +1000
commit959831f4ef5a3e797f576c3de08cd65032c997ad (patch)
treee7351908be5995f0b325b2ebeaa02d5a34b82583 /libraries/irrlicht-1.8/source/Irrlicht/CImageLoaderTGA.h
parentAdd info about changes to Irrlicht. (diff)
downloadSledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.zip
SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.gz
SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.bz2
SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.xz
Remove damned ancient DOS line endings from Irrlicht. Hopefully I did not go overboard.
Diffstat (limited to 'libraries/irrlicht-1.8/source/Irrlicht/CImageLoaderTGA.h')
-rw-r--r--libraries/irrlicht-1.8/source/Irrlicht/CImageLoaderTGA.h164
1 files changed, 82 insertions, 82 deletions
diff --git a/libraries/irrlicht-1.8/source/Irrlicht/CImageLoaderTGA.h b/libraries/irrlicht-1.8/source/Irrlicht/CImageLoaderTGA.h
index d744b6e..cc97fb1 100644
--- a/libraries/irrlicht-1.8/source/Irrlicht/CImageLoaderTGA.h
+++ b/libraries/irrlicht-1.8/source/Irrlicht/CImageLoaderTGA.h
@@ -1,82 +1,82 @@
1// Copyright (C) 2002-2012 Nikolaus Gebhardt 1// Copyright (C) 2002-2012 Nikolaus Gebhardt
2// This file is part of the "Irrlicht Engine". 2// This file is part of the "Irrlicht Engine".
3// For conditions of distribution and use, see copyright notice in irrlicht.h 3// For conditions of distribution and use, see copyright notice in irrlicht.h
4 4
5#ifndef __C_IMAGE_LOADER_TGA_H_INCLUDED__ 5#ifndef __C_IMAGE_LOADER_TGA_H_INCLUDED__
6#define __C_IMAGE_LOADER_TGA_H_INCLUDED__ 6#define __C_IMAGE_LOADER_TGA_H_INCLUDED__
7 7
8#include "IrrCompileConfig.h" 8#include "IrrCompileConfig.h"
9 9
10#include "IImageLoader.h" 10#include "IImageLoader.h"
11 11
12 12
13namespace irr 13namespace irr
14{ 14{
15namespace video 15namespace video
16{ 16{
17 17
18#if defined(_IRR_COMPILE_WITH_TGA_LOADER_) || defined(_IRR_COMPILE_WITH_TGA_WRITER_) 18#if defined(_IRR_COMPILE_WITH_TGA_LOADER_) || defined(_IRR_COMPILE_WITH_TGA_WRITER_)
19 19
20// byte-align structures 20// byte-align structures
21#include "irrpack.h" 21#include "irrpack.h"
22 22
23 // these structs are also used in the TGA writer 23 // these structs are also used in the TGA writer
24 struct STGAHeader{ 24 struct STGAHeader{
25 u8 IdLength; 25 u8 IdLength;
26 u8 ColorMapType; 26 u8 ColorMapType;
27 u8 ImageType; 27 u8 ImageType;
28 u8 FirstEntryIndex[2]; 28 u8 FirstEntryIndex[2];
29 u16 ColorMapLength; 29 u16 ColorMapLength;
30 u8 ColorMapEntrySize; 30 u8 ColorMapEntrySize;
31 u8 XOrigin[2]; 31 u8 XOrigin[2];
32 u8 YOrigin[2]; 32 u8 YOrigin[2];
33 u16 ImageWidth; 33 u16 ImageWidth;
34 u16 ImageHeight; 34 u16 ImageHeight;
35 u8 PixelDepth; 35 u8 PixelDepth;
36 u8 ImageDescriptor; 36 u8 ImageDescriptor;
37 } PACK_STRUCT; 37 } PACK_STRUCT;
38 38
39 struct STGAFooter 39 struct STGAFooter
40 { 40 {
41 u32 ExtensionOffset; 41 u32 ExtensionOffset;
42 u32 DeveloperOffset; 42 u32 DeveloperOffset;
43 c8 Signature[18]; 43 c8 Signature[18];
44 } PACK_STRUCT; 44 } PACK_STRUCT;
45 45
46// Default alignment 46// Default alignment
47#include "irrunpack.h" 47#include "irrunpack.h"
48 48
49#endif // compiled with loader or reader 49#endif // compiled with loader or reader
50 50
51#ifdef _IRR_COMPILE_WITH_TGA_LOADER_ 51#ifdef _IRR_COMPILE_WITH_TGA_LOADER_
52 52
53/*! 53/*!
54 Surface Loader for targa images 54 Surface Loader for targa images
55*/ 55*/
56class CImageLoaderTGA : public IImageLoader 56class CImageLoaderTGA : public IImageLoader
57{ 57{
58public: 58public:
59 59
60 //! returns true if the file maybe is able to be loaded by this class 60 //! returns true if the file maybe is able to be loaded by this class
61 //! based on the file extension (e.g. ".tga") 61 //! based on the file extension (e.g. ".tga")
62 virtual bool isALoadableFileExtension(const io::path& filename) const; 62 virtual bool isALoadableFileExtension(const io::path& filename) const;
63 63
64 //! returns true if the file maybe is able to be loaded by this class 64 //! returns true if the file maybe is able to be loaded by this class
65 virtual bool isALoadableFileFormat(io::IReadFile* file) const; 65 virtual bool isALoadableFileFormat(io::IReadFile* file) const;
66 66
67 //! creates a surface from the file 67 //! creates a surface from the file
68 virtual IImage* loadImage(io::IReadFile* file) const; 68 virtual IImage* loadImage(io::IReadFile* file) const;
69 69
70private: 70private:
71 71
72 //! loads a compressed tga. Was written and sent in by Jon Pry, thank you very much! 72 //! loads a compressed tga. Was written and sent in by Jon Pry, thank you very much!
73 u8* loadCompressedImage(io::IReadFile *file, const STGAHeader& header) const; 73 u8* loadCompressedImage(io::IReadFile *file, const STGAHeader& header) const;
74}; 74};
75 75
76#endif // compiled with loader 76#endif // compiled with loader
77 77
78} // end namespace video 78} // end namespace video
79} // end namespace irr 79} // end namespace irr
80 80
81#endif 81#endif
82 82