- buildutils: Replace `sintable[]` use within SW's bunny.cpp with `bsin()`/`bcos()`.

This commit is contained in:
Mitchell Richters 2020-11-15 20:27:11 +11:00 committed by Christoph Oelckers
parent 156709d6bf
commit 4192416268
1 changed files with 3 additions and 3 deletions

View File

@ -859,7 +859,7 @@ DoBunnyBeginJumpAttack(short SpriteNum)
tang = getangle(psp->x - sp->x, psp->y - sp->y);
if (move_sprite(SpriteNum, sintable[NORM_ANGLE(tang+512)] >> 7, sintable[tang] >> 7,
if (move_sprite(SpriteNum, bcos(tang, -7), bsin(tang, -7),
0L, u->ceiling_dist, u->floor_dist, CLIPMASK_ACTOR, ACTORMOVETICS))
sp->ang = NORM_ANGLE(sp->ang + 1024) + (RANDOM_NEG(256, 6) >> 6);
else
@ -895,8 +895,8 @@ DoBunnyMoveJump(short SpriteNum)
int nx, ny;
// Move while jumping
nx = sp->xvel * (int) sintable[NORM_ANGLE(sp->ang + 512)] >> 14;
ny = sp->xvel * (int) sintable[sp->ang] >> 14;
nx = mulscale14(sp->xvel, bcos(sp->ang));
ny = mulscale14(sp->xvel, bsin(sp->ang));
move_actor(SpriteNum, nx, ny, 0L);