diff options
| author | Garrett Cox <garrettjcox@gmail.com> | 2024-10-02 22:44:36 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-02 23:44:36 -0400 |
| commit | c474a82a94db5ad2fb97dcc55db2b491906a653f (patch) | |
| tree | 04ece7d80243de4437b536a9b6bcf3bb866a2189 /mm/src/code/z_lib.c | |
| parent | 71c2c94ece12c664fe54f9959cce40776ba36dcd (diff) | |
Mirror Mode (#535)
* Mirror mode initial version
* Update mm/src/code/z_actor.c
Co-authored-by: Archez <Archez@users.noreply.github.com>
* mirror mode support for minimaps and dungeon pause map
* mirror mode support overworld pause map and song of soaring
* mirror mode support for various remaining things
* mirror mode support pause warp enhancement
* Add searchable menu item
---------
Co-authored-by: Archez <Archez@users.noreply.github.com>
Co-authored-by: Archez <archez39@me.com>
Diffstat (limited to 'mm/src/code/z_lib.c')
| -rw-r--r-- | mm/src/code/z_lib.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mm/src/code/z_lib.c b/mm/src/code/z_lib.c index b2ff2c086..5ca4d4f7a 100644 --- a/mm/src/code/z_lib.c +++ b/mm/src/code/z_lib.c @@ -1,5 +1,7 @@ #include "global.h" #include <libultraship/bridge.h> +#include "BenPort.h" +#include "2s2h/Enhancements/GameInteractor/GameInteractor.h" f32 Math_CosS(s16 angle) { return coss(angle) * SHT_MINV; @@ -223,12 +225,14 @@ void Lib_GetControlStickData(f32* outMagnitude, s16* outAngle, Input* input) { f32 y = input->rel.stick_y; f32 magnitude; + x *= GameInteractor_InvertControl(GI_INVERT_MOVEMENT_X); magnitude = sqrtf(SQ(x) + SQ(y)); *outMagnitude = (60.0f < magnitude) ? 60.0f : magnitude; if (magnitude > 0.0f) { x = input->cur.stick_x; y = input->cur.stick_y; + x *= GameInteractor_InvertControl(GI_INVERT_MOVEMENT_X); *outAngle = Math_Atan2S_XY(y, -x); } else { *outAngle = 0; |
