2024-05-19 22:07:54 -05:00
|
|
|
#include <libultraship/bridge.h>
|
2024-10-05 10:33:10 -05:00
|
|
|
#include "2s2h/GameInteractor/GameInteractor.h"
|
2024-05-19 22:07:54 -05:00
|
|
|
|
|
|
|
|
extern "C" {
|
2024-05-22 09:52:56 -04:00
|
|
|
#include "z64.h"
|
|
|
|
|
void Flags_SetWeekEventReg(s32 flag);
|
|
|
|
|
extern SaveContext gSaveContext;
|
2024-05-30 23:21:18 -05:00
|
|
|
extern PlayState* gPlayState;
|
2024-05-19 22:07:54 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void RegisterSkipClockTowerOpen() {
|
2024-05-30 23:21:18 -05:00
|
|
|
// This will handle skipping if you are around the Clock Town area, but not directly in south clock town
|
2024-10-05 10:02:53 -05:00
|
|
|
REGISTER_VB_SHOULD(VB_CLOCK_TOWER_OPENING_CONSIDER_THIS_FIRST_CYCLE, {
|
2024-05-30 23:21:18 -05:00
|
|
|
if (CVarGetInteger("gEnhancements.Cutscenes.SkipStoryCutscenes", 0)) {
|
|
|
|
|
*should = false;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// This will handle skipping if you are directly in South Clock Town
|
2024-10-05 10:02:53 -05:00
|
|
|
REGISTER_VB_SHOULD(VB_PLAY_TRANSITION_CS, {
|
2024-05-30 23:21:18 -05:00
|
|
|
if ((gSaveContext.save.entrance == ENTRANCE(SOUTH_CLOCK_TOWN, 0) ||
|
|
|
|
|
gSaveContext.save.entrance == ENTRANCE(TERMINA_FIELD, 0)) &&
|
|
|
|
|
gSaveContext.save.cutsceneIndex == 0xFFF1 &&
|
2024-05-22 09:52:56 -04:00
|
|
|
CVarGetInteger("gEnhancements.Cutscenes.SkipStoryCutscenes", 0)) {
|
2024-05-30 23:21:18 -05:00
|
|
|
// Copied from ObjTokeidai_TowerOpening_EndCutscene
|
2024-05-19 22:07:54 -05:00
|
|
|
SET_WEEKEVENTREG(WEEKEVENTREG_CLOCK_TOWER_OPENED);
|
2024-05-30 23:21:18 -05:00
|
|
|
gSaveContext.save.cutsceneIndex = 0;
|
|
|
|
|
gSaveContext.respawnFlag = 2;
|
|
|
|
|
gSaveContext.save.entrance = gSaveContext.respawn[RESPAWN_MODE_RETURN].entrance;
|
|
|
|
|
if (gSaveContext.respawn[RESPAWN_MODE_RETURN].playerParams ==
|
|
|
|
|
PLAYER_PARAMS(0xFF, PLAYER_INITMODE_TELESCOPE)) {
|
|
|
|
|
gSaveContext.nextTransitionType = TRANS_TYPE_CIRCLE;
|
|
|
|
|
} else {
|
|
|
|
|
gSaveContext.nextTransitionType = TRANS_TYPE_FADE_BLACK;
|
|
|
|
|
}
|
2024-05-19 22:07:54 -05:00
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|