- add LoadBrightmaps, LoadLights, and LoadWidescreen directives for IWADINFO - these function exactly the same as their GAMEINFO equivalents.

This commit is contained in:
Rachael Alexanderson 2021-11-03 18:41:33 -04:00
parent 8db550d251
commit fba5c7884d
2 changed files with 27 additions and 0 deletions

View file

@ -221,6 +221,24 @@ void FIWadManager::ParseIWadInfo(const char *fn, const char *data, int datasize,
sc.MustGetString();
iwad->Song = sc.String;
}
else if (sc.Compare("LoadLights"))
{
sc.MustGetStringName("=");
sc.MustGetNumber();
iwad->LoadLights = sc.Number;
}
else if (sc.Compare("LoadBrightmaps"))
{
sc.MustGetStringName("=");
sc.MustGetNumber();
iwad->LoadBrightmaps = sc.Number;
}
else if (sc.Compare("LoadWidescreen"))
{
sc.MustGetStringName("=");
sc.MustGetNumber();
iwad->LoadWidescreen = sc.Number;
}
else
{
sc.ScriptError("Unknown keyword '%s'", sc.String);
@ -805,6 +823,12 @@ const FIWADInfo *FIWadManager::FindIWAD(TArray<FString> &wadfiles, const char *i
GameStartupInfo.BkColor = iwad_info->BkColor;
GameStartupInfo.FgColor = iwad_info->FgColor;
}
if (GameStartupInfo.LoadWidescreen == -1)
GameStartupInfo.LoadWidescreen = iwad_info->LoadWidescreen;
if (GameStartupInfo.LoadLights == -1)
GameStartupInfo.LoadLights = iwad_info->LoadLights;
if (GameStartupInfo.LoadBrightmaps == -1)
GameStartupInfo.LoadBrightmaps = iwad_info->LoadBrightmaps;
if (GameStartupInfo.Type == 0) GameStartupInfo.Type = iwad_info->StartupType;
if (GameStartupInfo.Song.IsEmpty()) GameStartupInfo.Song = iwad_info->Song;
I_SetIWADInfo();

View file

@ -90,6 +90,9 @@ struct FIWADInfo
TArray<FString> Lumps; // Lump names for identification
TArray<FString> DeleteLumps; // Lumps which must be deleted from the directory.
int flags = 0;
int LoadWidescreen = -1;
int LoadBrightmaps = -1;
int LoadLights = -1;
};
struct FFoundWadInfo