From 18f8770eafca2db4bcab4da57160dd3fc1af3acf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20Dub=C3=A9?= <159546+serprex@users.noreply.github.com> Date: Wed, 9 Sep 2026 14:57:03 +0000 Subject: [PATCH] item tracker: don't render items for disabled settings (#7151) --- .../randomizer/randomizer_item_tracker.cpp | 136 +++++++++++------- 1 file changed, 88 insertions(+), 48 deletions(-) diff --git a/soh/soh/Enhancements/randomizer/randomizer_item_tracker.cpp b/soh/soh/Enhancements/randomizer/randomizer_item_tracker.cpp index 76bedfa15b..08e4ce650b 100644 --- a/soh/soh/Enhancements/randomizer/randomizer_item_tracker.cpp +++ b/soh/soh/Enhancements/randomizer/randomizer_item_tracker.cpp @@ -468,6 +468,17 @@ void TrackSilverRupees(std::vector* trackList) { } } +// Ganon's soul is shuffled separately from the other boss souls +static void TrackBossSouls(std::vector* trackList) { + bool bossSouls = IS_RANDO && RAND_GET_OPTION(RSK_SHUFFLE_BOSS_SOULS); + bool ganonSoul = IS_RANDO && RAND_GET_OPTION(RSK_GANONS_SOUL).IsNot(RO_GANONS_SOUL_STARTWITH); + for (auto bossSoul : bossSoulItems) { + if (bossSoul.id == RG_GANON_SOUL ? ganonSoul : bossSouls) { + trackList->push_back(bossSoul); + } + } +} + void DrawName(std::string str, ImU32 color) { int iconSize = CVarGetInteger(CVAR_TRACKER_ITEM("IconSize"), 36); ImVec2 p = ImGui::GetCursorScreenPos(); @@ -1470,6 +1481,56 @@ std::vector GetDungeonItemsVector(std::vector shuffledBossSoulItems; + TrackBossSouls(&shuffledBossSoulItems); BeginFloatingWindows("Boss Soul Tracker"); - DrawItemsInRows(bossSoulItems); + DrawItemsInRows(shuffledBossSoulItems); Trackers::EndFloatWindows(); } - if (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.JabberNuts"), SECTION_DISPLAY_HIDDEN) == - SECTION_DISPLAY_SEPARATE) { + if (JabberNutsDisplay() == SECTION_DISPLAY_SEPARATE) { BeginFloatingWindows("Jabber Nut Tracker"); DrawItemsInRows(jabbernutItems); Trackers::EndFloatWindows(); } - if (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.OcarinaButtons"), SECTION_DISPLAY_HIDDEN) == - SECTION_DISPLAY_SEPARATE) { + if (OcarinaButtonsDisplay() == SECTION_DISPLAY_SEPARATE) { BeginFloatingWindows("Ocarina Button Tracker"); DrawItemsInRows(ocarinaButtonItems); Trackers::EndFloatWindows(); } - if (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.OverworldKeys"), SECTION_DISPLAY_HIDDEN) == - SECTION_DISPLAY_SEPARATE) { + if (OverworldKeysDisplay() == SECTION_DISPLAY_SEPARATE) { BeginFloatingWindows("Overworld Key Tracker"); DrawItemsInRows(overworldKeyItems); Trackers::EndFloatWindows(); } - if (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.SilverRupees"), SECTION_DISPLAY_HIDDEN) == - SECTION_DISPLAY_SEPARATE) { + if (SilverRupeesDisplay() == SECTION_DISPLAY_SEPARATE) { std::vector questMatchingSilverRupeeItems; TrackSilverRupees(&questMatchingSilverRupeeItems); BeginFloatingWindows("Silver Rupee Tracker"); @@ -1908,8 +1949,7 @@ void ItemTrackerWindow::DrawElement() { Trackers::EndFloatWindows(); } - if (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.FishingPole"), SECTION_DISPLAY_EXTENDED_HIDDEN) == - SECTION_DISPLAY_EXTENDED_SEPARATE) { + if (FishingPoleDisplay() == SECTION_DISPLAY_EXTENDED_SEPARATE) { BeginFloatingWindows("Fishing Pole Tracker"); DrawItemsInRows(fishingPoleItems); Trackers::EndFloatWindows();