From 5af71c0af24b55c66994aa33c2f0b70ef0441d66 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 25 Aug 2020 21:34:12 +0200 Subject: [PATCH] - Exhumed: Implement "Quit to title". Fixes #252 --- source/exhumed/src/d_menu.cpp | 8 ++++++++ source/exhumed/src/exhumed.h | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/source/exhumed/src/d_menu.cpp b/source/exhumed/src/d_menu.cpp index a03914062..69c328f2c 100644 --- a/source/exhumed/src/d_menu.cpp +++ b/source/exhumed/src/d_menu.cpp @@ -27,6 +27,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "names.h" #include "version.h" #include "raze_sound.h" +#include "gamestate.h" #include "menu/menu.h" // to override the local menu.h @@ -148,6 +149,13 @@ void GameInterface::MenuSound(EMenuSounds snd) } } +void GameInterface::QuitToTitle() +{ + M_StartControlPanel(false); + M_SetMenu(NAME_Mainmenu); + gamestate = GS_MENUSCREEN; +} + void GameInterface::MenuClosed() { diff --git a/source/exhumed/src/exhumed.h b/source/exhumed/src/exhumed.h index f61258190..c54f7a32a 100644 --- a/source/exhumed/src/exhumed.h +++ b/source/exhumed/src/exhumed.h @@ -300,7 +300,8 @@ struct GameInterface : ::GameInterface bool CanSave() override; ReservedSpace GetReservedScreenSpace(int viewsize) override { return { 0, 24 }; } void clearlocalinputstate() override; - + void QuitToTitle(); + FString statFPS() override; ::GameStats getStats() override; };