Randomizer: Skip Cutscenes (#846)

* Skip Jabu Jabu's fishy feeding time if rando is enabled Issue #757

Also skip the ganon tower fall cutscene if you died to ganon during the ganon fight for issue #773

* Immediately give control back to player when talon running cutscene starts.

* Fix case of not skipping Gannon
This commit is contained in:
Dog 2022-08-08 16:48:53 -07:00 committed by GitHub
parent cf639b1d51
commit 1f5d323d89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 7 deletions

View File

@ -492,9 +492,10 @@ void Cutscene_Command_Terminator(GlobalContext* globalCtx, CutsceneContext* csCt
s32 temp = 0; s32 temp = 0;
// Automatically skip certain cutscenes when in rando // Automatically skip certain cutscenes when in rando
// cmd->base == 33: Zelda escaping with impa cutscene
// cmd->base == 8: Traveling back/forward in time cutscene // cmd->base == 8: Traveling back/forward in time cutscene
bool randoCsSkip = (gSaveContext.n64ddFlag && (cmd->base == 33 || cmd->base == 8)); // cmd->base == 24: Dropping a fish for Jabu Jabu
// cmd->base == 33: Zelda escaping with impa cutscene
bool randoCsSkip = (gSaveContext.n64ddFlag && (cmd->base == 8 || cmd->base == 24 || cmd->base == 33));
bool debugCsSkip = (CHECK_BTN_ALL(globalCtx->state.input[0].press.button, BTN_START) && bool debugCsSkip = (CHECK_BTN_ALL(globalCtx->state.input[0].press.button, BTN_START) &&
(gSaveContext.fileNum != 0xFEDC) && CVar_GetS32("gDebugEnabled", 0)); (gSaveContext.fileNum != 0xFEDC) && CVar_GetS32("gDebugEnabled", 0));
@ -2090,6 +2091,8 @@ void Cutscene_HandleConditionalTriggers(GlobalContext* globalCtx) {
osSyncPrintf("\ngame_info.mode=[%d] restart_flag", ((void)0, gSaveContext.respawnFlag)); osSyncPrintf("\ngame_info.mode=[%d] restart_flag", ((void)0, gSaveContext.respawnFlag));
if ((gSaveContext.gameMode == 0) && (gSaveContext.respawnFlag <= 0) && (gSaveContext.cutsceneIndex < 0xFFF0)) { if ((gSaveContext.gameMode == 0) && (gSaveContext.respawnFlag <= 0) && (gSaveContext.cutsceneIndex < 0xFFF0)) {
const bool bShouldTowerRandoSkip =
(gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SKIP_TOWER_ESCAPE));
if ((gSaveContext.entranceIndex == 0x01E1) && !Flags_GetEventChkInf(0xAC)) { if ((gSaveContext.entranceIndex == 0x01E1) && !Flags_GetEventChkInf(0xAC)) {
if (!gSaveContext.n64ddFlag) { if (!gSaveContext.n64ddFlag) {
Flags_SetEventChkInf(0xAC); Flags_SetEventChkInf(0xAC);
@ -2118,14 +2121,15 @@ void Cutscene_HandleConditionalTriggers(GlobalContext* globalCtx) {
gSaveContext.entranceIndex = 0x0053; gSaveContext.entranceIndex = 0x0053;
gSaveContext.cutsceneIndex = 0xFFF8; gSaveContext.cutsceneIndex = 0xFFF8;
} }
} else if (!Flags_GetEventChkInf(0xC7) && } else if ((!Flags_GetEventChkInf(0xC7) &&
(gEntranceTable[((void)0, gSaveContext.entranceIndex)].scene == SCENE_GANON_DEMO)) { gEntranceTable[((void)0, gSaveContext.entranceIndex)].scene == SCENE_GANON_DEMO) ||
(bShouldTowerRandoSkip &&
gEntranceTable[((void)0, gSaveContext.entranceIndex)].scene == SCENE_GANON_FINAL)) {
Flags_SetEventChkInf(0xC7); Flags_SetEventChkInf(0xC7);
gSaveContext.entranceIndex = 0x0517; gSaveContext.entranceIndex = 0x0517;
// If we are rando and tower escape skip is on, then set the flag to say we saw the towers fall // If we are rando and tower escape skip is on, then set the flag to say we saw the towers fall
// and exit. // and exit.
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SKIP_TOWER_ESCAPE)) { if (bShouldTowerRandoSkip) {
return; return;
} }
gSaveContext.cutsceneIndex = 0xFFF0; gSaveContext.cutsceneIndex = 0xFFF0;

View File

@ -460,10 +460,13 @@ void func_80B14AF4(EnTa* this, GlobalContext* globalCtx) {
void func_80B14B6C(EnTa* this, GlobalContext* globalCtx) { void func_80B14B6C(EnTa* this, GlobalContext* globalCtx) {
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT) { if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT) {
OnePointCutscene_Init(globalCtx, 4175, -99, &this->actor, MAIN_CAM); s16 csCamIdx = OnePointCutscene_Init(globalCtx, 4175, -99, &this->actor, MAIN_CAM);
func_80B13AA0(this, func_80B14AF4, func_80B167C0); func_80B13AA0(this, func_80B14AF4, func_80B167C0);
this->unk_2CC = 5; this->unk_2CC = 5;
gSaveContext.eventChkInf[1] |= 0x10; gSaveContext.eventChkInf[1] |= 0x10;
if (gSaveContext.n64ddFlag) {
OnePointCutscene_EndCutscene(globalCtx, csCamIdx);
}
Animation_PlayOnce(&this->skelAnime, &gTalonRunTransitionAnim); Animation_PlayOnce(&this->skelAnime, &gTalonRunTransitionAnim);
this->currentAnimation = &gTalonRunAnim; this->currentAnimation = &gTalonRunAnim;
} }