mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 00:41:55 +00:00
- replaced all remaining read access to __int_floorz and __int_ceilingz with wrappers.
This commit is contained in:
parent
47a594a96c
commit
044929ad06
7 changed files with 17 additions and 17 deletions
|
@ -389,10 +389,10 @@ bool ShowRedLine(int j, int i)
|
|||
}
|
||||
if (automapMode == am_full)
|
||||
{
|
||||
if (sector[i].__int_floorz != sector[i].__int_ceilingz)
|
||||
if (sector[i].int_floorz() != sector[i].int_ceilingz())
|
||||
if (wal->nextSector()->int_floorz() != wal->nextSector()->int_ceilingz())
|
||||
if (((wal->cstat | wal->nextWall()->cstat) & (CSTAT_WALL_MASKED | CSTAT_WALL_1WAY)) == 0)
|
||||
if (sector[i].__int_floorz == wal->nextSector()->int_floorz())
|
||||
if (sector[i].int_floorz() == wal->nextSector()->int_floorz())
|
||||
return false;
|
||||
if (sector[i].floorpicnum != wal->nextSector()->floorpicnum)
|
||||
return false;
|
||||
|
@ -420,8 +420,8 @@ void drawredlines(int cposx, int cposy, int czoom, int cang)
|
|||
{
|
||||
if (!gFullMap && !show2dsector[i]) continue;
|
||||
|
||||
int z1 = sector[i].__int_ceilingz;
|
||||
int z2 = sector[i].__int_floorz;
|
||||
int z1 = sector[i].int_ceilingz();
|
||||
int z2 = sector[i].int_floorz();
|
||||
|
||||
for (auto& wal : wallsofsector(i))
|
||||
{
|
||||
|
|
|
@ -41,8 +41,8 @@ double Get(int index, DCoreActor* actor, int type)
|
|||
{
|
||||
switch(type)
|
||||
{
|
||||
case Interp_Sect_Floorz: return sector[index].__int_floorz;
|
||||
case Interp_Sect_Ceilingz: return sector[index].__int_ceilingz;
|
||||
case Interp_Sect_Floorz: return sector[index].int_floorz();
|
||||
case Interp_Sect_Ceilingz: return sector[index].int_ceilingz();
|
||||
case Interp_Sect_Floorheinum: return sector[index].floorheinum;
|
||||
case Interp_Sect_Ceilingheinum: return sector[index].ceilingheinum;
|
||||
case Interp_Sect_FloorPanX: return sector[index].floorxpan_;
|
||||
|
|
|
@ -107,25 +107,25 @@ DEFINE_GLOBAL(sector)
|
|||
double sector_floorz(sectortype* sect)
|
||||
{
|
||||
if (!sect) ThrowAbortException(X_READ_NIL, nullptr);
|
||||
return sect->__int_floorz * zinttoworld;
|
||||
return sect->int_floorz() * zinttoworld;
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION_NATIVE(_sectortype, floorz, sector_floorz)
|
||||
{
|
||||
PARAM_SELF_STRUCT_PROLOGUE(sectortype);
|
||||
ACTION_RETURN_FLOAT(self->__int_floorz * zinttoworld);
|
||||
ACTION_RETURN_FLOAT(sector_floorz(self));
|
||||
}
|
||||
|
||||
double sector_ceilingz(sectortype* sect)
|
||||
{
|
||||
if (!sect) ThrowAbortException(X_READ_NIL, nullptr);
|
||||
return sect->__int_ceilingz * zinttoworld;
|
||||
return sect->int_ceilingz() * zinttoworld;
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION_NATIVE(_sectortype, ceilingz, sector_ceilingz)
|
||||
{
|
||||
PARAM_SELF_STRUCT_PROLOGUE(sectortype);
|
||||
ACTION_RETURN_FLOAT(self->__int_ceilingz * zinttoworld);
|
||||
ACTION_RETURN_FLOAT(sector_ceilingz(self));
|
||||
}
|
||||
|
||||
void sector_setfloorz(sectortype* sect, double val)
|
||||
|
|
|
@ -1064,7 +1064,7 @@ void ZTranslateSector(sectortype* pSector, XSECTOR* pXSector, int a3, int a4)
|
|||
if (ac && (ac->spr.cstat & CSTAT_SPRITE_MOVE_FORWARD))
|
||||
{
|
||||
viewBackupSpriteLoc(ac);
|
||||
ac->add_int_z(pSector->__int_floorz - oldZ);
|
||||
ac->add_int_z(pSector->int_floorz() - oldZ);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1102,7 +1102,7 @@ void ZTranslateSector(sectortype* pSector, XSECTOR* pXSector, int a3, int a4)
|
|||
if (ac && (ac->spr.cstat & CSTAT_SPRITE_MOVE_REVERSE))
|
||||
{
|
||||
viewBackupSpriteLoc(ac);
|
||||
ac->add_int_z(pSector->__int_ceilingz - oldZ);
|
||||
ac->add_int_z(pSector->int_ceilingz() - oldZ);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -282,9 +282,9 @@ double getanimatevalue(int type, int index)
|
|||
switch (type)
|
||||
{
|
||||
case anim_floorz:
|
||||
return sector[index].__int_floorz;
|
||||
return sector[index].int_floorz();
|
||||
case anim_ceilingz:
|
||||
return sector[index].__int_ceilingz;
|
||||
return sector[index].int_ceilingz();
|
||||
case anim_vertexx:
|
||||
return wall[index].wall_int_pos().X;
|
||||
case anim_vertexy:
|
||||
|
|
|
@ -2113,7 +2113,7 @@ struct ANIM
|
|||
switch (animtype)
|
||||
{
|
||||
case ANIM_Floorz:
|
||||
return sector[animindex].__int_floorz;
|
||||
return sector[animindex].int_floorz();
|
||||
case ANIM_SopZ:
|
||||
return SectorObject[animindex].pmid.Z;
|
||||
case ANIM_Spritez:
|
||||
|
|
|
@ -99,9 +99,9 @@ static double getvalue(so_interp::interp_data& element)
|
|||
case soi_wally:
|
||||
return wall[index].pos.Y;
|
||||
case soi_ceil:
|
||||
return sector[index].__int_ceilingz;
|
||||
return sector[index].int_ceilingz();
|
||||
case soi_floor:
|
||||
return sector[index].__int_floorz;
|
||||
return sector[index].int_floorz();
|
||||
case soi_sox:
|
||||
return SectorObject[index].pmid.X;
|
||||
case soi_soy:
|
||||
|
|
Loading…
Reference in a new issue