mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 17:01:51 +00:00
- most wall flags in Blood.
This commit is contained in:
parent
1883aad7c2
commit
d24b8d9ec8
3 changed files with 36 additions and 36 deletions
|
@ -470,15 +470,15 @@ int VectorScan(DBloodActor *actor, int nOffset, int nZOffset, int dx, int dy, in
|
|||
return 0;
|
||||
return 2;
|
||||
}
|
||||
if (!(pWall->cstat & 0x30))
|
||||
if (!(pWall->cstat & (CSTAT_WALL_MASKED | CSTAT_WALL_1WAY)))
|
||||
return 0;
|
||||
int nOffset;
|
||||
if (pWall->cstat & 4)
|
||||
if (pWall->cstat & CSTAT_WALL_ALIGN_BOTTOM)
|
||||
nOffset = ClipHigh(pSector->floorz, pSectorNext->floorz);
|
||||
else
|
||||
nOffset = ClipLow(pSector->ceilingz, pSectorNext->ceilingz);
|
||||
nOffset = (gHitInfo.hitpos.z - nOffset) >> 8;
|
||||
if (pWall->cstat & 256)
|
||||
if (pWall->cstat & CSTAT_WALL_YFLIP)
|
||||
nOffset = -nOffset;
|
||||
|
||||
int nPicnum = pWall->overpicnum;
|
||||
|
@ -491,7 +491,7 @@ int VectorScan(DBloodActor *actor, int nOffset, int nZOffset, int dx, int dy, in
|
|||
nOffset += int((nSizY*pWall->ypan_) / 256);
|
||||
int nLength = approxDist(pWall->x - pWall->point2Wall()->x, pWall->y - pWall->point2Wall()->y);
|
||||
int nHOffset;
|
||||
if (pWall->cstat & 8)
|
||||
if (pWall->cstat & CSTAT_WALL_XFLIP)
|
||||
nHOffset = approxDist(gHitInfo.hitpos.x - pWall->point2Wall()->x, gHitInfo.hitpos.y - pWall->point2Wall()->y);
|
||||
else
|
||||
nHOffset = approxDist(gHitInfo.hitpos.x - pWall->x, gHitInfo.hitpos.y - pWall->y);
|
||||
|
@ -505,10 +505,10 @@ int VectorScan(DBloodActor *actor, int nOffset, int nZOffset, int dx, int dy, in
|
|||
|
||||
if (pData[nPixel] == TRANSPARENT_INDEX)
|
||||
{
|
||||
int bakCstat = pWall->cstat;
|
||||
pWall->cstat &= ~64;
|
||||
int bakCstat2 = pWall->nextWall()->cstat;
|
||||
pWall->nextWall()->cstat &= ~64;
|
||||
auto bakCstat = pWall->cstat;
|
||||
pWall->cstat &= ~CSTAT_WALL_BLOCK_HITSCAN;
|
||||
auto bakCstat2 = pWall->nextWall()->cstat;
|
||||
pWall->nextWall()->cstat &= ~CSTAT_WALL_BLOCK_HITSCAN;
|
||||
gHitInfo.clearObj();
|
||||
pos = gHitInfo.hitpos;
|
||||
hitscan(pos, pWall->nextSector(), { dx, dy, dz << 4 }, gHitInfo, CLIPMASK1);
|
||||
|
|
|
@ -62,7 +62,7 @@ void InitMirrors(void)
|
|||
|
||||
mirror[mirrorcnt].wallnum = i;
|
||||
mirror[mirrorcnt].type = 0;
|
||||
pWalli->cstat |= 32;
|
||||
pWalli->cstat |= CSTAT_WALL_1WAY;
|
||||
int tmp = pWalli->xw().data;
|
||||
int j;
|
||||
for (j = numwalls - 1; j >= 0; j--)
|
||||
|
@ -99,7 +99,7 @@ void InitMirrors(void)
|
|||
mirror[mirrorcnt].wallnum = i;
|
||||
pWalli->picnum = nTile;
|
||||
mirror[mirrorcnt].type = 0;
|
||||
pWalli->cstat |= 32;
|
||||
pWalli->cstat |= CSTAT_WALL_1WAY;
|
||||
pWalli->portalflags = PORTAL_WALL_MIRROR;
|
||||
mirrorcnt++;
|
||||
continue;
|
||||
|
|
|
@ -161,21 +161,21 @@ void UpdateWall(walltype* pWall, SEQFRAME* pFrame)
|
|||
if (pFrame->palette)
|
||||
pWall->pal = pFrame->palette;
|
||||
if (pFrame->transparent)
|
||||
pWall->cstat |= 128;
|
||||
pWall->cstat |= CSTAT_WALL_TRANSLUCENT;
|
||||
else
|
||||
pWall->cstat &= ~128;
|
||||
pWall->cstat &= ~CSTAT_WALL_TRANSLUCENT;
|
||||
if (pFrame->transparent2)
|
||||
pWall->cstat |= 512;
|
||||
pWall->cstat |= CSTAT_WALL_TRANS_FLIP;
|
||||
else
|
||||
pWall->cstat &= ~512;
|
||||
pWall->cstat &= ~CSTAT_WALL_TRANS_FLIP;
|
||||
if (pFrame->blockable)
|
||||
pWall->cstat |= 1;
|
||||
pWall->cstat |= CSTAT_WALL_BLOCK;
|
||||
else
|
||||
pWall->cstat &= ~1;
|
||||
pWall->cstat &= ~CSTAT_WALL_BLOCK;
|
||||
if (pFrame->hittable)
|
||||
pWall->cstat |= 64;
|
||||
pWall->cstat |= CSTAT_WALL_BLOCK_HITSCAN;
|
||||
else
|
||||
pWall->cstat &= ~64;
|
||||
pWall->cstat &= ~CSTAT_WALL_BLOCK_HITSCAN;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
@ -193,43 +193,43 @@ void UpdateMasked(walltype* pWall, SEQFRAME* pFrame)
|
|||
pWall->pal = pWallNext->pal = pFrame->palette;
|
||||
if (pFrame->transparent)
|
||||
{
|
||||
pWall->cstat |= 128;
|
||||
pWallNext->cstat |= 128;
|
||||
pWall->cstat |= CSTAT_WALL_TRANSLUCENT;
|
||||
pWallNext->cstat |= CSTAT_WALL_TRANSLUCENT;
|
||||
}
|
||||
else
|
||||
{
|
||||
pWall->cstat &= ~128;
|
||||
pWallNext->cstat &= ~128;
|
||||
pWall->cstat &= ~CSTAT_WALL_TRANSLUCENT;
|
||||
pWallNext->cstat &= ~CSTAT_WALL_TRANSLUCENT;
|
||||
}
|
||||
if (pFrame->transparent2)
|
||||
{
|
||||
pWall->cstat |= 512;
|
||||
pWallNext->cstat |= 512;
|
||||
pWall->cstat |= CSTAT_WALL_TRANS_FLIP;
|
||||
pWallNext->cstat |= CSTAT_WALL_TRANS_FLIP;
|
||||
}
|
||||
else
|
||||
{
|
||||
pWall->cstat &= ~512;
|
||||
pWallNext->cstat &= ~512;
|
||||
pWall->cstat &= ~CSTAT_WALL_TRANS_FLIP;
|
||||
pWallNext->cstat &= ~CSTAT_WALL_TRANS_FLIP;
|
||||
}
|
||||
if (pFrame->blockable)
|
||||
{
|
||||
pWall->cstat |= 1;
|
||||
pWallNext->cstat |= 1;
|
||||
pWall->cstat |= CSTAT_WALL_BLOCK;
|
||||
pWallNext->cstat |= CSTAT_WALL_BLOCK;
|
||||
}
|
||||
else
|
||||
{
|
||||
pWall->cstat &= ~1;
|
||||
pWallNext->cstat &= ~1;
|
||||
pWall->cstat &= ~CSTAT_WALL_BLOCK;
|
||||
pWallNext->cstat &= ~CSTAT_WALL_BLOCK;
|
||||
}
|
||||
if (pFrame->hittable)
|
||||
{
|
||||
pWall->cstat |= 64;
|
||||
pWallNext->cstat |= 64;
|
||||
pWall->cstat |= CSTAT_WALL_BLOCK_HITSCAN;
|
||||
pWallNext->cstat |= CSTAT_WALL_BLOCK_HITSCAN;
|
||||
}
|
||||
else
|
||||
{
|
||||
pWall->cstat &= ~64;
|
||||
pWallNext->cstat &= ~64;
|
||||
pWall->cstat &= ~CSTAT_WALL_BLOCK_HITSCAN;
|
||||
pWallNext->cstat &= ~CSTAT_WALL_BLOCK_HITSCAN;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -715,9 +715,9 @@ void seqProcess(int nTicks)
|
|||
{
|
||||
assert(target.isWall());
|
||||
auto pWall = target.wall();
|
||||
pWall->cstat &= ~(8 + 16 + 32);
|
||||
pWall->cstat &= ~(CSTAT_WALL_XFLIP | CSTAT_WALL_MASKED | CSTAT_WALL_1WAY);
|
||||
if (pWall->twoSided())
|
||||
pWall->nextWall()->cstat &= ~(8 + 16 + 32);
|
||||
pWall->nextWall()->cstat &= ~(CSTAT_WALL_XFLIP | CSTAT_WALL_MASKED | CSTAT_WALL_1WAY);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue