- Exhumed: use symbolic constant CSTAT_SPRITE_INVISIBLE

This commit is contained in:
Christoph Oelckers 2021-12-18 12:36:53 +01:00
parent 1edccf1423
commit 8d0013128e
15 changed files with 51 additions and 51 deletions

View file

@ -315,7 +315,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
case FORCESPHERE:
if (!spj)
{
sp->cstat = 32768;
sp->cstat = CSTAT_SPRITE_INVISIBLE;
ChangeActorStat(act, 2);
}
else
@ -466,7 +466,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
ChangeActorStat(act, 2);
break;
case HENSTAND:
sp->cstat = 257;
sp->cstat = CSTAT_SPRITE_BLOCK_ALL;
sp->clipdist = 48;
sp->xrepeat = 21;
sp->yrepeat = 15;
@ -486,7 +486,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
case RRTILE3190:
case RRTILE3191:
case RRTILE3192:
sp->cstat = 257;
sp->cstat = CSTAT_SPRITE_BLOCK_ALL;
sp->clipdist = 8;
sp->xrepeat = 32;
sp->yrepeat = 26;
@ -494,7 +494,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
ChangeActorStat(act, 1);
break;
case RRTILE3120:
sp->cstat = 257;
sp->cstat = CSTAT_SPRITE_BLOCK_ALL;
sp->clipdist = 8;
sp->xrepeat = 12;
sp->yrepeat = 10;
@ -502,7 +502,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
ChangeActorStat(act, 1);
break;
case RRTILE3122:
sp->cstat = 257;
sp->cstat = CSTAT_SPRITE_BLOCK_ALL;
sp->clipdist = 2;
sp->xrepeat = 8;
sp->yrepeat = 6;
@ -510,7 +510,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
ChangeActorStat(act, 1);
break;
case RRTILE3123:
sp->cstat = 257;
sp->cstat = CSTAT_SPRITE_BLOCK_ALL;
sp->clipdist = 8;
sp->xrepeat = 13;
sp->yrepeat = 13;
@ -518,7 +518,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
ChangeActorStat(act, 1);
break;
case RRTILE3124:
sp->cstat = 257;
sp->cstat = CSTAT_SPRITE_BLOCK_ALL;
sp->clipdist = 8;
sp->xrepeat = 17;
sp->yrepeat = 12;
@ -526,7 +526,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
ChangeActorStat(act, 1);
break;
case RRTILE3132:
sp->cstat = 257;
sp->cstat = CSTAT_SPRITE_BLOCK_ALL;
sp->clipdist = 8;
sp->xrepeat = 13;
sp->yrepeat = 10;
@ -534,7 +534,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
ChangeActorStat(act, 1);
break;
case BOWLINGPIN:
sp->cstat = 257;
sp->cstat = CSTAT_SPRITE_BLOCK_ALL;
sp->clipdist = 48;
sp->xrepeat = 23;
sp->yrepeat = 23;
@ -605,7 +605,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
ChangeActorStat(act, STAT_MISC);
break;
}
sp->cstat = 32768;
sp->cstat = CSTAT_SPRITE_INVISIBLE;
ChangeActorStat(act, 11);
break;
case SOUNDFX:
@ -1330,7 +1330,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
case TREE1:
case TREE2:
case TIRE:
sp->cstat = 257; // Make it hitable
sp->cstat = CSTAT_SPRITE_BLOCK_ALL; // Make it hitable
sp->extra = 1;
ChangeActorStat(act, 6);
break;
@ -1343,7 +1343,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
case CAMERAPOLE:
sp->extra = 1;
if (gs.camerashitable) sp->cstat = 257;
if (gs.camerashitable) sp->cstat = CSTAT_SPRITE_BLOCK_ALL;
else sp->cstat = 0;
if (ud.multimode < 2 && sp->pal != 0)
@ -1380,7 +1380,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
sp->shade = -16;
if (sp->xrepeat <= 8)
{
sp->cstat = 32768;
sp->cstat = CSTAT_SPRITE_INVISIBLE;
sp->xrepeat = sp->yrepeat = 0;
}
else sp->cstat = 1 + 256;
@ -1421,7 +1421,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
sp->yrepeat = 18;
sp->clipdist = MulScale(sp->xrepeat, tileWidth(sp->picnum), 7);
act->saved_ammo = 100;
sp->cstat = 257;
sp->cstat = CSTAT_SPRITE_BLOCK_ALL;
sp->lotag = 1;
ChangeActorStat(act, STAT_ACTOR);
break;
@ -1437,7 +1437,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
sp->yrepeat = 32;
sp->clipdist = MulScale(sp->xrepeat, tileWidth(sp->picnum), 7);
act->saved_ammo = 20;
sp->cstat = 257;
sp->cstat = CSTAT_SPRITE_BLOCK_ALL;
sp->lotag = 1;
ChangeActorStat(act, 1);
break;
@ -1482,7 +1482,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
{
if (sp->picnum == EGG)
sp->clipdist = 24;
sp->cstat = 257 | (krand() & 4);
sp->cstat = CSTAT_SPRITE_BLOCK_ALL | (krand() & 4);
ChangeActorStat(act, STAT_ZOMBIEACTOR);
}
break;

