From d07ecd7d8a20bee3c0c9eccff7a7b216411bc2e7 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 28 Mar 2015 13:27:05 +0100 Subject: [PATCH] Turn enums uppercase --- wl_act2.c | 6 +++--- wl_agent.c | 8 ++++---- wl_debug.c | 4 ++-- wl_def.h | 20 ++++++++++---------- wl_game.c | 14 +++++++------- wl_main.c | 2 +- wl_menu.c | 8 ++++---- wl_play.c | 13 ++++++------- 8 files changed, 37 insertions(+), 38 deletions(-) diff --git a/wl_act2.c b/wl_act2.c index cdc6969..8ef0936 100644 --- a/wl_act2.c +++ b/wl_act2.c @@ -1795,7 +1795,7 @@ void SpawnAngel (int tilex, int tiley) void A_Victory (objtype *) { - playstate = ex_victorious; + playstate = EX_VICTORIOUS; } @@ -3658,7 +3658,7 @@ void T_BJYell (objtype *ob) void T_BJDone (objtype *ob) { - playstate = ex_victorious; // exit castle tile + playstate = EX_VICTORIOUS; // exit castle tile } @@ -3721,7 +3721,7 @@ void A_StartDeathCam (objtype *ob) if (gamestate.victoryflag) { - playstate = ex_victorious; // exit castle tile + playstate = EX_VICTORIOUS; // exit castle tile return; } diff --git a/wl_agent.c b/wl_agent.c index c02c710..f806463 100644 --- a/wl_agent.c +++ b/wl_agent.c @@ -412,7 +412,7 @@ void TakeDamage (int points,objtype *attacker) if (gamestate.health<=0) { gamestate.health = 0; - playstate = ex_died; + playstate = EX_DIED; killerobj = attacker; } @@ -798,7 +798,7 @@ void GetBonus (statobj_t *check) spearx = player->x; speary = player->y; spearangle = player->angle; - playstate = ex_completed; + playstate = EX_COMPLETED; #endif } @@ -1124,9 +1124,9 @@ void Cmd_Use (void) tilemap[checkx][checky]++; /* flip switch */ if (*(mapsegs[0]+(player->tiley<tilex) == ALTELEVATORTILE) - playstate = ex_secretlevel; + playstate = EX_SECRETLEVEL; else - playstate = ex_completed; + playstate = EX_COMPLETED; SD_PlaySound (LEVELDONESND); SD_WaitSoundDone(); } diff --git a/wl_debug.c b/wl_debug.c index 62071fb..297b68a 100644 --- a/wl_debug.c +++ b/wl_debug.c @@ -270,7 +270,7 @@ int DebugKeys (void) return 1; } if (Keyboard[sc_E]) // E = quit level - playstate = ex_completed; + playstate = EX_COMPLETED; if (Keyboard[sc_F]) // F = facing spot { @@ -470,7 +470,7 @@ again: #endif { gamestate.mapon = level-1; - playstate = ex_warped; + playstate = EX_WARPED; } } return 1; diff --git a/wl_def.h b/wl_def.h index c4543f8..daec989 100644 --- a/wl_def.h +++ b/wl_def.h @@ -845,16 +845,16 @@ typedef struct typedef enum { - ex_stillplaying, - ex_completed, - ex_died, - ex_warped, - ex_resetgame, - ex_loadedgame, - ex_victorious, - ex_abort, - ex_demodone, - ex_secretlevel + EX_STILLPLAYING = 0, + EX_COMPLETED, + EX_DIED, + EX_WARPED, + EX_RESETGAME, + EX_LOADEDGAME, + EX_VICTORIOUS, + EX_ABORT, + EX_DEMODONE, + EX_SECRETLEVEL } exit_t; diff --git a/wl_game.c b/wl_game.c index d22a3b1..dd5b588 100644 --- a/wl_game.c +++ b/wl_game.c @@ -1242,7 +1242,7 @@ startplayloop: StopMusic (); ingame = false; - if (demorecord && playstate != ex_warped) + if (demorecord && playstate != EX_WARPED) FinishDemoRecord (); if (startgame || loadedgame) @@ -1250,8 +1250,8 @@ startplayloop: switch (playstate) { - case ex_completed: - case ex_secretlevel: + case EX_COMPLETED: + case EX_SECRETLEVEL: if(viewsize == 21) DrawPlayScreen(); gamestate.keys = 0; DrawKeys (); @@ -1306,7 +1306,7 @@ startplayloop: gamestate.mapon = ElevatorBackTo[gamestate.episode]; /* back from secret */ else /* GOING TO SECRET LEVEL */ - if (playstate == ex_secretlevel) + if (playstate == EX_SECRETLEVEL) gamestate.mapon = 9; #else @@ -1314,7 +1314,7 @@ startplayloop: #define FROMSECRET2 11 /* GOING TO SECRET LEVEL */ - if (playstate == ex_secretlevel) + if (playstate == EX_SECRETLEVEL) switch(gamestate.mapon) { case FROMSECRET1: @@ -1342,7 +1342,7 @@ startplayloop: gamestate.mapon++; break; - case ex_died: + case EX_DIED: Died (); died = true; /* don't "get psyched!" */ @@ -1362,7 +1362,7 @@ startplayloop: MainMenu[viewscores].routine = CP_ViewScores; return; - case ex_victorious: + case EX_VICTORIOUS: if(viewsize == 21) DrawPlayScreen(); #ifndef SPEAR VW_FadeOut (); diff --git a/wl_main.c b/wl_main.c index e636e9c..2c9bc3e 100644 --- a/wl_main.c +++ b/wl_main.c @@ -1428,7 +1428,7 @@ static void DemoLoop(void) PlayDemo (0); #endif - if (playstate == ex_abort) + if (playstate == EX_ABORT) break; VW_FadeOut(); if(screenHeight % 200 != 0) diff --git a/wl_menu.c b/wl_menu.c index c9c8329..c1f44a4 100644 --- a/wl_menu.c +++ b/wl_menu.c @@ -647,7 +647,7 @@ CP_CheckQuick (ScanCode scancode) if (Confirm (ENDGAMESTR)) #endif { - playstate = ex_died; + playstate = EX_DIED; killerobj = NULL; pickquick = gamestate.lives = 0; } @@ -701,7 +701,7 @@ CP_CheckQuick (ScanCode scancode) ContinueMusic (lastgamemusicoffset); if (loadedgame) - playstate = ex_abort; + playstate = EX_ABORT; lasttimecount = GetTimeCount (); if (MousePresent && IN_IsInputGrabbed()) @@ -772,7 +772,7 @@ CP_CheckQuick (ScanCode scancode) ContinueMusic (lastgamemusicoffset); if (loadedgame) - playstate = ex_abort; + playstate = EX_ABORT; lasttimecount = GetTimeCount (); @@ -847,7 +847,7 @@ CP_EndGame (int unused) if(!res) return 0; pickquick = gamestate.lives = 0; - playstate = ex_died; + playstate = EX_DIED; killerobj = NULL; MainMenu[savegame].active = 0; diff --git a/wl_play.c b/wl_play.c index 086d9d4..2615c9b 100644 --- a/wl_play.c +++ b/wl_play.c @@ -421,7 +421,7 @@ void PollControls (void) controly = *demoptr++; if (demoptr == lastdemoptr) - playstate = ex_completed; /* demo is done */ + playstate = EX_COMPLETED; /* demo is done */ controlx *= (int) tics; controly *= (int) tics; @@ -481,7 +481,7 @@ void PollControls (void) *demoptr++ = controly; if (demoptr >= lastdemoptr - 8) - playstate = ex_completed; + playstate = EX_COMPLETED; else { controlx *= (int) tics; @@ -677,7 +677,7 @@ void CheckKeys (void) if (!startgame && !loadedgame) ContinueMusic (lastoffs); if (loadedgame) - playstate = ex_abort; + playstate = EX_ABORT; lasttimecount = GetTimeCount(); if (MousePresent && IN_IsInputGrabbed()) IN_CenterMouse(); /* Clear accumulated mouse movement */ @@ -1198,8 +1198,7 @@ int32_t funnyticount; void PlayLoop (void) { - - playstate = ex_stillplaying; + playstate = EX_STILLPLAYING; lasttimecount = GetTimeCount(); frameon = 0; anglefrac = 0; @@ -1265,12 +1264,12 @@ void PlayLoop (void) if (IN_CheckAck ()) { IN_ClearKeysDown (); - playstate = ex_abort; + playstate = EX_ABORT; } } } while (!playstate && !startgame); - if (playstate != ex_died) + if (playstate != EX_DIED) FinishPaletteShifts (); }