- removed inline wrappers that are not needed anymore.

# Conflicts:
#	source/games/duke/src/spawn_r.cpp
This commit is contained in:
Christoph Oelckers 2020-11-02 23:06:20 +01:00
parent f3f0fd0a3a
commit 8f754d163d
4 changed files with 27 additions and 52 deletions

View file

@ -233,36 +233,11 @@ inline void getzrange_ex(int x, int y, int z, int16_t sectnum, int32_t* ceilz, C
florhit.setFromEngine(fh); florhit.setFromEngine(fh);
} }
inline void ms(short i)
{
ms(&hittype[i]);
}
inline void makeitfall(int act)
{
makeitfall(&hittype[act]);
}
inline void getglobalz(int act)
{
getglobalz(&hittype[act]);
}
inline int findplayer(spritetype* act, int* x) inline int findplayer(spritetype* act, int* x)
{ {
return findplayer(&hittype[act - sprite], x); return findplayer(&hittype[act - sprite], x);
} }
inline void detonate(int i, int explosion)
{
detonate(&hittype[i], explosion);
}
inline int callsound(int sect, int a)
{
return callsound(sect, a == -1? nullptr : &hittype[a]);
}
inline int hitscan(int x, int y, int z, int16_t sectnum, int32_t vx, int32_t vy, int32_t vz, inline int hitscan(int x, int y, int z, int16_t sectnum, int32_t vx, int32_t vy, int32_t vz,
short* hitsect, short* hitwall, DDukeActor** hitspr, int* hitx, int* hity, int* hitz, uint32_t cliptype) short* hitsect, short* hitwall, DDukeActor** hitspr, int* hitx, int* hity, int* hitz, uint32_t cliptype)
{ {

View file

@ -331,7 +331,7 @@ void doanimations(void)
continue; continue;
if ((sector[dasect].lotag & 0xff) != ST_22_SPLITTING_DOOR) if ((sector[dasect].lotag & 0xff) != ST_22_SPLITTING_DOOR)
callsound(dasect, -1); callsound(dasect, nullptr);
continue; continue;
} }

View file

@ -96,12 +96,12 @@ int spawn_d(int j, int pn)
if ((sp->lotag > ud.player_skill) || ud.monsters_off) if ((sp->lotag > ud.player_skill) || ud.monsters_off)
{ {
sp->xrepeat = sp->yrepeat = 0; sp->xrepeat = sp->yrepeat = 0;
changespritestat(i, STAT_MISC); changespritestat(act, STAT_MISC);
break; break;
} }
else else
{ {
makeitfall(i); makeitfall(act);
sp->cstat |= 257; sp->cstat |= 257;
ps[connecthead].max_actors_killed++; ps[connecthead].max_actors_killed++;
@ -860,7 +860,7 @@ int spawn_d(int j, int pn)
} }
else else
{ {
makeitfall(i); makeitfall(act);
if(sp->picnum == RAT) if(sp->picnum == RAT)
{ {
@ -924,7 +924,7 @@ int spawn_d(int j, int pn)
changespritestat(i,1); changespritestat(i,1);
getglobalz(i); getglobalz(act);
j = (act->floorz-act->ceilingz)>>9; j = (act->floorz-act->ceilingz)>>9;
@ -1025,11 +1025,11 @@ int spawn_d(int j, int pn)
sp->shade = -17; sp->shade = -17;
if(j >= 0) changespritestat(i,1); if(j >= 0) changespritestat(act, STAT_ACTOR);
else else
{ {
changespritestat(i,2); changespritestat(act, STAT_ZOMBIEACTOR);
makeitfall(i); makeitfall(act);
} }
break; break;
@ -1174,7 +1174,7 @@ int spawn_d(int j, int pn)
if(j >= 0) if(j >= 0)
sp->xrepeat = sp->yrepeat = 32; sp->xrepeat = sp->yrepeat = 32;
sp->clipdist = 72; sp->clipdist = 72;
makeitfall(i); makeitfall(act);
if(j >= 0) if(j >= 0)
sp->owner = j; sp->owner = j;
else sp->owner = i; else sp->owner = i;
@ -1182,7 +1182,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, STAT_MISC); changespritestat(act, STAT_MISC);
} }
else else
{ {
@ -1192,12 +1192,12 @@ int spawn_d(int j, int pn)
ps[connecthead].max_actors_killed++; ps[connecthead].max_actors_killed++;
} }
sp->cstat = 257|(krand()&4); sp->cstat = 257|(krand()&4);
changespritestat(i,2); changespritestat(act, STAT_ZOMBIEACTOR);
} }
break; break;
case TOILETWATER: case TOILETWATER:
sp->shade = -16; sp->shade = -16;
changespritestat(i,6); changespritestat(act, STAT_STANDABLE);
break; break;
} }
return i; return i;

