From 4c284680ff92a0e5f1894608403c7827bff7a628 Mon Sep 17 00:00:00 2001 From: toaster Date: Thu, 30 Nov 2023 00:11:37 +0000 Subject: [PATCH] Without access to the full game, trying to back out of the Goner Setup/Tutorial will give you a quit prompt instead --- src/menus/main-goner.c | 19 ++++++++++++++++++- src/menus/transient/pause-game.c | 7 +++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/src/menus/main-goner.c b/src/menus/main-goner.c index ad0ffd3d4..d5531d65d 100644 --- a/src/menus/main-goner.c +++ b/src/menus/main-goner.c @@ -27,6 +27,8 @@ menuitem_t MAIN_Goner[] = {.routine = M_GonerTutorial}, 0, 0}, }; +static boolean M_GonerInputs(INT32 ch); + menu_t MAIN_GonerDef = { sizeof (MAIN_Goner) / sizeof (menuitem_t), NULL, @@ -41,7 +43,7 @@ menu_t MAIN_GonerDef = { M_GonerTick, NULL, NULL, - NULL, + M_GonerInputs, }; void M_GonerTick(void) @@ -109,3 +111,18 @@ void M_GonerTutorial(INT32 choice) &M_QuitResponse, MM_YESNO, "I agree", "Cancel"); } } + +static boolean M_GonerInputs(INT32 ch) +{ + const UINT8 pid = 0; + (void)ch; + + if (M_MenuBackPressed(pid)) + { + // No returning to the title screen. + M_QuitSRB2(-1); + return true; + } + + return false; +} diff --git a/src/menus/transient/pause-game.c b/src/menus/transient/pause-game.c index 4afe00d2e..eac5240eb 100644 --- a/src/menus/transient/pause-game.c +++ b/src/menus/transient/pause-game.c @@ -499,5 +499,12 @@ void M_EndGame(INT32 choice) if (!Playing()) return; + if (M_GameTrulyStarted() == false) + { + // No returning to the title screen. + M_QuitSRB2(-1); + return; + } + M_StartMessage("Return to Menu", M_GetText("Are you sure you want to\nreturn to the menu?\n"), &M_ExitGameResponse, MM_YESNO, NULL, NULL); }