mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-10 12:54:50 -04:00
Fix rotations on optimization builds
I have literally zero idea why this broke. Optimizations are wild.
This commit is contained in:
@@ -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_
|
||||
|
||||
Reference in New Issue
Block a user