From 0bfe2fec674d6f7aa6c3becfa50bc88ec7fd8d88 Mon Sep 17 00:00:00 2001 From: Baoulettes Date: Thu, 2 Jun 2022 04:06:32 +0200 Subject: [PATCH 1/2] fix win build crash (#425) sizeof issue make it crash on windows. Thanks Melon :) --- libultraship/libultraship/SohImGuiImpl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp index 3c3ca9c6c..23fa4ffa9 100644 --- a/libultraship/libultraship/SohImGuiImpl.cpp +++ b/libultraship/libultraship/SohImGuiImpl.cpp @@ -259,7 +259,8 @@ namespace SohImGui { } void LoadRainbowColor() { - for (uint16_t s=0; s <= sizeof(RainbowColorCvarList); s++) { + u8 arrayLength = sizeof(RainbowColorCvarList) / sizeof(*RainbowColorCvarList); + for (u8 s = 0; s < arrayLength; s++) { std::string cvarName = RainbowColorCvarList[s]; std::string Cvar_Red = cvarName; Cvar_Red += "R"; From 05340a926ae62acef99e50efe00f59875b13bb17 Mon Sep 17 00:00:00 2001 From: getBrainError Date: Thu, 2 Jun 2022 03:58:50 +0200 Subject: [PATCH 2/2] Add fishing pole as sword in save editor Adds fishing pole as a sword to the save editor under current equipment. --- soh/soh/Enhancements/debugger/debugSaveEditor.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/soh/soh/Enhancements/debugger/debugSaveEditor.cpp b/soh/soh/Enhancements/debugger/debugSaveEditor.cpp index ca1b67798..a0d27f70f 100644 --- a/soh/soh/Enhancements/debugger/debugSaveEditor.cpp +++ b/soh/soh/Enhancements/debugger/debugSaveEditor.cpp @@ -1316,6 +1316,9 @@ void DrawPlayerTab() { case ITEM_SWORD_BGS: curSword = "Biggoron's Sword"; break; + case ITEM_FISHING_POLE: + curSword = "Fishing Pole"; + break; case ITEM_NONE: curSword = "None"; break; @@ -1463,6 +1466,11 @@ void DrawPlayerTab() { Inventory_ChangeEquipment(EQUIP_SWORD, PLAYER_SWORD_BGS); } + if (ImGui::Selectable("Fishing Pole")) { + player->currentSwordItem = ITEM_FISHING_POLE; + gSaveContext.equips.buttonItems[0] = ITEM_FISHING_POLE; + Inventory_ChangeEquipment(EQUIP_SWORD, PLAYER_SWORD_MASTER); + } ImGui::EndCombo(); }