From 08a53188a8309d005d3e0671f6f9a26000ffdbad Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 9 Sep 2022 18:17:20 +0200 Subject: [PATCH] - wrapped all literal assignments to clipdist - part 4 --- source/games/exhumed/src/anims.cpp | 2 +- source/games/exhumed/src/anubis.cpp | 2 +- source/games/exhumed/src/bubbles.cpp | 2 +- source/games/exhumed/src/bullet.cpp | 2 +- source/games/exhumed/src/fish.cpp | 4 ++-- source/games/exhumed/src/grenade.cpp | 2 +- source/games/exhumed/src/lavadude.cpp | 4 ++-- source/games/exhumed/src/lion.cpp | 2 +- source/games/exhumed/src/move.cpp | 2 +- source/games/exhumed/src/mummy.cpp | 2 +- source/games/exhumed/src/object.cpp | 4 ++-- source/games/exhumed/src/player.cpp | 2 +- source/games/exhumed/src/queen.cpp | 8 ++++---- source/games/exhumed/src/rat.cpp | 2 +- source/games/exhumed/src/rex.cpp | 2 +- source/games/exhumed/src/roach.cpp | 2 +- source/games/exhumed/src/scorp.cpp | 2 +- source/games/exhumed/src/set.cpp | 4 ++-- source/games/exhumed/src/snake.cpp | 2 +- source/games/exhumed/src/spider.cpp | 2 +- source/games/exhumed/src/wasp.cpp | 2 +- 21 files changed, 28 insertions(+), 28 deletions(-) diff --git a/source/games/exhumed/src/anims.cpp b/source/games/exhumed/src/anims.cpp index 7695e259f..30ac54053 100644 --- a/source/games/exhumed/src/anims.cpp +++ b/source/games/exhumed/src/anims.cpp @@ -79,7 +79,7 @@ DExhumedActor* BuildAnim(DExhumedActor* pActor, int val, int val2, const DVector pActor->spr.shade = -12; } - pActor->spr.clipdist = 10; + pActor->set_native_clipdist(10); pActor->spr.xrepeat = nRepeat; pActor->spr.yrepeat = nRepeat; pActor->spr.picnum = 1; diff --git a/source/games/exhumed/src/anubis.cpp b/source/games/exhumed/src/anubis.cpp index a9e8a7794..1b5019d1c 100644 --- a/source/games/exhumed/src/anubis.cpp +++ b/source/games/exhumed/src/anubis.cpp @@ -64,7 +64,7 @@ void BuildAnubis(DExhumedActor* ap, const DVector3& pos, sectortype* pSector, DA ap->spr.yoffset = 0; ap->spr.picnum = 1; ap->spr.pal = ap->sector()->ceilingpal; - ap->spr.clipdist = 60; + ap->set_native_clipdist(60); ap->spr.angle = nAngle; ap->spr.xrepeat = 40; ap->spr.yrepeat = 40; diff --git a/source/games/exhumed/src/bubbles.cpp b/source/games/exhumed/src/bubbles.cpp index fc071db60..bb1c5ec80 100644 --- a/source/games/exhumed/src/bubbles.cpp +++ b/source/games/exhumed/src/bubbles.cpp @@ -46,7 +46,7 @@ DExhumedActor* BuildBubble(const DVector3& pos, sectortype* pSector) pActor->spr.cstat = 0; pActor->spr.shade = -32; pActor->spr.pal = 0; - pActor->spr.clipdist = 5; + pActor->set_native_clipdist(5); pActor->spr.xrepeat = 40; pActor->spr.yrepeat = 40; pActor->spr.xoffset = 0; diff --git a/source/games/exhumed/src/bullet.cpp b/source/games/exhumed/src/bullet.cpp index d9f470f2e..9b3dc175d 100644 --- a/source/games/exhumed/src/bullet.cpp +++ b/source/games/exhumed/src/bullet.cpp @@ -601,7 +601,7 @@ DExhumedActor* BuildBullet(DExhumedActor* pActor, int nType, int nZOffset, DAngl pBulletActor->spr.pal = 0; } - pBulletActor->spr.clipdist = 25; + pBulletActor->set_native_clipdist(25); int nRepeat = pBulletInfo->xyRepeat; if (nRepeat < 0) { diff --git a/source/games/exhumed/src/fish.cpp b/source/games/exhumed/src/fish.cpp index 40d46cdd9..2b9e203c4 100644 --- a/source/games/exhumed/src/fish.cpp +++ b/source/games/exhumed/src/fish.cpp @@ -63,7 +63,7 @@ void BuildFishLimb(DExhumedActor* pActor, int anim) pChunkActor->spr.picnum = anim; pChunkActor->spr.lotag = runlist_HeadRun() + 1; - pChunkActor->spr.clipdist = 0; + pChunkActor->set_native_clipdist(0); // GrabTimeSlot(3); @@ -153,7 +153,7 @@ void BuildFish(DExhumedActor* pActor, const DVector3& pos, sectortype* pSector, pActor->spr.cstat = CSTAT_SPRITE_BLOCK_ALL; pActor->spr.shade = -12; - pActor->spr.clipdist = 80; + pActor->set_native_clipdist(80); pActor->spr.xrepeat = 40; pActor->spr.yrepeat = 40; pActor->spr.pal = pActor->sector()->ceilingpal; diff --git a/source/games/exhumed/src/grenade.cpp b/source/games/exhumed/src/grenade.cpp index dd96e6f35..3975539ff 100644 --- a/source/games/exhumed/src/grenade.cpp +++ b/source/games/exhumed/src/grenade.cpp @@ -109,7 +109,7 @@ void BuildGrenade(int nPlayer) pActor->spr.cstat = CSTAT_SPRITE_INVISIBLE; pActor->spr.picnum = 1; pActor->spr.pal = 0; - pActor->spr.clipdist = 30; + pActor->set_native_clipdist(30); pActor->spr.xoffset = 0; pActor->spr.yoffset = 0; pActor->spr.angle = pPlayerActor->spr.angle; diff --git a/source/games/exhumed/src/lavadude.cpp b/source/games/exhumed/src/lavadude.cpp index b33333e85..c3bd18a11 100644 --- a/source/games/exhumed/src/lavadude.cpp +++ b/source/games/exhumed/src/lavadude.cpp @@ -55,7 +55,7 @@ DExhumedActor* BuildLavaLimb(DExhumedActor* pActor, int move, int ebx) pLimbActor->spr.picnum = (move & 3) % 3; pLimbActor->spr.hitag = 0; pLimbActor->spr.lotag = runlist_HeadRun() + 1; - pLimbActor->spr.clipdist = 0; + pLimbActor->set_native_clipdist(0); // GrabTimeSlot(3); @@ -118,7 +118,7 @@ void BuildLava(DExhumedActor* pActor, const DVector3& pos, sectortype* pSector, pActor->spr.yrepeat = 200; pActor->spr.shade = -12; pActor->spr.pal = 0; - pActor->spr.clipdist = 127; + pActor->set_native_clipdist(127); pActor->spr.xoffset = 0; pActor->spr.yoffset = 0; pActor->spr.picnum = seq_GetSeqPicnum(kSeqLavag, LavadudeSeq[3].a, 0); diff --git a/source/games/exhumed/src/lion.cpp b/source/games/exhumed/src/lion.cpp index 45228dec4..3bfc6fb20 100644 --- a/source/games/exhumed/src/lion.cpp +++ b/source/games/exhumed/src/lion.cpp @@ -56,7 +56,7 @@ void BuildLion(DExhumedActor* pActor, const DVector3& pos, sectortype* pSector, } pActor->spr.cstat = CSTAT_SPRITE_BLOCK_ALL; - pActor->spr.clipdist = 60; + pActor->set_native_clipdist(60); pActor->spr.shade = -12; pActor->spr.xrepeat = 40; pActor->spr.yrepeat = 40; diff --git a/source/games/exhumed/src/move.cpp b/source/games/exhumed/src/move.cpp index 7c0172f19..5e7e7266f 100644 --- a/source/games/exhumed/src/move.cpp +++ b/source/games/exhumed/src/move.cpp @@ -1312,7 +1312,7 @@ DExhumedActor* BuildCreatureChunk(DExhumedActor* pSrc, int nPic, bool bSpecial) pActor->spr.yoffset = 0; pActor->spr.picnum = nPic; pActor->spr.lotag = runlist_HeadRun() + 1; - pActor->spr.clipdist = 40; + pActor->set_native_clipdist(40); // GrabTimeSlot(3); diff --git a/source/games/exhumed/src/mummy.cpp b/source/games/exhumed/src/mummy.cpp index fefce18a6..8535bf82e 100644 --- a/source/games/exhumed/src/mummy.cpp +++ b/source/games/exhumed/src/mummy.cpp @@ -52,7 +52,7 @@ void BuildMummy(DExhumedActor* pActor, const DVector3& pos, sectortype* pSector, pActor->spr.cstat = CSTAT_SPRITE_BLOCK_ALL; pActor->spr.shade = -12; - pActor->spr.clipdist = 32; + pActor->set_native_clipdist(32); pActor->vel.X = 0; pActor->vel.Y = 0; pActor->vel.Z = 0; diff --git a/source/games/exhumed/src/object.cpp b/source/games/exhumed/src/object.cpp index 019450065..0cffa6aa9 100644 --- a/source/games/exhumed/src/object.cpp +++ b/source/games/exhumed/src/object.cpp @@ -1318,7 +1318,7 @@ void AITrap::Tick(RunListEvent* ev) } else { - pBullet->spr.clipdist = 50; + pBullet->set_native_clipdist(50); auto pWall = sTrap[nTrap].pWall1; if (pWall) @@ -1399,7 +1399,7 @@ DExhumedActor* BuildSpark(DExhumedActor* pActor, int nVal) pSpark->spr.pos.Z = pActor->spr.pos.Z; pSpark->spr.lotag = runlist_HeadRun() + 1; - pSpark->spr.clipdist = 1; + pSpark->set_native_clipdist(1); pSpark->spr.hitag = 0; pSpark->backuppos(); diff --git a/source/games/exhumed/src/player.cpp b/source/games/exhumed/src/player.cpp index d7bed7609..cbc146f2c 100644 --- a/source/games/exhumed/src/player.cpp +++ b/source/games/exhumed/src/player.cpp @@ -291,7 +291,7 @@ void RestartPlayer(int nPlayer) pActor->spr.cstat = CSTAT_SPRITE_BLOCK_ALL; pActor->spr.shade = -12; - pActor->spr.clipdist = 58; + pActor->set_native_clipdist(58); pActor->spr.pal = 0; pActor->spr.xrepeat = 40; pActor->spr.yrepeat = 40; diff --git a/source/games/exhumed/src/queen.cpp b/source/games/exhumed/src/queen.cpp index 6d04afdb9..525cd60ea 100644 --- a/source/games/exhumed/src/queen.cpp +++ b/source/games/exhumed/src/queen.cpp @@ -393,7 +393,7 @@ void BuildTail() pTailActor->spr.shade = -12; pTailActor->spr.hitag = 0; pTailActor->spr.cstat = 0; - pTailActor->spr.clipdist = 100; + pTailActor->set_native_clipdist(100); pTailActor->spr.xrepeat = 80; pTailActor->spr.yrepeat = 80; pTailActor->spr.picnum = 1; @@ -432,7 +432,7 @@ void BuildQueenEgg(int nQueen, int nVal) pActor2->spr.pos = DVector3(pActor->spr.pos.XY(), pSector->floorz); pActor2->spr.pal = 0; - pActor2->spr.clipdist = 50; + pActor2->set_native_clipdist(50); pActor2->spr.xoffset = 0; pActor2->spr.yoffset = 0; pActor2->spr.shade = -12; @@ -686,7 +686,7 @@ void BuildQueenHead(int nQueen) pActor2->spr.pos.XY() = pActor->spr.pos.XY(); pActor2->spr.pos.Z = pSector->floorz; - pActor2->spr.clipdist = 70; + pActor2->set_native_clipdist(70); pActor2->spr.xrepeat = 80; pActor2->spr.yrepeat = 80; pActor2->spr.cstat = 0; @@ -1090,7 +1090,7 @@ void BuildQueen(DExhumedActor* pActor, const DVector3& pos, sectortype* pSector, pActor->spr.cstat = CSTAT_SPRITE_BLOCK_ALL; pActor->spr.pal = 0; pActor->spr.shade = -12; - pActor->spr.clipdist = 100; + pActor->set_native_clipdist(100); pActor->spr.xrepeat = 80; pActor->spr.yrepeat = 80; pActor->spr.xoffset = 0; diff --git a/source/games/exhumed/src/rat.cpp b/source/games/exhumed/src/rat.cpp index 33a13986a..9d72090bd 100644 --- a/source/games/exhumed/src/rat.cpp +++ b/source/games/exhumed/src/rat.cpp @@ -92,7 +92,7 @@ void BuildRat(DExhumedActor* pActor, const DVector3& pos, sectortype* pSector, D pActor->spr.yoffset = 0; pActor->spr.picnum = 1; pActor->spr.pal = pActor->sector()->ceilingpal; - pActor->spr.clipdist = 30; + pActor->set_native_clipdist(30); pActor->spr.angle = nAngle; pActor->spr.xrepeat = 50; pActor->spr.yrepeat = 50; diff --git a/source/games/exhumed/src/rex.cpp b/source/games/exhumed/src/rex.cpp index d8eeb91e7..0276091fd 100644 --- a/source/games/exhumed/src/rex.cpp +++ b/source/games/exhumed/src/rex.cpp @@ -52,7 +52,7 @@ void BuildRex(DExhumedActor* pActor, const DVector3& pos, sectortype* pSector, D } pActor->spr.cstat = CSTAT_SPRITE_BLOCK_ALL; - pActor->spr.clipdist = 80; + pActor->set_native_clipdist(80); pActor->spr.shade = -12; pActor->spr.xrepeat = 64; pActor->spr.yrepeat = 64; diff --git a/source/games/exhumed/src/roach.cpp b/source/games/exhumed/src/roach.cpp index 7e156d8a7..c6fb21996 100644 --- a/source/games/exhumed/src/roach.cpp +++ b/source/games/exhumed/src/roach.cpp @@ -55,7 +55,7 @@ void BuildRoach(int nType, DExhumedActor* pActor, const DVector3& pos, sectortyp pActor->spr.yoffset = 0; pActor->spr.picnum = 1; pActor->spr.pal = pActor->sector()->ceilingpal; - pActor->spr.clipdist = 60; + pActor->set_native_clipdist(60); pActor->spr.angle = angle; pActor->spr.xrepeat = 40; pActor->spr.yrepeat = 40; diff --git a/source/games/exhumed/src/scorp.cpp b/source/games/exhumed/src/scorp.cpp index 347d28ace..0b03f2cea 100644 --- a/source/games/exhumed/src/scorp.cpp +++ b/source/games/exhumed/src/scorp.cpp @@ -53,7 +53,7 @@ void BuildScorp(DExhumedActor* pActor, const DVector3& pos, sectortype* pSector, } pActor->spr.cstat = CSTAT_SPRITE_BLOCK_ALL; - pActor->spr.clipdist = 70; + pActor->set_native_clipdist(70); pActor->spr.shade = -12; pActor->spr.xrepeat = 80; pActor->spr.yrepeat = 80; diff --git a/source/games/exhumed/src/set.cpp b/source/games/exhumed/src/set.cpp index a0858b6cd..c6b058234 100644 --- a/source/games/exhumed/src/set.cpp +++ b/source/games/exhumed/src/set.cpp @@ -55,7 +55,7 @@ void BuildSet(DExhumedActor* pActor, const DVector3& pos, sectortype* pSector, D pActor->spr.cstat = CSTAT_SPRITE_BLOCK_ALL; pActor->spr.shade = -12; - pActor->spr.clipdist = 110; + pActor->set_native_clipdist(110); pActor->vel.X = 0; pActor->vel.Y = 0; pActor->vel.Z = 0; @@ -100,7 +100,7 @@ void BuildSoul(DExhumedActor* pSet) pActor->spr.xrepeat = 1; pActor->spr.yrepeat = 1; pActor->spr.pal = 0; - pActor->spr.clipdist = 5; + pActor->set_native_clipdist(5); pActor->spr.xoffset = 0; pActor->spr.yoffset = 0; pActor->spr.picnum = seq_GetSeqPicnum(kSeqSet, 75, 0); diff --git a/source/games/exhumed/src/snake.cpp b/source/games/exhumed/src/snake.cpp index 22b695ad0..e94757b9b 100644 --- a/source/games/exhumed/src/snake.cpp +++ b/source/games/exhumed/src/snake.cpp @@ -206,7 +206,7 @@ void BuildSnake(int nPlayer, int zVal) pActor->spr.yrepeat = 40 - 3 * i; } - pActor->spr.clipdist = 10; + pActor->set_native_clipdist(10); pActor->spr.cstat = 0; pActor->spr.shade = -64; pActor->spr.pal = 0; diff --git a/source/games/exhumed/src/spider.cpp b/source/games/exhumed/src/spider.cpp index d31ca03cb..0803ecd0e 100644 --- a/source/games/exhumed/src/spider.cpp +++ b/source/games/exhumed/src/spider.cpp @@ -53,7 +53,7 @@ DExhumedActor* BuildSpider(DExhumedActor* spp, const DVector3& pos, sectortype* spp->spr.cstat = CSTAT_SPRITE_BLOCK_ALL; spp->spr.shade = -12; - spp->spr.clipdist = 15; + spp->set_native_clipdist(15); spp->vel.X = 0; spp->vel.Y = 0; spp->vel.Z = 0; diff --git a/source/games/exhumed/src/wasp.cpp b/source/games/exhumed/src/wasp.cpp index 6cc8ad116..41ec8cdb6 100644 --- a/source/games/exhumed/src/wasp.cpp +++ b/source/games/exhumed/src/wasp.cpp @@ -56,7 +56,7 @@ DExhumedActor* BuildWasp(DExhumedActor* pActor, const DVector3& pos, sectortype* pActor->spr.shade = -12; pActor->spr.cstat = CSTAT_SPRITE_BLOCK_ALL; pActor->spr.pal = pActor->sector()->ceilingpal; - pActor->spr.clipdist = 70; + pActor->set_native_clipdist(70); if (bEggWasp) {