From 08fd5ff5cd66532325ff48d7d14224470c0188b0 Mon Sep 17 00:00:00 2001 From: Malkierian Date: Fri, 21 Nov 2025 12:08:22 -0700 Subject: [PATCH] Clean up rebase errors. --- soh/soh/Enhancements/Holiday/AGreenSpoon.cpp | 10 +-- soh/soh/Enhancements/Holiday/Archez.cpp | 8 +- soh/soh/Enhancements/Holiday/Caladius.cpp | 66 ++++++++--------- soh/soh/Enhancements/Holiday/Example.cpp | 8 +- soh/soh/Enhancements/Holiday/Fredomato.cpp | 14 ++-- soh/soh/Enhancements/Holiday/Grimey.cpp | 22 +++--- soh/soh/Enhancements/Holiday/Holiday.hpp | 2 +- soh/soh/Enhancements/Holiday/LL.cpp | 74 +++++++++---------- soh/soh/Enhancements/Holiday/NotProxySaw.cpp | 12 +-- soh/soh/Enhancements/Holiday/Pablo.cpp | 14 ++-- soh/soh/Enhancements/Holiday/ProxySaw.cpp | 36 ++++----- soh/soh/Enhancements/Holiday/Rando.cpp | 4 +- soh/soh/Enhancements/Holiday/aMannus.cpp | 10 +-- soh/soh/Enhancements/Holiday/lilDavid.cpp | 20 ++--- .../Enhancements/TimeDisplay/TimeDisplay.cpp | 2 +- .../custom-collectible/CustomCollectible.cpp | 2 +- soh/soh/Enhancements/mods.cpp | 1 + soh/soh/Enhancements/randomizer/randomizer.h | 1 + .../ovl_Boss_Ganondrof/z_boss_ganondrof.c | 2 +- .../ovl_En_ChristmasTree/z_en_christmastree.c | 10 +-- soh/src/overlays/actors/ovl_En_Go/z_en_go.c | 1 + soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c | 3 + .../actors/ovl_En_Wood02/z_en_wood02.c | 9 +-- .../actors/ovl_player_actor/z_player.c | 2 +- .../ovl_Effect_Ss_Bomb2/z_eff_ss_bomb2.c | 1 + 25 files changed, 167 insertions(+), 167 deletions(-) diff --git a/soh/soh/Enhancements/Holiday/AGreenSpoon.cpp b/soh/soh/Enhancements/Holiday/AGreenSpoon.cpp index 8551efe60..0de6bc369 100644 --- a/soh/soh/Enhancements/Holiday/AGreenSpoon.cpp +++ b/soh/soh/Enhancements/Holiday/AGreenSpoon.cpp @@ -62,11 +62,11 @@ static void OnConfigurationChanged() { } static void DrawMenu() { - ImGui::SeparatorText(AUTHOR); - if (UIWidgets::EnhancementCheckbox("Evil Gossip Stone", CVAR("EvilGossipStone"))) { - OnConfigurationChanged(); - } - UIWidgets::Tooltip("Don't you dare talk to them."); + //ImGui::SeparatorText(AUTHOR); + //if (UIWidgets::EnhancementCheckbox("Evil Gossip Stone", CVAR("EvilGossipStone"))) { + // OnConfigurationChanged(); + //} + //UIWidgets::Tooltip("Don't you dare talk to them."); } static void RegisterMod() { diff --git a/soh/soh/Enhancements/Holiday/Archez.cpp b/soh/soh/Enhancements/Holiday/Archez.cpp index 0665c9d29..efca4c22b 100644 --- a/soh/soh/Enhancements/Holiday/Archez.cpp +++ b/soh/soh/Enhancements/Holiday/Archez.cpp @@ -1,7 +1,7 @@ #include "Holiday.hpp" #include "Archez.h" #include -#include "soh/UIWidgets.hpp" +#include "soh/SohGui/UIWidgets.hpp" #include "soh/Enhancements/game-interactor/GameInteractor.h" #include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h" #include "soh_assets.h" @@ -110,9 +110,9 @@ static void ConfigurationChanged() { static void DrawMenu() { ImGui::SeparatorText(AUTHOR); - if (UIWidgets::EnhancementCheckbox("Snow Golems", CVAR("SnowGolems"))) { - ConfigurationChanged(); - } + //if (UIWidgets::EnhancementCheckbox("Snow Golems", CVAR("SnowGolems"))) { + // ConfigurationChanged(); + //} UIWidgets::Tooltip("Overrides most charactor skeletons with snow balls to make them look like Snow Golems"); } diff --git a/soh/soh/Enhancements/Holiday/Caladius.cpp b/soh/soh/Enhancements/Holiday/Caladius.cpp index 31fb82af8..c927c397d 100644 --- a/soh/soh/Enhancements/Holiday/Caladius.cpp +++ b/soh/soh/Enhancements/Holiday/Caladius.cpp @@ -21,7 +21,7 @@ uint64_t GetUnixTimestamp(); bool isFeverDisabled = false; bool isExchangeDisabled = false; -float fontScale = 1.0f; +static float fontScale = 1.0f; extern GetItemEntry vanillaQueuedItemEntry; @@ -41,7 +41,7 @@ void OnTimeOver() { int32_t calculateRemainingTime() { int32_t timeRemaining = - ((gSaveContext.sohStats.count[COUNT_ICE_TRAPS] * (CVarGetInteger(CVAR("ExtendTimer"), 0) * 600)) + + ((gSaveContext.ship.stats.count[COUNT_ICE_TRAPS] * (CVarGetInteger(CVAR("ExtendTimer"), 0) * 600)) + (CVarGetInteger(CVAR("StartTimer"), 0) * 600) - GAMEPLAYSTAT_TOTAL_TIME); if (timeRemaining <= 0) { OnTimeOver(); @@ -107,7 +107,7 @@ void Present_Update(Actor* actor, PlayState* play) { uint32_t giftsCollected = CVarGetInteger(CVAR("GiftsCollected"), 0); giftsCollected++; CVarSetInteger(CVAR("GiftsCollected"), giftsCollected); - Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); + Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame(); std::string msg = std::to_string(giftsCollected).c_str(); msg += " Gifts in Inventory."; Notification::Emit({ @@ -271,38 +271,38 @@ void CaladiusWindow::Draw() { } static void DrawMenu() { - ImGui::SeparatorText(AUTHOR); - if (UIWidgets::EnhancementCheckbox("Holiday Fever", CVAR("Fever.Enabled"))) { - OnFeverConfigurationChanged(); - } - UIWidgets::Tooltip("Can you beat your objective before the Fever sets in?/n" - "- Obtaining Ice Traps extends your timer."); - if (CVarGetInteger(CVAR("Fever.Enabled"), 0)) { - if (UIWidgets::EnhancementSliderFloat("", "##FontScale", CVAR("FontScale"), - 1.0f, 5.0f, "Font: %.1fx", 1.0f, false, false, isFeverDisabled)) { - OnFeverConfigurationChanged(); - } - UIWidgets::PaddedEnhancementSliderInt("Starting Timer: %d minutes", "##StartTime", CVAR("StartTimer"), - 5, 30, "", 15, true, true, false, isFeverDisabled); - UIWidgets::PaddedEnhancementSliderInt("Time Extensions: %d minutes", "##ExtendTime", CVAR("ExtendTimer"), - 1, 10, "", 5, true, true, false, isFeverDisabled); - } - UIWidgets::PaddedSeparator(); + //ImGui::SeparatorText(AUTHOR); + //if (UIWidgets::EnhancementCheckbox("Holiday Fever", CVAR("Fever.Enabled"))) { + // OnFeverConfigurationChanged(); + //} + //UIWidgets::Tooltip("Can you beat your objective before the Fever sets in?/n" + // "- Obtaining Ice Traps extends your timer."); + //if (CVarGetInteger(CVAR("Fever.Enabled"), 0)) { + // if (UIWidgets::EnhancementSliderFloat("", "##FontScale", CVAR("FontScale"), + // 1.0f, 5.0f, "Font: %.1fx", 1.0f, false, false, isFeverDisabled)) { + // OnFeverConfigurationChanged(); + // } + // UIWidgets::PaddedEnhancementSliderInt("Starting Timer: %d minutes", "##StartTime", CVAR("StartTimer"), + // 5, 30, "", 15, true, true, false, isFeverDisabled); + // UIWidgets::PaddedEnhancementSliderInt("Time Extensions: %d minutes", "##ExtendTime", CVAR("ExtendTimer"), + // 1, 10, "", 5, true, true, false, isFeverDisabled); + //} + //UIWidgets::PaddedSeparator(); - if (UIWidgets::EnhancementCheckbox("Boulder Blitz", CVAR("Blitz.Enabled"))) { - OnBlitzChange(); - } - UIWidgets::Tooltip("Boulders will randomly be replaced with other boulder types."); - UIWidgets::PaddedSeparator(); + //if (UIWidgets::EnhancementCheckbox("Boulder Blitz", CVAR("Blitz.Enabled"))) { + // OnBlitzChange(); + //} + //UIWidgets::Tooltip("Boulders will randomly be replaced with other boulder types."); + //UIWidgets::PaddedSeparator(); - if (UIWidgets::EnhancementCheckbox("Ornament Exchange", CVAR("OrnExch.Enabled"))) { - OnPresentChange(); - } - UIWidgets::Tooltip("See Malon as Young Link in Lon Lon Ranch to exchange Gifts for Ornaments!"); - if (CVarGetInteger(CVAR("OrnExch.Enabled"), 0)) { - UIWidgets::PaddedEnhancementSliderInt("Gifts Required: %d Gifts", "##GiftsReq", CVAR("OrnExch.Amount"), - 5, 30, "", 15, true, true, false, isExchangeDisabled); - } + //if (UIWidgets::EnhancementCheckbox("Ornament Exchange", CVAR("OrnExch.Enabled"))) { + // OnPresentChange(); + //} + //UIWidgets::Tooltip("See Malon as Young Link in Lon Lon Ranch to exchange Gifts for Ornaments!"); + //if (CVarGetInteger(CVAR("OrnExch.Enabled"), 0)) { + // UIWidgets::PaddedEnhancementSliderInt("Gifts Required: %d Gifts", "##GiftsReq", CVAR("OrnExch.Amount"), + // 5, 30, "", 15, true, true, false, isExchangeDisabled); + //} } static void RegisterMod() { diff --git a/soh/soh/Enhancements/Holiday/Example.cpp b/soh/soh/Enhancements/Holiday/Example.cpp index dc8086788..17ab542ce 100644 --- a/soh/soh/Enhancements/Holiday/Example.cpp +++ b/soh/soh/Enhancements/Holiday/Example.cpp @@ -27,10 +27,10 @@ static void OnConfigurationChanged() { } static void DrawMenu() { - ImGui::SeparatorText(AUTHOR); - if (UIWidgets::EnhancementCheckbox("DoSomethingWithPots", CVAR("DoSomethingWithPots"))) { - OnConfigurationChanged(); - } + //ImGui::SeparatorText(AUTHOR); + //if (UIWidgets::EnhancementCheckbox("DoSomethingWithPots", CVAR("DoSomethingWithPots"))) { + // OnConfigurationChanged(); + //} } static void RegisterMod() { diff --git a/soh/soh/Enhancements/Holiday/Fredomato.cpp b/soh/soh/Enhancements/Holiday/Fredomato.cpp index 1d39819cc..0f7280ed1 100644 --- a/soh/soh/Enhancements/Holiday/Fredomato.cpp +++ b/soh/soh/Enhancements/Holiday/Fredomato.cpp @@ -1,11 +1,11 @@ #include "Holiday.hpp" #include -#include "soh/UIWidgets.hpp" +#include "soh/SohGui/UIWidgets.hpp" #include "soh/Enhancements/game-interactor/GameInteractor.h" #include "objects/object_dog/object_dog.h" #include "soh/frame_interpolation.h" #include "soh/Enhancements/randomizer/3drando/random.hpp" -#include "soh/Enhancements/randomizer/3drando/location_access.hpp" +#include "soh/Enhancements/randomizer/location_access.h" #include "soh/Enhancements/randomizer/entrance.h" #include "soh/Enhancements/custom-collectible/CustomCollectible.h" #include "soh/Notification/Notification.h" @@ -336,7 +336,7 @@ void SpawnCollectionPoint() { EnItem00* collectionPoint = CustomCollectible::Spawn(859.0f, 347.0f, 5185.0f, 0xB000, 0, 0, NULL, NULL); collectionPoint->actor.update = CollectionPoint_Update; collectionPoint->actor.draw = CollectionPoint_Draw; - collectionPoint->actor.flags |= ACTOR_FLAG_DRAW_WHILE_CULLED; + collectionPoint->actor.flags |= ACTOR_FLAG_DRAW_CULLING_DISABLED; SkelAnime_InitFlex(gPlayState, &collectionPointSkelAnime, (FlexSkeletonHeader*)&object_toryo_Skel_007150, (AnimationHeader*)&object_toryo_Anim_000E50, collectionPointJointTable, collectionPointMorphTable, 17); } @@ -425,9 +425,9 @@ static void ConfigurationChanged() { COND_HOOK(OnPlayerUpdate, CVarGetInteger(CVAR("FredsQuest.Enabled"), 0), []() { if (CVarGetInteger(CVAR("FredsQuest.EncumberedThreshold"), 60) == 0 || FredsQuestWoodOnHand <= CVarGetInteger(CVAR("FredsQuest.EncumberedThreshold"), 60)) { - GameInteractor::State::RunSpeedModifier = 0; + GameInteractor::State::MovementSpeedMultiplier = 0; } else { - GameInteractor::State::RunSpeedModifier = -2; + GameInteractor::State::MovementSpeedMultiplier = -2; } }); @@ -447,7 +447,7 @@ static void DrawMenu() { // UIWidgets::EnhancementSliderInt("Xs", "Xs", CVAR("tmpxs"), 0, UINT16_MAX, "%d", 1, false); // UIWidgets::EnhancementSliderInt("Ys", "Ys", CVAR("tmpys"), 0, UINT16_MAX, "%d", 1, false); // UIWidgets::EnhancementSliderInt("Zs", "Zs", CVAR("tmpzs"), 0, UINT16_MAX, "%d", 1, false); - if (UIWidgets::EnhancementCheckbox("Fred's Quest", CVAR("FredsQuest.Enabled"))) { + /*if (UIWidgets::EnhancementCheckbox("Fred's Quest", CVAR("FredsQuest.Enabled"))) { ConfigurationChanged(); } UIWidgets::Tooltip("Collect wood and bring it to the collection point in Hyrule Field for a small reward."); @@ -483,7 +483,7 @@ static void DrawMenu() { if (UIWidgets::EnhancementSliderInt("Spawn Chance", "##RandomTraps.SpawnChance", CVAR("RandomTraps.SpawnChance"), 40, 2000, "%d", 1000, false)) { ConfigurationChanged(); } - } + }*/ } static void RegisterMod() { diff --git a/soh/soh/Enhancements/Holiday/Grimey.cpp b/soh/soh/Enhancements/Holiday/Grimey.cpp index 45dd560b2..16dcd845d 100644 --- a/soh/soh/Enhancements/Holiday/Grimey.cpp +++ b/soh/soh/Enhancements/Holiday/Grimey.cpp @@ -40,7 +40,7 @@ void Penguin_Init(Actor* actor, PlayState* play) { actor->world.rot.y = penguin.targetRot = rand() % 0x10000; penguins[actor] = penguin; actor->gravity = -1.0f; - actor->flags &= ~ACTOR_FLAG_TARGETABLE; + actor->flags &= ~ACTOR_FLAG_ATTENTION_ENABLED; } void Penguin_Update(Actor* actor, PlayState* play) { @@ -77,7 +77,7 @@ void Penguin_Update(Actor* actor, PlayState* play) { actor->speedXZ = 0.0f; } - Actor_MoveForward(actor); + Actor_MoveXZGravity(actor); Actor_UpdateBgCheckInfo(play, actor, 10.0f, 10.0f, 0.0f, 0xFF); } @@ -208,15 +208,15 @@ static void OnConfigurationChanged() { } static void DrawMenu() { - ImGui::SeparatorText(AUTHOR); - if (UIWidgets::EnhancementCheckbox("Penguins", CVAR("Penguins"))) { - OnConfigurationChanged(); - } - UIWidgets::Tooltip("Penguins will spawn in huddles throughout hyrule"); - if (UIWidgets::EnhancementCheckbox("Hailstorm", CVAR("Hailstorm"))) { - OnConfigurationChanged(); - } - UIWidgets::Tooltip("Ever persistent hailstorm throughout hyrule"); + //ImGui::SeparatorText(AUTHOR); + //if (UIWidgets::EnhancementCheckbox("Penguins", CVAR("Penguins"))) { + // OnConfigurationChanged(); + //} + //UIWidgets::Tooltip("Penguins will spawn in huddles throughout hyrule"); + //if (UIWidgets::EnhancementCheckbox("Hailstorm", CVAR("Hailstorm"))) { + // OnConfigurationChanged(); + //} + //UIWidgets::Tooltip("Ever persistent hailstorm throughout hyrule"); } static void RegisterMod() { diff --git a/soh/soh/Enhancements/Holiday/Holiday.hpp b/soh/soh/Enhancements/Holiday/Holiday.hpp index ca5aaf688..441e6fef7 100644 --- a/soh/soh/Enhancements/Holiday/Holiday.hpp +++ b/soh/soh/Enhancements/Holiday/Holiday.hpp @@ -4,7 +4,7 @@ #include #include #include -#include "soh/UIWidgets.hpp" +#include "soh/SohGui/UIWidgets.hpp" #include "soh/Enhancements/game-interactor/GameInteractor.h" #include "soh/Enhancements/cosmetics/CosmeticsEditor.h" diff --git a/soh/soh/Enhancements/Holiday/LL.cpp b/soh/soh/Enhancements/Holiday/LL.cpp index 344d8043e..7ddc20f0d 100644 --- a/soh/soh/Enhancements/Holiday/LL.cpp +++ b/soh/soh/Enhancements/Holiday/LL.cpp @@ -66,52 +66,52 @@ static void OnConfigurationChanged() { static void DrawMenu() { ImGui::SeparatorText(AUTHOR); - if (ImGui::BeginMenu("Customize Rainbows")) { - UIWidgets::EnhancementCheckbox("Enable", CVAR("lEnableCustomRainbows")); - if (CVarGetInteger(CVAR("lEnableCustomRainbows"), 0)) { - ImGui::ColorEdit3("Color 1", (float*)&customColorZero, ImGuiColorEditFlags_NoInputs); - ImGui::ColorEdit3("Color 2", (float*)&customColorOne, ImGuiColorEditFlags_NoInputs); - ImGui::ColorEdit3("Color 3", (float*)&customColorMinusZero, ImGuiColorEditFlags_NoInputs); - ImGui::ColorEdit3("Color 4", (float*)&customColorMinusOne, ImGuiColorEditFlags_NoInputs); + //if (ImGui::BeginMenu("Customize Rainbows")) { + // UIWidgets::EnhancementCheckbox("Enable", CVAR("lEnableCustomRainbows")); + // if (CVarGetInteger(CVAR("lEnableCustomRainbows"), 0)) { + // ImGui::ColorEdit3("Color 1", (float*)&customColorZero, ImGuiColorEditFlags_NoInputs); + // ImGui::ColorEdit3("Color 2", (float*)&customColorOne, ImGuiColorEditFlags_NoInputs); + // ImGui::ColorEdit3("Color 3", (float*)&customColorMinusZero, ImGuiColorEditFlags_NoInputs); + // ImGui::ColorEdit3("Color 4", (float*)&customColorMinusOne, ImGuiColorEditFlags_NoInputs); - UIWidgets::PaddedText("Presets", true, false); - size_t rainbowPresetIdx = 0; - if (UIWidgets::EnhancementCombobox(CVAR("lCustomRainbowPreset"), RAINBOW_PRESET_NAMES, 0) && - (rainbowPresetIdx = CVarGetInteger(CVAR("lCustomRainbowPreset"), 0)) <= RAINBOW_PRESET_LEN) { //paranoia - customColorZero = RAINBOW_PRESETS[rainbowPresetIdx][0]; - customColorOne = RAINBOW_PRESETS[rainbowPresetIdx][1]; - customColorMinusZero = RAINBOW_PRESETS[rainbowPresetIdx][2]; - customColorMinusOne = RAINBOW_PRESETS[rainbowPresetIdx][3]; - } + // UIWidgets::PaddedText("Presets", true, false); + // size_t rainbowPresetIdx = 0; + // if (UIWidgets::EnhancementCombobox(CVAR("lCustomRainbowPreset"), RAINBOW_PRESET_NAMES, 0) && + // (rainbowPresetIdx = CVarGetInteger(CVAR("lCustomRainbowPreset"), 0)) <= RAINBOW_PRESET_LEN) { //paranoia + // customColorZero = RAINBOW_PRESETS[rainbowPresetIdx][0]; + // customColorOne = RAINBOW_PRESETS[rainbowPresetIdx][1]; + // customColorMinusZero = RAINBOW_PRESETS[rainbowPresetIdx][2]; + // customColorMinusOne = RAINBOW_PRESETS[rainbowPresetIdx][3]; + // } - Color_RGBA8 color1, color2, color3, color4; - color1.r = static_cast(customColorZero.x * 255.0f); - color1.g = static_cast(customColorZero.y * 255.0f); - color1.b = static_cast(customColorZero.z * 255.0f); + // Color_RGBA8 color1, color2, color3, color4; + // color1.r = static_cast(customColorZero.x * 255.0f); + // color1.g = static_cast(customColorZero.y * 255.0f); + // color1.b = static_cast(customColorZero.z * 255.0f); - color2.r = static_cast(customColorOne.x * 255.0f); - color2.g = static_cast(customColorOne.y * 255.0f); - color2.b = static_cast(customColorOne.z * 255.0f); + // color2.r = static_cast(customColorOne.x * 255.0f); + // color2.g = static_cast(customColorOne.y * 255.0f); + // color2.b = static_cast(customColorOne.z * 255.0f); - color3.r = static_cast(customColorMinusZero.x * 255.0f); - color3.g = static_cast(customColorMinusZero.y * 255.0f); - color3.b = static_cast(customColorMinusZero.z * 255.0f); + // color3.r = static_cast(customColorMinusZero.x * 255.0f); + // color3.g = static_cast(customColorMinusZero.y * 255.0f); + // color3.b = static_cast(customColorMinusZero.z * 255.0f); - color4.r = static_cast(customColorMinusOne.x * 255.0f); - color4.g = static_cast(customColorMinusOne.y * 255.0f); - color4.b = static_cast(customColorMinusOne.z * 255.0f); + // color4.r = static_cast(customColorMinusOne.x * 255.0f); + // color4.g = static_cast(customColorMinusOne.y * 255.0f); + // color4.b = static_cast(customColorMinusOne.z * 255.0f); - CVarSetColor(CVAR("lCustomRainbow1"), color1); - CVarSetColor(CVAR("lCustomRainbow2"), color2); - CVarSetColor(CVAR("lCustomRainbow3"), color3); - CVarSetColor(CVAR("lCustomRainbow4"), color4); + // CVarSetColor(CVAR("lCustomRainbow1"), color1); + // CVarSetColor(CVAR("lCustomRainbow2"), color2); + // CVarSetColor(CVAR("lCustomRainbow3"), color3); + // CVarSetColor(CVAR("lCustomRainbow4"), color4); - OnConfigurationChanged(); - } + // OnConfigurationChanged(); + // } - ImGui::EndMenu(); + // ImGui::EndMenu(); - } + //} //if (UIWidgets::EnhancementCheckbox("DoSomethingWithPots", CVAR("DoSomethingWithPots"))) { // OnConfigurationChanged(); //} diff --git a/soh/soh/Enhancements/Holiday/NotProxySaw.cpp b/soh/soh/Enhancements/Holiday/NotProxySaw.cpp index 4b6c0f600..be44768c4 100644 --- a/soh/soh/Enhancements/Holiday/NotProxySaw.cpp +++ b/soh/soh/Enhancements/Holiday/NotProxySaw.cpp @@ -1,6 +1,6 @@ #include "Holiday.hpp" #include -#include "soh/UIWidgets.hpp" +#include "soh/SohGui/UIWidgets.hpp" #include "soh/Enhancements/game-interactor/GameInteractor.h" #include "soh/Enhancements/custom-message/CustomMessageManager.h" #include "include/message_data_fmt.h" @@ -122,11 +122,11 @@ static void ConfigurationChanged() { } static void DrawMenu() { - ImGui::SeparatorText(AUTHOR); - if (UIWidgets::EnhancementCheckbox("Ganon Dating Sim", CVAR("GanonDatingSim"))) { - ConfigurationChanged(); - } - UIWidgets::Tooltip("Prior to fighting him at the top of his Castle, you make an attempt to convince Ganon to join you instead."); + //ImGui::SeparatorText(AUTHOR); + //if (UIWidgets::EnhancementCheckbox("Ganon Dating Sim", CVAR("GanonDatingSim"))) { + // ConfigurationChanged(); + //} + //UIWidgets::Tooltip("Prior to fighting him at the top of his Castle, you make an attempt to convince Ganon to join you instead."); } static void RegisterMod() { diff --git a/soh/soh/Enhancements/Holiday/Pablo.cpp b/soh/soh/Enhancements/Holiday/Pablo.cpp index 2025863c8..8827b2bc1 100644 --- a/soh/soh/Enhancements/Holiday/Pablo.cpp +++ b/soh/soh/Enhancements/Holiday/Pablo.cpp @@ -137,14 +137,14 @@ void RegisterShiny() { } void ShinyDrawImGui() { - UIWidgets::PaddedEnhancementCheckbox("Enable Shiny Enemies", CVAR("Shiny.Enabled"), true, false); - UIWidgets::Tooltip("Allows enemies to be shiny.\nShiny enemies are 25% bigger and have 4 times the health but drop " - "the equivalent of a gold rupee upon death"); + //UIWidgets::PaddedEnhancementCheckbox("Enable Shiny Enemies", CVAR("Shiny.Enabled"), true, false); + //UIWidgets::Tooltip("Allows enemies to be shiny.\nShiny enemies are 25% bigger and have 4 times the health but drop " + // "the equivalent of a gold rupee upon death"); - if (CVarGetInteger(CVAR("Shiny.Enabled"), 0)) { - UIWidgets::PaddedEnhancementSliderInt("Shiny Chance: %d", "##ShinyChance", CVAR("Shiny.Chance"), 1, 8192, "", 8192, true, true, false, false, ""); - UIWidgets::Tooltip("The chance for an enemy to be shiny is 1 / Shiny Chance"); - } + //if (CVarGetInteger(CVAR("Shiny.Enabled"), 0)) { + // UIWidgets::PaddedEnhancementSliderInt("Shiny Chance: %d", "##ShinyChance", CVAR("Shiny.Chance"), 1, 8192, "", 8192, true, true, false, false, ""); + // UIWidgets::Tooltip("The chance for an enemy to be shiny is 1 / Shiny Chance"); + //} } #pragma endregion diff --git a/soh/soh/Enhancements/Holiday/ProxySaw.cpp b/soh/soh/Enhancements/Holiday/ProxySaw.cpp index 681b10a64..aac32457e 100644 --- a/soh/soh/Enhancements/Holiday/ProxySaw.cpp +++ b/soh/soh/Enhancements/Holiday/ProxySaw.cpp @@ -1,11 +1,11 @@ #include "Holiday.hpp" #include -#include "soh/UIWidgets.hpp" +#include "soh/SohGui/UIWidgets.hpp" #include "soh/Enhancements/game-interactor/GameInteractor.h" #include "objects/object_dog/object_dog.h" #include "soh/frame_interpolation.h" #include "soh/Enhancements/randomizer/3drando/random.hpp" -#include "soh/Enhancements/randomizer/3drando/location_access.hpp" +#include "soh/Enhancements/randomizer/location_access.h" #include "soh/Enhancements/randomizer/entrance.h" #include "objects/gameplay_field_keep/gameplay_field_keep.h" @@ -202,23 +202,23 @@ static void ConfigurationChanged() { } static void DrawMenu() { - ImGui::SeparatorText(AUTHOR); + //ImGui::SeparatorText(AUTHOR); - if (UIWidgets::EnhancementCheckbox("Snowballs", CVAR("Snowballs"))) { - ConfigurationChanged(); - } - UIWidgets::Tooltip("Rogue snowballs will spawn in Hyrule Field and Kakariko Village."); - if (UIWidgets::EnhancementCheckbox("Lake Hylia Icebergs", CVAR("Icebergs"))) { - ConfigurationChanged(); - } - UIWidgets::Tooltip("Icebergs will spawn in Lake Hylia."); - if (UIWidgets::EnhancementCheckbox("Down the Rabbit Hole", CVAR("DownTheRabbitHole"))) { - ConfigurationChanged(); - } - UIWidgets::Tooltip("Random grottos will spawn throughout Hyrule. Who knows where they will take you?"); - if (UIWidgets::EnhancementCheckbox("Super Bonk", CVAR("SuperBonk"))) { - ConfigurationChanged(); - } + //if (UIWidgets::EnhancementCheckbox("Snowballs", CVAR("Snowballs"))) { + // ConfigurationChanged(); + //} + //UIWidgets::Tooltip("Rogue snowballs will spawn in Hyrule Field and Kakariko Village."); + //if (UIWidgets::EnhancementCheckbox("Lake Hylia Icebergs", CVAR("Icebergs"))) { + // ConfigurationChanged(); + //} + //UIWidgets::Tooltip("Icebergs will spawn in Lake Hylia."); + //if (UIWidgets::EnhancementCheckbox("Down the Rabbit Hole", CVAR("DownTheRabbitHole"))) { + // ConfigurationChanged(); + //} + //UIWidgets::Tooltip("Random grottos will spawn throughout Hyrule. Who knows where they will take you?"); + //if (UIWidgets::EnhancementCheckbox("Super Bonk", CVAR("SuperBonk"))) { + // ConfigurationChanged(); + //} } static void RegisterMod() { diff --git a/soh/soh/Enhancements/Holiday/Rando.cpp b/soh/soh/Enhancements/Holiday/Rando.cpp index 7ec0c1ba5..226b9caa1 100644 --- a/soh/soh/Enhancements/Holiday/Rando.cpp +++ b/soh/soh/Enhancements/Holiday/Rando.cpp @@ -1,6 +1,6 @@ #include "Holiday.hpp" #include -#include "soh/UIWidgets.hpp" +#include "soh/SohGui/UIWidgets.hpp" #include "soh/Enhancements/game-interactor/GameInteractor.h" #include "soh/Enhancements/custom-message/CustomMessageManager.h" #include "include/message_data_fmt.h" @@ -20,7 +20,7 @@ static void ConfigurationChanged() { } std::string message; - uint8_t current = gSaveContext.triforcePiecesCollected; + uint8_t current = gSaveContext.ship.quest.data.randomizer.triforcePiecesCollected; uint8_t required = OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_TRIFORCE_HUNT_PIECES_REQUIRED); if (current < required) { diff --git a/soh/soh/Enhancements/Holiday/aMannus.cpp b/soh/soh/Enhancements/Holiday/aMannus.cpp index 70c9e90ae..51e62452b 100644 --- a/soh/soh/Enhancements/Holiday/aMannus.cpp +++ b/soh/soh/Enhancements/Holiday/aMannus.cpp @@ -59,12 +59,12 @@ static void ConfigurationChanged() { } static void DrawMenu() { - ImGui::SeparatorText(AUTHOR); + //ImGui::SeparatorText(AUTHOR); - if (UIWidgets::EnhancementCheckbox("Roc's Feather", CVAR("RocsFeather"))) { - ConfigurationChanged(); - } - UIWidgets::Tooltip("Using Nayru's Love will now act as Roc's Feather instead! No magic required."); + //if (UIWidgets::EnhancementCheckbox("Roc's Feather", CVAR("RocsFeather"))) { + // ConfigurationChanged(); + //} + //UIWidgets::Tooltip("Using Nayru's Love will now act as Roc's Feather instead! No magic required."); } static void RegisterMod() { diff --git a/soh/soh/Enhancements/Holiday/lilDavid.cpp b/soh/soh/Enhancements/Holiday/lilDavid.cpp index 529b72bf3..79b2606fc 100644 --- a/soh/soh/Enhancements/Holiday/lilDavid.cpp +++ b/soh/soh/Enhancements/Holiday/lilDavid.cpp @@ -1,6 +1,6 @@ #include "Holiday.hpp" -#include "utils/StringHelper.h" +#include extern "C" { #include "macros.h" @@ -24,10 +24,10 @@ static void OnConfigurationChanged() { if (!CVarGetInteger(CVAR("BombArrows.Enabled"), 0)) CVarSetInteger(CVAR("BombArrows.Active"), 0); - COND_HOOK(OnSaveFile, CVarGetInteger(CVAR("BombArrows.Enabled"), 0), [](int32_t file) { + COND_HOOK(OnSaveFile, CVarGetInteger(CVAR("BombArrows.Enabled"), 0), [](int32_t file, int32_t sectionID) { std::string cvar = StringHelper::Sprintf("%s%d", CVAR("BombArrows.Save"), file); CVarSetInteger(cvar.c_str(), CVarGetInteger(CVAR("BombArrows.Active"), 0)); - Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); + Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame(); }); COND_HOOK(OnLoadFile, CVarGetInteger(CVAR("BombArrows.Enabled"), 0), [](int32_t file) { @@ -39,13 +39,13 @@ static void OnConfigurationChanged() { std::string cvarFrom = StringHelper::Sprintf("%s%d", CVAR("BombArrows.Save"), from); std::string cvarTo = StringHelper::Sprintf("%s%d", CVAR("BombArrows.Save"), to); CVarSetInteger(cvarTo.c_str(), CVarGetInteger(cvarFrom.c_str(), 0)); - Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); + Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame(); }); COND_HOOK(OnDeleteFile, CVarGetInteger(CVAR("BombArrows.Enabled"), 0), [](int32_t file) { std::string cvar = StringHelper::Sprintf("%s%d", CVAR("BombArrows.Save"), file); CVarSetInteger(cvar.c_str(), 0); - Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); + Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame(); }); COND_ID_HOOK(OnActorInit, ACTOR_EN_ARROW, CVarGetInteger(CVAR("BombArrows.Enabled"), 0), [](void* actorRef) { @@ -116,11 +116,11 @@ static void OnConfigurationChanged() { } static void DrawMenu() { - ImGui::SeparatorText(AUTHOR); - if (UIWidgets::EnhancementCheckbox("Bomb Arrows", CVAR("BombArrows.Enabled"))) { - OnConfigurationChanged(); - } - UIWidgets::Tooltip("Equip bombs over an already equipped Bow to shoot bomb arrows"); + //ImGui::SeparatorText(AUTHOR); + //if (UIWidgets::EnhancementCheckbox("Bomb Arrows", CVAR("BombArrows.Enabled"))) { + // OnConfigurationChanged(); + //} + //UIWidgets::Tooltip("Equip bombs over an already equipped Bow to shoot bomb arrows"); } static void RegisterMod() { diff --git a/soh/soh/Enhancements/TimeDisplay/TimeDisplay.cpp b/soh/soh/Enhancements/TimeDisplay/TimeDisplay.cpp index 9369f9771..ccac9b088 100644 --- a/soh/soh/Enhancements/TimeDisplay/TimeDisplay.cpp +++ b/soh/soh/Enhancements/TimeDisplay/TimeDisplay.cpp @@ -15,7 +15,7 @@ extern PlayState* gPlayState; uint64_t GetUnixTimestamp(); } -float fontScale = 1.0f; +static float fontScale = 1.0f; std::string timeDisplayTime = ""; ImTextureID textureDisplay = 0; ImVec4 windowBG = ImVec4(0, 0, 0, 0.5f); diff --git a/soh/soh/Enhancements/custom-collectible/CustomCollectible.cpp b/soh/soh/Enhancements/custom-collectible/CustomCollectible.cpp index 0fdce8bd8..a6ecaf1ab 100644 --- a/soh/soh/Enhancements/custom-collectible/CustomCollectible.cpp +++ b/soh/soh/Enhancements/custom-collectible/CustomCollectible.cpp @@ -178,7 +178,7 @@ void CustomCollectible_Update(Actor* actor, PlayState* play) { } if (actor->gravity != 0.0f) { - Actor_MoveForward(actor); + Actor_MoveXZGravity(actor); Actor_UpdateBgCheckInfo(play, actor, 20.0f, 15.0f, 15.0f, 0x1D); } diff --git a/soh/soh/Enhancements/mods.cpp b/soh/soh/Enhancements/mods.cpp index dd2f01549..4a4ae18f0 100644 --- a/soh/soh/Enhancements/mods.cpp +++ b/soh/soh/Enhancements/mods.cpp @@ -7,6 +7,7 @@ #include "soh/Enhancements/enhancementTypes.h" #include #include "soh/Enhancements/timesaver_hook_handlers.h" +#include "soh/Enhancements/randomizer/3drando/random.hpp" #include "soh/Enhancements/randomizer/hook_handlers.h" #include "soh/Enhancements/Holiday/Holiday.hpp" diff --git a/soh/soh/Enhancements/randomizer/randomizer.h b/soh/soh/Enhancements/randomizer/randomizer.h index 19a21fe18..228ba1a8f 100644 --- a/soh/soh/Enhancements/randomizer/randomizer.h +++ b/soh/soh/Enhancements/randomizer/randomizer.h @@ -39,6 +39,7 @@ class Randomizer { static const std::string IceTrapRandoMessageTableID; static const std::string randoMiscHintsTableID; static const std::string archipelagoItemsTableID; + static const std::string christmasTreeMessageTableID; static Sprite* GetSeedTexture(uint8_t index); bool SpoilerFileExists(const char* spoilerFileName); diff --git a/soh/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c b/soh/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c index b0370f1a8..fe6aa2523 100644 --- a/soh/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c +++ b/soh/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c @@ -17,7 +17,7 @@ #include "soh/Enhancements/Holiday/Archez.h" #define FLAGS \ - (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED) + (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED) typedef enum { /* 0 */ THROW_NORMAL, diff --git a/soh/src/overlays/actors/ovl_En_ChristmasTree/z_en_christmastree.c b/soh/src/overlays/actors/ovl_En_ChristmasTree/z_en_christmastree.c index 658f1737c..a44dbc6ac 100644 --- a/soh/src/overlays/actors/ovl_En_ChristmasTree/z_en_christmastree.c +++ b/soh/src/overlays/actors/ovl_En_ChristmasTree/z_en_christmastree.c @@ -77,9 +77,9 @@ void EnChristmasTree_Talk(EnChristmasTree* this, PlayState* play) { if (dialogState != TEXT_STATE_CHOICE) { if ((dialogState == TEXT_STATE_DONE) && Message_ShouldAdvance(play)) { // advanced final textbox // Teleport to credits when goal is reached. - if (gSaveContext.triforcePiecesCollected >= Randomizer_GetSettingValue(RSK_TRIFORCE_HUNT_PIECES_REQUIRED)) { - gSaveContext.sohStats.itemTimestamp[TIMESTAMP_TRIFORCE_COMPLETED] = GAMEPLAYSTAT_TOTAL_TIME; - gSaveContext.sohStats.gameComplete = 1; + if (gSaveContext.ship.quest.data.randomizer.triforcePiecesCollected >= Randomizer_GetSettingValue(RSK_TRIFORCE_HUNT_PIECES_REQUIRED)) { + gSaveContext.ship.stats.itemTimestamp[TIMESTAMP_TRIFORCE_COMPLETED] = GAMEPLAYSTAT_TOTAL_TIME; + gSaveContext.ship.stats.gameComplete = 1; Play_PerformSave(play); GameInteractor_SetTriforceHuntCreditsWarpActive(true); this->actionFunc = EnChristmasTree_SetupEndTitle; @@ -148,7 +148,7 @@ void EnChristmasTree_Update(Actor* thisx, PlayState* play) { Actor_SetFocus(&this->actor, 80.0f); uint8_t triforceHuntActive = Randomizer_GetSettingValue(RSK_TRIFORCE_HUNT); - float percentageCompleted = (float)gSaveContext.triforcePiecesCollected / + float percentageCompleted = (float)gSaveContext.ship.quest.data.randomizer.triforcePiecesCollected / (float)Randomizer_GetSettingValue(RSK_TRIFORCE_HUNT_PIECES_REQUIRED); if ((percentageCompleted >= 1.0f || !triforceHuntActive) && !this->spawnedRupee) { @@ -165,7 +165,7 @@ void EnChristmasTree_Draw(Actor* thisx, PlayState* play) { float treeSize = 55.0f; uint8_t triforceHuntActive = Randomizer_GetSettingValue(RSK_TRIFORCE_HUNT); - float percentageCompleted = (float)gSaveContext.triforcePiecesCollected / + float percentageCompleted = (float)gSaveContext.ship.quest.data.randomizer.triforcePiecesCollected / (float)Randomizer_GetSettingValue(RSK_TRIFORCE_HUNT_PIECES_REQUIRED); OPEN_DISPS(play->state.gfxCtx); diff --git a/soh/src/overlays/actors/ovl_En_Go/z_en_go.c b/soh/src/overlays/actors/ovl_En_Go/z_en_go.c index 353d00266..bf27a2afd 100644 --- a/soh/src/overlays/actors/ovl_En_Go/z_en_go.c +++ b/soh/src/overlays/actors/ovl_En_Go/z_en_go.c @@ -5,6 +5,7 @@ #include "soh/frame_interpolation.h" #include "soh/OTRGlobals.h" +#include "soh_assets.h" #include "soh/Enhancements/Holiday/Archez.h" #define FLAGS \ diff --git a/soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c b/soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c index 0b7b566ba..39b6aa406 100644 --- a/soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c +++ b/soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c @@ -8,6 +8,8 @@ #include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h" #include "soh/Enhancements/Holiday/Archez.h" +#include "soh_assets.h" +#include "functions.h" #define FLAGS \ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \ @@ -2030,6 +2032,7 @@ void EnGo2_Update(Actor* thisx, PlayState* play) { s32 EnGo2_DrawCurledUp(EnGo2* this, PlayState* play) { Vec3f D_80A48554 = { 0.0f, 0.0f, 0.0f }; + OPEN_DISPS(play->state.gfxCtx); if (CVarGetInteger("gHoliday.Archez.SnowGolems", 0)) { Matrix_Translate(0.0f, 10.0f, 0.0f, MTXMODE_APPLY); Matrix_Scale(1.75f, 1.75f, 1.75f, MTXMODE_APPLY); diff --git a/soh/src/overlays/actors/ovl_En_Wood02/z_en_wood02.c b/soh/src/overlays/actors/ovl_En_Wood02/z_en_wood02.c index 9df511517..43512f02a 100644 --- a/soh/src/overlays/actors/ovl_En_Wood02/z_en_wood02.c +++ b/soh/src/overlays/actors/ovl_En_Wood02/z_en_wood02.c @@ -373,13 +373,6 @@ void EnWood02_Update(Actor* thisx, PlayState* play2) { // no-op } else if (GameInteractor_Should(VB_TREE_DROP_ITEM, true, this)) { - if ((this->unk_14C >= 0) && (this->unk_14C < 0x64) && (CVarGetInteger(CVAR_ENHANCEMENT("TreesDropSticks"), 0)) && !(INV_CONTENT(ITEM_STICK) == ITEM_NONE)) { - (numDrops = (Rand_ZeroOne() * 4)); - for (i = 0; i < numDrops; ++i) { - Item_DropCollectible(play, &dropsSpawnPt, ITEM00_STICK); - } - } - } else { if ((this->unk_14C >= 0) && (this->unk_14C < 0x64)) { if (GameInteractor_Should(VB_TREE_DROP_COLLECTIBLE, true, this)) { Item_DropCollectibleRandom(play, &this->actor, &dropsSpawnPt, this->unk_14C << 4); @@ -388,7 +381,7 @@ void EnWood02_Update(Actor* thisx, PlayState* play2) { this->actor.home.rot.z &= 0x1FFF; this->actor.home.rot.z |= 0xE000; Actor_Spawn(&play->actorCtx, play, ACTOR_EN_SW, dropsSpawnPt.x, dropsSpawnPt.y, dropsSpawnPt.z, 0, - this->actor.world.rot.y, 0, this->actor.home.rot.z, true); + this->actor.world.rot.y, 0, this->actor.home.rot.z, true); this->actor.home.rot.z = 0; } } 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 006c43412..ca8513566 100644 --- a/soh/src/overlays/actors/ovl_player_actor/z_player.c +++ b/soh/src/overlays/actors/ovl_player_actor/z_player.c @@ -8576,7 +8576,7 @@ void Player_Action_808414F8(Player* this, PlayState* play) { Player_GetMovementSpeedAndYaw(this, &speedTarget, &yawTarget, SPEED_MODE_LINEAR, play); - int32_t giSpeedModifier = GameInteractor_RunSpeedModifier(); + int32_t giSpeedModifier = GameInteractor_MovementSpeedMultiplier(); if (giSpeedModifier != 0) { if (giSpeedModifier > 0) { speedTarget *= giSpeedModifier; diff --git a/soh/src/overlays/effects/ovl_Effect_Ss_Bomb2/z_eff_ss_bomb2.c b/soh/src/overlays/effects/ovl_Effect_Ss_Bomb2/z_eff_ss_bomb2.c index 689082306..cceafe7ed 100644 --- a/soh/src/overlays/effects/ovl_Effect_Ss_Bomb2/z_eff_ss_bomb2.c +++ b/soh/src/overlays/effects/ovl_Effect_Ss_Bomb2/z_eff_ss_bomb2.c @@ -193,3 +193,4 @@ void EffectSsBomb2_Update(PlayState* play, u32 index, EffectSs* this) { this->rEnvColorG = func_80027DD4(this->rEnvColorG, 255, divisor); this->rEnvColorB = func_80027DD4(this->rEnvColorB, 255, divisor); } +}