From 09a560cb6ddddfda761cbc638cce246e232d30e1 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Sun, 15 Nov 2020 21:29:39 +1100 Subject: [PATCH] - buildutils: Replace `sintable[]` use within SW's skull.cpp with `bsin()`/`bcos()`. --- source/sw/src/skull.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/sw/src/skull.cpp b/source/sw/src/skull.cpp index d15ecd1ca..50390baff 100644 --- a/source/sw/src/skull.cpp +++ b/source/sw/src/skull.cpp @@ -438,8 +438,8 @@ int DoSkullBob(short SpriteNum) #define SKULL_BOB_AMT (Z(16)) u->Counter = (u->Counter + (ACTORMOVETICS << 3) + (ACTORMOVETICS << 1)) & 2047; - sp->z = u->sz + ((SKULL_BOB_AMT * (int)sintable[u->Counter]) >> 14) + - ((DIV2(SKULL_BOB_AMT) * (int)sintable[u->Counter]) >> 14); + sp->z = u->sz + mulscale14(SKULL_BOB_AMT, bsin(u->Counter)) + + mulscale14(DIV2(SKULL_BOB_AMT), bsin(u->Counter)); return 0; } @@ -849,8 +849,8 @@ int DoBettyBob(short SpriteNum) #define BETTY_BOB_AMT (Z(16)) u->Counter = (u->Counter + (ACTORMOVETICS << 3) + (ACTORMOVETICS << 1)) & 2047; - sp->z = u->sz + ((BETTY_BOB_AMT * (int)sintable[u->Counter]) >> 14) + - ((DIV2(BETTY_BOB_AMT) * (int)sintable[u->Counter]) >> 14); + sp->z = u->sz + mulscale14(BETTY_BOB_AMT, bsin(u->Counter)) + + mulscale14(DIV2(BETTY_BOB_AMT), bsin(u->Counter)); return 0; }