mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-23 06:35:33 -07:00
Skip Kakariko gate cutscenes
This commit is contained in:
parent
1416b2490a
commit
f6fa9762f7
3 changed files with 49 additions and 20 deletions
|
@ -1430,6 +1430,14 @@ typedef enum {
|
||||||
// - None
|
// - None
|
||||||
VB_PLAY_GORON_FREE_CS,
|
VB_PLAY_GORON_FREE_CS,
|
||||||
|
|
||||||
|
// #### `result`
|
||||||
|
// ```c
|
||||||
|
// true
|
||||||
|
// ```
|
||||||
|
// #### `args`
|
||||||
|
// - `*EnHeishi2
|
||||||
|
VB_PLAY_KAKARIKO_GATE_CS,
|
||||||
|
|
||||||
// #### `result`
|
// #### `result`
|
||||||
// ```c
|
// ```c
|
||||||
// true
|
// true
|
||||||
|
|
|
@ -13,6 +13,7 @@ extern "C" {
|
||||||
#include "src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.h"
|
#include "src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.h"
|
||||||
#include "src/overlays/actors/ovl_En_Owl/z_en_owl.h"
|
#include "src/overlays/actors/ovl_En_Owl/z_en_owl.h"
|
||||||
#include "src/overlays/actors/ovl_En_Go2/z_en_go2.h"
|
#include "src/overlays/actors/ovl_En_Go2/z_en_go2.h"
|
||||||
|
#include "src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.h"
|
||||||
#include "src/overlays/actors/ovl_En_Ko/z_en_ko.h"
|
#include "src/overlays/actors/ovl_En_Ko/z_en_ko.h"
|
||||||
#include "src/overlays/actors/ovl_En_Ma1/z_en_ma1.h"
|
#include "src/overlays/actors/ovl_En_Ma1/z_en_ma1.h"
|
||||||
#include "src/overlays/actors/ovl_En_Ru2/z_en_ru2.h"
|
#include "src/overlays/actors/ovl_En_Ru2/z_en_ru2.h"
|
||||||
|
@ -720,6 +721,20 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, va_li
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case VB_PLAY_KAKARIKO_GATE_CS: {
|
||||||
|
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipMiscInteractions"), IS_RANDO)) {
|
||||||
|
EnHeishi2* enHeishi2 = va_arg(args, EnHeishi2*);
|
||||||
|
enHeishi2->unk_2F2[0] = 0;
|
||||||
|
|
||||||
|
if (enHeishi2->cameraId != MAIN_CAM) {
|
||||||
|
Play_ClearCamera(gPlayState, enHeishi2->cameraId);
|
||||||
|
Play_ChangeCameraStatus(gPlayState, MAIN_CAM, CAM_STAT_ACTIVE);
|
||||||
|
}
|
||||||
|
|
||||||
|
*should = false;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
case VB_PLAY_RAINBOW_BRIDGE_CS: {
|
case VB_PLAY_RAINBOW_BRIDGE_CS: {
|
||||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.Story"), IS_RANDO)) {
|
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.Story"), IS_RANDO)) {
|
||||||
*should = false;
|
*should = false;
|
||||||
|
|
|
@ -479,6 +479,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)) {
|
||||||
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);
|
||||||
|
@ -496,6 +497,7 @@ void func_80A53DF8(EnHeishi2* this, PlayState* play) {
|
||||||
this->unk_298.z = -1079.0f;
|
this->unk_298.z = -1079.0f;
|
||||||
this->unk_28C.z = -1079.0f;
|
this->unk_28C.z = -1079.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_80A53F30;
|
this->actionFunc = func_80A53F30;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -503,11 +505,15 @@ 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)) {
|
||||||
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)) {
|
||||||
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);
|
||||||
|
}
|
||||||
if ((this->unk_30A != 2)) {
|
if ((this->unk_30A != 2)) {
|
||||||
if (this->unk_30A == 0) {
|
if (this->unk_30A == 0) {
|
||||||
this->actor.textId = 0x2015;
|
this->actor.textId = 0x2015;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue