diff --git a/soh/assets/custom/objects/object_keyring/Hilite_new.rgba16 b/soh/assets/custom/objects/object_keyring/Hilite_new.rgba16
new file mode 100644
index 000000000..5438695fa
Binary files /dev/null and b/soh/assets/custom/objects/object_keyring/Hilite_new.rgba16 differ
diff --git a/soh/assets/custom/objects/object_keyring/gKeyringIconGerudoFortressDL b/soh/assets/custom/objects/object_keyring/gKeyringIconGerudoFortressDL
index 3552eef1b..7cb17d889 100644
--- a/soh/assets/custom/objects/object_keyring/gKeyringIconGerudoFortressDL
+++ b/soh/assets/custom/objects/object_keyring/gKeyringIconGerudoFortressDL
@@ -1,11 +1,10 @@
+
+
+
+
-
-
-
-
-
diff --git a/soh/assets/custom/objects/object_keyring/gKeyringIconGerudoFortressDL_tri_0 b/soh/assets/custom/objects/object_keyring/gKeyringIconGerudoFortressDL_tri_0
index 791defa81..c7b29e9c7 100644
--- a/soh/assets/custom/objects/object_keyring/gKeyringIconGerudoFortressDL_tri_0
+++ b/soh/assets/custom/objects/object_keyring/gKeyringIconGerudoFortressDL_tri_0
@@ -1,213 +1,110 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/soh/assets/custom/objects/object_keyring/gKeyringIconGerudoFortressDL_vtx_0 b/soh/assets/custom/objects/object_keyring/gKeyringIconGerudoFortressDL_vtx_0
index 1dd0cbb61..5ab0f76ec 100644
--- a/soh/assets/custom/objects/object_keyring/gKeyringIconGerudoFortressDL_vtx_0
+++ b/soh/assets/custom/objects/object_keyring/gKeyringIconGerudoFortressDL_vtx_0
@@ -1,233 +1,210 @@
-
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
-
+
-
-
-
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
-
-
-
+
+
+
+
+
-
-
-
-
+
+
+
+
-
-
-
+
-
-
-
+
-
-
-
+
+
+
-
-
+
+
-
-
-
-
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
+
+
+
+
-
-
-
+
+
+
-
-
-
+
-
+
-
-
-
+
+
+
+
+
-
+
+
-
-
-
-
+
+
-
-
-
-
+
+
+
-
-
-
-
-
-
-
+
+
+
+
-
+
-
+
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
+
+
+
-
-
-
+
-
+
-
+
+
-
-
-
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
-
+
-
+
-
+
-
+
-
+
+
+
-
+
-
+
-
+
-
-
+
+
-
+
diff --git a/soh/assets/custom/objects/object_keyring/gKeyringIconGerudoFortressDL_vtx_cull b/soh/assets/custom/objects/object_keyring/gKeyringIconGerudoFortressDL_vtx_cull
new file mode 100644
index 000000000..6ef0139b8
--- /dev/null
+++ b/soh/assets/custom/objects/object_keyring/gKeyringIconGerudoFortressDL_vtx_cull
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/soh/assets/custom/objects/object_keyring/mat_gKeyringIconGerudoFortressDL_f3dlite_IconMetal_GerudoFortress b/soh/assets/custom/objects/object_keyring/mat_gKeyringIconGerudoFortressDL_f3dlite_IconMetal_GerudoFortress
index b5755b4a8..f926de784 100644
--- a/soh/assets/custom/objects/object_keyring/mat_gKeyringIconGerudoFortressDL_f3dlite_IconMetal_GerudoFortress
+++ b/soh/assets/custom/objects/object_keyring/mat_gKeyringIconGerudoFortressDL_f3dlite_IconMetal_GerudoFortress
@@ -1,21 +1,15 @@
+
-
-
-
+
-
-
-
-
-
+
+
-
-
diff --git a/soh/assets/custom/objects/object_keyring/model.xml b/soh/assets/custom/objects/object_keyring/model.xml
new file mode 100644
index 000000000..6ef0139b8
--- /dev/null
+++ b/soh/assets/custom/objects/object_keyring/model.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/soh/soh/Enhancements/RemoveSpinAttackDarkness.cpp b/soh/soh/Enhancements/RemoveSpinAttackDarkness.cpp
index 20beb193a..37fed1b7d 100644
--- a/soh/soh/Enhancements/RemoveSpinAttackDarkness.cpp
+++ b/soh/soh/Enhancements/RemoveSpinAttackDarkness.cpp
@@ -10,6 +10,12 @@ void Custom_EnMThunder_Update(Actor* thisx, PlayState* play) {
f32 blueRadius;
s32 redGreen;
+ // If thunder effect doesn't exist (aka player doesn't have magic),
+ // don't do anything.
+ if (enMThunder->actionFunc == nullptr) {
+ return;
+ }
+
enMThunder->actionFunc(enMThunder, play);
// don't call this part, it's what makes the spin attack darkness happen
// func_80A9F314(play, this->unk_1BC);
diff --git a/soh/soh/Enhancements/audio/AudioEditor.cpp b/soh/soh/Enhancements/audio/AudioEditor.cpp
index 0149aa148..efbcd5c28 100644
--- a/soh/soh/Enhancements/audio/AudioEditor.cpp
+++ b/soh/soh/Enhancements/audio/AudioEditor.cpp
@@ -488,6 +488,85 @@ void AudioEditor::DrawElement() {
UIWidgets::PushStyleTabs(THEME_COLOR);
if (ImGui::BeginTabBar("SfxContextTabBar", ImGuiTabBarFlags_NoCloseWithMiddleMouseButton)) {
+
+ static ImVec2 cellPadding(8.0f, 8.0f);
+ if (ImGui::BeginTabItem("Audio Options")) {
+ ImGui::PushStyleVar(ImGuiStyleVar_CellPadding, cellPadding);
+ ImGui::BeginTable("Audio Options", 1, ImGuiTableFlags_SizingStretchSame);
+ ImGui::TableSetupColumn("", ImGuiTableColumnFlags_WidthStretch);
+ ImGui::TableNextRow();
+ ImGui::TableNextColumn();
+ if (ImGui::BeginChild("SfxOptions", ImVec2(0, -8))) {
+ UIWidgets::CVarCheckbox(
+ "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()
+ .Color(THEME_COLOR)
+ .Tooltip("Disables the voice audio when Navi calls you."));
+ UIWidgets::CVarCheckbox(
+ "Disable Enemy Proximity Music", CVAR_AUDIO("EnemyBGMDisable"),
+ UIWidgets::CheckboxOptions()
+ .Color(THEME_COLOR)
+ .Tooltip("Disables the music change when getting close to enemies. Useful for hearing "
+ "your custom music for each scene more often."));
+ UIWidgets::CVarCheckbox(
+ "Disable Leading Music in Lost Woods", CVAR_AUDIO("LostWoodsConsistentVolume"),
+ UIWidgets::CheckboxOptions()
+ .Color(THEME_COLOR)
+ .Tooltip("Disables the volume shifting in the Lost Woods. Useful for hearing "
+ "your custom music in the Lost Woods if you don't need the navigation assitance "
+ "the volume changing provides. If toggling this while in the Lost Woods, reload "
+ "the area for the effect to kick in."));
+ UIWidgets::CVarCheckbox(
+ "Display Sequence Name on Overlay", CVAR_AUDIO("SeqNameOverlay"),
+ UIWidgets::CheckboxOptions()
+ .Color(THEME_COLOR)
+ .Tooltip("Displays the name of the current sequence in the corner of the screen whenever a new "
+ "sequence "
+ "is loaded to the main sequence player (does not apply to fanfares or enemy BGM)."));
+ UIWidgets::CVarSliderInt("Overlay Duration: %d seconds", CVAR_AUDIO("SeqNameOverlayDuration"),
+ UIWidgets::IntSliderOptions()
+ .Min(1)
+ .Max(10)
+ .DefaultValue(5)
+ .Size(ImVec2(300.0f, 0.0f))
+ .Color(THEME_COLOR));
+ UIWidgets::CVarSliderFloat("Link's voice pitch multiplier", CVAR_AUDIO("LinkVoiceFreqMultiplier"),
+ UIWidgets::FloatSliderOptions()
+ .IsPercentage()
+ .Min(0.4f)
+ .Max(2.5f)
+ .DefaultValue(1.0f)
+ .Size(ImVec2(300.0f, 0.0f))
+ .Color(THEME_COLOR));
+ ImGui::SameLine();
+ ImGui::SetCursorPosY(ImGui::GetCursorPos().y + 40.f);
+ if (UIWidgets::Button("Reset##linkVoiceFreqMultiplier",
+ UIWidgets::ButtonOptions().Size(ImVec2(80, 36)).Padding(ImVec2(5.0f, 0.0f)))) {
+ CVarSetFloat(CVAR_AUDIO("LinkVoiceFreqMultiplier"), 1.0f);
+ }
+ UIWidgets::CVarCheckbox(
+ "Randomize All Music and Sound Effects on New Scene", CVAR_AUDIO("RandomizeAllOnNewScene"),
+ UIWidgets::CheckboxOptions()
+ .Color(THEME_COLOR)
+ .Tooltip(
+ "Enables randomizing all unlocked music and sound effects when you enter a new scene."));
+ UIWidgets::CVarCheckbox(
+ "Lower Octaves of Unplayable High Notes", CVAR_AUDIO("ExperimentalOctaveDrop"),
+ UIWidgets::CheckboxOptions()
+ .Color(THEME_COLOR)
+ .Tooltip("Some custom sequences may have notes that are too high for the game's audio "
+ "engine to play. Enabling this checkbox will cause these notes to drop a "
+ "couple of octaves so they can still harmonize with the other notes of the "
+ "sequence."));
+ }
+ ImGui::EndChild();
+ ImGui::EndTable();
+ ImGui::PopStyleVar(1);
+ ImGui::EndTabItem();
+ }
+
if (ImGui::BeginTabItem("Background Music")) {
Draw_SfxTab("backgroundMusic", SEQ_BGM_WORLD, "Background Music");
ImGui::EndTabItem();
@@ -518,78 +597,6 @@ void AudioEditor::DrawElement() {
ImGui::EndTabItem();
}
- static ImVec2 cellPadding(8.0f, 8.0f);
- if (ImGui::BeginTabItem("Options")) {
- ImGui::PushStyleVar(ImGuiStyleVar_CellPadding, cellPadding);
- ImGui::BeginTable("Options", 1, ImGuiTableFlags_SizingStretchSame);
- ImGui::TableSetupColumn("", ImGuiTableColumnFlags_WidthStretch);
- ImGui::TableNextRow();
- ImGui::TableNextColumn();
- if (ImGui::BeginChild("SfxOptions", ImVec2(0, -8))) {
- UIWidgets::CVarCheckbox(
- "Disable Enemy Proximity Music", CVAR_AUDIO("EnemyBGMDisable"),
- UIWidgets::CheckboxOptions()
- .Color(THEME_COLOR)
- .Tooltip("Disables the music change when getting close to enemies. Useful for hearing "
- "your custom music for each scene more often."));
- UIWidgets::CVarCheckbox(
- "Disable Leading Music in Lost Woods", CVAR_AUDIO("LostWoodsConsistentVolume"),
- UIWidgets::CheckboxOptions()
- .Color(THEME_COLOR)
- .Tooltip("Disables the volume shifting in the Lost Woods. Useful for hearing "
- "your custom music in the Lost Woods if you don't need the navigation assitance "
- "the volume changing provides. If toggling this while in the Lost Woods, reload "
- "the area for the effect to kick in."));
- UIWidgets::CVarCheckbox(
- "Display Sequence Name on Overlay", CVAR_AUDIO("SeqNameOverlay"),
- UIWidgets::CheckboxOptions()
- .Color(THEME_COLOR)
- .Tooltip("Displays the name of the current sequence in the corner of the screen whenever a new "
- "sequence "
- "is loaded to the main sequence player (does not apply to fanfares or enemy BGM)."));
- UIWidgets::CVarSliderInt("Overlay Duration: %d seconds", CVAR_AUDIO("SeqNameOverlayDuration"),
- UIWidgets::IntSliderOptions()
- .Min(1)
- .Max(10)
- .DefaultValue(5)
- .Size(ImVec2(300.0f, 0.0f))
- .Color(THEME_COLOR));
- UIWidgets::CVarSliderFloat("Link's voice pitch multiplier",
- CVAR_AUDIO("LinkVoiceFreqMultiplier"),
- UIWidgets::FloatSliderOptions()
- .IsPercentage()
- .Min(0.4f)
- .Max(2.5f)
- .DefaultValue(1.0f)
- .Size(ImVec2(300.0f, 0.0f))
- .Color(THEME_COLOR));
- ImGui::SameLine();
- ImGui::SetCursorPosY(ImGui::GetCursorPos().y + 40.f);
- if (UIWidgets::Button("Reset##linkVoiceFreqMultiplier",
- UIWidgets::ButtonOptions().Size(ImVec2(80, 36)).Padding(ImVec2(5.0f, 0.0f)))) {
- CVarSetFloat(CVAR_AUDIO("LinkVoiceFreqMultiplier"), 1.0f);
- }
- UIWidgets::CVarCheckbox(
- "Randomize All Music and Sound Effects on New Scene", CVAR_AUDIO("RandomizeAllOnNewScene"),
- UIWidgets::CheckboxOptions()
- .Color(THEME_COLOR)
- .Tooltip(
- "Enables randomizing all unlocked music and sound effects when you enter a new scene."));
- UIWidgets::CVarCheckbox(
- "Lower Octaves of Unplayable High Notes", CVAR_AUDIO("ExperimentalOctaveDrop"),
- UIWidgets::CheckboxOptions()
- .Color(THEME_COLOR)
- .Tooltip("Some custom sequences may have notes that are too high for the game's audio "
- "engine to play. Enabling this checkbox will cause these notes to drop a "
- "couple of octaves so they can still harmonize with the other notes of the "
- "sequence."));
- }
- ImGui::EndChild();
- ImGui::EndTable();
- ImGui::PopStyleVar(1);
- ImGui::EndTabItem();
- }
-
static bool excludeTabOpen = false;
if (ImGui::BeginTabItem("Audio Shuffle Pool Management")) {
ImGui::PushStyleVar(ImGuiStyleVar_CellPadding, cellPadding);
diff --git a/soh/soh/Enhancements/controls/InputViewer.cpp b/soh/soh/Enhancements/controls/InputViewer.cpp
index 3eb18c0e2..d26de6719 100644
--- a/soh/soh/Enhancements/controls/InputViewer.cpp
+++ b/soh/soh/Enhancements/controls/InputViewer.cpp
@@ -428,7 +428,6 @@ InputViewerSettingsWindow::~InputViewerSettingsWindow() {
}
void InputViewerSettingsWindow::DrawElement() {
- ImGui::PushFont(OTRGlobals::Instance->fontMonoLarger);
// gInputViewer.Scale
CVarSliderFloat("Input Viewer Scale: %.2f", CVAR_INPUT_VIEWER("Scale"),
FloatSliderOptions().Color(THEME_COLOR).DefaultValue(1.0f).Min(0.1f).Max(5.0f).ShowButtons(true).Tooltip("Sets the on screen size of the input viewer"));
@@ -565,7 +564,7 @@ void InputViewerSettingsWindow::DrawElement() {
ImGui::Unindent();
}
- UIWidgets:PaddedSeparator(true, true);
+ UIWidgets::PaddedSeparator(true, true);
}
if (ImGui::CollapsingHeader("Analog Stick")) {
@@ -640,5 +639,4 @@ void InputViewerSettingsWindow::DrawElement() {
}
}
PopStyleHeader();
- ImGui::PopFont();
}
diff --git a/soh/soh/Enhancements/cosmetics/CosmeticsEditor.cpp b/soh/soh/Enhancements/cosmetics/CosmeticsEditor.cpp
index 93c866eb3..ddd36fa56 100644
--- a/soh/soh/Enhancements/cosmetics/CosmeticsEditor.cpp
+++ b/soh/soh/Enhancements/cosmetics/CosmeticsEditor.cpp
@@ -283,13 +283,13 @@ static std::map cosmeticOptions = {
COSMETIC_OPTION("Key.GanonsBossGem", "Ganons Boss Key Gem", COSMETICS_GROUP_BOSS_KEYS, ColorRGBA8(255, 0, 0, 255), false, true, false),
COSMETIC_OPTION("Key.WellSmallBody", "Well Small Key", COSMETICS_GROUP_SMALL_KEYS, ColorRGBA8(255, 255, 255, 255), false, true, false),
- COSMETIC_OPTION("Key.WellSmallEmblem", "Well Small Key Emblem", COSMETICS_GROUP_SMALL_KEYS, ColorRGBA8(227, 110, 255, 255), false, true, true),
+ COSMETIC_OPTION("Key.WellSmallEmblem", "Well Small Key Emblem", COSMETICS_GROUP_SMALL_KEYS, ColorRGBA8(227, 110, 255, 255), false, true, false),
COSMETIC_OPTION("Key.FortSmallBody", "Fortress Small Key", COSMETICS_GROUP_SMALL_KEYS, ColorRGBA8(255, 255, 255, 255), false, true, false),
- COSMETIC_OPTION("Key.FortSmallEmblem", "Fortress Small Key Emblem",COSMETICS_GROUP_SMALL_KEYS, ColorRGBA8(255, 255, 255, 255), false, true, true),
+ COSMETIC_OPTION("Key.FortSmallEmblem", "Fortress Small Key Emblem",COSMETICS_GROUP_SMALL_KEYS, ColorRGBA8(255, 255, 255, 255), false, true, false),
COSMETIC_OPTION("Key.GTGSmallBody", "GTG Small Key", COSMETICS_GROUP_SMALL_KEYS, ColorRGBA8(255, 255, 255, 255), false, true, false),
- COSMETIC_OPTION("Key.GTGSmallEmblem", "GTG Small Key Emblem", COSMETICS_GROUP_SMALL_KEYS, ColorRGBA8(221, 212, 60, 255), false, true, true),
+ COSMETIC_OPTION("Key.GTGSmallEmblem", "GTG Small Key Emblem", COSMETICS_GROUP_SMALL_KEYS, ColorRGBA8(221, 212, 60, 255), false, true, false),
//COSMETIC_OPTION("Key.ChestGameSmallBody", "Chest Game Key", COSMETICS_GROUP_SMALL_KEYS, ColorRGBA8(255, 255, 255, 255), false, true, false),
- //COSMETIC_OPTION("Key.ChestGameEmblem", "Chest Game Key Emblem", COSMETICS_GROUP_SMALL_KEYS, ColorRGBA8(255, 0, 0, 255), false, true, true),
+ //COSMETIC_OPTION("Key.ChestGameEmblem", "Chest Game Key Emblem", COSMETICS_GROUP_SMALL_KEYS, ColorRGBA8(255, 0, 0, 255), false, true, false),
COSMETIC_OPTION("Key.Skeleton", "Skeleton Key", COSMETICS_GROUP_SMALL_KEYS, ColorRGBA8(255, 255, 170, 255), false, true, false),
COSMETIC_OPTION("HUD.AButton", "A Button", COSMETICS_GROUP_HUD, ColorRGBA8( 90, 90, 255, 255), false, true, false),
@@ -1523,7 +1523,7 @@ void Draw_Placements(){
CVarSetInteger(CVAR_COSMETIC("HUD.EnemyHealthBar.Width.Changed"), 1);
}
ImGui::SameLine();
- ImGui::SetCursorPosY(ImGui::GetCursorPosY() + 24);
+ ImGui::SetCursorPosY(ImGui::GetCursorPosY() + (ImGui::CalcTextSize("g").y * 2));
if (UIWidgets::Button("Reset##EnemyHealthBarWidth",
UIWidgets::ButtonOptions().Size(ImVec2(80, 36)).Padding(ImVec2(5.0f, 0.0f)))) {
CVarClear(CVAR_COSMETIC("HUD.EnemyHealthBar.Width.Value"));
@@ -1537,7 +1537,7 @@ void Draw_Placements(){
void Reset_Option_Single(const char* Button_Title, const char* name) {
ImGui::SameLine();
- ImGui::SetCursorPosY(ImGui::GetCursorPosY() + 24);
+ ImGui::SetCursorPosY(ImGui::GetCursorPosY() + (ImGui::CalcTextSize("g").y * 2));
if (UIWidgets::Button(Button_Title,
UIWidgets::ButtonOptions().Size(ImVec2(80, 36)).Padding(ImVec2(5.0f, 0.0f)))) {
CVarClear(name);
@@ -1546,7 +1546,7 @@ void Reset_Option_Single(const char* Button_Title, const char* name) {
void Reset_Option_Double(const char* Button_Title, const char* name) {
ImGui::SameLine();
- ImGui::SetCursorPosY(ImGui::GetCursorPosY() + 24);
+ ImGui::SetCursorPosY(ImGui::GetCursorPosY() + (ImGui::CalcTextSize("g").y * 2));
if (UIWidgets::Button(Button_Title,
UIWidgets::ButtonOptions().Size(ImVec2(80, 36)).Padding(ImVec2(5.0f, 0.0f)))) {
CVarClear((std::string(name) + ".Value").c_str());
@@ -1578,7 +1578,7 @@ void DrawSillyTab() {
CVarSetInteger(CVAR_COSMETIC("Link.BodySize.Changed"), 1);
}
ImGui::SameLine();
- ImGui::SetCursorPosY(ImGui::GetCursorPosY() + 24);
+ ImGui::SetCursorPosY(ImGui::GetCursorPosY() + (ImGui::CalcTextSize("g").y * 2));
if (UIWidgets::Button("Reset##Link_BodySize",
UIWidgets::ButtonOptions().Size(ImVec2(80, 36)).Padding(ImVec2(5.0f, 0.0f)))) {
CVarClear(CVAR_COSMETIC("Link.BodySize.Value"));
@@ -2045,8 +2045,8 @@ void CosmeticsEditorWindow::DrawElement() {
UIWidgets::ComboboxOptions()
.DefaultIndex(COLORSCHEME_N64)
.Color(THEME_COLOR)
- .LabelPosition(UIWidgets::LabelPosition::Near)
- .ComponentAlignment(UIWidgets::ComponentAlignment::Right));
+ .LabelPosition(UIWidgets::LabelPositions::Near)
+ .ComponentAlignment(UIWidgets::ComponentAlignments::Right));
UIWidgets::CVarCheckbox("Sync Rainbow colors", CVAR_COSMETIC("RainbowSync"),
UIWidgets::CheckboxOptions()
.Color(THEME_COLOR));
@@ -2194,7 +2194,7 @@ void CosmeticsEditorWindow::DrawElement() {
CVarSetInteger(CVAR_COSMETIC("Trails.Duration.Changed"), 1);
}
ImGui::SameLine();
- ImGui::SetCursorPosY(ImGui::GetCursorPosY() + 24);
+ ImGui::SetCursorPosY(ImGui::GetCursorPosY() + (ImGui::CalcTextSize("g").y * 2));
if (UIWidgets::Button("Reset##Trails_Duration", UIWidgets::ButtonOptions()
.Size(ImVec2(80, 36))
.Padding(ImVec2(5.0f, 0.0f)))) {
diff --git a/soh/soh/Enhancements/debugconsole.cpp b/soh/soh/Enhancements/debugconsole.cpp
index 96bee1ffd..dac3b2de9 100644
--- a/soh/soh/Enhancements/debugconsole.cpp
+++ b/soh/soh/Enhancements/debugconsole.cpp
@@ -79,6 +79,7 @@ static bool ActorSpawnHandler(std::shared_ptr Console, const std:
if (args[8][0] != ',') {
spawnPoint.rot.z = std::stoi(args[8]);
}
+ [[fallthrough]];
case 6:
if (args[3][0] != ',') {
spawnPoint.pos.x = std::stoi(args[3]);
diff --git a/soh/soh/Enhancements/debugger/MessageViewer.cpp b/soh/soh/Enhancements/debugger/MessageViewer.cpp
index 49764374f..aabe9ad61 100644
--- a/soh/soh/Enhancements/debugger/MessageViewer.cpp
+++ b/soh/soh/Enhancements/debugger/MessageViewer.cpp
@@ -26,7 +26,6 @@ void MessageViewer::InitElement() {
}
void MessageViewer::DrawElement() {
- ImGui::PushFont(OTRGlobals::Instance->fontMonoLargest);
ImGui::Text("Table ID");
ImGui::SameLine();
PushStyleInput(THEME_COLOR);
@@ -86,7 +85,6 @@ void MessageViewer::DrawElement() {
mDisplayCustomMessageClicked = true;
}
PopStyleButton();
- ImGui::PopFont();
}
void MessageViewer::UpdateElement() {
diff --git a/soh/soh/Enhancements/debugger/actorViewer.cpp b/soh/soh/Enhancements/debugger/actorViewer.cpp
index a154df65b..767ff2723 100644
--- a/soh/soh/Enhancements/debugger/actorViewer.cpp
+++ b/soh/soh/Enhancements/debugger/actorViewer.cpp
@@ -934,8 +934,6 @@ void ActorViewerWindow::DrawElement() {
static s16 currentSelectedInDropdown;
static std::vector actors;
- ImGui::PushFont(OTRGlobals::Instance->fontMonoLargest);
-
if (gPlayState != nullptr) {
needs_reset = lastSceneId != gPlayState->sceneNum;
if (needs_reset) {
@@ -1234,7 +1232,6 @@ void ActorViewerWindow::DrawElement() {
actors.clear();
}
}
- ImGui::PopFont();
}
void ActorViewerWindow::InitElement() {
diff --git a/soh/soh/Enhancements/debugger/debugSaveEditor.cpp b/soh/soh/Enhancements/debugger/debugSaveEditor.cpp
index dfc4d9681..0e9bbc79a 100644
--- a/soh/soh/Enhancements/debugger/debugSaveEditor.cpp
+++ b/soh/soh/Enhancements/debugger/debugSaveEditor.cpp
@@ -1550,7 +1550,7 @@ void ResetBaseOptions() {
intSliderOptionsBase.Color(THEME_COLOR).Size({320.0f, 0.0f}).Tooltip("");
buttonOptionsBase.Color(THEME_COLOR).Size(Sizes::Inline).Tooltip("");
checkboxOptionsBase.Color(THEME_COLOR).Tooltip("");
- comboboxOptionsBase.Color(THEME_COLOR).ComponentAlignment(ComponentAlignment::Left).LabelPosition(LabelPosition::Near).Tooltip("");
+ comboboxOptionsBase.Color(THEME_COLOR).ComponentAlignment(ComponentAlignments::Left).LabelPosition(LabelPositions::Near).Tooltip("");
}
void SaveEditorWindow::DrawElement() {
diff --git a/soh/soh/Enhancements/debugger/dlViewer.cpp b/soh/soh/Enhancements/debugger/dlViewer.cpp
index 1459d2809..a591cf948 100644
--- a/soh/soh/Enhancements/debugger/dlViewer.cpp
+++ b/soh/soh/Enhancements/debugger/dlViewer.cpp
@@ -91,7 +91,6 @@ void PerformDisplayListSearch() {
}
void DLViewerWindow::DrawElement() {
- ImGui::PushFont(OTRGlobals::Instance->fontMonoLarger);
// Debounce the search field as listing otr files is expensive
UIWidgets::PushStyleInput(THEME_COLOR);
if (ImGui::InputText("Search Display Lists", searchString, ARRAY_COUNT(searchString))) {
@@ -122,7 +121,6 @@ void DLViewerWindow::DrawElement() {
UIWidgets::PopStyleCombobox();
if (activeDisplayList == "") {
- ImGui::PopFont();
return;
}
@@ -131,7 +129,6 @@ void DLViewerWindow::DrawElement() {
if (res->GetInitData()->Type != static_cast(Fast::ResourceType::DisplayList)) {
ImGui::Text("Resource type is not a Display List. Please choose another.");
- ImGui::PopFont();
return;
}
@@ -329,10 +326,8 @@ void DLViewerWindow::DrawElement() {
}
} catch (const std::exception& e) {
ImGui::Text("Error displaying DL instructions.");
- ImGui::PopFont();
return;
}
- ImGui::PopFont();
}
void DLViewerWindow::InitElement() {
diff --git a/soh/soh/Enhancements/debugger/hookDebugger.cpp b/soh/soh/Enhancements/debugger/hookDebugger.cpp
index 782cf4f7a..a9d6ca891 100644
--- a/soh/soh/Enhancements/debugger/hookDebugger.cpp
+++ b/soh/soh/Enhancements/debugger/hookDebugger.cpp
@@ -4,28 +4,29 @@
#include
#include
-static std::unordered_map*> hookData;
+static std::map*> hookData;
const ImVec4 grey = ImVec4(0.75, 0.75, 0.75, 1);
const ImVec4 yellow = ImVec4(1, 1, 0, 1);
const ImVec4 red = ImVec4(1, 0, 0, 1);
void DrawHookRegisteringInfos(const char* hookName) {
- if ((*hookData[hookName]).size() == 0) {
+ size_t numHooks = (*hookData[hookName]).size();
+
+ if (numHooks == 0) {
ImGui::TextColored(grey, "No hooks found");
return;
}
- if (ImGui::BeginTable(
- ("Table##" + std::string(hookName)).c_str(),
- 4,
- ImGuiTableFlags_Resizable | ImGuiTableFlags_Reorderable | ImGuiTableFlags_Hideable | ImGuiTableFlags_Borders | ImGuiTableFlags_SizingFixedFit
- )) {
- ImGui::TableSetupColumn("Id");
- ImGui::TableSetupColumn("Type");
- ImGui::TableSetupColumn("Registration Info");
- //ImGui::TableSetupColumn("Stub");
- ImGui::TableSetupColumn("Number of Calls");
+ ImGui::Text("Total Registered: %d", numHooks);
+
+ if (ImGui::BeginTable(("Table##" + std::string(hookName)).c_str(), 4,
+ ImGuiTableFlags_Resizable | ImGuiTableFlags_Reorderable | ImGuiTableFlags_Hideable |
+ ImGuiTableFlags_Borders | ImGuiTableFlags_SizingFixedFit)) {
+ ImGui::TableSetupColumn("ID", ImGuiTableColumnFlags_WidthFixed);
+ ImGui::TableSetupColumn("Type", ImGuiTableColumnFlags_WidthFixed);
+ ImGui::TableSetupColumn("Registration Info", ImGuiTableColumnFlags_WidthStretch);
+ ImGui::TableSetupColumn("# Calls", ImGuiTableColumnFlags_WidthFixed);
ImGui::TableHeadersRow();
for (auto& [id, hookInfo] : (*hookData[hookName])) {
ImGui::TableNextRow();
@@ -39,7 +40,7 @@ void DrawHookRegisteringInfos(const char* hookName) {
ImGui::Text("Normal");
break;
case HOOK_TYPE_ID:
- ImGui::Text("Id");
+ ImGui::Text("ID");
break;
case HOOK_TYPE_PTR:
ImGui::Text("Ptr");
@@ -54,27 +55,19 @@ void DrawHookRegisteringInfos(const char* hookName) {
ImGui::TableNextColumn();
if (hookInfo.registering.valid) {
- ImGui::Text("%s(%d:%d) %s", hookInfo.registering.file, hookInfo.registering.line, hookInfo.registering.column, hookInfo.registering.function);
+ // Replace the space after the return type of the parent function with a non-breaking space
+ std::string parentFunction = std::string(hookInfo.registering.function);
+ size_t pos = parentFunction.find_first_of(" ");
+ if (pos != std::string::npos) {
+ parentFunction.replace(pos, 1, "\u00A0");
+ }
+ // Non breaking space to keep the arrow with the parent function
+ ImGui::TextWrapped("%s(%d:%d) <-\u00A0%s", hookInfo.registering.file, hookInfo.registering.line,
+ hookInfo.registering.column, parentFunction.c_str());
} else {
- ImGui::TextColored(yellow, "[Unavaliable]");
+ ImGui::TextColored(yellow, "[Unavailable]");
}
- //TODO: not currently possible
- /*
- ImGui::TableNextColumn();
-
- ImGui::BeginDisabled();
-
- bool stubButtonPressed = ImGui::Button(("Stub##" + std::to_string(id)).c_str());
- UIWidgets::SetLastItemHoverText("Stub this hook.\nThis is not possible to automatically undo.");
-
- if (stubButtonPressed) {
- //stub
- }
-
- ImGui::EndDisabled();
- */
-
ImGui::TableNextColumn();
ImGui::Text("%d", hookInfo.calls);
}
@@ -84,12 +77,9 @@ void DrawHookRegisteringInfos(const char* hookName) {
void HookDebuggerWindow::DrawElement() {
#ifndef __cpp_lib_source_location
- ImGui::TextColored(
- yellow,
- "Some features of the Hook Debugger are unavaliable because SoH was compiled "
- "without \"\" support "
- "(\"__cpp_lib_source_location\" not defined in \"\")."
- );
+ ImGui::TextColored(yellow, "Some features of the Hook Debugger are unavailable because SoH was compiled "
+ "without \"\" support "
+ "(\"__cpp_lib_source_location\" not defined in \"\").");
#endif
for (auto& [hookName, _] : hookData) {
@@ -101,9 +91,9 @@ void HookDebuggerWindow::DrawElement() {
}
void HookDebuggerWindow::InitElement() {
- #define DEFINE_HOOK(name, _) hookData.insert({#name, GameInteractor::Instance->GetHookData()});
+#define DEFINE_HOOK(name, _) hookData.insert({ #name, GameInteractor::Instance->GetHookData() });
- #include "../game-interactor/GameInteractor_HookTable.h"
+#include "../game-interactor/GameInteractor_HookTable.h"
- #undef DEFINE_HOOK
+#undef DEFINE_HOOK
}
diff --git a/soh/soh/Enhancements/debugger/valueViewer.cpp b/soh/soh/Enhancements/debugger/valueViewer.cpp
index 40ec77f71..23ce4e26c 100644
--- a/soh/soh/Enhancements/debugger/valueViewer.cpp
+++ b/soh/soh/Enhancements/debugger/valueViewer.cpp
@@ -143,7 +143,6 @@ void RegisterValueViewerHooks() {
RegisterShipInitFunc initFunc(RegisterValueViewerHooks, { CVAR_NAME });
void ValueViewerWindow::DrawElement() {
- ImGui::PushFont(OTRGlobals::Instance->fontMonoLargest);
UIWidgets::CVarCheckbox("Enable Printing", CVAR_NAME, UIWidgets::CheckboxOptions().Color(THEME_COLOR));
ImGui::BeginGroup();
@@ -264,7 +263,6 @@ void ValueViewerWindow::DrawElement() {
}
ImGui::EndGroup();
}
- ImGui::PopFont();
}
void ValueViewerWindow::InitElement() {
diff --git a/soh/soh/Enhancements/enemyrandomizer.cpp b/soh/soh/Enhancements/enemyrandomizer.cpp
index a2b72ca07..e638d04ad 100644
--- a/soh/soh/Enhancements/enemyrandomizer.cpp
+++ b/soh/soh/Enhancements/enemyrandomizer.cpp
@@ -286,7 +286,7 @@ void GetSelectedEnemies() {
for (int i = 0; i < 49; i++) {
if (CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemyList.All"), 0)) {
selectedEnemyList.push_back(randomizedEnemySpawnTable[i]);
- } else if (CVarGetInteger(enemyCVarList[i], 0)) {
+ } else if (CVarGetInteger(enemyCVarList[i], 1)) {
selectedEnemyList.push_back(randomizedEnemySpawnTable[i]);
}
}
diff --git a/soh/soh/Enhancements/game-interactor/GameInteractor.h b/soh/soh/Enhancements/game-interactor/GameInteractor.h
index 8c6be086f..db68ad86a 100644
--- a/soh/soh/Enhancements/game-interactor/GameInteractor.h
+++ b/soh/soh/Enhancements/game-interactor/GameInteractor.h
@@ -4,8 +4,8 @@
#define GameInteractor_h
#include "libultraship/libultraship.h"
-#include "GameInteractionEffect.h"
#include "vanilla-behavior/GIVanillaBehavior.h"
+#include "GameInteractionEffect.h"
#include "soh/Enhancements/item-tables/ItemTableTypes.h"
#include
@@ -92,19 +92,20 @@ void GameInteractor_SetTriforceHuntCreditsWarpActive(uint8_t state);
}
#endif
-
#ifdef __cplusplus
#include
#include
+#include