From fba5c7884d59eafd96bd416dd3814a1756237b5d Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Wed, 3 Nov 2021 18:41:33 -0400 Subject: [PATCH] - add `LoadBrightmaps`, `LoadLights`, and `LoadWidescreen` directives for `IWADINFO` - these function exactly the same as their `GAMEINFO` equivalents. --- src/d_iwad.cpp | 24 ++++++++++++++++++++++++ src/d_main.h | 3 +++ 2 files changed, 27 insertions(+) diff --git a/src/d_iwad.cpp b/src/d_iwad.cpp index 567c7df454..b1b0e88de0 100644 --- a/src/d_iwad.cpp +++ b/src/d_iwad.cpp @@ -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 &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(); diff --git a/src/d_main.h b/src/d_main.h index e2159af641..ba614b2bb9 100644 --- a/src/d_main.h +++ b/src/d_main.h @@ -90,6 +90,9 @@ struct FIWADInfo TArray Lumps; // Lump names for identification TArray DeleteLumps; // Lumps which must be deleted from the directory. int flags = 0; + int LoadWidescreen = -1; + int LoadBrightmaps = -1; + int LoadLights = -1; }; struct FFoundWadInfo