mirror of
https://github.com/ZDoom/Raze.git
synced 2025-05-31 09:20:59 +00:00
- refactored most wall[] references.
What's left is in either setup code or the mirror setup.
This commit is contained in:
parent
dd1e7dd94f
commit
a7fc5d2193
4 changed files with 15 additions and 14 deletions
|
@ -401,7 +401,7 @@ static void fakeMoveDude(spritetype *pSprite)
|
||||||
case kHitSprite:
|
case kHitSprite:
|
||||||
{
|
{
|
||||||
int nHitWall = predict.at75.hit.index;
|
int nHitWall = predict.at75.hit.index;
|
||||||
walltype *pHitWall = &wall[nHitWall];
|
walltype *pHitWall = &wall [nHitWall];
|
||||||
if (pHitWall->twoSided())
|
if (pHitWall->twoSided())
|
||||||
{
|
{
|
||||||
sectortype *pHitSector = &pHitWall->nextSector();
|
sectortype *pHitSector = &pHitWall->nextSector();
|
||||||
|
|
|
@ -246,18 +246,18 @@ void PreloadCache()
|
||||||
if (!r_precache) return;
|
if (!r_precache) return;
|
||||||
int skyTile = -1;
|
int skyTile = -1;
|
||||||
// Fonts
|
// Fonts
|
||||||
for (int i = 0; i < numsectors; i++)
|
for(auto& sect : sectors())
|
||||||
{
|
{
|
||||||
tilePrecacheTile(sector[i].floorpicnum, 0, sector[i].floorpal);
|
tilePrecacheTile(sect.floorpicnum, 0, sect.floorpal);
|
||||||
tilePrecacheTile(sector[i].ceilingpicnum, 0, sector[i].ceilingpal);
|
tilePrecacheTile(sect.ceilingpicnum, 0, sect.ceilingpal);
|
||||||
if ((sector[i].ceilingstat&1) != 0 && skyTile == -1)
|
if ((sect.ceilingstat&1) != 0 && skyTile == -1)
|
||||||
skyTile = sector[i].ceilingpicnum;
|
skyTile = sect.ceilingpicnum;
|
||||||
}
|
}
|
||||||
for (int i = 0; i < numwalls; i++)
|
for(auto& wal : walls())
|
||||||
{
|
{
|
||||||
tilePrecacheTile(wall[i].picnum, 0, wall[i].pal);
|
tilePrecacheTile(wal.picnum, 0, wal.pal);
|
||||||
if (wall[i].overpicnum >= 0)
|
if (wal.overpicnum >= 0)
|
||||||
tilePrecacheTile(wall[i].overpicnum, 0, wall[i].pal);
|
tilePrecacheTile(wal.overpicnum, 0, wal.pal);
|
||||||
}
|
}
|
||||||
BloodSpriteIterator it;
|
BloodSpriteIterator it;
|
||||||
while (auto actor = it.Next())
|
while (auto actor = it.Next())
|
||||||
|
|
|
@ -82,9 +82,9 @@ int tileGetSurfType(Collision& hit)
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
case kHitSector:
|
case kHitSector:
|
||||||
return surfType[sector[hit.index].floorpicnum];
|
return surfType[hit.sector()->floorpicnum];
|
||||||
case kHitWall:
|
case kHitWall:
|
||||||
return surfType[wall[hit.index].picnum];
|
return surfType[hit.wall()->picnum];
|
||||||
case kHitSprite:
|
case kHitSprite:
|
||||||
return surfType[hit.actor->s().picnum];
|
return surfType[hit.actor->s().picnum];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1996,10 +1996,11 @@ void InitGenerator(DBloodActor*);
|
||||||
void trInit(void)
|
void trInit(void)
|
||||||
{
|
{
|
||||||
gBusyCount = 0;
|
gBusyCount = 0;
|
||||||
|
for(auto& wal : walls())
|
||||||
for (int i = 0; i < numwalls; i++)
|
for (int i = 0; i < numwalls; i++)
|
||||||
{
|
{
|
||||||
wall[i].baseWall.x = wall[i].x;
|
wal.baseWall.x = wal.x;
|
||||||
wall[i].baseWall.y = wall[i].y;
|
wal.baseWall.y = wal.y;
|
||||||
}
|
}
|
||||||
BloodLinearSpriteIterator it;
|
BloodLinearSpriteIterator it;
|
||||||
while (auto actor = it.Next())
|
while (auto actor = it.Next())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue