Skip to content

Commit

Permalink
Merge branches 'arrow_switch', 'save_and_quit', 'poe_bottle_swing', '…
Browse files Browse the repository at this point in the history
…visual_keys' and 'enhanced_iron_boots' into enhancement_mods
  • Loading branch information
lilDavid committed Nov 25, 2023
5 parents 3aed481 + 3761f82 + e341e6b + 2751c56 + eebe4f5 commit d49ba73
Show file tree
Hide file tree
Showing 8 changed files with 200 additions and 60 deletions.
5 changes: 5 additions & 0 deletions soh/soh/Enhancements/presets.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ const std::vector<const char*> enhancementsCvars = {
"gFasterHeavyBlockLift",
"gNoForcedNavi",
"gSkulltulaFreeze",
"gMMPoeBottling",
"gMMBunnyHood",
"gAdultBunnyHood",
"gFastChests",
Expand Down Expand Up @@ -170,6 +171,7 @@ const std::vector<const char*> enhancementsCvars = {
"gRestoreRBAValues",
"gSkipSaveConfirmation",
"gAutosave",
"gSaveAndQuit",
"gDisableCritWiggle",
"gChestSizeDependsStoneOfAgony",
"gSkipArrowAnimation",
Expand Down Expand Up @@ -212,6 +214,9 @@ const std::vector<const char*> enhancementsCvars = {
"gFPSGauntlets",
"gSceneSpecificDirtPathFix",
"gZFightingMode",
"gVisualKeys",
"gSmallKeySpacing",
"gRightAlignKeys",
"gAuthenticLogo",
"gPauseLiveLinkRotationSpeed",
"gBowReticle",
Expand Down
40 changes: 27 additions & 13 deletions soh/soh/SohMenuBar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ void DrawSettingsMenu() {
UIWidgets::Tooltip("Changes the scaling of the ImGui menu elements.");

UIWidgets::PaddedSeparator(true, true, 3.0f, 3.0f);

static std::unordered_map<LUS::WindowBackend, const char*> windowBackendNames = {
{ LUS::WindowBackend::DX11, "DirectX" },
{ LUS::WindowBackend::SDL_OPENGL, "OpenGL"},
Expand Down Expand Up @@ -468,17 +468,17 @@ void DrawSettingsMenu() {
}
ImGui::EndMenu();
}

UIWidgets::Spacer(0);

if (ImGui::BeginMenu("Accessibility")) {
#if defined(_WIN32) || defined(__APPLE__)
UIWidgets::PaddedEnhancementCheckbox("Text to Speech", "gA11yTTS");
UIWidgets::Tooltip("Enables text to speech for in game dialog");
#endif
UIWidgets::PaddedEnhancementCheckbox("Disable Idle Camera Re-Centering", "gA11yDisableIdleCam");
UIWidgets::Tooltip("Disables the automatic re-centering of the camera when idle.");

ImGui::EndMenu();
}
ImGui::EndMenu();
Expand Down Expand Up @@ -602,6 +602,8 @@ void DrawEnhancementsMenu() {
UIWidgets::Tooltip("Allows the bunny hood to be equipped normally from the pause menu as adult.");
UIWidgets::PaddedEnhancementCheckbox("Mask Select in Inventory", "gMaskSelect", true, false);
UIWidgets::Tooltip("After completing the mask trading sub-quest, press A and any direction on the mask slot to change masks");
UIWidgets::PaddedEnhancementCheckbox("Catch Poes with a bottle", "gMMPoeBottling", true, false);
UIWidgets::Tooltip("Catch Poes by swinging an empty bottle at them instead of from a text box like you can in Majora's Mask.");
UIWidgets::PaddedEnhancementCheckbox("Nuts explode bombs", "gNutsExplodeBombs", true, false);
UIWidgets::Tooltip("Makes nuts explode bombs, similar to how they interact with bombchus. This does not affect bombflowers.");
UIWidgets::PaddedEnhancementCheckbox("Equip Multiple Arrows at Once", "gSeparateArrows", true, false);
Expand Down Expand Up @@ -861,6 +863,8 @@ void DrawEnhancementsMenu() {
UIWidgets::Tooltip("Allows equipping the tunic and boots to c-buttons");
UIWidgets::PaddedEnhancementCheckbox("Equipment Toggle", "gEquipmentCanBeRemoved", true, false);
UIWidgets::Tooltip("Allows equipment to be removed by toggling it off on\nthe equipment subscreen.");
UIWidgets::PaddedEnhancementCheckbox("Extra Underwater Actions", "gEnhancedIronBoots", true, false);
UIWidgets::Tooltip("Allows opening chests and using your sword and Bombchus when underwater with Iron Boots");
UIWidgets::PaddedEnhancementCheckbox("Link's Cow in Both Time Periods", "gCowOfTime", true, false);
UIWidgets::Tooltip("Allows the Lon Lon Ranch obstacle course reward to be shared across time periods");
UIWidgets::PaddedEnhancementCheckbox("Enable visible guard vision", "gGuardVision", true, false);
Expand All @@ -879,7 +883,7 @@ void DrawEnhancementsMenu() {
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_BLUE_FIRE_ARROWS);
static const char* forceEnableBlueFireArrowsText =
"This setting is forcefully enabled because a savefile\nwith \"Blue Fire Arrows\" is loaded.";
UIWidgets::PaddedEnhancementCheckbox("Blue Fire Arrows", "gBlueFireArrows", true, false,
UIWidgets::PaddedEnhancementCheckbox("Blue Fire Arrows", "gBlueFireArrows", true, false,
forceEnableBlueFireArrows, forceEnableBlueFireArrowsText, UIWidgets::CheckboxGraphics::Checkmark);
UIWidgets::Tooltip("Allows Ice Arrows to melt red ice.\nMay require a room reload if toggled during gameplay.");

Expand All @@ -888,7 +892,7 @@ void DrawEnhancementsMenu() {
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SUNLIGHT_ARROWS);
static const char* forceEnableSunLightArrowsText =
"This setting is forcefully enabled because a savefile\nwith \"Sunlight Arrows\" is loaded.";
UIWidgets::PaddedEnhancementCheckbox("Sunlight Arrows", "gSunlightArrows", true, false,
UIWidgets::PaddedEnhancementCheckbox("Sunlight Arrows", "gSunlightArrows", true, false,
forceEnableSunLightArrows, forceEnableSunLightArrowsText, UIWidgets::CheckboxGraphics::Checkmark);
UIWidgets::Tooltip("Allows Light Arrows to activate sun switches.\nMay require a room reload if toggled during gameplay.");

Expand All @@ -900,6 +904,11 @@ void DrawEnhancementsMenu() {
UIWidgets::PaddedEnhancementCheckbox("Targetable Hookshot Reticle", "gHookshotableReticle", true, false);
UIWidgets::Tooltip("Use a different color when aiming at hookshotable collision");

UIWidgets::PaddedEnhancementCheckbox("Ask to continue playing after saving", "gSaveAndQuit", true, false);
UIWidgets::Tooltip(
"The save dialog from the pause menu will ask you to continue playing after you select Yes or No.\n"
"Pressing B or Start on the save prompt will close the pause menu without displaying the extra screen.");

ImGui::EndMenu();
}

Expand Down Expand Up @@ -999,6 +1008,11 @@ void DrawEnhancementsMenu() {
"Consistent: Certain paths vanish the same way in all resolutions\n"
"No Vanish: Paths do not vanish, Link seems to sink in to some paths\n"
"This might affect other decal effects\n");
UIWidgets::PaddedEnhancementCheckbox("Visual Small Key display", "gVisualKeys", true, false);
UIWidgets::Tooltip("Displays Small Key count using multiple icons rather than a numeric counter");
const bool disableKeySpacing = !CVarGetInteger("gVisualKeys", 0);
static const char* disableKeySpacingTooltip = "This option is disabled because \"Visual Small Key display\" is turned off";
UIWidgets::EnhancementSliderInt("Small Key icon spacing: %d", "##SmallKeySpacing", "gSmallKeySpacing", 1, 16, "", 8, true, disableKeySpacing, disableKeySpacingTooltip);
UIWidgets::PaddedEnhancementSliderInt("Text Spacing: %d", "##TEXTSPACING", "gTextSpacing", 4, 6, "", 6, true, true, true);
UIWidgets::Tooltip("Space between text characters (useful for HD font textures)");
UIWidgets::PaddedEnhancementCheckbox("More info in file select", "gFileSelectMoreInfo", true, false);
Expand Down Expand Up @@ -1062,8 +1076,8 @@ void DrawEnhancementsMenu() {
"Fixes an incorrect calculation that acted like water underneath ground was above it.");
UIWidgets::PaddedEnhancementCheckbox("Fix Bush Item Drops", "gBushDropFix", true, false);
UIWidgets::Tooltip("Fixes the bushes to drop items correctly rather than spawning undefined items.");
UIWidgets::PaddedEnhancementCheckbox("Fix falling from vine edges", "gFixVineFall", true, false);
UIWidgets::Tooltip("Prevents immediately falling off climbable surfaces if climbing on the edges.");
UIWidgets::PaddedEnhancementCheckbox("Fix falling from vine edges", "gFixVineFall", true, false);
UIWidgets::Tooltip("Prevents immediately falling off climbable surfaces if climbing on the edges.");
UIWidgets::PaddedEnhancementCheckbox("Fix Link's eyes open while sleeping", "gFixEyesOpenWhileSleeping", true, false);
UIWidgets::Tooltip("Fixes Link's eyes being open in the opening cutscene when he is supposed to be sleeping.");

Expand Down Expand Up @@ -1389,12 +1403,12 @@ void DrawCheatsMenu() {
if (ImGui::Button("Change Age")) {
CVarSetInteger("gSwitchAge", 1);
}
UIWidgets::Tooltip("Switches Link's age and reloads the area.");
UIWidgets::Tooltip("Switches Link's age and reloads the area.");

if (ImGui::Button("Clear Cutscene Pointer")) {
GameInteractor::RawAction::ClearCutscenePointer();
}
UIWidgets::Tooltip("Clears the cutscene pointer to a value safe for wrong warps.");
UIWidgets::Tooltip("Clears the cutscene pointer to a value safe for wrong warps.");

ImGui::EndMenu();
}
Expand Down Expand Up @@ -1568,12 +1582,12 @@ void DrawRandomizerMenu() {
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_BOSS_KEYSANITY) == RO_DUNGEON_ITEM_LOC_ANYWHERE ||
(OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_GANONS_BOSS_KEY) != RO_GANON_BOSS_KEY_VANILLA &&
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_GANONS_BOSS_KEY) != RO_GANON_BOSS_KEY_OWN_DUNGEON &&
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_GANONS_BOSS_KEY) != RO_GANON_BOSS_KEY_STARTWITH) ||
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_GANONS_BOSS_KEY) != RO_GANON_BOSS_KEY_STARTWITH) ||
!IS_RANDO) {
disableKeyColors = false;
}

static const char* disableKeyColorsText =
static const char* disableKeyColorsText =
"This setting is disabled because a savefile is loaded without any key\n"
"shuffle settings set to \"Any Dungeon\", \"Overworld\" or \"Anywhere\"";

Expand Down Expand Up @@ -1629,4 +1643,4 @@ void SohMenuBar::DrawElement() {
ImGui::EndMenuBar();
}
}
} // namespace SohGui
} // namespace SohGui
Loading

0 comments on commit d49ba73

Please sign in to comment.