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

This commit is contained in:
Mitchell Richters 2020-11-15 21:39:06 +11:00 committed by Christoph Oelckers
parent a5082d24d9
commit a7a223c13d

View file

@ -65,8 +65,8 @@ void SOwallmove(SECTOR_OBJECTp sop, SPRITEp sp, WALLp find_wallp, int dist, int
ASSERT(User[sp - sprite]); ASSERT(User[sp - sprite]);
ang = User[sp - sprite]->sang; ang = User[sp - sprite]->sang;
*nx = ((dist * sintable[NORM_ANGLE(ang + 512)])>>14); *nx = mulscale14(dist, bcos(ang));
*ny = ((dist * sintable[ang])>>14); *ny = mulscale14(dist, bsin(ang));
sop->xorig[wallcount] -= *nx; sop->xorig[wallcount] -= *nx;
sop->yorig[wallcount] -= *ny; sop->yorig[wallcount] -= *ny;
@ -101,8 +101,8 @@ int DoWallMove(SPRITEp sp)
if (dang) if (dang)
ang = NORM_ANGLE(ang + (RANDOM_RANGE(dang) - dang/2)); ang = NORM_ANGLE(ang + (RANDOM_RANGE(dang) - dang/2));
nx = (dist * sintable[NORM_ANGLE(ang + 512)])>>14; nx = mulscale14(dist, bcos(ang));
ny = (dist * sintable[ang])>>14; ny = mulscale14(dist, bsin(ang));
for (wallp = wall; wallp < &wall[numwalls]; wallp++) for (wallp = wall; wallp < &wall[numwalls]; wallp++)
{ {