mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-31 04:20:42 +00:00
- Exhumed: Clean up local functions variables to prevent redefinition conflicts.
This commit is contained in:
parent
c26b5d2303
commit
95d270fbdd
12 changed files with 17 additions and 25 deletions
|
@ -148,6 +148,7 @@ void menu_DoPlasma()
|
|||
for (int y = 0; y < kPlasmaHeight - 2; y++)
|
||||
{
|
||||
uint8_t al = *r_edx;
|
||||
uint8_t cl;
|
||||
|
||||
if (al != 96)
|
||||
{
|
||||
|
@ -165,8 +166,8 @@ void menu_DoPlasma()
|
|||
}
|
||||
else
|
||||
{
|
||||
uint8_t al = *(r_edx + 1);
|
||||
uint8_t cl = *(r_edx - 1);
|
||||
al = *(r_edx + 1);
|
||||
cl = *(r_edx - 1);
|
||||
|
||||
if (al <= cl) {
|
||||
al = cl;
|
||||
|
|
|
@ -60,7 +60,7 @@ void precache()
|
|||
|
||||
if (wal.twoSided())
|
||||
{
|
||||
int j = wal.overpicnum;
|
||||
j = wal.overpicnum;
|
||||
markTileForPrecache(j, wal.pal);
|
||||
if (picanm[j].sf & PICANM_ANIMTYPE_MASK)
|
||||
for (int k = 1; k <= picanm[j].num; k++) markTileForPrecache(j + k, wal.pal);
|
||||
|
|
|
@ -342,8 +342,8 @@ void AddFlash(sectortype* pSector, int x, int y, int z, int val)
|
|||
|
||||
pSector->ceilingpal += 7;
|
||||
|
||||
int edx = pSector->ceilingshade + var_28;
|
||||
int eax = edx;
|
||||
edx = pSector->ceilingshade + var_28;
|
||||
eax = edx;
|
||||
|
||||
if (edx < -127) {
|
||||
eax = -127;
|
||||
|
@ -368,7 +368,7 @@ void AddFlash(sectortype* pSector, int x, int y, int z, int val)
|
|||
|
||||
pActor->spr.pal += 7;
|
||||
|
||||
int eax = -255;
|
||||
eax = -255;
|
||||
|
||||
if (!var_18)
|
||||
{
|
||||
|
|
|
@ -94,9 +94,6 @@ bool GameInterface::DrawAutomapPlayer(int mx, int my, int x, int y, int z, int a
|
|||
GetActorExtents(pPlayerActor, &nTop, &nBottom);
|
||||
int nScale = (pPlayerActor->spr.yrepeat + ((floorZ - nBottom) >> 8)) * z;
|
||||
nScale = clamp(nScale, 8000, 65536 << 1);
|
||||
// Players on automap
|
||||
double x = xdim / 2. + x1 / double(1 << 12);
|
||||
double y = ydim / 2. + y1 / double(1 << 12);
|
||||
// This very likely needs fixing later
|
||||
DrawTexture(twod, tileGetTexture(nTile /*+ ((PlayClock >> 4) & 3)*/, true), xx, yy, DTA_ClipLeft, windowxy1.X, DTA_ClipTop, windowxy1.Y, DTA_ScaleX, z / 1536., DTA_ScaleY, z / 1536., DTA_CenterOffset, true,
|
||||
DTA_ClipRight, windowxy2.X + 1, DTA_ClipBottom, windowxy2.Y + 1, DTA_Alpha, (pPlayerActor->spr.cstat & CSTAT_SPRITE_TRANSLUCENT ? 0.5 : 1.), TAG_DONE);
|
||||
|
|
|
@ -928,7 +928,6 @@ void MoveSector(sectortype* pSector, int nAngle, int *nXVel, int *nYVel)
|
|||
{
|
||||
pos = { x_b, y_b, nZVal };
|
||||
|
||||
Collision scratch;
|
||||
clipmove(pos, &pSectorB, nXVect, nYVect, pBlockInfo->field_8, 0, 0, CLIPMASK1, scratch);
|
||||
|
||||
int ebx = pos.X;
|
||||
|
@ -994,7 +993,6 @@ void MoveSector(sectortype* pSector, int nAngle, int *nXVel, int *nYVel)
|
|||
pos.Y = pActor->spr.pos.Y;
|
||||
pSectorB = pSector;
|
||||
|
||||
Collision scratch;
|
||||
clipmove(pos, &pSectorB, -xvect, -yvect, 4 * pActor->spr.clipdist, 0, 0, CLIPMASK0, scratch);
|
||||
|
||||
if (pSectorB) {
|
||||
|
@ -1011,7 +1009,6 @@ void MoveSector(sectortype* pSector, int nAngle, int *nXVel, int *nYVel)
|
|||
pos = pActor->spr.pos;
|
||||
pSectorB = pNextSector;
|
||||
|
||||
Collision scratch;
|
||||
clipmove(pos, &pSectorB,
|
||||
-xvect - (bcos(nAngle) * (4 * pActor->spr.clipdist)),
|
||||
-yvect - (bsin(nAngle) * (4 * pActor->spr.clipdist)),
|
||||
|
@ -1058,7 +1055,6 @@ void MoveSector(sectortype* pSector, int nAngle, int *nXVel, int *nYVel)
|
|||
if (pActor->spr.statnum >= 99 && nZVal == pActor->spr.pos.Z && !(pActor->spr.cstat & CSTAT_SPRITE_INVISIBLE))
|
||||
{
|
||||
pSectorB = pSector;
|
||||
Collision scratch;
|
||||
clipmove(pActor->spr.pos, &pSectorB, xvect, yvect, 4 * pActor->spr.clipdist, 5120, -5120, CLIPMASK0, scratch);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -169,7 +169,7 @@ public:
|
|||
|
||||
if (nPixels)
|
||||
{
|
||||
int nRead = (int)fp.Read(pFrame, nPixels);
|
||||
nRead = (int)fp.Read(pFrame, nPixels);
|
||||
pFrame += nRead;
|
||||
nSize -= nRead;
|
||||
}
|
||||
|
|
|
@ -174,7 +174,7 @@ void AIMummy::Tick(RunListEvent* ev)
|
|||
|
||||
if (pTarget == nullptr)
|
||||
{
|
||||
auto pTarget = FindPlayer(pActor, 100);
|
||||
pTarget = FindPlayer(pActor, 100);
|
||||
if (pTarget != nullptr)
|
||||
{
|
||||
D3PlayFX(StaticSound[kSound7], pActor);
|
||||
|
|
|
@ -642,8 +642,8 @@ void MoveSectorSprites(sectortype* pSector, int z)
|
|||
ExhumedSectIterator it(pSector);
|
||||
while (auto pActor = it.Next())
|
||||
{
|
||||
int z = pActor->spr.pos.Z;
|
||||
if ((pActor->spr.statnum != 200 && z >= minz && z <= maxz) || pActor->spr.statnum >= 900)
|
||||
int actz = pActor->spr.pos.Z;
|
||||
if ((pActor->spr.statnum != 200 && actz >= minz && actz <= maxz) || pActor->spr.statnum >= 900)
|
||||
{
|
||||
pActor->spr.pos.Z = newz;
|
||||
}
|
||||
|
|
|
@ -765,9 +765,7 @@ void AIPlayer::Tick(RunListEvent* ev)
|
|||
sPlayerInput[nPlayer].nItem = -1;
|
||||
}
|
||||
|
||||
int var_EC = PlayerList[nPlayer].nSeqSize;
|
||||
|
||||
pPlayerActor->spr.picnum = seq_GetSeqPicnum(PlayerList[nPlayer].nSeq, PlayerSeq[nHeightTemplate[nAction]].a, var_EC);
|
||||
pPlayerActor->spr.picnum = seq_GetSeqPicnum(PlayerList[nPlayer].nSeq, PlayerSeq[nHeightTemplate[nAction]].a, PlayerList[nPlayer].nSeqSize);
|
||||
pDopple->spr.picnum = pPlayerActor->spr.picnum;
|
||||
|
||||
if (PlayerList[nPlayer].nTorch > 0)
|
||||
|
|
|
@ -226,7 +226,7 @@ void AIRoach::Tick(RunListEvent* ev)
|
|||
|
||||
if (((pActor->nPhase & 0xF) == (totalmoves & 0xF)) && pTarget == nullptr)
|
||||
{
|
||||
auto pTarget = FindPlayer(pActor, 50);
|
||||
pTarget = FindPlayer(pActor, 50);
|
||||
if (pTarget)
|
||||
{
|
||||
pActor->nAction = 2;
|
||||
|
@ -244,7 +244,7 @@ void AIRoach::Tick(RunListEvent* ev)
|
|||
// partly the same as case 0.
|
||||
if (((pActor->nPhase & 0xF) == (totalmoves & 0xF)) && pTarget == nullptr)
|
||||
{
|
||||
auto pTarget = FindPlayer(pActor, 100);
|
||||
pTarget = FindPlayer(pActor, 100);
|
||||
if (pTarget)
|
||||
{
|
||||
pActor->nAction = 2;
|
||||
|
|
|
@ -619,7 +619,7 @@ int seq_PlotSequence(int nSprite, int16_t edx, int16_t nFrame, int16_t ecx)
|
|||
{
|
||||
pTSprite->picnum = nShadowPic;
|
||||
|
||||
int edx = ((tileWidth(nPict) << 5) / nShadowWidth) - ((nFloorZ - pTSprite->pos.Z) >> 10);
|
||||
edx = ((tileWidth(nPict) << 5) / nShadowWidth) - ((nFloorZ - pTSprite->pos.Z) >> 10);
|
||||
if (edx < 1) {
|
||||
edx = 1;
|
||||
}
|
||||
|
|
|
@ -105,8 +105,8 @@ static void analyzesprites(tspritetype* tsprite, int& spritesortcnt, int x, int
|
|||
|
||||
if (pTSprite->sector() != nullptr)
|
||||
{
|
||||
sectortype *pSector = pTSprite->sector();
|
||||
int nSectShade = (pSector->ceilingstat & CSTAT_SECTOR_SKY) ? pSector->ceilingshade : pSector->floorshade;
|
||||
sectortype *pTSector = pTSprite->sector();
|
||||
int nSectShade = (pTSector->ceilingstat & CSTAT_SECTOR_SKY) ? pTSector->ceilingshade : pTSector->floorshade;
|
||||
int nShade = pTSprite->shade + nSectShade + 6;
|
||||
pTSprite->shade = clamp(nShade, -128, 127);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue