diff options
author | David Walter Seikel | 2013-01-13 18:54:10 +1000 |
---|---|---|
committer | David Walter Seikel | 2013-01-13 18:54:10 +1000 |
commit | 959831f4ef5a3e797f576c3de08cd65032c997ad (patch) | |
tree | e7351908be5995f0b325b2ebeaa02d5a34b82583 /libraries/irrlicht-1.8/examples/21.Quake3Explorer/q3factory.h | |
parent | Add info about changes to Irrlicht. (diff) | |
download | SledjHamr-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/examples/21.Quake3Explorer/q3factory.h')
-rw-r--r-- | libraries/irrlicht-1.8/examples/21.Quake3Explorer/q3factory.h | 298 |
1 files changed, 149 insertions, 149 deletions
diff --git a/libraries/irrlicht-1.8/examples/21.Quake3Explorer/q3factory.h b/libraries/irrlicht-1.8/examples/21.Quake3Explorer/q3factory.h index d9606ed..d3c9561 100644 --- a/libraries/irrlicht-1.8/examples/21.Quake3Explorer/q3factory.h +++ b/libraries/irrlicht-1.8/examples/21.Quake3Explorer/q3factory.h | |||
@@ -1,149 +1,149 @@ | |||
1 | /*! | 1 | /*! |
2 | Model Factory. | 2 | Model Factory. |
3 | create the additional scenenodes for ( bullets, health... ) | 3 | create the additional scenenodes for ( bullets, health... ) |
4 | 4 | ||
5 | Defines the Entities for Quake3 | 5 | Defines the Entities for Quake3 |
6 | */ | 6 | */ |
7 | #ifndef __QUAKE3_FACTORY__H_INCLUDED__ | 7 | #ifndef __QUAKE3_FACTORY__H_INCLUDED__ |
8 | #define __QUAKE3_FACTORY__H_INCLUDED__ | 8 | #define __QUAKE3_FACTORY__H_INCLUDED__ |
9 | 9 | ||
10 | using namespace irr; | 10 | using namespace irr; |
11 | using namespace scene; | 11 | using namespace scene; |
12 | using namespace gui; | 12 | using namespace gui; |
13 | using namespace video; | 13 | using namespace video; |
14 | using namespace core; | 14 | using namespace core; |
15 | using namespace quake3; | 15 | using namespace quake3; |
16 | using namespace io; | 16 | using namespace io; |
17 | 17 | ||
18 | 18 | ||
19 | 19 | ||
20 | //! Defines to which group the entities belong | 20 | //! Defines to which group the entities belong |
21 | enum eItemGroup | 21 | enum eItemGroup |
22 | { | 22 | { |
23 | WEAPON, | 23 | WEAPON, |
24 | AMMO, | 24 | AMMO, |
25 | ARMOR, | 25 | ARMOR, |
26 | HEALTH, | 26 | HEALTH, |
27 | POWERUP | 27 | POWERUP |
28 | }; | 28 | }; |
29 | 29 | ||
30 | //! define a supgroup for the item. for e.q the Weapons | 30 | //! define a supgroup for the item. for e.q the Weapons |
31 | enum eItemSubGroup | 31 | enum eItemSubGroup |
32 | { | 32 | { |
33 | SUB_NONE = 0, | 33 | SUB_NONE = 0, |
34 | GAUNTLET, | 34 | GAUNTLET, |
35 | MACHINEGUN, | 35 | MACHINEGUN, |
36 | SHOTGUN, | 36 | SHOTGUN, |
37 | GRENADE_LAUNCHER, | 37 | GRENADE_LAUNCHER, |
38 | ROCKET_LAUNCHER, | 38 | ROCKET_LAUNCHER, |
39 | LIGHTNING, | 39 | LIGHTNING, |
40 | RAILGUN, | 40 | RAILGUN, |
41 | PLASMAGUN, | 41 | PLASMAGUN, |
42 | BFG, | 42 | BFG, |
43 | GRAPPLING_HOOK, | 43 | GRAPPLING_HOOK, |
44 | NAILGUN, | 44 | NAILGUN, |
45 | PROX_LAUNCHER, | 45 | PROX_LAUNCHER, |
46 | CHAINGUN, | 46 | CHAINGUN, |
47 | }; | 47 | }; |
48 | 48 | ||
49 | //! aplly a special effect to the shader | 49 | //! aplly a special effect to the shader |
50 | enum eItemSpecialEffect | 50 | enum eItemSpecialEffect |
51 | { | 51 | { |
52 | SPECIAL_SFX_NONE = 0, | 52 | SPECIAL_SFX_NONE = 0, |
53 | SPECIAL_SFX_ROTATE = 1, | 53 | SPECIAL_SFX_ROTATE = 1, |
54 | SPECIAL_SFX_BOUNCE = 2, | 54 | SPECIAL_SFX_BOUNCE = 2, |
55 | SPECIAL_SFX_ROTATE_1 = 4, | 55 | SPECIAL_SFX_ROTATE_1 = 4, |
56 | }; | 56 | }; |
57 | 57 | ||
58 | // a List for defining a model | 58 | // a List for defining a model |
59 | struct SItemElement | 59 | struct SItemElement |
60 | { | 60 | { |
61 | const c8 *key; | 61 | const c8 *key; |
62 | const c8 *model[2]; | 62 | const c8 *model[2]; |
63 | const c8 *sound; | 63 | const c8 *sound; |
64 | const c8 *icon; | 64 | const c8 *icon; |
65 | const c8 *pickup; | 65 | const c8 *pickup; |
66 | s32 value; | 66 | s32 value; |
67 | eItemGroup group; | 67 | eItemGroup group; |
68 | eItemSubGroup sub; | 68 | eItemSubGroup sub; |
69 | u32 special; | 69 | u32 special; |
70 | }; | 70 | }; |
71 | 71 | ||
72 | 72 | ||
73 | //! Get's an entity based on it's key | 73 | //! Get's an entity based on it's key |
74 | const SItemElement * getItemElement ( const stringc& key ); | 74 | const SItemElement * getItemElement ( const stringc& key ); |
75 | 75 | ||
76 | /*! | 76 | /*! |
77 | Quake3 Model Factory. | 77 | Quake3 Model Factory. |
78 | Takes the mesh buffers and creates scenenodes for their associated shaders | 78 | Takes the mesh buffers and creates scenenodes for their associated shaders |
79 | */ | 79 | */ |
80 | void Q3ShaderFactory ( Q3LevelLoadParameter &loadParam, | 80 | void Q3ShaderFactory ( Q3LevelLoadParameter &loadParam, |
81 | IrrlichtDevice *device, | 81 | IrrlichtDevice *device, |
82 | IQ3LevelMesh* mesh, | 82 | IQ3LevelMesh* mesh, |
83 | eQ3MeshIndex meshIndex, | 83 | eQ3MeshIndex meshIndex, |
84 | ISceneNode *parent, | 84 | ISceneNode *parent, |
85 | IMetaTriangleSelector *meta, | 85 | IMetaTriangleSelector *meta, |
86 | bool showShaderName | 86 | bool showShaderName |
87 | ); | 87 | ); |
88 | 88 | ||
89 | 89 | ||
90 | /*! | 90 | /*! |
91 | Creates Model based on the entity list | 91 | Creates Model based on the entity list |
92 | */ | 92 | */ |
93 | void Q3ModelFactory ( Q3LevelLoadParameter &loadParam, | 93 | void Q3ModelFactory ( Q3LevelLoadParameter &loadParam, |
94 | IrrlichtDevice *device, | 94 | IrrlichtDevice *device, |
95 | IQ3LevelMesh* masterMesh, | 95 | IQ3LevelMesh* masterMesh, |
96 | ISceneNode *parent, | 96 | ISceneNode *parent, |
97 | bool showShaderName | 97 | bool showShaderName |
98 | ); | 98 | ); |
99 | 99 | ||
100 | /*! | 100 | /*! |
101 | so we need a good starting Position in the level. | 101 | so we need a good starting Position in the level. |
102 | we can ask the Quake3 Loader for all entities with class_name "info_player_deathmatch" | 102 | we can ask the Quake3 Loader for all entities with class_name "info_player_deathmatch" |
103 | */ | 103 | */ |
104 | s32 Q3StartPosition ( IQ3LevelMesh* mesh, | 104 | s32 Q3StartPosition ( IQ3LevelMesh* mesh, |
105 | ICameraSceneNode* camera, | 105 | ICameraSceneNode* camera, |
106 | s32 startposIndex, | 106 | s32 startposIndex, |
107 | const vector3df &translation | 107 | const vector3df &translation |
108 | ); | 108 | ); |
109 | /*! | 109 | /*! |
110 | gets a accumulated force on a given surface | 110 | gets a accumulated force on a given surface |
111 | */ | 111 | */ |
112 | vector3df getGravity ( const c8 * surface ); | 112 | vector3df getGravity ( const c8 * surface ); |
113 | 113 | ||
114 | 114 | ||
115 | /* | 115 | /* |
116 | Dynamically load the Irrlicht Library | 116 | Dynamically load the Irrlicht Library |
117 | */ | 117 | */ |
118 | funcptr_createDevice load_createDevice ( const c8 * filename); | 118 | funcptr_createDevice load_createDevice ( const c8 * filename); |
119 | funcptr_createDeviceEx load_createDeviceEx ( const c8 * filename); | 119 | funcptr_createDeviceEx load_createDeviceEx ( const c8 * filename); |
120 | 120 | ||
121 | 121 | ||
122 | //! Macro for save Dropping an Element | 122 | //! Macro for save Dropping an Element |
123 | #define dropElement(x) if (x) { x->remove(); x = 0; } | 123 | #define dropElement(x) if (x) { x->remove(); x = 0; } |
124 | 124 | ||
125 | 125 | ||
126 | /* | 126 | /* |
127 | get the current collision respone camera animator | 127 | get the current collision respone camera animator |
128 | */ | 128 | */ |
129 | ISceneNodeAnimatorCollisionResponse* camCollisionResponse( IrrlichtDevice * device ); | 129 | ISceneNodeAnimatorCollisionResponse* camCollisionResponse( IrrlichtDevice * device ); |
130 | 130 | ||
131 | //! internal Animation | 131 | //! internal Animation |
132 | enum eTimeFireFlag | 132 | enum eTimeFireFlag |
133 | { | 133 | { |
134 | FIRED = 1, | 134 | FIRED = 1, |
135 | }; | 135 | }; |
136 | 136 | ||
137 | struct TimeFire | 137 | struct TimeFire |
138 | { | 138 | { |
139 | u32 flags; | 139 | u32 flags; |
140 | u32 next; | 140 | u32 next; |
141 | u32 delta; | 141 | u32 delta; |
142 | }; | 142 | }; |
143 | 143 | ||
144 | void setTimeFire ( TimeFire *t, u32 delta, u32 flags = 0 ); | 144 | void setTimeFire ( TimeFire *t, u32 delta, u32 flags = 0 ); |
145 | void checkTimeFire ( TimeFire *t, u32 listSize, u32 now ); | 145 | void checkTimeFire ( TimeFire *t, u32 listSize, u32 now ); |
146 | 146 | ||
147 | #endif // __QUAKE3_FACTORY__H_INCLUDED__ | 147 | #endif // __QUAKE3_FACTORY__H_INCLUDED__ |
148 | 148 | ||
149 | 149 | ||