Skip to content

Commit

Permalink
Allow Better SoDT to work on Night of the Final Day (#913)
Browse files Browse the repository at this point in the history
* Allow Better SoDT to work on Night of Final Day

* -1 newline

* lol oops

* change SoDT VB name to be more descriptive

* see if this fixes clang-format

* Inline vanilla conditional with GI Should call

* clang-format

* *long exacerbated sigh*
  • Loading branch information
zodiac-ill authored Jan 3, 2025
1 parent 297156a commit 0d1186b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions mm/2s2h/Enhancements/Songs/BetterSongOfDoubleTime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ void RegisterBetterSongOfDoubleTime() {
DrawTextRec(254.0f, 195.0f, 1.0f, 0, 0, 1.0f, 1.0f);
CLOSE_DISPS(gPlayState->state.gfxCtx);
});

COND_VB_SHOULD(VB_ALLOW_SONG_DOUBLE_TIME_ON_FINAL_NIGHT, CVAR, { *should = true; });
}

static RegisterShipInitFunc initFunc(RegisterBetterSongOfDoubleTime, { CVAR_NAME });
1 change: 1 addition & 0 deletions mm/2s2h/GameInteractor/GameInteractor.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ typedef enum {
VB_BE_HOOKSHOT_SURFACE,
VB_DEKU_GUARD_SHOW_SEARCH_BALLS,
VB_DISPLAY_SONG_OF_DOUBLE_TIME_PROMPT,
VB_ALLOW_SONG_DOUBLE_TIME_ON_FINAL_NIGHT
} GIVanillaBehavior;

typedef enum {
Expand Down
3 changes: 2 additions & 1 deletion mm/src/code/z_message.c
Original file line number Diff line number Diff line change
Expand Up @@ -6027,7 +6027,8 @@ void Message_Update(PlayState* play) {
}
} else if (sLastPlayedSong == OCARINA_SONG_DOUBLE_TIME) {
if (interfaceCtx->restrictions.songOfDoubleTime == 0) {
if ((CURRENT_DAY != 3) || (gSaveContext.save.isNight == 0)) {
if (GameInteractor_Should(VB_ALLOW_SONG_DOUBLE_TIME_ON_FINAL_NIGHT,
(CURRENT_DAY != 3) || (gSaveContext.save.isNight == 0))) {
if (GameInteractor_Should(VB_DISPLAY_SONG_OF_DOUBLE_TIME_PROMPT, true)) {
if (gSaveContext.save.isNight) {
Message_StartTextbox(play, D_801D0464[CURRENT_DAY - 1], NULL);
Expand Down

0 comments on commit 0d1186b

Please sign in to comment.