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"
|
|
|
|
|
extern PlayState* gPlayState;
|
|
|
|
|
extern SaveContext gSaveContext;
|
2024-05-19 22:07:54 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void RegisterSkipIntroSequence() {
|
|
|
|
|
REGISTER_VB_SHOULD(GI_VB_PLAY_TRANSITION_CS, {
|
|
|
|
|
// Intro cutscene
|
2024-05-22 09:52:56 -04:00
|
|
|
if (!(gSaveContext.save.entrance == ENTRANCE(CUTSCENE, 0) && gSaveContext.save.cutsceneIndex == 0))
|
|
|
|
|
return;
|
2024-05-19 22:07:54 -05:00
|
|
|
|
|
|
|
|
if (CVarGetInteger("gEnhancements.Cutscenes.SkipIntroSequence", 0)) {
|
|
|
|
|
gSaveContext.save.entrance = ENTRANCE(SOUTH_CLOCK_TOWN, 0);
|
|
|
|
|
gSaveContext.save.hasTatl = true;
|
|
|
|
|
gSaveContext.cycleSceneFlags[SCENE_INSIDETOWER].switch0 |= (1 << 0);
|
|
|
|
|
gSaveContext.cycleSceneFlags[SCENE_OPENINGDAN].switch0 |= (1 << 2);
|
|
|
|
|
gSaveContext.cycleSceneFlags[SCENE_OPENINGDAN].switch0 |= (1 << 0);
|
|
|
|
|
gSaveContext.save.playerForm = PLAYER_FORM_DEKU;
|
|
|
|
|
|
|
|
|
|
// Mark chest as opened and give the player the Deku Nuts
|
2024-05-22 09:52:56 -04:00
|
|
|
gSaveContext.cycleSceneFlags[SCENE_OPENINGDAN].chest |= (1 << 0);
|
2024-05-19 22:07:54 -05:00
|
|
|
Item_Give(gPlayState, ITEM_DEKU_NUTS_10);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|