From c927403fa506bccf6b4a7e045e9cb1a91344bdce Mon Sep 17 00:00:00 2001 From: PurpleHato Date: Tue, 7 Jun 2022 23:05:33 +0200 Subject: [PATCH] Fixed: Kaleido Link Rotation I made a fucksie woopsie while refactoring --- libultraship/libultraship/SohImGuiImpl.cpp | 8 ++++---- .../ovl_kaleido_scope/z_kaleido_equipment.c | 20 +++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp index 4f084549f..1738f30de 100644 --- a/libultraship/libultraship/SohImGuiImpl.cpp +++ b/libultraship/libultraship/SohImGuiImpl.cpp @@ -882,13 +882,13 @@ namespace SohImGui { { if (ImGui::BeginMenu("Animated Link in Pause Menu")) { ImGui::Text("Rotation"); - EnhancementRadioButton("Disabled", "gPauseLiveRotation", 0); - EnhancementRadioButton("Rotate Link with D-pad", "gPauseLiveRotation", 1); + EnhancementRadioButton("Disabled", "gPauseLiveLinkRotation", 0); + EnhancementRadioButton("Rotate Link with D-pad", "gPauseLiveLinkRotation", 1); Tooltip("Allow you to rotate Link on the Equipment menu with the DPAD\nUse DPAD-Up or DPAD-Down to reset Link's rotation"); - EnhancementRadioButton("Rotate Link with C-buttons", "gPauseLiveRotation", 2); + EnhancementRadioButton("Rotate Link with C-buttons", "gPauseLiveLinkRotation", 2); Tooltip("Allow you to rotate Link on the Equipment menu with the C-buttons\nUse C-Up or C-Down to reset Link's rotation"); - if (CVar_GetS32("gPauseLiveRotation", 0) != 0) { + if (CVar_GetS32("gPauseLiveLinkRotation", 0) != 0) { EnhancementSliderInt("Rotation Speed: %d", "##MinRotationSpeed", "gPauseLiveLinkRotationSpeed", 1, 20, ""); } ImGui::Separator(); diff --git a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c index 125981bff..9e5bca1d1 100644 --- a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c +++ b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c @@ -98,8 +98,8 @@ void KaleidoScope_DrawPlayerWork(GlobalContext* globalCtx) { f32 scale; Input* input = &globalCtx->state.input[0]; s16 RotationSpeed = 150 * CVar_GetS32("gPauseLiveLinkRotationSpeed", 0); - bool AllowCRotation = (CVar_GetS32("gPauseLiveLinkRotation", 0) == 2) ? true : false; - bool AllowDPadRotation = (CVar_GetS32("gPauseLiveLinkRotation", 0) == 1) ? true : false; + u8 AllowCRotation = (CVar_GetS32("gPauseLiveLinkRotation", 0) == 2) ? 1 : 0; + u8 AllowDPadRotation = (CVar_GetS32("gPauseLiveLinkRotation", 0) == 1) ? 1 : 0; if (LINK_AGE_IN_YEARS == YEARS_CHILD) { pos.x = 2.0f; @@ -120,19 +120,19 @@ void KaleidoScope_DrawPlayerWork(GlobalContext* globalCtx) { link_kaleido_rot.x = link_kaleido_rot.z = 0; - if (AllowDPadRotation && CHECK_BTN_ALL(input->cur.button, BTN_DLEFT) || - AllowCRotation && CHECK_BTN_ALL(input->cur.button, BTN_CLEFT)) { + if ((AllowDPadRotation && CHECK_BTN_ALL(input->cur.button, BTN_DLEFT)) || + (AllowCRotation && CHECK_BTN_ALL(input->cur.button, BTN_CLEFT))) { link_kaleido_rot.y = link_kaleido_rot.y - RotationSpeed; - } else if (AllowDPadRotation && CHECK_BTN_ALL(input->cur.button, BTN_DRIGHT) || - AllowCRotation && CHECK_BTN_ALL(input->cur.button, BTN_CRIGHT)) { + } else if ((AllowDPadRotation && CHECK_BTN_ALL(input->cur.button, BTN_DRIGHT)) || + (AllowCRotation && CHECK_BTN_ALL(input->cur.button, BTN_CRIGHT))) { link_kaleido_rot.y = link_kaleido_rot.y + RotationSpeed; } - if (AllowDPadRotation && CHECK_BTN_ALL(input->press.button, BTN_DUP) || - AllowDPadRotation && CHECK_BTN_ALL(input->press.button, BTN_DDOWN)) { + if ((AllowDPadRotation && CHECK_BTN_ALL(input->press.button, BTN_DUP)) || + (AllowDPadRotation && CHECK_BTN_ALL(input->press.button, BTN_DDOWN))) { link_kaleido_rot.y = 32300; - } else if (AllowCRotation && CHECK_BTN_ALL(input->press.button, BTN_CUP) || - AllowCRotation && CHECK_BTN_ALL(input->press.button, BTN_CDOWN)) { + } else if ((AllowCRotation && CHECK_BTN_ALL(input->press.button, BTN_CUP)) || + (AllowCRotation && CHECK_BTN_ALL(input->press.button, BTN_CDOWN))) { link_kaleido_rot.y = 32300; }