- 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

@ -1358,6 +1358,11 @@ void LoadDefinitions()
}
}
if (GameStartupInfo.def.IsNotEmpty())
{
loaddefinitionsfile(GameStartupInfo.def, false); // Stuff from gameinfo.
}
if (loaded)
{
deftimer.Unclock();

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