- 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);
}
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)
{
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,
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;
if ((sector[dasect].lotag & 0xff) != ST_22_SPLITTING_DOOR)
callsound(dasect, -1);
callsound(dasect, nullptr);
continue;
}

View file

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

View file

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