Skip Kakariko and Hyrule Castle gate cutscenes (#5314)
* Skip Kakariko gate cutscenes * Simplify a bit * Revert "Simplify a bit" This reverts commit ffa68c130fede6962bb4488b85c9ec61ccc60170. * Add Hyrule Castle gate skip * Add missing backtick * Redo simplifications * Run clang-format * Proper casting of clearCamera argument Co-authored-by: Pepper0ni <93387759+Pepper0ni@users.noreply.github.com> --------- Co-authored-by: Pepper0ni <93387759+Pepper0ni@users.noreply.github.com>
This commit is contained in:
@@ -314,19 +314,21 @@ 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);
|
||||
this->unk_2F2[0] = 200;
|
||||
this->cameraId = Play_CreateSubCamera(play);
|
||||
Play_ChangeCameraStatus(play, MAIN_CAM, CAM_STAT_WAIT);
|
||||
Play_ChangeCameraStatus(play, this->cameraId, CAM_STAT_ACTIVE);
|
||||
this->unk_280.x = 947.0f;
|
||||
this->unk_280.y = 1195.0f;
|
||||
this->unk_280.z = 2682.0f;
|
||||
if (GameInteractor_Should(VB_PLAY_GATE_OPENING_OR_CLOSING_CS, true, this, false)) {
|
||||
this->unk_2F2[0] = 200;
|
||||
this->cameraId = Play_CreateSubCamera(play);
|
||||
Play_ChangeCameraStatus(play, MAIN_CAM, CAM_STAT_WAIT);
|
||||
Play_ChangeCameraStatus(play, this->cameraId, CAM_STAT_ACTIVE);
|
||||
this->unk_280.x = 947.0f;
|
||||
this->unk_280.y = 1195.0f;
|
||||
this->unk_280.z = 2682.0f;
|
||||
|
||||
this->unk_28C.x = 1164.0f;
|
||||
this->unk_28C.y = 1145.0f;
|
||||
this->unk_28C.z = 3014.0f;
|
||||
this->unk_28C.x = 1164.0f;
|
||||
this->unk_28C.y = 1145.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;
|
||||
}
|
||||
|
||||
@@ -334,11 +336,15 @@ void func_80A53850(EnHeishi2* this, PlayState* play) {
|
||||
BgSpot15Saku* gate;
|
||||
|
||||
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, false)) {
|
||||
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)) {
|
||||
Play_ClearCamera(play, this->cameraId);
|
||||
Play_ChangeCameraStatus(play, MAIN_CAM, CAM_STAT_ACTIVE);
|
||||
if (GameInteractor_Should(VB_PLAY_GATE_OPENING_OR_CLOSING_CS, true, this, true)) {
|
||||
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,23 +485,25 @@ 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);
|
||||
this->unk_2F2[0] = 200;
|
||||
this->cameraId = Play_CreateSubCamera(play);
|
||||
Play_ChangeCameraStatus(play, MAIN_CAM, CAM_STAT_WAIT);
|
||||
Play_ChangeCameraStatus(play, this->cameraId, CAM_STAT_ACTIVE);
|
||||
this->unk_2BC.x = -71.0f;
|
||||
this->unk_280.x = -71.0f;
|
||||
this->unk_2BC.y = 571.0f;
|
||||
this->unk_280.y = 571.0f;
|
||||
this->unk_2BC.z = -1487.0f;
|
||||
this->unk_280.z = -1487.0f;
|
||||
this->unk_298.x = 181.0f;
|
||||
this->unk_28C.x = 181.0f;
|
||||
this->unk_298.y = 417.0f;
|
||||
this->unk_28C.y = 417.0f;
|
||||
this->unk_298.z = -1079.0f;
|
||||
this->unk_28C.z = -1079.0f;
|
||||
Play_CameraSetAtEye(play, this->cameraId, &this->unk_280, &this->unk_28C);
|
||||
if (GameInteractor_Should(VB_PLAY_GATE_OPENING_OR_CLOSING_CS, true, this, false)) {
|
||||
this->unk_2F2[0] = 200;
|
||||
this->cameraId = Play_CreateSubCamera(play);
|
||||
Play_ChangeCameraStatus(play, MAIN_CAM, CAM_STAT_WAIT);
|
||||
Play_ChangeCameraStatus(play, this->cameraId, CAM_STAT_ACTIVE);
|
||||
this->unk_2BC.x = -71.0f;
|
||||
this->unk_280.x = -71.0f;
|
||||
this->unk_2BC.y = 571.0f;
|
||||
this->unk_280.y = 571.0f;
|
||||
this->unk_2BC.z = -1487.0f;
|
||||
this->unk_280.z = -1487.0f;
|
||||
this->unk_298.x = 181.0f;
|
||||
this->unk_28C.x = 181.0f;
|
||||
this->unk_298.y = 417.0f;
|
||||
this->unk_28C.y = 417.0f;
|
||||
this->unk_298.z = -1079.0f;
|
||||
this->unk_28C.z = -1079.0f;
|
||||
Play_CameraSetAtEye(play, this->cameraId, &this->unk_280, &this->unk_28C);
|
||||
}
|
||||
this->actionFunc = func_80A53F30;
|
||||
}
|
||||
|
||||
@@ -503,11 +511,15 @@ void func_80A53F30(EnHeishi2* this, PlayState* play) {
|
||||
BgGateShutter* gate;
|
||||
|
||||
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, false)) {
|
||||
Play_CameraSetAtEye(play, this->cameraId, &this->unk_280, &this->unk_28C);
|
||||
}
|
||||
gate = (BgGateShutter*)this->gate;
|
||||
if ((this->unk_2F2[0] == 0) || (gate->openingState == 0)) {
|
||||
Play_ClearCamera(play, this->cameraId);
|
||||
Play_ChangeCameraStatus(play, MAIN_CAM, CAM_STAT_ACTIVE);
|
||||
if (GameInteractor_Should(VB_PLAY_GATE_OPENING_OR_CLOSING_CS, true, this, true)) {
|
||||
Play_ClearCamera(play, this->cameraId);
|
||||
Play_ChangeCameraStatus(play, MAIN_CAM, CAM_STAT_ACTIVE);
|
||||
}
|
||||
if ((this->unk_30A != 2)) {
|
||||
if (this->unk_30A == 0) {
|
||||
this->actor.textId = 0x2015;
|
||||
|
||||
Reference in New Issue
Block a user