mirror of
https://github.com/DrBeef/Raze.git
synced 2025-01-19 07:31:03 +00:00
- deleted unused spritetype inlines.
This commit is contained in:
parent
7f07be0d6d
commit
e782cc1c28
4 changed files with 19 additions and 57 deletions
|
@ -2061,42 +2061,6 @@ inline int FacingRange(DSWActor* a1, DSWActor* a2, int range)
|
|||
return (abs(getincangle(getangle(a1->spr.pos.X - a2->spr.pos.X, a1->spr.pos.Y - a2->spr.pos.Y), a2->spr.ang)) < (range));
|
||||
}
|
||||
|
||||
inline void SET_BOOL1(spritetype* sp) { sp->extra |= SPRX_BOOL1; }
|
||||
inline void SET_BOOL2(spritetype* sp) { sp->extra |= SPRX_BOOL2; }
|
||||
inline void SET_BOOL3(spritetype* sp) { sp->extra |= SPRX_BOOL3; }
|
||||
inline void SET_BOOL4(spritetype* sp) { sp->extra |= SPRX_BOOL4; }
|
||||
inline void SET_BOOL5(spritetype* sp) { sp->extra |= SPRX_BOOL5; }
|
||||
inline void SET_BOOL6(spritetype* sp) { sp->extra |= SPRX_BOOL6; }
|
||||
inline void SET_BOOL7(spritetype* sp) { sp->extra |= SPRX_BOOL7; }
|
||||
inline void SET_BOOL8(spritetype* sp) { sp->extra |= SPRX_BOOL8; }
|
||||
inline void SET_BOOL9(spritetype* sp) { sp->extra |= SPRX_BOOL9; }
|
||||
inline void SET_BOOL10(spritetype* sp) { sp->extra |= SPRX_BOOL10; }
|
||||
inline void SET_BOOL11(spritetype* sp) { sp->extra |= SPRX_BOOL11; }
|
||||
|
||||
inline void RESET_BOOL1(spritetype* sp) { sp->extra &= ~SPRX_BOOL1; }
|
||||
inline void RESET_BOOL2(spritetype* sp) { sp->extra &= ~SPRX_BOOL2; }
|
||||
inline void RESET_BOOL3(spritetype* sp) { sp->extra &= ~SPRX_BOOL3; }
|
||||
inline void RESET_BOOL4(spritetype* sp) { sp->extra &= ~SPRX_BOOL4; }
|
||||
inline void RESET_BOOL5(spritetype* sp) { sp->extra &= ~SPRX_BOOL5; }
|
||||
inline void RESET_BOOL6(spritetype* sp) { sp->extra &= ~SPRX_BOOL6; }
|
||||
inline void RESET_BOOL7(spritetype* sp) { sp->extra &= ~SPRX_BOOL7; }
|
||||
inline void RESET_BOOL8(spritetype* sp) { sp->extra &= ~SPRX_BOOL8; }
|
||||
inline void RESET_BOOL9(spritetype* sp) { sp->extra &= ~SPRX_BOOL9; }
|
||||
inline void RESET_BOOL10(spritetype* sp) { sp->extra &= ~SPRX_BOOL10; }
|
||||
inline void RESET_BOOL11(spritetype* sp) { sp->extra &= ~SPRX_BOOL11; }
|
||||
|
||||
inline int TEST_BOOL1(spritetype* sp) { return sp->extra & SPRX_BOOL1; }
|
||||
inline int TEST_BOOL2(spritetype* sp) { return sp->extra & SPRX_BOOL2; }
|
||||
inline int TEST_BOOL3(spritetype* sp) { return sp->extra & SPRX_BOOL3; }
|
||||
inline int TEST_BOOL4(spritetype* sp) { return sp->extra & SPRX_BOOL4; }
|
||||
inline int TEST_BOOL5(spritetype* sp) { return sp->extra & SPRX_BOOL5; }
|
||||
inline int TEST_BOOL6(spritetype* sp) { return sp->extra & SPRX_BOOL6; }
|
||||
inline int TEST_BOOL7(spritetype* sp) { return sp->extra & SPRX_BOOL7; }
|
||||
inline int TEST_BOOL8(spritetype* sp) { return sp->extra & SPRX_BOOL8; }
|
||||
inline int TEST_BOOL9(spritetype* sp) { return sp->extra & SPRX_BOOL9; }
|
||||
inline int TEST_BOOL10(spritetype* sp) { return sp->extra & SPRX_BOOL10; }
|
||||
inline int TEST_BOOL11(spritetype* sp) { return sp->extra & SPRX_BOOL11; }
|
||||
|
||||
inline uint8_t& SP_TAG3(spritetype* s) { return s->clipdist; }
|
||||
inline int16_t& SP_TAG4(spritetype* s) { return s->ang; }
|
||||
inline int16_t& SP_TAG5(spritetype* s) { return s->xvel; }
|
||||
|
@ -2105,8 +2069,6 @@ inline uint8_t& SP_TAG7(spritetype* s) { return MSB_VAR(s->zvel); }
|
|||
inline uint8_t& SP_TAG8(spritetype* s) { return LSB_VAR(s->zvel); }
|
||||
inline uint8_t& SP_TAG9(spritetype* s) { return MSB_VAR(s->owner); }
|
||||
inline uint8_t& SP_TAG10(spritetype* s) { return LSB_VAR(s->owner); }
|
||||
inline int8_t& SP_TAG11(spritetype* s) { return s->shade; }
|
||||
inline uint8_t& SP_TAG12(spritetype* s) { return s->pal; }
|
||||
|
||||
inline void SET_BOOL1(DSWActor* sp) { sp->spr.extra |= SPRX_BOOL1; }
|
||||
inline void SET_BOOL2(DSWActor* sp) { sp->spr.extra |= SPRX_BOOL2; }
|
||||
|
|
|
@ -312,8 +312,8 @@ int DoSpike(DSWActor* actor)
|
|||
|
||||
SetSpikeInactive(actor);
|
||||
|
||||
if (SP_TAG6(sp))
|
||||
DoMatchEverything(nullptr, SP_TAG6(sp), -1);
|
||||
if (SP_TAG6(actor))
|
||||
DoMatchEverything(nullptr, SP_TAG6(actor), -1);
|
||||
}
|
||||
else
|
||||
// in the OFF position
|
||||
|
@ -335,12 +335,12 @@ int DoSpike(DSWActor* actor)
|
|||
//SpikeSwitch(match, OFF);
|
||||
}
|
||||
|
||||
if (SP_TAG6(sp) && TEST_BOOL5(sp))
|
||||
DoMatchEverything(nullptr, SP_TAG6(sp), -1);
|
||||
if (SP_TAG6(actor) && TEST_BOOL5(actor))
|
||||
DoMatchEverything(nullptr, SP_TAG6(actor), -1);
|
||||
}
|
||||
|
||||
// operate only once
|
||||
if (TEST_BOOL2(sp))
|
||||
if (TEST_BOOL2(actor))
|
||||
{
|
||||
SetSpikeInactive(actor);
|
||||
KillActor(actor);
|
||||
|
@ -357,7 +357,7 @@ int DoSpike(DSWActor* actor)
|
|||
else // if (*lptr == u->z_tgt)
|
||||
{
|
||||
// if heading for the OFF (original) position and should NOT CRUSH
|
||||
if (TEST_BOOL3(sp) && u->z_tgt == u->oz)
|
||||
if (TEST_BOOL3(actor) && u->z_tgt == u->oz)
|
||||
{
|
||||
USERp bu;
|
||||
bool found = false;
|
||||
|
@ -421,8 +421,8 @@ int DoSpikeAuto(DSWActor* actor)
|
|||
u->vel_rate = -u->vel_rate;
|
||||
u->Tics = u->WaitTics;
|
||||
|
||||
if (SP_TAG6(sp))
|
||||
DoMatchEverything(nullptr, SP_TAG6(sp), -1);
|
||||
if (SP_TAG6(actor))
|
||||
DoMatchEverything(nullptr, SP_TAG6(actor), -1);
|
||||
}
|
||||
else
|
||||
// in the DOWN position
|
||||
|
@ -434,8 +434,8 @@ int DoSpikeAuto(DSWActor* actor)
|
|||
u->z_tgt = actor->spr.pos.Z;
|
||||
u->Tics = u->WaitTics;
|
||||
|
||||
if (SP_TAG6(sp) && TEST_BOOL5(sp))
|
||||
DoMatchEverything(nullptr, SP_TAG6(sp), -1);
|
||||
if (SP_TAG6(actor) && TEST_BOOL5(actor))
|
||||
DoMatchEverything(nullptr, SP_TAG6(actor), -1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3500,7 +3500,7 @@ bool ItemSpotClear(DSWActor* actor, short statnum, short id)
|
|||
int i;
|
||||
auto sip = &actor->s();
|
||||
|
||||
if (TEST_BOOL2(sip))
|
||||
if (TEST_BOOL2(actor))
|
||||
{
|
||||
SWSectIterator it(sip->sector());
|
||||
while (auto itActor = it.Next())
|
||||
|
@ -4280,7 +4280,7 @@ int SpawnItemsMatch(short match)
|
|||
}
|
||||
}
|
||||
|
||||
if (!TEST_BOOL1(sip))
|
||||
if (!TEST_BOOL1(itActor))
|
||||
KillActor(itActor);
|
||||
}
|
||||
return 0;
|
||||
|
|
|
@ -866,7 +866,7 @@ void SectorObjectSetupBounds(SECTOR_OBJECTp sop)
|
|||
// some delete sprites ride others don't
|
||||
if (sp->statnum == STAT_DELETE_SPRITE)
|
||||
{
|
||||
if (!TEST_BOOL2(sp))
|
||||
if (!TEST_BOOL2(itActor))
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -1235,23 +1235,23 @@ void SetupSectorObject(sectortype* sectp, short tag)
|
|||
|
||||
sop->drive_angspeed = SP_TAG2(actor);
|
||||
sop->drive_angspeed <<= 5;
|
||||
sop->drive_angslide = SP_TAG3(sp);
|
||||
sop->drive_angslide = SP_TAG3(actor);
|
||||
if (sop->drive_angslide <= 0 || sop->drive_angslide == 32)
|
||||
sop->drive_angslide = 1;
|
||||
|
||||
sop->drive_speed = SP_TAG6(sp);
|
||||
sop->drive_speed = SP_TAG6(actor);
|
||||
sop->drive_speed <<= 5;
|
||||
sop->drive_slide = SP_TAG7(sp);
|
||||
sop->drive_slide = SP_TAG7(actor);
|
||||
if (sop->drive_slide <= 0)
|
||||
sop->drive_slide = 1;
|
||||
|
||||
if (TEST_BOOL1(sp))
|
||||
if (TEST_BOOL1(actor))
|
||||
SET(sop->flags, SOBJ_NO_QUAKE);
|
||||
|
||||
if (TEST_BOOL3(sp))
|
||||
if (TEST_BOOL3(actor))
|
||||
SET(sop->flags, SOBJ_REMOTE_ONLY);
|
||||
|
||||
if (TEST_BOOL4(sp))
|
||||
if (TEST_BOOL4(actor))
|
||||
{
|
||||
sop->crush_z = sp->pos.Z;
|
||||
SET(sop->flags, SOBJ_RECT_CLIP);
|
||||
|
|
Loading…
Reference in a new issue