mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-23 06:35:33 -07:00
Add Hyrule Castle gate skip
This commit is contained in:
parent
6ce809a972
commit
ba258d96c5
3 changed files with 28 additions and 22 deletions
|
@ -1427,16 +1427,16 @@ typedef enum {
|
||||||
// true
|
// true
|
||||||
// ```
|
// ```
|
||||||
// #### `args`
|
// #### `args`
|
||||||
// - None
|
// - `*EnHeishi2
|
||||||
VB_PLAY_GORON_FREE_CS,
|
VB_PLAY_GATE_OPENING_OR_CLOSING_CS,
|
||||||
|
|
||||||
// #### `result`
|
// #### `result`
|
||||||
// ```c
|
// ```c
|
||||||
// true
|
// true
|
||||||
// ```
|
// ```
|
||||||
// #### `args`
|
// #### `args`
|
||||||
// - `*EnHeishi2
|
// - None
|
||||||
VB_PLAY_KAKARIKO_GATE_CS,
|
VB_PLAY_GORON_FREE_CS,
|
||||||
|
|
||||||
// #### `result`
|
// #### `result`
|
||||||
// ```c
|
// ```c
|
||||||
|
|
|
@ -721,7 +721,7 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, va_li
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case VB_PLAY_KAKARIKO_GATE_CS: {
|
case VB_PLAY_GATE_OPENING_OR_CLOSING_CS: {
|
||||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipMiscInteractions"), IS_RANDO)) {
|
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipMiscInteractions"), IS_RANDO)) {
|
||||||
EnHeishi2* enHeishi2 = va_arg(args, EnHeishi2*);
|
EnHeishi2* enHeishi2 = va_arg(args, EnHeishi2*);
|
||||||
enHeishi2->unk_2F2[0] = 0;
|
enHeishi2->unk_2F2[0] = 0;
|
||||||
|
|
|
@ -314,19 +314,21 @@ void func_80A5372C(EnHeishi2* this, PlayState* play) {
|
||||||
f32 frameCount = Animation_GetLastFrame(&gEnHeishiIdleAnim);
|
f32 frameCount = Animation_GetLastFrame(&gEnHeishiIdleAnim);
|
||||||
|
|
||||||
Animation_Change(&this->skelAnime, &gEnHeishiIdleAnim, 1.0f, 0.0f, (s16)frameCount, ANIMMODE_LOOP, -10.0f);
|
Animation_Change(&this->skelAnime, &gEnHeishiIdleAnim, 1.0f, 0.0f, (s16)frameCount, ANIMMODE_LOOP, -10.0f);
|
||||||
this->unk_2F2[0] = 200;
|
if (GameInteractor_Should(VB_PLAY_GATE_OPENING_OR_CLOSING_CS, true, this)) {
|
||||||
this->cameraId = Play_CreateSubCamera(play);
|
this->unk_2F2[0] = 200;
|
||||||
Play_ChangeCameraStatus(play, MAIN_CAM, CAM_STAT_WAIT);
|
this->cameraId = Play_CreateSubCamera(play);
|
||||||
Play_ChangeCameraStatus(play, this->cameraId, CAM_STAT_ACTIVE);
|
Play_ChangeCameraStatus(play, MAIN_CAM, CAM_STAT_WAIT);
|
||||||
this->unk_280.x = 947.0f;
|
Play_ChangeCameraStatus(play, this->cameraId, CAM_STAT_ACTIVE);
|
||||||
this->unk_280.y = 1195.0f;
|
this->unk_280.x = 947.0f;
|
||||||
this->unk_280.z = 2682.0f;
|
this->unk_280.y = 1195.0f;
|
||||||
|
this->unk_280.z = 2682.0f;
|
||||||
|
|
||||||
this->unk_28C.x = 1164.0f;
|
this->unk_28C.x = 1164.0f;
|
||||||
this->unk_28C.y = 1145.0f;
|
this->unk_28C.y = 1145.0f;
|
||||||
this->unk_28C.z = 3014.0f;
|
this->unk_28C.z = 3014.0f;
|
||||||
|
|
||||||
Play_CameraSetAtEye(play, this->cameraId, &this->unk_280, &this->unk_28C);
|
Play_CameraSetAtEye(play, this->cameraId, &this->unk_280, &this->unk_28C);
|
||||||
|
}
|
||||||
this->actionFunc = func_80A53850;
|
this->actionFunc = func_80A53850;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -334,11 +336,15 @@ void func_80A53850(EnHeishi2* this, PlayState* play) {
|
||||||
BgSpot15Saku* gate;
|
BgSpot15Saku* gate;
|
||||||
|
|
||||||
SkelAnime_Update(&this->skelAnime);
|
SkelAnime_Update(&this->skelAnime);
|
||||||
Play_CameraSetAtEye(play, this->cameraId, &this->unk_280, &this->unk_28C);
|
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;
|
gate = (BgSpot15Saku*)this->gate;
|
||||||
if ((this->unk_2F2[0] == 0) || (gate->unk_168 == 0)) {
|
if ((this->unk_2F2[0] == 0) || (gate->unk_168 == 0)) {
|
||||||
Play_ClearCamera(play, this->cameraId);
|
if (GameInteractor_Should(VB_PLAY_GATE_OPENING_OR_CLOSING_CS, true, this)) {
|
||||||
Play_ChangeCameraStatus(play, MAIN_CAM, CAM_STAT_ACTIVE);
|
Play_ClearCamera(play, this->cameraId);
|
||||||
|
Play_ChangeCameraStatus(play, MAIN_CAM, CAM_STAT_ACTIVE);
|
||||||
|
}
|
||||||
Message_CloseTextbox(play);
|
Message_CloseTextbox(play);
|
||||||
this->unk_30C = 1;
|
this->unk_30C = 1;
|
||||||
Player_SetCsActionWithHaltedActors(play, NULL, 7);
|
Player_SetCsActionWithHaltedActors(play, NULL, 7);
|
||||||
|
@ -479,7 +485,7 @@ void func_80A53DF8(EnHeishi2* this, PlayState* play) {
|
||||||
f32 frameCount = Animation_GetLastFrame(&gEnHeishiIdleAnim);
|
f32 frameCount = Animation_GetLastFrame(&gEnHeishiIdleAnim);
|
||||||
|
|
||||||
Animation_Change(&this->skelAnime, &gEnHeishiIdleAnim, 1.0f, 0.0f, (s16)frameCount, ANIMMODE_LOOP, -10.0f);
|
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->unk_2F2[0] = 200;
|
||||||
this->cameraId = Play_CreateSubCamera(play);
|
this->cameraId = Play_CreateSubCamera(play);
|
||||||
Play_ChangeCameraStatus(play, MAIN_CAM, CAM_STAT_WAIT);
|
Play_ChangeCameraStatus(play, MAIN_CAM, CAM_STAT_WAIT);
|
||||||
|
@ -505,12 +511,12 @@ void func_80A53F30(EnHeishi2* this, PlayState* play) {
|
||||||
BgGateShutter* gate;
|
BgGateShutter* gate;
|
||||||
|
|
||||||
SkelAnime_Update(&this->skelAnime);
|
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);
|
Play_CameraSetAtEye(play, this->cameraId, &this->unk_280, &this->unk_28C);
|
||||||
}
|
}
|
||||||
gate = (BgGateShutter*)this->gate;
|
gate = (BgGateShutter*)this->gate;
|
||||||
if ((this->unk_2F2[0] == 0) || (gate->openingState == 0)) {
|
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_ClearCamera(play, this->cameraId);
|
||||||
Play_ChangeCameraStatus(play, MAIN_CAM, CAM_STAT_ACTIVE);
|
Play_ChangeCameraStatus(play, MAIN_CAM, CAM_STAT_ACTIVE);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue