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

This commit is contained in:
Mitchell Richters 2020-11-15 21:29:39 +11:00 committed by Christoph Oelckers
parent 3d7d31a5b7
commit 09a560cb6d

View file

@ -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;
}