From 2022de845a93f5a9898a09501f109b29e6c80004 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 24 Jan 2022 01:00:05 +0100 Subject: [PATCH] - did some reshuffling on Exhumed's menu. To allow adding a "User map" item and prevent accidental reset of ongoing games, both the items for starting the campaign and the training map are now in a submenu. This allows the game to go through the regular startup procedure common to all games, which in turn allows adding the "User map" item to the episode selection. --- source/core/gamecontrol.cpp | 5 +++++ source/core/menu/razemenu.cpp | 7 ------- source/core/namedef_custom.h | 1 - wadsrc/static/menudef.txt | 21 +++++++++++++++++---- 4 files changed, 22 insertions(+), 12 deletions(-) diff --git a/source/core/gamecontrol.cpp b/source/core/gamecontrol.cpp index e3a9917a0..8af6f6452 100644 --- a/source/core/gamecontrol.cpp +++ b/source/core/gamecontrol.cpp @@ -635,6 +635,11 @@ void SetDefaultStrings() gSkillNames[3] = "$WELL DONE"; gSkillNames[4] = "$EXTRA CRISPY"; } + // Exhumed has no skills, but we still need a menu with one entry. + else if (isExhumed()) + { + gSkillNames[0] = "Default"; + } //Set a few quotes which are used for common handling of a few status messages quoteMgr.InitializeQuote(23, "$MESSAGES: ON"); diff --git a/source/core/menu/razemenu.cpp b/source/core/menu/razemenu.cpp index b8fbbb118..d99a82642 100644 --- a/source/core/menu/razemenu.cpp +++ b/source/core/menu/razemenu.cpp @@ -150,14 +150,7 @@ bool M_SetSpecialMenu(FName& menu, int param) return true; case NAME_Startgame: - case NAME_StartgameNoSkill: NewGameStartupInfo.Skill = param; - if (menu == NAME_StartgameNoSkill) - { - menu = NAME_Startgame; - NewGameStartupInfo.Episode = param; - NewGameStartupInfo.Skill = 1; - } if (DoStartGame(NewGameStartupInfo)) { M_ClearMenus(); diff --git a/source/core/namedef_custom.h b/source/core/namedef_custom.h index 238fc8ff8..116d76851 100644 --- a/source/core/namedef_custom.h +++ b/source/core/namedef_custom.h @@ -2,7 +2,6 @@ xx(IngameMenu) xx(ListMenuItemBloodDripDrawer) -xx(StartgameNoSkill) xx(UsermapMenu) xx(EngineCredits) xx(EngineCredits2) diff --git a/wadsrc/static/menudef.txt b/wadsrc/static/menudef.txt index a2bdd3e54..6c2ee2b2e 100644 --- a/wadsrc/static/menudef.txt +++ b/wadsrc/static/menudef.txt @@ -69,9 +69,9 @@ LISTMENU "MainMenu" linespacing 22 Animated ExhumedPlasma - ExhumedTextItem "$MNU_NEWGAME", "n", "StartGameNoSkill", 0 + ExhumedTextItem "$MNU_NEWGAME", "n", "EpisodeMenu" ExhumedTextItem "$MNU_LOADGAME", "l", "LoadGameMenu" - ExhumedTextItem "$TXT_EX_MAP00", "m", "StartGameNoSkill", 1 + //ExhumedTextItem "$TXT_EX_MAP00", "m", "StartGameNoSkill", 1 ExhumedTextItem "$MNU_OPTIONS", "v", "OptionsMenu" ExhumedTextItem "$MNU_QUITGAME", "q", "QuitMenu" } @@ -143,9 +143,9 @@ LISTMENU "IngameMenu" linespacing 22 Animated ExhumedLogo - ExhumedTextItem "$MNU_NEWGAME", "n", "StartGameNoSkill", 0 + ExhumedTextItem "$MNU_NEWGAME", "n", "EpisodeMenu", 0 ExhumedTextItem "$MNU_LOADGAME", "l", "LoadGameMenu" - ExhumedTextItem "$TXT_EX_MAP00", "m", "StartGameNoSkill", 1 + //ExhumedTextItem "$TXT_EX_MAP00", "m", "StartGameNoSkill", 1 ExhumedTextItem "$MNU_OPTIONS", "v", "OptionsMenu" ExhumedTextItem "$MNU_QUITGAME", "q", "QuitMenu" } @@ -181,6 +181,12 @@ LISTMENU "EpisodeMenu" Position 35, 32 Linespacing 17 } + ifgame(Exhumed) + { + class ExhumedMainMenu + Position 160, 65 + linespacing 22 + } } LISTMENU "SkillMenu" @@ -208,6 +214,13 @@ LISTMENU "SkillMenu" Position 35, 32 Linespacing 17 } + ifgame(Exhumed) + { + class ExhumedMainMenu + Position 160, 65 + linespacing 22 + CaptionItem "$MNU_DIFFICULTY" + } } //-------------------------------------------------------------------------------------------