Files
briaguyaandGarrett Cox 6da0031295 run clang format (#448)
* add linux clang format script

* first shot at powershell

* whoops

* webrequest is slow, try webclient

* just get the one file

* simplify and maybe make it work?

* whoops again

* try a different suggestion

* why is it always windows

* again

* try again

* bit of path stuff

* chmod +x

* add action to check

* fix workflow name

* run clang format
2024-05-22 09:05:05 -05:00

30 lines
1.1 KiB
C++

#include <libultraship/bridge.h>
#include "Enhancements/GameInteractor/GameInteractor.h"
extern "C" {
#include "z64.h"
extern PlayState* gPlayState;
extern SaveContext gSaveContext;
}
void RegisterSkipIntroSequence() {
REGISTER_VB_SHOULD(GI_VB_PLAY_TRANSITION_CS, {
// Intro cutscene
if (!(gSaveContext.save.entrance == ENTRANCE(CUTSCENE, 0) && gSaveContext.save.cutsceneIndex == 0))
return;
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
gSaveContext.cycleSceneFlags[SCENE_OPENINGDAN].chest |= (1 << 0);
Item_Give(gPlayState, ITEM_DEKU_NUTS_10);
}
});
}