From 6f67984e27b57ad5d5f820580406a8242ace395c Mon Sep 17 00:00:00 2001 From: toaster Date: Tue, 26 Mar 2024 21:41:55 +0000 Subject: [PATCH] Add "Track 10" to the Message from the Stars Stays with you after you leave the Challenges screen. Also remove the duplicate-effort attempt-to-pre-optimise considersealedswapalert that only considered SECRET_SPECIALATTACK - it should also report here under other unlockable progressions, if relevant. --- src/k_menu.h | 2 -- src/k_menufunc.c | 4 ++++ src/m_cond.h | 1 + src/menus/extras-challenges.c | 13 ++++--------- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/k_menu.h b/src/k_menu.h index dcd9aedd6..b22853bde 100644 --- a/src/k_menu.h +++ b/src/k_menu.h @@ -1405,8 +1405,6 @@ extern struct challengesmenu_s { boolean chaokeyadd, keywasadded; UINT8 chaokeyhold; - boolean considersealedswapalert; - boolean requestflip; UINT16 unlockcount[CMC_MAX]; diff --git a/src/k_menufunc.c b/src/k_menufunc.c index 06e9991c3..8a73bbe4e 100644 --- a/src/k_menufunc.c +++ b/src/k_menufunc.c @@ -528,6 +528,7 @@ void M_PlayMenuJam(void) const char* overridetotrack[GDMUSIC_MAX-1] = { "KEYGEN", "LOSERC", + "TRACKA", }; if (refMenu != NULL && NotCurrentlyPlaying(overridetotrack[override - 1])) @@ -580,6 +581,9 @@ boolean M_ConsiderSealedSwapAlert(void) NULL, MM_NOTHING, NULL, NULL ); + if (gamedata->musicstate < GDMUSIC_TRACK10) + gamedata->musicstate = GDMUSIC_TRACK10; + return true; } diff --git a/src/m_cond.h b/src/m_cond.h index b9989af56..c54711791 100644 --- a/src/m_cond.h +++ b/src/m_cond.h @@ -286,6 +286,7 @@ typedef enum { GDMUSIC_KEYG, GDMUSIC_KEEPONMENU, // Minimum to keep after leaving the Challenge Grid GDMUSIC_LOSERCLUB = GDMUSIC_KEEPONMENU, + GDMUSIC_TRACK10, GDMUSIC_MAX } gdmusic_t; diff --git a/src/menus/extras-challenges.c b/src/menus/extras-challenges.c index 75e393b53..60f4265e7 100644 --- a/src/menus/extras-challenges.c +++ b/src/menus/extras-challenges.c @@ -361,7 +361,6 @@ menu_t *M_InterruptMenuWithChallenges(menu_t *desiredmenu) challengesmenu.requestnew = false; challengesmenu.chaokeyadd = false; challengesmenu.keywasadded = false; - challengesmenu.considersealedswapalert = false; challengesmenu.chaokeyhold = 0; challengesmenu.unlockcondition = NULL; @@ -707,9 +706,6 @@ void M_ChallengesTick(void) gamedata->unlocked[challengesmenu.currentunlock] = true; M_UpdateUnlockablesAndExtraEmblems(true, true); - if (ref->type == SECRET_SPECIALATTACK) - challengesmenu.considersealedswapalert = true; - // Update shown description just in case..? if (challengesmenu.unlockcondition) Z_Free(challengesmenu.unlockcondition); @@ -780,11 +776,7 @@ void M_ChallengesTick(void) // Fade decrease. if (--challengesmenu.fade == 0) { - // Play music the moment control returns. - M_PlayMenuJam(); - - if (challengesmenu.considersealedswapalert == true - && M_ConsiderSealedSwapAlert() == true) + if (M_ConsiderSealedSwapAlert() == true) { // No keygen tutorial in this case... // not ideal but at least unlikely to @@ -795,6 +787,9 @@ void M_ChallengesTick(void) { M_ChallengesTutorial(CCTUTORIAL_KEYGEN); } + + // Play music the moment control returns. + M_PlayMenuJam(); } }