From 1f1b927b6bcd15b80140b62c68929b5e363f6275 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 28 Nov 2019 20:11:27 +0100 Subject: [PATCH] - fixed a few issues. --- source/common/menu/menudef.cpp | 2 +- source/common/utility/stringtable.cpp | 18 ++++++++++-------- source/duke3d/src/screentext.cpp | 2 ++ source/rr/src/screentext.cpp | 4 +++- wadsrc/static/demolition/menudef.txt | 10 ++++++---- 5 files changed, 22 insertions(+), 14 deletions(-) diff --git a/source/common/menu/menudef.cpp b/source/common/menu/menudef.cpp index eef422731..f25db2439 100644 --- a/source/common/menu/menudef.cpp +++ b/source/common/menu/menudef.cpp @@ -1042,7 +1042,7 @@ void M_ParseMenuDefs() { ParseListMenu(sc); } - if (sc.Compare("ImageScroller")) + else if (sc.Compare("ImageScroller")) { ParseImageScroller(sc); } diff --git a/source/common/utility/stringtable.cpp b/source/common/utility/stringtable.cpp index 0307b26ac..5f5b9809f 100644 --- a/source/common/utility/stringtable.cpp +++ b/source/common/utility/stringtable.cpp @@ -244,18 +244,20 @@ bool FStringTable::ParseLanguageCSV(int lumpnum, const TArray &buffer) if (filtercol > -1) { auto filterstr = row[filtercol]; - auto filter = filterstr.Split(" ", FString::TOK_SKIPEMPTY); - bool ok = false; - for (auto &entry : filter) + if (filterstr.IsNotEmpty()) { - if (validFilter(entry)) + auto filter = filterstr.Split(" ", FString::TOK_SKIPEMPTY); + bool ok = false; + for (auto& entry : filter) { - ok = true; - break; + if (validFilter(entry)) + { + ok = true; + break; + } } + if (!ok) continue; } - if (!ok) continue; - continue; } #endif diff --git a/source/duke3d/src/screentext.cpp b/source/duke3d/src/screentext.cpp index 9329c52e3..183479a9c 100644 --- a/source/duke3d/src/screentext.cpp +++ b/source/duke3d/src/screentext.cpp @@ -26,6 +26,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "compat.h" #include "sbar.h" #include "menus.h" +#include "gstrings.h" BEGIN_DUKE_NS @@ -468,6 +469,7 @@ vec2_t G_ScreenText(const int32_t font, int32_t xspace, int32_t yline, int32_t xbetween, int32_t ybetween, const int32_t f, const int32_t x1, const int32_t y1, const int32_t x2, const int32_t y2) { + if (*str == '$') str = GStrings(str + 1); vec2_t size = { 0, 0, }; // eventually the return value vec2_t origin = { 0, 0, }; // where to start, depending on the alignment vec2_t pos = { 0, 0, }; // holds the coordinate position as we draw each character tile of the string diff --git a/source/rr/src/screentext.cpp b/source/rr/src/screentext.cpp index a16907825..75b1b2d1a 100644 --- a/source/rr/src/screentext.cpp +++ b/source/rr/src/screentext.cpp @@ -25,6 +25,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "compat.h" #include "sbar.h" #include "menus.h" +#include "gstrings.h" BEGIN_RR_NS @@ -467,7 +468,8 @@ vec2_t G_ScreenText(const int32_t font, int32_t xspace, int32_t yline, int32_t xbetween, int32_t ybetween, const int32_t f, const int32_t x1, const int32_t y1, const int32_t x2, const int32_t y2) { - vec2_t size = { 0, 0, }; // eventually the return value + if (*str == '$') str = GStrings(str + 1); + vec2_t size = { 0, 0, }; // eventually the return value vec2_t origin = { 0, 0, }; // where to start, depending on the alignment vec2_t pos = { 0, 0, }; // holds the coordinate position as we draw each character tile of the string vec2_t extent = { 0, 0, }; // holds the x-width of each character and the greatest y-height of each line diff --git a/wadsrc/static/demolition/menudef.txt b/wadsrc/static/demolition/menudef.txt index d8f9c80eb..c5f414ac4 100644 --- a/wadsrc/static/demolition/menudef.txt +++ b/wadsrc/static/demolition/menudef.txt @@ -22,11 +22,11 @@ LISTMENU "MainMenu" } ifgame(Duke, Nam, WW2GI, Fury) { - class "Duke.ListMenu" + class "Duke.MainMenu" } else { - class "Redneck.ListMenu" + class "Redneck.MainMenu" } NativeTextItem "$MNU_NEWGAME", "n", "EpisodeMenu" //NativeTextItem "$MNU_NEWGAME", "m", "MultiMenu" // In EDuke this replaces "New Game" when in networking mode. Kept here as a reminder (I'm not going to support EDuke's C/S implementation) @@ -88,11 +88,11 @@ LISTMENU "IngameMenu" } ifgame(Duke, Nam, WW2GI, Fury) { - class "Duke.ListMenu" + class "Duke.MainMenu" } else { - class "Redneck.ListMenu" + class "Redneck.MainMenu" } NativeTextItem "$MNU_NEWGAME", "n", "EpisodeMenu" NativeTextItem "$MNU_SAVEGAME", "s", "SaveGameMenu" @@ -361,6 +361,7 @@ LISTMENU "MultiMenu" // // //------------------------------------------------------------------------------------------- +/* ImageScroller "HelpMenu" { @@ -458,3 +459,4 @@ ImageScroller "CreditsMenu" } } +*/ \ No newline at end of file