From 0fc439a96913d2cbb8cdccf5bd96f099e3c81dde Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 30 Nov 2019 23:59:22 +0100 Subject: [PATCH] - fixed Redneck Rampage ingame menu and added selection validation to the load menu. --- source/common/menu/loadsavemenu.cpp | 1 + source/rr/src/d_menu.cpp | 1 + wadsrc/static/demolition/menudef.txt | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/source/common/menu/loadsavemenu.cpp b/source/common/menu/loadsavemenu.cpp index 4e7ba7291..3c59597b5 100644 --- a/source/common/menu/loadsavemenu.cpp +++ b/source/common/menu/loadsavemenu.cpp @@ -165,6 +165,7 @@ protected: if (savegameManager.SavegameCount() > 0) { + if (Selected > savegameManager.SavegameCount()) Selected = 0; FString text = (Selected == -1 || !savegameManager.GetSavegame(Selected)->bOldVersion) ? GStrings("MNU_NOPICTURE") : GStrings("MNU_DIFFVERSION"); int textlen = NewSmallFont->StringWidth(text) * CleanXfac; diff --git a/source/rr/src/d_menu.cpp b/source/rr/src/d_menu.cpp index 6800fefe1..974c3d8f7 100644 --- a/source/rr/src/d_menu.cpp +++ b/source/rr/src/d_menu.cpp @@ -151,6 +151,7 @@ static void Menu_DrawTopBar(const DVector2 &origin) static void Menu_DrawTopBarCaption(const char* caption, const DVector2& origin) { static char t[64]; + if (*caption == '$') caption = GStrings(caption + 1); size_t const srclen = strlen(caption); size_t const dstlen = min(srclen, ARRAY_SIZE(t) - 1); memcpy(t, caption, dstlen); diff --git a/wadsrc/static/demolition/menudef.txt b/wadsrc/static/demolition/menudef.txt index a369d6835..ad6dabc68 100644 --- a/wadsrc/static/demolition/menudef.txt +++ b/wadsrc/static/demolition/menudef.txt @@ -74,7 +74,7 @@ LISTMENU "MainMenu" LISTMENU "IngameMenu" { ScriptId 50 - ifgame(Duke, Nam, WW2GI, Fury) + ifgame(Duke, Nam, WW2GI, Fury, Redneck, RedneckRides) { ifgame(fury) { @@ -121,7 +121,7 @@ LISTMENU "IngameMenu" NativeTextItem "$MNU_LOADGAME", "l", "LoadGameMenu" NativeTextItem "$MNU_SAVEGAME", "s", "SaveGameMenu" NativeTextItem "$MNU_OPTIONS", "o", "OptionsMenu" - NativeTextItem "$MNU_COOLSTUFF", "h", "HelpMenu" + NativeTextItem "$MNU_CREDITS", "c", "CreditsMenu" NativeTextItem "$MNU_QUITGAME", "q", "QuitMenu" } }