Fix rotations on optimization builds

I have literally zero idea why this broke. Optimizations are wild.
This commit is contained in:
Jeffrey Crowell
2026-03-15 18:27:25 -04:00
parent 4fd2ddd67a
commit 91fac9b4a0
3 changed files with 22 additions and 0 deletions
+11
View File
@@ -85,4 +85,15 @@
#define ANGLE_SUB_2 S16_SUB_2
#define ANGLE_MULT_2 S16_MULT_2
#if TARGET_PC
static inline s16 cAngle_degreeToS16(f32 deg) {
s32 angle = (s32)(deg * (0x8000 / 180.0f));
angle &= 0xFFFF;
if (angle >= 0x8000) {
angle -= 0x10000;
}
return (s16)angle;
}
#endif
#endif // !_ANGLE_UTILS_H_