Difficulty: SwitchTimerMultiplier (#5555)
* Difficulty: FireTimerMultiplier Introduces slider to adjust timer on fire walls resetting switches * rename, add more timers * also shadow trial, dampe race, deku water * avoid decrementing timer to 0, which with BgMizu can cause timer to go below 0 & break * gtg eye statue * also scale torches * tooltip * Limit difficulty: torches stop at -3 & shadow temple torch puzzle stops at -4 * put timer condition as should when convenient
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
|
||||
#include "z_bg_gnd_darkmeiro.h"
|
||||
#include "objects/object_demo_kekkai/object_demo_kekkai.h"
|
||||
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED)
|
||||
|
||||
@@ -115,7 +116,9 @@ void BgGndDarkmeiro_UpdateBlockTimer(BgGndDarkmeiro* this, PlayState* play) {
|
||||
if (Flags_GetSwitch(play, ((this->dyna.actor.params >> 8) & 0x3F) + 1)) {
|
||||
if (this->actionFlags & 4) {
|
||||
if (this->timer1 > 0) {
|
||||
this->timer1--;
|
||||
if (GameInteractor_Should(VB_SWITCH_TIMER_TICK, true, this, &this->timer1)) {
|
||||
this->timer1--;
|
||||
}
|
||||
} else {
|
||||
Flags_UnsetSwitch(play, ((this->dyna.actor.params >> 8) & 0x3F) + 1);
|
||||
this->actionFlags &= ~4;
|
||||
@@ -131,7 +134,9 @@ void BgGndDarkmeiro_UpdateBlockTimer(BgGndDarkmeiro* this, PlayState* play) {
|
||||
if (Flags_GetSwitch(play, ((this->dyna.actor.params >> 8) & 0x3F) + 2)) {
|
||||
if (this->actionFlags & 8) {
|
||||
if (this->timer2 > 0) {
|
||||
this->timer2--;
|
||||
if (GameInteractor_Should(VB_SWITCH_TIMER_TICK, true, &this->timer2)) {
|
||||
this->timer2--;
|
||||
}
|
||||
} else {
|
||||
Flags_UnsetSwitch(play, ((this->dyna.actor.params >> 8) & 0x3F) + 2);
|
||||
this->actionFlags &= ~8;
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#include "z_bg_hidan_curtain.h"
|
||||
#include "objects/gameplay_keep/gameplay_keep.h"
|
||||
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
|
||||
|
||||
#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
|
||||
|
||||
@@ -191,7 +192,10 @@ void BgHidanCurtain_TurnOff(BgHidanCurtain* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void BgHidanCurtain_WaitForTimer(BgHidanCurtain* this, PlayState* play) {
|
||||
DECR(this->timer);
|
||||
if (GameInteractor_Should(VB_SWITCH_TIMER_TICK, true, this, &this->timer)) {
|
||||
DECR(this->timer);
|
||||
}
|
||||
|
||||
if (this->timer == 0) {
|
||||
this->actionFunc = BgHidanCurtain_TurnOn;
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "z_bg_hidan_fwbig.h"
|
||||
#include "objects/gameplay_keep/gameplay_keep.h"
|
||||
#include "objects/object_hidan_objects/object_hidan_objects.h"
|
||||
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
|
||||
|
||||
#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
|
||||
|
||||
@@ -165,9 +166,10 @@ void BgHidanFwbig_Lower(BgHidanFwbig* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void BgHidanFwbig_WaitForTimer(BgHidanFwbig* this, PlayState* play) {
|
||||
if (this->timer != 0) {
|
||||
if (GameInteractor_Should(VB_SWITCH_TIMER_TICK, this->timer != 0, this, &this->timer)) {
|
||||
this->timer--;
|
||||
}
|
||||
|
||||
if (this->timer == 0) {
|
||||
this->actionFunc = BgHidanFwbig_Rise;
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#include "z_bg_menkuri_eye.h"
|
||||
#include "objects/object_menkuri_objects/object_menkuri_objects.h"
|
||||
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
|
||||
|
||||
#define FLAGS ACTOR_FLAG_DRAW_CULLING_DISABLED
|
||||
|
||||
@@ -90,7 +91,8 @@ void BgMenkuriEye_Update(Actor* thisx, PlayState* play) {
|
||||
|
||||
if (!Flags_GetSwitch(play, this->actor.params)) {
|
||||
if (this->framesUntilDisable != -1) {
|
||||
if (this->framesUntilDisable != 0) {
|
||||
if (GameInteractor_Should(VB_SWITCH_TIMER_TICK, this->framesUntilDisable != 0, this,
|
||||
&this->framesUntilDisable)) {
|
||||
this->framesUntilDisable -= 1;
|
||||
}
|
||||
if (this->framesUntilDisable == 0) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "z_bg_mizu_shutter.h"
|
||||
#include "objects/object_mizu_objects/object_mizu_objects.h"
|
||||
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
|
||||
|
||||
#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
|
||||
|
||||
@@ -137,7 +138,9 @@ void BgMizuShutter_Move(BgMizuShutter* this, PlayState* play) {
|
||||
|
||||
void BgMizuShutter_WaitForTimer(BgMizuShutter* this, PlayState* play) {
|
||||
if (this->timerMax != 0x3F * 20) {
|
||||
this->timer--;
|
||||
if (GameInteractor_Should(VB_SWITCH_TIMER_TICK, true, this, &this->timer)) {
|
||||
this->timer--;
|
||||
}
|
||||
func_8002F994(&this->dyna.actor, this->timer);
|
||||
if (this->timer == 0) {
|
||||
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_METALDOOR_CLOSE);
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#include "z_bg_relay_objects.h"
|
||||
#include "objects/object_relay_objects/object_relay_objects.h"
|
||||
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
|
||||
|
||||
#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
|
||||
|
||||
@@ -133,7 +134,7 @@ void func_808A90F4(BgRelayObjects* this, PlayState* play) {
|
||||
|
||||
void func_808A91AC(BgRelayObjects* this, PlayState* play) {
|
||||
if (this->unk_169 != 5) {
|
||||
if (this->timer != 0) {
|
||||
if (GameInteractor_Should(VB_SWITCH_TIMER_TICK, this->timer != 0, this, &this->timer)) {
|
||||
this->timer--;
|
||||
}
|
||||
func_8002F994(&this->dyna.actor, this->timer);
|
||||
@@ -168,7 +169,7 @@ void BgRelayObjects_DoNothing(BgRelayObjects* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_808A932C(BgRelayObjects* this, PlayState* play) {
|
||||
if (this->timer != 0) {
|
||||
if (GameInteractor_Should(VB_SWITCH_TIMER_TICK, this->timer != 0, &this->timer)) {
|
||||
this->timer--;
|
||||
}
|
||||
if (this->timer == 0) {
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#include "z_bg_ydan_hasi.h"
|
||||
#include "objects/object_ydan_objects/object_ydan_objects.h"
|
||||
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED)
|
||||
|
||||
@@ -126,9 +127,10 @@ void BgYdanHasi_MoveWater(BgYdanHasi* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void BgYdanHasi_DecWaterTimer(BgYdanHasi* this, PlayState* play) {
|
||||
if (this->timer != 0) {
|
||||
if (GameInteractor_Should(VB_SWITCH_TIMER_TICK, this->timer != 0, this, &this->timer)) {
|
||||
this->timer--;
|
||||
}
|
||||
|
||||
func_8002F994(&this->dyna.actor, this->timer);
|
||||
if (this->timer == 0) {
|
||||
this->actionFunc = BgYdanHasi_MoveWater;
|
||||
@@ -145,9 +147,10 @@ void BgYdanHasi_SetupThreeBlocks(BgYdanHasi* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void BgYdanHasi_UpdateThreeBlocks(BgYdanHasi* this, PlayState* play) {
|
||||
if (this->timer != 0) {
|
||||
if (GameInteractor_Should(VB_SWITCH_TIMER_TICK, this->timer != 0, this, &this->timer)) {
|
||||
this->timer--;
|
||||
}
|
||||
|
||||
if (this->timer == 0) {
|
||||
if (Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y, 3.0f) != 0) {
|
||||
Flags_UnsetSwitch(play, this->type);
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#include "z_en_siofuki.h"
|
||||
#include "objects/object_siofuki/object_siofuki.h"
|
||||
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED)
|
||||
|
||||
@@ -188,7 +189,10 @@ void func_80AFC218(EnSiofuki* this, PlayState* play) {
|
||||
func_80AFBE8C(this, play);
|
||||
func_80AFC1D0(this, play);
|
||||
|
||||
this->timer--;
|
||||
if (GameInteractor_Should(VB_SWITCH_TIMER_TICK, true, this, &this->timer)) {
|
||||
this->timer--;
|
||||
}
|
||||
|
||||
if (this->timer < 0) {
|
||||
Flags_UnsetSwitch(play, ((u16)this->dyna.actor.params >> 6) & 0x3F);
|
||||
switch (((u16)this->dyna.actor.params >> 0xC) & 0xF) {
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "overlays/actors/ovl_En_Arrow/z_en_arrow.h"
|
||||
#include "objects/gameplay_keep/gameplay_keep.h"
|
||||
#include "objects/object_syokudai/object_syokudai.h"
|
||||
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER)
|
||||
|
||||
@@ -239,7 +240,7 @@ void ObjSyokudai_Update(Actor* thisx, PlayState* play2) {
|
||||
Collider_UpdateCylinder(&this->actor, &this->colliderFlame);
|
||||
CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderFlame.base);
|
||||
|
||||
if (this->litTimer > 0) {
|
||||
if (GameInteractor_Should(VB_SWITCH_TIMER_TICK, this->litTimer > 0, this, &this->litTimer)) {
|
||||
this->litTimer--;
|
||||
if ((this->litTimer == 0) && (torchType != 0)) {
|
||||
sLitTorchCount--;
|
||||
|
||||
Reference in New Issue
Block a user