- allow specifying a .def file in GAMEINFO.

This will be loaded on top of the regular .def files and not replace them.
This commit is contained in:
Christoph Oelckers 2021-04-17 23:52:45 +02:00
parent 3906d5cfb0
commit 27ca71a6ec
3 changed files with 11 additions and 0 deletions

View file

@ -10,6 +10,7 @@ struct FStartupInfo
uint32_t BkColor; // Background color for title banner uint32_t BkColor; // Background color for title banner
FString Song; FString Song;
FString con; FString con;
FString def;
int Type; int Type;
int LoadLights = -1; int LoadLights = -1;
int LoadBrightmaps = -1; int LoadBrightmaps = -1;

View file

@ -1357,6 +1357,11 @@ void LoadDefinitions()
if (!loaddefinitionsfile(defsfile, true, false)) loaded = defsfile; if (!loaddefinitionsfile(defsfile, true, false)) loaded = defsfile;
} }
} }
if (GameStartupInfo.def.IsNotEmpty())
{
loaddefinitionsfile(GameStartupInfo.def, false); // Stuff from gameinfo.
}
if (loaded) if (loaded)
{ {

View file

@ -127,6 +127,11 @@ static TArray<FString> ParseGameInfo(TArray<FString>& pwads, const char* fn, con
sc.MustGetString(); sc.MustGetString();
GameStartupInfo.con = sc.String;; GameStartupInfo.con = sc.String;;
} }
else if (!nextKey.CompareNoCase("DEF"))
{
sc.MustGetString();
GameStartupInfo.def = sc.String;;
}
else else
{ {
// Silently ignore unknown properties // Silently ignore unknown properties