More time cutscene skip fixes

This commit is contained in:
Garrett Cox 2024-04-21 09:14:46 -05:00
parent 28a2cc925e
commit 14c7f0c3e1
3 changed files with 30 additions and 5 deletions

View File

@ -83,6 +83,9 @@ typedef enum {
// Opt: *EnMd // Opt: *EnMd
// Vanilla condition: CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) // Vanilla condition: CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD)
GI_VB_MIDO_CONSIDER_DEKU_TREE_DEAD, GI_VB_MIDO_CONSIDER_DEKU_TREE_DEAD,
// Opt: *ObjDekujr
// Vanilla condition: CHECK_QUEST_ITEM(QUEST_MEDALLION_FOREST)
GI_VB_DEKU_JR_CONSIDER_FOREST_TEMPLE_FINISHED,
// Opt: *EnKo // Opt: *EnKo
// Vanilla condition: CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) // Vanilla condition: CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD)
GI_VB_OPEN_KOKIRI_FOREST, GI_VB_OPEN_KOKIRI_FOREST,

View File

@ -155,6 +155,7 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void*
if ((gSaveContext.entranceIndex == ENTR_DESERT_COLOSSUS_1) && !Flags_GetEventChkInf(EVENTCHKINF_LEARNED_REQUIEM_OF_SPIRIT)) { if ((gSaveContext.entranceIndex == ENTR_DESERT_COLOSSUS_1) && !Flags_GetEventChkInf(EVENTCHKINF_LEARNED_REQUIEM_OF_SPIRIT)) {
Flags_SetEventChkInf(EVENTCHKINF_LEARNED_REQUIEM_OF_SPIRIT); Flags_SetEventChkInf(EVENTCHKINF_LEARNED_REQUIEM_OF_SPIRIT);
// Normally happens in the cutscene // Normally happens in the cutscene
gSaveContext.dayTime = gSaveContext.skyboxTime = 0xAC60;
if (GameInteractor_Should(GI_VB_GIVE_ITEM_REQUIEM_OF_SPIRIT, true, NULL)) { if (GameInteractor_Should(GI_VB_GIVE_ITEM_REQUIEM_OF_SPIRIT, true, NULL)) {
Item_Give(gPlayState, ITEM_SONG_REQUIEM); Item_Give(gPlayState, ITEM_SONG_REQUIEM);
} }
@ -183,8 +184,6 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void*
uint8_t isBlueWarp = 0; uint8_t isBlueWarp = 0;
// Deku Tree Blue warp // Deku Tree Blue warp
if (gSaveContext.entranceIndex == ENTR_KOKIRI_FOREST_0 && gSaveContext.cutsceneIndex == 0xFFF1) { if (gSaveContext.entranceIndex == ENTR_KOKIRI_FOREST_0 && gSaveContext.cutsceneIndex == 0xFFF1) {
gSaveContext.dayTime = gSaveContext.skyboxTime = 0x8000;
gSaveContext.entranceIndex = ENTR_KOKIRI_FOREST_11; gSaveContext.entranceIndex = ENTR_KOKIRI_FOREST_11;
isBlueWarp = 1; isBlueWarp = 1;
// Dodongo's Cavern Blue warp // Dodongo's Cavern Blue warp
@ -199,9 +198,13 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void*
} else if (gSaveContext.entranceIndex == ENTR_CHAMBER_OF_THE_SAGES_0 && gSaveContext.cutsceneIndex == 0x0 && gSaveContext.chamberCutsceneNum == CHAMBER_CS_FOREST) { } else if (gSaveContext.entranceIndex == ENTR_CHAMBER_OF_THE_SAGES_0 && gSaveContext.cutsceneIndex == 0x0 && gSaveContext.chamberCutsceneNum == CHAMBER_CS_FOREST) {
// Normally set in the blue warp cutscene // Normally set in the blue warp cutscene
Flags_SetEventChkInf(EVENTCHKINF_SPOKE_TO_DEKU_TREE_SPROUT); Flags_SetEventChkInf(EVENTCHKINF_SPOKE_TO_DEKU_TREE_SPROUT);
gSaveContext.dayTime = gSaveContext.skyboxTime = 0x8000;
gSaveContext.entranceIndex = ENTR_SACRED_FOREST_MEADOW_3; if (IS_RANDO) {
gSaveContext.entranceIndex = ENTR_SACRED_FOREST_MEADOW_3;
} else {
gSaveContext.entranceIndex = ENTR_KOKIRI_FOREST_12;
}
isBlueWarp = 1; isBlueWarp = 1;
// Fire Temple Blue warp // Fire Temple Blue warp
} else if (gSaveContext.entranceIndex == ENTR_KAKARIKO_VILLAGE_0 && gSaveContext.cutsceneIndex == 0xFFF3) { } else if (gSaveContext.entranceIndex == ENTR_KAKARIKO_VILLAGE_0 && gSaveContext.cutsceneIndex == 0xFFF3) {
@ -209,6 +212,9 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void*
isBlueWarp = 1; isBlueWarp = 1;
// Water Temple Blue warp // Water Temple Blue warp
} else if (gSaveContext.entranceIndex == ENTR_CHAMBER_OF_THE_SAGES_0 && gSaveContext.cutsceneIndex == 0x0 && gSaveContext.chamberCutsceneNum == CHAMBER_CS_WATER) { } else if (gSaveContext.entranceIndex == ENTR_CHAMBER_OF_THE_SAGES_0 && gSaveContext.cutsceneIndex == 0x0 && gSaveContext.chamberCutsceneNum == CHAMBER_CS_WATER) {
// Normally set in the blue warp cutscene
gSaveContext.dayTime = gSaveContext.skyboxTime = 0x4800;
gSaveContext.entranceIndex = ENTR_LAKE_HYLIA_9; gSaveContext.entranceIndex = ENTR_LAKE_HYLIA_9;
isBlueWarp = 1; isBlueWarp = 1;
// Spirit Temple Blue warp // Spirit Temple Blue warp
@ -222,6 +228,9 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void*
} }
if (isBlueWarp) { if (isBlueWarp) {
// Normally set in the blue warp cutscene
gSaveContext.dayTime = gSaveContext.skyboxTime = 0x8000;
*should = false; *should = false;
gSaveContext.cutsceneIndex = 0; gSaveContext.cutsceneIndex = 0;
@ -232,6 +241,9 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void*
// Flee hyrule castle cutscene // Flee hyrule castle cutscene
if (gSaveContext.entranceIndex == ENTR_HYRULE_FIELD_0 && gSaveContext.cutsceneIndex == 0xFFF1) { if (gSaveContext.entranceIndex == ENTR_HYRULE_FIELD_0 && gSaveContext.cutsceneIndex == 0xFFF1) {
// Normally set in the blue warp cutscene
gSaveContext.dayTime = gSaveContext.skyboxTime = 0x4AAA;
gSaveContext.cutsceneIndex = 0; gSaveContext.cutsceneIndex = 0;
*should = false; *should = false;
} }
@ -420,6 +432,14 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void*
} }
break; break;
} }
case GI_VB_DEKU_JR_CONSIDER_FOREST_TEMPLE_FINISHED: {
// We're overriding this so that the Deku JR doesn't despawn after skipping the forest temple blue warp cutscene.
// It typically relies on the forest medallion being obtained, but that isn't given yet until after scene init
if (CVarGetInteger("gTimeSavers.SkipCutscene.Story", IS_RANDO)) {
*should = Flags_GetEventChkInf(EVENTCHKINF_USED_FOREST_TEMPLE_BLUE_WARP);
}
break;
}
case GI_VB_GIVE_ITEM_FROM_BLUE_WARP: case GI_VB_GIVE_ITEM_FROM_BLUE_WARP:
case GI_VB_PLAY_SHIEK_BLOCK_MASTER_SWORD_CS: case GI_VB_PLAY_SHIEK_BLOCK_MASTER_SWORD_CS:
case GI_VB_GIVE_ITEM_FAIRY_OCARINA: case GI_VB_GIVE_ITEM_FAIRY_OCARINA:
@ -514,6 +534,7 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void*
} else { } else {
gPlayState->nextEntranceIndex = ENTR_HYRULE_FIELD_17; gPlayState->nextEntranceIndex = ENTR_HYRULE_FIELD_17;
} }
gSaveContext.dayTime = gSaveContext.skyboxTime = 0x8000;
gPlayState->transitionType = TRANS_TYPE_FADE_WHITE; gPlayState->transitionType = TRANS_TYPE_FADE_WHITE;
gPlayState->transitionTrigger = TRANS_TRIGGER_START; gPlayState->transitionTrigger = TRANS_TRIGGER_START;
gSaveContext.nextTransitionType = 2; gSaveContext.nextTransitionType = 2;

View File

@ -6,6 +6,7 @@
#include "z_obj_dekujr.h" #include "z_obj_dekujr.h"
#include "objects/object_dekujr/object_dekujr.h" #include "objects/object_dekujr/object_dekujr.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY) #define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY)
@ -56,7 +57,7 @@ void ObjDekujr_Init(Actor* thisx, PlayState* play) {
this->unk_19C = 0; this->unk_19C = 0;
this->unk_19B = 1; this->unk_19B = 1;
} }
if (!CHECK_QUEST_ITEM(QUEST_MEDALLION_FOREST)) { if (!GameInteractor_Should(GI_VB_DEKU_JR_CONSIDER_FOREST_TEMPLE_FINISHED, CHECK_QUEST_ITEM(QUEST_MEDALLION_FOREST), this)) {
Actor_Kill(thisx); Actor_Kill(thisx);
} else { } else {
ActorShape_Init(&thisx->shape, 0.0f, NULL, 0.0f); ActorShape_Init(&thisx->shape, 0.0f, NULL, 0.0f);