diff --git a/soh/soh/Enhancements/randomizer/3drando/setting_descriptions.cpp b/soh/soh/Enhancements/randomizer/3drando/setting_descriptions.cpp index 0e11fecbda..328b862bd3 100644 --- a/soh/soh/Enhancements/randomizer/3drando/setting_descriptions.cpp +++ b/soh/soh/Enhancements/randomizer/3drando/setting_descriptions.cpp @@ -593,6 +593,13 @@ string_view kingZoraSpeedRandom = "King Zora will move out of the way in 1 string_view completeMaskDesc = "Once the happy mask shop is opened, all masks\n" // "will be available to be borrowed."; // /*------------------------------ // +| ENABLE GLITCH CUTSCENES | // +------------------------------*/ // +string_view glitchCutscenesDesc = "The cutscenes of the Poes in Forest Temple and\n" // + "Darunia in Fire Temple will not be skipped.\n" // + "These cutscenes are only useful for glitched\n" // + "gameplay and can be safely skipped otherwise."; // +/*------------------------------ // | QUICK TEXT | // ------------------------------*/ // string_view quickTextDesc0 = "Quick text will be unchanged, requiring\n" // diff --git a/soh/soh/Enhancements/randomizer/3drando/setting_descriptions.hpp b/soh/soh/Enhancements/randomizer/3drando/setting_descriptions.hpp index 917316ba1a..cea8f419d6 100644 --- a/soh/soh/Enhancements/randomizer/3drando/setting_descriptions.hpp +++ b/soh/soh/Enhancements/randomizer/3drando/setting_descriptions.hpp @@ -198,6 +198,8 @@ extern string_view kingZoraSpeedRandom; extern string_view completeMaskDesc; +extern string_view glitchCutscenesDesc; + extern string_view quickTextDesc0; extern string_view quickTextDesc1; extern string_view quickTextDesc2; diff --git a/soh/soh/Enhancements/randomizer/3drando/settings.cpp b/soh/soh/Enhancements/randomizer/3drando/settings.cpp index 4a136b9cb6..dd227c10ec 100644 --- a/soh/soh/Enhancements/randomizer/3drando/settings.cpp +++ b/soh/soh/Enhancements/randomizer/3drando/settings.cpp @@ -265,6 +265,7 @@ namespace Settings { Option NumRequiredCuccos = Option::U8 ("Cuccos to return", {NumOpts(0, 7)}, {numRequiredCuccosDesc}); Option KingZoraSpeed = Option::U8 ("King Zora Speed", {"Fast", "Vanilla", "Random"}, {kingZoraSpeedFast, kingZoraSpeedVanilla, kingZoraSpeedRandom}); Option CompleteMaskQuest = Option::Bool("Complete Mask Quest", {"Off", "On"}, {completeMaskDesc}); + Option EnableGlitchCutscenes = Option::Bool("Enable Glitch-Useful Cutscenes", {"Off", "On"}, {glitchCutscenesDesc}); Option QuickText = Option::U8 ("Quick Text", {"0: Vanilla", "1: Skippable", "2: Instant", "3: Turbo"}, {quickTextDesc0, quickTextDesc1, quickTextDesc2, quickTextDesc3}, OptionCategory::Setting, QUICKTEXT_INSTANT); Option SkipSongReplays = Option::U8 ("Skip Song Replays", {"Don't Skip", "Skip (No SFX)", "Skip (Keep SFX)"}, {skipSongReplaysDesc}); Option KeepFWWarpPoint = Option::Bool("Keep FW Warp Point", {"Off", "On"}, {keepFWWarpPointDesc}); @@ -281,6 +282,7 @@ namespace Settings { &NumRequiredCuccos, &KingZoraSpeed, &CompleteMaskQuest, + &EnableGlitchCutscenes, &QuickText, &SkipSongReplays, &KeepFWWarpPoint, @@ -1302,6 +1304,7 @@ namespace Settings { ctx.numRequiredCuccos = NumRequiredCuccos.Value(); ctx.kingZoraSpeed = KingZoraSpeed.Value(); ctx.completeMaskQuest = CompleteMaskQuest ? 1 : 0; + ctx.enableGlitchCutscenes = CompleteMaskQuest ? 1 : 0; ctx.quickText = QuickText.Value(); ctx.skipSongReplays = SkipSongReplays.Value(); ctx.keepFWWarpPoint = KeepFWWarpPoint ? 1 : 0; @@ -2572,6 +2575,8 @@ namespace Settings { CompleteMaskQuest.SetSelectedIndex(cvarSettings[RSK_COMPLETE_MASK_QUEST]); + EnableGlitchCutscenes.SetSelectedIndex(cvarSettings[RSK_ENABLE_GLITCH_CUTSCENES]); + NightGSExpectSuns.SetSelectedIndex(cvarSettings[RSK_SKULLS_SUNS_SONG]); // RANDOTODO implement chest shuffle with keysanity diff --git a/soh/soh/Enhancements/randomizer/3drando/settings.hpp b/soh/soh/Enhancements/randomizer/3drando/settings.hpp index 1c1476e9ed..06ec9da1c2 100644 --- a/soh/soh/Enhancements/randomizer/3drando/settings.hpp +++ b/soh/soh/Enhancements/randomizer/3drando/settings.hpp @@ -440,6 +440,7 @@ typedef struct { uint8_t numRequiredCuccos; uint8_t kingZoraSpeed; uint8_t completeMaskQuest; + uint8_t enableGlitchCutscenes; uint8_t quickText; uint8_t skipSongReplays; uint8_t keepFWWarpPoint; @@ -942,6 +943,7 @@ void UpdateSettings(std::unordered_map cvarSettin extern Option NumRequiredCuccos; extern Option KingZoraSpeed; extern Option CompleteMaskQuest; + extern Option EnableGlitchCutscenes; extern Option QuickText; extern Option SkipSongReplays; extern Option KeepFWWarpPoint; diff --git a/soh/soh/Enhancements/randomizer/3drando/spoiler_log.cpp b/soh/soh/Enhancements/randomizer/3drando/spoiler_log.cpp index 91271b74b0..22d1f196d6 100644 --- a/soh/soh/Enhancements/randomizer/3drando/spoiler_log.cpp +++ b/soh/soh/Enhancements/randomizer/3drando/spoiler_log.cpp @@ -348,7 +348,8 @@ static void WriteSettings(const bool printAll = false) { setting->GetName() == "Skip Epona Race" || setting->GetName() == "Skip Tower Escape" || setting->GetName() == "Skip Child Stealth" || - setting->GetName() == "Complete Mask Quest") { + setting->GetName() == "Complete Mask Quest" || + setting->GetName() == "Enable Glitch-Useful Cutscenes") { std::string settingName = menu->name + ":" + setting->GetName(); jsonData["settings"][settingName] = setting->GetSelectedOptionText(); } diff --git a/soh/soh/Enhancements/randomizer/randomizer.cpp b/soh/soh/Enhancements/randomizer/randomizer.cpp index 8ecbfd452a..454a9b9dc3 100644 --- a/soh/soh/Enhancements/randomizer/randomizer.cpp +++ b/soh/soh/Enhancements/randomizer/randomizer.cpp @@ -1463,6 +1463,7 @@ std::unordered_map SpoilerfileSettingNameToEn { "Timesaver Settings:Skip Epona Race", RSK_SKIP_EPONA_RACE }, { "Timesaver Settings:Skip Tower Escape", RSK_SKIP_TOWER_ESCAPE }, { "Timesaver Settings:Complete Mask Quest", RSK_COMPLETE_MASK_QUEST }, + { "Timesaver Settings:Enable Glitch-Useful Cutscenes", RSK_ENABLE_GLITCH_CUTSCENES }, }; s32 Randomizer::GetItemIDFromGetItemID(s32 getItemId) { @@ -1683,6 +1684,7 @@ void Randomizer::ParseRandomizerSettingsFile(const char* spoilerFileName) { case RSK_STARTING_DEKU_SHIELD: case RSK_STARTING_KOKIRI_SWORD: case RSK_COMPLETE_MASK_QUEST: + case RSK_ENABLE_GLITCH_CUTSCENES: if(it.value() == "Off") { gSaveContext.randoSettings[index].value = 0; } else if(it.value() == "On") { @@ -3581,6 +3583,7 @@ void GenerateRandomizerImgui() { cvarSettings[RSK_SKIP_EPONA_RACE] = CVar_GetS32("gRandomizeSkipEponaRace", 0); cvarSettings[RSK_SKIP_TOWER_ESCAPE] = CVar_GetS32("gRandomizeSkipTowerEscape", 0); cvarSettings[RSK_COMPLETE_MASK_QUEST] = CVar_GetS32("gRandomizeCompleteMaskQuest", 0); + cvarSettings[RSK_ENABLE_GLITCH_CUTSCENES] = CVar_GetS32("gRandomizeEnableGlitchCutscenes", 0); cvarSettings[RSK_SKULLS_SUNS_SONG] = CVar_GetS32("gRandomizeGsExpectSunsSong", 0); @@ -4346,6 +4349,14 @@ void DrawRandoEditor(bool& open) { InsertHelpHoverText( "Once the happy mask shop is opened, all masks will be available to be borrowed." ); + PaddedSeparator(); + + // Enable Glitch-Useful Cutscenes + SohImGui::EnhancementCheckbox(Settings::EnableGlitchCutscenes.GetName().c_str(), "gRandomizeEnableGlitchCutscenes"); + InsertHelpHoverText( + "The cutscenes of the Poes in Forest Temple and Darunia in Fire Temple will not be skipped. " + "These cutscenes are only useful for glitched gameplay and can be safely skipped otherwise." + ); // COLUMN 2 - HINT SETTINGS ImGui::TableNextColumn(); diff --git a/soh/soh/Enhancements/randomizer/randomizerTypes.h b/soh/soh/Enhancements/randomizer/randomizerTypes.h index 3f0da52b7a..b09b9dab24 100644 --- a/soh/soh/Enhancements/randomizer/randomizerTypes.h +++ b/soh/soh/Enhancements/randomizer/randomizerTypes.h @@ -1006,6 +1006,7 @@ typedef enum { RSK_SKIP_EPONA_RACE, RSK_SKIP_TOWER_ESCAPE, RSK_COMPLETE_MASK_QUEST, + RSK_ENABLE_GLITCH_CUTSCENES, RSK_SKULLS_SUNS_SONG, RSK_SHUFFLE_ADULT_TRADE } RandomizerSettingKey; diff --git a/soh/src/code/z_sram.c b/soh/src/code/z_sram.c index 65eb588121..5e6677ff28 100644 --- a/soh/src/code/z_sram.c +++ b/soh/src/code/z_sram.c @@ -722,8 +722,9 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx) { gSaveContext.eventChkInf[4] |= 0x20; // master sword pulled gSaveContext.eventChkInf[4] |= 0x8000; // entered master sword chamber gSaveContext.infTable[0] |= 1; - // RANDTODO: Don't skip this scene if Don't Skip Glitch Useful Cutscenes is enabled. - gSaveContext.infTable[17] |= 0x400; // Darunia in Fire Temple + if (!Randomizer_GetSettingValue(RSK_ENABLE_GLITCH_CUTSCENES)) { + gSaveContext.infTable[17] |= 0x400; // Darunia in Fire Temple + } gSaveContext.cutsceneIndex = 0; Flags_SetEventChkInf(5); diff --git a/soh/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c b/soh/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c index d66cdae6c1..473d426d06 100644 --- a/soh/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c +++ b/soh/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c @@ -183,7 +183,7 @@ void EnPoSisters_Init(Actor* thisx, GlobalContext* globalCtx) { this->epoch++; // Skip Poe Intro Cutscene - if (gSaveContext.n64ddFlag && thisx->params == 4124) { + if (gSaveContext.n64ddFlag && thisx->params == 4124 && !Randomizer_GetSettingValue(RSK_ENABLE_GLITCH_CUTSCENES)) { Flags_SetSwitch(globalCtx, 0x1B); Actor_Kill(thisx); }