From f3bae2b0b8180251dfd2269cca71ea6a011b324a Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 29 Sep 2022 14:04:34 +0200 Subject: [PATCH] - deleted several unused functions. --- source/games/blood/src/fx.cpp | 6 ----- source/games/blood/src/fx.h | 1 - source/games/blood/src/gameutil.cpp | 39 ----------------------------- source/games/blood/src/gameutil.h | 15 ----------- source/games/blood/src/sound.h | 5 ---- 5 files changed, 66 deletions(-) diff --git a/source/games/blood/src/fx.cpp b/source/games/blood/src/fx.cpp index 62b8a14f5..7f662caf1 100644 --- a/source/games/blood/src/fx.cpp +++ b/source/games/blood/src/fx.cpp @@ -135,12 +135,6 @@ void CFX::remove(DBloodActor* actor) // //--------------------------------------------------------------------------- -DBloodActor* CFX::fxSpawnActor(FX_ID nFx, sectortype* pSector, int x, int y, int z, unsigned int a6) -{ - DVector3 pos(x * inttoworld, y * inttoworld, z * zinttoworld); - return fxSpawnActor(nFx, pSector, pos, a6); -} - DBloodActor* CFX::fxSpawnActor(FX_ID nFx, sectortype* pSector, const DVector3& pos, DAngle a6) { return fxSpawnActor(nFx, pSector, pos, a6.Buildang()); diff --git a/source/games/blood/src/fx.h b/source/games/blood/src/fx.h index b1378f5d6..65a9a61a0 100644 --- a/source/games/blood/src/fx.h +++ b/source/games/blood/src/fx.h @@ -93,7 +93,6 @@ class CFX { public: void destroy(DBloodActor*); void remove(DBloodActor*); - DBloodActor* fxSpawnActor(FX_ID a, sectortype* b, int c, int d, int e, unsigned int f); DBloodActor* fxSpawnActor(FX_ID a, sectortype* b, const DVector3& pos, DAngle f); DBloodActor* fxSpawnActor(FX_ID a, sectortype* b, const DVector3& pos, unsigned int f); void fxProcess(void); diff --git a/source/games/blood/src/gameutil.cpp b/source/games/blood/src/gameutil.cpp index 2261f32d4..0e0d9faba 100644 --- a/source/games/blood/src/gameutil.cpp +++ b/source/games/blood/src/gameutil.cpp @@ -212,45 +212,6 @@ bool CheckProximityWall(walltype* pWall, const DVector2& pos, int nDist) // //--------------------------------------------------------------------------- -bool IntersectRay(int wx, int wy, int wdx, int wdy, int x1, int y1, int z1, int x2, int y2, int z2, int* ix, int* iy, int* iz) -{ - int dX = x1 - x2; - int dY = y1 - y2; - int dZ = z1 - z2; - int side = wdx * dY - wdy * dX; - int dX2 = x1 - wx; - int dY2 = y1 - wy; - int check1 = dX2 * dY - dY2 * dX; - int check2 = wdx * dY2 - wdy * dX2; - if (side >= 0) - { - if (!side) - return 0; - if (check1 < 0) - return 0; - if (check2 < 0 || check2 >= side) - return 0; - } - else - { - if (check1 > 0) - return 0; - if (check2 > 0 || check2 <= side) - return 0; - } - int nScale = DivScale(check2, side, 16); - *ix = x1 + MulScale(dX, nScale, 16); - *iy = y1 + MulScale(dY, nScale, 16); - *iz = z1 + MulScale(dZ, nScale, 16); - return 1; -} - -//--------------------------------------------------------------------------- -// -// -// -//--------------------------------------------------------------------------- - int HitScan(DBloodActor* actor, double z, const DVector3& vect, unsigned int nMask, double nRange) { assert(actor != nullptr); diff --git a/source/games/blood/src/gameutil.h b/source/games/blood/src/gameutil.h index 95df31afe..7a33eb94b 100644 --- a/source/games/blood/src/gameutil.h +++ b/source/games/blood/src/gameutil.h @@ -33,25 +33,10 @@ enum { bool CheckProximity(DBloodActor* pSprite, const DVector3& pos, sectortype* pSector, int nDist); -bool IntersectRay(int wx, int wy, int wdx, int wdy, int x1, int y1, int z1, int x2, int y2, int z2, int* ix, int* iy, int* iz); int HitScan(DBloodActor* pSprite, double z, const DVector3& pos, unsigned int nMask, double range = 0); - -[[deprecated]] -inline int HitScan_(DBloodActor* pSprite, int z, int dx, int dy, int dz, unsigned int nMask, int a8) -{ - return HitScan(pSprite, z * zinttoworld, DVector3(dx, dy, dz) * inttoworld, nMask, a8); -} -[[deprecated]] -inline int HitScan_(DBloodActor* pSprite, double z, int dx, int dy, int dz, unsigned int nMask, int a8) -{ - return HitScan(pSprite, z, DVector3(dx, dy, dz) * inttoworld, nMask, a8); -} - int VectorScan(DBloodActor* pSprite, double nOffset, double nZOffset, const DVector3& vel, double nRange, int ac); - void GetZRange(DBloodActor* pSprite, double* ceilZ, Collision* ceilHit, double* floorZ, Collision* floorHit, int nDist, unsigned int nMask, unsigned int nClipParallax = 0); - void GetZRangeAtXYZ(const DVector3& pos, sectortype* pSector, double* ceilZ, Collision* ceilHit, double* floorZ, Collision* floorHit, int nDist, unsigned int nMask, unsigned int nClipParallax = 0); [[deprecated]] // take care of this together with the engines clipmove. diff --git a/source/games/blood/src/sound.h b/source/games/blood/src/sound.h index 564409e4d..4646f4df2 100644 --- a/source/games/blood/src/sound.h +++ b/source/games/blood/src/sound.h @@ -51,11 +51,6 @@ void sndTerm(void); void sndInit(void); void sfxPlay3DSound(const DVector3& pos, int soundId, sectortype* pSector); -inline void sfxPlay3DSound(int x, int y, int z, int soundId, sectortype* pSector) -{ - DVector3 pos(x * inttoworld, y * inttoworld, z * zinttoworld); - sfxPlay3DSound(pos, soundId, pSector); -} void sfxPlay3DSound(DBloodActor* pSprite, int soundId, int a3 = -1, int a4 = 0); void sfxPlay3DSoundCP(DBloodActor* pSprite, int soundId, int a3 = -1, int a4 = 0, int pitch = 0, int volume = 0); void sfxKill3DSound(DBloodActor* pSprite, int a2 = -1, int a3 = -1);