- 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
FString Song;
FString con;
FString def;
int Type;
int LoadLights = -1;
int LoadBrightmaps = -1;

View File

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

View File

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