- changespritestat literal number replacement

This commit is contained in:
Christoph Oelckers 2020-09-23 18:51:43 +02:00
parent 71213bf8bd
commit 67985b7819
2 changed files with 39 additions and 39 deletions

View file

@ -148,7 +148,7 @@ int spawn_d(int j, int pn)
break; break;
case FOF: case FOF:
sp->xrepeat = sp->yrepeat = 0; sp->xrepeat = sp->yrepeat = 0;
changespritestat(i,5); changespritestat(i, STAT_MISC);
break; break;
case WATERSPLASH2: case WATERSPLASH2:
if(j >= 0) if(j >= 0)
@ -201,7 +201,7 @@ int spawn_d(int j, int pn)
case DUKETORSO: case DUKETORSO:
case DUKEGUN: case DUKEGUN:
case DUKELEG: case DUKELEG:
changespritestat(i,5); changespritestat(i, STAT_MISC);
break; break;
case TONGUE: case TONGUE:
if(j >= 0) if(j >= 0)
@ -229,7 +229,7 @@ int spawn_d(int j, int pn)
} }
else sp->xrepeat = sp->yrepeat = 0; else sp->xrepeat = sp->yrepeat = 0;
changespritestat(i,5); changespritestat(i, STAT_MISC);
break; break;
@ -248,7 +248,7 @@ int spawn_d(int j, int pn)
} }
if(j >= 0) sp->ang = hittype[j].temp_data[5]+512; if(j >= 0) sp->ang = hittype[j].temp_data[5]+512;
changespritestat(i,5); changespritestat(i, STAT_MISC);
break; break;
case FORCESPHERE: case FORCESPHERE:
@ -260,7 +260,7 @@ int spawn_d(int j, int pn)
else else
{ {
sp->xrepeat = sp->yrepeat = 1; sp->xrepeat = sp->yrepeat = 1;
changespritestat(i,5); changespritestat(i, STAT_MISC);
} }
break; break;
@ -269,7 +269,7 @@ int spawn_d(int j, int pn)
sp->z -= (26<<8); sp->z -= (26<<8);
if( j >= 0 && sprite[j].pal == 6 ) if( j >= 0 && sprite[j].pal == 6 )
sp->pal = 6; sp->pal = 6;
changespritestat(i,5); changespritestat(i, STAT_MISC);
break; break;
case LAVAPOOL: case LAVAPOOL:
if (!isWorldTour()) // Twentieth Anniversary World Tour if (!isWorldTour()) // Twentieth Anniversary World Tour
@ -327,7 +327,7 @@ int spawn_d(int j, int pn)
if( sp->lotag > ud.player_skill ) if( sp->lotag > ud.player_skill )
{ {
sp->xrepeat=sp->yrepeat=0; sp->xrepeat=sp->yrepeat=0;
changespritestat(i,5); changespritestat(i, STAT_MISC);
break; break;
} }
@ -433,7 +433,7 @@ int spawn_d(int j, int pn)
if(ud.multimode < 2 && sp->pal) if(ud.multimode < 2 && sp->pal)
{ {
sp->xrepeat = sp->yrepeat = 0; sp->xrepeat = sp->yrepeat = 0;
changespritestat(i,5); changespritestat(i, STAT_MISC);
} }
else sp->pal = 0; else sp->pal = 0;
break; break;
@ -552,7 +552,7 @@ int spawn_d(int j, int pn)
sp->xrepeat = sp->yrepeat = 8; sp->xrepeat = sp->yrepeat = 8;
sp->ang = krand()&2047; sp->ang = krand()&2047;
} }
changespritestat(i,5); changespritestat(i, STAT_MISC);
break; break;
case VIEWSCREEN: case VIEWSCREEN:
@ -574,7 +574,7 @@ int spawn_d(int j, int pn)
if( ud.multimode < 2 && sp->pal == 1) if( ud.multimode < 2 && sp->pal == 1)
{ {
sp->xrepeat = sp->yrepeat = 0; sp->xrepeat = sp->yrepeat = 0;
changespritestat(i,5); changespritestat(i, STAT_MISC);
break; break;
} }
sp->cstat = (short)32768; sp->cstat = (short)32768;
@ -640,7 +640,7 @@ int spawn_d(int j, int pn)
sp->cstat |= 0x80; sp->cstat |= 0x80;
} }
changespritestat(i,5); changespritestat(i, STAT_MISC);
break; break;
@ -653,7 +653,7 @@ int spawn_d(int j, int pn)
if(sector[sp->sectnum].lotag != 2) if(sector[sp->sectnum].lotag != 2)
sp->cstat |= 32768; sp->cstat |= 32768;
} }
changespritestat(i,13); changespritestat(i, STAT_DUMMYPLAYER);
break; break;
case APLAYER: case APLAYER:
@ -661,10 +661,10 @@ int spawn_d(int j, int pn)
j = ud.coop; j = ud.coop;
if(j == 2) j = 0; if(j == 2) j = 0;
if( ud.multimode < 2 || (ud.multimode > 1 && j != sp->lotag) ) if (ud.multimode < 2 || (ud.multimode > 1 && j != sp->lotag))
changespritestat(i,5); changespritestat(i, STAT_MISC);
else else
changespritestat(i,10); changespritestat(i, STAT_PLAYER);
break; break;
case WATERBUBBLE: case WATERBUBBLE:
if(j >= 0 && sprite[j].picnum == APLAYER) if(j >= 0 && sprite[j].picnum == APLAYER)
@ -677,7 +677,7 @@ int spawn_d(int j, int pn)
} }
else sp->xrepeat = sp->yrepeat = 32; else sp->xrepeat = sp->yrepeat = 32;
changespritestat(i,5); changespritestat(i, STAT_MISC);
break; break;
case CRANE: case CRANE:
@ -851,7 +851,7 @@ int spawn_d(int j, int pn)
if( ( sp->lotag > ud.player_skill ) || ud.monsters_off == 1 ) if( ( sp->lotag > ud.player_skill ) || ud.monsters_off == 1 )
{ {
sp->xrepeat=sp->yrepeat=0; sp->xrepeat=sp->yrepeat=0;
changespritestat(i,5); changespritestat(i, STAT_MISC);
break; break;
} }
else else
@ -995,7 +995,7 @@ int spawn_d(int j, int pn)
if( ( ud.multimode < 2 && sp->pal != 0) || (sp->lotag > ud.player_skill) ) if( ( ud.multimode < 2 && sp->pal != 0) || (sp->lotag > ud.player_skill) )
{ {
sp->xrepeat = sp->yrepeat = 0; sp->xrepeat = sp->yrepeat = 0;
changespritestat(i,5); changespritestat(i, STAT_MISC);
break; break;
} }
@ -1009,7 +1009,7 @@ int spawn_d(int j, int pn)
if(ud.multimode > 1 && ud.coop != 1 && sp->picnum == ACCESSCARD) if(ud.multimode > 1 && ud.coop != 1 && sp->picnum == ACCESSCARD)
{ {
sp->xrepeat = sp->yrepeat = 0; sp->xrepeat = sp->yrepeat = 0;
changespritestat(i,5); changespritestat(i, STAT_MISC);
break; break;
} }
else else
@ -1072,7 +1072,7 @@ int spawn_d(int j, int pn)
if( ud.multimode < 2 && sp->pal != 0 ) if( ud.multimode < 2 && sp->pal != 0 )
{ {
sp->xrepeat = sp->yrepeat = 0; sp->xrepeat = sp->yrepeat = 0;
changespritestat(i,5); changespritestat(i, STAT_MISC);
break; break;
} }
else sp->pal = 0; else sp->pal = 0;
@ -1134,7 +1134,7 @@ int spawn_d(int j, int pn)
if( ud.multimode < 2 && sp->pal != 0) if( ud.multimode < 2 && sp->pal != 0)
{ {
sp->xrepeat = sp->yrepeat = 0; sp->xrepeat = sp->yrepeat = 0;
changespritestat(i,5); changespritestat(i, STAT_MISC);
break; break;
} }
@ -1178,7 +1178,7 @@ int spawn_d(int j, int pn)
if( ud.monsters_off == 1 && sp->picnum == EGG ) if( ud.monsters_off == 1 && sp->picnum == EGG )
{ {
sp->xrepeat = sp->yrepeat = 0; sp->xrepeat = sp->yrepeat = 0;
changespritestat(i,5); changespritestat(i, STAT_MISC);
} }
else else
{ {

View file

@ -284,7 +284,7 @@ int spawn_r(int j, int pn)
sp->yrepeat = 54; sp->yrepeat = 54;
} }
} }
changespritestat(i,5); changespritestat(i, STAT_MISC);
break; break;
case TONGUE: case TONGUE:
if(j >= 0) if(j >= 0)
@ -311,7 +311,7 @@ int spawn_r(int j, int pn)
} }
else sp->xrepeat = sp->yrepeat = 0; else sp->xrepeat = sp->yrepeat = 0;
changespritestat(i,5); changespritestat(i, STAT_MISC);
break; break;
case FORCESPHERE: case FORCESPHERE:
@ -323,14 +323,14 @@ int spawn_r(int j, int pn)
else else
{ {
sp->xrepeat = sp->yrepeat = 1; sp->xrepeat = sp->yrepeat = 1;
changespritestat(i,5); changespritestat(i, STAT_MISC);
} }
break; break;
case BLOOD: case BLOOD:
sp->xrepeat = sp->yrepeat = 4; sp->xrepeat = sp->yrepeat = 4;
sp->z -= (26<<8); sp->z -= (26<<8);
changespritestat(i,5); changespritestat(i, STAT_MISC);
break; break;
case BLOODPOOL: case BLOODPOOL:
if (spawnbloodpoolpart1(j, i)) break; if (spawnbloodpoolpart1(j, i)) break;
@ -361,7 +361,7 @@ int spawn_r(int j, int pn)
if(j >= 0 && sprite[j].pal == 6) if(j >= 0 && sprite[j].pal == 6)
sp->pal = 6; sp->pal = 6;
insertspriteq(i); insertspriteq(i);
changespritestat(i,5); changespritestat(i, STAT_MISC);
break; break;
case HYDRENT: case HYDRENT:
@ -583,7 +583,7 @@ int spawn_r(int j, int pn)
sp->xrepeat = sp->yrepeat = 8; sp->xrepeat = sp->yrepeat = 8;
sp->ang = krand()&2047; sp->ang = krand()&2047;
} }
changespritestat(i,5); changespritestat(i, STAT_MISC);
break; break;
case SHELL: //From the player case SHELL: //From the player
@ -596,7 +596,7 @@ int spawn_r(int j, int pn)
if (ud.multimode < 2 && sp->pal == 1) if (ud.multimode < 2 && sp->pal == 1)
{ {
sp->xrepeat = sp->yrepeat = 0; sp->xrepeat = sp->yrepeat = 0;
changespritestat(i,5); changespritestat(i, STAT_MISC);
break; break;
} }
sp->cstat = (short)32768; sp->cstat = (short)32768;
@ -654,7 +654,7 @@ int spawn_r(int j, int pn)
sp->z = x-(12<<8); sp->z = x-(12<<8);
} }
changespritestat(i,5); changespritestat(i, STAT_MISC);
break; break;
@ -676,7 +676,7 @@ int spawn_r(int j, int pn)
if(j == 2) j = 0; if(j == 2) j = 0;
if( ud.multimode < 2 || (ud.multimode > 1 && j != sp->lotag) ) if( ud.multimode < 2 || (ud.multimode > 1 && j != sp->lotag) )
changespritestat(i,5); changespritestat(i, STAT_MISC);
else else
changespritestat(i,10); changespritestat(i,10);
break; break;
@ -692,7 +692,7 @@ int spawn_r(int j, int pn)
} }
else else
sp->xrepeat = sp->yrepeat = 32; sp->xrepeat = sp->yrepeat = 32;
changespritestat(i,5); changespritestat(i, STAT_MISC);
break; break;
case CRANE: case CRANE:
initcrane(j, i, CRANEPOLE); initcrane(j, i, CRANEPOLE);
@ -720,7 +720,7 @@ int spawn_r(int j, int pn)
if(sp->pal && ud.multimode > 1) if(sp->pal && ud.multimode > 1)
{ {
sp->xrepeat=sp->yrepeat=0; sp->xrepeat=sp->yrepeat=0;
changespritestat(i,5); changespritestat(i, STAT_MISC);
break; break;
} }
case WATERBUBBLEMAKER: case WATERBUBBLEMAKER:
@ -1022,7 +1022,7 @@ int spawn_r(int j, int pn)
if( ( sp->lotag > ud.player_skill ) || ud.monsters_off == 1 ) if( ( sp->lotag > ud.player_skill ) || ud.monsters_off == 1 )
{ {
sp->xrepeat=sp->yrepeat=0; sp->xrepeat=sp->yrepeat=0;
changespritestat(i,5); changespritestat(i, STAT_MISC);
break; break;
} }
else else
@ -1168,7 +1168,7 @@ int spawn_r(int j, int pn)
if( ( ud.multimode < 2 && sp->pal != 0) || (sp->lotag > ud.player_skill) ) if( ( ud.multimode < 2 && sp->pal != 0) || (sp->lotag > ud.player_skill) )
{ {
sp->xrepeat = sp->yrepeat = 0; sp->xrepeat = sp->yrepeat = 0;
changespritestat(i,5); changespritestat(i, STAT_MISC);
break; break;
} }
@ -1182,7 +1182,7 @@ int spawn_r(int j, int pn)
if(ud.multimode > 1 && ud.coop != 1 && sp->picnum == ACCESSCARD) if(ud.multimode > 1 && ud.coop != 1 && sp->picnum == ACCESSCARD)
{ {
sp->xrepeat = sp->yrepeat = 0; sp->xrepeat = sp->yrepeat = 0;
changespritestat(i,5); changespritestat(i, STAT_MISC);
break; break;
} }
else else
@ -1336,7 +1336,7 @@ int spawn_r(int j, int pn)
if( ud.multimode < 2 && sp->pal != 0 ) if( ud.multimode < 2 && sp->pal != 0 )
{ {
sp->xrepeat = sp->yrepeat = 0; sp->xrepeat = sp->yrepeat = 0;
changespritestat(i,5); changespritestat(i, STAT_MISC);
break; break;
} }
else sp->pal = 0; else sp->pal = 0;
@ -1386,7 +1386,7 @@ int spawn_r(int j, int pn)
if( ud.multimode < 2 && sp->pal != 0) if( ud.multimode < 2 && sp->pal != 0)
{ {
sp->xrepeat = sp->yrepeat = 0; sp->xrepeat = sp->yrepeat = 0;
changespritestat(i,5); changespritestat(i, STAT_MISC);
break; break;
} }
@ -1462,7 +1462,7 @@ int spawn_r(int j, int pn)
if( ud.monsters_off == 1 && sp->picnum == EGG ) if( ud.monsters_off == 1 && sp->picnum == EGG )
{ {
sp->xrepeat = sp->yrepeat = 0; sp->xrepeat = sp->yrepeat = 0;
changespritestat(i,5); changespritestat(i, STAT_MISC);
} }
else else
{ {