diff options
| author | Jordan Longstaff <JordanLongstaff@users.noreply.github.com> | 2026-07-23 17:48:46 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-07-23 21:48:46 +0000 |
| commit | 5c55c01c683952913b7547f6ba02116a25b8440f (patch) | |
| tree | 2c0444222950116186272615497a0c0cabd513c0 /soh/src | |
| parent | 35dcba5944203d254781d1ac5f870c2eed13b802 (diff) | |
Hookify frogs' Ocarina game (#6969)
Diffstat (limited to 'soh/src')
| -rw-r--r-- | soh/src/overlays/actors/ovl_En_Fr/z_en_fr.c | 29 |
1 files changed, 5 insertions, 24 deletions
diff --git a/soh/src/overlays/actors/ovl_En_Fr/z_en_fr.c b/soh/src/overlays/actors/ovl_En_Fr/z_en_fr.c index 67d7b3f35..47669a2ec 100644 --- a/soh/src/overlays/actors/ovl_En_Fr/z_en_fr.c +++ b/soh/src/overlays/actors/ovl_En_Fr/z_en_fr.c @@ -824,22 +824,10 @@ void EnFr_SetupFrogSong(EnFr* this, PlayState* play) { if (this->frogSongTimer != 0) { this->frogSongTimer--; } else { - // #region SOH [Enhancement] - if (CVarGetInteger(CVAR_ENHANCEMENT("CustomizeFrogsOcarinaGame"), 0)) { - this->frogSongTimer = 40 * CVarGetInteger(CVAR_ENHANCEMENT("FrogsModifyFailTime"), 1); - if (CVarGetInteger(CVAR_ENHANCEMENT("InstantFrogsGameWin"), 0)) { - this->actor.textId = 0x40AC; - EnFr_SetupReward(this, play, false); - } else { - this->ocarinaNoteIndex = 0; - func_8010BD58(play, OCARINA_ACTION_FROGS); - this->ocarinaNote = EnFr_GetNextNoteFrogSong(this->ocarinaNoteIndex); - EnFr_CheckOcarinaInputFrogSong(this->ocarinaNote); - this->actionFunc = EnFr_ContinueFrogSong; - } - // #endregion - } else { + if (GameInteractor_Should(VB_SET_FROG_OCARINA_GAME_TIME_LIMIT, true, this, 40)) { this->frogSongTimer = 40; + } + if (GameInteractor_Should(VB_PLAY_FROG_OCARINA_GAME, true, this)) { this->ocarinaNoteIndex = 0; func_8010BD58(play, OCARINA_ACTION_FROGS); this->ocarinaNote = EnFr_GetNextNoteFrogSong(this->ocarinaNoteIndex); @@ -867,11 +855,7 @@ s32 EnFr_IsFrogSongComplete(EnFr* this, PlayState* play) { ocarinaNote = EnFr_GetNextNoteFrogSong(ocarinaNoteIndex); this->ocarinaNote = ocarinaNote; EnFr_CheckOcarinaInputFrogSong(ocarinaNote); - // #region SOH [Enhancement] - if (CVarGetInteger(CVAR_ENHANCEMENT("CustomizeFrogsOcarinaGame"), 0)) { - this->frogSongTimer = sTimerFrogSong[index] * CVarGetInteger(CVAR_ENHANCEMENT("FrogsModifyFailTime"), 1); - // #endregion - } else { + if (GameInteractor_Should(VB_SET_FROG_OCARINA_GAME_TIME_LIMIT, true, this, sTimerFrogSong[index])) { this->frogSongTimer = sTimerFrogSong[index]; } } @@ -896,10 +880,7 @@ void EnFr_ContinueFrogSong(EnFr* this, PlayState* play) { if (this->frogSongTimer == 0) { EnFr_OcarinaMistake(this, play); } else { - // #region SOH [Enhancement] - Don't decrement timer - if (!CVarGetInteger(CVAR_ENHANCEMENT("CustomizeFrogsOcarinaGame"), 0) || - !CVarGetInteger(CVAR_ENHANCEMENT("FrogsUnlimitedFailTime"), 0)) { - // #endregion + if (GameInteractor_Should(VB_FROGS_OCARINA_GAME_TIMER_TICK, true)) { this->frogSongTimer--; } if (play->msgCtx.msgMode == MSGMODE_FROGS_PLAYING) { |
