SBSPSS/source/utils/utils.cpp
2000-08-29 19:54:22 +00:00

53 lines
1.2 KiB
C++

/******************/
/*** Misc Utils ***/
/******************/
#include "system\global.h"
#include "utils\utils.h"
#include "gfx\Prim.h"
#ifndef __VID_HEADER_
#include "system/vid.h"
#endif
#ifndef __SYSTEM_GSTATE_H__
#include "system\gstate.h"
#endif
#ifndef __MATHTABLE_HEADER__
#include "utils\mathtab.h"
#endif
/*****************************************************************************/
const s16 c_circle[ NO_SIN ] =
{
0,25,49,74,97,120,142,162,181,197,212,225,236,244,251,254,
255,254,251,244,236,225,212,197,181,162,142,120,97,74,49,25,
0,-25,-49,-74,-97,-120,-142,-162,-181,-197,-212,-225,-236,-244,-251,-254,
-255,-254,-251,-244,-236,-225,-212,-197,-181,-162,-142,-120,-97,-74,-49,-25
};
/*****************************************************************************/
const MATRIX IdentityMtx =
{
{{ONE, 0, 0},
{ 0,ONE, 0},
{ 0, 0,ONE}},
{ 0, 0, 0},
};
/*****************************************************************************/
const u32 NOTNEG = ((u32)1<<(u32)31) | ((u32)1<<(u32)15);
long s_randomSeed;
/*****************************************************************************/
u8 *MakePtr(void *BasePtr,int Offset)
{
u8 *Ret;
Ret=(u8*)BasePtr+(Offset);
return(Ret);
}