- add the following command line parameters:

- -noextras: disable loading of any extras (lights, brightmaps, widescreen)
- -nolights: disable loading of lights
- -nobrightmaps: disable loading of brightmaps
- -nowidescreen: disable loading of included widescreen assets
This commit is contained in:
Rachael Alexanderson 2022-11-08 00:11:46 -05:00
parent d422737a7e
commit c860e2d732

View file

@ -1968,21 +1968,21 @@ static void AddAutoloadFiles(const char *autoname, TArray<FString>& allwads)
LumpFilterIWAD.Format("%s.", autoname); // The '.' is appened to simplify parsing the string LumpFilterIWAD.Format("%s.", autoname); // The '.' is appened to simplify parsing the string
// [SP] Dialog reaction - load lights.pk3 and brightmaps.pk3 based on user choices // [SP] Dialog reaction - load lights.pk3 and brightmaps.pk3 based on user choices
if (!(gameinfo.flags & GI_SHAREWARE)) if (!(gameinfo.flags & GI_SHAREWARE) && !(Args->CheckParm("-noextras")))
{ {
if (GameStartupInfo.LoadLights == 1 || (GameStartupInfo.LoadLights != 0 && autoloadlights)) if ((GameStartupInfo.LoadLights == 1 || (GameStartupInfo.LoadLights != 0 && autoloadlights)) && !(Args->CheckParm("-nolights")))
{ {
const char *lightswad = BaseFileSearch ("lights.pk3", NULL, true, GameConfig); const char *lightswad = BaseFileSearch ("lights.pk3", NULL, true, GameConfig);
if (lightswad) if (lightswad)
D_AddFile (allwads, lightswad, true, -1, GameConfig); D_AddFile (allwads, lightswad, true, -1, GameConfig);
} }
if (GameStartupInfo.LoadBrightmaps == 1 || (GameStartupInfo.LoadBrightmaps != 0 && autoloadbrightmaps)) if ((GameStartupInfo.LoadBrightmaps == 1 || (GameStartupInfo.LoadBrightmaps != 0 && autoloadbrightmaps)) && !(Args->CheckParm("-nobrightmaps")))
{ {
const char *bmwad = BaseFileSearch ("brightmaps.pk3", NULL, true, GameConfig); const char *bmwad = BaseFileSearch ("brightmaps.pk3", NULL, true, GameConfig);
if (bmwad) if (bmwad)
D_AddFile (allwads, bmwad, true, -1, GameConfig); D_AddFile (allwads, bmwad, true, -1, GameConfig);
} }
if (GameStartupInfo.LoadWidescreen == 1 || (GameStartupInfo.LoadWidescreen != 0 && autoloadwidescreen)) if ((GameStartupInfo.LoadWidescreen == 1 || (GameStartupInfo.LoadWidescreen != 0 && autoloadwidescreen)) && !(Args->CheckParm("-nowidescreen")))
{ {
const char *wswad = BaseFileSearch ("game_widescreen_gfx.pk3", NULL, true, GameConfig); const char *wswad = BaseFileSearch ("game_widescreen_gfx.pk3", NULL, true, GameConfig);
if (wswad) if (wswad)