aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderWAL.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderWAL.h')
-rw-r--r--src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderWAL.h100
1 files changed, 100 insertions, 0 deletions
diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderWAL.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderWAL.h
new file mode 100644
index 0000000..871814a
--- /dev/null
+++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CImageLoaderWAL.h
@@ -0,0 +1,100 @@
1// Copyright (C) 2004 Murphy McCauley
2// Copyright (C) 2007-2012 Christian Stehno
3// This file is part of the "Irrlicht Engine".
4// For conditions of distribution and use, see copyright notice in irrlicht.h
5/*
6 Thanks to:
7 Max McGuire for his Flipcode article about WAL textures
8 Nikolaus Gebhardt for the Irrlicht 3D engine
9*/
10
11#ifndef __C_IMAGE_LOADER_WAL_H_INCLUDED__
12#define __C_IMAGE_LOADER_WAL_H_INCLUDED__
13
14#include "IrrCompileConfig.h"
15#include "IImageLoader.h"
16
17namespace irr
18{
19namespace video
20{
21
22#ifdef _IRR_COMPILE_WITH_LMP_LOADER_
23
24// byte-align structures
25#include "irrpack.h"
26
27 struct SLMPHeader {
28 u32 width; // width
29 u32 height; // height
30 // variably sized
31 } PACK_STRUCT;
32
33// Default alignment
34#include "irrunpack.h"
35
36//! An Irrlicht image loader for Quake1,2 engine lmp textures/palette
37class CImageLoaderLMP : public irr::video::IImageLoader
38{
39public:
40 virtual bool isALoadableFileExtension(const io::path& filename) const;
41 virtual bool isALoadableFileFormat(irr::io::IReadFile* file) const;
42 virtual irr::video::IImage* loadImage(irr::io::IReadFile* file) const;
43};
44
45#endif
46
47#ifdef _IRR_COMPILE_WITH_WAL_LOADER_
48
49//! An Irrlicht image loader for quake2 wal engine textures
50class CImageLoaderWAL : public irr::video::IImageLoader
51{
52public:
53 virtual bool isALoadableFileExtension(const io::path& filename) const;
54 virtual bool isALoadableFileFormat(irr::io::IReadFile* file) const;
55 virtual irr::video::IImage* loadImage(irr::io::IReadFile* file) const;
56};
57
58//! An Irrlicht image loader for Halflife 1 engine textures
59class CImageLoaderWAL2 : public irr::video::IImageLoader
60{
61public:
62 virtual bool isALoadableFileExtension(const io::path& filename) const;
63 virtual bool isALoadableFileFormat(irr::io::IReadFile* file) const;
64 virtual irr::video::IImage* loadImage(irr::io::IReadFile* file) const;
65};
66
67// byte-align structures
68#include "irrpack.h"
69
70 // Halfelife wad3 type 67 file
71 struct miptex_halflife
72 {
73 c8 name[16];
74 u32 width, height;
75 u32 mipmap[4]; // four mip maps stored
76 } PACK_STRUCT;
77
78 //quake2 texture
79 struct miptex_quake2
80 {
81 c8 name[32];
82 u32 width;
83 u32 height;
84 u32 mipmap[4]; // four mip maps stored
85 c8 animname[32]; // next frame in animation chain
86 s32 flags;
87 s32 contents;
88 s32 value;
89 } PACK_STRUCT;
90
91// Default alignment
92#include "irrunpack.h"
93
94#endif
95
96}
97}
98
99#endif
100