mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-22 14:23:44 -07:00
also shadow trial, dampe race, deku water
This commit is contained in:
parent
2f5cb2261e
commit
9c66e34989
4 changed files with 25 additions and 12 deletions
|
@ -7,11 +7,11 @@ extern PlayState* gPlayState;
|
|||
|
||||
void RegisterSwitchTimerMultiplier() {
|
||||
COND_VB_SHOULD(VB_SWITCH_TIMER_TICK, CVarGetInteger(CVAR_ENHANCEMENT("SwitchTimerMultiplier"), 0) != 0, {
|
||||
int factor = CVarGetInteger(CVAR_ENHANCEMENT("SwitchTimerMultiplier"), 0);
|
||||
if (factor != 0) {
|
||||
if (factor > 0 && gPlayState->gameplayFrames % (factor + 1) != 0) {
|
||||
int multiplier = CVarGetInteger(CVAR_ENHANCEMENT("SwitchTimerMultiplier"), 0);
|
||||
if (multiplier != 0) {
|
||||
if (multiplier > 0 && gPlayState->gameplayFrames % (multiplier + 1) != 0) {
|
||||
*should = false;
|
||||
} else if (gPlayState->gameplayFrames % (6 + factor) == 0) {
|
||||
} else if (gPlayState->gameplayFrames % (6 + multiplier) == 0) {
|
||||
s16* timer = va_arg(args, s16*);
|
||||
*timer -= *timer > 0;
|
||||
}
|
||||
|
|
|
@ -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->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_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,8 +134,10 @@ void func_808A90F4(BgRelayObjects* this, PlayState* play) {
|
|||
|
||||
void func_808A91AC(BgRelayObjects* this, PlayState* play) {
|
||||
if (this->unk_169 != 5) {
|
||||
if (this->timer != 0) {
|
||||
this->timer--;
|
||||
if (GameInteractor_Should(VB_SWITCH_TIMER_TICK, true, &this->timer)) {
|
||||
if (this->timer != 0) {
|
||||
this->timer--;
|
||||
}
|
||||
}
|
||||
func_8002F994(&this->dyna.actor, this->timer);
|
||||
}
|
||||
|
@ -168,8 +171,10 @@ void BgRelayObjects_DoNothing(BgRelayObjects* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void func_808A932C(BgRelayObjects* this, PlayState* play) {
|
||||
if (this->timer != 0) {
|
||||
this->timer--;
|
||||
if (GameInteractor_Should(VB_SWITCH_TIMER_TICK, true, &this->timer)) {
|
||||
if (this->timer != 0) {
|
||||
this->timer--;
|
||||
}
|
||||
}
|
||||
if (this->timer == 0) {
|
||||
if (!Player_InCsMode(play)) {
|
||||
|
|
|
@ -127,9 +127,12 @@ void BgYdanHasi_MoveWater(BgYdanHasi* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void BgYdanHasi_DecWaterTimer(BgYdanHasi* this, PlayState* play) {
|
||||
if (this->timer != 0) {
|
||||
this->timer--;
|
||||
if (GameInteractor_Should(VB_SWITCH_TIMER_TICK, true, &this->timer)) {
|
||||
if (this->timer != 0) {
|
||||
this->timer--;
|
||||
}
|
||||
}
|
||||
|
||||
func_8002F994(&this->dyna.actor, this->timer);
|
||||
if (this->timer == 0) {
|
||||
this->actionFunc = BgYdanHasi_MoveWater;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue