From a7a223c13d6e95e844765773d459cc1e9be79bbe Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Sun, 15 Nov 2020 21:39:06 +1100 Subject: [PATCH] - buildutils: Replace `sintable[]` use within SW's wallmove.cpp with `bsin()`/`bcos()`. --- source/sw/src/wallmove.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/sw/src/wallmove.cpp b/source/sw/src/wallmove.cpp index 3ec489eaf..870c3b7f3 100644 --- a/source/sw/src/wallmove.cpp +++ b/source/sw/src/wallmove.cpp @@ -65,8 +65,8 @@ void SOwallmove(SECTOR_OBJECTp sop, SPRITEp sp, WALLp find_wallp, int dist, int ASSERT(User[sp - sprite]); ang = User[sp - sprite]->sang; - *nx = ((dist * sintable[NORM_ANGLE(ang + 512)])>>14); - *ny = ((dist * sintable[ang])>>14); + *nx = mulscale14(dist, bcos(ang)); + *ny = mulscale14(dist, bsin(ang)); sop->xorig[wallcount] -= *nx; sop->yorig[wallcount] -= *ny; @@ -101,8 +101,8 @@ int DoWallMove(SPRITEp sp) if (dang) ang = NORM_ANGLE(ang + (RANDOM_RANGE(dang) - dang/2)); - nx = (dist * sintable[NORM_ANGLE(ang + 512)])>>14; - ny = (dist * sintable[ang])>>14; + nx = mulscale14(dist, bcos(ang)); + ny = mulscale14(dist, bsin(ang)); for (wallp = wall; wallp < &wall[numwalls]; wallp++) {