mirror of
https://github.com/HarbourMasters/Shipwright
synced 2026-08-13 20:44:41 -04:00
Hookify frogs' Ocarina game (#6969)
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user