mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
- buildutils: Replace sintable[]
use within SW's game.h with bsin()
/bcos()
.
This commit is contained in:
parent
ffd768ab71
commit
f0be96c385
1 changed files with 3 additions and 3 deletions
|
@ -267,8 +267,8 @@ int StdRandomRange(int range);
|
|||
|
||||
#define RANDOM_NEG(x,y) ((RANDOM_P2(((x)<<(y))<<1) - (x))<<(y))
|
||||
|
||||
#define MOVEx(vel,ang) (((int)(vel) * (int)sintable[NORM_ANGLE((ang) + 512)]) >> 14)
|
||||
#define MOVEy(vel,ang) (((int)(vel) * (int)sintable[NORM_ANGLE((ang))]) >> 14)
|
||||
#define MOVEx(vel,ang) (mulscale14(vel, bcos(ang)))
|
||||
#define MOVEy(vel,ang) (mulscale14(vel, bsin(ang)))
|
||||
|
||||
#define DIST(x1, y1, x2, y2) ksqrt( SQ((x1) - (x2)) + SQ((y1) - (y2)) )
|
||||
|
||||
|
@ -353,7 +353,7 @@ int StdRandomRange(int range);
|
|||
|
||||
#define SQ(val) ((val) * (val))
|
||||
|
||||
#define KENFACING_PLAYER(pp,sp) (sintable[NORM_ANGLE(sp->ang+512)]*(pp->posy-sp->y) >= sintable[NORM_ANGLE(sp-ang)]*(pp->posx-sp->x))
|
||||
#define KENFACING_PLAYER(pp,sp) (bcos(sp->ang)*(pp->posy-sp->y) >= bsin(sp-ang)*(pp->posx-sp->x))
|
||||
#define FACING_PLAYER(pp,sp) (abs(getincangle(getangle((pp)->posx - (sp)->x, (pp)->posy - (sp)->y), (sp)->ang)) < 512)
|
||||
#define PLAYER_FACING(pp,sp) (abs(getincangle(getangle((sp)->x - (pp)->posx, (sp)->y - (pp)->posy), (pp)->angle.ang.asbuild())) < 320)
|
||||
#define FACING(sp1,sp2) (abs(getincangle(getangle((sp1)->x - (sp2)->x, (sp1)->y - (sp2)->y), (sp2)->ang)) < 512)
|
||||
|
|
Loading…
Reference in a new issue