From 8aa7051f7831ca8eb57d43fc1536542d8b63978e Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Sun, 22 Nov 2020 21:27:02 +1100 Subject: [PATCH] - buildutils.h: Replace `FSin()` from Exhumed with `bsinf()`/`bcosf()`. --- source/exhumed/src/engine.h | 5 ----- source/exhumed/src/gun.cpp | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/source/exhumed/src/engine.h b/source/exhumed/src/engine.h index b9e39dc10..4a9aebaa3 100644 --- a/source/exhumed/src/engine.h +++ b/source/exhumed/src/engine.h @@ -131,11 +131,6 @@ inline int Sin(int angle) return sintable[angle & kAngleMask]; } -inline double FSin(double angle) -{ - return calcSinTableValue(fmod(angle, kAngleMask + 1)); -} - inline int Cos(int angle) { return sintable[(angle + 512) & kAngleMask]; diff --git a/source/exhumed/src/gun.cpp b/source/exhumed/src/gun.cpp index db968a28b..995b0af74 100644 --- a/source/exhumed/src/gun.cpp +++ b/source/exhumed/src/gun.cpp @@ -967,7 +967,7 @@ void DrawWeapons(double smooth) if (var_34 == 1) { - xOffset = ((FSin(nBobAngle + 512) / 256.) * nVal) / 256.; + xOffset = fmulscale8(bcosf(nBobAngle, -8), nVal); } } else