diff --git a/source/games/exhumed/src/bullet.cpp b/source/games/exhumed/src/bullet.cpp index d593a5603..2afc5abfd 100644 --- a/source/games/exhumed/src/bullet.cpp +++ b/source/games/exhumed/src/bullet.cpp @@ -344,7 +344,7 @@ int MoveBullet(int nBullet) } } - coll = movesprite(pActor, pBullet->vect, pActor->native_clipdist() >> 1, pActor->native_clipdist() >> 1, CLIPMASK1); + coll = movesprite__(pActor, pBullet->vect, pActor->native_clipdist() >> 1, pActor->native_clipdist() >> 1, CLIPMASK1); MOVEEND: if (coll.type || coll.exbits) diff --git a/source/games/exhumed/src/engine.h b/source/games/exhumed/src/engine.h index 6dd2c0bc6..e813f8b00 100644 --- a/source/games/exhumed/src/engine.h +++ b/source/games/exhumed/src/engine.h @@ -33,14 +33,14 @@ enum }; -Collision movesprite(DExhumedActor* spritenum, int dx, int dy, int dz, int ceildist, int flordist, unsigned int clipmask); -Collision movesprite(DExhumedActor* spritenum, const DVector3& pos, int ceildist, int flordist, unsigned int clipmask) +Collision movesprite_(DExhumedActor* spritenum, int dx, int dy, int dz, int ceildist, int flordist, unsigned int clipmask); +Collision movesprite__(DExhumedActor* spritenum, const DVector3& pos, int ceildist, int flordist, unsigned int clipmask) { - return movesprite(spritenum, int(pos.X * worldtoint), int(pos.Y * worldtoint), int(pos.Z * zworldtoint), ceildist, flordist, clipmask); + return movesprite_(spritenum, int(pos.X * worldtoint), int(pos.Y * worldtoint), int(pos.Z * zworldtoint), ceildist, flordist, clipmask); } -Collision movesprite(DExhumedActor* spritenum, const DVector3& pos, double xyfactor, int ceildist, int flordist, unsigned int clipmask) +Collision movesprite___(DExhumedActor* spritenum, const DVector3& pos, double xyfactor, int ceildist, int flordist, unsigned int clipmask) { - return movesprite(spritenum, int(pos.X * xyfactor * worldtoint), int(pos.Y * xyfactor * worldtoint), int(pos.Z * zworldtoint), ceildist, flordist, clipmask); + return movesprite_(spritenum, int(pos.X * xyfactor * worldtoint), int(pos.Y * xyfactor * worldtoint), int(pos.Z * zworldtoint), ceildist, flordist, clipmask); } void precache(); diff --git a/source/games/exhumed/src/fish.cpp b/source/games/exhumed/src/fish.cpp index 2a3a90731..26580a66f 100644 --- a/source/games/exhumed/src/fish.cpp +++ b/source/games/exhumed/src/fish.cpp @@ -119,7 +119,7 @@ void AIFishLimb::Tick(RunListEvent* ev) } else { - auto coll = movesprite(pActor, pActor->vel, 256., 2560, -2560, CLIPMASK1); + auto coll = movesprite___(pActor, pActor->vel, 256., 2560, -2560, CLIPMASK1); if (coll.type != kHitNone) { pActor->vel.X = 0; @@ -413,7 +413,7 @@ void AIFish::Tick(RunListEvent* ev) auto pSector =pActor->sector(); // loc_2EF54 - Collision coll = movesprite(pActor, pActor->vel * 4, 2048., 0, 0, CLIPMASK0); + Collision coll = movesprite___(pActor, pActor->vel * 4, 2048., 0, 0, CLIPMASK0); if (!(pActor->sector()->Flag & kSectUnderwater)) { diff --git a/source/games/exhumed/src/grenade.cpp b/source/games/exhumed/src/grenade.cpp index 2f4b699ba..aa2898016 100644 --- a/source/games/exhumed/src/grenade.cpp +++ b/source/games/exhumed/src/grenade.cpp @@ -75,7 +75,7 @@ void ThrowGrenade(int nPlayer, int, int, int ecx, int push1) DVector2 vec = nAngle.ToVector() * pPlayerActor->fClipdist() *2; // == << 14 + 3 + 2 - 18 - auto nMov = movesprite(pActor, FloatToFixed<18>(vec.X), FloatToFixed<18>(vec.Y), ecx, 0, 0, CLIPMASK1); + auto nMov = movesprite_(pActor, FloatToFixed<18>(vec.X), FloatToFixed<18>(vec.Y), ecx, 0, 0, CLIPMASK1); if (nMov.type == kHitWall) { nAngle = GetWallNormal(nMov.hitWall); @@ -279,7 +279,7 @@ void AIGrenade::Tick(RunListEvent* ev) int zVel = pActor->int_zvel(); Gravity(pActor); - auto nMov = movesprite(pActor, int(pActor->vec.X * worldtoint), int(pActor->vec.Y * worldtoint), pActor->int_zvel(), pActor->native_clipdist() >> 1, pActor->native_clipdist() >> 1, CLIPMASK1); + auto nMov = movesprite_(pActor, int(pActor->vec.X * worldtoint), int(pActor->vec.Y * worldtoint), pActor->int_zvel(), pActor->native_clipdist() >> 1, pActor->native_clipdist() >> 1, CLIPMASK1); if (!nMov.type && !nMov.exbits) return; diff --git a/source/games/exhumed/src/lavadude.cpp b/source/games/exhumed/src/lavadude.cpp index 7ef26677b..18a600d1d 100644 --- a/source/games/exhumed/src/lavadude.cpp +++ b/source/games/exhumed/src/lavadude.cpp @@ -73,7 +73,7 @@ void AILavaDudeLimb::Tick(RunListEvent* ev) pActor->spr.shade += 3; - auto coll = movesprite(pActor, pActor->vel, 4096., 2560, -2560, CLIPMASK1); + auto coll = movesprite___(pActor, pActor->vel, 4096., 2560, -2560, CLIPMASK1); if (coll.type || pActor->spr.shade > 100) { @@ -279,7 +279,7 @@ void AILavaDude::Tick(RunListEvent* ev) auto pos = pActor->spr.pos; auto pSector =pActor->sector(); - auto coll = movesprite(pActor, DVector3(pActor->vel.XY(), 0), 256., 0, 0, CLIPMASK0); + auto coll = movesprite___(pActor, DVector3(pActor->vel.XY(), 0), 256., 0, 0, CLIPMASK0); if (pSector != pActor->sector()) { diff --git a/source/games/exhumed/src/move.cpp b/source/games/exhumed/src/move.cpp index 70bb436d8..2d1c7dc96 100644 --- a/source/games/exhumed/src/move.cpp +++ b/source/games/exhumed/src/move.cpp @@ -393,7 +393,7 @@ DExhumedActor* insertActor(sectortype* s, int st) } -Collision movesprite(DExhumedActor* pActor, int dx, int dy, int dz, int ceildist, int flordist, unsigned int clipmask) +Collision movesprite_(DExhumedActor* pActor, int dx, int dy, int dz, int ceildist, int flordist, unsigned int clipmask) { DVector2 vect(FixedToFloat<18>(dx), FixedToFloat<18>(dy)); @@ -511,7 +511,7 @@ void Gravity(DExhumedActor* pActor) Collision MoveCreature(DExhumedActor* pActor) { - return movesprite(pActor, pActor->vel, 256., 15360, -5120, CLIPMASK0); + return movesprite___(pActor, pActor->vel, 256., 15360, -5120, CLIPMASK0); } Collision MoveCreatureWithCaution(DExhumedActor* pActor) @@ -823,7 +823,7 @@ void MoveSector(sectortype* pSector, DAngle nAngle, DVector2& nVel) { // Unlike the above, this one *did* scale vect vect2 = nAngle.ToVector() * pActor->fClipdist() * 0.25 + vect; - movesprite(pActor, FloatToFixed<18>(vect2.X), FloatToFixed<18>(vect2.Y), 0, 0, 0, CLIPMASK0); + movesprite_(pActor, FloatToFixed<18>(vect2.X), FloatToFixed<18>(vect2.Y), 0, 0, 0, CLIPMASK0); } } } @@ -945,7 +945,7 @@ Collision AngleChase(DExhumedActor* pActor, DExhumedActor* pActor2, int threshol auto veclen = vec.Length(); double zz = g_sindeg(pActor->vel.Z * 45) * veclen; - return movesprite(pActor, FloatToFixed<18>(vec.X), FloatToFixed<18>(vec.Y), zz * 4096 + BobVal(zbob) * 512, 0, 0, nClipType); + return movesprite_(pActor, FloatToFixed<18>(vec.X), FloatToFixed<18>(vec.Y), zz * 4096 + BobVal(zbob) * 512, 0, 0, nClipType); } DAngle GetWallNormal(walltype* pWall) @@ -1120,7 +1120,7 @@ void AICreatureChunk::Tick(RunListEvent* ev) auto pSector = pActor->sector(); pActor->spr.pal = pSector->ceilingpal; - auto nVal = movesprite(pActor, pActor->vel, 1024., 2560, -2560, CLIPMASK1); + auto nVal = movesprite___(pActor, pActor->vel, 1024., 2560, -2560, CLIPMASK1); if (pActor->spr.pos.Z >= pSector->floorz) { diff --git a/source/games/exhumed/src/object.cpp b/source/games/exhumed/src/object.cpp index cfb8ab0f7..6f7f9c027 100644 --- a/source/games/exhumed/src/object.cpp +++ b/source/games/exhumed/src/object.cpp @@ -1037,7 +1037,7 @@ void AISlide::Tick(RunListEvent* ev) double nSeekB = LongSeek(&y, SlideData[nSlide].pos[4].Y, 1.25, 1.25); dragpoint(SlideData[nSlide].pWall1, x, y); - movesprite(SlideData[nSlide].pActor, FloatToFixed<18>(nSeekA), FloatToFixed<18>(nSeekB), 0, 0, 0, CLIPMASK1); + movesprite_(SlideData[nSlide].pActor, FloatToFixed<18>(nSeekA), FloatToFixed<18>(nSeekB), 0, 0, 0, CLIPMASK1); if (nSeekA == 0 && nSeekB == 0) { @@ -1372,7 +1372,7 @@ void AISpark::Tick(RunListEvent* ev) pActor->vel.Z += 0.5; - auto nMov = movesprite(pActor, pActor->vel, 4096, 2560, -2560, CLIPMASK1); + auto nMov = movesprite___(pActor, pActor->vel, 4096, 2560, -2560, CLIPMASK1); if (!nMov.type && !nMov.exbits) { return; } @@ -1823,7 +1823,7 @@ void AIObject::Tick(RunListEvent* ev) FUNCOBJECT_GOTO: if (nStat != kStatExplodeTarget) { - auto nMov = movesprite(pActor, pActor->vel, 64., 0, 0, CLIPMASK0); + auto nMov = movesprite___(pActor, pActor->vel, 64., 0, 0, CLIPMASK0); if (pActor->spr.statnum == kStatExplodeTrigger) { pActor->spr.pal = 1; diff --git a/source/games/exhumed/src/player.cpp b/source/games/exhumed/src/player.cpp index e620835d9..8e3328a3e 100644 --- a/source/games/exhumed/src/player.cpp +++ b/source/games/exhumed/src/player.cpp @@ -768,7 +768,7 @@ bool CheckMovingBlocks(int nPlayer, Collision& nMove, DVector3& spr_pos, sectort ChangeActorSect(pPlayerActor, spr_sect); } - movesprite(pPlayerActor, FloatToFixed<18>(vel.X), FloatToFixed<18>(vel.Y), z, 5120, -5120, CLIPMASK0); + movesprite_(pPlayerActor, FloatToFixed<18>(vel.X), FloatToFixed<18>(vel.Y), z, 5120, -5120, CLIPMASK0); return true; } } @@ -929,7 +929,7 @@ void AIPlayer::Tick(RunListEvent* ev) } else { - nMove = movesprite(pPlayerActor, x, y, z, 5120, -5120, CLIPMASK0); + nMove = movesprite_(pPlayerActor, x, y, z, 5120, -5120, CLIPMASK0); auto pPlayerSect = pPlayerActor->sector(); @@ -1096,7 +1096,7 @@ sectdone: double fz = pViewSect->floorz - 20; pPlayerActor->spr.pos = DVector3(spr_pos.XY(), fz); - auto coll = movesprite(pPlayerActor, x, y, 0, 5120, 0, CLIPMASK0); + auto coll = movesprite_(pPlayerActor, x, y, 0, 5120, 0, CLIPMASK0); if (coll.type == kHitWall) { ChangeActorSect(pPlayerActor, pPlayerActor->sector()); diff --git a/source/games/exhumed/src/queen.cpp b/source/games/exhumed/src/queen.cpp index c2772c996..35f635ee9 100644 --- a/source/games/exhumed/src/queen.cpp +++ b/source/games/exhumed/src/queen.cpp @@ -332,7 +332,7 @@ Collision QueenAngleChase(DExhumedActor* pActor, DExhumedActor* pActor2, int thr double zz = pActor->pitch.Sin() * veclen; - return movesprite(pActor, FloatToFixed<18>(vec.X), FloatToFixed<18>(vec.Y), zz * 4096 + BobVal(bobangle) * 512, 0, 0, CLIPMASK1); + return movesprite_(pActor, FloatToFixed<18>(vec.X), FloatToFixed<18>(vec.Y), zz * 4096 + BobVal(bobangle) * 512, 0, 0, CLIPMASK1); } int DestroyTailPart() @@ -933,7 +933,7 @@ void AIQueenHead::Tick(RunListEvent* ev) auto dv = nAngle.ToVector() * 64; int dz = (RandomSize(5) - RandomSize(5)) << 7; - movesprite(pActor, FloatToFixed<18>(dv.X), FloatToFixed<18>(dv.Y), dz, 0, 0, CLIPMASK1); + movesprite_(pActor, FloatToFixed<18>(dv.X), FloatToFixed<18>(dv.Y), dz, 0, 0, CLIPMASK1); BlowChunks(pActor); BuildExplosion(pActor); diff --git a/source/games/exhumed/src/set.cpp b/source/games/exhumed/src/set.cpp index 64a27a7e0..4e6c9b6d6 100644 --- a/source/games/exhumed/src/set.cpp +++ b/source/games/exhumed/src/set.cpp @@ -140,7 +140,7 @@ void AISoul::Tick(RunListEvent* ev) double nVel = DAngle::fromBuild(pActor->spr.extra).Cos(); auto vect = pActor->spr.angle.ToVector() * nVel * 8; - auto coll = movesprite(pActor, FloatToFixed<18>(vect.X), FloatToFixed<18>(vect.Y), pActor->int_zvel(), 5120, 0, CLIPMASK0); + auto coll = movesprite_(pActor, FloatToFixed<18>(vect.X), FloatToFixed<18>(vect.Y), pActor->int_zvel(), 5120, 0, CLIPMASK0); if (coll.exbits & 0x10000) { DExhumedActor* pSet = pActor->pTarget; diff --git a/source/games/exhumed/src/snake.cpp b/source/games/exhumed/src/snake.cpp index 6654f3b14..f4a2f76ae 100644 --- a/source/games/exhumed/src/snake.cpp +++ b/source/games/exhumed/src/snake.cpp @@ -305,7 +305,7 @@ void AISnake::Tick(RunListEvent* ev) { SEARCH_ENEMY: auto vec = pActor->spr.angle.ToVector() * 37.5; - nMov = movesprite(pActor, + nMov = movesprite_(pActor, FixedToFloat<18>(vec.X), FixedToFloat<18>(vec.Y), bsin(SnakeList[nSnake].nAngle, -5), @@ -368,7 +368,7 @@ void AISnake::Tick(RunListEvent* ev) DVector2 vect; vect.X = cosang + cosang * i + eax * normalang.Cos(); vect.Y = cosang + sinang * i + eax * normalang.Sin(); - movesprite(pActor2, FloatToFixed<18>(vect.X), FloatToFixed<18>(vect.Y), + movesprite_(pActor2, FloatToFixed<18>(vect.X), FloatToFixed<18>(vect.Y), int(- zVal * (i - 1) * zworldtoint), 0, 0, CLIPMASK1); snakeang += DAngle22_5; diff --git a/source/games/exhumed/src/spider.cpp b/source/games/exhumed/src/spider.cpp index 037c36afb..7db9710d0 100644 --- a/source/games/exhumed/src/spider.cpp +++ b/source/games/exhumed/src/spider.cpp @@ -273,7 +273,7 @@ void AISpider::Tick(RunListEvent* ev) spp->vel.Y = 0; } - auto nMov = movesprite(spp, spp->vel, 1 << nVel, 1280, -1280, CLIPMASK0); + auto nMov = movesprite___(spp, spp->vel, 1 << nVel, 1280, -1280, CLIPMASK0); if (nMov.type == kHitNone && nMov.exbits == 0) return;