mirror of
https://github.com/ZDoom/Raze.git
synced 2025-05-31 09:20:59 +00:00
- Blood: Remove costable[]
.
This commit is contained in:
parent
5a57beb343
commit
059a99f7c8
3 changed files with 0 additions and 30 deletions
|
@ -435,8 +435,6 @@ void GameInterface::app_init()
|
||||||
SetTileNames();
|
SetTileNames();
|
||||||
C_InitConback(TexMan.CheckForTexture("BACKTILE", ETextureType::Any), true, 0.25);
|
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");
|
Printf(PRINT_NONOTIFY, "Initializing view subsystem\n");
|
||||||
viewInit();
|
viewInit();
|
||||||
Printf(PRINT_NONOTIFY, "Initializing dynamic fire\n");
|
Printf(PRINT_NONOTIFY, "Initializing dynamic fire\n");
|
||||||
|
|
|
@ -64,12 +64,9 @@ void warpInit(void);
|
||||||
int CheckLink(spritetype *pSprite);
|
int CheckLink(spritetype *pSprite);
|
||||||
int CheckLink(int *x, int *y, int *z, int *nSector);
|
int CheckLink(int *x, int *y, int *z, int *nSector);
|
||||||
|
|
||||||
extern int costable[2048];
|
|
||||||
|
|
||||||
int GetOctant(int x, int y);
|
int GetOctant(int x, int y);
|
||||||
void RotateVector(int *dx, int *dy, int nAngle);
|
void RotateVector(int *dx, int *dy, int nAngle);
|
||||||
void RotatePoint(int *x, int *y, int nAngle, int ox, int oy);
|
void RotatePoint(int *x, int *y, int nAngle, int ox, int oy);
|
||||||
void trigInit();
|
|
||||||
|
|
||||||
#include "m_fixed.h"
|
#include "m_fixed.h"
|
||||||
|
|
||||||
|
|
|
@ -27,8 +27,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
BEGIN_BLD_NS
|
BEGIN_BLD_NS
|
||||||
|
|
||||||
int costable[2048];
|
|
||||||
|
|
||||||
int OctantTable[8] = { 5, 6, 2, 1, 4, 7, 3, 0 };
|
int OctantTable[8] = { 5, 6, 2, 1, 4, 7, 3, 0 };
|
||||||
|
|
||||||
int GetOctant(int x, int y)
|
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));
|
*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
|
END_BLD_NS
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue