- Blood: Remove costable[].

This commit is contained in:
Mitch Richters 2021-10-30 17:35:08 +11:00 committed by Christoph Oelckers
parent 5a57beb343
commit 059a99f7c8
3 changed files with 0 additions and 30 deletions

View file

@ -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");

View file

@ -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"

View file

@ -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