View file

@ -140,7 +140,7 @@ void BuildBubbleMachine(DExhumedActor* pActor)
pActor->nCount = pActor->nFrame;
auto pSprite = &pActor->s();
pSprite->cstat = 0x8000;
pSprite->cstat = CSTAT_SPRITE_INVISIBLE;
ChangeActorStat(pActor, kStatBubbleMachine);
}

View file

@ -113,7 +113,7 @@ void BuildGrenade(int nPlayer)
pSprite->shade = -64;
pSprite->xrepeat = 20;
pSprite->yrepeat = 20;
pSprite->cstat = 0x8000;
pSprite->cstat = CSTAT_SPRITE_INVISIBLE;
pSprite->picnum = 1;
pSprite->pal = 0;
pSprite->clipdist = 30;

View file

@ -701,13 +701,13 @@ void ProcessSpriteTag(DExhumedActor* pActor, int nLotag, int nHitag)
case 63:
{
ChangeActorStat(pActor, 405);
pSprite->cstat = 0x8000;
pSprite->cstat = CSTAT_SPRITE_INVISIBLE;
return;
}
case 62:
{
nNetStartSprite[nNetStartSprites] = pActor;
pSprite->cstat = 0x8000;
pSprite->cstat = CSTAT_SPRITE_INVISIBLE;
nNetStartSprites++;
return;
@ -766,7 +766,7 @@ void ExamineSprites(TArray<DExhumedActor*>& actors)
pSprite->x = initx;
pSprite->y = inity;
pSprite->z = initz;
pSprite->cstat = 0x8000;
pSprite->cstat = CSTAT_SPRITE_INVISIBLE;
nNetStartSprite[nNetStartSprites] = pActor;
nNetStartSprites++;
}

View file

@ -389,7 +389,7 @@ void StartRegenerate(DExhumedActor* pActor)
pSprite->ang /= 5;
}
pSprite->cstat = 0x8000;
pSprite->cstat = CSTAT_SPRITE_INVISIBLE;
pSprite->xrepeat = 1;
pSprite->yrepeat = 1;
pSprite->pal = 1;

View file

@ -125,7 +125,7 @@ void BuildLava(DExhumedActor* pActor, int x, int y, int, sectortype* pSector, in
pSprite->x = x;
pSprite->y = y;
pSprite->z = pSector->floorz;
pSprite->cstat = 0x8000;
pSprite->cstat = CSTAT_SPRITE_INVISIBLE;
pSprite->xrepeat = 200;
pSprite->yrepeat = 200;
pSprite->shade = -12;
@ -448,7 +448,7 @@ void AILavaDude::Tick(RunListEvent* ev)
{
pActor->nAction = 0;
pActor->nFrame = 0;
pSprite->cstat = 0x8000;
pSprite->cstat = CSTAT_SPRITE_INVISIBLE;
}
break;
}

View file

@ -527,7 +527,7 @@ void AILion::Tick(RunListEvent* ev)
{
runlist_SubRunRec(pSprite->owner);
runlist_SubRunRec(pActor->nRun);
pSprite->cstat = 0x8000;
pSprite->cstat = CSTAT_SPRITE_INVISIBLE;
}
return;
}

View file

@ -840,7 +840,7 @@ void CreatePushBlock(sectortype* pSector)
pSprite->x = xAvg;
pSprite->y = yAvg;
pSprite->z = pSector->floorz - 256;
pSprite->cstat = 0x8000;
pSprite->cstat = CSTAT_SPRITE_INVISIBLE;
int var_28 = 0;
@ -1338,7 +1338,7 @@ DExhumedActor* GrabBody()
pActor = insertActor(0, 899);
pSprite = &pActor->s();
nBodySprite[nCurBodyNum] = pActor;
pSprite->cstat = 0x8000;
pSprite->cstat = CSTAT_SPRITE_INVISIBLE;
}
else
pSprite = &pActor->s();
@ -1467,7 +1467,7 @@ void AICreatureChunk::Tick(RunListEvent* ev)
if (nVal.exbits & kHitAux2)
{
pSprite->cstat = 0x8000;
pSprite->cstat = CSTAT_SPRITE_INVISIBLE;
}
else
{

View file

@ -396,7 +396,7 @@ DExhumedActor* BuildWallSprite(sectortype* pSector)
pSprite->pos.vec2 = wal->center();
pSprite->z = (pSector->floorz + pSector->ceilingz) / 2;
pSprite->cstat = 0x8000;
pSprite->cstat = CSTAT_SPRITE_INVISIBLE;
return pActor;
}
@ -464,7 +464,7 @@ DExhumedActor* FindWallSprites(sectortype* pSector)
pSprite->x = (var_24 + esi) / 2;
pSprite->y = (ecx + edi) / 2;
pSprite->z = pSector->floorz;
pSprite->cstat = 0x8000;
pSprite->cstat = CSTAT_SPRITE_INVISIBLE;
pSprite->owner = -1;
pSprite->lotag = 0;
pSprite->hitag = 0;
@ -1027,7 +1027,7 @@ int BuildSlide(int nChannel, walltype* pStartWall, walltype* pWall1, walltype* p
auto pSprite = &pActor->s();
SlideData[nSlide].pActor = pActor;
pSprite->cstat = 0x8000;
pSprite->cstat = CSTAT_SPRITE_INVISIBLE;
pSprite->x = pStartWall->x;
pSprite->y = pStartWall->y;
pSprite->z = pSector->floorz;
@ -1213,7 +1213,7 @@ int BuildTrap(DExhumedActor* pActor, int edx, int ebx, int ecx)
ChangeActorStat(pActor, 0);
pSprite->cstat = 0x8000;
pSprite->cstat = CSTAT_SPRITE_INVISIBLE;
pSprite->xvel = 0;
pSprite->yvel = 0;
pSprite->zvel = 0;
@ -1610,7 +1610,7 @@ DExhumedActor* BuildEnergyBlock(sectortype* pSector)
}
spr->xrepeat = nRepeat;
spr->cstat = 0x8000;
spr->cstat = CSTAT_SPRITE_INVISIBLE;
spr->xvel = 0;
spr->yvel = 0;
spr->zvel = 0;
@ -1854,7 +1854,7 @@ DExhumedActor* BuildObject(DExhumedActor* pActor, int nOjectType, int nHitag)
pActor->pTarget = pActor2;
pActor->nIndex2 = -1;
pSprite2->cstat = 0x8000;
pSprite2->cstat = CSTAT_SPRITE_INVISIBLE;
pSprite2->x = spr->x;
pSprite2->y = spr->y;
pSprite2->z = spr->z;
@ -1886,7 +1886,7 @@ void ExplodeScreen(DExhumedActor* pActor)
BuildSpark(pActor, 0); // shoot out blue orbs
}
pSprite->cstat = 0x8000;
pSprite->cstat = CSTAT_SPRITE_INVISIBLE;
PlayFX2(StaticSound[kSound78], pActor);
}
@ -2573,7 +2573,7 @@ void PostProcess()
{
wal.pal = 1;
auto pActor = insertActor(&sect, 407);
pActor->s().cstat = 0x8000;
pActor->s().cstat = CSTAT_SPRITE_INVISIBLE;
}
}
}

View file

