summaryrefslogtreecommitdiff
path: root/apps/plugins/doom/doomdef.h
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2010-05-29 08:12:39 +0000
committerMichael Sevakis <jethead71@rockbox.org>2010-05-29 08:12:39 +0000
commit9c6e217f29bb0a76ec153574a3d493b020e5fb60 (patch)
treeb38acde6c091b7f8b0e3205645f9d232f19eeabb /apps/plugins/doom/doomdef.h
parent6980c1e9988a7c959876ad77b760e042272a9ec2 (diff)
downloadrockbox-9c6e217f29bb0a76ec153574a3d493b020e5fb60.tar.gz
rockbox-9c6e217f29bb0a76ec153574a3d493b020e5fb60.zip
Doom plugin: In anticipation of moving to the EABI toolchain, because of its assumptions about enums being sized as ints, convert enum typdefs to int or unsigned depending upon whether they have negative values in the enumeration. This should effectively preserve the manner in which it is compiled under the old toolchain and avoids having to closely inspect and possibly change many places in the code.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26368 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/doom/doomdef.h')
-rw-r--r--apps/plugins/doom/doomdef.h56
1 files changed, 34 insertions, 22 deletions
diff --git a/apps/plugins/doom/doomdef.h b/apps/plugins/doom/doomdef.h
index a0e8ad50bc..05346cd443 100644
--- a/apps/plugins/doom/doomdef.h
+++ b/apps/plugins/doom/doomdef.h
@@ -48,30 +48,33 @@ enum { DVERSION = 110 };
48 48
49// Game mode handling - identify IWAD version 49// Game mode handling - identify IWAD version
50// to handle IWAD dependend animations etc. 50// to handle IWAD dependend animations etc.
51typedef enum { 51enum {
52 shareware, // DOOM 1 shareware, E1, M9 52 shareware, // DOOM 1 shareware, E1, M9
53 registered, // DOOM 1 registered, E3, M27 53 registered, // DOOM 1 registered, E3, M27
54 commercial, // DOOM 2 retail, E1 M34 (DOOM 2 german edition not handled) 54 commercial, // DOOM 2 retail, E1 M34 (DOOM 2 german edition not handled)
55 retail, // DOOM 1 retail, E4, M36 55 retail, // DOOM 1 retail, E4, M36
56 indetermined // Well, no IWAD found. 56 indetermined // Well, no IWAD found.
57} GameMode_t; 57};
58typedef unsigned GameMode_t;
58 59
59// Mission packs - might be useful for TC stuff? 60// Mission packs - might be useful for TC stuff?
60typedef enum { 61enum {
61 doom, // DOOM 1 62 doom, // DOOM 1
62 doom2, // DOOM 2 63 doom2, // DOOM 2
63 pack_tnt, // TNT mission pack 64 pack_tnt, // TNT mission pack
64 pack_plut, // Plutonia pack 65 pack_plut, // Plutonia pack
65 none 66 none
66} GameMission_t; 67};
68typedef unsigned GameMission_t;
67 69
68// Identify language to use, software localization. 70// Identify language to use, software localization.
69typedef enum { 71enum {
70 english, 72 english,
71 french, 73 french,
72 german, 74 german,
73 unknown 75 unknown
74} Language_t; 76};
77typedef unsigned Language_t;
75 78
76// 79//
77// For resize of screen, at start of game. 80// For resize of screen, at start of game.
@@ -122,12 +125,13 @@ extern int SCREENHEIGHT;
122// The current state of the game: whether we are playing, gazing 125// The current state of the game: whether we are playing, gazing
123// at the intermission screen, the game final animation, or a demo. 126// at the intermission screen, the game final animation, or a demo.
124 127
125typedef enum { 128enum {
126 GS_LEVEL, 129 GS_LEVEL,
127 GS_INTERMISSION, 130 GS_INTERMISSION,
128 GS_FINALE, 131 GS_FINALE,
129 GS_DEMOSCREEN 132 GS_DEMOSCREEN
130} gamestate_t; 133};
134typedef unsigned gamestate_t;
131 135
132// 136//
133// Difficulty/skill settings/filters. 137// Difficulty/skill settings/filters.
@@ -147,20 +151,21 @@ typedef enum {
147#define MTF_FRIEND 128 151#define MTF_FRIEND 128
148#define MTF_RESERVED 256 152#define MTF_RESERVED 256
149 153
150typedef enum { 154enum {
151 sk_none=-1, //jff 3/24/98 create unpicked skill setting 155 sk_none=-1, //jff 3/24/98 create unpicked skill setting
152 sk_baby=0, 156 sk_baby=0,
153 sk_easy, 157 sk_easy,
154 sk_medium, 158 sk_medium,
155 sk_hard, 159 sk_hard,
156 sk_nightmare 160 sk_nightmare
157} skill_t; 161};
162typedef int skill_t;
158 163
159// 164//
160// Key cards. 165// Key cards.
161// 166//
162 167
163typedef enum { 168enum {
164 it_bluecard, 169 it_bluecard,
165 it_yellowcard, 170 it_yellowcard,
166 it_redcard, 171 it_redcard,
@@ -168,11 +173,12 @@ typedef enum {
168 it_yellowskull, 173 it_yellowskull,
169 it_redskull, 174 it_redskull,
170 NUMCARDS 175 NUMCARDS
171} card_t; 176};
177typedef unsigned card_t;
172 178
173// The defined weapons, including a marker 179// The defined weapons, including a marker
174// indicating user has not changed weapon. 180// indicating user has not changed weapon.
175typedef enum { 181enum {
176 wp_fist, 182 wp_fist,
177 wp_pistol, 183 wp_pistol,
178 wp_shotgun, 184 wp_shotgun,
@@ -185,20 +191,23 @@ typedef enum {
185 191
186 NUMWEAPONS, 192 NUMWEAPONS,
187 wp_nochange // No pending weapon change. 193 wp_nochange // No pending weapon change.
188} weapontype_t; 194};
195typedef unsigned weapontype_t;
189 196
190// Ammunition types defined. 197// Ammunition types defined.
191typedef enum { 198enum {
192 am_clip, // Pistol / chaingun ammo. 199 am_clip, // Pistol / chaingun ammo.
193 am_shell, // Shotgun / double barreled shotgun. 200 am_shell, // Shotgun / double barreled shotgun.
194 am_cell, // Plasma rifle, BFG. 201 am_cell, // Plasma rifle, BFG.
195 am_misl, // Missile launcher. 202 am_misl, // Missile launcher.
196 NUMAMMO, 203 NUMAMMO,
197 am_noammo // Unlimited for chainsaw / fist. 204 am_noammo // Unlimited for chainsaw / fist.
198} ammotype_t; 205};
206
207typedef unsigned ammotype_t;
199 208
200// Power up artifacts. 209// Power up artifacts.
201typedef enum { 210enum {
202 pw_invulnerability, 211 pw_invulnerability,
203 pw_strength, 212 pw_strength,
204 pw_invisibility, 213 pw_invisibility,
@@ -206,15 +215,17 @@ typedef enum {
206 pw_allmap, 215 pw_allmap,
207 pw_infrared, 216 pw_infrared,
208 NUMPOWERS 217 NUMPOWERS
209} powertype_t; 218};
219typedef unsigned powertype_t;
210 220
211// Power up durations (how many seconds till expiration). 221// Power up durations (how many seconds till expiration).
212typedef enum { 222enum {
213 INVULNTICS = (30*TICRATE), 223 INVULNTICS = (30*TICRATE),
214 INVISTICS = (60*TICRATE), 224 INVISTICS = (60*TICRATE),
215 INFRATICS = (120*TICRATE), 225 INFRATICS = (120*TICRATE),
216 IRONTICS = (60*TICRATE) 226 IRONTICS = (60*TICRATE)
217} powerduration_t; 227};
228typedef unsigned powerduration_t;
218 229
219// 230//
220// DOOM keyboard definition. 231// DOOM keyboard definition.
@@ -289,7 +300,7 @@ typedef enum {
289// Defines Setup Screen groups that config variables appear in. 300// Defines Setup Screen groups that config variables appear in.
290// Used when resetting the defaults for every item in a Setup group. 301// Used when resetting the defaults for every item in a Setup group.
291 302
292typedef enum { 303enum {
293 ss_none, 304 ss_none,
294 ss_keys, 305 ss_keys,
295 ss_weap, 306 ss_weap,
@@ -301,7 +312,8 @@ typedef enum {
301 ss_gen, /* killough 10/98 */ 312 ss_gen, /* killough 10/98 */
302 ss_comp, /* killough 10/98 */ 313 ss_comp, /* killough 10/98 */
303 ss_max 314 ss_max
304} ss_types; 315};
316typedef unsigned ss_types;
305 317
306// phares 3/20/98: 318// phares 3/20/98:
307// 319//