diff --git a/soh/soh/Enhancements/timesaver_hook_handlers.cpp b/soh/soh/Enhancements/timesaver_hook_handlers.cpp index b920419bb..700e55e18 100644 --- a/soh/soh/Enhancements/timesaver_hook_handlers.cpp +++ b/soh/soh/Enhancements/timesaver_hook_handlers.cpp @@ -280,6 +280,13 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void* *should = false; } } + + if (gSaveContext.entranceIndex == ENTR_CASTLE_COURTYARD_GUARDS_DAY_0) { + if (CVarGetInteger("gTimeSavers.SkipChildStealth", false)) { + gSaveContext.entranceIndex = ENTR_CASTLE_COURTYARD_ZELDA_0; + *should = false; + } + } break; } case GI_VB_PLAY_ENTRANCE_CS: { diff --git a/soh/soh/SohMenuBar.cpp b/soh/soh/SohMenuBar.cpp index c11b88a62..3821f9df4 100644 --- a/soh/soh/SohMenuBar.cpp +++ b/soh/soh/SohMenuBar.cpp @@ -581,26 +581,22 @@ void DrawEnhancementsMenu() { CVarGetInteger("gTimeSavers.SkipCutscene.Story", IS_RANDO) && CVarGetInteger("gTimeSavers.SkipCutscene.LearnSong", IS_RANDO) && CVarGetInteger("gTimeSavers.SkipCutscene.BossIntro", IS_RANDO) && - CVarGetInteger("gTimeSavers.SkipCutscene.GlitchAiding", 0) && CVarGetInteger("gTimeSavers.SkipCutscene.OnePoint", IS_RANDO) && CVarGetInteger("gTimeSavers.NoForcedDialog", IS_RANDO) && CVarGetInteger("gTimeSavers.SkipOwlInteractions", IS_RANDO) && CVarGetInteger("gTimeSavers.SkipMiscInteractions", IS_RANDO) && - CVarGetInteger("gTimeSavers.DisableTitleCard", IS_RANDO) && - CVarGetInteger("gTimeSavers.SkipTowerEscape", false); + CVarGetInteger("gTimeSavers.DisableTitleCard", IS_RANDO); bool someChecked = CVarGetInteger("gTimeSavers.SkipCutscene.Intro", IS_RANDO) || CVarGetInteger("gTimeSavers.SkipCutscene.Entrances", IS_RANDO) || CVarGetInteger("gTimeSavers.SkipCutscene.Story", IS_RANDO) || CVarGetInteger("gTimeSavers.SkipCutscene.LearnSong", IS_RANDO) || CVarGetInteger("gTimeSavers.SkipCutscene.BossIntro", IS_RANDO) || - CVarGetInteger("gTimeSavers.SkipCutscene.GlitchAiding", 0) || CVarGetInteger("gTimeSavers.SkipCutscene.OnePoint", IS_RANDO) || CVarGetInteger("gTimeSavers.NoForcedDialog", IS_RANDO) || CVarGetInteger("gTimeSavers.SkipOwlInteractions", IS_RANDO) || CVarGetInteger("gTimeSavers.SkipMiscInteractions", IS_RANDO) || - CVarGetInteger("gTimeSavers.DisableTitleCard", IS_RANDO) || - CVarGetInteger("gTimeSavers.SkipTowerEscape", false); + CVarGetInteger("gTimeSavers.DisableTitleCard", IS_RANDO); ImGuiContext* g = ImGui::GetCurrentContext(); ImGuiItemFlags backup_item_flags = g->CurrentItemFlags; @@ -612,26 +608,22 @@ void DrawEnhancementsMenu() { CVarSetInteger("gTimeSavers.SkipCutscene.Story", 1); CVarSetInteger("gTimeSavers.SkipCutscene.LearnSong", 1); CVarSetInteger("gTimeSavers.SkipCutscene.BossIntro", 1); - CVarSetInteger("gTimeSavers.SkipCutscene.GlitchAiding", 1); CVarSetInteger("gTimeSavers.SkipCutscene.OnePoint", 1); CVarSetInteger("gTimeSavers.NoForcedDialog", 1); CVarSetInteger("gTimeSavers.SkipOwlInteractions", 1); CVarSetInteger("gTimeSavers.SkipMiscInteractions", 1); CVarSetInteger("gTimeSavers.DisableTitleCard", 1); - CVarSetInteger("gTimeSavers.SkipTowerEscape", 1); } else { CVarSetInteger("gTimeSavers.SkipCutscene.Intro", 0); CVarSetInteger("gTimeSavers.SkipCutscene.Entrances", 0); CVarSetInteger("gTimeSavers.SkipCutscene.Story", 0); CVarSetInteger("gTimeSavers.SkipCutscene.LearnSong", 0); CVarSetInteger("gTimeSavers.SkipCutscene.BossIntro", 0); - CVarSetInteger("gTimeSavers.SkipCutscene.GlitchAiding", 0); CVarSetInteger("gTimeSavers.SkipCutscene.OnePoint", 0); CVarSetInteger("gTimeSavers.NoForcedDialog", 0); CVarSetInteger("gTimeSavers.SkipOwlInteractions", 0); CVarSetInteger("gTimeSavers.SkipMiscInteractions", 0); CVarSetInteger("gTimeSavers.DisableTitleCard", 0); - CVarSetInteger("gTimeSavers.SkipTowerEscape", 0); } LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); } @@ -641,14 +633,16 @@ void DrawEnhancementsMenu() { UIWidgets::PaddedEnhancementCheckbox("Skip Story Cutscenes", "gTimeSavers.SkipCutscene.Story", false, false, false, "", UIWidgets::CheckboxGraphics::Cross, IS_RANDO); UIWidgets::PaddedEnhancementCheckbox("Skip Song Cutscenes", "gTimeSavers.SkipCutscene.LearnSong", false, false, false, "", UIWidgets::CheckboxGraphics::Cross, IS_RANDO); UIWidgets::PaddedEnhancementCheckbox("Skip Boss Introductions", "gTimeSavers.SkipCutscene.BossIntro", false, false, false, "", UIWidgets::CheckboxGraphics::Cross, IS_RANDO); - UIWidgets::PaddedEnhancementCheckbox("Skip Glitch-Aiding Cutscenes", "gTimeSavers.SkipCutscene.GlitchAiding", false, false, false, "", UIWidgets::CheckboxGraphics::Cross, 0); - UIWidgets::Tooltip("Skip cutscenes that are associated with useful glitches, currently this is only the Fire Temple Darunia CS and Forest Temple Poe Sisters CS"); UIWidgets::PaddedEnhancementCheckbox("Skip One Point Cutscenes (Chests, Door Unlocks, etc)", "gTimeSavers.SkipCutscene.OnePoint", false, false, false, "", UIWidgets::CheckboxGraphics::Cross, IS_RANDO); UIWidgets::PaddedEnhancementCheckbox("No Forced Dialog", "gTimeSavers.NoForcedDialog", false, false, false, "", UIWidgets::CheckboxGraphics::Cross, IS_RANDO); UIWidgets::Tooltip("Prevent forced conversations with Navi or other NPCs"); UIWidgets::PaddedEnhancementCheckbox("Skip Owl Interactions", "gTimeSavers.SkipOwlInteractions", false, false, false, "", UIWidgets::CheckboxGraphics::Cross, IS_RANDO); UIWidgets::PaddedEnhancementCheckbox("Skip Misc Interactions", "gTimeSavers.SkipMiscInteractions", false, false, false, "", UIWidgets::CheckboxGraphics::Cross, IS_RANDO); UIWidgets::PaddedEnhancementCheckbox("Disable Title Card", "gTimeSavers.DisableTitleCard", false, false, false, "", UIWidgets::CheckboxGraphics::Cross, IS_RANDO); + UIWidgets::PaddedEnhancementCheckbox("Skip Glitch-Aiding Cutscenes", "gTimeSavers.SkipCutscene.GlitchAiding", false, false, false, "", UIWidgets::CheckboxGraphics::Cross, 0); + UIWidgets::Tooltip("Skip cutscenes that are associated with useful glitches, currently this is only the Fire Temple Darunia CS and Forest Temple Poe Sisters CS"); + UIWidgets::PaddedEnhancementCheckbox("Skip Child Stealth", "gTimeSavers.SkipChildStealth", false, false, false, "", UIWidgets::CheckboxGraphics::Cross, false); + UIWidgets::Tooltip("The crawlspace into Hyrule Castle goes straight to Zelda, skipping the guards."); UIWidgets::PaddedEnhancementCheckbox("Skip Tower Escape", "gTimeSavers.SkipTowerEscape", false, false, false, "", UIWidgets::CheckboxGraphics::Cross, false); UIWidgets::Tooltip("Skip the tower escape sequence between Ganondorf and Ganon."); diff --git a/soh/src/code/z_play.c b/soh/src/code/z_play.c index 3ce5eeefc..43d30f54b 100644 --- a/soh/src/code/z_play.c +++ b/soh/src/code/z_play.c @@ -363,18 +363,6 @@ void Play_Init(GameState* thisx) { u8 tempSetupIndex; s32 pad[2]; - // Skip Child Stealth when option is enabled, Zelda's Letter isn't obtained and Impa's reward hasn't been received - // eventChkInf[4] & 1 = Got Zelda's Letter - // eventChkInf[5] & 0x200 = Got Impa's reward - // entranceIndex 0x7A, ENTR_CASTLE_COURTYARD_GUARDS_DAY_0, Castle Courtyard - Day from crawlspace - // entranceIndex 0x400, ENTR_CASTLE_COURTYARD_ZELDA_0, Zelda's Courtyard - if (IS_RANDO && Randomizer_GetSettingValue(RSK_SKIP_CHILD_STEALTH) && - !Flags_GetEventChkInf(EVENTCHKINF_OBTAINED_ZELDAS_LETTER) && !Flags_GetEventChkInf(EVENTCHKINF_LEARNED_ZELDAS_LULLABY)) { - if (gSaveContext.entranceIndex == ENTR_CASTLE_COURTYARD_GUARDS_DAY_0) { - gSaveContext.entranceIndex = ENTR_CASTLE_COURTYARD_ZELDA_0; - } - } - // Properly initialize the frame counter so it doesn't use garbage data if (!firstInit) { play->gameplayFrames = 0;