@ -1423,7 +1423,7 @@ sectdone:
if (var_70 == 55)
{
pSpriteB->cstat = 0x8000;
pSpriteB->cstat = CSTAT_SPRITE_INVISIBLE;
DestroyItemAnim(pActorB);
// loc_1BA74: - repeated block, see in default case
@ -1812,7 +1812,7 @@ sectdone:
goto do_default;
}
pSpriteB->cstat = 0x8000;
pSpriteB->cstat = CSTAT_SPRITE_INVISIBLE;
DestroyItemAnim(pActorB);
////
// loc_1BA74: - repeated block, see in default case
@ -1874,7 +1874,7 @@ sectdone:
goto do_default;
}
pSpriteB->cstat = 0x8000;
pSpriteB->cstat = CSTAT_SPRITE_INVISIBLE;
DestroyItemAnim(pActorB);
////
// loc_1BA74: - repeated block, see in default case
@ -1936,7 +1936,7 @@ sectdone:
goto do_default;
}
pSpriteB->cstat = 0x8000;
pSpriteB->cstat = CSTAT_SPRITE_INVISIBLE;
DestroyItemAnim(pActorB);
////
// loc_1BA74: - repeated block, see in default case
@ -1998,7 +1998,7 @@ sectdone:
goto do_default;
}
pSpriteB->cstat = 0x8000;
pSpriteB->cstat = CSTAT_SPRITE_INVISIBLE;
DestroyItemAnim(pActorB);
////
// loc_1BA74: - repeated block, see in default case
@ -2060,7 +2060,7 @@ sectdone:
goto do_default;
}
pSpriteB->cstat = 0x8000;
pSpriteB->cstat = CSTAT_SPRITE_INVISIBLE;
DestroyItemAnim(pActorB);
////
// loc_1BA74: - repeated block, see in default case
@ -2122,7 +2122,7 @@ sectdone:
goto do_default;
}
pSpriteB->cstat = 0x8000;
pSpriteB->cstat = CSTAT_SPRITE_INVISIBLE;
DestroyItemAnim(pActorB);
////
// loc_1BA74: - repeated block, see in default case
@ -2619,7 +2619,7 @@ sectdone:
}
else
{
pDopple->s().cstat = 0x8000;
pDopple->s().cstat = CSTAT_SPRITE_INVISIBLE;
}
MoveWeapons(nPlayer);

View file

@ -998,7 +998,7 @@ void AIQueenHead::Tick(RunListEvent* ev)
pSprite->xrepeat = 127 - QueenHead.nIndex2;
pSprite->yrepeat = 127 - QueenHead.nIndex2;
pSprite->cstat = 0x8000;
pSprite->cstat = CSTAT_SPRITE_INVISIBLE;
// DEMO-TODO: in disassembly angle was used without masking and thus causing OOB issue.
// This behavior probably would be needed emulated for demo compatibility

View file

@ -92,7 +92,7 @@ void BuildRa(int nPlayer)
auto pActor = insertActor(pPlayerSprite->sector(), 203);
auto pSprite = &pActor->s();
pSprite->cstat = 0x8000;
pSprite->cstat = CSTAT_SPRITE_INVISIBLE;
pSprite->xvel = 0;
pSprite->yvel = 0;
pSprite->zvel = 0;
@ -164,7 +164,7 @@ void MoveRaToEnemy(int nPlayer)
return;
}
pSprite->cstat = 0x8000;
pSprite->cstat = CSTAT_SPRITE_INVISIBLE;
pTarget = PlayerList[nPlayer].Actor();
}
auto pTargSprite = &pTarget->s();
@ -213,7 +213,7 @@ void AIRa::Tick(RunListEvent* ev)
if (!Ra[nPlayer].nState || Ra[nPlayer].pTarget == nullptr)
{
pSprite->cstat = 0x8000;
pSprite->cstat = CSTAT_SPRITE_INVISIBLE;
}
else
{

View file

@ -364,7 +364,7 @@ void AIRat::Tick(RunListEvent* ev)
runlist_FreeRun(pSprite->lotag - 1);
runlist_SubRunRec(pActor->nRun);
pSprite->cstat = 0x8000;
pSprite->cstat = CSTAT_SPRITE_INVISIBLE;
DeleteActor(pActor);
}
return;

View file

@ -104,7 +104,7 @@ void BuildSoul(DExhumedActor* pSet)
auto pActor = insertActor(pSetSprite->sector(), 0);
auto pSprite = &pActor->s();
pSprite->cstat = 0x8000;
pSprite->cstat = CSTAT_SPRITE_INVISIBLE;
pSprite->shade = -127;
pSprite->xrepeat = 1;
pSprite->yrepeat = 1;

View file

@ -240,7 +240,7 @@ void AISpider::Tick(RunListEvent* ev)
runlist_DoSubRunRec(sp->owner);
runlist_FreeRun(sp->lotag - 1);
runlist_SubRunRec(spp->nRun);
sp->cstat = 0x8000;
sp->cstat = CSTAT_SPRITE_INVISIBLE;
DeleteActor(spp);
}
return;