mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-07-16 10:02:59 -07:00
Skip trial barrier dispel cutscenes (#5464)
This commit is contained in:
parent
bc3b17f4ab
commit
19eb4f39ab
4 changed files with 40 additions and 8 deletions
|
@ -1358,6 +1358,14 @@ typedef enum {
|
|||
// - `*BgTreemouth`
|
||||
VB_PLAY_DEKU_TREE_INTRO_CS,
|
||||
|
||||
// #### `result`
|
||||
// ```c
|
||||
// true
|
||||
// ```
|
||||
// #### `args`
|
||||
// - `*DemoKekkai`
|
||||
VB_PLAY_DISPEL_BARRIER_CS,
|
||||
|
||||
// #### `result`
|
||||
// ```c
|
||||
// true
|
||||
|
|
|
@ -19,6 +19,7 @@ extern "C" {
|
|||
#include "src/overlays/actors/ovl_En_Zl4/z_en_zl4.h"
|
||||
#include "src/overlays/actors/ovl_En_Box/z_en_box.h"
|
||||
#include "src/overlays/actors/ovl_Demo_Im/z_demo_im.h"
|
||||
#include "src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.h"
|
||||
#include "src/overlays/actors/ovl_En_Sa/z_en_sa.h"
|
||||
#include "src/overlays/actors/ovl_Bg_Ddan_Kd/z_bg_ddan_kd.h"
|
||||
#include "src/overlays/actors/ovl_En_Tk/z_en_tk.h"
|
||||
|
@ -465,6 +466,26 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, va_li
|
|||
*should = false;
|
||||
}
|
||||
break;
|
||||
case VB_PLAY_DISPEL_BARRIER_CS: {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.OnePoint"), IS_RANDO)) {
|
||||
static s16 trialEntrances[] = {
|
||||
0,
|
||||
ENTR_INSIDE_GANONS_CASTLE_3,
|
||||
ENTR_INSIDE_GANONS_CASTLE_6,
|
||||
ENTR_INSIDE_GANONS_CASTLE_5,
|
||||
ENTR_INSIDE_GANONS_CASTLE_4,
|
||||
ENTR_INSIDE_GANONS_CASTLE_7,
|
||||
ENTR_INSIDE_GANONS_CASTLE_2,
|
||||
};
|
||||
RateLimitedSuccessChime();
|
||||
DemoKekkai* kekkai = va_arg(args, DemoKekkai*);
|
||||
gPlayState->nextEntranceIndex = trialEntrances[kekkai->actor.params];
|
||||
gPlayState->transitionTrigger = TRANS_TRIGGER_START;
|
||||
gPlayState->transitionType = TRANS_TYPE_FADE_BLACK;
|
||||
*should = false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case VB_OWL_INTERACTION: {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipOwlInteractions"), IS_RANDO) && *should) {
|
||||
EnOwl* enOwl = va_arg(args, EnOwl*);
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include "z_demo_kekkai.h"
|
||||
#include "objects/object_demo_kekkai/object_demo_kekkai.h"
|
||||
#include "scenes/dungeons/ganontika/ganontika_scene.h"
|
||||
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
|
||||
#include "soh/ResourceManagerHelpers.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED)
|
||||
|
@ -257,13 +258,15 @@ void DemoKekkai_TrialBarrierIdle(Actor* thisx, PlayState* play) {
|
|||
CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider1.base);
|
||||
CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider1.base);
|
||||
if (this->collider2.base.acFlags & AC_HIT) {
|
||||
Sfx_PlaySfxCentered(NA_SE_SY_CORRECT_CHIME);
|
||||
// "I got it"
|
||||
LOG_STRING("当ったよ");
|
||||
this->actor.update = DemoKekkai_TrialBarrierDispel;
|
||||
this->timer = 0;
|
||||
play->csCtx.segment = SEGMENTED_TO_VIRTUAL(sSageCutscenes[this->actor.params]);
|
||||
gSaveContext.cutsceneTrigger = 1;
|
||||
if (GameInteractor_Should(VB_PLAY_DISPEL_BARRIER_CS, true, this)) {
|
||||
Sfx_PlaySfxCentered(NA_SE_SY_CORRECT_CHIME);
|
||||
// "I got it"
|
||||
LOG_STRING("当ったよ");
|
||||
this->actor.update = DemoKekkai_TrialBarrierDispel;
|
||||
this->timer = 0;
|
||||
play->csCtx.segment = SEGMENTED_TO_VIRTUAL(sSageCutscenes[this->actor.params]);
|
||||
gSaveContext.cutsceneTrigger = 1;
|
||||
}
|
||||
}
|
||||
CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider2.base);
|
||||
func_8002F974(&this->actor, NA_SE_EV_TOWER_ENERGY - SFX_FLAG);
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
struct DemoKekkai;
|
||||
|
||||
typedef void (*DemoKekkaiUpdateFunc)(struct DemoKekkai* this, PlayState* play);
|
||||
typedef void (*DemoKekkaiUpdateFunc)(struct DemoKekkai* thisx, PlayState* play);
|
||||
|
||||
typedef struct DemoKekkai {
|
||||
/* 0x0000 */ Actor actor;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue