From ede5b017ab8df42692e1d195bade4079a29f5687 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 5 Dec 2022 20:42:12 +0100 Subject: [PATCH] - renamed walltype::picnum to wallpicnum for easier searching. --- source/core/automap.cpp | 2 +- source/core/maploader.cpp | 6 +-- source/core/maptypes.h | 10 ++++- source/core/rendering/scene/hw_drawstructs.h | 2 +- source/core/rendering/scene/hw_walls.cpp | 6 +-- source/core/savegamehelp.cpp | 2 +- source/core/vmexports.cpp | 4 +- source/games/blood/src/actor.cpp | 6 +-- source/games/blood/src/db.cpp | 2 +- source/games/blood/src/mirrors.cpp | 2 +- source/games/blood/src/nnexts.cpp | 6 +-- source/games/blood/src/preload.cpp | 2 +- source/games/blood/src/sectorfx.cpp | 2 +- source/games/blood/src/seq.cpp | 2 +- source/games/blood/src/tile.cpp | 2 +- source/games/duke/src/actors_r.cpp | 2 +- source/games/duke/src/game.cpp | 2 +- source/games/duke/src/gameexec.cpp | 4 +- source/games/duke/src/player_d.cpp | 24 +++++------ source/games/duke/src/player_r.cpp | 24 +++++------ source/games/duke/src/premap.cpp | 2 +- source/games/duke/src/premap_d.cpp | 12 +++--- source/games/duke/src/premap_r.cpp | 6 +-- source/games/duke/src/sectors.cpp | 4 +- source/games/duke/src/sectors_d.cpp | 34 +++++++-------- source/games/duke/src/sectors_r.cpp | 44 ++++++++++---------- source/games/duke/src/vmexports.cpp | 4 +- source/games/exhumed/src/bullet.cpp | 2 +- source/games/exhumed/src/enginesubs.cpp | 2 +- source/games/exhumed/src/lighting.cpp | 2 +- source/games/exhumed/src/object.cpp | 18 ++++---- source/games/exhumed/src/runlist.cpp | 6 +-- source/games/sw/src/break.cpp | 16 +++---- source/games/sw/src/cache.cpp | 2 +- source/games/sw/src/copysect.cpp | 4 +- source/games/sw/src/draw.cpp | 2 +- source/games/sw/src/jsector.cpp | 6 +-- source/games/sw/src/sector.cpp | 8 ++-- source/games/sw/src/sprite.cpp | 2 +- source/games/sw/src/wallmove.cpp | 4 +- 40 files changed, 150 insertions(+), 142 deletions(-) diff --git a/source/core/automap.cpp b/source/core/automap.cpp index 0b7c4912a..1b78e0d5d 100644 --- a/source/core/automap.cpp +++ b/source/core/automap.cpp @@ -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; diff --git a/source/core/maploader.cpp b/source/core/maploader.cpp index bf3b7ad2a..04f8f2cb6 100644 --- a/source/core/maploader.cpp +++ b/source/core/maploader.cpp @@ -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()); diff --git a/source/core/maptypes.h b/source/core/maptypes.h index 08a6144db..a443fe787 100644 --- a/source/core/maptypes.h +++ b/source/core/maptypes.h @@ -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; }; diff --git a/source/core/rendering/scene/hw_drawstructs.h b/source/core/rendering/scene/hw_drawstructs.h index 293eb8d2a..b85da7ddb 100644 --- a/source/core/rendering/scene/hw_drawstructs.h +++ b/source/core/rendering/scene/hw_drawstructs.h @@ -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) diff --git a/source/core/rendering/scene/hw_walls.cpp b/source/core/rendering/scene/hw_walls.cpp index 3a230f85a..a6ff0625d 100644 --- a/source/core/rendering/scene/hw_walls.cpp +++ b/source/core/rendering/scene/hw_walls.cpp @@ -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); diff --git a/source/core/savegamehelp.cpp b/source/core/savegamehelp.cpp index 9416f9e9d..05810619d 100644 --- a/source/core/savegamehelp.cpp +++ b/source/core/savegamehelp.cpp @@ -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) diff --git a/source/core/vmexports.cpp b/source/core/vmexports.cpp index 61366ddbf..25bfec557 100644 --- a/source/core/vmexports.cpp +++ b/source/core/vmexports.cpp @@ -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) { diff --git a/source/games/blood/src/actor.cpp b/source/games/blood/src/actor.cpp index c5c9643a9..7e592a9c6 100644 --- a/source/games/blood/src/actor.cpp +++ b/source/games/blood/src/actor.cpp @@ -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; diff --git a/source/games/blood/src/db.cpp b/source/games/blood/src/db.cpp index 18f1d88b4..ec3c63531 100644 --- a/source/games/blood/src/db.cpp +++ b/source/games/blood/src/db.cpp @@ -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); diff --git a/source/games/blood/src/mirrors.cpp b/source/games/blood/src/mirrors.cpp index 022e8c7dd..44ec7667d 100644 --- a/source/games/blood/src/mirrors.cpp +++ b/source/games/blood/src/mirrors.cpp @@ -88,7 +88,7 @@ void InitMirrors(void) } continue; } - if (pWalli->picnum == 504) + if (pWalli->wallpicnum == 504) { mirror[mirrorcnt].link = i; mirror[mirrorcnt].mynum = i; diff --git a/source/games/blood/src/nnexts.cpp b/source/games/blood/src/nnexts.cpp index 843427238..266f9e6db 100644 --- a/source/games/blood/src/nnexts.cpp +++ b/source/games/blood/src/nnexts.cpp @@ -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; diff --git a/source/games/blood/src/preload.cpp b/source/games/blood/src/preload.cpp index ca83998ed..8d84200b6 100644 --- a/source/games/blood/src/preload.cpp +++ b/source/games/blood/src/preload.cpp @@ -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); } diff --git a/source/games/blood/src/sectorfx.cpp b/source/games/blood/src/sectorfx.cpp index 3bba9f272..193116303 100644 --- a/source/games/blood/src/sectorfx.cpp +++ b/source/games/blood/src/sectorfx.cpp @@ -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); diff --git a/source/games/blood/src/seq.cpp b/source/games/blood/src/seq.cpp index 5cdc66a6d..5a82c85f5 100644 --- a/source/games/blood/src/seq.cpp +++ b/source/games/blood/src/seq.cpp @@ -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) diff --git a/source/games/blood/src/tile.cpp b/source/games/blood/src/tile.cpp index a98fd9382..1f7ec5640 100644 --- a/source/games/blood/src/tile.cpp +++ b/source/games/blood/src/tile.cpp @@ -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]; } diff --git a/source/games/duke/src/actors_r.cpp b/source/games/duke/src/actors_r.cpp index 0e09f4c70..4bea43634 100644 --- a/source/games/duke/src/actors_r.cpp +++ b/source/games/duke/src/actors_r.cpp @@ -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; diff --git a/source/games/duke/src/game.cpp b/source/games/duke/src/game.cpp index 5d2b18345..2b696d532 100644 --- a/source/games/duke/src/game.cpp +++ b/source/games/duke/src/game.cpp @@ -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; } } diff --git a/source/games/duke/src/gameexec.cpp b/source/games/duke/src/gameexec.cpp index 24f61bbc0..83d074048 100644 --- a/source/games/duke/src/gameexec.cpp +++ b/source/games/duke/src/gameexec.cpp @@ -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; diff --git a/source/games/duke/src/player_d.cpp b/source/games/duke/src/player_d.cpp index 94a48cd52..5b0ce030c 100644 --- a/source/games/duke/src/player_d.cpp +++ b/source/games/duke/src/player_d.cpp @@ -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); } diff --git a/source/games/duke/src/player_r.cpp b/source/games/duke/src/player_r.cpp index 245fc85c8..7dfc8ac54 100644 --- a/source/games/duke/src/player_r.cpp +++ b/source/games/duke/src/player_r.cpp @@ -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; diff --git a/source/games/duke/src/premap.cpp b/source/games/duke/src/premap.cpp index 0edffbf80..dbb0cfd76 100644 --- a/source/games/duke/src/premap.cpp +++ b/source/games/duke/src/premap.cpp @@ -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); } } diff --git a/source/games/duke/src/premap_d.cpp b/source/games/duke/src/premap_d.cpp index 355f936b0..2c63b5b4d 100644 --- a/source/games/duke/src/premap_d.cpp +++ b/source/games/duke/src/premap_d.cpp @@ -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& 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& 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& 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& actors) { for (auto& wal : mirrorsector[i]->walls) { - wal.picnum = DTILE_MIRROR; + wal.wallpicnum = DTILE_MIRROR; wal.overpicnum = DTILE_MIRROR; } } diff --git a/source/games/duke/src/premap_r.cpp b/source/games/duke/src/premap_r.cpp index 6523bb09c..c14e9f204 100644 --- a/source/games/duke/src/premap_r.cpp +++ b/source/games/duke/src/premap_r.cpp @@ -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& 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& actors) { for (auto& mwal : mirrorsector[i]->walls) { - mwal.picnum = RTILE_MIRROR; + mwal.wallpicnum = RTILE_MIRROR; mwal.overpicnum = RTILE_MIRROR; } } diff --git a/source/games/duke/src/sectors.cpp b/source/games/duke/src/sectors.cpp index 202fe8e93..deea8958f 100644 --- a/source/games/duke/src/sectors.cpp +++ b/source/games/duke/src/sectors.cpp @@ -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); } } diff --git a/source/games/duke/src/sectors_d.cpp b/source/games/duke/src/sectors_d.cpp index f4b4ac701..b105a3a0e 100644 --- a/source/games/duke/src/sectors_d.cpp +++ b/source/games/duke/src/sectors_d.cpp @@ -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); diff --git a/source/games/duke/src/sectors_r.cpp b/source/games/duke/src/sectors_r.cpp index 126e337de..3c20b55f1 100644 --- a/source/games/duke/src/sectors_r.cpp +++ b/source/games/duke/src/sectors_r.cpp @@ -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); diff --git a/source/games/duke/src/vmexports.cpp b/source/games/duke/src/vmexports.cpp index ab1674d0e..fe1e69a15 100644 --- a/source/games/duke/src/vmexports.cpp +++ b/source/games/duke/src/vmexports.cpp @@ -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) diff --git a/source/games/exhumed/src/bullet.cpp b/source/games/exhumed/src/bullet.cpp index ad6b6ca23..6652f1081 100644 --- a/source/games/exhumed/src/bullet.cpp +++ b/source/games/exhumed/src/bullet.cpp @@ -464,7 +464,7 @@ HITSPRITE: else if (pHitWall != nullptr) { HITWALL: - if (pHitWall->picnum == kEnergy1) + if (pHitWall->wallpicnum == kEnergy1) { if (pHitWall->twoSided()) { diff --git a/source/games/exhumed/src/enginesubs.cpp b/source/games/exhumed/src/enginesubs.cpp index 5ef1c3c82..04b970040 100644 --- a/source/games/exhumed/src/enginesubs.cpp +++ b/source/games/exhumed/src/enginesubs.cpp @@ -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()) diff --git a/source/games/exhumed/src/lighting.cpp b/source/games/exhumed/src/lighting.cpp index 473a0263a..c2bfe6e13 100644 --- a/source/games/exhumed/src/lighting.cpp +++ b/source/games/exhumed/src/lighting.cpp @@ -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; diff --git a/source/games/exhumed/src/object.cpp b/source/games/exhumed/src/object.cpp index 5a69e965b..ea0860fa6 100644 --- a/source/games/exhumed/src/object.cpp +++ b/source/games/exhumed/src/object.cpp @@ -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(§, 407); diff --git a/source/games/exhumed/src/runlist.cpp b/source/games/exhumed/src/runlist.cpp index ef3ae6cf6..4c7dba2b5 100644 --- a/source/games/exhumed/src/runlist.cpp +++ b/source/games/exhumed/src/runlist.cpp @@ -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); diff --git a/source/games/sw/src/break.cpp b/source/games/sw/src/break.cpp index cde04b300..ee757b93d 100644 --- a/source/games/sw/src/break.cpp +++ b/source/games/sw/src/break.cpp @@ -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); } diff --git a/source/games/sw/src/cache.cpp b/source/games/sw/src/cache.cpp index 197878230..489de671b 100644 --- a/source/games/sw/src/cache.cpp +++ b/source/games/sw/src/cache.cpp @@ -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) diff --git a/source/games/sw/src/copysect.cpp b/source/games/sw/src/copysect.cpp index 3e5409eb1..f0cebb8ef 100644 --- a/source/games/sw/src/copysect.cpp +++ b/source/games/sw/src/copysect.cpp @@ -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; diff --git a/source/games/sw/src/draw.cpp b/source/games/sw/src/draw.cpp index e8e832b62..cac6cc5c3 100644 --- a/source/games/sw/src/draw.cpp +++ b/source/games/sw/src/draw.cpp @@ -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; diff --git a/source/games/sw/src/jsector.cpp b/source/games/sw/src/jsector.cpp index 12826dd9a..024427d6c 100644 --- a/source/games/sw/src/jsector.cpp +++ b/source/games/sw/src/jsector.cpp @@ -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; } } diff --git a/source/games/sw/src/sector.cpp b/source/games/sw/src/sector.cpp index 830c53a02..0b3e37f13 100644 --- a/source/games/sw/src/sector.cpp +++ b/source/games/sw/src/sector.cpp @@ -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); diff --git a/source/games/sw/src/sprite.cpp b/source/games/sw/src/sprite.cpp index 88f2eee1b..259c5ba8d 100644 --- a/source/games/sw/src/sprite.cpp +++ b/source/games/sw/src/sprite.cpp @@ -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 { diff --git a/source/games/sw/src/wallmove.cpp b/source/games/sw/src/wallmove.cpp index 08bed420d..2d7db9cfa 100644 --- a/source/games/sw/src/wallmove.cpp +++ b/source/games/sw/src/wallmove.cpp @@ -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; } }