diff --git a/src/d_clisrv.c b/src/d_clisrv.c index 176329e84..6acf77ddd 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -2513,7 +2513,10 @@ static void Command_connect(void) SplitScreen_OnChange(); } + // Menu restore state. restoreMenu = &PLAY_MP_OptSelectDef; + S_ChangeMusicInternal("NETMD2", true); + CL_ConnectToServer(); } diff --git a/src/k_menu.h b/src/k_menu.h index 44be54541..de53864b1 100644 --- a/src/k_menu.h +++ b/src/k_menu.h @@ -154,6 +154,7 @@ struct menu_t INT16 x, y; // x, y of menu INT16 extra1, extra2; // Can be whatever really! Options menu uses extra1 for bg colour. + const char *music; // Track to play in M_PlayMenuJam. NULL for default, "." to stop INT16 transitionID; // only transition if IDs match INT16 transitionTics; // tics for transitions out @@ -1185,6 +1186,7 @@ boolean M_StatisticsInputs(INT32 ch); 0,\ source,\ x, y,\ + NULL,\ 0, 0,\ M_DrawGenericMenu,\ NULL,\ @@ -1201,7 +1203,8 @@ boolean M_StatisticsInputs(INT32 ch); 0,\ source,\ 0, 0,\ - 0, 0, \ + 0, 0,\ + NULL,\ 1, 5,\ M_DrawKartGamemodeMenu,\ NULL,\ @@ -1217,7 +1220,8 @@ boolean M_StatisticsInputs(INT32 ch); 0,\ source,\ 0, 0,\ - 0, 0, \ + 0, 0,\ + "EXTRAS",\ 1, 5,\ M_DrawImageDef,\ NULL,\ diff --git a/src/k_menufunc.c b/src/k_menufunc.c index e73ac3772..edd99b708 100644 --- a/src/k_menufunc.c +++ b/src/k_menufunc.c @@ -358,9 +358,27 @@ boolean M_Responder(event_t *ev) void M_PlayMenuJam(void) { + menu_t *refMenu = (menuactive ? currentMenu : restoreMenu); + if (challengesmenu.pending) return; + if (Playing()) + return; + + if (refMenu != NULL && refMenu->music != NULL) + { + if (refMenu->music[0] == '.' && refMenu->music[1] == '\0') + { + S_StopMusic(); + } + else + { + S_ChangeMusicInternal(refMenu->music, true); + } + return; + } + if (cv_menujam_update.value) { CV_AddValue(&cv_menujam, 1); @@ -630,6 +648,7 @@ void M_SetupNextMenu(menu_t *menudef, boolean notransition) } M_UpdateMenuBGImage(false); + M_PlayMenuJam(); } void M_GoBack(INT32 choice) diff --git a/src/menus/extras-1.c b/src/menus/extras-1.c index 457ca348d..34b0cad6c 100644 --- a/src/menus/extras-1.c +++ b/src/menus/extras-1.c @@ -28,6 +28,7 @@ menu_t EXTRAS_MainDef = { EXTRAS_Main, 0, 0, 0, 0, + "EXTRAS", 2, 5, M_DrawExtras, M_ExtrasTick, diff --git a/src/menus/extras-addons.c b/src/menus/extras-addons.c index e980d131d..0d2dbd85b 100644 --- a/src/menus/extras-addons.c +++ b/src/menus/extras-addons.c @@ -23,6 +23,7 @@ menu_t MISC_AddonsDef = { MISC_AddonsMenu, 50, 28, 0, 0, + "EXTRAS", 0, 0, M_DrawAddons, M_AddonsRefresh, diff --git a/src/menus/extras-challenges.c b/src/menus/extras-challenges.c index f3b14f53a..583dc7a1a 100644 --- a/src/menus/extras-challenges.c +++ b/src/menus/extras-challenges.c @@ -20,6 +20,7 @@ menu_t MISC_ChallengesDef = { MISC_ChallengesStatsDummyMenu, BASEVIDWIDTH/2, 32, 0, 0, + "EXTRAS", 98, 0, M_DrawChallenges, M_ChallengesTick, @@ -37,6 +38,7 @@ menu_t MISC_StatisticsDef = { MISC_ChallengesStatsDummyMenu, 280, 185, 0, 0, + "EXTRAS", 98, 0, M_DrawStatistics, NULL, diff --git a/src/menus/extras-replay-hut.c b/src/menus/extras-replay-hut.c index 14e1ced15..2dbf2c86a 100644 --- a/src/menus/extras-replay-hut.c +++ b/src/menus/extras-replay-hut.c @@ -26,6 +26,7 @@ menu_t EXTRAS_ReplayHutDef = EXTRAS_ReplayHut, 30, 80, 0, 0, + "REPLAY", 41, 1, M_DrawReplayHut, NULL, @@ -58,6 +59,7 @@ menu_t EXTRAS_ReplayStartDef = EXTRAS_ReplayStart, 27, 80, 0, 0, + "REPLAY", 41, 1, M_DrawReplayStartMenu, NULL, diff --git a/src/menus/main-profile-select.c b/src/menus/main-profile-select.c index 1f1154db6..e070e2b5b 100644 --- a/src/menus/main-profile-select.c +++ b/src/menus/main-profile-select.c @@ -15,6 +15,7 @@ menu_t MAIN_ProfilesDef = { MAIN_Profiles, 32, 80, SKINCOLOR_ULTRAMARINE, 0, + NULL, 2, 5, M_DrawProfileSelect, M_OptionsTick, diff --git a/src/menus/options-1.c b/src/menus/options-1.c index fd35da23d..d2408f4be 100644 --- a/src/menus/options-1.c +++ b/src/menus/options-1.c @@ -43,6 +43,7 @@ menu_t OPTIONS_MainDef = { OPTIONS_Main, 0, 0, SKINCOLOR_SLATE, 0, + NULL, 2, 5, M_DrawOptions, M_OptionsTick, diff --git a/src/menus/options-data-1.c b/src/menus/options-data-1.c index a4bd7b685..8d2b8ef56 100644 --- a/src/menus/options-data-1.c +++ b/src/menus/options-data-1.c @@ -36,6 +36,7 @@ menu_t OPTIONS_DataDef = { OPTIONS_Data, 48, 80, SKINCOLOR_BLUEBERRY, 0, + NULL, 2, 5, M_DrawGenericOptions, M_OptionsTick, diff --git a/src/menus/options-data-addons.c b/src/menus/options-data-addons.c index 1af384e97..ddc6483e7 100644 --- a/src/menus/options-data-addons.c +++ b/src/menus/options-data-addons.c @@ -43,6 +43,7 @@ menu_t OPTIONS_DataAddonDef = { OPTIONS_DataAddon, 48, 80, SKINCOLOR_BLUEBERRY, 0, + NULL, 2, 5, M_DrawGenericOptions, M_OptionsTick, diff --git a/src/menus/options-data-discord.c b/src/menus/options-data-discord.c index 6ee635d4b..5e5518c51 100644 --- a/src/menus/options-data-discord.c +++ b/src/menus/options-data-discord.c @@ -33,6 +33,7 @@ menu_t OPTIONS_DataDiscordDef = { OPTIONS_DataDiscord, 48, 80, SKINCOLOR_BLUEBERRY, 0, + NULL, 2, 5, M_DrawGenericOptions, M_OptionsTick, diff --git a/src/menus/options-data-erase-1.c b/src/menus/options-data-erase-1.c index a27e1f559..f40e106c6 100644 --- a/src/menus/options-data-erase-1.c +++ b/src/menus/options-data-erase-1.c @@ -35,7 +35,8 @@ menu_t OPTIONS_DataEraseDef = { 0, OPTIONS_DataErase, 48, 80, - SKINCOLOR_BLUEBERRY, 0, + SKINCOLOR_BLACK, 0, + "SHWDN2", // Danger. 2, 5, M_DrawGenericOptions, M_OptionsTick, diff --git a/src/menus/options-data-erase-profile.c b/src/menus/options-data-erase-profile.c index 69afc1d20..378a3471d 100644 --- a/src/menus/options-data-erase-profile.c +++ b/src/menus/options-data-erase-profile.c @@ -16,7 +16,8 @@ menu_t OPTIONS_DataProfileEraseDef = { 0, OPTIONS_DataProfileErase, 48, 80, - SKINCOLOR_BLUEBERRY, 0, + SKINCOLOR_BLACK, 0, + "SHWDN2", // Danger. 2, 5, M_DrawProfileErase, M_OptionsTick, diff --git a/src/menus/options-data-replays.c b/src/menus/options-data-replays.c index 507f1c8ea..30bf09c23 100644 --- a/src/menus/options-data-replays.c +++ b/src/menus/options-data-replays.c @@ -19,6 +19,7 @@ menu_t OPTIONS_DataReplayDef = { OPTIONS_DataReplay, 48, 80, SKINCOLOR_BLUEBERRY, 0, + NULL, 2, 5, M_DrawGenericOptions, M_OptionsTick, diff --git a/src/menus/options-data-screenshots.c b/src/menus/options-data-screenshots.c index dcd50f99d..8f27953f9 100644 --- a/src/menus/options-data-screenshots.c +++ b/src/menus/options-data-screenshots.c @@ -37,6 +37,7 @@ menu_t OPTIONS_DataScreenshotDef = { OPTIONS_DataScreenshot, 48, 80, SKINCOLOR_BLUEBERRY, 0, + NULL, 2, 5, M_DrawGenericOptions, M_OptionsTick, diff --git a/src/menus/options-gameplay-1.c b/src/menus/options-gameplay-1.c index 75606e4bd..fc528258b 100644 --- a/src/menus/options-gameplay-1.c +++ b/src/menus/options-gameplay-1.c @@ -51,6 +51,7 @@ menu_t OPTIONS_GameplayDef = { OPTIONS_Gameplay, 48, 80, SKINCOLOR_SCARLET, 0, + NULL, 2, 5, M_DrawGenericOptions, M_OptionsTick, diff --git a/src/menus/options-gameplay-item-toggles.c b/src/menus/options-gameplay-item-toggles.c index 4c6e76080..c64e2b4ab 100644 --- a/src/menus/options-gameplay-item-toggles.c +++ b/src/menus/options-gameplay-item-toggles.c @@ -54,6 +54,7 @@ menu_t OPTIONS_GameplayItemsDef = { OPTIONS_GameplayItems, 14, 40, SKINCOLOR_SCARLET, 0, + NULL, 2, 5, M_DrawItemToggles, M_OptionsTick, diff --git a/src/menus/options-hud-1.c b/src/menus/options-hud-1.c index 2948cd2fe..33f660657 100644 --- a/src/menus/options-hud-1.c +++ b/src/menus/options-hud-1.c @@ -48,6 +48,7 @@ menu_t OPTIONS_HUDDef = { OPTIONS_HUD, 48, 80, SKINCOLOR_SUNSLAM, 0, + NULL, 2, 5, M_DrawGenericOptions, M_OptionsTick, diff --git a/src/menus/options-hud-online.c b/src/menus/options-hud-online.c index 3159cc302..3a731883d 100644 --- a/src/menus/options-hud-online.c +++ b/src/menus/options-hud-online.c @@ -45,6 +45,7 @@ menu_t OPTIONS_HUDOnlineDef = { OPTIONS_HUDOnline, 48, 80, SKINCOLOR_SUNSLAM, 0, + NULL, 2, 5, M_DrawGenericOptions, M_OptionsTick, diff --git a/src/menus/options-profiles-1.c b/src/menus/options-profiles-1.c index 1137263f3..c4ca13561 100644 --- a/src/menus/options-profiles-1.c +++ b/src/menus/options-profiles-1.c @@ -17,6 +17,7 @@ menu_t OPTIONS_ProfilesDef = { OPTIONS_Profiles, 32, 80, SKINCOLOR_ULTRAMARINE, 0, + NULL, 2, 5, M_DrawProfileSelect, M_OptionsTick, diff --git a/src/menus/options-profiles-edit-1.c b/src/menus/options-profiles-edit-1.c index 061acbf6a..99caa532d 100644 --- a/src/menus/options-profiles-edit-1.c +++ b/src/menus/options-profiles-edit-1.c @@ -29,6 +29,7 @@ menu_t OPTIONS_EditProfileDef = { OPTIONS_EditProfile, 32, 80, SKINCOLOR_ULTRAMARINE, 0, + NULL, 2, 5, M_DrawEditProfile, M_HandleProfileEdit, diff --git a/src/menus/options-profiles-edit-controls.c b/src/menus/options-profiles-edit-controls.c index d1ac713f2..f2c19ac1d 100644 --- a/src/menus/options-profiles-edit-controls.c +++ b/src/menus/options-profiles-edit-controls.c @@ -103,6 +103,7 @@ menu_t OPTIONS_ProfileControlsDef = { OPTIONS_ProfileControls, 32, 80, SKINCOLOR_ULTRAMARINE, 0, + NULL, 3, 5, M_DrawProfileControls, M_HandleProfileControls, diff --git a/src/menus/options-server-1.c b/src/menus/options-server-1.c index 401a6964b..4e793d3b5 100644 --- a/src/menus/options-server-1.c +++ b/src/menus/options-server-1.c @@ -55,6 +55,7 @@ menu_t OPTIONS_ServerDef = { OPTIONS_Server, 48, 70, // This menu here is slightly higher because there's a lot of options... SKINCOLOR_VIOLET, 0, + NULL, 2, 5, M_DrawGenericOptions, M_OptionsTick, diff --git a/src/menus/options-server-advanced.c b/src/menus/options-server-advanced.c index f8434dd62..55fca8043 100644 --- a/src/menus/options-server-advanced.c +++ b/src/menus/options-server-advanced.c @@ -53,6 +53,7 @@ menu_t OPTIONS_ServerAdvancedDef = { OPTIONS_ServerAdvanced, 48, 70, // This menu here is slightly higher because there's a lot of options... SKINCOLOR_VIOLET, 0, + NULL, 2, 5, M_DrawGenericOptions, M_OptionsTick, diff --git a/src/menus/options-sound.c b/src/menus/options-sound.c index 636dd0f0a..027c8448f 100644 --- a/src/menus/options-sound.c +++ b/src/menus/options-sound.c @@ -57,6 +57,7 @@ menu_t OPTIONS_SoundDef = { OPTIONS_Sound, 48, 80, SKINCOLOR_THUNDER, 0, + NULL, 2, 5, M_DrawGenericOptions, M_OptionsTick, diff --git a/src/menus/options-video-1.c b/src/menus/options-video-1.c index 3341ae2ad..4447531cf 100644 --- a/src/menus/options-video-1.c +++ b/src/menus/options-video-1.c @@ -59,6 +59,7 @@ menu_t OPTIONS_VideoDef = { OPTIONS_Video, 32, 80, SKINCOLOR_PLAGUE, 0, + NULL, 2, 5, M_DrawGenericOptions, M_OptionsTick, diff --git a/src/menus/options-video-gl.c b/src/menus/options-video-gl.c index 92a30f733..2fabeaccc 100644 --- a/src/menus/options-video-gl.c +++ b/src/menus/options-video-gl.c @@ -51,6 +51,7 @@ menu_t OPTIONS_VideoOGLDef = { OPTIONS_VideoOGL, 32, 80, SKINCOLOR_PLAGUE, 0, + NULL, 2, 5, M_DrawGenericOptions, M_OptionsTick, diff --git a/src/menus/options-video-modes.c b/src/menus/options-video-modes.c index 85f2cd70b..872e23384 100644 --- a/src/menus/options-video-modes.c +++ b/src/menus/options-video-modes.c @@ -19,6 +19,7 @@ menu_t OPTIONS_VideoModesDef = { OPTIONS_VideoModes, 48, 80, SKINCOLOR_PLAGUE, 0, + NULL, 2, 5, M_DrawVideoModes, M_OptionsTick, diff --git a/src/menus/play-char-select.c b/src/menus/play-char-select.c index 1116dfa06..0fd67dc45 100644 --- a/src/menus/play-char-select.c +++ b/src/menus/play-char-select.c @@ -17,6 +17,7 @@ menu_t PLAY_CharSelectDef = { PLAY_CharSelect, 0, 0, 0, 0, + NULL, 0, 0, M_DrawCharacterSelect, M_CharacterSelectTick, diff --git a/src/menus/play-local-race-difficulty.c b/src/menus/play-local-race-difficulty.c index 49dec06cb..3199f6910 100644 --- a/src/menus/play-local-race-difficulty.c +++ b/src/menus/play-local-race-difficulty.c @@ -39,6 +39,7 @@ menu_t PLAY_RaceDifficultyDef = { PLAY_RaceDifficulty, 0, 0, 0, 0, + NULL, 1, 5, M_DrawRaceDifficulty, NULL, diff --git a/src/menus/play-local-race-time-attack.c b/src/menus/play-local-race-time-attack.c index cc0985f60..244b720b2 100644 --- a/src/menus/play-local-race-time-attack.c +++ b/src/menus/play-local-race-time-attack.c @@ -27,6 +27,7 @@ menu_t PLAY_TimeAttackDef = { PLAY_TimeAttack, 0, 0, 0, 0, + NULL, 2, 5, M_DrawTimeAttack, NULL, @@ -68,6 +69,7 @@ menu_t PLAY_TAReplayDef = { PLAY_TAReplay, 0, 0, 0, 0, + NULL, 2, 5, M_DrawTimeAttack, NULL, @@ -111,6 +113,7 @@ menu_t PLAY_TAReplayGuestDef = { PLAY_TAReplayGuest, 0, 0, 0, 0, + NULL, 2, 5, M_DrawTimeAttack, NULL, @@ -149,6 +152,7 @@ menu_t PLAY_TAGhostsDef = { PLAY_TAGhosts, 0, 0, 0, 0, + NULL, 2, 5, M_DrawTimeAttack, NULL, diff --git a/src/menus/play-online-1.c b/src/menus/play-online-1.c index 8146cacc3..177cc3dfc 100644 --- a/src/menus/play-online-1.c +++ b/src/menus/play-online-1.c @@ -23,6 +23,7 @@ menu_t PLAY_MP_OptSelectDef = { PLAY_MP_OptSelect, 0, 0, 0, 0, + "NETMD2", -1, 1, M_DrawMPOptSelect, M_MPOptSelectTick, diff --git a/src/menus/play-online-host.c b/src/menus/play-online-host.c index 8e6a2bdd8..319cda9e3 100644 --- a/src/menus/play-online-host.c +++ b/src/menus/play-online-host.c @@ -33,6 +33,7 @@ menu_t PLAY_MP_HostDef = { PLAY_MP_Host, 0, 0, 0, 0, + "NETMD2", -1, 1, // 1 frame transition.... This is really just because I don't want the black fade when we press esc, hehe M_DrawMPHost, M_MPOptSelectTick, // This handles the unfolding options diff --git a/src/menus/play-online-join-ip.c b/src/menus/play-online-join-ip.c index ee084e2e6..bd72a1ffb 100644 --- a/src/menus/play-online-join-ip.c +++ b/src/menus/play-online-join-ip.c @@ -38,6 +38,7 @@ menu_t PLAY_MP_JoinIPDef = { PLAY_MP_JoinIP, 0, 0, 0, 0, + "NETMD2", -1, 1, // 1 frame transition.... This is really just because I don't want the black fade when we press esc, hehe M_DrawMPJoinIP, M_MPOptSelectTick, // This handles the unfolding options diff --git a/src/menus/play-online-room-select.c b/src/menus/play-online-room-select.c index d9f0fdd49..349421d94 100644 --- a/src/menus/play-online-room-select.c +++ b/src/menus/play-online-room-select.c @@ -16,6 +16,7 @@ menu_t PLAY_MP_RoomSelectDef = { PLAY_MP_RoomSelect, 0, 0, 0, 0, + "NETMD2", 0, 0, M_DrawMPRoomSelect, M_MPRoomSelectTick, diff --git a/src/menus/play-online-server-browser.c b/src/menus/play-online-server-browser.c index 5aebbd771..393a2ae28 100644 --- a/src/menus/play-online-server-browser.c +++ b/src/menus/play-online-server-browser.c @@ -29,6 +29,7 @@ menu_t PLAY_MP_ServerBrowserDef = { PLAY_MP_ServerBrowser, 32, 36, 0, 0, + "NETMD2", 0, 0, M_DrawMPServerBrowser, M_MPServerBrowserTick, diff --git a/src/menus/transient/cup-select.c b/src/menus/transient/cup-select.c index 7c325a8b2..6484d45f5 100644 --- a/src/menus/transient/cup-select.c +++ b/src/menus/transient/cup-select.c @@ -20,6 +20,7 @@ menu_t PLAY_CupSelectDef = { PLAY_CupSelect, 0, 0, 0, 0, + NULL, 2, 5, M_DrawCupSelect, M_CupSelectTick, diff --git a/src/menus/transient/level-select.c b/src/menus/transient/level-select.c index 1a123b8c1..3ccbd7a7e 100644 --- a/src/menus/transient/level-select.c +++ b/src/menus/transient/level-select.c @@ -21,6 +21,7 @@ menu_t PLAY_LevelSelectDef = { PLAY_LevelSelect, 0, 0, 0, 0, + NULL, 2, 5, M_DrawLevelSelect, M_LevelSelectTick, diff --git a/src/menus/transient/pause-game.c b/src/menus/transient/pause-game.c index 5619a739e..18b19c169 100644 --- a/src/menus/transient/pause-game.c +++ b/src/menus/transient/pause-game.c @@ -63,6 +63,7 @@ menu_t PAUSE_MainDef = { PAUSE_Main, 0, 0, 0, 0, + NULL, 1, 10, // For transition with some menus! M_DrawPause, M_PauseTick, diff --git a/src/menus/transient/pause-replay.c b/src/menus/transient/pause-replay.c index 380700daf..037889f4f 100644 --- a/src/menus/transient/pause-replay.c +++ b/src/menus/transient/pause-replay.c @@ -39,6 +39,7 @@ menu_t PAUSE_PlaybackMenuDef = { PAUSE_PlaybackMenu, BASEVIDWIDTH/2 - 88, 2, 0, 0, + NULL, 0, 0, M_DrawPlaybackMenu, M_PlaybackTick,