Menu - Enhancements and cheats re-organisation (#5142)

* First pass cheats, extra modes, minigames, difficulty, fixes, graphics

* More progress. One tab left

* Enhancements & cheats done and fix for item tracker font
This commit is contained in:
aMannus
2025-03-19 08:43:14 +01:00
committed by GitHub
parent 233c07d16a
commit c72efd08a9
8 changed files with 1127 additions and 1414 deletions

View File

@@ -488,44 +488,22 @@ void AudioEditor::DrawElement() {
UIWidgets::PushStyleTabs(THEME_COLOR); UIWidgets::PushStyleTabs(THEME_COLOR);
if (ImGui::BeginTabBar("SfxContextTabBar", ImGuiTabBarFlags_NoCloseWithMiddleMouseButton)) { if (ImGui::BeginTabBar("SfxContextTabBar", ImGuiTabBarFlags_NoCloseWithMiddleMouseButton)) {
if (ImGui::BeginTabItem("Background Music")) {
Draw_SfxTab("backgroundMusic", SEQ_BGM_WORLD, "Background Music");
ImGui::EndTabItem();
}
if (ImGui::BeginTabItem("Fanfares")) {
Draw_SfxTab("fanfares", SEQ_FANFARE, "Fanfares");
ImGui::EndTabItem();
}
if (ImGui::BeginTabItem("Events")) {
Draw_SfxTab("event", SEQ_BGM_EVENT, "Events");
ImGui::EndTabItem();
}
if (ImGui::BeginTabItem("Battle Music")) {
Draw_SfxTab("battleMusic", SEQ_BGM_BATTLE, "Battle Music");
ImGui::EndTabItem();
}
if (ImGui::BeginTabItem("Ocarina")) {
Draw_SfxTab("instrument", SEQ_INSTRUMENT, "Instruments");
Draw_SfxTab("ocarina", SEQ_OCARINA, "Ocarina");
ImGui::EndTabItem();
}
if (ImGui::BeginTabItem("Sound Effects")) {
Draw_SfxTab("sfx", SEQ_SFX, "Sound Effects");
ImGui::EndTabItem();
}
if (ImGui::BeginTabItem("Voices")) {
Draw_SfxTab("voice", SEQ_VOICE, "Voices");
ImGui::EndTabItem();
}
static ImVec2 cellPadding(8.0f, 8.0f); static ImVec2 cellPadding(8.0f, 8.0f);
if (ImGui::BeginTabItem("Options")) { if (ImGui::BeginTabItem("Audio Options")) {
ImGui::PushStyleVar(ImGuiStyleVar_CellPadding, cellPadding); ImGui::PushStyleVar(ImGuiStyleVar_CellPadding, cellPadding);
ImGui::BeginTable("Options", 1, ImGuiTableFlags_SizingStretchSame); ImGui::BeginTable("Audio Options", 1, ImGuiTableFlags_SizingStretchSame);
ImGui::TableSetupColumn("", ImGuiTableColumnFlags_WidthStretch); ImGui::TableSetupColumn("", ImGuiTableColumnFlags_WidthStretch);
ImGui::TableNextRow(); ImGui::TableNextRow();
ImGui::TableNextColumn(); ImGui::TableNextColumn();
if (ImGui::BeginChild("SfxOptions", ImVec2(0, -8))) { 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( UIWidgets::CVarCheckbox(
"Disable Enemy Proximity Music", CVAR_AUDIO("EnemyBGMDisable"), "Disable Enemy Proximity Music", CVAR_AUDIO("EnemyBGMDisable"),
UIWidgets::CheckboxOptions() UIWidgets::CheckboxOptions()
@@ -554,8 +532,7 @@ void AudioEditor::DrawElement() {
.DefaultValue(5) .DefaultValue(5)
.Size(ImVec2(300.0f, 0.0f)) .Size(ImVec2(300.0f, 0.0f))
.Color(THEME_COLOR)); .Color(THEME_COLOR));
UIWidgets::CVarSliderFloat("Link's voice pitch multiplier", UIWidgets::CVarSliderFloat("Link's voice pitch multiplier", CVAR_AUDIO("LinkVoiceFreqMultiplier"),
CVAR_AUDIO("LinkVoiceFreqMultiplier"),
UIWidgets::FloatSliderOptions() UIWidgets::FloatSliderOptions()
.IsPercentage() .IsPercentage()
.Min(0.4f) .Min(0.4f)
@@ -590,6 +567,36 @@ void AudioEditor::DrawElement() {
ImGui::EndTabItem(); ImGui::EndTabItem();
} }
if (ImGui::BeginTabItem("Background Music")) {
Draw_SfxTab("backgroundMusic", SEQ_BGM_WORLD, "Background Music");
ImGui::EndTabItem();
}
if (ImGui::BeginTabItem("Fanfares")) {
Draw_SfxTab("fanfares", SEQ_FANFARE, "Fanfares");
ImGui::EndTabItem();
}
if (ImGui::BeginTabItem("Events")) {
Draw_SfxTab("event", SEQ_BGM_EVENT, "Events");
ImGui::EndTabItem();
}
if (ImGui::BeginTabItem("Battle Music")) {
Draw_SfxTab("battleMusic", SEQ_BGM_BATTLE, "Battle Music");
ImGui::EndTabItem();
}
if (ImGui::BeginTabItem("Ocarina")) {
Draw_SfxTab("instrument", SEQ_INSTRUMENT, "Instruments");
Draw_SfxTab("ocarina", SEQ_OCARINA, "Ocarina");
ImGui::EndTabItem();
}
if (ImGui::BeginTabItem("Sound Effects")) {
Draw_SfxTab("sfx", SEQ_SFX, "Sound Effects");
ImGui::EndTabItem();
}
if (ImGui::BeginTabItem("Voices")) {
Draw_SfxTab("voice", SEQ_VOICE, "Voices");
ImGui::EndTabItem();
}
static bool excludeTabOpen = false; static bool excludeTabOpen = false;
if (ImGui::BeginTabItem("Audio Shuffle Pool Management")) { if (ImGui::BeginTabItem("Audio Shuffle Pool Management")) {
ImGui::PushStyleVar(ImGuiStyleVar_CellPadding, cellPadding); ImGui::PushStyleVar(ImGuiStyleVar_CellPadding, cellPadding);

View File

@@ -242,7 +242,7 @@ const std::vector<PresetEntry> enhancedPresetEntries = {
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("SeparateArrows"), 1), PRESET_ENTRY_S32(CVAR_ENHANCEMENT("SeparateArrows"), 1),
// Disable Navi Call Audio // Disable Navi Call Audio
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("DisableNaviCallAudio"), 1), PRESET_ENTRY_S32(CVAR_AUDIO("DisableNaviCallAudio"), 1),
// Equipment Toggle // Equipment Toggle
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("EquipmentCanBeRemoved"), 1), PRESET_ENTRY_S32(CVAR_ENHANCEMENT("EquipmentCanBeRemoved"), 1),
@@ -373,7 +373,7 @@ const std::vector<PresetEntry> randomizerPresetEntries = {
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("SeparateArrows"), 1), PRESET_ENTRY_S32(CVAR_ENHANCEMENT("SeparateArrows"), 1),
// Disable Navi Call Audio // Disable Navi Call Audio
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("DisableNaviCallAudio"), 1), PRESET_ENTRY_S32(CVAR_AUDIO("DisableNaviCallAudio"), 1),
// Equipment Toggle // Equipment Toggle
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("EquipmentCanBeRemoved"), 1), PRESET_ENTRY_S32(CVAR_ENHANCEMENT("EquipmentCanBeRemoved"), 1),
@@ -436,7 +436,7 @@ const std::vector<PresetEntry> spockRacePresetEntries = {
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FasterBlockPush"), 5), PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FasterBlockPush"), 5),
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FasterHeavyBlockLift"), 1), PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FasterHeavyBlockLift"), 1),
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("NoForcedNavi"), 1), PRESET_ENTRY_S32(CVAR_ENHANCEMENT("NoForcedNavi"), 1),
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("DisableNaviCallAudio"), 1), PRESET_ENTRY_S32(CVAR_AUDIO("DisableNaviCallAudio"), 1),
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FastChests"), 1), PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FastChests"), 1),
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FastDrops"), 1), PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FastDrops"), 1),
PRESET_ENTRY_S32(CVAR_SETTING("DpadInText"), 1), PRESET_ENTRY_S32(CVAR_SETTING("DpadInText"), 1),
@@ -531,7 +531,7 @@ const std::vector<PresetEntry> spockRaceNoLogicPresetEntries = {
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("CustomizeFishing"), 1), PRESET_ENTRY_S32(CVAR_ENHANCEMENT("CustomizeFishing"), 1),
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("DampeAllNight"), 1), PRESET_ENTRY_S32(CVAR_ENHANCEMENT("DampeAllNight"), 1),
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("DayGravePull"), 1), PRESET_ENTRY_S32(CVAR_ENHANCEMENT("DayGravePull"), 1),
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("DisableNaviCallAudio"), 1), PRESET_ENTRY_S32(CVAR_AUDIO("DisableNaviCallAudio"), 1),
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("DpadNoDropOcarinaInput"), 1), PRESET_ENTRY_S32(CVAR_ENHANCEMENT("DpadNoDropOcarinaInput"), 1),
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("EquipmentCanBeRemoved"), 1), PRESET_ENTRY_S32(CVAR_ENHANCEMENT("EquipmentCanBeRemoved"), 1),
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FastBoomerang"), 1), PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FastBoomerang"), 1),

View File

@@ -469,7 +469,6 @@ void DrawItemCount(ItemTrackerItem item, bool hideMax) {
if (!GameInteractor::IsSaveLoaded()) { if (!GameInteractor::IsSaveLoaded()) {
return; return;
} }
ImGui::PushFont(OTRGlobals::Instance->fontMono);
int iconSize = CVarGetInteger(CVAR_TRACKER_ITEM("IconSize"), 36); int iconSize = CVarGetInteger(CVAR_TRACKER_ITEM("IconSize"), 36);
int textSize = CVarGetInteger(CVAR_TRACKER_ITEM("TextSize"), 13); int textSize = CVarGetInteger(CVAR_TRACKER_ITEM("TextSize"), 13);
ItemTrackerNumbers currentAndMax = GetItemCurrentAndMax(item); ItemTrackerNumbers currentAndMax = GetItemCurrentAndMax(item);
@@ -612,7 +611,6 @@ void DrawItemCount(ItemTrackerItem item, bool hideMax) {
ImGui::SetCursorScreenPos(ImVec2(p.x, p.y - 14)); ImGui::SetCursorScreenPos(ImVec2(p.x, p.y - 14));
ImGui::Text(""); ImGui::Text("");
} }
ImGui::PopFont();
} }
void DrawEquip(ItemTrackerItem item) { void DrawEquip(ItemTrackerItem item) {
@@ -1218,9 +1216,11 @@ void ItemTrackerWindow::Draw() {
if (!IsVisible()) { if (!IsVisible()) {
return; return;
} }
ImGui::PushFont(OTRGlobals::Instance->fontMono);
DrawElement(); DrawElement();
// Sync up the IsVisible flag if it was changed by ImGui // Sync up the IsVisible flag if it was changed by ImGui
SyncVisibilityConsoleVariable(); SyncVisibilityConsoleVariable();
ImGui::PopFont();
} }
void ItemTrackerWindow::DrawElement() { void ItemTrackerWindow::DrawElement() {

File diff suppressed because it is too large Load Diff

View File

@@ -102,6 +102,20 @@ void SohMenu::AddMenuSettings() {
SDL_OpenURL(std::string("file:///" + std::filesystem::absolute(filesPath).string()).c_str()); SDL_OpenURL(std::string("file:///" + std::filesystem::absolute(filesPath).string()).c_str());
}) })
.Options(ButtonOptions().Tooltip("Opens the folder that contains the save and mods folders, etc.")); .Options(ButtonOptions().Tooltip("Opens the folder that contains the save and mods folders, etc."));
AddWidget(path, "Boot", WIDGET_SEPARATOR_TEXT);
AddWidget(path, "Boot Sequence", WIDGET_CVAR_COMBOBOX)
.CVar(CVAR_ENHANCEMENT("BootSequence"))
.Options(ComboboxOptions()
.DefaultIndex(BOOTSEQUENCE_DEFAULT)
.LabelPosition(LabelPosition::Far)
.ComponentAlignment(ComponentAlignment::Right)
.ComboMap(bootSequenceLabels)
.Tooltip("Configure what happens when starting or resetting the game.\n\n"
"Default: LUS logo -> N64 logo\n"
"Authentic: N64 logo only\n"
"File Select: Skip to file select menu"));
AddWidget(path, "Languages", WIDGET_SEPARATOR_TEXT); AddWidget(path, "Languages", WIDGET_SEPARATOR_TEXT);
AddWidget(path, "Translate Title Screen", WIDGET_CVAR_CHECKBOX) AddWidget(path, "Translate Title Screen", WIDGET_CVAR_CHECKBOX)
.CVar(CVAR_SETTING("TitleScreenTranslation")); .CVar(CVAR_SETTING("TitleScreenTranslation"));

View File

@@ -186,7 +186,7 @@ namespace SOH {
{ MigrationAction::Rename, "gDisableGrottoRotation", "gEnhancements.DisableGrottoRotation" }, { MigrationAction::Rename, "gDisableGrottoRotation", "gEnhancements.DisableGrottoRotation" },
{ MigrationAction::Rename, "gDisableKokiriDrawDistance", "gEnhancements.DisableKokiriDrawDistance" }, { MigrationAction::Rename, "gDisableKokiriDrawDistance", "gEnhancements.DisableKokiriDrawDistance" },
{ MigrationAction::Rename, "gDisableLOD", "gEnhancements.DisableLOD" }, { MigrationAction::Rename, "gDisableLOD", "gEnhancements.DisableLOD" },
{ MigrationAction::Rename, "gDisableNaviCallAudio", "gEnhancements.DisableNaviCallAudio" }, { MigrationAction::Rename, "gDisableNaviCallAudio", "gAudioEditor.DisableNaviCallAudio" },
{ MigrationAction::Rename, "gDisableTunicWarningText", "gEnhancements.DisableTunicWarningText" }, { MigrationAction::Rename, "gDisableTunicWarningText", "gEnhancements.DisableTunicWarningText" },
{ MigrationAction::Rename, "gDogFollowsEverywhere", "gEnhancements.DogFollowsEverywhere" }, { MigrationAction::Rename, "gDogFollowsEverywhere", "gEnhancements.DogFollowsEverywhere" },
{ MigrationAction::Rename, "gDpadNoDropOcarinaInput", "gEnhancements.DpadNoDropOcarinaInput" }, { MigrationAction::Rename, "gDpadNoDropOcarinaInput", "gEnhancements.DpadNoDropOcarinaInput" },
@@ -236,7 +236,7 @@ namespace SOH {
{ MigrationAction::Rename, "gInstantShootingGalleryWin", "gEnhancements.InstantShootingGalleryWin" }, { MigrationAction::Rename, "gInstantShootingGalleryWin", "gEnhancements.InstantShootingGalleryWin" },
{ MigrationAction::Rename, "gIvanCoopModeEnabled", "gEnhancements.IvanCoopModeEnabled" }, { MigrationAction::Rename, "gIvanCoopModeEnabled", "gEnhancements.IvanCoopModeEnabled" },
{ MigrationAction::Rename, "gLinkDefaultName", "gEnhancements.LinkDefaultName" }, { MigrationAction::Rename, "gLinkDefaultName", "gEnhancements.LinkDefaultName" },
{ MigrationAction::Rename, "gLowHpAlarm", "gEnhancements.LowHpAlarm" }, { MigrationAction::Rename, "gLowHpAlarm", "gAudioEditor.LowHpAlarm" },
{ MigrationAction::Rename, "gMMBunnyHood", "gEnhancements.MMBunnyHood" }, { MigrationAction::Rename, "gMMBunnyHood", "gEnhancements.MMBunnyHood" },
{ MigrationAction::Rename, "gMarketSneak", "gEnhancements.MarketSneak" }, { MigrationAction::Rename, "gMarketSneak", "gEnhancements.MarketSneak" },
{ MigrationAction::Rename, "gMaskSelect", "gEnhancements.MaskSelect" }, { MigrationAction::Rename, "gMaskSelect", "gEnhancements.MaskSelect" },

View File

@@ -651,7 +651,7 @@ void HealthMeter_HandleCriticalAlarm(PlayState* play) {
if (interfaceCtx->unk_22A <= 0) { if (interfaceCtx->unk_22A <= 0) {
interfaceCtx->unk_22A = 0; interfaceCtx->unk_22A = 0;
interfaceCtx->unk_22C = 0; interfaceCtx->unk_22C = 0;
if (CVarGetInteger(CVAR_ENHANCEMENT("LowHpAlarm"), 0) == 0 && !Player_InCsMode(play) && (play->pauseCtx.state == 0) && if (CVarGetInteger(CVAR_AUDIO("LowHpAlarm"), 0) == 0 && !Player_InCsMode(play) && (play->pauseCtx.state == 0) &&
(play->pauseCtx.debugState == 0) && HealthMeter_IsCritical() && !Play_InCsMode(play)) { (play->pauseCtx.debugState == 0) && HealthMeter_IsCritical() && !Play_InCsMode(play)) {
Sfx_PlaySfxCentered(NA_SE_SY_HITPOINT_ALARM); Sfx_PlaySfxCentered(NA_SE_SY_HITPOINT_ALARM);
} }

View File

@@ -2832,7 +2832,7 @@ void Interface_SetNaviCall(PlayState* play, u16 naviCallState) {
if (((naviCallState == 0x1D) || (naviCallState == 0x1E)) && !interfaceCtx->naviCalling && if (((naviCallState == 0x1D) || (naviCallState == 0x1E)) && !interfaceCtx->naviCalling &&
(play->csCtx.state == CS_STATE_IDLE)) { (play->csCtx.state == CS_STATE_IDLE)) {
if (!CVarGetInteger(CVAR_ENHANCEMENT("DisableNaviCallAudio"), 0)) { if (!CVarGetInteger(CVAR_AUDIO("DisableNaviCallAudio"), 0)) {
// clang-format off // clang-format off
if (naviCallState == 0x1E) { Audio_PlaySoundGeneral(NA_SE_VO_NAVY_CALL, &gSfxDefaultPos, 4, if (naviCallState == 0x1E) { Audio_PlaySoundGeneral(NA_SE_VO_NAVY_CALL, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); }