mirror of
https://github.com/libretro/libretro-wolfenstein3d.git
synced 2024-11-23 00:19:48 +00:00
Turn enums into upper case
This commit is contained in:
parent
488870e27f
commit
1fd0d20c28
22
wl_agent.c
22
wl_agent.c
@ -406,7 +406,7 @@ void TakeDamage (int points,objtype *attacker)
|
||||
|
||||
if (gamestate.victoryflag)
|
||||
return;
|
||||
if (gamestate.difficulty==gd_baby)
|
||||
if (gamestate.difficulty == GD_BABY)
|
||||
points>>=2;
|
||||
|
||||
if (!godmode)
|
||||
@ -846,19 +846,19 @@ boolean TryMove (objtype *ob)
|
||||
{
|
||||
switch(pwalldir)
|
||||
{
|
||||
case di_north:
|
||||
case DI_NORTH:
|
||||
if(ob->y-PUSHWALLMINDIST<=(pwally<<TILESHIFT)+((63-pwallpos)<<10))
|
||||
return false;
|
||||
break;
|
||||
case di_west:
|
||||
case DI_WEST:
|
||||
if(ob->x-PUSHWALLMINDIST<=(pwallx<<TILESHIFT)+((63-pwallpos)<<10))
|
||||
return false;
|
||||
break;
|
||||
case di_east:
|
||||
case DI_EAST:
|
||||
if(ob->x+PUSHWALLMINDIST>=(pwallx<<TILESHIFT)+(pwallpos<<10))
|
||||
return false;
|
||||
break;
|
||||
case di_south:
|
||||
case DI_SOUTH:
|
||||
if(ob->y+PUSHWALLMINDIST>=(pwally<<TILESHIFT)+(pwallpos<<10))
|
||||
return false;
|
||||
break;
|
||||
@ -1086,30 +1086,30 @@ void Cmd_Use (void)
|
||||
/* find which cardinal direction the player is facing */
|
||||
if (player->angle < ANGLES/8 || player->angle > 7*ANGLES/8)
|
||||
{
|
||||
checkx = player->tilex + 1;
|
||||
checky = player->tiley;
|
||||
dir = di_east;
|
||||
checkx = player->tilex + 1;
|
||||
checky = player->tiley;
|
||||
dir = DI_EAST;
|
||||
elevatorok = true;
|
||||
}
|
||||
else if (player->angle < 3*ANGLES/8)
|
||||
{
|
||||
checkx = player->tilex;
|
||||
checky = player->tiley-1;
|
||||
dir = di_north;
|
||||
dir = DI_NORTH;
|
||||
elevatorok = false;
|
||||
}
|
||||
else if (player->angle < 5*ANGLES/8)
|
||||
{
|
||||
checkx = player->tilex - 1;
|
||||
checky = player->tiley;
|
||||
dir = di_west;
|
||||
dir = DI_WEST;
|
||||
elevatorok = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
checkx = player->tilex;
|
||||
checky = player->tiley + 1;
|
||||
dir = di_south;
|
||||
dir = DI_SOUTH;
|
||||
elevatorok = false;
|
||||
}
|
||||
|
||||
|
16
wl_def.h
16
wl_def.h
@ -565,10 +565,10 @@ enum
|
||||
*/
|
||||
|
||||
typedef enum {
|
||||
di_north,
|
||||
di_east,
|
||||
di_south,
|
||||
di_west
|
||||
DI_NORTH,
|
||||
DI_EAST,
|
||||
DI_SOUTH,
|
||||
DI_WEST
|
||||
} controldir_t;
|
||||
|
||||
typedef enum {
|
||||
@ -803,10 +803,10 @@ typedef enum
|
||||
|
||||
enum
|
||||
{
|
||||
gd_baby,
|
||||
gd_easy,
|
||||
gd_medium,
|
||||
gd_hard
|
||||
GD_BABY,
|
||||
GD_EASY,
|
||||
GD_MEDIUM,
|
||||
GD_HARD
|
||||
};
|
||||
|
||||
//---------------
|
||||
|
65
wl_draw.c
65
wl_draw.c
@ -1101,15 +1101,15 @@ static void AsmRefresh(void)
|
||||
/* Special treatment when player is in back tile of pushwall */
|
||||
if(playerInPushwallBackTile)
|
||||
{
|
||||
if( pwalldir == di_east && xtilestep == 1
|
||||
|| pwalldir == di_west && xtilestep == -1)
|
||||
if( pwalldir == DI_EAST && xtilestep == 1
|
||||
|| pwalldir == DI_WEST && xtilestep == -1)
|
||||
{
|
||||
int32_t yintbuf = yintercept - ((ystep * (64 - pwallpos)) >> 6);
|
||||
|
||||
/* ray hits pushwall back? */
|
||||
if((yintbuf >> 16) == focalty)
|
||||
{
|
||||
if(pwalldir == di_east)
|
||||
if(pwalldir == DI_EAST)
|
||||
xintercept = (focaltx << TILESHIFT) + (pwallpos << 10);
|
||||
else
|
||||
xintercept = (focaltx << TILESHIFT) - TILEGLOBAL + ((64 - pwallpos) << 10);
|
||||
@ -1120,8 +1120,8 @@ static void AsmRefresh(void)
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else if(pwalldir == di_south && ytilestep == 1
|
||||
|| pwalldir == di_north && ytilestep == -1)
|
||||
else if(pwalldir == DI_SOUTH && ytilestep == 1
|
||||
|| pwalldir == DI_NORTH && ytilestep == -1)
|
||||
{
|
||||
int32_t xintbuf = xintercept - ((xstep * (64 - pwallpos)) >> 6);
|
||||
|
||||
@ -1129,7 +1129,7 @@ static void AsmRefresh(void)
|
||||
if((xintbuf >> 16) == focaltx)
|
||||
{
|
||||
xintercept = xintbuf;
|
||||
if(pwalldir == di_south)
|
||||
if(pwalldir == DI_SOUTH)
|
||||
yintercept = (focalty << TILESHIFT) + (pwallpos << 10);
|
||||
else
|
||||
yintercept = (focalty << TILESHIFT) - TILEGLOBAL + ((64 - pwallpos) << 10);
|
||||
@ -1191,20 +1191,20 @@ vertentry:
|
||||
{
|
||||
if(tilehit == 64)
|
||||
{
|
||||
if(pwalldir==di_west || pwalldir==di_east)
|
||||
if(pwalldir == DI_WEST || pwalldir == DI_EAST)
|
||||
{
|
||||
int32_t yintbuf;
|
||||
int pwallposnorm = pwallpos;
|
||||
int pwallposinv = 64 - pwallpos;
|
||||
|
||||
if(pwalldir == di_west)
|
||||
if(pwalldir == DI_WEST)
|
||||
{
|
||||
pwallposnorm = 64 - pwallpos;
|
||||
pwallposinv = pwallpos;
|
||||
}
|
||||
|
||||
if(pwalldir == di_east && xtile==pwallx && ((uint32_t)yintercept>>16)==pwally
|
||||
|| pwalldir == di_west && !(xtile==pwallx && ((uint32_t)yintercept>>16)==pwally))
|
||||
if(pwalldir == DI_EAST && xtile==pwallx && ((uint32_t)yintercept>>16)==pwally
|
||||
|| pwalldir == DI_WEST && !(xtile==pwallx && ((uint32_t)yintercept>>16)==pwally))
|
||||
{
|
||||
yintbuf=yintercept+((ystep*pwallposnorm)>>6);
|
||||
if((yintbuf>>16) != (yintercept>>16))
|
||||
@ -1230,19 +1230,19 @@ vertentry:
|
||||
{
|
||||
int pwallposi = pwallpos;
|
||||
|
||||
if(pwalldir == di_north)
|
||||
if(pwalldir == DI_NORTH)
|
||||
pwallposi = 64-pwallpos;
|
||||
|
||||
if(pwalldir==di_south && (word)yintercept<(pwallposi<<10)
|
||||
|| pwalldir==di_north && (word)yintercept>(pwallposi<<10))
|
||||
if(pwalldir == DI_SOUTH && (word)yintercept<(pwallposi<<10)
|
||||
|| pwalldir == DI_NORTH && (word)yintercept>(pwallposi<<10))
|
||||
{
|
||||
if(((uint32_t)yintercept>>16)==pwally && xtile==pwallx)
|
||||
{
|
||||
if(pwalldir==di_south && (int32_t)((word)yintercept)+ystep<(pwallposi<<10)
|
||||
|| pwalldir==di_north && (int32_t)((word)yintercept)+ystep>(pwallposi<<10))
|
||||
if(pwalldir == DI_SOUTH && (int32_t)((word)yintercept)+ystep<(pwallposi<<10)
|
||||
|| pwalldir == DI_NORTH && (int32_t)((word)yintercept)+ystep>(pwallposi<<10))
|
||||
goto passvert;
|
||||
|
||||
if(pwalldir==di_south)
|
||||
if(pwalldir == DI_SOUTH)
|
||||
yintercept=(yintercept&0xffff0000)+(pwallposi<<10);
|
||||
else
|
||||
yintercept=(yintercept&0xffff0000)-TILEGLOBAL+(pwallposi<<10);
|
||||
@ -1272,11 +1272,11 @@ vertentry:
|
||||
}
|
||||
else
|
||||
{
|
||||
if(pwalldir==di_south && (int32_t)((word)yintercept)+ystep>(pwallposi<<10)
|
||||
|| pwalldir==di_north && (int32_t)((word)yintercept)+ystep<(pwallposi<<10))
|
||||
if(pwalldir==DI_SOUTH && (int32_t)((word)yintercept)+ystep>(pwallposi<<10)
|
||||
|| pwalldir==DI_NORTH && (int32_t)((word)yintercept)+ystep<(pwallposi<<10))
|
||||
goto passvert;
|
||||
|
||||
if(pwalldir==di_south)
|
||||
if(pwalldir==DI_SOUTH)
|
||||
yintercept = (yintercept&0xffff0000)-((64-pwallpos)<<10);
|
||||
else
|
||||
yintercept = (yintercept&0xffff0000)+((64-pwallpos)<<10);
|
||||
@ -1353,20 +1353,20 @@ horizentry:
|
||||
{
|
||||
if(tilehit==64)
|
||||
{
|
||||
if(pwalldir==di_north || pwalldir==di_south)
|
||||
if(pwalldir==DI_NORTH || pwalldir==DI_SOUTH)
|
||||
{
|
||||
int32_t xintbuf;
|
||||
int pwallposnorm = pwallpos;
|
||||
int pwallposinv = 64 - pwallpos;
|
||||
|
||||
if(pwalldir==di_north)
|
||||
if(pwalldir==DI_NORTH)
|
||||
{
|
||||
pwallposnorm = 64-pwallpos;
|
||||
pwallposinv = pwallpos;
|
||||
}
|
||||
|
||||
if(pwalldir == di_south && ytile==pwally && ((uint32_t)xintercept>>16)==pwallx
|
||||
|| pwalldir == di_north && !(ytile==pwally && ((uint32_t)xintercept>>16)==pwallx))
|
||||
if(pwalldir == DI_SOUTH && ytile==pwally && ((uint32_t)xintercept>>16)==pwallx
|
||||
|| pwalldir == DI_NORTH && !(ytile==pwally && ((uint32_t)xintercept>>16)==pwallx))
|
||||
{
|
||||
xintbuf=xintercept+((xstep*pwallposnorm)>>6);
|
||||
if((xintbuf>>16)!=(xintercept>>16))
|
||||
@ -1391,17 +1391,18 @@ horizentry:
|
||||
else
|
||||
{
|
||||
int pwallposi = pwallpos;
|
||||
if(pwalldir==di_west) pwallposi = 64-pwallpos;
|
||||
if(pwalldir==di_east && (word)xintercept<(pwallposi<<10)
|
||||
|| pwalldir==di_west && (word)xintercept>(pwallposi<<10))
|
||||
if(pwalldir == DI_WEST)
|
||||
pwallposi = 64-pwallpos;
|
||||
if(pwalldir == DI_EAST && (word)xintercept<(pwallposi<<10)
|
||||
|| pwalldir == DI_WEST && (word)xintercept>(pwallposi<<10))
|
||||
{
|
||||
if(((uint32_t)xintercept>>16)==pwallx && ytile==pwally)
|
||||
{
|
||||
if(pwalldir==di_east && (int32_t)((word)xintercept)+xstep<(pwallposi<<10)
|
||||
|| pwalldir==di_west && (int32_t)((word)xintercept)+xstep>(pwallposi<<10))
|
||||
if(pwalldir==DI_EAST && (int32_t)((word)xintercept)+xstep<(pwallposi<<10)
|
||||
|| pwalldir==DI_WEST && (int32_t)((word)xintercept)+xstep>(pwallposi<<10))
|
||||
goto passhoriz;
|
||||
|
||||
if(pwalldir==di_east)
|
||||
if(pwalldir==DI_EAST)
|
||||
xintercept=(xintercept&0xffff0000)+(pwallposi<<10);
|
||||
else
|
||||
xintercept=(xintercept&0xffff0000)-TILEGLOBAL+(pwallposi<<10);
|
||||
@ -1431,11 +1432,11 @@ horizentry:
|
||||
}
|
||||
else
|
||||
{
|
||||
if(pwalldir==di_east && (int32_t)((word)xintercept)+xstep>(pwallposi<<10)
|
||||
|| pwalldir==di_west && (int32_t)((word)xintercept)+xstep<(pwallposi<<10))
|
||||
if(pwalldir==DI_EAST && (int32_t)((word)xintercept)+xstep>(pwallposi<<10)
|
||||
|| pwalldir==DI_WEST && (int32_t)((word)xintercept)+xstep<(pwallposi<<10))
|
||||
goto passhoriz;
|
||||
|
||||
if(pwalldir==di_east)
|
||||
if(pwalldir==DI_EAST)
|
||||
xintercept=(xintercept&0xffff0000)-((64-pwallpos)<<10);
|
||||
else
|
||||
xintercept=(xintercept&0xffff0000)+((64-pwallpos)<<10);
|
||||
|
42
wl_game.c
42
wl_game.c
@ -283,14 +283,14 @@ static void ScanInfoPlane(void)
|
||||
case 181:
|
||||
case 182:
|
||||
case 183:
|
||||
if (gamestate.difficulty<gd_hard)
|
||||
if (gamestate.difficulty<GD_HARD)
|
||||
break;
|
||||
tile -= 36;
|
||||
case 144:
|
||||
case 145:
|
||||
case 146:
|
||||
case 147:
|
||||
if (gamestate.difficulty<gd_medium)
|
||||
if (gamestate.difficulty<GD_MEDIUM)
|
||||
break;
|
||||
tile -= 36;
|
||||
case 108:
|
||||
@ -305,14 +305,14 @@ static void ScanInfoPlane(void)
|
||||
case 185:
|
||||
case 186:
|
||||
case 187:
|
||||
if (gamestate.difficulty<gd_hard)
|
||||
if (gamestate.difficulty < GD_HARD)
|
||||
break;
|
||||
tile -= 36;
|
||||
case 148:
|
||||
case 149:
|
||||
case 150:
|
||||
case 151:
|
||||
if (gamestate.difficulty<gd_medium)
|
||||
if (gamestate.difficulty<GD_MEDIUM)
|
||||
break;
|
||||
tile -= 36;
|
||||
case 112:
|
||||
@ -330,14 +330,14 @@ static void ScanInfoPlane(void)
|
||||
case 189:
|
||||
case 190:
|
||||
case 191:
|
||||
if (gamestate.difficulty<gd_hard)
|
||||
if (gamestate.difficulty<GD_HARD)
|
||||
break;
|
||||
tile -= 36;
|
||||
case 152:
|
||||
case 153:
|
||||
case 154:
|
||||
case 155:
|
||||
if (gamestate.difficulty<gd_medium)
|
||||
if (gamestate.difficulty<GD_MEDIUM)
|
||||
break;
|
||||
tile -= 36;
|
||||
case 116:
|
||||
@ -352,14 +352,14 @@ static void ScanInfoPlane(void)
|
||||
case 193:
|
||||
case 194:
|
||||
case 195:
|
||||
if (gamestate.difficulty<gd_hard)
|
||||
if (gamestate.difficulty<GD_HARD)
|
||||
break;
|
||||
tile -= 36;
|
||||
case 156:
|
||||
case 157:
|
||||
case 158:
|
||||
case 159:
|
||||
if (gamestate.difficulty<gd_medium)
|
||||
if (gamestate.difficulty<GD_MEDIUM)
|
||||
break;
|
||||
tile -= 36;
|
||||
case 120:
|
||||
@ -377,14 +377,14 @@ static void ScanInfoPlane(void)
|
||||
case 199:
|
||||
case 200:
|
||||
case 201:
|
||||
if (gamestate.difficulty<gd_hard)
|
||||
if (gamestate.difficulty<GD_HARD)
|
||||
break;
|
||||
tile -= 36;
|
||||
case 162:
|
||||
case 163:
|
||||
case 164:
|
||||
case 165:
|
||||
if (gamestate.difficulty<gd_medium)
|
||||
if (gamestate.difficulty<GD_MEDIUM)
|
||||
break;
|
||||
tile -= 36;
|
||||
case 126:
|
||||
@ -399,14 +399,14 @@ static void ScanInfoPlane(void)
|
||||
case 203:
|
||||
case 204:
|
||||
case 205:
|
||||
if (gamestate.difficulty<gd_hard)
|
||||
if (gamestate.difficulty<GD_HARD)
|
||||
break;
|
||||
tile -= 36;
|
||||
case 166:
|
||||
case 167:
|
||||
case 168:
|
||||
case 169:
|
||||
if (gamestate.difficulty<gd_medium)
|
||||
if (gamestate.difficulty<GD_MEDIUM)
|
||||
break;
|
||||
tile -= 36;
|
||||
case 130:
|
||||
@ -423,14 +423,14 @@ static void ScanInfoPlane(void)
|
||||
case 207:
|
||||
case 208:
|
||||
case 209:
|
||||
if (gamestate.difficulty<gd_hard)
|
||||
if (gamestate.difficulty<GD_HARD)
|
||||
break;
|
||||
tile -= 36;
|
||||
case 170:
|
||||
case 171:
|
||||
case 172:
|
||||
case 173:
|
||||
if (gamestate.difficulty<gd_medium)
|
||||
if (gamestate.difficulty<GD_MEDIUM)
|
||||
break;
|
||||
tile -= 36;
|
||||
case 134:
|
||||
@ -445,14 +445,14 @@ static void ScanInfoPlane(void)
|
||||
case 211:
|
||||
case 212:
|
||||
case 213:
|
||||
if (gamestate.difficulty<gd_hard)
|
||||
if (gamestate.difficulty<GD_HARD)
|
||||
break;
|
||||
tile -= 36;
|
||||
case 174:
|
||||
case 175:
|
||||
case 176:
|
||||
case 177:
|
||||
if (gamestate.difficulty<gd_medium)
|
||||
if (gamestate.difficulty<GD_MEDIUM)
|
||||
break;
|
||||
tile -= 36;
|
||||
case 138:
|
||||
@ -513,14 +513,14 @@ static void ScanInfoPlane(void)
|
||||
case 253:
|
||||
case 254:
|
||||
case 255:
|
||||
if (gamestate.difficulty<gd_hard)
|
||||
if (gamestate.difficulty<GD_HARD)
|
||||
break;
|
||||
tile -= 18;
|
||||
case 234:
|
||||
case 235:
|
||||
case 236:
|
||||
case 237:
|
||||
if (gamestate.difficulty<gd_medium)
|
||||
if (gamestate.difficulty<GD_MEDIUM)
|
||||
break;
|
||||
tile -= 18;
|
||||
case 216:
|
||||
@ -534,14 +534,14 @@ static void ScanInfoPlane(void)
|
||||
case 257:
|
||||
case 258:
|
||||
case 259:
|
||||
if (gamestate.difficulty<gd_hard)
|
||||
if (gamestate.difficulty<GD_HARD)
|
||||
break;
|
||||
tile -= 18;
|
||||
case 238:
|
||||
case 239:
|
||||
case 240:
|
||||
case 241:
|
||||
if (gamestate.difficulty<gd_medium)
|
||||
if (gamestate.difficulty<GD_MEDIUM)
|
||||
break;
|
||||
tile -= 18;
|
||||
case 220:
|
||||
@ -965,7 +965,7 @@ void PlayDemo (int demonumber)
|
||||
|
||||
NewGame (1,0);
|
||||
gamestate.mapon = *demoptr++;
|
||||
gamestate.difficulty = gd_hard;
|
||||
gamestate.difficulty = GD_HARD;
|
||||
length = READWORD((uint8_t **)&demoptr);
|
||||
|
||||
/* TODO: Seems like the original demo format supports 16 MB demos
|
||||
|
@ -247,7 +247,7 @@ void Victory (void)
|
||||
//
|
||||
// TOTAL TIME VERIFICATION CODE
|
||||
//
|
||||
if (gamestate.difficulty >= gd_medium)
|
||||
if (gamestate.difficulty >= GD_MEDIUM)
|
||||
{
|
||||
VWB_DrawPic (30 * 8, TIMEY * 8, C_TIMECODEPIC);
|
||||
fontnumber = 0;
|
||||
|
@ -299,13 +299,13 @@ void PollKeyboardMove (void)
|
||||
{
|
||||
int delta = buttonstate[bt_run] ? RUNMOVE * tics : BASEMOVE * tics;
|
||||
|
||||
if (Keyboard[dirscan[di_north]])
|
||||
if (Keyboard[dirscan[DI_NORTH]])
|
||||
controly -= delta;
|
||||
if (Keyboard[dirscan[di_south]])
|
||||
if (Keyboard[dirscan[DI_SOUTH]])
|
||||
controly += delta;
|
||||
if (Keyboard[dirscan[di_west]])
|
||||
if (Keyboard[dirscan[DI_WEST]])
|
||||
controlx -= delta;
|
||||
if (Keyboard[dirscan[di_east]])
|
||||
if (Keyboard[dirscan[DI_EAST]])
|
||||
controlx += delta;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user