diff options
Diffstat (limited to 'libraries/irrlicht-1.8.1/source/Irrlicht/CImageLoaderPCX.h')
-rw-r--r-- | libraries/irrlicht-1.8.1/source/Irrlicht/CImageLoaderPCX.h | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/libraries/irrlicht-1.8.1/source/Irrlicht/CImageLoaderPCX.h b/libraries/irrlicht-1.8.1/source/Irrlicht/CImageLoaderPCX.h new file mode 100644 index 0000000..4bd3b7f --- /dev/null +++ b/libraries/irrlicht-1.8.1/source/Irrlicht/CImageLoaderPCX.h | |||
@@ -0,0 +1,82 @@ | |||
1 | // Copyright (C) 2002-2012 Nikolaus Gebhardt | ||
2 | // This file is part of the "Irrlicht Engine". | ||
3 | // For conditions of distribution and use, see copyright notice in irrlicht.h | ||
4 | |||
5 | #ifndef __C_IMAGE_LOADER_PCX_H_INCLUDED__ | ||
6 | #define __C_IMAGE_LOADER_PCX_H_INCLUDED__ | ||
7 | |||
8 | #include "IrrCompileConfig.h" | ||
9 | |||
10 | #include "IImageLoader.h" | ||
11 | |||
12 | namespace irr | ||
13 | { | ||
14 | namespace video | ||
15 | { | ||
16 | |||
17 | #if defined(_IRR_COMPILE_WITH_PCX_LOADER_) || defined(_IRR_COMPILE_WITH_PCX_WRITER_) | ||
18 | |||
19 | // byte-align structures | ||
20 | #include "irrpack.h" | ||
21 | |||
22 | struct SPCXHeader | ||
23 | { | ||
24 | u8 Manufacturer; | ||
25 | u8 Version; | ||
26 | u8 Encoding; | ||
27 | u8 BitsPerPixel; | ||
28 | u16 XMin; | ||
29 | u16 YMin; | ||
30 | u16 XMax; | ||
31 | u16 YMax; | ||
32 | u16 HorizDPI; | ||
33 | u16 VertDPI; | ||
34 | u8 Palette[48]; | ||
35 | u8 Reserved; | ||
36 | u8 Planes; | ||
37 | u16 BytesPerLine; | ||
38 | u16 PaletteType; | ||
39 | u16 HScrSize; | ||
40 | u16 VScrSize; | ||
41 | u8 Filler[54]; | ||
42 | } PACK_STRUCT; | ||
43 | |||
44 | |||
45 | // Default alignment | ||
46 | #include "irrunpack.h" | ||
47 | |||
48 | #endif // compile with loader or writer | ||
49 | |||
50 | #ifdef _IRR_COMPILE_WITH_PCX_LOADER_ | ||
51 | |||
52 | /*! | ||
53 | Image Loader for Windows PCX bitmaps. | ||
54 | This loader was written and sent in by Dean P. Macri. I modified | ||
55 | only some small bits of it. | ||
56 | */ | ||
57 | class CImageLoaderPCX : public IImageLoader | ||
58 | { | ||
59 | public: | ||
60 | |||
61 | //! constructor | ||
62 | CImageLoaderPCX(); | ||
63 | |||
64 | //! returns true if the file maybe is able to be loaded by this class | ||
65 | //! based on the file extension (e.g. ".tga") | ||
66 | virtual bool isALoadableFileExtension(const io::path& filename) const; | ||
67 | |||
68 | //! returns true if the file maybe is able to be loaded by this class | ||
69 | virtual bool isALoadableFileFormat(io::IReadFile* file) const; | ||
70 | |||
71 | //! creates a surface from the file | ||
72 | virtual IImage* loadImage(io::IReadFile* file) const; | ||
73 | |||
74 | }; | ||
75 | |||
76 | #endif // compile with loader | ||
77 | |||
78 | } // end namespace video | ||
79 | } // end namespace irr | ||
80 | |||
81 | #endif | ||
82 | |||