- the remaining Exhumed flags.

This commit is contained in:
Christoph Oelckers 2021-12-18 19:08:55 +01:00
parent 988a91904a
commit 8039d81467
6 changed files with 9 additions and 9 deletions

View file

@ -176,7 +176,7 @@ void AIAnim::Tick(RunListEvent* ev)
pSpriteB->shade++;
}
if (!(pSpriteB->cstat & 101))
if (!(pSpriteB->cstat & CSTAT_SPRITE_BLOCK_ALL)) // was 101 (decimal), GDX had 0x101 which appears to be correct.
{
DestroyAnim(pActor);
return;

View file

@ -730,7 +730,7 @@ loc_flag:
auto pActor2 = cRange.actor();
auto pSprite2 = &pActor2->s();
if (pSprite2->cstat & 0x50)
if (pSprite2->cstat & (CSTAT_SPRITE_ALIGNMENT_WALL | CSTAT_SPRITE_ONE_SIDE))
{
var_28 += 2;
}

View file

@ -61,7 +61,7 @@ void DrawMap(double const smoothratio)
template<typename T> void GetSpriteExtents(T const* const pSprite, int* top, int* bottom)
{
*top = *bottom = pSprite->z;
if ((pSprite->cstat & 0x30) != 0x20)
if ((pSprite->cstat & CSTAT_SPRITE_ALIGNMENT_MASK) != CSTAT_SPRITE_ALIGNMENT_FLOOR)
{
int height = tileHeight(pSprite->picnum);
int center = height / 2 + tileTopOffset(pSprite->picnum);

View file

@ -442,7 +442,7 @@ DExhumedActor* FindWallSprites(sectortype* pSector)
auto spr = &actor->s();
if (spr->lotag == 0)
{
if ((spr->cstat & 0x50) == 80)
if ((spr->cstat & (CSTAT_SPRITE_ALIGNMENT_WALL | CSTAT_SPRITE_ONE_SIDE)) == (CSTAT_SPRITE_ALIGNMENT_WALL | CSTAT_SPRITE_ONE_SIDE))
{
int var_28 = spr->x;
int ebx = spr->y;
@ -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 | CSTAT_SPRITE_BLOCK_ALL) & 0x7FFD;
spr->cstat = (spr->cstat | CSTAT_SPRITE_BLOCK_ALL) & ~(CSTAT_SPRITE_TRANSLUCENT | CSTAT_SPRITE_INVISIBLE);
spr->xvel = 0;
spr->yvel = 0;
spr->zvel = 0;

View file

@ -1640,7 +1640,7 @@ int runlist_CheckRadialDamage(DExhumedActor* pActor)
if (nDist < nDamageRadius)
{
uint16_t nCStat = pSprite->cstat;
auto nCStat = pSprite->cstat;
pSprite->cstat = CSTAT_SPRITE_BLOCK_ALL;
if (((kStatExplodeTarget - pSprite->statnum) <= 1) ||

View file

@ -487,10 +487,10 @@ int seq_PlotArrowSequence(int nSprite, int16_t nSeq, int nVal)
nStat |= CSTAT_SPRITE_YCENTER;
if (nSeqOffset & 3) {
nStat |= 0x18;
nStat |= CSTAT_SPRITE_ALIGNMENT_WALL | CSTAT_SPRITE_YFLIP;
}
else {
nStat &= 0x0E7;
nStat &= ~(CSTAT_SPRITE_ALIGNMENT_WALL | CSTAT_SPRITE_YFLIP);
}
if (FrameFlag[nFrame] & 4) {
@ -624,7 +624,7 @@ int seq_PlotSequence(int nSprite, int16_t edx, int16_t nFrame, int16_t ecx)
edx = 1;
}
pTSprite->cstat = 0x22; // transluscence, floor sprite
pTSprite->cstat = CSTAT_SPRITE_ALIGNMENT_FLOOR | CSTAT_SPRITE_TRANSLUCENT;
pTSprite->z = nFloorZ;
pTSprite->yrepeat = (uint8_t)edx;
pTSprite->xrepeat = (uint8_t)edx;