Configurable wall kick angle in degrees

This commit is contained in:
Arceveti committed 2021-09-27 14:00:10 -07:00
1 parent ae91a98422
commit 3f4728e337
7 files changed
+59 -93

No files matched your search

+6
View File
@@ -869,6 +869,12 @@ s32 approach_s16_asymptotic(s16 current, s16 target, s16 divisor) {
return current;
}
s16 abs_angle_diff(s16 a0, s16 a1) {
s16 diff = (a1 - a0);
if (diff == -0x8000) diff = -0x7FFF;
return ABSI(diff);
}
/**
* Helper function for atan2s. Does a look up of the arctangent of y/x assuming
* the resulting angle is in range [0, 0x2000] (1/8 of a circle).