- allow specifying startup .con files via GAMEINFO.

This commit is contained in:
Christoph Oelckers 2021-04-13 17:08:04 +02:00
parent 4fe3c50c7c
commit b5dbc3cf29
3 changed files with 5 additions and 5 deletions

View file

@ -9,11 +9,11 @@ struct FStartupInfo
uint32_t FgColor; // Foreground color for title banner uint32_t FgColor; // Foreground color for title banner
uint32_t BkColor; // Background color for title banner uint32_t BkColor; // Background color for title banner
FString Song; FString Song;
FString con;
int Type; int Type;
int LoadLights = -1; int LoadLights = -1;
int LoadBrightmaps = -1; int LoadBrightmaps = -1;
int LoadWidescreen = -1; int LoadWidescreen = -1;
int modern = 0;
enum enum
{ {
DefaultStartup, DefaultStartup,

View file

@ -757,7 +757,7 @@ static TArray<GrpEntry> SetupGame()
if (ugroup.FileInfo.gamefilter.IsNotEmpty()) LumpFilter = ugroup.FileInfo.gamefilter; if (ugroup.FileInfo.gamefilter.IsNotEmpty()) LumpFilter = ugroup.FileInfo.gamefilter;
g_gameType |= ugroup.FileInfo.flags; g_gameType |= ugroup.FileInfo.flags;
} }
if (userConfig.DefaultCon.IsEmpty()) userConfig.DefaultCon = selectedScript; if (userConfig.DefaultCon.IsEmpty()) userConfig.DefaultCon = GameStartupInfo.con.IsNotEmpty()? GameStartupInfo.con : selectedScript;
if (userConfig.DefaultDef.IsEmpty()) userConfig.DefaultDef = selectedDef; if (userConfig.DefaultDef.IsEmpty()) userConfig.DefaultDef = selectedDef;
// This can only happen with a custom game that does not define any filter. // This can only happen with a custom game that does not define any filter.

View file

@ -122,10 +122,10 @@ static TArray<FString> ParseGameInfo(TArray<FString>& pwads, const char* fn, con
sc.MustGetString(); sc.MustGetString();
GameStartupInfo.BkColor = V_GetColor(NULL, sc); GameStartupInfo.BkColor = V_GetColor(NULL, sc);
} }
else if (!nextKey.CompareNoCase("MODERN")) else if (!nextKey.CompareNoCase("CON"))
{ {
sc.MustGetNumber(); sc.MustGetString();
GameStartupInfo.modern = sc.Number ? 1 : -1; GameStartupInfo.con = sc.String;;
} }
else else
{ {