mirror of
https://github.com/ZDoom/Raze.git
synced 2025-03-13 20:42:11 +00:00
- use setceilingtexture where textures are simply copied around
This commit is contained in:
parent
ee8b685fe2
commit
5b8dd84361
7 changed files with 11 additions and 10 deletions
|
@ -49,6 +49,7 @@
|
|||
#include "interpolate.h"
|
||||
#include "tiletexture.h"
|
||||
#include "games/blood/src/mapstructs.h"
|
||||
#include "buildtiles.h"
|
||||
|
||||
extern BitArray clipsectormap;
|
||||
|
||||
|
@ -104,7 +105,7 @@ static void ReadSectorV7(FileReader& fr, sectortype& sect)
|
|||
sect.setzfrommap(c, f);
|
||||
sect.ceilingstat = ESectorFlags::FromInt(fr.ReadUInt16());
|
||||
sect.floorstat = ESectorFlags::FromInt(fr.ReadUInt16());
|
||||
sect.ceilingpicnum = fr.ReadUInt16();
|
||||
sect.setceilingtexture(tileGetTextureID(fr.ReadUInt16()));
|
||||
sect.ceilingheinum = fr.ReadInt16();
|
||||
sect.ceilingshade = fr.ReadInt8();
|
||||
sect.ceilingpal = fr.ReadUInt8();
|
||||
|
@ -128,7 +129,7 @@ static void ReadSectorV6(FileReader& fr, sectortype& sect)
|
|||
int wallptr = fr.ReadInt16();
|
||||
int wallnum = fr.ReadInt16();
|
||||
sect.walls.Set(&wall[wallptr], wallnum);
|
||||
sect.ceilingpicnum = fr.ReadUInt16();
|
||||
sect.setceilingtexture(tileGetTextureID(fr.ReadUInt16()));
|
||||
sect.floorpicnum = fr.ReadUInt16();
|
||||
sect.ceilingheinum = clamp(fr.ReadInt16() << 5, -32768, 32767);
|
||||
sect.floorheinum = clamp(fr.ReadInt16() << 5, -32768, 32767);
|
||||
|
@ -157,7 +158,7 @@ static void ReadSectorV5(FileReader& fr, sectortype& sect)
|
|||
int wallptr = fr.ReadInt16();
|
||||
int wallnum = fr.ReadInt16();
|
||||
sect.walls.Set(&wall[wallptr], wallnum);
|
||||
sect.ceilingpicnum = fr.ReadUInt16();
|
||||
sect.setceilingtexture(tileGetTextureID(fr.ReadUInt16()));
|
||||
sect.floorpicnum = fr.ReadUInt16();
|
||||
sect.ceilingheinum = clamp(fr.ReadInt16() << 5, -32768, 32767);
|
||||
sect.floorheinum = clamp(fr.ReadInt16() << 5, -32768, 32767);
|
||||
|
|
|
@ -379,7 +379,7 @@ bool SectionGeometry::ValidateSection(Section* section, int plane)
|
|||
else
|
||||
{
|
||||
if (sec->ceilingheinum == compare->ceilingheinum &&
|
||||
sec->ceilingpicnum == compare->ceilingpicnum &&
|
||||
sec->ceilingtexture() == compare->ceilingtexture &&
|
||||
((sec->ceilingstat ^ compare->ceilingstat) & (CSTAT_SECTOR_ALIGN | CSTAT_SECTOR_YFLIP | CSTAT_SECTOR_XFLIP | CSTAT_SECTOR_TEXHALF | CSTAT_SECTOR_SWAPXY)) == 0 &&
|
||||
sec->ceilingxpan_ == compare->ceilingxpan_ &&
|
||||
sec->ceilingypan_ == compare->ceilingypan_ &&
|
||||
|
|
|
@ -32,7 +32,7 @@ struct sectortypelight
|
|||
|
||||
ESectorFlags ceilingstat;
|
||||
ESectorFlags floorstat;
|
||||
int16_t ceilingpicnum;
|
||||
FTextureID ceilingtexture;
|
||||
int16_t ceilingheinum;
|
||||
int16_t floorpicnum;
|
||||
int16_t floorheinum;
|
||||
|
@ -47,7 +47,7 @@ struct sectortypelight
|
|||
floorstat = sec->floorstat;
|
||||
ceilingheinum = sec->ceilingheinum;
|
||||
floorheinum = sec->floorheinum;
|
||||
ceilingpicnum = sec->ceilingpicnum;
|
||||
ceilingtexture = sec->ceilingtexture();
|
||||
floorpicnum = sec->floorpicnum;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1807,7 +1807,7 @@ void handle_se13(DDukeActor* actor)
|
|||
|
||||
if (ps[0].one_parallax_sectnum != nullptr)
|
||||
{
|
||||
sc->ceilingpicnum = ps[0].one_parallax_sectnum->ceilingpicnum;
|
||||
sc->setceilingtexture(ps[0].one_parallax_sectnum->ceilingtexture());
|
||||
sc->ceilingshade = ps[0].one_parallax_sectnum->ceilingshade;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1879,7 +1879,7 @@ void destroyit(DDukeActor *actor)
|
|||
destsect->setceilingz(srcsect->ceilingz);
|
||||
destsect->ceilingstat = srcsect->ceilingstat;
|
||||
destsect->floorstat = srcsect->floorstat;
|
||||
destsect->ceilingpicnum = srcsect->ceilingpicnum;
|
||||
destsect->setceilingtexture(srcsect->ceilingtexture());
|
||||
destsect->ceilingheinum = srcsect->ceilingheinum;
|
||||
destsect->ceilingshade = srcsect->ceilingshade;
|
||||
destsect->ceilingpal = srcsect->ceilingpal;
|
||||
|
|
|
@ -538,7 +538,7 @@ void spawneffector(DDukeActor* actor, TArray<DDukeActor*>* actors)
|
|||
auto nsec = wl.nextSector();
|
||||
if (!(nsec->ceilingstat & CSTAT_SECTOR_SKY))
|
||||
{
|
||||
sectp->ceilingpicnum = nsec->ceilingpicnum;
|
||||
sectp->setceilingtexture(nsec->ceilingtexture());
|
||||
sectp->ceilingshade = nsec->ceilingshade;
|
||||
break; //Leave early
|
||||
}
|
||||
|
|
|
@ -228,7 +228,7 @@ void CopySectorMatch(int match)
|
|||
dsectp->ceilingshade = ssectp->ceilingshade;
|
||||
|
||||
dsectp->floorpicnum = ssectp->floorpicnum;
|
||||
dsectp->ceilingpicnum = ssectp->ceilingpicnum;
|
||||
dsectp->setceilingtexture(ssectp->ceilingtexture());
|
||||
|
||||
dsectp->floorheinum = ssectp->floorheinum;
|
||||
dsectp->ceilingheinum = ssectp->ceilingheinum;
|
||||
|
|
Loading…
Reference in a new issue