- a large of Exhumed flags, most search& replace plus a few local variable types.

This commit is contained in:
Christoph Oelckers 2021-12-18 18:40:25 +01:00
parent 2d648924e8
commit 988a91904a
28 changed files with 126 additions and 126 deletions

View file

@ -2588,7 +2588,7 @@ void usePropertiesChanger(DBloodActor* sourceactor, int objType, sectortype* pSe
if ((old & 0x0) && !(pWall->cstat & 0x0)) pWall->cstat |= 0x0; // kWallMoveNone
else if ((old & 0x4000) && !(pWall->cstat & 0x4000)) pWall->cstat |= 0x4000; // kWallMoveForward
else if ((old & 0x8000) && !(pWall->cstat & 0x8000)) pWall->cstat |= 0x8000; // kWallMoveBackward
else if ((old & 0x8000) && !(pWall->cstat & CSTAT_SPRITE_INVISIBLE)) pWall->cstat |= CSTAT_SPRITE_INVISIBLE; // kWallMoveBackward
}
#endif
@ -2813,7 +2813,7 @@ void usePropertiesChanger(DBloodActor* sourceactor, int objType, sectortype* pSe
// and handle exceptions
if ((old & 0x1000) && !(pSprite->cstat & 0x1000)) pSprite->cstat |= 0x1000; //kSpritePushable
if ((old & 0x80) && !(pSprite->cstat & 0x80)) pSprite->cstat |= 0x80; // kSpriteOriginAlign
if ((old & CSTAT_SPRITE_YCENTER) && !(pSprite->cstat & CSTAT_SPRITE_YCENTER)) pSprite->cstat |= CSTAT_SPRITE_YCENTER;
if (old & 0x6000)
{

View file

@ -114,7 +114,7 @@ DExhumedActor* BuildAnim(DExhumedActor* pActor, int val, int val2, int x, int y,
pActor->nPhase = ITEM_MAGIC;
if (nFlag & 0x80) {
pSprite->cstat |= 0x2; // set transluscence
pSprite->cstat |= CSTAT_SPRITE_TRANSLUCENT; // set transluscence
}
return pActor;
@ -130,7 +130,7 @@ void AIAnim::Tick(RunListEvent* ev)
int nIndex = pActor->nIndex;
if (!(pSprite->cstat & 0x8000))
if (!(pSprite->cstat & CSTAT_SPRITE_INVISIBLE))
{
seq_MoveSequence(pActor, nIndex2, nIndex);
}
@ -161,7 +161,7 @@ void AIAnim::Tick(RunListEvent* ev)
if (!nIndex)
{
if (pSpriteB->cstat != 0x8000)
if (pSpriteB->cstat != CSTAT_SPRITE_INVISIBLE)
{
int hitag2 = pSpriteB->hitag;
pSpriteB->hitag--;

View file

@ -65,7 +65,7 @@ void BuildAnubis(DExhumedActor* ap, int x, int y, int z, sectortype* pSector, in
sp->x = x;
sp->y = y;
sp->z = z;
sp->cstat = 0x101;
sp->cstat = CSTAT_SPRITE_BLOCK_ALL;
sp->xoffset = 0;
sp->shade = -12;
sp->yoffset = 0;
@ -325,7 +325,7 @@ void AIAnubis::Tick(RunListEvent* ev)
case 13:
case 14:
{
sp->cstat &= 0xFEFE;
sp->cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
return;
}
@ -336,7 +336,7 @@ void AIAnubis::Tick(RunListEvent* ev)
// loc_2564C:
if (nAction && pTarget != nullptr)
{
if (!(pTarget->s().cstat & 0x101))
if (!(pTarget->s().cstat & CSTAT_SPRITE_BLOCK_ALL))
{
ap->nAction = 0;
ap->nFrame = 0;
@ -432,7 +432,7 @@ void AIAnubis::Damage(RunListEvent* ev)
sp->yvel = 0;
sp->zvel = 0;
sp->z = sp->sector()->floorz;
sp->cstat &= 0xFEFE;
sp->cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
ap->nHealth = 0;

View file

@ -335,7 +335,7 @@ int MoveBullet(int nBullet)
DExhumedActor* pEnemyActor = BulletList[nBullet].pEnemy;
if (pEnemyActor)
{
if (!(pEnemyActor->s().cstat & 0x101))
if (!(pEnemyActor->s().cstat & CSTAT_SPRITE_BLOCK_ALL))
BulletList[nBullet].pEnemy = nullptr;
else
{
@ -592,7 +592,7 @@ DExhumedActor* BuildBullet(DExhumedActor* pActor, int nType, int nZOffset, int n
{
spritetype *pTargetSprite = &pTarget->s();
if (pTargetSprite->cstat & 0x101)
if (pTargetSprite->cstat & CSTAT_SPRITE_BLOCK_ALL)
{
sBullet.nType = nType;
sBullet.nDoubleDamage = nDoubleDamage;
@ -703,7 +703,7 @@ DExhumedActor* BuildBullet(DExhumedActor* pActor, int nType, int nZOffset, int n
pBulletSprite->picnum = seq_GetSeqPicnum(nSeq, 0, 0);
if (nSeq == kSeqBullet) {
pBulletSprite->cstat |= 0x8000;
pBulletSprite->cstat |= CSTAT_SPRITE_INVISIBLE;
}
pBullet->nPitch = nPitch;

View file

@ -167,7 +167,7 @@ void BuildFish(DExhumedActor* pActor, int x, int y, int z, sectortype* pSector,
pSprite->x = x;
pSprite->y = y;
pSprite->z = z;
pSprite->cstat = 0x101;
pSprite->cstat = CSTAT_SPRITE_BLOCK_ALL;
pSprite->shade = -12;
pSprite->clipdist = 80;
pSprite->xrepeat = 40;
@ -284,7 +284,7 @@ void AIFish::Damage(RunListEvent* ev)
pActor->nHealth = 0;
nCreaturesKilled++;
pSprite->cstat &= 0xFEFE;
pSprite->cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
if (!ev->isRadialEvent())
{

View file

@ -69,7 +69,7 @@ void ThrowGrenade(int nPlayer, int, int, int ecx, int push1)
nAngle = pPlayerSprite->ang;
}
pGrenadeSprite->cstat &= 0x7FFF;
pGrenadeSprite->cstat &= ~CSTAT_SPRITE_BLOCK;
pGrenadeSprite->ang = nAngle;
if (push1 >= -3000)

View file

@ -335,7 +335,7 @@ void ProcessSpriteTag(DExhumedActor* pActor, int nLotag, int nHitag)
{
pSprite->hitag = nVal;
ChangeActorStat(pActor, nLotag + 900);
pSprite->cstat &= 0xFEFE;
pSprite->cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
BuildItemAnim(pActor);
return;
}
@ -343,7 +343,7 @@ void ProcessSpriteTag(DExhumedActor* pActor, int nLotag, int nHitag)
{
pSprite->hitag = 40;
ChangeActorStat(pActor, nLotag + 900);
pSprite->cstat &= 0xFEFE;
pSprite->cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
BuildItemAnim(pActor);
return;
}
@ -351,7 +351,7 @@ void ProcessSpriteTag(DExhumedActor* pActor, int nLotag, int nHitag)
{
pSprite->hitag = 160;
ChangeActorStat(pActor, nLotag + 900);
pSprite->cstat &= 0xFEFE;
pSprite->cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
BuildItemAnim(pActor);
return;
}
@ -359,7 +359,7 @@ void ProcessSpriteTag(DExhumedActor* pActor, int nLotag, int nHitag)
{
pSprite->hitag = -200;
ChangeActorStat(pActor, nLotag + 900);
pSprite->cstat &= 0xFEFE;
pSprite->cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
BuildItemAnim(pActor);
return;
}
@ -382,7 +382,7 @@ void ProcessSpriteTag(DExhumedActor* pActor, int nLotag, int nHitag)
{
pSprite->hitag = nVal;
ChangeActorStat(pActor, nLotag + 900);
pSprite->cstat &= 0xFEFE;
pSprite->cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
BuildItemAnim(pActor);
return;
}
@ -391,7 +391,7 @@ void ProcessSpriteTag(DExhumedActor* pActor, int nLotag, int nHitag)
{
pSprite->hitag = 1;
ChangeActorStat(pActor, 9 + 900);
pSprite->cstat &= 0xFEFE;
pSprite->cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
BuildItemAnim(pActor);
return;
}
@ -402,7 +402,7 @@ void ProcessSpriteTag(DExhumedActor* pActor, int nLotag, int nHitag)
nVal--; // CHECKME ??
pSprite->hitag = nVal;
ChangeActorStat(pActor, nLotag + 900);
pSprite->cstat &= 0xFEFE;
pSprite->cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
BuildItemAnim(pActor);
return;
}
@ -715,7 +715,7 @@ void ProcessSpriteTag(DExhumedActor* pActor, int nLotag, int nHitag)
case kTagRamses: // Ramses head
{
pSpiritSprite = pActor;
pSprite->cstat |= 0x8000;
pSprite->cstat |= CSTAT_SPRITE_INVISIBLE;
return;
}
default: // TODO - checkme!

View file

@ -181,10 +181,10 @@ static bool UseEye(int nPlayer)
auto pActor = PlayerList[nPlayer].Actor();
auto pSprite = &pActor->s();
pSprite->cstat |= 0x8000;
pSprite->cstat |= CSTAT_SPRITE_INVISIBLE;
if (PlayerList[nPlayer].pPlayerFloorSprite != nullptr) {
pSprite->cstat |= 0x8000;
pSprite->cstat |= CSTAT_SPRITE_INVISIBLE;
}
if (nPlayer == nLocalPlayer)
@ -434,7 +434,7 @@ void DoRegenerates()
pSprite->xvel = pSprite->zvel; // setting to 0
if (pSprite->statnum == kStatExplodeTrigger) {
pSprite->cstat = 0x101;
pSprite->cstat = CSTAT_SPRITE_BLOCK_ALL;
}
else {
pSprite->cstat = 0;

View file

@ -194,7 +194,7 @@ void AILavaDude::Damage(RunListEvent* ev)
nCreaturesKilled++;
pSprite->cstat &= 0xFEFE;
pSprite->cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
}
else
{
@ -259,7 +259,7 @@ void AILavaDude::Tick(RunListEvent* ev)
if (pTarget && nAction < 4)
{
if (!(pTarget->s().cstat & 0x101) || pTarget->s().statnum == MAXSTATUS)
if (!(pTarget->s().cstat & CSTAT_SPRITE_BLOCK_ALL) || pTarget->s().statnum == MAXSTATUS)
{
pTarget = nullptr;
pActor->pTarget = nullptr;
@ -286,7 +286,7 @@ void AILavaDude::Tick(RunListEvent* ev)
{
pActor->pTarget = pTarget;
pActor->nAction = 2;
pSprite->cstat = 0x101;
pSprite->cstat = CSTAT_SPRITE_BLOCK_ALL;
pActor->nFrame = 0;
break;
}
@ -332,7 +332,7 @@ void AILavaDude::Tick(RunListEvent* ev)
{
pActor->nAction = 2;
pActor->nFrame = 0;
pSprite->cstat = 0x101;
pSprite->cstat = CSTAT_SPRITE_BLOCK_ALL;
break;
}
}
@ -356,7 +356,7 @@ void AILavaDude::Tick(RunListEvent* ev)
PlotCourseToSprite(pActor, pTarget);
pSprite->cstat |= 0x101;
pSprite->cstat |= CSTAT_SPRITE_BLOCK_ALL;
}
break;
@ -386,7 +386,7 @@ void AILavaDude::Tick(RunListEvent* ev)
if (var_1C)
{
pActor->nAction = 7;
pSprite->cstat &= 0xFEFE;
pSprite->cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
}
break;

View file

@ -62,7 +62,7 @@ void BuildLion(DExhumedActor* pActor, int x, int y, int z, sectortype* pSector,
pSprite->x = x;
pSprite->y = y;
pSprite->z = z;
pSprite->cstat = 0x101;
pSprite->cstat = CSTAT_SPRITE_BLOCK_ALL;
pSprite->clipdist = 60;
pSprite->shade = -12;
pSprite->xrepeat = 40;
@ -130,7 +130,7 @@ void AILion::Damage(RunListEvent* ev)
pSprite->xvel = 0;
pSprite->yvel = 0;
pSprite->zvel = 0;
pSprite->cstat &= 0xFEFE;
pSprite->cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
pActor->nHealth = 0;
@ -183,7 +183,7 @@ void AILion::Damage(RunListEvent* ev)
pActor->nAction = 8;
pSprite->xvel = 0;
pSprite->yvel = 0;
pSprite->cstat &= 0xFEFE;
pSprite->cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
}
pActor->nFrame = 0;
@ -285,7 +285,7 @@ void AILion::Tick(RunListEvent* ev)
int nAng = pSprite->ang & 0xFFF8;
if (pSprite->cstat & 0x8000)
if (pSprite->cstat & CSTAT_SPRITE_INVISIBLE)
{
pSprite->xvel = bcos(nAng, 1);
pSprite->yvel = bsin(nAng, 1);
@ -309,10 +309,10 @@ void AILion::Tick(RunListEvent* ev)
{
if (nMov.actor() == pTarget)
{
if (pSprite->cstat & 0x8000)
if (pSprite->cstat & CSTAT_SPRITE_INVISIBLE)
{
pActor->nAction = 9;
pSprite->cstat &= 0x7FFF;
pSprite->cstat &= ~CSTAT_SPRITE_BLOCK;
pSprite->xvel = 0;
pSprite->yvel = 0;
}
@ -504,7 +504,7 @@ void AILion::Tick(RunListEvent* ev)
{
pActor->nAction = 2;
pActor->nFrame = 0;
pSprite->cstat |= 0x8000;
pSprite->cstat |= CSTAT_SPRITE_INVISIBLE;
}
return;
}
@ -515,7 +515,7 @@ void AILion::Tick(RunListEvent* ev)
{
pActor->nFrame = 0;
pActor->nAction = 2;
pSprite->cstat |= 0x101;
pSprite->cstat |= CSTAT_SPRITE_BLOCK_ALL;
}
return;
}
@ -536,7 +536,7 @@ void AILion::Tick(RunListEvent* ev)
// loc_379AD: ?
if (nAction != 1 && pTarget != nullptr)
{
if (!(pTarget->s().cstat & 0x101))
if (!(pTarget->s().cstat & CSTAT_SPRITE_BLOCK_ALL))
{
pActor->nAction = 1;
pActor->nFrame = 0;

View file

@ -319,7 +319,7 @@ Collision movespritez(DExhumedActor* pActor, int z, int height, int, int clipdis
auto pSect2 = pSector;
// backup cstat
uint16_t cstat = pSprite->cstat;
auto cstat = pSprite->cstat;
pSprite->cstat &= ~CSTAT_SPRITE_BLOCK;
@ -728,7 +728,7 @@ DExhumedActor* FindPlayer(DExhumedActor* pActor, int nDistance, bool dontengage)
pPlayerActor = PlayerList[i].Actor();
auto pPlayerSprite = &pPlayerActor->s();
if ((pPlayerSprite->cstat & 0x101) && (!(pPlayerSprite->cstat & 0x8000)))
if ((pPlayerSprite->cstat & CSTAT_SPRITE_BLOCK_ALL) && (!(pPlayerSprite->cstat & CSTAT_SPRITE_INVISIBLE)))
{
int v9 = abs(pPlayerSprite->x - x);
@ -1006,7 +1006,7 @@ void MoveSector(sectortype* pSector, int nAngle, int *nXVel, int *nYVel)
{
pos.z = sp->z;
if ((nSectFlag & kSectUnderwater) || pos.z != nZVal || sp->cstat & 0x8000)
if ((nSectFlag & kSectUnderwater) || pos.z != nZVal || sp->cstat & CSTAT_SPRITE_INVISIBLE)
{
pos.x = sp->x;
pos.y = sp->y;
@ -1075,7 +1075,7 @@ void MoveSector(sectortype* pSector, int nAngle, int *nXVel, int *nYVel)
while (auto pActor = it.Next())
{
auto pSprite = &pActor->s();
if (pSprite->statnum >= 99 && nZVal == pSprite->z && !(pSprite->cstat & 0x8000))
if (pSprite->statnum >= 99 && nZVal == pSprite->z && !(pSprite->cstat & CSTAT_SPRITE_INVISIBLE))
{
pSectorB = pSector;
Collision scratch;
@ -1348,7 +1348,7 @@ DExhumedActor* GrabBody()
if (nCurBodyNum >= 50) {
nCurBodyNum = 0;
}
} while (pSprite->cstat & 0x101);
} while (pSprite->cstat & CSTAT_SPRITE_BLOCK_ALL);
if (nBodyTotal < 50) {
nBodyTotal++;
@ -1382,7 +1382,7 @@ DExhumedActor* GrabChunkSprite()
if (nChunkTotal < kMaxMoveChunks)
nChunkTotal++;
pActor->s().cstat = 0x80;
pActor->s().cstat = CSTAT_SPRITE_YCENTER;
return pActor;
}
@ -1403,7 +1403,7 @@ DExhumedActor* BuildCreatureChunk(DExhumedActor* pSrc, int nPic, bool bSpecial)
ChangeActorSect(actor, pSrcSpr->sector());
pSprite->cstat = 0x80;
pSprite->cstat = CSTAT_SPRITE_YCENTER;
pSprite->shade = -12;
pSprite->pal = 0;
@ -1514,7 +1514,7 @@ DExhumedActor* UpdateEnemy(DExhumedActor** ppEnemy)
{
if (*ppEnemy)
{
if (!((*ppEnemy)->s().cstat & 0x101)) {
if (!((*ppEnemy)->s().cstat & CSTAT_SPRITE_BLOCK_ALL)) {
*ppEnemy = nullptr;
}
}

View file

@ -59,7 +59,7 @@ void BuildMummy(DExhumedActor* pActor, int x, int y, int z, sectortype* pSector,
pSprite->x = x;
pSprite->y = y;
pSprite->z = z;
pSprite->cstat = 0x101;
pSprite->cstat = CSTAT_SPRITE_BLOCK_ALL;
pSprite->shade = -12;
pSprite->clipdist = 32;
pSprite->xvel = 0;
@ -178,7 +178,7 @@ void AIMummy::Tick(RunListEvent* ev)
{
if ((pActor->nPhase & 0x1F) == (totalmoves & 0x1F))
{
pSprite->cstat = 0x101;
pSprite->cstat = CSTAT_SPRITE_BLOCK_ALL;
if (pTarget == nullptr)
{
@ -208,7 +208,7 @@ void AIMummy::Tick(RunListEvent* ev)
if ((pActor->nPhase & 0x1F) == (totalmoves & 0x1F))
{
pSprite->cstat = 0x101;
pSprite->cstat = CSTAT_SPRITE_BLOCK_ALL;
PlotCourseToSprite(pActor, pTarget);
@ -373,7 +373,7 @@ void AIMummy::Tick(RunListEvent* ev)
{
if (bVal)
{
pSprite->cstat = 0x101;
pSprite->cstat = CSTAT_SPRITE_BLOCK_ALL;
pActor->nAction = 0;
pActor->nHealth = 300;
@ -396,7 +396,7 @@ void AIMummy::Tick(RunListEvent* ev)
{
pSprite->xvel = 0;
pSprite->yvel = 0;
pSprite->cstat = 0x101;
pSprite->cstat = CSTAT_SPRITE_BLOCK_ALL;
pActor->nAction = 0;
pActor->nFrame = 0;
@ -448,7 +448,7 @@ void AIMummy::Damage(RunListEvent* ev)
if (pActor->nHealth <= 0)
{
pActor->nHealth = 0;
pSprite->cstat &= 0xFEFE;
pSprite->cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
nCreaturesKilled++;
DropMagic(pActor);

View file

@ -600,7 +600,7 @@ int CheckSectorSprites(sectortype* pSector, int nVal)
while (auto pActor= it.Next())
{
auto pSprite = &pActor->s();
if ((pSprite->cstat & 0x101) && (nZDiff < GetActorHeight(pActor)))
if ((pSprite->cstat & CSTAT_SPRITE_BLOCK_ALL) && (nZDiff < GetActorHeight(pActor)))
{
if (nVal != 1) {
return 1;
@ -626,7 +626,7 @@ int CheckSectorSprites(sectortype* pSector, int nVal)
ExhumedSectIterator it(pSector);
while (auto pActor = it.Next())
{
if (pActor->s().cstat & 0x101) {
if (pActor->s().cstat & CSTAT_SPRITE_BLOCK_ALL) {
return 1;
}
}
@ -1818,7 +1818,7 @@ DExhumedActor* BuildObject(DExhumedActor* pActor, int nOjectType, int nHitag)
ChangeActorStat(pActor, ObjectStatnum[nOjectType]);
// 0x7FFD to ensure set as blocking ('B' and 'H') sprite and also disable translucency and set not invisible
spr->cstat = (spr->cstat | 0x101) & 0x7FFD;
spr->cstat = (spr->cstat | CSTAT_SPRITE_BLOCK_ALL) & 0x7FFD;
spr->xvel = 0;
spr->yvel = 0;
spr->zvel = 0;
@ -1898,7 +1898,7 @@ void AIObject::Tick(RunListEvent* ev)
int nStat = pSprite->statnum;
int bx = pActor->nIndex;
if (nStat == 97 || (!(pSprite->cstat & 0x101))) {
if (nStat == 97 || (!(pSprite->cstat & CSTAT_SPRITE_BLOCK_ALL))) {
return;
}
@ -2060,7 +2060,7 @@ void AIObject::RadialDamage(RunListEvent* ev)
auto pSprite = &pActor->s();
int nStat = pSprite->statnum;
if (pActor->nHealth > 0 && pSprite->cstat & 0x101
if (pActor->nHealth > 0 && pSprite->cstat & CSTAT_SPRITE_BLOCK_ALL
&& (nStat != kStatExplodeTarget
|| ev->pRadialActor->s().statnum == 201
|| (nRadialBullet != 3 && nRadialBullet > -1)
@ -2122,7 +2122,7 @@ void BuildDrip(DExhumedActor* pActor)
auto nDrips = sDrip.Reserve(1);
sDrip[nDrips].pActor = pActor;
sDrip[nDrips].nCount = RandomSize(8) + 90;
pSprite->cstat = 0x8000u;
pSprite->cstat = CSTAT_SPRITE_INVISIBLE;
}
void DoDrips()

View file

@ -131,7 +131,7 @@ void feebtag(int x, int y, int z, sectortype* pSector, DExhumedActor **nSprite,
auto pSprite = &pActor->s();
int nStat = pSprite->statnum;
if (nStat >= 900 && !(pSprite->cstat & 0x8000))
if (nStat >= 900 && !(pSprite->cstat & CSTAT_SPRITE_INVISIBLE))
{
uint32_t xDiff = abs(pSprite->x - x);
uint32_t yDiff = abs(pSprite->y - y);
@ -282,7 +282,7 @@ void RestartPlayer(int nPlayer)
fspr->z = nSpr->z;
fspr->yrepeat = 64;
fspr->xrepeat = 64;
fspr->cstat = 32;
fspr->cstat = CSTAT_SPRITE_ALIGNMENT_FLOOR;
fspr->picnum = nPlayer + kTile3571;
}
else
@ -301,7 +301,7 @@ void RestartPlayer(int nPlayer)
plr->pPlayerFloorSprite = floorsprt;
nSpr->cstat = 0x101;
nSpr->cstat = CSTAT_SPRITE_BLOCK_ALL;
nSpr->shade = -12;
nSpr->clipdist = 58;
nSpr->pal = 0;
@ -490,7 +490,7 @@ void StartDeathSeq(int nPlayer, int nVal)
PlayerList[nPlayer].nInvisible = 0;
dVertPan[nPlayer] = 15;
pSprite->cstat &= 0x7FFF;
pSprite->cstat &= ~CSTAT_SPRITE_BLOCK;
SetNewWeaponImmediate(nPlayer, -2);
@ -515,7 +515,7 @@ void StartDeathSeq(int nPlayer, int nVal)
PlayerList[nPlayer].nSeqSize = 0;
pSprite->cstat &= 0xFEFE;
pSprite->cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
if (nTotalPlayers == 1)
{
@ -816,11 +816,11 @@ void AIPlayer::Tick(RunListEvent* ev)
PlayerList[nPlayer].nInvisible--;
if (PlayerList[nPlayer].nInvisible == 0)
{
pPlayerSprite->cstat &= 0x7FFF; // set visible
pPlayerSprite->cstat &= ~CSTAT_SPRITE_BLOCK; // set visible
DExhumedActor* pFloorSprite = PlayerList[nPlayer].pPlayerFloorSprite;
if (pFloorSprite != nullptr) {
pFloorSprite->s().cstat &= 0x7FFF; // set visible
pFloorSprite->s().cstat &= ~CSTAT_SPRITE_BLOCK; // set visible
}
}
else if (PlayerList[nPlayer].nInvisible == 150 && nPlayer == nLocalPlayer)
@ -2554,7 +2554,7 @@ sectdone:
PlayerList[nPlayer].nAction = 18;
break;
case 19:
pPlayerSprite->cstat |= 0x8000;
pPlayerSprite->cstat |= CSTAT_SPRITE_INVISIBLE;
PlayerList[nPlayer].nAction = 20;
break;
}
@ -2615,7 +2615,7 @@ sectdone:
{
pDopple->s().ang = pPlayerSprite->ang;
ChangeActorSect(pDopple, pPlayerSprite->sector()->pAbove);
pDopple->s().cstat = 0x101;
pDopple->s().cstat = CSTAT_SPRITE_BLOCK_ALL;
}
else
{

View file

@ -488,7 +488,7 @@ void BuildQueenEgg(int nQueen, int nVal)
pSprite2->xvel = 0;
pSprite2->yvel = 0;
pSprite2->zvel = -2000;
pSprite2->cstat = 0x101;
pSprite2->cstat = CSTAT_SPRITE_BLOCK_ALL;
}
pSprite2->lotag = runlist_HeadRun() + 1;
@ -557,7 +557,7 @@ void AIQueenEgg::Tick(RunListEvent* ev)
pEgg->pActor = enemy;
pEgg->pTarget = pTarget;
if (pTarget && (pTarget->s().cstat & 0x101) == 0)
if (pTarget && (pTarget->s().cstat & CSTAT_SPRITE_BLOCK_ALL) == 0)
{
pEgg->pTarget = nullptr;
pEgg->nAction = 0;
@ -616,7 +616,7 @@ void AIQueenEgg::Tick(RunListEvent* ev)
if (bVal)
{
pEgg->nAction = 3;
pSprite->cstat = 0x101;
pSprite->cstat = CSTAT_SPRITE_BLOCK_ALL;
}
break;
}
@ -681,7 +681,7 @@ void AIQueenEgg::RadialDamage(RunListEvent* ev)
auto pSprite = &pActor->s();
auto pRadial = &ev->pRadialActor->s();
if (pRadial->statnum != 121 && (pSprite->cstat & 0x101) != 0)
if (pRadial->statnum != 121 && (pSprite->cstat & CSTAT_SPRITE_BLOCK_ALL) != 0)
{
int nDamage = runlist_CheckRadialDamage(pActor);
@ -794,7 +794,7 @@ void AIQueenHead::Tick(RunListEvent* ev)
if (pTarget)
{
if (!(pTarget->s().cstat & 0x101))
if (!(pTarget->s().cstat & CSTAT_SPRITE_BLOCK_ALL))
{
pTarget = nullptr;
QueenHead.pTarget = pTarget;
@ -818,7 +818,7 @@ void AIQueenHead::Tick(RunListEvent* ev)
QueenHead.nAction = 6;
nHeadVel = 800;
pSprite->cstat = 0x101;
pSprite->cstat = CSTAT_SPRITE_BLOCK_ALL;
}
else if (QueenHead.nIndex < 60)
{
@ -1056,7 +1056,7 @@ void AIQueenHead::RadialDamage(RunListEvent* ev)
auto pSprite = &QueenHead.pActor->s();
auto pRadial = &ev->pRadialActor->s();
if (pRadial->statnum != 121 && (pSprite->cstat & 0x101) != 0)
if (pRadial->statnum != 121 && (pSprite->cstat & CSTAT_SPRITE_BLOCK_ALL) != 0)
{
ev->nDamage = runlist_CheckRadialDamage(QueenHead.pActor);
if (ev->nDamage) Damage(ev);
@ -1150,7 +1150,7 @@ void BuildQueen(DExhumedActor* pActor, int x, int y, int z, sectortype* pSector,
pSprite->x = x;
pSprite->y = y;
pSprite->z = z;
pSprite->cstat = 0x101;
pSprite->cstat = CSTAT_SPRITE_BLOCK_ALL;
pSprite->pal = 0;
pSprite->shade = -12;
pSprite->clipdist = 100;
@ -1233,7 +1233,7 @@ void AIQueen::Tick(RunListEvent* ev)
{
if (nAction < 7)
{
if (!(pSprite->cstat & 0x101))
if (!(pSprite->cstat & CSTAT_SPRITE_BLOCK_ALL))
{
pTarget = nullptr;
QueenList[nQueen].pTarget = nullptr;
@ -1348,7 +1348,7 @@ void AIQueen::Tick(RunListEvent* ev)
// loc_35BD2
if (nAction && pTarget != nullptr)
{
if (!(pTarget->s().cstat & 0x101))
if (!(pTarget->s().cstat & CSTAT_SPRITE_BLOCK_ALL))
{
QueenList[nQueen].nAction = 0;
QueenList[nQueen].nFrame = 0;
@ -1451,7 +1451,7 @@ void AIQueen::Tick(RunListEvent* ev)
case 10:
{
pSprite->cstat &= 0xFEFE;
pSprite->cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
break;
}
}
@ -1466,7 +1466,7 @@ void AIQueen::RadialDamage(RunListEvent* ev)
auto pSprite = &pActor->s();
auto pRadial = &ev->pRadialActor->s();
if (pRadial->statnum != 121 && (pSprite->cstat & 0x101) != 0)
if (pRadial->statnum != 121 && (pSprite->cstat & CSTAT_SPRITE_BLOCK_ALL) != 0)
{
ev->nDamage = runlist_CheckRadialDamage(pActor);
if (ev->nDamage) Damage(ev);

View file

@ -133,7 +133,7 @@ void MoveRaToEnemy(int nPlayer)
if (pTarget)
{
auto pTargSprite = &pTarget->s();
if (!(pTargSprite->cstat & 0x101) || pTargSprite->statnum == MAXSTATUS)
if (!(pTargSprite->cstat & CSTAT_SPRITE_BLOCK_ALL) || pTargSprite->statnum == MAXSTATUS)
{
Ra[nPlayer].pTarget = nullptr;
if (nAction == 0 || nAction == 3) {
@ -217,7 +217,7 @@ void AIRa::Tick(RunListEvent* ev)
}
else
{
pSprite->cstat &= 0x7FFF;
pSprite->cstat &= ~CSTAT_SPRITE_BLOCK;
Ra[nPlayer].nAction = 1;
Ra[nPlayer].nFrame = 0;
}
@ -288,7 +288,7 @@ void AIRa::Tick(RunListEvent* ev)
{
if (bVal)
{
pSprite->cstat |= 0x8000;
pSprite->cstat |= CSTAT_SPRITE_INVISIBLE;
Ra[nPlayer].nAction = 0;
Ra[nPlayer].nFrame = 0;
Ra[nPlayer].nState = 0;

View file

@ -77,7 +77,7 @@ void InitSpiritHead()
{
if (act->s().statnum)
{
act->s().cstat |= 0x8000;
act->s().cstat |= CSTAT_SPRITE_INVISIBLE;
}
}
@ -126,7 +126,7 @@ void InitSpiritHead()
// work tile is twice as big as the normal head size
Worktile = TileFiles.tileCreate(kTileRamsesWorkTile, kSpiritY * 2, kSpiritX * 2);
pSpiritSpr->cstat &= 0x7FFF;
pSpiritSpr->cstat &= ~CSTAT_SPRITE_BLOCK;
nHeadTimeStart = PlayClock;

View file

@ -92,7 +92,7 @@ void BuildRat(DExhumedActor* pActor, int x, int y, int z, sectortype* pSector, i
ChangeActorStat(pActor, 108);
}
pSprite->cstat = 0x101;
pSprite->cstat = CSTAT_SPRITE_BLOCK_ALL;
pSprite->shade = -12;
pSprite->xoffset = 0;
pSprite->yoffset = 0;

View file

@ -59,7 +59,7 @@ void BuildRex(DExhumedActor* pActor, int x, int y, int z, sectortype* pSector, i
pSprite->x = x;
pSprite->y = y;
pSprite->z = z;
pSprite->cstat = 0x101;
pSprite->cstat = CSTAT_SPRITE_BLOCK_ALL;
pSprite->clipdist = 80;
pSprite->shade = -12;
pSprite->xrepeat = 64;
@ -134,7 +134,7 @@ void AIRex::Damage(RunListEvent* ev)
pSprite->xvel = 0;
pSprite->yvel = 0;
pSprite->zvel = 0;
pSprite->cstat &= 0xFEFE;
pSprite->cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
pActor->nHealth = 0;
@ -433,7 +433,7 @@ void AIRex::Tick(RunListEvent* ev)
case 7:
{
pSprite->cstat &= 0xFEFE;
pSprite->cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
return;
}
}
@ -441,7 +441,7 @@ void AIRex::Tick(RunListEvent* ev)
// break-ed
if (nAction > 0)
{
if ((pTarget != nullptr) && (!(pTarget->s().cstat & 0x101)))
if ((pTarget != nullptr) && (!(pTarget->s().cstat & CSTAT_SPRITE_BLOCK_ALL)))
{
pActor->nAction = 0;
pActor->nFrame = 0;

View file

@ -56,7 +56,7 @@ void BuildRoach(int nType, DExhumedActor* pActor, int x, int y, int z, sectortyp
pSprite->x = x;
pSprite->y = y;
pSprite->z = z;
pSprite->cstat = 0x101;
pSprite->cstat = CSTAT_SPRITE_BLOCK_ALL;
pSprite->shade = -12;
pSprite->xoffset = 0;
pSprite->yoffset = 0;
@ -141,7 +141,7 @@ void AIRoach::Damage(RunListEvent* ev)
pSprite->xvel = 0;
pSprite->yvel = 0;
pSprite->zvel = 0;
pSprite->cstat &= 0xFEFE;
pSprite->cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
pActor->nHealth = 0;
@ -317,7 +317,7 @@ void AIRoach::Tick(RunListEvent* ev)
}
}
if (pTarget && !(pTarget->s().cstat & 0x101))
if (pTarget && !(pTarget->s().cstat & CSTAT_SPRITE_BLOCK_ALL))
{
pActor->nAction = 1;
pActor->nFrame = 0;

View file

@ -1595,7 +1595,7 @@ int runlist_CheckRadialDamage(DExhumedActor* pActor)
return 0;
}
if (!(pSprite->cstat & 0x101)) {
if (!(pSprite->cstat & CSTAT_SPRITE_BLOCK_ALL)) {
return 0;
}
@ -1641,7 +1641,7 @@ int runlist_CheckRadialDamage(DExhumedActor* pActor)
if (nDist < nDamageRadius)
{
uint16_t nCStat = pSprite->cstat;
pSprite->cstat = 0x101;
pSprite->cstat = CSTAT_SPRITE_BLOCK_ALL;
if (((kStatExplodeTarget - pSprite->statnum) <= 1) ||
cansee(pRadialSpr->x,

View file

@ -61,7 +61,7 @@ void BuildScorp(DExhumedActor* pActor, int x, int y, int z, sectortype* pSector,
pSprite->x = x;
pSprite->y = y;
pSprite->z = z;
pSprite->cstat = 0x101;
pSprite->cstat = CSTAT_SPRITE_BLOCK_ALL;
pSprite->clipdist = 70;
pSprite->shade = -12;
pSprite->xrepeat = 80;
@ -142,7 +142,7 @@ void AIScorp::Damage(RunListEvent* ev)
pSprite->xvel = 0;
pSprite->yvel = 0;
pSprite->zvel = 0;
pSprite->cstat &= 0xFEFE;
pSprite->cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
nCreaturesKilled++;
return;
@ -397,7 +397,7 @@ void AIScorp::Tick(RunListEvent* ev)
case 9:
{
pSprite->cstat &= 0xFEFE;
pSprite->cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
if (bVal)
{
@ -465,7 +465,7 @@ void AIScorp::Effect(RunListEvent* ev, DExhumedActor* pTarget, int mode)
return;
}
if (!(pTarget->s().cstat & 0x101))
if (!(pTarget->s().cstat & CSTAT_SPRITE_BLOCK_ALL))
{
pActor->nAction = 0;
pActor->nFrame = 0;

View file

@ -482,9 +482,9 @@ int seq_PlotArrowSequence(int nSprite, int16_t nSeq, int nVal)
int16_t nFrameSize = FrameSize[nFrame];
uint8_t nShade = pTSprite->shade;
int16_t nStat = pTSprite->cstat;
auto nStat = pTSprite->cstat;
nStat |= 0x80;
nStat |= CSTAT_SPRITE_YCENTER;
if (nSeqOffset & 3) {
nStat |= 0x18;
@ -583,7 +583,7 @@ int seq_PlotSequence(int nSprite, int16_t edx, int16_t nFrame, int16_t ecx)
tsp->ang = pTSprite->ang;
tsp->ownerActor = pTSprite->ownerActor;
tsp->sectp = pTSprite->sectp;
tsp->cstat = pTSprite->cstat |= 0x80;
tsp->cstat = pTSprite->cstat |= CSTAT_SPRITE_YCENTER;
tsp->cstat2 = pTSprite->cstat2;
tsp->statnum = esi;
@ -603,7 +603,7 @@ int seq_PlotSequence(int nSprite, int16_t edx, int16_t nFrame, int16_t ecx)
nBase++;
}
if (!(pTSprite->cstat & 0x101) || (pOwner->s().statnum == 100 && nNetPlayerCount))
if (!(pTSprite->cstat & CSTAT_SPRITE_BLOCK_ALL) || (pOwner->s().statnum == 100 && nNetPlayerCount))
{
pTSprite->ownerActor = nullptr;
}

View file

@ -60,7 +60,7 @@ void BuildSet(DExhumedActor* pActor, int x, int y, int z, sectortype* pSector, i
pSprite->x = x;
pSprite->y = y;
pSprite->z = z;
pSprite->cstat = 0x101;
pSprite->cstat = CSTAT_SPRITE_BLOCK_ALL;
pSprite->shade = -12;
pSprite->clipdist = 110;
pSprite->xvel = 0;
@ -206,7 +206,7 @@ void AISet::Damage(RunListEvent* ev)
pSprite->xvel = 0;
pSprite->yvel = 0;
pSprite->zvel = 0;
pSprite->cstat &= 0xFEFE;
pSprite->cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
pActor->nHealth = 0;
@ -271,7 +271,7 @@ void AISet::Tick(RunListEvent* ev)
if (pTarget && nAction < 10)
{
if (!(pTarget->s().cstat & 0x101))
if (!(pTarget->s().cstat & CSTAT_SPRITE_BLOCK_ALL))
{
pActor->pTarget = nullptr;
pActor->nAction = 0;
@ -611,7 +611,7 @@ void AISet::Tick(RunListEvent* ev)
case 11:
{
pSprite->cstat &= 0xFEFE;
pSprite->cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
return;
}
}
@ -621,7 +621,7 @@ void AISet::Tick(RunListEvent* ev)
{
if (pTarget)
{
if (!(pTarget->s().cstat & 0x101))
if (!(pTarget->s().cstat & CSTAT_SPRITE_BLOCK_ALL))
{
pActor->nAction = 0;
pActor->nFrame = 0;

View file

@ -282,9 +282,9 @@ DExhumedActor* FindSnakeEnemy(int nSnake)
while (auto pAct2 = it.Next())
{
auto pSpr2 = &pAct2->s();
if (pSpr2->statnum >= 90 && pSpr2->statnum < 150 && (pSpr2->cstat & 0x101))
if (pSpr2->statnum >= 90 && pSpr2->statnum < 150 && (pSpr2->cstat & CSTAT_SPRITE_BLOCK_ALL))
{
if (pAct2 != pPlayerActor && !(pSpr2->cstat & 0x8000))
if (pAct2 != pPlayerActor && !(pSpr2->cstat & CSTAT_SPRITE_INVISIBLE))
{
int nAngle2 = (nAngle - GetAngleToSprite(pActor, pAct2)) & kAngleMask;
if (nAngle2 < esi)
@ -345,7 +345,7 @@ void AISnake::Tick(RunListEvent* ev)
}
else
{
if (!(pEnemySprite->s().cstat & 0x101))
if (!(pEnemySprite->s().cstat & CSTAT_SPRITE_BLOCK_ALL))
{
SnakeList[nSnake].pEnemy = nullptr;
goto SEARCH_ENEMY;

View file

@ -58,7 +58,7 @@ DExhumedActor* BuildSpider(DExhumedActor* spp, int x, int y, int z, sectortype*
sp->x = x;
sp->y = y;
sp->z = z;
sp->cstat = 0x101;
sp->cstat = CSTAT_SPRITE_BLOCK_ALL;
sp->shade = -12;
sp->clipdist = 15;
sp->xvel = 0;
@ -129,7 +129,7 @@ void AISpider::Tick(RunListEvent* ev)
DExhumedActor* pTarget = spp->pTarget;
if (pTarget == nullptr || pTarget->s().cstat & 0x101)
if (pTarget == nullptr || pTarget->s().cstat & CSTAT_SPRITE_BLOCK_ALL)
{
switch (nAction)
{
@ -397,7 +397,7 @@ void AISpider::Damage(RunListEvent* ev)
spp->nAction = 5;
spp->nFrame = 0;
sp->cstat &= 0xFEFE;
sp->cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
nCreaturesKilled++;

View file

@ -116,9 +116,9 @@ static void analyzesprites(tspritetype* tsprite, int& spritesortcnt, int x, int
pTSprite->pal = RemapPLU(pTSprite->pal);
// PowerSlaveGDX: Torch bouncing fix
if ((pTSprite->picnum == kTorch1 || pTSprite->picnum == kTorch2) && (pTSprite->cstat & 0x80) == 0)
if ((pTSprite->picnum == kTorch1 || pTSprite->picnum == kTorch2) && (pTSprite->cstat & CSTAT_SPRITE_YCENTER) == 0)
{
pTSprite->cstat |= 0x80;
pTSprite->cstat |= CSTAT_SPRITE_YCENTER;
int nTileY = (tileHeight(pTSprite->picnum) * pTSprite->yrepeat) * 2;
pTSprite->z -= nTileY;
}
@ -129,7 +129,7 @@ static void analyzesprites(tspritetype* tsprite, int& spritesortcnt, int x, int
ev.pTSprite = pTSprite;
runlist_SignalRun(pSprite->lotag - 1, nTSprite, &ExhumedAI::Draw, &ev);
if ((pSprite->statnum < 150) && (pSprite->cstat & 0x101) && (pActor != pPlayerActor))
if ((pSprite->statnum < 150) && (pSprite->cstat & CSTAT_SPRITE_BLOCK_ALL) && (pActor != pPlayerActor))
{
int xval = pSprite->x - x;
int yval = pSprite->y - y;
@ -211,9 +211,9 @@ void DrawView(double smoothRatio, bool sceneonly)
auto pPlayerActor = PlayerList[nLocalPlayer].Actor();
auto pPlayerSprite = &pPlayerActor->s();
int nPlayerOldCstat = pPlayerSprite->cstat;
auto nPlayerOldCstat = pPlayerSprite->cstat;
auto pDop = &PlayerList[nLocalPlayer].pDoppleSprite->s();
int nDoppleOldCstat = pDop->cstat;
auto nDoppleOldCstat = pDop->cstat;
if (nSnakeCam >= 0 && !sceneonly)
{
@ -398,7 +398,7 @@ void DrawView(double smoothRatio, bool sceneonly)
{
nHeadStage = 5;
pPlayerSprite->cstat |= 0x8000;
pPlayerSprite->cstat |= CSTAT_SPRITE_INVISIBLE;
int ang2 = nCameraa.asbuild() - pPlayerSprite->ang;
if (ang2 < 0)

View file

@ -60,7 +60,7 @@ DExhumedActor* BuildWasp(DExhumedActor* pActor, int x, int y, int z, sectortype*
}
pSprite->shade = -12;
pSprite->cstat = 0x101;
pSprite->cstat = CSTAT_SPRITE_BLOCK_ALL;
pSprite->pal = pSprite->sector()->ceilingpal;
pSprite->clipdist = 70;
@ -133,7 +133,7 @@ void AIWasp::RadialDamage(RunListEvent* ev)
if (!pActor) return;
auto pSprite = &pActor->s();
if (!(pSprite->cstat & 0x101))
if (!(pSprite->cstat & CSTAT_SPRITE_BLOCK_ALL))
return;
ev->nDamage = runlist_CheckRadialDamage(pActor);
@ -217,7 +217,7 @@ void AIWasp::Tick(RunListEvent* ev)
{
pTarget = pActor->pTarget;
if (pTarget && (!(pTarget->s().cstat & 0x101) || (pTarget->s().sector()->Flag & kSectUnderwater)))
if (pTarget && (!(pTarget->s().cstat & CSTAT_SPRITE_BLOCK_ALL) || (pTarget->s().sector()->Flag & kSectUnderwater)))
{
// goto pink
pActor->pTarget = nullptr;
@ -347,7 +347,7 @@ void AIWasp::Tick(RunListEvent* ev)
if (pSector->pBelow != nullptr)
{
BuildSplash(pActor, pSector);
pSprite->cstat |= 0x8000;
pSprite->cstat |= CSTAT_SPRITE_INVISIBLE;
}
pSprite->xvel = 0;