- renamed walltype::picnum to wallpicnum for easier searching.

This commit is contained in:
Christoph Oelckers 2022-12-05 20:42:12 +01:00
parent 51ad64f71e
commit ede5b017ab
40 changed files with 150 additions and 142 deletions

View file

@ -429,7 +429,7 @@ static void drawwhitelines(const DVector2& cpos, const DVector2& cangvect, const
for (auto& wal : sector[i].walls)
{
if (wal.nextwall >= 0) continue;
if (!gFullMap && !tileGetTexture(wal.picnum)->isValid()) continue;
if (!gFullMap && !tileGetTexture(wal.wallpicnum)->isValid()) continue;
if (isSWALL() && !gFullMap && !show2dwall[wallindex(&wal)])
continue;

View file

@ -190,7 +190,7 @@ static void ReadWallV7(FileReader& fr, walltype& wall)
wall.nextwall = fr.ReadInt16();
wall.nextsector = fr.ReadInt16();
wall.cstat = EWallFlags::FromInt(fr.ReadUInt16());
wall.picnum = fr.ReadInt16();
wall.wallpicnum = fr.ReadInt16();
wall.overpicnum = fr.ReadInt16();
wall.shade = fr.ReadInt8();
wall.pal = fr.ReadUInt8();
@ -211,7 +211,7 @@ static void ReadWallV6(FileReader& fr, walltype& wall)
wall.point2 = fr.ReadInt16();
wall.nextsector = fr.ReadInt16();
wall.nextwall = fr.ReadInt16();
wall.picnum = fr.ReadInt16();
wall.wallpicnum = fr.ReadInt16();
wall.overpicnum = fr.ReadInt16();
wall.shade = fr.ReadInt8();
wall.pal = fr.ReadUInt8();
@ -231,7 +231,7 @@ static void ReadWallV5(FileReader& fr, walltype& wall)
int y = fr.ReadInt32();
wall.setPosFromMap(x, y);
wall.point2 = fr.ReadInt16();
wall.picnum = fr.ReadInt16();
wall.wallpicnum = fr.ReadInt16();
wall.overpicnum = fr.ReadInt16();
wall.shade = fr.ReadInt8();
wall.cstat = EWallFlags::FromInt(fr.ReadUInt16());

View file

@ -242,7 +242,7 @@ struct walltype
float ypan_;
EWallFlags cstat;
int16_t picnum;
int16_t wallpicnum;
int16_t overpicnum;
union { int16_t lotag, type; }; // type is for Blood
int16_t hitag;
@ -293,6 +293,9 @@ struct walltype
Blood::XWALL& xw() const { return *_xw; }
bool hasX() const { return _xw != nullptr; }
void allocX();
FTextureID walltexture() const;
FTextureID overtexture() const;
};
// enable for running a compile-check to ensure that renderer-critical variables are not being written to directly.
@ -437,6 +440,9 @@ struct sectortype
int getfloorslope() const { return floorstat & CSTAT_SECTOR_SLOPE ? floorheinum : 0; }
int getceilingslope() const { return ceilingstat & CSTAT_SECTOR_SLOPE ? ceilingheinum : 0; }
FTextureID ceilingtexture() const;
FTextureID floortexture() const;
Blood::XSECTOR& xs() const { return *_xs; }
bool hasX() const { return _xs != nullptr; } // 0 is invalid!
@ -490,6 +496,8 @@ struct spritetypebase
{
pos = { x * maptoworld, y * maptoworld, z * zmaptoworld };
}
FTextureID spritetexture() const;
};

View file

@ -388,7 +388,7 @@ int checkTranslucentReplacement(FTextureID picnum, int pal);
inline bool maskWallHasTranslucency(const walltype* wall)
{
return (wall->cstat & CSTAT_WALL_TRANSLUCENT) || checkTranslucentReplacement(tileGetTexture(wall->picnum)->GetID(), wall->pal);
return (wall->cstat & CSTAT_WALL_TRANSLUCENT) || checkTranslucentReplacement(tileGetTexture(wall->wallpicnum)->GetID(), wall->pal);
}
inline bool spriteHasTranslucency(const tspritetype* tspr)

View file

@ -1010,7 +1010,7 @@ void HWWall::Process(HWDrawInfo* di, walltype* wal, sectortype* frontsector, sec
// normal texture
int tilenum = ((wal->cstat & CSTAT_WALL_1WAY) && wal->nextwall != -1) ? wal->overpicnum : wal->picnum;
int tilenum = ((wal->cstat & CSTAT_WALL_1WAY) && wal->nextwall != -1) ? wal->overpicnum : wal->wallpicnum;
gotpic.Set(tilenum);
tileUpdatePicnum(&tilenum);
texture = tileGetTexture(tilenum);
@ -1048,7 +1048,7 @@ void HWWall::Process(HWDrawInfo* di, walltype* wal, sectortype* frontsector, sec
if (bch1a < fch1 || bch2a < fch2)
{
int tilenum = wal->picnum;
int tilenum = wal->wallpicnum;
gotpic.Set(tilenum);
tileUpdatePicnum(&tilenum);
texture = tileGetTexture(tilenum);
@ -1087,7 +1087,7 @@ void HWWall::Process(HWDrawInfo* di, walltype* wal, sectortype* frontsector, sec
if (bfh1 > ffh1 || bfh2 > ffh2)
{
auto w = (wal->cstat & CSTAT_WALL_BOTTOM_SWAP) ? backwall : wal;
int tilenum = w->picnum;
int tilenum = w->wallpicnum;
gotpic.Set(tilenum);
tileUpdatePicnum(&tilenum);
texture = tileGetTexture(tilenum);

View file

@ -563,7 +563,7 @@ FSerializer &Serialize(FSerializer &arc, const char *key, walltype &c, walltype
("nextwall", c.nextwall, def->nextwall)
("nextsector", c.nextsector, def->nextsector)
("cstat", c.cstat, def->cstat)
("picnum", c.picnum, def->picnum)
("picnum", c.wallpicnum, def->wallpicnum)
("overpicnum", c.overpicnum, def->overpicnum)
("shade", c.shade, def->shade)
("pal", c.pal, def->pal)

View file

@ -721,7 +721,7 @@ void wall_settexturename(walltype* sec, int place, int intname)
{
if (!sec) ThrowAbortException(X_READ_NIL, nullptr);
int tilenum = TileFiles.tileForName(FName(ENamedName(intname)).GetChars());
(place ? sec->overpicnum : sec->picnum) = tilenum;
(place ? sec->overpicnum : sec->wallpicnum) = tilenum;
}
DEFINE_ACTION_FUNCTION_NATIVE(_walltype, settexturename, wall_settexturename)
{
@ -736,7 +736,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(_walltype, settexturename, wall_settexturename)
void wall_settexture(walltype* sec, int place, int tilenum)
{
if (!sec) ThrowAbortException(X_READ_NIL, nullptr);
(place ? sec->overpicnum : sec->picnum) = tilenum;
(place ? sec->overpicnum : sec->wallpicnum) = tilenum;
}
DEFINE_ACTION_FUNCTION_NATIVE(_walltype, settexture, wall_settexture)
{

View file

@ -6644,11 +6644,11 @@ void actFireVector(DBloodActor* shooter, double offset, double zoffset, DVector3
case 0:
{
auto pWall = gHitInfo.hitWall;
nSurf = surfType[pWall->picnum];
nSurf = surfType[pWall->wallpicnum];
if (actCanSplatWall(pWall))
{
auto ppos = gHitInfo.hitpos - dv;
int nnSurf = surfType[pWall->picnum];
int nnSurf = surfType[pWall->wallpicnum];
assert(nnSurf < kSurfMax);
if (pVectorData->surfHit[nnSurf].fx1 >= 0)
{
@ -6741,7 +6741,7 @@ void actFireVector(DBloodActor* shooter, double offset, double zoffset, DVector3
if (actCanSplatWall(pWall))
{
auto ppos = gHitInfo.hitpos - dv;
int nnSurf = surfType[pWall->picnum];
int nnSurf = surfType[pWall->wallpicnum];
const VECTORDATA* pVectorData1 = &gVectorData[19];
FX_ID t2 = pVectorData1->surfHit[nnSurf].fx2;
FX_ID t3 = pVectorData1->surfHit[nnSurf].fx3;

View file

@ -402,7 +402,7 @@ void dbLoadMap(const char* pPath, DVector3& pos, short* pAngle, sectortype** cur
pWall->nextwall = LittleShort(load.nextwall);
pWall->nextsector = LittleShort(load.nextsector);
pWall->cstat = EWallFlags::FromInt(LittleShort(load.cstat));
pWall->picnum = EWallFlags::FromInt(LittleShort(load.picnum));
pWall->wallpicnum = EWallFlags::FromInt(LittleShort(load.picnum));
pWall->overpicnum = LittleShort(load.overpicnum);
pWall->type = LittleShort(load.type);
pWall->hitag = LittleShort(load.hitag);

View file

@ -88,7 +88,7 @@ void InitMirrors(void)
}
continue;
}
if (pWalli->picnum == 504)
if (pWalli->wallpicnum == 504)
{
mirror[mirrorcnt].link = i;
mirror[mirrorcnt].mynum = i;

View file

@ -3945,8 +3945,8 @@ bool condCheckMixed(DBloodActor* aCond, const EVENT& event, int cmpOp, bool PUSH
walltype* pObj = eob.wall();
switch (cond)
{
case 24: return condCmp(surfType[pObj->picnum], arg1, arg2, cmpOp);
case 25: return condCmp(pObj->picnum, arg1, arg2, cmpOp);
case 24: return condCmp(surfType[pObj->wallpicnum], arg1, arg2, cmpOp);
case 25: return condCmp(pObj->wallpicnum, arg1, arg2, cmpOp);
case 26: return condCmp(pObj->pal, arg1, arg2, cmpOp);
case 27: return condCmp(pObj->shade, arg1, arg2, cmpOp);
case 28: return (arg3) ? condCmp((pObj->cstat & EWallFlags::FromInt(arg3)), arg1, arg2, cmpOp) : (pObj->cstat & EWallFlags::FromInt(arg1));
@ -7212,7 +7212,7 @@ void usePictureChanger(DBloodActor* sourceactor, int objType, sectortype* targSe
break;
case OBJ_WALL:
if (valueIsBetween(sourceactor->xspr.data1, -1, 32767))
targWall->picnum = sourceactor->xspr.data1;
targWall->wallpicnum = sourceactor->xspr.data1;
if (valueIsBetween(sourceactor->xspr.data2, -1, 32767))
targWall->overpicnum = sourceactor->xspr.data2;

View file

@ -267,7 +267,7 @@ void PreloadCache()
}
for (auto& wal : wall)
{
tilePrecacheTile(wal.picnum, 0, wal.pal);
tilePrecacheTile(wal.wallpicnum, 0, wal.pal);
if (wal.overpicnum >= 0)
tilePrecacheTile(wal.overpicnum, 0, wal.pal);
}

View file

@ -320,7 +320,7 @@ void DoSectorPanning(void)
psx = MulScale(psx, pXWall->busy, 16);
psy = MulScale(psy, pXWall->busy, 16);
}
int nTile = pWall->picnum;
int nTile = pWall->wallpicnum;
int px = (psx << 2) / tileWidth(nTile);
int py = (psy << 2) / tileHeight(nTile);

View file

@ -157,7 +157,7 @@ void UpdateFloor(sectortype* pSector, SEQFRAME* pFrame)
void UpdateWall(walltype* pWall, SEQFRAME* pFrame)
{
assert(pWall->hasX());
pWall->picnum = seqGetTile(pFrame);
pWall->wallpicnum = seqGetTile(pFrame);
if (pFrame->palette)
pWall->pal = pFrame->palette;
if (pFrame->transparent)

View file

@ -127,7 +127,7 @@ int tileGetSurfType(CollisionBase& hit)
case kHitSector:
return surfType[hit.hitSector->floorpicnum];
case kHitWall:
return surfType[hit.hitWall->picnum];
return surfType[hit.hitWall->wallpicnum];
case kHitSprite:
return surfType[hit.hitActor->spr.picnum];
}

View file

@ -1860,7 +1860,7 @@ void destroyit(DDukeActor *actor)
auto srcwal = srcsect->walls.Data();
for (unsigned i = 0; i < destsect->walls.Size(); i++, srcwal++, destwal++)
{
destwal->picnum = srcwal->picnum;
destwal->wallpicnum = srcwal->wallpicnum;
destwal->overpicnum = srcwal->overpicnum;
destwal->shade = srcwal->shade;
destwal->xrepeat = srcwal->xrepeat;

View file

@ -558,7 +558,7 @@ CCMD(changewalltexture)
hitscan(ps[0].actor->spr.pos, ps[0].cursector, DVector3(ps[0].actor->spr.Angles.Yaw.ToVector(), 0) * 1024, hit, CLIPMASK1);
if (hit.hitWall)
{
hit.hitWall->picnum = tile;
hit.hitWall->wallpicnum = tile;
}
}

View file

@ -972,8 +972,8 @@ void DoWall(bool bSet, int lVar1, int lLabelID, int lVar2, DDukeActor* sActor, i
else SetGameVarID(lVar2, wallp->cstat, sActor, sPlayer);
break;
case WALL_PICNUM:
if (bSet) wallp->picnum = lValue;
else SetGameVarID(lVar2, wallp->picnum, sActor, sPlayer);
if (bSet) wallp->wallpicnum = lValue;
else SetGameVarID(lVar2, wallp->wallpicnum, sActor, sPlayer);
break;
case WALL_OVERPICNUM:
if (bSet) wallp->overpicnum = lValue;

View file

@ -281,7 +281,7 @@ static void shootknee(DDukeActor* actor, int p, DVector3 pos, DAngle ang)
if (hit.hitpos.Z >= hit.hitWall->nextSector()->floorz)
hit.hitWall =hit.hitWall->nextWall();
if (hit.hitWall->picnum != DTILE_ACCESSSWITCH && hit.hitWall->picnum != DTILE_ACCESSSWITCH2)
if (hit.hitWall->wallpicnum != DTILE_ACCESSSWITCH && hit.hitWall->wallpicnum != DTILE_ACCESSSWITCH2)
{
checkhitwall(knee, hit.hitWall, hit.hitpos);
if (p >= 0) fi.checkhitswitch(p, hit.hitWall, nullptr);
@ -458,19 +458,19 @@ static void shootweapon(DDukeActor *actor, int p, DVector3 pos, DAngle ang, int
{
spawn(spark, DTILE_SMALLSMOKE);
if (isadoorwall(hit.hitWall->picnum) == 1)
if (isadoorwall(hit.hitWall->wallpicnum) == 1)
goto SKIPBULLETHOLE;
if (isablockdoor(hit.hitWall->picnum) == 1)
if (isablockdoor(hit.hitWall->wallpicnum) == 1)
goto SKIPBULLETHOLE;
if (p >= 0 && (
hit.hitWall->picnum == DTILE_DIPSWITCH ||
hit.hitWall->picnum == DTILE_DIPSWITCHON ||
hit.hitWall->picnum == DTILE_DIPSWITCH2 ||
hit.hitWall->picnum == DTILE_DIPSWITCH2ON ||
hit.hitWall->picnum == DTILE_DIPSWITCH3 ||
hit.hitWall->picnum == DTILE_DIPSWITCH3ON ||
hit.hitWall->picnum == DTILE_HANDSWITCH ||
hit.hitWall->picnum == DTILE_HANDSWITCHON))
hit.hitWall->wallpicnum == DTILE_DIPSWITCH ||
hit.hitWall->wallpicnum == DTILE_DIPSWITCHON ||
hit.hitWall->wallpicnum == DTILE_DIPSWITCH2 ||
hit.hitWall->wallpicnum == DTILE_DIPSWITCH2ON ||
hit.hitWall->wallpicnum == DTILE_DIPSWITCH3 ||
hit.hitWall->wallpicnum == DTILE_DIPSWITCH3ON ||
hit.hitWall->wallpicnum == DTILE_HANDSWITCH ||
hit.hitWall->wallpicnum == DTILE_HANDSWITCHON))
{
fi.checkhitswitch(p, hit.hitWall, nullptr);
return;
@ -952,7 +952,7 @@ static void shootgrowspark(DDukeActor* actor, int p, DVector3 pos, DAngle ang)
else if (hit.actor() != nullptr) fi.checkhitsprite(hit.actor(), spark);
else if (hit.hitWall != nullptr)
{
if (hit.hitWall->picnum != DTILE_ACCESSSWITCH && hit.hitWall->picnum != DTILE_ACCESSSWITCH2)
if (hit.hitWall->wallpicnum != DTILE_ACCESSSWITCH && hit.hitWall->wallpicnum != DTILE_ACCESSSWITCH2)
{
checkhitwall(spark, hit.hitWall, hit.hitpos);
}

View file

@ -172,7 +172,7 @@ static void shootmelee(DDukeActor *actor, int p, DVector3 pos, DAngle ang, int a
if (hit.hitpos.Z >= hit.hitWall->nextSector()->floorz)
hit.hitWall = hit.hitWall->nextWall();
if (hit.hitWall->picnum != RTILE_ACCESSSWITCH && hit.hitWall->picnum != RTILE_ACCESSSWITCH2)
if (hit.hitWall->wallpicnum != RTILE_ACCESSSWITCH && hit.hitWall->wallpicnum != RTILE_ACCESSSWITCH2)
{
checkhitwall(wpn, hit.hitWall, hit.hitpos);
if (p >= 0) fi.checkhitswitch(p, hit.hitWall, nullptr);
@ -352,20 +352,20 @@ static void shootweapon(DDukeActor* actor, int p, DVector3 pos, DAngle ang, int
{
spawn(spark, RTILE_SMALLSMOKE);
if (isadoorwall(hit.hitWall->picnum) == 1)
if (isadoorwall(hit.hitWall->wallpicnum) == 1)
goto SKIPBULLETHOLE;
if (isablockdoor(hit.hitWall->picnum) == 1)
if (isablockdoor(hit.hitWall->wallpicnum) == 1)
goto SKIPBULLETHOLE;
if (p >= 0 && (
hit.hitWall->picnum == RTILE_DIPSWITCH ||
hit.hitWall->picnum == RTILE_DIPSWITCHON ||
hit.hitWall->picnum == RTILE_DIPSWITCH2 ||
hit.hitWall->picnum == RTILE_DIPSWITCH2ON ||
hit.hitWall->picnum == RTILE_DIPSWITCH3 ||
hit.hitWall->picnum == RTILE_DIPSWITCH3ON ||
(isRRRA() && hit.hitWall->picnum == RTILE_RRTILE8660) ||
hit.hitWall->picnum == RTILE_HANDSWITCH ||
hit.hitWall->picnum == RTILE_HANDSWITCHON))
hit.hitWall->wallpicnum == RTILE_DIPSWITCH ||
hit.hitWall->wallpicnum == RTILE_DIPSWITCHON ||
hit.hitWall->wallpicnum == RTILE_DIPSWITCH2 ||
hit.hitWall->wallpicnum == RTILE_DIPSWITCH2ON ||
hit.hitWall->wallpicnum == RTILE_DIPSWITCH3 ||
hit.hitWall->wallpicnum == RTILE_DIPSWITCH3ON ||
(isRRRA() && hit.hitWall->wallpicnum == RTILE_RRTILE8660) ||
hit.hitWall->wallpicnum == RTILE_HANDSWITCH ||
hit.hitWall->wallpicnum == RTILE_HANDSWITCHON))
{
fi.checkhitswitch(p, hit.hitWall, nullptr);
return;

View file

@ -1082,7 +1082,7 @@ void enterlevel(MapRecord *mi, int gamemode)
{
for (auto& wal : wall)
{
if (wal.picnum == 7873 || wal.picnum == 7870)
if (wal.wallpicnum == 7873 || wal.wallpicnum == 7870)
StartInterpolation(&wal, Interp_Wall_PanX);
}
}

View file

@ -231,7 +231,7 @@ void cacheit_d(void)
for (auto& wal : wall)
{
tloadtile(wal.picnum, wal.pal);
tloadtile(wal.wallpicnum, wal.pal);
if (wal.overpicnum >= 0)
tloadtile(wal.overpicnum, wal.pal);
}
@ -397,7 +397,7 @@ void prelevel_d(int g, TArray<DDukeActor*>& actors)
wal.extra = -1;
switch (wal.picnum)
switch (wal.wallpicnum)
{
case DTILE_W_TECHWALL1:
case DTILE_W_TECHWALL2:
@ -421,11 +421,11 @@ void prelevel_d(int g, TArray<DDukeActor*>& actors)
case DTILE_FEMPIC2:
case DTILE_FEMPIC3:
wal.extra = wal.picnum;
wal.extra = wal.wallpicnum;
animwall[numanimwalls].tag = -1;
animwall[numanimwalls].wall = &wal;
animwall[numanimwalls].tag = wal.picnum;
animwall[numanimwalls].tag = wal.wallpicnum;
numanimwalls++;
break;
@ -448,7 +448,7 @@ void prelevel_d(int g, TArray<DDukeActor*>& actors)
case DTILE_SCREENBREAK19:
animwall[numanimwalls].wall = &wal;
animwall[numanimwalls].tag = wal.picnum;
animwall[numanimwalls].tag = wal.wallpicnum;
numanimwalls++;
break;
}
@ -459,7 +459,7 @@ void prelevel_d(int g, TArray<DDukeActor*>& actors)
{
for (auto& wal : mirrorsector[i]->walls)
{
wal.picnum = DTILE_MIRROR;
wal.wallpicnum = DTILE_MIRROR;
wal.overpicnum = DTILE_MIRROR;
}
}

View file

@ -371,7 +371,7 @@ void cacheit_r(void)
for (auto& wal : wall)
{
tloadtile(wal.picnum, wal.pal);
tloadtile(wal.wallpicnum, wal.pal);
if(wal.overpicnum >= 0)
tloadtile(wal.overpicnum, wal.pal);
}
@ -691,7 +691,7 @@ void prelevel_r(int g, TArray<DDukeActor*>& actors)
wal->extra = -1;
switch (wal->picnum)
switch (wal->wallpicnum)
{
case RTILE_SCREENBREAK6:
case RTILE_SCREENBREAK7:
@ -710,7 +710,7 @@ void prelevel_r(int g, TArray<DDukeActor*>& actors)
{
for (auto& mwal : mirrorsector[i]->walls)
{
mwal.picnum = RTILE_MIRROR;
mwal.wallpicnum = RTILE_MIRROR;
mwal.overpicnum = RTILE_MIRROR;
}
}

View file

@ -1306,10 +1306,10 @@ void checkhitwall(DDukeActor* spr, walltype* wal, const DVector3& pos)
}
}
auto data = breakWallMap.CheckKey(wal->picnum);
auto data = breakWallMap.CheckKey(wal->wallpicnum);
if (data && !(data->flags & 1))
{
handler(data, &wal->picnum);
handler(data, &wal->wallpicnum);
}
}

View file

@ -56,7 +56,7 @@ void animatewalls_d(void)
for (int p = 0; p < numanimwalls; p++)
{
auto wal = animwall[p].wall;
int j = wal->picnum;
int j = wal->wallpicnum;
switch (j)
{
@ -80,8 +80,8 @@ void animatewalls_d(void)
if ((krand() & 255) < 16)
{
animwall[p].tag = wal->picnum;
wal->picnum = DTILE_SCREENBREAK6;
animwall[p].tag = wal->wallpicnum;
wal->wallpicnum = DTILE_SCREENBREAK6;
}
continue;
@ -91,12 +91,12 @@ void animatewalls_d(void)
case DTILE_SCREENBREAK8:
if (animwall[p].tag >= 0 && wal->extra != DTILE_FEMPIC2 && wal->extra != DTILE_FEMPIC3)
wal->picnum = animwall[p].tag;
wal->wallpicnum = animwall[p].tag;
else
{
wal->picnum++;
if (wal->picnum == (DTILE_SCREENBREAK6 + 3))
wal->picnum = DTILE_SCREENBREAK6;
wal->wallpicnum++;
if (wal->wallpicnum == (DTILE_SCREENBREAK6 + 3))
wal->wallpicnum = DTILE_SCREENBREAK6;
}
continue;
@ -185,7 +185,7 @@ bool checkhitswitch_d(int snum, walltype* wwal, DDukeActor *act)
if (lotag == 0) return 0;
hitag = wwal->hitag;
spos = wwal->pos;
picnum = wwal->picnum;
picnum = wwal->wallpicnum;
switchpal = wwal->pal;
}
@ -336,19 +336,19 @@ bool checkhitswitch_d(int snum, walltype* wwal, DDukeActor *act)
for (auto& wal : wall)
{
if (lotag == wal.lotag)
switch (wal.picnum)
switch (wal.wallpicnum)
{
case DTILE_DIPSWITCH:
case DTILE_TECHSWITCH:
case DTILE_ALIENSWITCH:
if (!act && &wal == wwal) wal.picnum++;
if (!act && &wal == wwal) wal.wallpicnum++;
else if (wal.hitag == 0) correctdips++;
numdips++;
break;
case DTILE_DIPSWITCHON:
case DTILE_TECHSWITCHON:
case DTILE_ALIENSWITCHON:
if (!act && &wal == wwal) wal.picnum--;
if (!act && &wal == wwal) wal.wallpicnum--;
else if (wal.hitag == 1) correctdips++;
numdips++;
break;
@ -356,9 +356,9 @@ bool checkhitswitch_d(int snum, walltype* wwal, DDukeActor *act)
case DTILE_MULTISWITCH_2:
case DTILE_MULTISWITCH_3:
case DTILE_MULTISWITCH_4:
wal.picnum++;
if (wal.picnum > (DTILE_MULTISWITCH_4))
wal.picnum = DTILE_MULTISWITCH;
wal.wallpicnum++;
if (wal.wallpicnum > (DTILE_MULTISWITCH_4))
wal.wallpicnum = DTILE_MULTISWITCH;
break;
case DTILE_ACCESSSWITCH:
case DTILE_ACCESSSWITCH2:
@ -374,7 +374,7 @@ bool checkhitswitch_d(int snum, walltype* wwal, DDukeActor *act)
case DTILE_HANDSWITCH:
case DTILE_DIPSWITCH2:
case DTILE_DIPSWITCH3:
wal.picnum++;
wal.wallpicnum++;
break;
case DTILE_HANDSWITCHON:
case DTILE_PULLSWITCHON:
@ -388,7 +388,7 @@ bool checkhitswitch_d(int snum, walltype* wwal, DDukeActor *act)
case DTILE_SPACEDOORSWITCHON:
case DTILE_DIPSWITCH2ON:
case DTILE_DIPSWITCH3ON:
wal.picnum--;
wal.wallpicnum--;
break;
}
}
@ -907,7 +907,7 @@ void checksectors_d(int snum)
if (near.hitWall)
{
if (near.hitWall->lotag > 0 && isadoorwall(near.hitWall->picnum))
if (near.hitWall->lotag > 0 && isadoorwall(near.hitWall->wallpicnum))
{
if (hitscanwall == near.hitWall || hitscanwall == nullptr)
fi.checkhitswitch(snum, near.hitWall, nullptr);

View file

@ -50,9 +50,9 @@ void animatewalls_r(void)
{
for (auto& wal : wall)
{
if (wal.picnum == RTILE_RRTILE7873)
if (wal.wallpicnum == RTILE_RRTILE7873)
wal.addxpan(6);
else if (wal.picnum == RTILE_RRTILE7870)
else if (wal.wallpicnum == RTILE_RRTILE7870)
wal.addxpan(6);
}
}
@ -60,7 +60,7 @@ void animatewalls_r(void)
for (int p = 0; p < numanimwalls; p++)
{
auto wal = animwall[p].wall;
int j = wal->picnum;
int j = wal->wallpicnum;
switch (j)
{
@ -78,8 +78,8 @@ void animatewalls_r(void)
if ((krand() & 255) < 16)
{
animwall[p].tag = wal->picnum;
wal->picnum = RTILE_SCREENBREAK6;
animwall[p].tag = wal->wallpicnum;
wal->wallpicnum = RTILE_SCREENBREAK6;
}
continue;
@ -89,12 +89,12 @@ void animatewalls_r(void)
case RTILE_SCREENBREAK8:
if (animwall[p].tag >= 0)
wal->picnum = animwall[p].tag;
wal->wallpicnum = animwall[p].tag;
else
{
wal->picnum++;
if (wal->picnum == (RTILE_SCREENBREAK6 + 3))
wal->picnum = RTILE_SCREENBREAK6;
wal->wallpicnum++;
if (wal->wallpicnum == (RTILE_SCREENBREAK6 + 3))
wal->wallpicnum = RTILE_SCREENBREAK6;
}
continue;
@ -144,7 +144,7 @@ bool checkhitswitch_r(int snum, walltype* wwal, DDukeActor* act)
if (lotag == 0) return 0;
hitag = wwal->hitag;
pos = wwal->pos;
picnum = wwal->picnum;
picnum = wwal->wallpicnum;
switchpal = wwal->pal;
}
@ -367,19 +367,19 @@ bool checkhitswitch_r(int snum, walltype* wwal, DDukeActor* act)
for (auto& wal : wall)
{
if (lotag == wal.lotag)
switch (wal.picnum)
switch (wal.wallpicnum)
{
case RTILE_DIPSWITCH:
case RTILE_TECHSWITCH:
case RTILE_ALIENSWITCH:
if (!act && &wal == wwal) wal.picnum++;
if (!act && &wal == wwal) wal.wallpicnum++;
else if (wal.hitag == 0) correctdips++;
numdips++;
break;
case RTILE_DIPSWITCHON:
case RTILE_TECHSWITCHON:
case RTILE_ALIENSWITCHON:
if (!act && &wal == wwal) wal.picnum--;
if (!act && &wal == wwal) wal.wallpicnum--;
else if (wal.hitag == 1) correctdips++;
numdips++;
break;
@ -387,18 +387,18 @@ bool checkhitswitch_r(int snum, walltype* wwal, DDukeActor* act)
case RTILE_MULTISWITCH_2:
case RTILE_MULTISWITCH_3:
case RTILE_MULTISWITCH_4:
wal.picnum++;
if (wal.picnum > (RTILE_MULTISWITCH_4))
wal.picnum = RTILE_MULTISWITCH;
wal.wallpicnum++;
if (wal.wallpicnum > (RTILE_MULTISWITCH_4))
wal.wallpicnum = RTILE_MULTISWITCH;
break;
case RTILE_MULTISWITCH2:
case RTILE_MULTISWITCH2_2:
case RTILE_MULTISWITCH2_3:
case RTILE_MULTISWITCH2_4:
if (!isRRRA()) break;
wal.picnum++;
if (wal.picnum > (RTILE_MULTISWITCH2_4))
wal.picnum = RTILE_MULTISWITCH2;
wal.wallpicnum++;
if (wal.wallpicnum > (RTILE_MULTISWITCH2_4))
wal.wallpicnum = RTILE_MULTISWITCH2;
break;
case RTILE_RRTILE8660:
if (!isRRRA()) break;
@ -419,7 +419,7 @@ bool checkhitswitch_r(int snum, walltype* wwal, DDukeActor* act)
case RTILE_DIPSWITCH3:
case RTILE_RRTILE2697:
case RTILE_RRTILE2707:
wal.picnum++;
wal.wallpicnum++;
break;
case RTILE_HANDSWITCHON:
case RTILE_PULLSWITCHON:
@ -435,7 +435,7 @@ bool checkhitswitch_r(int snum, walltype* wwal, DDukeActor* act)
case RTILE_DIPSWITCH3ON:
case RTILE_RRTILE2697 + 1:
case RTILE_RRTILE2707 + 1:
wal.picnum--;
wal.wallpicnum--;
break;
}
}
@ -1028,7 +1028,7 @@ void checksectors_r(int snum)
if (near.hitWall)
{
if (near.hitWall->lotag > 0 && isadoorwall(near.hitWall->picnum))
if (near.hitWall->lotag > 0 && isadoorwall(near.hitWall->wallpicnum))
{
if (hitscanwall == near.hitWall || hitscanwall == nullptr)
fi.checkhitswitch(snum, near.hitWall, nullptr);

View file

@ -1301,7 +1301,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(_DukeLevel, ceilingflags, duke_ceilingflags)
int duke_wallflags(walltype* wal, int which)
{
return tileflags(which? wal->overpicnum : wal->picnum);
return tileflags(which? wal->overpicnum : wal->wallpicnum);
}
DEFINE_ACTION_FUNCTION_NATIVE(_DukeLevel, wallflags, duke_wallflags)
@ -1314,7 +1314,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(_DukeLevel, wallflags, duke_wallflags)
int duke_ismirror(walltype* wal)
{
return wal->picnum == TILE_MIRROR || wal->overpicnum == TILE_MIRROR;
return wal->wallpicnum == TILE_MIRROR || wal->overpicnum == TILE_MIRROR;
}
DEFINE_ACTION_FUNCTION_NATIVE(_DukeLevel, ismirror, duke_ismirror)

View file

@ -464,7 +464,7 @@ HITSPRITE:
else if (pHitWall != nullptr)
{
HITWALL:
if (pHitWall->picnum == kEnergy1)
if (pHitWall->wallpicnum == kEnergy1)
{
if (pHitWall->twoSided())
{

View file

@ -55,7 +55,7 @@ void precache()
for(auto& wal : wall)
{
int j = wal.picnum;
int j = wal.wallpicnum;
markTileForPrecache(j, wal.pal);
if (wal.twoSided())

View file

@ -718,7 +718,7 @@ void AddFlow(walltype* pWall, int nSpeed, int b)
// only moves up or down
StartInterpolation(pWall, Interp_Wall_PanY);
int nPic = pWall->picnum;
int nPic = pWall->wallpicnum;
sFlowInfo[nFlow].angcos = 0;
sFlowInfo[nFlow].angsin = b == 2 ? 1.f : -1.f;

View file

@ -962,7 +962,7 @@ void AIWallFace::ProcessChannel(RunListEvent* ev)
if ((si <= WallFace[nWallFace].count) && (si >= 0))
{
WallFace[nWallFace].pWall->picnum = WallFace[nWallFace].piclist[si];
WallFace[nWallFace].pWall->wallpicnum = WallFace[nWallFace].piclist[si];
}
}
@ -1256,13 +1256,13 @@ int BuildTrap(DExhumedActor* pActor, int edx, int ebx, int ecx)
if (sTrap[nTrap].pWall1 != nullptr)
{
sTrap[nTrap].pWall2 = &wal;
sTrap[nTrap].nPicnum2 = wal.picnum;
sTrap[nTrap].nPicnum2 = wal.wallpicnum;
break;
}
else
{
sTrap[nTrap].pWall1 = &wal;
sTrap[nTrap].nPicnum1 = wal.picnum;
sTrap[nTrap].nPicnum1 = wal.wallpicnum;
}
}
}
@ -1321,13 +1321,13 @@ void AITrap::Tick(RunListEvent* ev)
auto pWall = sTrap[nTrap].pWall1;
if (pWall)
{
pWall->picnum = sTrap[nTrap].nPicnum1;
pWall->wallpicnum = sTrap[nTrap].nPicnum1;
}
pWall = sTrap[nTrap].pWall1;
if (pWall)
{
pWall->picnum = sTrap[nTrap].nPicnum2;
pWall->wallpicnum = sTrap[nTrap].nPicnum2;
}
}
}
@ -1353,13 +1353,13 @@ void AITrap::Tick(RunListEvent* ev)
auto pWall = sTrap[nTrap].pWall1;
if (pWall)
{
pWall->picnum = sTrap[nTrap].nPicnum1 + 1;
pWall->wallpicnum = sTrap[nTrap].nPicnum1 + 1;
}
pWall = sTrap[nTrap].pWall2;
if (pWall)
{
pWall->picnum = sTrap[nTrap].nPicnum2;
pWall->wallpicnum = sTrap[nTrap].nPicnum2;
}
D3PlayFX(StaticSound[kSound36], pBullet);
@ -1620,7 +1620,7 @@ DExhumedActor* BuildEnergyBlock(sectortype* pSector)
{
apos += wal.pos;
wal.picnum = kClockSymbol16;
wal.wallpicnum = kClockSymbol16;
wal.pal = 0;
wal.shade = 50;
}
@ -2625,7 +2625,7 @@ void PostProcess()
for(auto& wal : sect.walls)
{
if (wal.picnum == kTile3603)
if (wal.wallpicnum == kTile3603)
{
wal.pal = 1;
auto pActor = insertActor(&sect, 407);

View file

@ -1625,7 +1625,7 @@ void runlist_ProcessWallTag(walltype* pWall, int nLotag, int nHitag)
case 1:
{
int nWallFace = BuildWallFace(nChannel, pWall, 2, pWall->picnum, pWall->picnum + 1);
int nWallFace = BuildWallFace(nChannel, pWall, 2, pWall->wallpicnum, pWall->wallpicnum + 1);
runlist_AddRunRec(sRunChannels[nChannel].a, nWallFace, 0x70000);
auto nSwitch = BuildSwPressWall(nChannel, BuildLink(2, nEffectTag, 0), pWall);
@ -1643,7 +1643,7 @@ void runlist_ProcessWallTag(walltype* pWall, int nLotag, int nHitag)
case 7: // Regular switch
{
int nWallFace = BuildWallFace(nChannel, pWall, 2, pWall->picnum, pWall->picnum + 1);
int nWallFace = BuildWallFace(nChannel, pWall, 2, pWall->wallpicnum, pWall->wallpicnum + 1);
runlist_AddRunRec(sRunChannels[nChannel].a, nWallFace, 0x70000);
auto nSwitch = BuildSwPressWall(nChannel, BuildLink(1, 1), pWall);
@ -1653,7 +1653,7 @@ void runlist_ProcessWallTag(walltype* pWall, int nLotag, int nHitag)
case 8: // Reverse switch
{
int nWallFace = BuildWallFace(nChannel, pWall, 2, pWall->picnum, pWall->picnum + 1);
int nWallFace = BuildWallFace(nChannel, pWall, 2, pWall->wallpicnum, pWall->wallpicnum + 1);
runlist_AddRunRec(sRunChannels[nChannel].a, nWallFace, 0x70000);
auto nSwitch = BuildSwPressWall(nChannel, BuildLink(2, -1, 0), pWall);

View file

@ -476,7 +476,7 @@ BREAK_INFO* SetupWallForBreak(walltype* wallp)
{
BREAK_INFO* break_info;
break_info = FindWallBreakInfo(wallp->picnum);
break_info = FindWallBreakInfo(wallp->wallpicnum);
if (break_info)
{
wallp->lotag = TAG_WALL_BREAK;
@ -586,7 +586,7 @@ int AutoBreakWall(walltype* wallp, const DVector3& hit_pos, DAngle ang, int type
if (wallp->overpicnum > 0 && (wallp->cstat & CSTAT_WALL_MASKED))
break_info = FindWallBreakInfo(wallp->overpicnum);
else
break_info = FindWallBreakInfo(wallp->picnum);
break_info = FindWallBreakInfo(wallp->wallpicnum);
if (!break_info)
{
@ -639,10 +639,10 @@ int AutoBreakWall(walltype* wallp, const DVector3& hit_pos, DAngle ang, int type
else
{
if (break_info->breaknum == -1)
wallp->picnum = 594; // temporary break pic
wallp->wallpicnum = 594; // temporary break pic
else
{
wallp->picnum = break_info->breaknum;
wallp->wallpicnum = break_info->breaknum;
if (wallp->hitag < 0)
DoWallBreakSpriteMatch(wallp->hitag);
}
@ -681,7 +681,7 @@ bool UserBreakWall(walltype* wp)
return true;
}
if (wp->picnum == SP_TAG5(actor))
if (wp->wallpicnum == SP_TAG5(actor))
return true;
// make it BROKEN
@ -692,7 +692,7 @@ bool UserBreakWall(walltype* wp)
if (SP_TAG8(actor) == 0)
{
wp->picnum = SP_TAG5(actor);
wp->wallpicnum = SP_TAG5(actor);
// clear tags
wp->hitag = wp->lotag = 0;
if (wp->twoSided())
@ -715,7 +715,7 @@ bool UserBreakWall(walltype* wp)
else if (SP_TAG8(actor) == 2)
{
// set to broken pic
wp->picnum = SP_TAG5(actor);
wp->wallpicnum = SP_TAG5(actor);
// clear flags
wp->cstat &= ~(block_flags);
@ -735,7 +735,7 @@ bool UserBreakWall(walltype* wp)
else
{
// increment picnum
wp->picnum++;
wp->wallpicnum++;
DoSpawnSpotsForDamage(match);
}

View file

@ -98,7 +98,7 @@ void precacheMap(void)
for (auto& wal : wall)
{
j = wal.picnum;
j = wal.wallpicnum;
markTileForPrecache(j, wal.pal);
if (wal.overpicnum > 0 && wal.overpicnum < MAXTILES)

View file

@ -58,7 +58,7 @@ void CopySectorWalls(sectortype* dest_sect, sectortype* src_sect)
// this looks broken.
do
{
dwall->picnum = swall->picnum;
dwall->wallpicnum = swall->wallpicnum;
dwall->xrepeat = swall->xrepeat;
dwall->yrepeat = swall->yrepeat;
@ -76,7 +76,7 @@ void CopySectorWalls(sectortype* dest_sect, sectortype* src_sect)
{
auto const dest_nextwall = dwall->nextWall();
auto const src_nextwall = swall->nextWall();
dest_nextwall->picnum = src_nextwall->picnum;
dest_nextwall->wallpicnum = src_nextwall->wallpicnum;
dest_nextwall->xrepeat = src_nextwall->xrepeat;
dest_nextwall->yrepeat = src_nextwall->yrepeat;
dest_nextwall->overpicnum = src_nextwall->overpicnum;

View file

@ -1137,7 +1137,7 @@ void UpdateWallPortalState()
continue;
}
walltype* wal = mirror[i].mirrorWall;
if (wal->picnum != MIRRORLABEL + i)
if (wal->wallpicnum != MIRRORLABEL + i)
{
wal->portalflags = 0;
continue;

View file

@ -220,7 +220,7 @@ void JS_SpriteSetup(void)
// Check for certain walls to make sounds
for(auto& wal : wall)
{
int picnum = wal.picnum;
int picnum = wal.wallpicnum;
// Set the don't stick bit for liquid tiles
switch (picnum)
@ -286,7 +286,7 @@ void JS_InitMirrors(void)
}
wal.overpicnum = MIRRORLABEL + mirrorcnt;
wal.picnum = MIRRORLABEL + mirrorcnt;
wal.wallpicnum = MIRRORLABEL + mirrorcnt;
sec->ceilingpicnum = MIRRORLABEL + mirrorcnt;
sec->floorpicnum = MIRRORLABEL + mirrorcnt;
sec->floorstat |= CSTAT_SECTOR_SKY;
@ -385,7 +385,7 @@ void JS_InitMirrors(void)
{
for (auto& wal : mirror[i].mirrorSector->walls)
{
wal.picnum = MIRROR;
wal.wallpicnum = MIRROR;
wal.overpicnum = MIRROR;
}
}

View file

@ -191,11 +191,11 @@ void WallSetup(void)
for (auto& wal : wall)
{
if (wal.picnum == FAF_PLACE_MIRROR_PIC)
wal.picnum = FAF_MIRROR_PIC;
if (wal.wallpicnum == FAF_PLACE_MIRROR_PIC)
wal.wallpicnum = FAF_MIRROR_PIC;
if (wal.picnum == FAF_PLACE_MIRROR_PIC+1)
wal.picnum = FAF_MIRROR_PIC+1;
if (wal.wallpicnum == FAF_PLACE_MIRROR_PIC+1)
wal.wallpicnum = FAF_MIRROR_PIC+1;
// this overwrites the lotag so it needs to be called LAST - its down there
// SetupWallForBreak(wp);

View file

@ -6114,7 +6114,7 @@ int StateControl(DSWActor* actor)
if ((actor->user.State->Tics & SF_WALL_STATE))
{
ASSERT(actor->user.WallP);
actor->user.WallP->picnum = actor->user.State->Pic;
actor->user.WallP->wallpicnum = actor->user.State->Pic;
}
else
{

View file

@ -128,14 +128,14 @@ int DoWallMove(DSWActor* actor)
if (shade1)
wal.shade = int8_t(shade1);
if (picnum1)
wal.picnum = picnum1;
wal.wallpicnum = picnum1;
// find the previous wall
auto prev_wall = PrevWall(&wal);
if (shade2)
prev_wall->shade = int8_t(shade2);
if (picnum2)
prev_wall->picnum = picnum2;
prev_wall->wallpicnum = picnum2;
}
}