summaryrefslogtreecommitdiff
path: root/apps/plugins
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
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')
-rw-r--r--apps/plugins/doom/am_map.c2
-rw-r--r--apps/plugins/doom/d_event.h15
-rw-r--r--apps/plugins/doom/d_net.h11
-rw-r--r--apps/plugins/doom/d_player.h10
-rw-r--r--apps/plugins/doom/doomdef.h56
-rw-r--r--apps/plugins/doom/doomstat.h5
-rw-r--r--apps/plugins/doom/doomtype.h16
-rw-r--r--apps/plugins/doom/info.h15
-rw-r--r--apps/plugins/doom/m_menu.c24
-rw-r--r--apps/plugins/doom/m_menu.h6
-rw-r--r--apps/plugins/doom/m_misc.h22
-rw-r--r--apps/plugins/doom/m_random.h5
-rw-r--r--apps/plugins/doom/p_enemy.c5
-rw-r--r--apps/plugins/doom/p_pspr.h5
-rw-r--r--apps/plugins/doom/p_saveg.c8
-rw-r--r--apps/plugins/doom/p_spec.h143
-rw-r--r--apps/plugins/doom/p_tick.h5
-rw-r--r--apps/plugins/doom/r_defs.h21
-rw-r--r--apps/plugins/doom/sounds.h10
-rw-r--r--apps/plugins/doom/st_stuff.h10
-rw-r--r--apps/plugins/doom/v_video.c10
-rw-r--r--apps/plugins/doom/v_video.h18
-rw-r--r--apps/plugins/doom/w_wad.h19
-rw-r--r--apps/plugins/doom/wi_stuff.c5
-rw-r--r--apps/plugins/doom/wi_stuff.h5
25 files changed, 260 insertions, 191 deletions
diff --git a/apps/plugins/doom/am_map.c b/apps/plugins/doom/am_map.c
index eb4e13279e..ff74e9938f 100644
--- a/apps/plugins/doom/am_map.c
+++ b/apps/plugins/doom/am_map.c
@@ -194,7 +194,7 @@ int ddt_cheating = 0; // killough 2/7/98: make global, rename to ddt_*
194 194
195static int leveljuststarted = 1; // kluge until AM_LevelInit() is called 195static int leveljuststarted = 1; // kluge until AM_LevelInit() is called
196 196
197enum automapmode_e automapmode; // Mode that the automap is in 197automapmode_e automapmode; // Mode that the automap is in
198 198
199// location of window on screen 199// location of window on screen
200static int f_x; 200static int f_x;
diff --git a/apps/plugins/doom/d_event.h b/apps/plugins/doom/d_event.h
index 6896fd5c37..b9b42a3989 100644
--- a/apps/plugins/doom/d_event.h
+++ b/apps/plugins/doom/d_event.h
@@ -42,13 +42,14 @@
42// 42//
43 43
44// Input event types. 44// Input event types.
45typedef enum 45enum
46{ 46{
47 ev_keydown, 47 ev_keydown,
48 ev_keyup, 48 ev_keyup,
49 ev_mouse, 49 ev_mouse,
50 ev_joystick 50 ev_joystick
51} evtype_t; 51};
52typedef int evtype_t;
52 53
53// Event structure. 54// Event structure.
54typedef struct 55typedef struct
@@ -60,7 +61,7 @@ typedef struct
60} event_t; 61} event_t;
61 62
62 63
63typedef enum 64enum
64{ 65{
65 ga_nothing, 66 ga_nothing,
66 ga_loadlevel, 67 ga_loadlevel,
@@ -71,14 +72,15 @@ typedef enum
71 ga_completed, 72 ga_completed,
72 ga_victory, 73 ga_victory,
73 ga_worlddone, 74 ga_worlddone,
74} gameaction_t; 75};
76typedef unsigned gameaction_t;
75 77
76 78
77 79
78// 80//
79// Button/action code definitions. 81// Button/action code definitions.
80// 82//
81typedef enum 83enum
82{ 84{
83 // Press "Fire". 85 // Press "Fire".
84 BT_ATTACK = 1, 86 BT_ATTACK = 1,
@@ -111,7 +113,8 @@ typedef enum
111 BTS_SAVEMASK = (4+8+16), 113 BTS_SAVEMASK = (4+8+16),
112 BTS_SAVESHIFT = 2, 114 BTS_SAVESHIFT = 2,
113 115
114} buttoncode_t; 116};
117typedef unsigned buttoncode_t;
115 118
116 119
117// 120//
diff --git a/apps/plugins/doom/d_net.h b/apps/plugins/doom/d_net.h
index 6b586e3c96..e43aaf112f 100644
--- a/apps/plugins/doom/d_net.h
+++ b/apps/plugins/doom/d_net.h
@@ -58,12 +58,12 @@
58// Networking and tick handling related. 58// Networking and tick handling related.
59#define BACKUPTICS 12 59#define BACKUPTICS 12
60 60
61typedef enum 61enum
62{ 62{
63 CMD_SEND = 1, 63 CMD_SEND = 1,
64 CMD_GET = 2 64 CMD_GET = 2
65 65};
66} command_t; 66typedef unsigned command_t;
67 67
68 68
69// 69//
@@ -125,11 +125,12 @@ typedef struct
125 char filler[sizeof(ticcmd_t)*BACKUPTICS-STARTUPLEN]; 125 char filler[sizeof(ticcmd_t)*BACKUPTICS-STARTUPLEN];
126} startup_t; 126} startup_t;
127 127
128typedef enum { 128enum {
129 // Leave space, so low values corresponding to normal netgame setup packets can be ignored 129 // Leave space, so low values corresponding to normal netgame setup packets can be ignored
130 nm_plcolour = 3, 130 nm_plcolour = 3,
131 nm_savegamename = 4, 131 nm_savegamename = 4,
132} netmisctype_t; 132};
133typedef unsigned netmisctype_t;
133 134
134typedef struct 135typedef struct
135{ 136{
diff --git a/apps/plugins/doom/d_player.h b/apps/plugins/doom/d_player.h
index f86b68f9be..974d0b22ba 100644
--- a/apps/plugins/doom/d_player.h
+++ b/apps/plugins/doom/d_player.h
@@ -58,7 +58,7 @@
58// 58//
59// Player states. 59// Player states.
60// 60//
61typedef enum 61enum
62{ 62{
63 // Playing or camping. 63 // Playing or camping.
64 PST_LIVE, 64 PST_LIVE,
@@ -67,13 +67,14 @@ typedef enum
67 // Ready to restart/respawn??? 67 // Ready to restart/respawn???
68 PST_REBORN 68 PST_REBORN
69 69
70} playerstate_t; 70};
71typedef unsigned playerstate_t;
71 72
72 73
73// 74//
74// Player internal flags, for cheats and debug. 75// Player internal flags, for cheats and debug.
75// 76//
76typedef enum 77enum
77{ 78{
78 // No clipping, walk through barriers. 79 // No clipping, walk through barriers.
79 CF_NOCLIP = 1, 80 CF_NOCLIP = 1,
@@ -82,7 +83,8 @@ typedef enum
82 // Not really a cheat, just a debug aid. 83 // Not really a cheat, just a debug aid.
83 CF_NOMOMENTUM = 4 84 CF_NOMOMENTUM = 4
84 85
85} cheat_t; 86};
87typedef unsigned cheat_t;
86 88
87 89
88// 90//
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//
diff --git a/apps/plugins/doom/doomstat.h b/apps/plugins/doom/doomstat.h
index 5a5a87c3c5..a89a4e547f 100644
--- a/apps/plugins/doom/doomstat.h
+++ b/apps/plugins/doom/doomstat.h
@@ -52,14 +52,15 @@ extern boolean fastparm; // checkparm of -fast
52 52
53extern boolean devparm; // DEBUG: launched with -devparm 53extern boolean devparm; // DEBUG: launched with -devparm
54 54
55enum automapmode_e { 55enum {
56 am_active = 1, // currently shown 56 am_active = 1, // currently shown
57 am_overlay= 2, // covers the screen, i.e. not overlay mode 57 am_overlay= 2, // covers the screen, i.e. not overlay mode
58 am_rotate = 4, // rotates to the player facing direction 58 am_rotate = 4, // rotates to the player facing direction
59 am_follow = 8, // keep the player centred 59 am_follow = 8, // keep the player centred
60 am_grid =16, // show grid 60 am_grid =16, // show grid
61}; 61};
62extern enum automapmode_e automapmode; // Mode that the automap is in 62typedef int automapmode_e;
63extern automapmode_e automapmode; // Mode that the automap is in
63 64
64// ----------------------------------------------------- 65// -----------------------------------------------------
65// Game Mode - identify IWAD as shareware, retail etc. 66// Game Mode - identify IWAD as shareware, retail etc.
diff --git a/apps/plugins/doom/doomtype.h b/apps/plugins/doom/doomtype.h
index 59b33758da..22e3ec6009 100644
--- a/apps/plugins/doom/doomtype.h
+++ b/apps/plugins/doom/doomtype.h
@@ -33,18 +33,9 @@
33#define __DOOMTYPE__ 33#define __DOOMTYPE__
34#include "rockmacros.h" 34#include "rockmacros.h"
35 35
36#ifndef __BYTEBOOL__
37#define __BYTEBOOL__
38// Fixed to use builtin bool type with C++. 36// Fixed to use builtin bool type with C++.
39#ifdef __cplusplus 37typedef unsigned int boolean;
40typedef bool boolean;
41#else
42//typedef enum {false, true} boolean;
43//#define boolean bool
44typedef enum _boolean { FALSE, TRUE } boolean;
45#endif
46typedef unsigned char byte; 38typedef unsigned char byte;
47#endif
48 39
49typedef signed long long int_64_t; 40typedef signed long long int_64_t;
50typedef unsigned long long uint_64_t; 41typedef unsigned long long uint_64_t;
@@ -63,7 +54,7 @@ typedef unsigned long long uint_64_t;
63#define MINLONG ((long)0x80000000) 54#define MINLONG ((long)0x80000000)
64 55
65/* cph - move compatibility levels here so we can use them in d_server.c */ 56/* cph - move compatibility levels here so we can use them in d_server.c */
66typedef enum { 57enum {
67 doom_12_compatibility, /* Behave like early doom versions */ 58 doom_12_compatibility, /* Behave like early doom versions */
68 doom_demo_compatibility, /* As compatible as possible for 59 doom_demo_compatibility, /* As compatible as possible for
69 * playing original Doom demos */ 60 * playing original Doom demos */
@@ -80,6 +71,7 @@ typedef enum {
80 /* Aliases follow */ 71 /* Aliases follow */
81 boom_compatibility = boom_201_compatibility, /* Alias used by G_Compatibility */ 72 boom_compatibility = boom_201_compatibility, /* Alias used by G_Compatibility */
82 best_compatibility = prboom_3_compatibility, 73 best_compatibility = prboom_3_compatibility,
83} complevel_t; 74};
75typedef unsigned complevel_t;
84 76
85#endif 77#endif
diff --git a/apps/plugins/doom/info.h b/apps/plugins/doom/info.h
index d6c20f0d5d..d498c40c3d 100644
--- a/apps/plugins/doom/info.h
+++ b/apps/plugins/doom/info.h
@@ -41,7 +41,7 @@
41/******************************************************************** 41/********************************************************************
42 * Sprite name enumeration - must match info.c * 42 * Sprite name enumeration - must match info.c *
43 ********************************************************************/ 43 ********************************************************************/
44typedef enum 44enum
45{ 45{
46 SPR_TROO, 46 SPR_TROO,
47 SPR_SHTG, 47 SPR_SHTG,
@@ -188,13 +188,14 @@ typedef enum
188#endif 188#endif
189 NUMSPRITES 189 NUMSPRITES
190 190
191} spritenum_t; 191};
192typedef unsigned spritenum_t;
192 193
193/******************************************************************** 194/********************************************************************
194 * States (frames) enumeration -- must match info.c * 195 * States (frames) enumeration -- must match info.c *
195 ********************************************************************/ 196 ********************************************************************/
196 197
197typedef enum 198enum
198{ 199{
199 S_NULL, 200 S_NULL,
200 S_LIGHTDONE, 201 S_LIGHTDONE,
@@ -1204,7 +1205,8 @@ typedef enum
1204 1205
1205 NUMSTATES /* Counter of how many there are */ 1206 NUMSTATES /* Counter of how many there are */
1206 1207
1207} statenum_t; 1208};
1209typedef unsigned statenum_t;
1208 1210
1209/******************************************************************** 1211/********************************************************************
1210 * Definition of the state (frames) structure * 1212 * Definition of the state (frames) structure *
@@ -1230,7 +1232,7 @@ extern const char *sprnames[NUMSPRITES+1]; /* 1/17/98 killough - CPhipps - const
1230 * Note that many of these are generically named for the ornamentals 1232 * Note that many of these are generically named for the ornamentals
1231 */ 1233 */
1232 1234
1233typedef enum { 1235enum {
1234 MT_PLAYER, 1236 MT_PLAYER,
1235 MT_POSSESSED, 1237 MT_POSSESSED,
1236 MT_SHOTGUY, 1238 MT_SHOTGUY,
@@ -1391,7 +1393,8 @@ typedef enum {
1391 MT_STEALTHZOMBIE, 1393 MT_STEALTHZOMBIE,
1392 NUMMOBJTYPES 1394 NUMMOBJTYPES
1393 1395
1394} mobjtype_t; 1396};
1397typedef unsigned mobjtype_t;
1395 1398
1396/******************************************************************** 1399/********************************************************************
1397 * Definition of the Thing structure 1400 * Definition of the Thing structure
diff --git a/apps/plugins/doom/m_menu.c b/apps/plugins/doom/m_menu.c
index 14d8474cbf..b0b0f9fff8 100644
--- a/apps/plugins/doom/m_menu.c
+++ b/apps/plugins/doom/m_menu.c
@@ -246,7 +246,8 @@ enum
246 readthis, 246 readthis,
247 quitdoom, 247 quitdoom,
248 main_end 248 main_end
249} main_e; 249};
250unsigned main_e;
250 251
251menuitem_t MainMenu[]= 252menuitem_t MainMenu[]=
252 { 253 {
@@ -280,7 +281,8 @@ enum
280 ep3, 281 ep3,
281 ep4, 282 ep4,
282 ep_end 283 ep_end
283} episodes_e; 284};
285unsigned episodes_e;
284 286
285menuitem_t EpisodeMenu[]= 287menuitem_t EpisodeMenu[]=
286 { 288 {
@@ -311,7 +313,8 @@ enum
311 violence, 313 violence,
312 nightmare, 314 nightmare,
313 newg_end 315 newg_end
314} newgame_e; 316};
317unsigned newgame_e;
315 318
316menuitem_t NewGameMenu[]= 319menuitem_t NewGameMenu[]=
317 { 320 {
@@ -347,7 +350,8 @@ enum
347 option_empty2, 350 option_empty2,
348 soundvol, 351 soundvol,
349 opt_end 352 opt_end
350} options_e; 353};
354unsigned options_e;
351 355
352menuitem_t OptionsMenu[]= 356menuitem_t OptionsMenu[]=
353 { 357 {
@@ -377,7 +381,8 @@ enum
377{ 381{
378 rdthsempty1, 382 rdthsempty1,
379 read1_end 383 read1_end
380} read_e; 384};
385unsigned read_e;
381 386
382menuitem_t ReadMenu1[] = 387menuitem_t ReadMenu1[] =
383 { 388 {
@@ -398,7 +403,8 @@ enum
398{ 403{
399 rdthsempty2, 404 rdthsempty2,
400 read2_end 405 read2_end
401} read_e2; 406};
407unsigned read_e2;
402 408
403menuitem_t ReadMenu2[]= 409menuitem_t ReadMenu2[]=
404 { 410 {
@@ -427,7 +433,8 @@ enum
427 system_vol, 433 system_vol,
428 sfx_empty3, 434 sfx_empty3,
429 sound_end 435 sound_end
430} sound_e; 436};
437unsigned sound_e;
431 438
432menuitem_t SoundMenu[]= 439menuitem_t SoundMenu[]=
433 { 440 {
@@ -461,7 +468,8 @@ enum
461 load5, 468 load5,
462 load6, 469 load6,
463 load_end 470 load_end
464} load_e; 471};
472unsigned load_e;
465 473
466menuitem_t LoadMenu[]= 474menuitem_t LoadMenu[]=
467 { 475 {
diff --git a/apps/plugins/doom/m_menu.h b/apps/plugins/doom/m_menu.h
index 8444b72a5f..da360c0147 100644
--- a/apps/plugins/doom/m_menu.h
+++ b/apps/plugins/doom/m_menu.h
@@ -60,13 +60,13 @@ void M_StartControlPanel (void);
60 * The setup_group enum is used to show which 'groups' keys fall into so 60 * The setup_group enum is used to show which 'groups' keys fall into so
61 * that you can bind a key differently in each 'group'. 61 * that you can bind a key differently in each 'group'.
62 */ 62 */
63 63enum {
64typedef enum {
65 m_null, // Has no meaning; not applicable 64 m_null, // Has no meaning; not applicable
66 m_scrn, // A key can not be assigned to more than one action 65 m_scrn, // A key can not be assigned to more than one action
67 m_map, // in the same group. A key can be assigned to one 66 m_map, // in the same group. A key can be assigned to one
68 m_menu, // action in one group, and another action in another. 67 m_menu, // action in one group, and another action in another.
69} setup_group; 68};
69typedef unsigned setup_group;
70 70
71/**************************** 71/****************************
72 * 72 *
diff --git a/apps/plugins/doom/m_misc.h b/apps/plugins/doom/m_misc.h
index 25eb8540c0..3ea6af987f 100644
--- a/apps/plugins/doom/m_misc.h
+++ b/apps/plugins/doom/m_misc.h
@@ -61,6 +61,17 @@ struct default_s *M_LookupDefault(const char *name); /* killough 11/98 */
61 61
62// CPhipps - struct to hold a value in a config file 62// CPhipps - struct to hold a value in a config file
63// Cannot be a union, as it must be initialised 63// Cannot be a union, as it must be initialised
64enum {
65 def_none, // Dummy entry
66 def_str, // A string
67 def_int, // Integer
68 def_hex, // Integer (write in hex)
69 def_bool = def_int, // Boolean
70 def_key = def_hex, // Key code (byte)
71 def_mouseb = def_int,// Mouse button
72 def_colour = def_hex // Colour (256 colour palette entry)
73}; /* type */
74
64typedef struct default_s 75typedef struct default_s
65{ 76{
66 const char* name; 77 const char* name;
@@ -84,16 +95,7 @@ typedef struct default_s
84 // Limits (for an int) 95 // Limits (for an int)
85 int minvalue; // jff 3/3/98 minimum allowed value 96 int minvalue; // jff 3/3/98 minimum allowed value
86 int maxvalue; // jff 3/3/98 maximum allowed value 97 int maxvalue; // jff 3/3/98 maximum allowed value
87 enum { 98 unsigned type; // CPhipps - type of entry
88 def_none, // Dummy entry
89 def_str, // A string
90 def_int, // Integer
91 def_hex, // Integer (write in hex)
92 def_bool = def_int, // Boolean
93 def_key = def_hex, // Key code (byte)
94 def_mouseb = def_int,// Mouse button
95 def_colour = def_hex // Colour (256 colour palette entry)
96 } type; // CPhipps - type of entry
97 int setupscreen; // phares 4/19/98: setup screen where this appears 99 int setupscreen; // phares 4/19/98: setup screen where this appears
98 int *current; /* cph - MBF-like pointer to current value */ 100 int *current; /* cph - MBF-like pointer to current value */
99 // cph - removed the help strings from the config file 101 // cph - removed the help strings from the config file
diff --git a/apps/plugins/doom/m_random.h b/apps/plugins/doom/m_random.h
index 67c1a3ba4b..b99dd1793c 100644
--- a/apps/plugins/doom/m_random.h
+++ b/apps/plugins/doom/m_random.h
@@ -57,7 +57,7 @@
57// indicated by the #'s, because they're critical for preserving demo 57// indicated by the #'s, because they're critical for preserving demo
58// sync. Do not remove entries simply because they become unused later. 58// sync. Do not remove entries simply because they become unused later.
59 59
60typedef enum { 60enum {
61 pr_skullfly, // #1 61 pr_skullfly, // #1
62 pr_damage, // #2 62 pr_damage, // #2
63 pr_crush, // #3 63 pr_crush, // #3
@@ -124,7 +124,8 @@ typedef enum {
124 124
125 // End of new entries 125 // End of new entries
126 NUMPRCLASS // MUST be last item in list 126 NUMPRCLASS // MUST be last item in list
127} pr_class_t; 127};
128typedef unsigned pr_class_t;
128 129
129// The random number generator's state. 130// The random number generator's state.
130typedef struct { 131typedef struct {
diff --git a/apps/plugins/doom/p_enemy.c b/apps/plugins/doom/p_enemy.c
index 5b3f958146..9300315a10 100644
--- a/apps/plugins/doom/p_enemy.c
+++ b/apps/plugins/doom/p_enemy.c
@@ -50,7 +50,7 @@
50 50
51static mobj_t *current_actor; 51static mobj_t *current_actor;
52 52
53typedef enum { 53enum {
54 DI_EAST, 54 DI_EAST,
55 DI_NORTHEAST, 55 DI_NORTHEAST,
56 DI_NORTH, 56 DI_NORTH,
@@ -61,7 +61,8 @@ typedef enum {
61 DI_SOUTHEAST, 61 DI_SOUTHEAST,
62 DI_NODIR, 62 DI_NODIR,
63 NUMDIRS 63 NUMDIRS
64} dirtype_t; 64};
65typedef unsigned dirtype_t;
65 66
66void A_Fall(mobj_t *actor); 67void A_Fall(mobj_t *actor);
67void A_FaceTarget(mobj_t *actor); 68void A_FaceTarget(mobj_t *actor);
diff --git a/apps/plugins/doom/p_pspr.h b/apps/plugins/doom/p_pspr.h
index bb6517c4e1..6e6608a753 100644
--- a/apps/plugins/doom/p_pspr.h
+++ b/apps/plugins/doom/p_pspr.h
@@ -65,12 +65,13 @@
65 * coordinates are given for a 320*200 view screen. 65 * coordinates are given for a 320*200 view screen.
66 */ 66 */
67 67
68typedef enum 68enum
69{ 69{
70 ps_weapon, 70 ps_weapon,
71 ps_flash, 71 ps_flash,
72 NUMPSPRITES 72 NUMPSPRITES
73} psprnum_t; 73};
74typedef unsigned psprnum_t;
74 75
75typedef struct 76typedef struct
76{ 77{
diff --git a/apps/plugins/doom/p_saveg.c b/apps/plugins/doom/p_saveg.c
index 1b73593879..a704bfa83c 100644
--- a/apps/plugins/doom/p_saveg.c
+++ b/apps/plugins/doom/p_saveg.c
@@ -248,10 +248,11 @@ void P_UnArchiveWorld (void)
248// Thinkers 248// Thinkers
249// 249//
250 250
251typedef enum { 251enum {
252 tc_end, 252 tc_end,
253 tc_mobj 253 tc_mobj
254} thinkerclass_t; 254};
255typedef unsigned thinkerclass_t;
255 256
256// phares 9/13/98: Moved this code outside of P_ArchiveThinkers so the 257// phares 9/13/98: Moved this code outside of P_ArchiveThinkers so the
257// thinker indices could be used by the code that saves sector info. 258// thinker indices could be used by the code that saves sector info.
@@ -527,7 +528,8 @@ enum {
527 tc_pusher, // phares 3/22/98: new push/pull effect thinker 528 tc_pusher, // phares 3/22/98: new push/pull effect thinker
528 tc_flicker, // killough 10/4/98 529 tc_flicker, // killough 10/4/98
529 tc_endspecials 530 tc_endspecials
530} specials_e; 531};
532unsigned specials_e;
531 533
532// 534//
533// Things to handle: 535// Things to handle:
diff --git a/apps/plugins/doom/p_spec.h b/apps/plugins/doom/p_spec.h
index 426e7db50d..7ab787c7d8 100644
--- a/apps/plugins/doom/p_spec.h
+++ b/apps/plugins/doom/p_spec.h
@@ -193,7 +193,7 @@
193 193
194// define names for the TriggerType field of the general linedefs 194// define names for the TriggerType field of the general linedefs
195 195
196typedef enum 196enum
197{ 197{
198 WalkOnce, 198 WalkOnce,
199 WalkMany, 199 WalkMany,
@@ -203,21 +203,23 @@ typedef enum
203 GunMany, 203 GunMany,
204 PushOnce, 204 PushOnce,
205 PushMany, 205 PushMany,
206} triggertype_e; 206};
207typedef unsigned triggertype_e;
207 208
208// define names for the Speed field of the general linedefs 209// define names for the Speed field of the general linedefs
209 210
210typedef enum 211enum
211{ 212{
212 SpeedSlow, 213 SpeedSlow,
213 SpeedNormal, 214 SpeedNormal,
214 SpeedFast, 215 SpeedFast,
215 SpeedTurbo, 216 SpeedTurbo,
216} motionspeed_e; 217};
218typedef unsigned motionspeed_e;
217 219
218// define names for the Target field of the general floor 220// define names for the Target field of the general floor
219 221
220typedef enum 222enum
221{ 223{
222 FtoHnF, 224 FtoHnF,
223 FtoLnF, 225 FtoLnF,
@@ -227,29 +229,32 @@ typedef enum
227 FbyST, 229 FbyST,
228 Fby24, 230 Fby24,
229 Fby32, 231 Fby32,
230} floortarget_e; 232};
233typedef unsigned floortarget_e;
231 234
232// define names for the Changer Type field of the general floor 235// define names for the Changer Type field of the general floor
233 236
234typedef enum 237enum
235{ 238{
236 FNoChg, 239 FNoChg,
237 FChgZero, 240 FChgZero,
238 FChgTxt, 241 FChgTxt,
239 FChgTyp, 242 FChgTyp,
240} floorchange_e; 243};
244typedef unsigned floorchange_e;
241 245
242// define names for the Change Model field of the general floor 246// define names for the Change Model field of the general floor
243 247
244typedef enum 248enum
245{ 249{
246 FTriggerModel, 250 FTriggerModel,
247 FNumericModel, 251 FNumericModel,
248} floormodel_t; 252};
253typedef unsigned floormodel_t;
249 254
250// define names for the Target field of the general ceiling 255// define names for the Target field of the general ceiling
251 256
252typedef enum 257enum
253{ 258{
254 CtoHnC, 259 CtoHnC,
255 CtoLnC, 260 CtoLnC,
@@ -259,49 +264,54 @@ typedef enum
259 CbyST, 264 CbyST,
260 Cby24, 265 Cby24,
261 Cby32, 266 Cby32,
262} ceilingtarget_e; 267};
268typedef unsigned ceilingtarget_e;
263 269
264// define names for the Changer Type field of the general ceiling 270// define names for the Changer Type field of the general ceiling
265 271
266typedef enum 272enum
267{ 273{
268 CNoChg, 274 CNoChg,
269 CChgZero, 275 CChgZero,
270 CChgTxt, 276 CChgTxt,
271 CChgTyp, 277 CChgTyp,
272} ceilingchange_e; 278};
279typedef unsigned ceilingchange_e;
273 280
274// define names for the Change Model field of the general ceiling 281// define names for the Change Model field of the general ceiling
275 282
276typedef enum 283enum
277{ 284{
278 CTriggerModel, 285 CTriggerModel,
279 CNumericModel, 286 CNumericModel,
280} ceilingmodel_t; 287};
288typedef unsigned ceilingmodel_t;
281 289
282// define names for the Target field of the general lift 290// define names for the Target field of the general lift
283 291
284typedef enum 292enum
285{ 293{
286 F2LnF, 294 F2LnF,
287 F2NnF, 295 F2NnF,
288 F2LnC, 296 F2LnC,
289 LnF2HnF, 297 LnF2HnF,
290} lifttarget_e; 298};
299typedef unsigned lifttarget_e;
291 300
292// define names for the door Kind field of the general ceiling 301// define names for the door Kind field of the general ceiling
293 302
294typedef enum 303enum
295{ 304{
296 OdCDoor, 305 OdCDoor,
297 ODoor, 306 ODoor,
298 CdODoor, 307 CdODoor,
299 CDoor, 308 CDoor,
300} doorkind_e; 309};
310typedef unsigned intdoorkind_e;
301 311
302// define names for the locked door Kind field of the general ceiling 312// define names for the locked door Kind field of the general ceiling
303 313
304typedef enum 314enum
305{ 315{
306 AnyKey, 316 AnyKey,
307 RCard, 317 RCard,
@@ -311,7 +321,8 @@ typedef enum
311 BSkull, 321 BSkull,
312 YSkull, 322 YSkull,
313 AllKeys, 323 AllKeys,
314} keykind_e; 324};
325typedef unsigned keykind_e;
315 326
316////////////////////////////////////////////////////////////////// 327//////////////////////////////////////////////////////////////////
317// 328//
@@ -321,31 +332,34 @@ typedef enum
321 332
322//jff 2/23/98 identify the special classes that can share sectors 333//jff 2/23/98 identify the special classes that can share sectors
323 334
324typedef enum 335enum
325{ 336{
326 floor_special, 337 floor_special,
327 ceiling_special, 338 ceiling_special,
328 lighting_special, 339 lighting_special,
329} special_e; 340};
341typedef unsigned special_e;
330 342
331//jff 3/15/98 pure texture/type change for better generalized support 343//jff 3/15/98 pure texture/type change for better generalized support
332typedef enum 344enum
333{ 345{
334 trigChangeOnly, 346 trigChangeOnly,
335 numChangeOnly, 347 numChangeOnly,
336} change_e; 348};
349typedef unsigned change_e;
337 350
338// p_plats 351// p_plats
339 352
340typedef enum 353enum
341{ 354{
342 up, 355 up,
343 down, 356 down,
344 waiting, 357 waiting,
345 in_stasis 358 in_stasis
346} plat_e; 359};
360typedef unsigned plat_e;
347 361
348typedef enum 362enum
349{ 363{
350 perpetualRaise, 364 perpetualRaise,
351 downWaitUpStay, 365 downWaitUpStay,
@@ -356,11 +370,12 @@ typedef enum
356 genPerpetual, 370 genPerpetual,
357 toggleUpDn, //jff 3/14/98 added to support instant toggle type 371 toggleUpDn, //jff 3/14/98 added to support instant toggle type
358 372
359} plattype_e; 373};
374typedef unsigned plattype_e;
360 375
361// p_doors 376// p_doors
362 377
363typedef enum 378enum
364{ 379{
365 normal, 380 normal,
366 close30ThenOpen, 381 close30ThenOpen,
@@ -380,11 +395,12 @@ typedef enum
380 genBlazeClose, 395 genBlazeClose,
381 genCdO, 396 genCdO,
382 genBlazeCdO, 397 genBlazeCdO,
383} vldoor_e; 398};
399typedef unsigned vldoor_e;
384 400
385// p_ceilng 401// p_ceilng
386 402
387typedef enum 403enum
388{ 404{
389 lowerToFloor, 405 lowerToFloor,
390 raiseToHighest, 406 raiseToHighest,
@@ -405,11 +421,12 @@ typedef enum
405 genCrusher, 421 genCrusher,
406 genSilentCrusher, 422 genSilentCrusher,
407 423
408} ceiling_e; 424};
425typedef unsigned ceiling_e;
409 426
410// p_floor 427// p_floor
411 428
412typedef enum 429enum
413{ 430{
414 // lower floor to highest surrounding floor 431 // lower floor to highest surrounding floor
415 lowerFloor, 432 lowerFloor,
@@ -464,21 +481,24 @@ typedef enum
464 //new types for stair builders 481 //new types for stair builders
465 buildStair, 482 buildStair,
466 genBuildStair, 483 genBuildStair,
467} floor_e; 484};
485typedef unsigned floor_e;
468 486
469typedef enum 487enum
470{ 488{
471 build8, // slowly build by 8 489 build8, // slowly build by 8
472 turbo16 // quickly build by 16 490 turbo16 // quickly build by 16
473 491
474} stair_e; 492};
493typedef unsigned stair_e;
475 494
476typedef enum 495enum
477{ 496{
478 elevateUp, 497 elevateUp,
479 elevateDown, 498 elevateDown,
480 elevateCurrent, 499 elevateCurrent,
481} elevator_e; 500};
501typedef unsigned elevator_e;
482 502
483////////////////////////////////////////////////////////////////// 503//////////////////////////////////////////////////////////////////
484// 504//
@@ -487,21 +507,23 @@ typedef enum
487////////////////////////////////////////////////////////////////// 507//////////////////////////////////////////////////////////////////
488 508
489// texture type enum 509// texture type enum
490typedef enum 510enum
491{ 511{
492 top, 512 top,
493 middle, 513 middle,
494 bottom 514 bottom
495 515
496} bwhere_e; 516};
517typedef unsigned bwhere_e;
497 518
498// crush check returns 519// crush check returns
499typedef enum 520enum
500{ 521{
501 ok, 522 ok,
502 crushed, 523 crushed,
503 pastdest 524 pastdest
504} result_e; 525};
526typedef unsigned result_e;
505 527
506////////////////////////////////////////////////////////////////// 528//////////////////////////////////////////////////////////////////
507// 529//
@@ -700,6 +722,14 @@ typedef struct
700// p_spec 722// p_spec
701 723
702// killough 3/7/98: Add generalized scroll effects 724// killough 3/7/98: Add generalized scroll effects
725enum
726{
727 sc_side,
728 sc_floor,
729 sc_ceiling,
730 sc_carry,
731 sc_carry_ceiling, // killough 4/11/98: carry objects hanging on ceilings
732}; /* type */
703 733
704typedef struct { 734typedef struct {
705 thinker_t thinker; // Thinker structure for scrolling 735 thinker_t thinker; // Thinker structure for scrolling
@@ -709,14 +739,7 @@ typedef struct {
709 fixed_t last_height; // Last known height of control sector 739 fixed_t last_height; // Last known height of control sector
710 fixed_t vdx, vdy; // Accumulated velocity if accelerative 740 fixed_t vdx, vdy; // Accumulated velocity if accelerative
711 int accel; // Whether it's accelerative 741 int accel; // Whether it's accelerative
712 enum 742 unsigned type; // Type of scroll effect
713 {
714 sc_side,
715 sc_floor,
716 sc_ceiling,
717 sc_carry,
718 sc_carry_ceiling, // killough 4/11/98: carry objects hanging on ceilings
719 } type; // Type of scroll effect
720} scroll_t; 743} scroll_t;
721 744
722// phares 3/12/98: added new model of friction for ice/sludge effects 745// phares 3/12/98: added new model of friction for ice/sludge effects
@@ -730,15 +753,17 @@ typedef struct {
730 753
731// phares 3/20/98: added new model of Pushers for push/pull effects 754// phares 3/20/98: added new model of Pushers for push/pull effects
732 755
756enum
757{
758 p_push,
759 p_pull,
760 p_wind,
761 p_current,
762}; /* type */
763
733typedef struct { 764typedef struct {
734 thinker_t thinker; // Thinker structure for Pusher 765 thinker_t thinker; // Thinker structure for Pusher
735 enum 766 unsigned type;
736 {
737 p_push,
738 p_pull,
739 p_wind,
740 p_current,
741 } type;
742 mobj_t* source; // Point source if point pusher 767 mobj_t* source; // Point source if point pusher
743 int x_mag; // X Strength 768 int x_mag; // X Strength
744 int y_mag; // Y Strength 769 int y_mag; // Y Strength
diff --git a/apps/plugins/doom/p_tick.h b/apps/plugins/doom/p_tick.h
index 5a495166b3..f6e497a4ef 100644
--- a/apps/plugins/doom/p_tick.h
+++ b/apps/plugins/doom/p_tick.h
@@ -54,12 +54,13 @@ void P_UpdateThinker(thinker_t *thinker); // killough 8/29/98
54void P_SetTarget(mobj_t **mo, mobj_t *target); // killough 11/98 54void P_SetTarget(mobj_t **mo, mobj_t *target); // killough 11/98
55 55
56// killough 8/29/98: threads of thinkers, for more efficient searches 56// killough 8/29/98: threads of thinkers, for more efficient searches
57typedef enum { 57enum {
58 th_misc, 58 th_misc,
59 th_friends, 59 th_friends,
60 th_enemies, 60 th_enemies,
61 NUMTHCLASS 61 NUMTHCLASS
62} th_class; 62};
63typedef unsigned th_class;
63 64
64extern thinker_t thinkerclasscap[]; 65extern thinker_t thinkerclasscap[];
65 66
diff --git a/apps/plugins/doom/r_defs.h b/apps/plugins/doom/r_defs.h
index a70d8a306c..251f515a07 100644
--- a/apps/plugins/doom/r_defs.h
+++ b/apps/plugins/doom/r_defs.h
@@ -177,13 +177,22 @@ side_t;
177// 177//
178// Move clipping aid for LineDefs. 178// Move clipping aid for LineDefs.
179// 179//
180typedef enum 180enum
181{ 181{
182 ST_HORIZONTAL, 182 ST_HORIZONTAL,
183 ST_VERTICAL, 183 ST_VERTICAL,
184 ST_POSITIVE, 184 ST_POSITIVE,
185 ST_NEGATIVE 185 ST_NEGATIVE
186} slopetype_t; 186};
187typedef int slopetype_t;
188
189enum { // cph:
190 RF_TOP_TILE = 1, // Upper texture needs tiling
191 RF_MID_TILE = 2, // Mid texture needs tiling
192 RF_BOT_TILE = 4, // Lower texture needs tiling
193 RF_IGNORE = 8, // Renderer can skip this line
194 RF_CLOSED =16, // Line blocks view
195};
187 196
188typedef struct line_s 197typedef struct line_s
189{ 198{
@@ -202,13 +211,7 @@ typedef struct line_s
202 int tranlump; // killough 4/11/98: translucency filter, -1 == none 211 int tranlump; // killough 4/11/98: translucency filter, -1 == none
203 int firsttag,nexttag; // killough 4/17/98: improves searches for tags. 212 int firsttag,nexttag; // killough 4/17/98: improves searches for tags.
204 int r_validcount; // cph: if == gametic, r_flags already done 213 int r_validcount; // cph: if == gametic, r_flags already done
205 enum { // cph: 214 int r_flags;
206 RF_TOP_TILE = 1, // Upper texture needs tiling
207 RF_MID_TILE = 2, // Mid texture needs tiling
208 RF_BOT_TILE = 4, // Lower texture needs tiling
209 RF_IGNORE = 8, // Renderer can skip this line
210 RF_CLOSED =16, // Line blocks view
211 } r_flags;
212} 215}
213line_t; 216line_t;
214 217
diff --git a/apps/plugins/doom/sounds.h b/apps/plugins/doom/sounds.h
index bf1004cda9..a5f6fc53ee 100644
--- a/apps/plugins/doom/sounds.h
+++ b/apps/plugins/doom/sounds.h
@@ -102,7 +102,7 @@ extern musicinfo_t S_music[];
102// Identifiers for all music in game. 102// Identifiers for all music in game.
103// 103//
104 104
105typedef enum { 105enum {
106 mus_None, 106 mus_None,
107 mus_e1m1, 107 mus_e1m1,
108 mus_e1m2, 108 mus_e1m2,
@@ -172,13 +172,14 @@ typedef enum {
172 mus_dm2ttl, 172 mus_dm2ttl,
173 mus_dm2int, 173 mus_dm2int,
174 NUMMUSIC 174 NUMMUSIC
175} musicenum_t; 175};
176typedef unsigned musicenum_t;
176 177
177// 178//
178// Identifiers for all sfx in game. 179// Identifiers for all sfx in game.
179// 180//
180 181
181typedef enum { 182enum {
182 sfx_None, 183 sfx_None,
183 sfx_pistol, 184 sfx_pistol,
184 sfx_shotgn, 185 sfx_shotgn,
@@ -299,6 +300,7 @@ typedef enum {
299#endif 300#endif
300 301
301 NUMSFX 302 NUMSFX
302} sfxenum_t; 303};
304typedef unsigned sfxenum_t;
303 305
304#endif 306#endif
diff --git a/apps/plugins/doom/st_stuff.h b/apps/plugins/doom/st_stuff.h
index d65b01e571..24f8c82661 100644
--- a/apps/plugins/doom/st_stuff.h
+++ b/apps/plugins/doom/st_stuff.h
@@ -68,19 +68,21 @@ void ST_Start(void);
68void ST_Init(void); 68void ST_Init(void);
69 69
70// States for status bar code. 70// States for status bar code.
71typedef enum 71enum
72{ 72{
73 AutomapState, 73 AutomapState,
74 FirstPersonState 74 FirstPersonState
75} st_stateenum_t; 75};
76typedef unsigned st_stateenum_t;
76 77
77// States for the chat code. 78// States for the chat code.
78typedef enum 79enum
79{ 80{
80 StartChatState, 81 StartChatState,
81 WaitDestState, 82 WaitDestState,
82 GetChatState 83 GetChatState
83} st_chatstateenum_t; 84};
85typedef unsigned st_chatstateenum_t;
84 86
85boolean ST_Responder(event_t* ev); 87boolean ST_Responder(event_t* ev);
86 88
diff --git a/apps/plugins/doom/v_video.c b/apps/plugins/doom/v_video.c
index a7e2baea16..76993ea5ee 100644
--- a/apps/plugins/doom/v_video.c
+++ b/apps/plugins/doom/v_video.c
@@ -208,7 +208,7 @@ void V_MarkRect(int x, int y, int width, int height)
208// 208//
209void V_CopyRect(int srcx, int srcy, int srcscrn, int width, 209void V_CopyRect(int srcx, int srcy, int srcscrn, int width,
210 int height, int destx, int desty, int destscrn, 210 int height, int destx, int desty, int destscrn,
211 enum patch_translation_e flags) 211 patch_translation_e flags)
212{ 212{
213 byte *src; 213 byte *src;
214 byte *dest; 214 byte *dest;
@@ -263,7 +263,7 @@ void V_CopyRect(int srcx, int srcy, int srcscrn, int width,
263// implemented, to support highres in the menus 263// implemented, to support highres in the menus
264// 264//
265void V_DrawBlock(int x, int y, int scrn, int width, int height, 265void V_DrawBlock(int x, int y, int scrn, int width, int height,
266 const byte *src, enum patch_translation_e flags) 266 const byte *src, patch_translation_e flags)
267{ 267{
268 byte *dest; 268 byte *dest;
269 269
@@ -406,7 +406,7 @@ void V_Init (void)
406// means that their inner loops weren't so well optimised, so merging code may even speed them). 406// means that their inner loops weren't so well optimised, so merging code may even speed them).
407// 407//
408void V_DrawMemPatch(int x, int y, int scrn, const patch_t *patch, 408void V_DrawMemPatch(int x, int y, int scrn, const patch_t *patch,
409 int cm, enum patch_translation_e flags) 409 int cm, patch_translation_e flags)
410{ 410{
411 const byte *trans; 411 const byte *trans;
412 412
@@ -588,7 +588,7 @@ void V_DrawMemPatch(int x, int y, int scrn, const patch_t *patch,
588inline 588inline
589#endif 589#endif
590void V_DrawNumPatch(int x, int y, int scrn, int lump, 590void V_DrawNumPatch(int x, int y, int scrn, int lump,
591 int cm, enum patch_translation_e flags) 591 int cm, patch_translation_e flags)
592{ 592{
593 V_DrawMemPatch(x, y, scrn, (const patch_t*)W_CacheLumpNum(lump), 593 V_DrawMemPatch(x, y, scrn, (const patch_t*)W_CacheLumpNum(lump),
594 cm, flags); 594 cm, flags);
@@ -634,7 +634,7 @@ int V_NamePatchHeight(const char* name)
634// patch will be undefined (in fact black for now) 634// patch will be undefined (in fact black for now)
635 635
636byte *V_PatchToBlock(const char* name, int cm, 636byte *V_PatchToBlock(const char* name, int cm,
637 enum patch_translation_e flags, 637 patch_translation_e flags,
638 unsigned short* width, unsigned short* height) 638 unsigned short* width, unsigned short* height)
639{ 639{
640 (void)cm; 640 (void)cm;
diff --git a/apps/plugins/doom/v_video.h b/apps/plugins/doom/v_video.h
index c4b8927109..cb23895068 100644
--- a/apps/plugins/doom/v_video.h
+++ b/apps/plugins/doom/v_video.h
@@ -53,7 +53,7 @@
53extern const byte *colrngs[]; 53extern const byte *colrngs[];
54 54
55// symbolic indices into color translation table pointer array 55// symbolic indices into color translation table pointer array
56typedef enum 56enum
57{ 57{
58 CR_BRICK, //0 58 CR_BRICK, //0
59 CR_TAN, //1 59 CR_TAN, //1
@@ -67,7 +67,8 @@ typedef enum
67 CR_YELLOW, //9 67 CR_YELLOW, //9
68 CR_BLUE2, //10 // proff 68 CR_BLUE2, //10 // proff
69 CR_LIMIT //11 //jff 2/27/98 added for range check 69 CR_LIMIT //11 //jff 2/27/98 added for range check
70} crange_idx_e; 70};
71typedef unsigned crange_idx_e;
71//jff 1/16/98 end palette color range additions 72//jff 1/16/98 end palette color range additions
72 73
73#define CR_DEFAULT CR_RED /* default value for out of range colors */ 74#define CR_DEFAULT CR_RED /* default value for out of range colors */
@@ -83,17 +84,18 @@ void V_InitColorTranslation(void);
83// Allocates buffer screens, call before R_Init. 84// Allocates buffer screens, call before R_Init.
84void V_Init (void); 85void V_Init (void);
85 86
86enum patch_translation_e { 87enum {
87 VPT_NONE = 0, // Normal 88 VPT_NONE = 0, // Normal
88 VPT_FLIP = 1, // Flip image horizontally 89 VPT_FLIP = 1, // Flip image horizontally
89 VPT_TRANS = 2, // Translate image via a translation table 90 VPT_TRANS = 2, // Translate image via a translation table
90 VPT_STRETCH = 4, // Stretch to compensate for high-res 91 VPT_STRETCH = 4, // Stretch to compensate for high-res
91}; 92};
93typedef unsigned patch_translation_e;
92 94
93#ifndef GL_DOOM 95#ifndef GL_DOOM
94void V_CopyRect(int srcx, int srcy, int srcscrn, int width, int height, 96void V_CopyRect(int srcx, int srcy, int srcscrn, int width, int height,
95 int destx, int desty, int destscrn, 97 int destx, int desty, int destscrn,
96 enum patch_translation_e flags); 98 patch_translation_e flags);
97#else 99#else
98#define V_CopyRect(sx,sy,ss,w,h,dx,dy,ds,f) 100#define V_CopyRect(sx,sy,ss,w,h,dx,dy,ds,f)
99#endif /* GL_DOOM */ 101#endif /* GL_DOOM */
@@ -111,14 +113,14 @@ void V_FillRect(int scrn, int x, int y, int width, int height, byte colour);
111#define V_DrawMemPatch(x,y,s,p,t,f) gld_DrawPatchFromMem(x,y,p,t,f) 113#define V_DrawMemPatch(x,y,s,p,t,f) gld_DrawPatchFromMem(x,y,p,t,f)
112#else 114#else
113void V_DrawMemPatch(int x, int y, int scrn, const patch_t *patch, 115void V_DrawMemPatch(int x, int y, int scrn, const patch_t *patch,
114 int cm, enum patch_translation_e flags); 116 int cm, patch_translation_e flags);
115#endif 117#endif
116// V_DrawNumPatch - Draws the patch from lump num 118// V_DrawNumPatch - Draws the patch from lump num
117#ifdef GL_DOOM 119#ifdef GL_DOOM
118#define V_DrawNumPatch(x,y,s,l,t,f) gld_DrawNumPatch(x,y,l,t,f) 120#define V_DrawNumPatch(x,y,s,l,t,f) gld_DrawNumPatch(x,y,l,t,f)
119#else 121#else
120void V_DrawNumPatch(int x, int y, int scrn, int lump, 122void V_DrawNumPatch(int x, int y, int scrn, int lump,
121 int cm, enum patch_translation_e flags); 123 int cm, patch_translation_e flags);
122#endif 124#endif
123// V_DrawNamePatch - Draws the patch from lump "name" 125// V_DrawNamePatch - Draws the patch from lump "name"
124#ifdef GL_DOOM 126#ifdef GL_DOOM
@@ -140,7 +142,7 @@ int V_NamePatchHeight(const char* name);
140// CPhipps - added const's, patch translation flags for stretching 142// CPhipps - added const's, patch translation flags for stretching
141#ifndef GL_DOOM 143#ifndef GL_DOOM
142void V_DrawBlock(int x, int y, int scrn, int width, int height, 144void V_DrawBlock(int x, int y, int scrn, int width, int height,
143 const byte *src, enum patch_translation_e flags); 145 const byte *src, patch_translation_e flags);
144#endif 146#endif
145 147
146/* cphipps 10/99: function to tile a flat over the screen */ 148/* cphipps 10/99: function to tile a flat over the screen */
@@ -160,7 +162,7 @@ void V_MarkRect(int x, int y, int width,int height);
160// CPhipps - function to convert a patch_t into a simple block bitmap 162// CPhipps - function to convert a patch_t into a simple block bitmap
161// Returns pointer to the malloc()'ed bitmap, and its width and height 163// Returns pointer to the malloc()'ed bitmap, and its width and height
162byte *V_PatchToBlock(const char* name, int cm, 164byte *V_PatchToBlock(const char* name, int cm,
163 enum patch_translation_e flags, 165 patch_translation_e flags,
164 unsigned short* width, unsigned short* height); 166 unsigned short* width, unsigned short* height);
165#else 167#else
166#define V_MarkRect(x,y,w,h) 168#define V_MarkRect(x,y,w,h)
diff --git a/apps/plugins/doom/w_wad.h b/apps/plugins/doom/w_wad.h
index f505f42cb7..05e25c17b0 100644
--- a/apps/plugins/doom/w_wad.h
+++ b/apps/plugins/doom/w_wad.h
@@ -73,7 +73,7 @@ typedef struct
73 73
74// CPhipps - defined enum in wider scope 74// CPhipps - defined enum in wider scope
75// Ty 08/29/98 - add source field to identify where this lump came from 75// Ty 08/29/98 - add source field to identify where this lump came from
76typedef enum { 76enum {
77 // CPhipps - define elements in order of 'how new/unusual' 77 // CPhipps - define elements in order of 'how new/unusual'
78 source_iwad=0, // iwad file load 78 source_iwad=0, // iwad file load
79 source_pre, // predefined lump 79 source_pre, // predefined lump
@@ -81,7 +81,15 @@ typedef enum {
81 source_pwad, // pwad file load 81 source_pwad, // pwad file load
82 source_lmp, // lmp file load 82 source_lmp, // lmp file load
83 source_net // CPhipps 83 source_net // CPhipps
84} wad_source_t; 84};
85typedef unsigned wad_source_t;
86
87enum {
88 ns_global=0,
89 ns_sprites,
90 ns_flats,
91 ns_colormaps
92}; /* namespace */
85 93
86typedef struct 94typedef struct
87{ 95{
@@ -97,12 +105,7 @@ typedef struct
97 int index, next; 105 int index, next;
98 106
99 // killough 4/17/98: namespace tags, to prevent conflicts between resources 107 // killough 4/17/98: namespace tags, to prevent conflicts between resources
100 enum { 108 unsigned namespace;
101 ns_global=0,
102 ns_sprites,
103 ns_flats,
104 ns_colormaps
105 } namespace;
106 109
107 int handle; 110 int handle;
108 int position; 111 int position;
diff --git a/apps/plugins/doom/wi_stuff.c b/apps/plugins/doom/wi_stuff.c
index 3d14d088d5..5aec366026 100644
--- a/apps/plugins/doom/wi_stuff.c
+++ b/apps/plugins/doom/wi_stuff.c
@@ -107,12 +107,13 @@
107// These animation variables, structures, etc. are used for the 107// These animation variables, structures, etc. are used for the
108// DOOM/Ultimate DOOM intermission screen animations. This is 108// DOOM/Ultimate DOOM intermission screen animations. This is
109// totally different from any sprite or texture/flat animations 109// totally different from any sprite or texture/flat animations
110typedef enum 110enum
111{ 111{
112 ANIM_ALWAYS, // determined by patch entry 112 ANIM_ALWAYS, // determined by patch entry
113 ANIM_RANDOM, // occasional 113 ANIM_RANDOM, // occasional
114 ANIM_LEVEL // continuous 114 ANIM_LEVEL // continuous
115} animenum_t; 115};
116typedef unsigned animenum_t;
116 117
117typedef struct 118typedef struct
118{ 119{
diff --git a/apps/plugins/doom/wi_stuff.h b/apps/plugins/doom/wi_stuff.h
index 72c1d32d07..595418f88d 100644
--- a/apps/plugins/doom/wi_stuff.h
+++ b/apps/plugins/doom/wi_stuff.h
@@ -38,13 +38,14 @@
38 38
39// States for the intermission 39// States for the intermission
40 40
41typedef enum 41enum
42{ 42{
43 NoState = -1, 43 NoState = -1,
44 StatCount, 44 StatCount,
45 ShowNextLoc 45 ShowNextLoc
46 46
47} stateenum_t; 47};
48typedef int stateenum_t;
48 49
49// Called by main loop, animate the intermission. 50// Called by main loop, animate the intermission.
50void WI_Ticker (void); 51void WI_Ticker (void);