View file

@ -1031,7 +1031,7 @@ int spawn_r(int j, int pn)
} }
else else
{ {
makeitfall(i); makeitfall(act);
if(sp->picnum == RAT) if(sp->picnum == RAT)
{ {
@ -1052,10 +1052,10 @@ int spawn_r(int j, int pn)
{ {
act->timetosleep = 0; act->timetosleep = 0;
check_fta_sounds_r(act); check_fta_sounds_r(act);
changespritestat(i,1); changespritestat(act, STAT_ACTOR);
sp->shade = spj->shade; sp->shade = spj->shade;
} }
else changespritestat(i,2); else changespritestat(act, STAT_ZOMBIEACTOR);
} }
@ -1063,7 +1063,7 @@ int spawn_r(int j, int pn)
case LOCATORS: case LOCATORS:
// sp->xrepeat=sp->yrepeat=0; // sp->xrepeat=sp->yrepeat=0;
sp->cstat |= 32768; sp->cstat |= 32768;
changespritestat(i,7); changespritestat(act, STAT_LOCATOR);
break; break;
case ACTIVATORLOCKED: case ACTIVATORLOCKED:
@ -1072,13 +1072,13 @@ int spawn_r(int j, int pn)
sp->cstat |= 32768; sp->cstat |= 32768;
if (sp->picnum == ACTIVATORLOCKED) if (sp->picnum == ACTIVATORLOCKED)
sector[sect].lotag ^= 16384; sector[sect].lotag ^= 16384;
changespritestat(i,8); changespritestat(act, STAT_ACTIVATOR);
break; break;
case DOORSHOCK: case DOORSHOCK:
sp->cstat |= 1+256; sp->cstat |= 1+256;
sp->shade = -12; sp->shade = -12;
changespritestat(i,6); changespritestat(act, STAT_STANDABLE);
break; break;
case OOZ: case OOZ:
@ -1088,9 +1088,9 @@ int spawn_r(int j, int pn)
if( spj->picnum == NUKEBARREL ) if( spj->picnum == NUKEBARREL )
sp->pal = 8; sp->pal = 8;
changespritestat(i,1); changespritestat(act, STAT_STANDABLE);
getglobalz(i); getglobalz(act);
j = (act->floorz-act->ceilingz)>>9; j = (act->floorz-act->ceilingz)>>9;
@ -1198,11 +1198,11 @@ int spawn_r(int j, int pn)
sp->shade = -17; sp->shade = -17;
if(j >= 0) changespritestat(i,1); if(j >= 0) changespritestat(act, STAT_ACTOR);
else else
{ {
changespritestat(i,2); changespritestat(act, STAT_ZOMBIEACTOR);
makeitfall(i); makeitfall(act);
} }
switch (sp->picnum) switch (sp->picnum)
{ {
@ -1457,7 +1457,7 @@ int spawn_r(int j, int pn)
if(j >= 0) if(j >= 0)
sp->xrepeat = sp->yrepeat = 32; sp->xrepeat = sp->yrepeat = 32;
sp->clipdist = 72; sp->clipdist = 72;
makeitfall(i); makeitfall(act);
if(j >= 0) if(j >= 0)
sp->owner = j; sp->owner = j;
else sp->owner = i; else sp->owner = i;
@ -1465,19 +1465,19 @@ 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, STAT_MISC); changespritestat(act, STAT_MISC);
} }
else else
{ {
if(sp->picnum == EGG) if(sp->picnum == EGG)
sp->clipdist = 24; sp->clipdist = 24;
sp->cstat = 257|(krand()&4); sp->cstat = 257|(krand()&4);
changespritestat(i,2); changespritestat(act, STAT_ZOMBIEACTOR);
} }
break; break;
case TOILETWATER: case TOILETWATER:
sp->shade = -16; sp->shade = -16;
changespritestat(i,6); changespritestat(act, STAT_STANDABLE);
break; break;
case RRTILE63: case RRTILE63:
sp->cstat |= 32768; sp->cstat |= 32768;