- fixed a few issues.

This commit is contained in:
Christoph Oelckers 2019-11-28 20:11:27 +01:00
parent 59ebb10512
commit 1f1b927b6b
5 changed files with 22 additions and 14 deletions

View file

@ -1042,7 +1042,7 @@ void M_ParseMenuDefs()
{ {
ParseListMenu(sc); ParseListMenu(sc);
} }
if (sc.Compare("ImageScroller")) else if (sc.Compare("ImageScroller"))
{ {
ParseImageScroller(sc); ParseImageScroller(sc);
} }

View file

@ -244,18 +244,20 @@ bool FStringTable::ParseLanguageCSV(int lumpnum, const TArray<uint8_t> &buffer)
if (filtercol > -1) if (filtercol > -1)
{ {
auto filterstr = row[filtercol]; auto filterstr = row[filtercol];
auto filter = filterstr.Split(" ", FString::TOK_SKIPEMPTY); if (filterstr.IsNotEmpty())
bool ok = false;
for (auto &entry : filter)
{ {
if (validFilter(entry)) auto filter = filterstr.Split(" ", FString::TOK_SKIPEMPTY);
bool ok = false;
for (auto& entry : filter)
{ {
ok = true; if (validFilter(entry))
break; {
ok = true;
break;
}
} }
if (!ok) continue;
} }
if (!ok) continue;
continue;
} }
#endif #endif

View file

@ -26,6 +26,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "compat.h" #include "compat.h"
#include "sbar.h" #include "sbar.h"
#include "menus.h" #include "menus.h"
#include "gstrings.h"
BEGIN_DUKE_NS 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, 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) 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 size = { 0, 0, }; // eventually the return value
vec2_t origin = { 0, 0, }; // where to start, depending on the alignment 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 pos = { 0, 0, }; // holds the coordinate position as we draw each character tile of the string

View file

@ -25,6 +25,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "compat.h" #include "compat.h"
#include "sbar.h" #include "sbar.h"
#include "menus.h" #include "menus.h"
#include "gstrings.h"
BEGIN_RR_NS 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, 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) 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 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 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 vec2_t extent = { 0, 0, }; // holds the x-width of each character and the greatest y-height of each line

View file

@ -22,11 +22,11 @@ LISTMENU "MainMenu"
} }
ifgame(Duke, Nam, WW2GI, Fury) ifgame(Duke, Nam, WW2GI, Fury)
{ {
class "Duke.ListMenu" class "Duke.MainMenu"
} }
else else
{ {
class "Redneck.ListMenu" class "Redneck.MainMenu"
} }
NativeTextItem "$MNU_NEWGAME", "n", "EpisodeMenu" 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) //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) ifgame(Duke, Nam, WW2GI, Fury)
{ {
class "Duke.ListMenu" class "Duke.MainMenu"
} }
else else
{ {
class "Redneck.ListMenu" class "Redneck.MainMenu"
} }
NativeTextItem "$MNU_NEWGAME", "n", "EpisodeMenu" NativeTextItem "$MNU_NEWGAME", "n", "EpisodeMenu"
NativeTextItem "$MNU_SAVEGAME", "s", "SaveGameMenu" NativeTextItem "$MNU_SAVEGAME", "s", "SaveGameMenu"
@ -361,6 +361,7 @@ LISTMENU "MultiMenu"
// //
// //
//------------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------------
/*
ImageScroller "HelpMenu" ImageScroller "HelpMenu"
{ {
@ -458,3 +459,4 @@ ImageScroller "CreditsMenu"
} }
} }
*/