adapted string table so that it can be initialized without full game data being available.

This is for the IWAD picker which runs before many things are known.
This commit is contained in:
Christoph Oelckers 2024-01-09 17:22:59 +01:00
commit f7a4f00177
6 changed files with 24 additions and 15 deletions

View file

@ -2641,7 +2641,7 @@ int StrTable_GetGender()
bool StrTable_ValidFilter(const char* str)
{
if (gameinfo.gametype == GAME_Strife && (gameinfo.flags & GI_SHAREWARE) && !stricmp(str, "strifeteaser")) return true;
return stricmp(str, GameNames[gameinfo.gametype]) == 0;
return gameinfo.gametype == 0 || stricmp(str, GameNames[gameinfo.gametype]) == 0;
}
bool System_WantGuiCapture()
@ -3238,8 +3238,8 @@ static int D_InitGame(const FIWADInfo* iwad_info, std::vector<std::string>& allw
exec = NULL;
}
// [RH] Initialize localizable strings.
GStrings.LoadStrings (language);
// [RH] Initialize localizable strings.
GStrings.LoadStrings(fileSystem, language);
V_InitFontColors ();