From 723375a34450087729de4f7bdd8d31f56feb55ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20Dub=C3=A9?= Date: Thu, 20 Mar 2025 02:19:19 +0000 Subject: [PATCH 1/7] fix type signature of Randomizer_DrawMysteryItem (#5156) --- soh/soh/Enhancements/randomizer/3drando/shops.cpp | 3 +++ soh/soh/Enhancements/randomizer/draw.cpp | 2 +- soh/soh/Enhancements/randomizer/draw.h | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/soh/soh/Enhancements/randomizer/3drando/shops.cpp b/soh/soh/Enhancements/randomizer/3drando/shops.cpp index edaf8aa5d..75120fa41 100644 --- a/soh/soh/Enhancements/randomizer/3drando/shops.cpp +++ b/soh/soh/Enhancements/randomizer/3drando/shops.cpp @@ -275,6 +275,9 @@ int GetShopsanityReplaceAmount() { return 7; } else if (ctx->GetOption(RSK_SHOPSANITY_COUNT).Is(RO_SHOPSANITY_COUNT_EIGHT_ITEMS)) { return 8; //temporarily unreachable due to logic limitations + } else { + assert(false); + return 0; } } else { //Random, get number in [1, 7] return Random(1, 8); diff --git a/soh/soh/Enhancements/randomizer/draw.cpp b/soh/soh/Enhancements/randomizer/draw.cpp index 73b4142de..9c9cfd829 100644 --- a/soh/soh/Enhancements/randomizer/draw.cpp +++ b/soh/soh/Enhancements/randomizer/draw.cpp @@ -504,7 +504,7 @@ extern "C" void Randomizer_DrawTriforcePieceGI(PlayState* play, GetItemEntry get CLOSE_DISPS(play->state.gfxCtx); } -extern "C" void Randomizer_DrawMysteryItem(PlayState* play, GetItemEntry getItemEntry) { +extern "C" void Randomizer_DrawMysteryItem(PlayState* play, GetItemEntry* getItemEntry) { Color_RGB8 color = { 0, 60, 100 }; if (CVarGetInteger(CVAR_COSMETIC("World.MysteryItem.Changed"), 0)) { color = CVarGetColor24(CVAR_COSMETIC("World.MysteryItem.Value"), color); diff --git a/soh/soh/Enhancements/randomizer/draw.h b/soh/soh/Enhancements/randomizer/draw.h index aaac71e06..22d8466c6 100644 --- a/soh/soh/Enhancements/randomizer/draw.h +++ b/soh/soh/Enhancements/randomizer/draw.h @@ -23,7 +23,7 @@ void Randomizer_DrawOcarinaButton(PlayState* play, GetItemEntry* getItemEntry); void Randomizer_DrawBronzeScale(PlayState* play, GetItemEntry* getItemEntry); void Randomizer_DrawFishingPoleGI(PlayState* play, GetItemEntry* getItemEntry); void Randomizer_DrawSkeletonKey(PlayState* play, GetItemEntry* getItemEntry); -void Randomizer_DrawMysteryItem(PlayState* play, GetItemEntry getItemEntry); +void Randomizer_DrawMysteryItem(PlayState* play, GetItemEntry* getItemEntry); void Randomizer_DrawBombchuBagInLogic(PlayState* play, GetItemEntry* getItemEntry); void Randomizer_DrawBombchuBag(PlayState* play, GetItemEntry* getItemEntry); void Randomizer_DrawOverworldKey(PlayState* play, GetItemEntry* getItemEntry); From b3ed24902151115d6a38e58ceebd1ee6567c4611 Mon Sep 17 00:00:00 2001 From: Christopher Leggett Date: Wed, 19 Mar 2025 23:03:42 -0400 Subject: [PATCH 2/7] Fix Pot Shuffle crash caused by removal of id check (#5158) * Fix Pot Shuffle crash caused by removal of id check. * Properly unregister ShufflePots Hook --- soh/soh/Enhancements/randomizer/hook_handlers.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/soh/soh/Enhancements/randomizer/hook_handlers.cpp b/soh/soh/Enhancements/randomizer/hook_handlers.cpp index a4db9f428..f0baa4c35 100644 --- a/soh/soh/Enhancements/randomizer/hook_handlers.cpp +++ b/soh/soh/Enhancements/randomizer/hook_handlers.cpp @@ -2389,7 +2389,7 @@ void RandomizerRegisterHooks() { GameInteractor::Instance->UnregisterGameHook(fishsanityOnVanillaBehaviorHook); GameInteractor::Instance->UnregisterGameHook(fishsanityOnItemReceiveHook); - GameInteractor::Instance->UnregisterGameHook(shufflePotsOnActorInitHook); + GameInteractor::Instance->UnregisterGameHookForID(shufflePotsOnActorInitHook); GameInteractor::Instance->UnregisterGameHook(shufflePotsOnVanillaBehaviorHook); GameInteractor::Instance->UnregisterGameHook(shuffleFreestandingOnVanillaBehaviorHook); @@ -2465,7 +2465,7 @@ void RandomizerRegisterHooks() { } if (RAND_GET_OPTION(RSK_SHUFFLE_POTS) != RO_SHUFFLE_POTS_OFF) { - shufflePotsOnActorInitHook = GameInteractor::Instance->RegisterGameHook(ObjTsubo_RandomizerInit); + shufflePotsOnActorInitHook = GameInteractor::Instance->RegisterGameHookForID(ACTOR_OBJ_TSUBO, ObjTsubo_RandomizerInit); shufflePotsOnVanillaBehaviorHook = GameInteractor::Instance->RegisterGameHook(ShufflePots_OnVanillaBehaviorHandler); } From 8958db5c2bb32adcf57bf86049c91aa8f5a5fe54 Mon Sep 17 00:00:00 2001 From: Christopher Leggett Date: Thu, 20 Mar 2025 00:21:31 -0400 Subject: [PATCH 3/7] Fix CVar mismatches for skip forced dialog and unrestricted items. (#5159) --- soh/soh/SohGui/SohMenu.h | 7 +++++++ soh/soh/SohGui/SohMenuEnhancements.cpp | 9 ++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/soh/soh/SohGui/SohMenu.h b/soh/soh/SohGui/SohMenu.h index 3e5f7a555..dacb98936 100644 --- a/soh/soh/SohGui/SohMenu.h +++ b/soh/soh/SohGui/SohMenu.h @@ -67,6 +67,13 @@ static const std::unordered_map dekuStickCheat = { { DEKU_STICK_UNBREAKABLE_AND_ALWAYS_ON_FIRE, "Unbreakable + Always on Fire" } }; +static const std::unordered_map skipForcedDialogOptions = { + { FORCED_DIALOG_SKIP_NONE, "None" }, + { FORCED_DIALOG_SKIP_NAVI, "Navi" }, + { FORCED_DIALOG_SKIP_NPC, "NPCs" }, + { FORCED_DIALOG_SKIP_ALL, "All" } +}; + static const std::unordered_map skipGetItemAnimationOptions = { { SGIA_DISABLED, "Disabled" }, { SGIA_JUNK, "Junk Items" }, diff --git a/soh/soh/SohGui/SohMenuEnhancements.cpp b/soh/soh/SohGui/SohMenuEnhancements.cpp index 1f3066806..d8368f299 100644 --- a/soh/soh/SohGui/SohMenuEnhancements.cpp +++ b/soh/soh/SohGui/SohMenuEnhancements.cpp @@ -330,9 +330,12 @@ void SohMenu::AddMenuEnhancements() { AddWidget(path, "Skip Pickup Messages", WIDGET_CVAR_CHECKBOX) .CVar(CVAR_ENHANCEMENT("FastDrops")) .Options(CheckboxOptions().Tooltip("Skip Pickup Messages for new Consumable Items and Bottle Swipes.")); - AddWidget(path, "Skip Forced Dialog", WIDGET_CVAR_CHECKBOX) + AddWidget(path, "Skip Forced Dialog", WIDGET_CVAR_COMBOBOX) .CVar(CVAR_ENHANCEMENT("TimeSavers.SkipForcedDialog")) - .Options(CheckboxOptions().Tooltip("Prevent forced conversations with Navi or other NPCs.")); + .Options(ComboboxOptions() + .ComboMap(skipForcedDialogOptions) + .DefaultIndex(FORCED_DIALOG_SKIP_NONE) + .Tooltip("Prevent forced conversations with Navi and/or other NPCs.")); AddWidget(path, "Skip Text", WIDGET_CVAR_CHECKBOX) .CVar(CVAR_ENHANCEMENT("SkipText")) .Options(CheckboxOptions().Tooltip("Holding down B skips text.")); @@ -1592,7 +1595,7 @@ void SohMenu::AddMenuEnhancements() { .Options(CheckboxOptions().Tooltip("Allows any item to be equipped, regardless of age.\n" "Also allows Child to use Adult strength upgrades.")); AddWidget(path, "Unrestricted Items", WIDGET_CVAR_CHECKBOX) - .CVar(CVAR_CHEAT("Unrestricted Items")) + .CVar(CVAR_CHEAT("NoRestrictItems")) .Options(CheckboxOptions().Tooltip("Allows you to use any item at any location")); AddWidget(path, "Super Tunic", WIDGET_CVAR_CHECKBOX) .CVar(CVAR_CHEAT("SuperTunic")) From f02032aed4e2132173628b1bd648c12745d0b721 Mon Sep 17 00:00:00 2001 From: Jordan Longstaff Date: Thu, 20 Mar 2025 07:07:43 -0400 Subject: [PATCH 4/7] Skip dialogue before getting Gerudo membership card (#5058) * Skip dialogue before getting Gerudo membership card * Change to misc interaction * Change to forced NPC dialogue * Rename VB flag --- .../game-interactor/vanilla-behavior/GIVanillaBehavior.h | 8 ++++++++ soh/soh/Enhancements/timesaver_hook_handlers.cpp | 6 ++++++ soh/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c | 3 ++- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/soh/soh/Enhancements/game-interactor/vanilla-behavior/GIVanillaBehavior.h b/soh/soh/Enhancements/game-interactor/vanilla-behavior/GIVanillaBehavior.h index c8a0f747c..d6154347c 100644 --- a/soh/soh/Enhancements/game-interactor/vanilla-behavior/GIVanillaBehavior.h +++ b/soh/soh/Enhancements/game-interactor/vanilla-behavior/GIVanillaBehavior.h @@ -405,6 +405,14 @@ typedef enum { // - `*int16_t` (item id) VB_DRAW_AMMO_COUNT, + // #### `result` + // ```c + // (Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play) + // ``` + // #### `args` + // - None + VB_END_GERUDO_MEMBERSHIP_TALK, + // #### `result` // ```c // !(this->stateFlags3 & PLAYER_STATE3_PAUSE_ACTION_FUNC) diff --git a/soh/soh/Enhancements/timesaver_hook_handlers.cpp b/soh/soh/Enhancements/timesaver_hook_handlers.cpp index a46ebb814..2c84ecac2 100644 --- a/soh/soh/Enhancements/timesaver_hook_handlers.cpp +++ b/soh/soh/Enhancements/timesaver_hook_handlers.cpp @@ -386,6 +386,12 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, va_li } break; } + case VB_END_GERUDO_MEMBERSHIP_TALK: { + if (ForcedDialogIsDisabled(FORCED_DIALOG_SKIP_NPC)) { + *should = true; + } + break; + } case VB_GORON_LINK_BE_SCARED: { if (ForcedDialogIsDisabled(FORCED_DIALOG_SKIP_NPC)) { EnGo2* goronLink = va_arg(args, EnGo2*); diff --git a/soh/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c b/soh/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c index 24129fb2a..fb233cf0d 100644 --- a/soh/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c +++ b/soh/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c @@ -152,7 +152,8 @@ void EnGe3_WaitTillCardGiven(EnGe3* this, PlayState* play) { } void EnGe3_GiveCard(EnGe3* this, PlayState* play) { - if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) { + if (GameInteractor_Should(VB_END_GERUDO_MEMBERSHIP_TALK, + (Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play))) { Message_CloseTextbox(play); this->actor.flags &= ~ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED; this->actionFunc = EnGe3_WaitTillCardGiven; From 65564e946940bb2535e7176a1c979ae318666bce Mon Sep 17 00:00:00 2001 From: Christopher Leggett Date: Thu, 20 Mar 2025 11:46:52 -0400 Subject: [PATCH 5/7] Fix typo in Mute Low HP Alarm CVar (#5161) --- soh/soh/Enhancements/audio/AudioEditor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/soh/soh/Enhancements/audio/AudioEditor.cpp b/soh/soh/Enhancements/audio/AudioEditor.cpp index efbcd5c28..3daeff01f 100644 --- a/soh/soh/Enhancements/audio/AudioEditor.cpp +++ b/soh/soh/Enhancements/audio/AudioEditor.cpp @@ -498,7 +498,7 @@ void AudioEditor::DrawElement() { ImGui::TableNextColumn(); if (ImGui::BeginChild("SfxOptions", ImVec2(0, -8))) { UIWidgets::CVarCheckbox( - "Mute Low HP Alarm", CVAR_AUDIO("LowHPAlarm"), + "Mute Low HP Alarm", CVAR_AUDIO("LowHpAlarm"), UIWidgets::CheckboxOptions().Color(THEME_COLOR).Tooltip("Disable the low HP beeping sound.")); UIWidgets::CVarCheckbox("Disable Navi Call Audio", CVAR_AUDIO("DisableNaviCallAudio"), UIWidgets::CheckboxOptions() From b6f957b36fa43909360e97fad92b0556268a43c2 Mon Sep 17 00:00:00 2001 From: aMannus Date: Thu, 20 Mar 2025 20:19:16 +0100 Subject: [PATCH 6/7] More Menu Improvements (#5155) * fix mismatch on default value for notification position * Fix checkbox vertical offset for multiline * Moooore changeees too theee menuuuuuu * capitalization again * Fix controller config & remove test var --- .../controls/SohInputEditorWindow.cpp | 15 ++++-- soh/soh/Notification/Notification.cpp | 2 +- soh/soh/SohGui/Menu.cpp | 7 +++ soh/soh/SohGui/SohMenuEnhancements.cpp | 54 +++++++++++-------- soh/soh/SohGui/SohMenuSettings.cpp | 10 +++- soh/soh/SohGui/UIWidgets.cpp | 3 +- 6 files changed, 61 insertions(+), 30 deletions(-) diff --git a/soh/soh/Enhancements/controls/SohInputEditorWindow.cpp b/soh/soh/Enhancements/controls/SohInputEditorWindow.cpp index 135cb8a00..7dbc74a75 100644 --- a/soh/soh/Enhancements/controls/SohInputEditorWindow.cpp +++ b/soh/soh/Enhancements/controls/SohInputEditorWindow.cpp @@ -1501,10 +1501,10 @@ void SohInputEditorWindow::DrawLinkTab() { } if (ImGui::CollapsingHeader("D-Pad", NULL, ImGuiTreeNodeFlags_DefaultOpen)) { - DrawButtonLine(StringHelper::Sprintf("%s", ICON_FA_ARROW_UP).c_str(), portIndex, BTN_DUP); - DrawButtonLine(StringHelper::Sprintf("%s", ICON_FA_ARROW_DOWN).c_str(), portIndex, BTN_DDOWN); - DrawButtonLine(StringHelper::Sprintf("%s", ICON_FA_ARROW_LEFT).c_str(), portIndex, BTN_DLEFT); - DrawButtonLine(StringHelper::Sprintf("%s", ICON_FA_ARROW_RIGHT).c_str(), portIndex, BTN_DRIGHT); + DrawButtonLine(StringHelper::Sprintf("D %s", ICON_FA_ARROW_UP).c_str(), portIndex, BTN_DUP); + DrawButtonLine(StringHelper::Sprintf("D %s", ICON_FA_ARROW_DOWN).c_str(), portIndex, BTN_DDOWN); + DrawButtonLine(StringHelper::Sprintf("D %s", ICON_FA_ARROW_LEFT).c_str(), portIndex, BTN_DLEFT); + DrawButtonLine(StringHelper::Sprintf("D %s", ICON_FA_ARROW_RIGHT).c_str(), portIndex, BTN_DRIGHT); } if (ImGui::CollapsingHeader("Analog Stick", NULL, ImGuiTreeNodeFlags_DefaultOpen)) { @@ -1782,6 +1782,11 @@ void SohInputEditorWindow::DrawSetDefaultsButton(uint8_t portIndex) { } void SohInputEditorWindow::DrawElement() { + ImGui::PushFont(OTRGlobals::Instance->fontMonoLarger); + ImVec4 themeColor = ColorValues.at(THEME_COLOR); + ImGui::PushStyleColor(ImGuiCol_Tab, ImVec4(themeColor.x, themeColor.y, themeColor.z, 0.8f)); + ImGui::PushStyleColor(ImGuiCol_TabHovered, ImVec4(themeColor.x, themeColor.y, themeColor.z, 0.6f)); + ImGui::PushStyleColor(ImGuiCol_TabActive, ImVec4(themeColor.x, themeColor.y, themeColor.z, 0.6f)); ImGui::BeginTabBar("##ControllerConfigPortTabs"); DrawLinkTab(); DrawIvanTab(); @@ -1790,4 +1795,6 @@ void SohInputEditorWindow::DrawElement() { DrawDebugPortTab(3); } ImGui::EndTabBar(); + ImGui::PopStyleColor(3); + ImGui::PopFont(); } diff --git a/soh/soh/Notification/Notification.cpp b/soh/soh/Notification/Notification.cpp index ebc4e168b..5bc0e8974 100644 --- a/soh/soh/Notification/Notification.cpp +++ b/soh/soh/Notification/Notification.cpp @@ -20,7 +20,7 @@ void Window::Draw() { const float margin = 30.0f; const float padding = 10.0f; - int position = CVarGetInteger(CVAR_SETTING("Notifications.Position"), 0); + int position = CVarGetInteger(CVAR_SETTING("Notifications.Position"), 3); // Top Left ImVec2 basePosition; diff --git a/soh/soh/SohGui/Menu.cpp b/soh/soh/SohGui/Menu.cpp index 0e8f8ab51..955b048d6 100644 --- a/soh/soh/SohGui/Menu.cpp +++ b/soh/soh/SohGui/Menu.cpp @@ -519,6 +519,10 @@ void Menu::DrawElement() { ImGui::SetNextWindowPos(ImGui::GetMainViewport()->GetCenter(), windowCond, { 0.5f, 0.5f }); ImGui::PushStyleVar(ImGuiStyleVar_WindowBorderSize, 0.0f); } + + ImGui::PushStyleColor(ImGuiCol_WindowBg, + ImVec4(0, 0, 0, CVarGetFloat(CVAR_SETTING("Menu.BackgroundOpacity"), 0.85f))); + if (!ImGui::Begin("Main Menu", NULL, windowFlags)) { if (!popout) { ImGui::PopStyleVar(); @@ -526,6 +530,9 @@ void Menu::DrawElement() { ImGui::End(); return; } + + ImGui::PopStyleColor(); + if (popped != popout) { if (!popout) { ImGui::PopStyleVar(); diff --git a/soh/soh/SohGui/SohMenuEnhancements.cpp b/soh/soh/SohGui/SohMenuEnhancements.cpp index d8368f299..2e0cb55af 100644 --- a/soh/soh/SohGui/SohMenuEnhancements.cpp +++ b/soh/soh/SohGui/SohMenuEnhancements.cpp @@ -116,7 +116,7 @@ void SohMenu::AddMenuEnhancements() { AddWidget(path, "Nighttime GS Always Spawn", WIDGET_CVAR_CHECKBOX) .CVar(CVAR_ENHANCEMENT("NightGSAlwaysSpawn")) .Options(CheckboxOptions().Tooltip("Nighttime Skulltulas will spawn during both day and night.")); - AddWidget(path, "Pull Grave during the day", WIDGET_CVAR_CHECKBOX) + AddWidget(path, "Pull Grave During the Day", WIDGET_CVAR_CHECKBOX) .CVar(CVAR_ENHANCEMENT("DayGravePull")) .Options(CheckboxOptions().Tooltip("Allows graves to be pulled when child during the day.")); AddWidget(path, "Dampe Appears All Night", WIDGET_CVAR_CHECKBOX) @@ -140,7 +140,7 @@ void SohMenu::AddMenuEnhancements() { .DisabledTooltip("This is not compatible with the Locked Overworld Doors Randomizer option.")); AddWidget(path, "Pause Menu", WIDGET_SEPARATOR_TEXT); - AddWidget(path, "Allow the Cursor to be on any slot", WIDGET_CVAR_COMBOBOX) + AddWidget(path, "Allow the Cursor to be on Any Slot", WIDGET_CVAR_COMBOBOX) .CVar(CVAR_ENHANCEMENT("PauseAnyCursor")) .Options( ComboboxOptions() @@ -163,7 +163,7 @@ void SohMenu::AddMenuEnhancements() { .Options(CheckboxOptions().Tooltip( "Removes the Input Requirement on Text boxes after defeating Ganon, allowing the Credits " "Sequence to continue to progress.")); - AddWidget(path, "Include Held Inputs at the Start of Buffer Input Window", WIDGET_CVAR_CHECKBOX) + AddWidget(path, "Include Held Inputs at the Start of Pause Buffer Input Window", WIDGET_CVAR_CHECKBOX) .CVar(CVAR_ENHANCEMENT("IncludeHeldInputsBufferWindow")) .Options(CheckboxOptions().Tooltip( "Typically, inputs that are held prior to the buffer window are not included in the buffer. This " @@ -171,7 +171,15 @@ void SohMenu::AddMenuEnhancements() { "undesireably, for instance Z-Targetting something you might not want to.")); AddWidget(path, "Pause Buffer Input Window: %d frames", WIDGET_CVAR_SLIDER_INT) .CVar(CVAR_ENHANCEMENT("PauseBufferWindow")) - .Options(IntSliderOptions().Min(0).Max(40).DefaultValue(0).Format("%d frames")); + .Options(IntSliderOptions() + .Min(0) + .Max(40) + .DefaultValue(0) + .Format("%d frames") + .Tooltip("Adds back in a delay after unpausing before the game resumes playing again, " + "where inputs can be held prematurely to be input immediately after the game resumes. " + "This essentially brings back behaviour from console releases which are lost on default " + "because SoH isn't limited to N64 hardware.")); AddWidget(path, "Simulated Input Lag: %d frames", WIDGET_CVAR_SLIDER_INT) .CVar(CVAR_SIMULATED_INPUT_LAG) .Options(IntSliderOptions() @@ -214,7 +222,7 @@ void SohMenu::AddMenuEnhancements() { "The default response to Kaepora Gaebora is always that you understood what he said.")); AddWidget(path, "Convenience", WIDGET_SEPARATOR_TEXT); - AddWidget(path, "Quit Fishing At Door", WIDGET_CVAR_CHECKBOX) + AddWidget(path, "Quit Fishing at Door", WIDGET_CVAR_CHECKBOX) .CVar(CVAR_ENHANCEMENT("QuitFishingAtDoor")) .Options(CheckboxOptions().Tooltip( "Fisherman asks if you want to quit at the door if you try to leave the Fishing Pond " @@ -222,7 +230,7 @@ void SohMenu::AddMenuEnhancements() { AddWidget(path, "Instant Putaway", WIDGET_CVAR_CHECKBOX) .CVar(CVAR_ENHANCEMENT("InstantPutaway")) .Options(CheckboxOptions().Tooltip("Allow Link to put items away without having to wait around.")); - AddWidget(path, "Navi Timer Resets", WIDGET_CVAR_CHECKBOX) + AddWidget(path, "Navi Timer Resets on Scene Change", WIDGET_CVAR_CHECKBOX) .CVar(CVAR_ENHANCEMENT("ResetNaviTimer")) .Options( CheckboxOptions().Tooltip("Resets the Navi timer on scene change. If you have already talked to her, " @@ -459,11 +467,6 @@ void SohMenu::AddMenuEnhancements() { .CVar(CVAR_ENHANCEMENT("NewDrops")) .Options(CheckboxOptions().Tooltip( "Replaces most 2D items and projectiles on the overworld with their equivalent 3D models.")); - AddWidget(path, "Invisible Bunny Hood", WIDGET_CVAR_CHECKBOX) - .CVar(CVAR_ENHANCEMENT("HideBunnyHood")) - .Options(CheckboxOptions().Tooltip( - "Turns Bunny Hood Invisible while still maintaining its effects." - )); AddWidget(path, "Animated Link in Pause Menu", WIDGET_CVAR_CHECKBOX) .CVar(CVAR_ENHANCEMENT("PauseMenuAnimatedLink")) .Options(CheckboxOptions().Tooltip( @@ -523,7 +526,7 @@ void SohMenu::AddMenuEnhancements() { AddWidget(path, "Disable HUD Heart Animations", WIDGET_CVAR_CHECKBOX) .CVar(CVAR_ENHANCEMENT("NoHUDHeartAnimation")) .Options(CheckboxOptions().Tooltip("Disables the Beating Animation of the Hearts on the HUD.")); - AddWidget(path, "Glitch line-up tick", WIDGET_CVAR_CHECKBOX) + AddWidget(path, "Glitch Line-up Tick", WIDGET_CVAR_CHECKBOX) .CVar(CVAR_ENHANCEMENT("DrawLineupTick")) .Options(CheckboxOptions().Tooltip( "Displays a tick in the top center of the screen to help with glitch line-ups in SoH, since traditional " @@ -549,7 +552,9 @@ void SohMenu::AddMenuEnhancements() { .Options(CheckboxOptions().Tooltip( "Ammo counts in the pause menu will work correctly regardless of the position of items in the Inventory.")); AddWidget(path, "Enable Passage of Time on File Select", WIDGET_CVAR_CHECKBOX) - .CVar(CVAR_ENHANCEMENT("TimeFlowFileSelect")); + .CVar(CVAR_ENHANCEMENT("TimeFlowFileSelect")) + .Options(CheckboxOptions().Tooltip( + "The skybox in the background of the File Select screen will go through the day and night cycle over time.")); path.column = SECTION_COLUMN_3; AddWidget(path, "Misc.", WIDGET_SEPARATOR_TEXT); @@ -690,6 +695,9 @@ void SohMenu::AddMenuEnhancements() { "- When saving and quitting\n" "- When dying\n" "- When traveling thru time (if \"Masks Equippable as Adult\" is activated).")); + AddWidget(path, "Invisible Bunny Hood", WIDGET_CVAR_CHECKBOX) + .CVar(CVAR_ENHANCEMENT("HideBunnyHood")) + .Options(CheckboxOptions().Tooltip("Turns Bunny Hood Invisible while still maintaining its effects.")); AddWidget(path, "Mask Select in Inventory", WIDGET_CVAR_CHECKBOX) .CVar(CVAR_ENHANCEMENT("MaskSelect")) .Options(CheckboxOptions().Tooltip( @@ -962,7 +970,7 @@ void SohMenu::AddMenuEnhancements() { "Only relevant for playthroughs involving Master Quest Dungeons.")); AddWidget(path, "Desync Fixes", WIDGET_SEPARATOR_TEXT); - AddWidget(path, "Fix Darunia Dancing Too Fast", WIDGET_CVAR_CHECKBOX) + AddWidget(path, "Fix Darunia Dancing too Fast", WIDGET_CVAR_CHECKBOX) .CVar(CVAR_ENHANCEMENT("FixDaruniaDanceSpeed")) .Options(CheckboxOptions().Tooltip( "Fixes Darunia's dancing speed so he dances to the beat of Saria's Song, like in the Original Game.")); @@ -1265,7 +1273,7 @@ void SohMenu::AddMenuEnhancements() { .CVar(CVAR_ENHANCEMENT("FrogsUnlimitedFailTime")) .PreFunc(frogsOcarinaGameDisabledFunc) .Options(CheckboxOptions().Tooltip("Removes the timer to play back the song.")); - AddWidget(path, "Modify note timer: %dx", WIDGET_CVAR_SLIDER_INT) + AddWidget(path, "Modify Note Timer: %dx", WIDGET_CVAR_SLIDER_INT) .CVar(CVAR_ENHANCEMENT("FrogsModifyFailTime")) .PreFunc([](WidgetInfo& info) { info.options->disabled = !CVarGetInteger(CVAR_ENHANCEMENT("CustomizeFrogsOcarinaGame"), 0) || @@ -1353,11 +1361,11 @@ void SohMenu::AddMenuEnhancements() { .CVar(CVAR_ENHANCEMENT("GuaranteeFishingBite")) .PreFunc(fishingDisabledFunc) .Options(CheckboxOptions().Tooltip("When a line is stable, guarantee bite. Otherwise use Default logic.")); - AddWidget(path, "Fish Never Escape", WIDGET_CVAR_CHECKBOX) + AddWidget(path, "Fish never Escape", WIDGET_CVAR_CHECKBOX) .CVar(CVAR_ENHANCEMENT("FishNeverEscape")) .PreFunc(fishingDisabledFunc) .Options(CheckboxOptions().Tooltip("Once a hook as been set, Fish will never let go while being reeled in.")); - AddWidget(path, "Loaches Always Appear", WIDGET_CVAR_CHECKBOX) + AddWidget(path, "Loaches always Appear", WIDGET_CVAR_CHECKBOX) .CVar(CVAR_ENHANCEMENT("LoachesAlwaysAppear")) .PreFunc(fishingDisabledFunc) .Options( @@ -1416,7 +1424,7 @@ void SohMenu::AddMenuEnhancements() { "Enables Ivan the Fairy upon the next map change. Player 2 can control Ivan and press the C-Buttons to " "use items and mess with Player 1!" )); - AddWidget(path, "Dogs Follow you Everywhere", WIDGET_CVAR_CHECKBOX) + AddWidget(path, "Dogs Follow You Everywhere", WIDGET_CVAR_CHECKBOX) .CVar(CVAR_ENHANCEMENT("DogFollowsEverywhere")) .Options(CheckboxOptions().Tooltip("Allows dogs to follow you anywhere you go, even if you leave the Market.")); AddWidget(path, "Rupee Dash Mode", WIDGET_CVAR_CHECKBOX) @@ -1554,7 +1562,7 @@ void SohMenu::AddMenuEnhancements() { .PreFunc([](WidgetInfo& info) { info.isHidden = !CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0); }); - AddWidget(path, "Select All Enemies", WIDGET_CVAR_CHECKBOX) + AddWidget(path, "Select all Enemies", WIDGET_CVAR_CHECKBOX) .CVar(CVAR_ENHANCEMENT("RandomizedEnemyList.All")) .PreFunc([](WidgetInfo& info) { info.isHidden = !CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0); @@ -1635,14 +1643,14 @@ void SohMenu::AddMenuEnhancements() { .CVar(CVAR_CHEAT("NoRedeadFreeze")) .Options( CheckboxOptions().Tooltip("Prevents ReDeads and Gibdos from being able to freeze you with their scream.")); - AddWidget(path, "Keese/Guay Don't Target You", WIDGET_CVAR_CHECKBOX) + AddWidget(path, "Keese/Guay don't Target You", WIDGET_CVAR_CHECKBOX) .CVar(CVAR_CHEAT("NoKeeseGuayTarget")) .Options(CheckboxOptions().Tooltip( "Keese and Guay no longer target you and simply ignore you as if you were wearing the " "Skull Mask.")); AddWidget(path, "Glitch Aids", WIDGET_SEPARATOR_TEXT); - AddWidget(path, "Easy Frame Advancing", WIDGET_CVAR_CHECKBOX) + AddWidget(path, "Easy Frame Advancing with Pause", WIDGET_CVAR_CHECKBOX) .CVar(CVAR_CHEAT("EasyFrameAdvance")) .Options(CheckboxOptions().Tooltip( "Continue holding START button when unpausing to only advance a single frame and then re-pause.")); @@ -1664,10 +1672,10 @@ void SohMenu::AddMenuEnhancements() { .CVar(CVAR_CHEAT("DropsDontDie")) .Options( CheckboxOptions().Tooltip("Drops from enemies, grass, etc. don't disappear after a set amount of time.")); - AddWidget(path, "Fish Don't Despawn", WIDGET_CVAR_CHECKBOX) + AddWidget(path, "Fish don't Despawn", WIDGET_CVAR_CHECKBOX) .CVar(CVAR_CHEAT("NoFishDespawn")) .Options(CheckboxOptions().Tooltip("Prevents fish from automatically despawning after a while when dropped.")); - AddWidget(path, "Bugs Don't Despawn", WIDGET_CVAR_CHECKBOX) + AddWidget(path, "Bugs don't Despawn", WIDGET_CVAR_CHECKBOX) .CVar(CVAR_CHEAT("NoBugsDespawn")) .Options(CheckboxOptions().Tooltip("Prevents bugs from automatically despawning after a while when dropped.")); diff --git a/soh/soh/SohGui/SohMenuSettings.cpp b/soh/soh/SohGui/SohMenuSettings.cpp index 093e98618..20ce9ff50 100644 --- a/soh/soh/SohGui/SohMenuSettings.cpp +++ b/soh/soh/SohGui/SohMenuSettings.cpp @@ -55,7 +55,7 @@ void SohMenu::AddMenuSettings() { WidgetPath path = { "Settings", "General", SECTION_COLUMN_1 }; // General - Settings - AddWidget(path, "General Settings", WIDGET_SEPARATOR_TEXT); + AddWidget(path, "Menu Settings", WIDGET_SEPARATOR_TEXT); AddWidget(path, "Menu Theme", WIDGET_CVAR_COMBOBOX) .CVar(CVAR_SETTING("Menu.Theme")) .Options(ComboboxOptions() @@ -69,6 +69,14 @@ void SohMenu::AddMenuSettings() { "Allows controller navigation of the port menu (Settings, Enhancements,...)\nCAUTION: " "This will disable game inputs while the menu is visible.\n\nD-pad to move between " "items, A to select, B to move up in scope.")); + AddWidget(path, "Menu Background Opacity", WIDGET_CVAR_SLIDER_FLOAT) + .CVar(CVAR_SETTING("Menu.BackgroundOpacity")) + .Options(FloatSliderOptions() + .DefaultValue(0.85f) + .IsPercentage() + .Tooltip("Sets the opacity of the background of the port menu.")); + + AddWidget(path, "General Settings", WIDGET_SEPARATOR_TEXT); AddWidget(path, "Cursor Always Visible", WIDGET_CVAR_CHECKBOX) .CVar(CVAR_SETTING("CursorVisibility")) .Callback([](WidgetInfo& info) { diff --git a/soh/soh/SohGui/UIWidgets.cpp b/soh/soh/SohGui/UIWidgets.cpp index 9875cf7b9..e2f7bf2dc 100644 --- a/soh/soh/SohGui/UIWidgets.cpp +++ b/soh/soh/SohGui/UIWidgets.cpp @@ -330,7 +330,8 @@ bool Checkbox(const char* _label, bool* value, const CheckboxOptions& options) { if (options.labelPosition == LabelPositions::Above) { checkPos.y += label_size.y + (style.ItemInnerSpacing.y * 2.0f); } else { - labelPos.y += (square_sz / 2) - (label_size.y / 2); + // Center with checkbox automatically + labelPos.y += ImGui::CalcTextSize("g").y / 8; } if (options.alignment == ComponentAlignments::Right) { checkPos.x = total_bb.Max.x - square_sz; From 985bf919457abeb1672eac1dcb621208ecd6ad2f Mon Sep 17 00:00:00 2001 From: Archez Date: Thu, 20 Mar 2025 15:20:50 -0400 Subject: [PATCH 7/7] prevent some timesavers applying in boss rush (#5163) --- .../TimeSavers/SkipCutscene/Story/SkipBlueWarp.cpp | 5 +++++ soh/soh/Enhancements/timesaver_hook_handlers.cpp | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/soh/soh/Enhancements/TimeSavers/SkipCutscene/Story/SkipBlueWarp.cpp b/soh/soh/Enhancements/TimeSavers/SkipCutscene/Story/SkipBlueWarp.cpp index c9a999cb1..ae4236218 100644 --- a/soh/soh/Enhancements/TimeSavers/SkipCutscene/Story/SkipBlueWarp.cpp +++ b/soh/soh/Enhancements/TimeSavers/SkipCutscene/Story/SkipBlueWarp.cpp @@ -20,6 +20,11 @@ static bool sEnteredBlueWarp = false; * should also account for the difference between your first and following visits to the blue warp. */ void SkipBlueWarp_ShouldPlayTransitionCS(GIVanillaBehavior _, bool* should, va_list originalArgs) { + // Do nothing when in a boss rush + if (IS_BOSS_RUSH) { + return; + } + bool overrideBlueWarpDestinations = IS_RANDO && (RAND_GET_OPTION(RSK_SHUFFLE_DUNGEON_ENTRANCES) != RO_DUNGEON_ENTRANCE_SHUFFLE_OFF || RAND_GET_OPTION(RSK_SHUFFLE_BOSS_ENTRANCES) != RO_BOSS_ROOM_ENTRANCE_SHUFFLE_OFF); diff --git a/soh/soh/Enhancements/timesaver_hook_handlers.cpp b/soh/soh/Enhancements/timesaver_hook_handlers.cpp index 2c84ecac2..1db34b4f6 100644 --- a/soh/soh/Enhancements/timesaver_hook_handlers.cpp +++ b/soh/soh/Enhancements/timesaver_hook_handlers.cpp @@ -1066,6 +1066,11 @@ void TimeSaverOnSceneInitHandler(int16_t sceneNum) { static GetItemEntry vanillaQueuedItemEntry = GET_ITEM_NONE; void TimeSaverOnFlagSetHandler(int16_t flagType, int16_t flag) { + // Do nothing when in a boss rush + if (IS_BOSS_RUSH) { + return; + } + if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.Story"), IS_RANDO)) { switch (flagType) { case FLAG_EVENT_CHECK_INF: