Add Hyrule Castle gate skip

This commit is contained in:
JordanLongstaff 2025-04-05 13:58:17 -04:00
commit ba258d96c5
3 changed files with 28 additions and 22 deletions

View file

@ -1427,16 +1427,16 @@ typedef enum {
// true
// ```
// #### `args`
// - None
VB_PLAY_GORON_FREE_CS,
// - `*EnHeishi2
VB_PLAY_GATE_OPENING_OR_CLOSING_CS,
// #### `result`
// ```c
// true
// ```
// #### `args`
// - `*EnHeishi2
VB_PLAY_KAKARIKO_GATE_CS,
// - None
VB_PLAY_GORON_FREE_CS,
// #### `result`
// ```c

View file

@ -721,7 +721,7 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, va_li
break;
}
case VB_PLAY_KAKARIKO_GATE_CS: {
case VB_PLAY_GATE_OPENING_OR_CLOSING_CS: {
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipMiscInteractions"), IS_RANDO)) {
EnHeishi2* enHeishi2 = va_arg(args, EnHeishi2*);
enHeishi2->unk_2F2[0] = 0;

View file

@ -314,6 +314,7 @@ void func_80A5372C(EnHeishi2* this, PlayState* play) {
f32 frameCount = Animation_GetLastFrame(&gEnHeishiIdleAnim);
Animation_Change(&this->skelAnime, &gEnHeishiIdleAnim, 1.0f, 0.0f, (s16)frameCount, ANIMMODE_LOOP, -10.0f);
if (GameInteractor_Should(VB_PLAY_GATE_OPENING_OR_CLOSING_CS, true, this)) {
this->unk_2F2[0] = 200;
this->cameraId = Play_CreateSubCamera(play);
Play_ChangeCameraStatus(play, MAIN_CAM, CAM_STAT_WAIT);
@ -327,6 +328,7 @@ void func_80A5372C(EnHeishi2* this, PlayState* play) {
this->unk_28C.z = 3014.0f;
Play_CameraSetAtEye(play, this->cameraId, &this->unk_280, &this->unk_28C);
}
this->actionFunc = func_80A53850;
}
@ -334,11 +336,15 @@ void func_80A53850(EnHeishi2* this, PlayState* play) {
BgSpot15Saku* gate;
SkelAnime_Update(&this->skelAnime);
if (GameInteractor_Should(VB_PLAY_GATE_OPENING_OR_CLOSING_CS, true, this)) {
Play_CameraSetAtEye(play, this->cameraId, &this->unk_280, &this->unk_28C);
}
gate = (BgSpot15Saku*)this->gate;
if ((this->unk_2F2[0] == 0) || (gate->unk_168 == 0)) {
if (GameInteractor_Should(VB_PLAY_GATE_OPENING_OR_CLOSING_CS, true, this)) {
Play_ClearCamera(play, this->cameraId);
Play_ChangeCameraStatus(play, MAIN_CAM, CAM_STAT_ACTIVE);
}
Message_CloseTextbox(play);
this->unk_30C = 1;
Player_SetCsActionWithHaltedActors(play, NULL, 7);
@ -479,7 +485,7 @@ void func_80A53DF8(EnHeishi2* this, PlayState* play) {
f32 frameCount = Animation_GetLastFrame(&gEnHeishiIdleAnim);
Animation_Change(&this->skelAnime, &gEnHeishiIdleAnim, 1.0f, 0.0f, (s16)frameCount, ANIMMODE_LOOP, -10.0f);
if (GameInteractor_Should(VB_PLAY_KAKARIKO_GATE_CS, true, this)) {
if (GameInteractor_Should(VB_PLAY_GATE_OPENING_OR_CLOSING_CS, true, this)) {
this->unk_2F2[0] = 200;
this->cameraId = Play_CreateSubCamera(play);
Play_ChangeCameraStatus(play, MAIN_CAM, CAM_STAT_WAIT);
@ -505,12 +511,12 @@ void func_80A53F30(EnHeishi2* this, PlayState* play) {
BgGateShutter* gate;
SkelAnime_Update(&this->skelAnime);
if (GameInteractor_Should(VB_PLAY_KAKARIKO_GATE_CS, true, this)) {
if (GameInteractor_Should(VB_PLAY_GATE_OPENING_OR_CLOSING_CS, true, this)) {
Play_CameraSetAtEye(play, this->cameraId, &this->unk_280, &this->unk_28C);
}
gate = (BgGateShutter*)this->gate;
if ((this->unk_2F2[0] == 0) || (gate->openingState == 0)) {
if (GameInteractor_Should(VB_PLAY_KAKARIKO_GATE_CS, true, this)) {
if (GameInteractor_Should(VB_PLAY_GATE_OPENING_OR_CLOSING_CS, true, this)) {
Play_ClearCamera(play, this->cameraId);
Play_ChangeCameraStatus(play, MAIN_CAM, CAM_STAT_ACTIVE);
}