From 24fd3f1cdd345129742e1535c239ee95aeac2703 Mon Sep 17 00:00:00 2001 From: PurpleHato Date: Wed, 11 May 2022 23:46:19 +0200 Subject: [PATCH 1/4] Fixed idle animations for Two Handed Items Nintendo messed up and used a 0 instead of a 1 which basically pulled the wrong animation to load. --- soh/src/overlays/actors/ovl_player_actor/z_player.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/soh/src/overlays/actors/ovl_player_actor/z_player.c b/soh/src/overlays/actors/ovl_player_actor/z_player.c index 49ad4e6e4..c37895322 100644 --- a/soh/src/overlays/actors/ovl_player_actor/z_player.c +++ b/soh/src/overlays/actors/ovl_player_actor/z_player.c @@ -6981,7 +6981,7 @@ void func_808409CC(GlobalContext* globalCtx, Player* this) { if (sp34 < 4) { if (((sp34 != 0) && (sp34 != 3)) || ((this->rightHandType == PLAYER_MODELTYPE_RH_SHIELD) && ((sp34 == 3) || Player_GetSwordHeld(this)))) { - if ((sp34 == 0) && Player_HoldsTwoHandedWeapon(this)) { + if ((sp34 == 1) && Player_HoldsTwoHandedWeapon(this)) { sp34 = 4; } sp38 = sp34 + 9; From 2e84a351b1f2ae728d37a0e93dd5a6fd38153f17 Mon Sep 17 00:00:00 2001 From: PurpleHato Date: Thu, 12 May 2022 00:18:39 +0200 Subject: [PATCH 2/4] Used Cvars to make it part of the enhancements menu --- libultraship/libultraship/SohImGuiImpl.cpp | 1 + soh/soh/Enhancements/bootcommands.c | 1 + soh/src/overlays/actors/ovl_player_actor/z_player.c | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp index 785a29dee..042b30a7f 100644 --- a/libultraship/libultraship/SohImGuiImpl.cpp +++ b/libultraship/libultraship/SohImGuiImpl.cpp @@ -678,6 +678,7 @@ namespace SohImGui { ImGui::Separator(); EnhancementCheckbox("Fix L&R Pause menu", "gUniformLR"); EnhancementCheckbox("Fix Dungeon entrances", "gFixDungeonMinimapIcon"); + EnhancementCheckbox("Fix Two Handed idle animations", "gTwoHandedIdle"); EXPERIMENTAL(); diff --git a/soh/soh/Enhancements/bootcommands.c b/soh/soh/Enhancements/bootcommands.c index 03742dae9..4995b5248 100644 --- a/soh/soh/Enhancements/bootcommands.c +++ b/soh/soh/Enhancements/bootcommands.c @@ -27,6 +27,7 @@ void BootCommands_Init() CVar_RegisterS32("gMinimalUI", 0); CVar_RegisterS32("gRumbleEnabled", 0); CVar_RegisterS32("gUniformLR", 1); + CVar_RegisterS32("gTwoHandedIdle", 1); CVar_RegisterS32("gNewDrops", 0); CVar_RegisterS32("gVisualAgony", 0); CVar_RegisterS32("gLanguages", 0); //0 = English / 1 = German / 2 = French diff --git a/soh/src/overlays/actors/ovl_player_actor/z_player.c b/soh/src/overlays/actors/ovl_player_actor/z_player.c index c37895322..24ad28c4a 100644 --- a/soh/src/overlays/actors/ovl_player_actor/z_player.c +++ b/soh/src/overlays/actors/ovl_player_actor/z_player.c @@ -6981,7 +6981,7 @@ void func_808409CC(GlobalContext* globalCtx, Player* this) { if (sp34 < 4) { if (((sp34 != 0) && (sp34 != 3)) || ((this->rightHandType == PLAYER_MODELTYPE_RH_SHIELD) && ((sp34 == 3) || Player_GetSwordHeld(this)))) { - if ((sp34 == 1) && Player_HoldsTwoHandedWeapon(this)) { + if ((sp34 == 1) && Player_HoldsTwoHandedWeapon(this) && CVar_GetS32("gTwoHandedIdle", 1) == 1) { sp34 = 4; } sp38 = sp34 + 9; From 2478ed86eb65330f3c326f3be7e96be69ea3c6f9 Mon Sep 17 00:00:00 2001 From: PurpleHato Date: Thu, 12 May 2022 15:39:57 +0200 Subject: [PATCH 3/4] Tweak: Don't make the fix enabled by default --- soh/soh/Enhancements/bootcommands.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/soh/soh/Enhancements/bootcommands.c b/soh/soh/Enhancements/bootcommands.c index 4995b5248..71bd00cac 100644 --- a/soh/soh/Enhancements/bootcommands.c +++ b/soh/soh/Enhancements/bootcommands.c @@ -27,7 +27,7 @@ void BootCommands_Init() CVar_RegisterS32("gMinimalUI", 0); CVar_RegisterS32("gRumbleEnabled", 0); CVar_RegisterS32("gUniformLR", 1); - CVar_RegisterS32("gTwoHandedIdle", 1); + CVar_RegisterS32("gTwoHandedIdle", 0); CVar_RegisterS32("gNewDrops", 0); CVar_RegisterS32("gVisualAgony", 0); CVar_RegisterS32("gLanguages", 0); //0 = English / 1 = German / 2 = French From 247360cbf0e712e029caeaffa024d52757620ce5 Mon Sep 17 00:00:00 2001 From: Ada <60364512+GreatArgorath@users.noreply.github.com> Date: Sat, 14 May 2022 20:08:17 +0100 Subject: [PATCH 4/4] Adds tooltip function and tooltips to various ImGui menu items (#306) * Adds tooltip function and tooltips to various ImGui menu items * Update SohImGuiImpl.cpp * Adds more tooltips and changes input scale tooltip Adds for anti-aliasing settings, cheats, and debug settings Changes tooltip for input scale to be more clear * Fixes typos, makes N64 mode more clear, and americanizes it * Update SohImGuiImpl.cpp * Standardises D-pad spelling * Update SohImGuiImpl.cpp * Fixes typo, changes dungeon entrances tooltip, and fixes tabs * Clearer wording * Removes full stop * Removes spaces from new line * Removes space after \n * Makes Linux compile * Fixes wording --- libultraship/libultraship/SohImGuiImpl.cpp | 36 ++++++++++++++++++++-- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp index 042b30a7f..8e4becaab 100644 --- a/libultraship/libultraship/SohImGuiImpl.cpp +++ b/libultraship/libultraship/SohImGuiImpl.cpp @@ -505,6 +505,11 @@ namespace SohImGui { } } + void Tooltip(std::string text){ + if (ImGui::IsItemHovered()) + ImGui::SetTooltip("%s", text.c_str()); + } + void DrawMainMenuAndCalculateGameSize() { console->Update(); ImGuiBackendNewFrame(); @@ -603,15 +608,17 @@ namespace SohImGui { } EnhancementCheckbox("Show Inputs", "gInputEnabled"); + Tooltip("Shows currently pressed inputs on the bottom right of the screen"); EnhancementCheckbox("Rumble Enabled", "gRumbleEnabled"); EnhancementSliderFloat("Input Scale: %.1f", "##Input", "gInputScale", 1.0f, 3.0f, "", 1.0f, false); + Tooltip("Sets the on screen size of the displayed inputs from Show Inputs"); ImGui::Separator(); - EnhancementCheckbox("Dpad Support on Pause and File Select", "gDpadPauseName"); - EnhancementCheckbox("DPad Support in Ocarina and Text Choice", "gDpadOcarinaText"); - EnhancementCheckbox("DPad Support for Browsing Shop Items", "gDpadShop"); + EnhancementCheckbox("D-pad Support on Pause and File Select", "gDpadPauseName"); + EnhancementCheckbox("D-pad Support in Ocarina and Text Choice", "gDpadOcarinaText"); + EnhancementCheckbox("D-pad Support for Browsing Shop Items", "gDpadShop"); ImGui::EndMenu(); } @@ -619,8 +626,10 @@ namespace SohImGui { if (ImGui::BeginMenu("Graphics")) { EnhancementSliderInt("Internal Resolution: %dx", "##IMul", "gInternalResolution", 1, 8, ""); + Tooltip("Increases the render resolution of the game, up to 8x your output resolution,\nas a more intensive but effective form of anti-aliasing"); gfx_current_dimensions.internal_mul = CVar_GetS32("gInternalResolution", 1); EnhancementSliderInt("MSAA: %d", "##IMSAA", "gMSAAValue", 1, 8, ""); + Tooltip("Activates anti-aliasing when above 1, up to 8x for 8 samples for every pixel"); gfx_msaa_level = CVar_GetS32("gMSAAValue", 1); EXPERIMENTAL(); @@ -659,31 +668,42 @@ namespace SohImGui { EnhancementSliderInt("King Zora Speed: %dx", "##WEEPSPEED", "gMweepSpeed", 1, 5, ""); EnhancementCheckbox("Skip Text", "gSkipText"); + Tooltip("Holding down B skips text"); EnhancementCheckbox("Minimal UI", "gMinimalUI"); + Tooltip("Hides most of the UI when not needed"); EnhancementCheckbox("MM Bunny Hood", "gMMBunnyHood"); + Tooltip("Wearing the Bunny Hood grants a speed increase like in Majora's Mask"); EnhancementCheckbox("Visual Stone of Agony", "gVisualAgony"); + Tooltip("Displays an icon and plays a sound when Stone of Agony should be activated, for those without rumble"); ImGui::Text("Graphics"); ImGui::Separator(); EnhancementCheckbox("N64 Mode", "gN64Mode"); + Tooltip("Sets aspect ratio to 4:3 and lowers resolution to 240p, the N64's native resolution"); EnhancementCheckbox("Animated Link in Pause Menu", "gPauseLiveLink"); EnhancementCheckbox("Enable 3D Dropped items", "gNewDrops"); EnhancementCheckbox("Faster Block Push", "gFasterBlockPush"); EnhancementCheckbox("Dynamic Wallet Icon", "gDynamicWalletIcon"); + Tooltip("Changes the rupee in the wallet icon to match the wallet size you currently have"); EnhancementCheckbox("Always show dungeon entrances", "gAlwaysShowDungeonMinimapIcon"); + Tooltip("Always shows dungeon entrance icons on the minimap"); ImGui::Text("Fixes"); ImGui::Separator(); EnhancementCheckbox("Fix L&R Pause menu", "gUniformLR"); + Tooltip("Makes the L and R buttons in the pause menu the same color"); EnhancementCheckbox("Fix Dungeon entrances", "gFixDungeonMinimapIcon"); + Tooltip("Show dungeon entrances icon only when it should be"); EnhancementCheckbox("Fix Two Handed idle animations", "gTwoHandedIdle"); + Tooltip("Makes two handed idle animation play, a seemingly finished animation that was disabled on accident in the original game"); EXPERIMENTAL(); EnhancementCheckbox("60 fps interpolation", "g60FPS"); EnhancementCheckbox("Disable LOD", "gDisableLOD"); + Tooltip("Turns off the level of detail setting, making models always use their higher poly variants"); ImGui::EndMenu(); } @@ -725,12 +745,19 @@ namespace SohImGui { } EnhancementCheckbox("No Clip", "gNoClip"); + Tooltip("Allows you to walk through walls"); EnhancementCheckbox("Climb Everything", "gClimbEverything"); + Tooltip("Makes every surface in the game climbable"); EnhancementCheckbox("Moon Jump on L", "gMoonJumpOnL"); + Tooltip("Holding L makes you float into the air"); EnhancementCheckbox("Super Tunic", "gSuperTunic"); + Tooltip("Makes every tunic have the effects of every other tunic"); EnhancementCheckbox("Easy ISG", "gEzISG"); + Tooltip("Automatically activates the Infinite Sword glitch, making you constantly swing your sword"); EnhancementCheckbox("Unrestricted Items", "gNoRestrictItems"); + Tooltip("Allows you to use all items at any age"); EnhancementCheckbox("Freeze Time", "gFreezeTime"); + Tooltip("Freezes the time of day"); ImGui::EndMenu(); } @@ -738,9 +765,12 @@ namespace SohImGui { if (ImGui::BeginMenu("Developer Tools")) { EnhancementCheckbox("OoT Debug Mode", "gDebugEnabled"); + Tooltip("Enables Debug Mode, allowing you to select maps with L + R + Z, noclip with L + D-pad Right,\nand open the debug menu with L on the pause screen"); ImGui::Separator(); EnhancementCheckbox("Stats", "gStatsEnabled"); + Tooltip("Shows the stats window, with your FPS and frametimes, and the OS you're playing on"); EnhancementCheckbox("Console", "gConsoleEnabled"); + Tooltip("Enables the console window, allowing you to input commands, type help for some examples"); console->opened = CVar_GetS32("gConsoleEnabled", 0); ImGui::EndMenu();