diff --git a/soh/soh/Enhancements/debugger/debugSaveEditor.cpp b/soh/soh/Enhancements/debugger/debugSaveEditor.cpp index afe647a4bdd..9bf606df9af 100644 --- a/soh/soh/Enhancements/debugger/debugSaveEditor.cpp +++ b/soh/soh/Enhancements/debugger/debugSaveEditor.cpp @@ -130,6 +130,9 @@ std::map itemMapping = { ITEM_MAP_ENTRY(ITEM_COMPASS), ITEM_MAP_ENTRY(ITEM_DUNGEON_MAP), ITEM_MAP_ENTRY(ITEM_KEY_SMALL), + ITEM_MAP_ENTRY(ITEM_HEART_CONTAINER), + ITEM_MAP_ENTRY(ITEM_MAGIC_SMALL), + ITEM_MAP_ENTRY(ITEM_MAGIC_LARGE) }; // Maps entries in the GS flag array to the area name it represents @@ -196,7 +199,7 @@ std::map questMapping = { QUEST_MAP_ENTRY(QUEST_ZORA_SAPPHIRE, gZoraSapphireIconTex), QUEST_MAP_ENTRY(QUEST_STONE_OF_AGONY, gStoneOfAgonyIconTex), QUEST_MAP_ENTRY(QUEST_GERUDO_CARD, gGerudosCardIconTex), - QUEST_MAP_ENTRY(QUEST_SKULL_TOKEN, gGoldSkulltulaIconTex), + QUEST_MAP_ENTRY(QUEST_SKULL_TOKEN, gGoldSkulltulaIconTex) }; typedef struct { diff --git a/soh/soh/Enhancements/randomizer/randomizer_item_tracker.cpp b/soh/soh/Enhancements/randomizer/randomizer_item_tracker.cpp index 6664e091775..8ea617f9ebd 100644 --- a/soh/soh/Enhancements/randomizer/randomizer_item_tracker.cpp +++ b/soh/soh/Enhancements/randomizer/randomizer_item_tracker.cpp @@ -456,12 +456,48 @@ std::unordered_map itemTrackerMap = { ITEM_TRACKER_MAP_ENTRY(ITEM_FROG, 0), ITEM_TRACKER_MAP_ENTRY(ITEM_EYEDROPS, 0), ITEM_TRACKER_MAP_ENTRY(ITEM_CLAIM_CHECK, 0), - + ITEM_TRACKER_MAP_ENTRY(ITEM_HEART_CONTAINER, 0), + ITEM_TRACKER_MAP_ENTRY(ITEM_MAGIC_SMALL, 0), + ITEM_TRACKER_MAP_ENTRY(ITEM_MAGIC_LARGE, 0), }; void DrawItem(uint32_t itemId) { uint32_t actualItemId = INV_CONTENT(itemId); + + if (itemId == ITEM_HEART_CONTAINER) { + actualItemId = itemId; + } + + if (itemId == ITEM_MAGIC_SMALL || + itemId == ITEM_MAGIC_LARGE) { + // todo make this large/small based on what upgrades we have + if (gSaveContext.magicLevel == 2) { + actualItemId = ITEM_MAGIC_LARGE; + } else { + actualItemId = ITEM_MAGIC_SMALL; + } + } + bool hasItem = actualItemId != ITEM_NONE; + + if (itemId == ITEM_HEART_CONTAINER) { + if (gSaveContext.doubleDefense) { + hasItem = true; + } else { + hasItem = false; + } + } + + if (itemId == ITEM_MAGIC_SMALL || + itemId == ITEM_MAGIC_LARGE) { + // todo make this large/small based on what upgrades we have + if (gSaveContext.magicLevel == 0) { + hasItem = false; + } else { + hasItem = true; + } + } + const ItemTrackerMapEntry& entry = itemTrackerMap[hasItem ? actualItemId : itemId]; int iconSize = CVar_GetS32("gRandoTrackIconSize", 0); @@ -871,6 +907,14 @@ if (ImGui::BeginTabBar("Item Tracker", ImGuiTabBarFlags_NoCloseWithMiddleMouseBu ImGui::SameLine(); ImGui::Dummy(ImVec2(0.0f, 5.0f)); ImGui::SameLine(); + DrawItem(ITEM_HEART_CONTAINER); + ImGui::SameLine(); + ImGui::Dummy(ImVec2(0.0f, 5.0f)); + ImGui::SameLine(); + DrawItem(ITEM_MAGIC_SMALL); + ImGui::SameLine(); + ImGui::Dummy(ImVec2(0.0f, 5.0f)); + ImGui::SameLine(); ImGui::NewLine(); DrawEquip(ITEM_BOOTS_KOKIRI); ImGui::SameLine();