diff --git a/source/games/blood/src/blood.cpp b/source/games/blood/src/blood.cpp index e2f25c308..83ac37784 100644 --- a/source/games/blood/src/blood.cpp +++ b/source/games/blood/src/blood.cpp @@ -435,8 +435,6 @@ void GameInterface::app_init() SetTileNames(); C_InitConback(TexMan.CheckForTexture("BACKTILE", ETextureType::Any), true, 0.25); - Printf(PRINT_NONOTIFY, "Loading cosine table\n"); - trigInit(); Printf(PRINT_NONOTIFY, "Initializing view subsystem\n"); viewInit(); Printf(PRINT_NONOTIFY, "Initializing dynamic fire\n"); diff --git a/source/games/blood/src/misc.h b/source/games/blood/src/misc.h index 63ccac619..b23d40ee8 100644 --- a/source/games/blood/src/misc.h +++ b/source/games/blood/src/misc.h @@ -64,12 +64,9 @@ void warpInit(void); int CheckLink(spritetype *pSprite); int CheckLink(int *x, int *y, int *z, int *nSector); -extern int costable[2048]; - int GetOctant(int x, int y); void RotateVector(int *dx, int *dy, int nAngle); void RotatePoint(int *x, int *y, int nAngle, int ox, int oy); -void trigInit(); #include "m_fixed.h" diff --git a/source/games/blood/src/trig.cpp b/source/games/blood/src/trig.cpp index e7e3b878c..34856a47a 100644 --- a/source/games/blood/src/trig.cpp +++ b/source/games/blood/src/trig.cpp @@ -27,8 +27,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. BEGIN_BLD_NS -int costable[2048]; - int OctantTable[8] = { 5, 6, 2, 1, 4, 7, 3, 0 }; int GetOctant(int x, int y) @@ -53,27 +51,4 @@ void RotatePoint(int *x, int *y, int nAngle, int ox, int oy) *y = oy+dmulscale30r(dx, Sin(nAngle), dy, Cos(nAngle)); } -void trigInit() -{ - auto fr = fileSystem.OpenFileReader("cosine.dat"); - auto len = fr.Read(costable, 2048); - if (len != 2048) - I_Error("Cosine table incorrect size"); -#if B_BIG_ENDIAN == 1 - for (int i = 0; i < 512; i++) - { - costable[i] = LittleLong(costable[i]); - } -#endif - costable[512] = 0; - for (int i = 513; i <= 1024; i++) - { - costable[i] = -costable[1024-i]; - } - for (int i = 1025; i < 2048; i++) - { - costable[i] = costable[2048 - i]; - } -} - END_BLD_NS