Files

23 lines
902 B
C++
Raw Permalink Normal View History

2024-05-19 22:07:54 -05:00
#include <libultraship/bridge.h>
#include "Enhancements/GameInteractor/GameInteractor.h"
extern "C" {
2024-05-22 09:52:56 -04:00
#include "z64.h"
void Flags_SetWeekEventReg(s32 flag);
extern SaveContext gSaveContext;
2024-05-19 22:07:54 -05:00
}
void RegisterSkipClockTowerOpen() {
REGISTER_VB_SHOULD(GI_VB_PLAY_TRANSITION_CS, {
// Cutscene where clock tower opens. Will only show if the player is in Clock Town
2024-05-23 10:35:45 -05:00
if (gSaveContext.save.entrance == ENTRANCE(SOUTH_CLOCK_TOWN, 0) && gSaveContext.save.cutsceneIndex == 0xFFF1 &&
2024-05-22 09:52:56 -04:00
CVarGetInteger("gEnhancements.Cutscenes.SkipStoryCutscenes", 0)) {
// Setting the respawn flag to 2 will respawn the player where they were before the cutscene, consistent
// with the normal behavior
2024-05-19 22:07:54 -05:00
gSaveContext.respawnFlag = 2;
gSaveContext.save.cutsceneIndex = 0;
SET_WEEKEVENTREG(WEEKEVENTREG_CLOCK_TOWER_OPENED);
}
});
}