Turn enums uppercase

This commit is contained in:
twinaphex 2015-03-28 13:27:05 +01:00
parent f30ea051d8
commit d07ecd7d8a
8 changed files with 37 additions and 38 deletions

View File

@ -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;
}

View File

@ -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<<mapshift)+player->tilex) == ALTELEVATORTILE)
playstate = ex_secretlevel;
playstate = EX_SECRETLEVEL;
else
playstate = ex_completed;
playstate = EX_COMPLETED;
SD_PlaySound (LEVELDONESND);
SD_WaitSoundDone();
}

View File

@ -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;

View File

@ -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;

View File

@ -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 ();

View File

@ -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)

View File

@ -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;

View File

@ -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 ();
}