- add 'loadwidescreen' to gameinfo, works exactly like 'loadbrightmaps' or 'loadlights'

# Conflicts:
#	src/common/engine/startupinfo.h
#	src/d_main.cpp
This commit is contained in:
drfrag 2020-10-31 23:31:14 +01:00
parent e5b63c6693
commit 260ca8f37c
2 changed files with 14 additions and 1 deletions

View file

@ -227,6 +227,7 @@ CUSTOM_CVAR (String, vid_cursor, "None", CVAR_ARCHIVE | CVAR_NOINITCALL)
CVAR (Bool, disableautoload, false, CVAR_ARCHIVE | CVAR_NOINITCALL | CVAR_GLOBALCONFIG)
CVAR (Bool, autoloadbrightmaps, false, CVAR_ARCHIVE | CVAR_NOINITCALL | CVAR_GLOBALCONFIG)
CVAR (Bool, autoloadlights, false, CVAR_ARCHIVE | CVAR_NOINITCALL | CVAR_GLOBALCONFIG)
CVAR (Bool, autoloadwidescreen, true, CVAR_ARCHIVE | CVAR_NOINITCALL | CVAR_GLOBALCONFIG)
CVAR (Bool, r_debug_disable_vis_filter, false, 0)
bool wantToRestart;
@ -2000,6 +2001,11 @@ static FString ParseGameInfo(TArray<FString> &pwads, const char *fn, const char
sc.MustGetNumber();
DoomStartupInfo.LoadBrightmaps = !!sc.Number;
}
else if (!nextKey.CompareNoCase("LOADWIDESCREEN"))
{
sc.MustGetNumber();
DoomStartupInfo.LoadWidescreen = !!sc.Number;
}
else
{
// Silently ignore unknown properties
@ -2161,6 +2167,12 @@ static void AddAutoloadFiles(const char *autoname)
if (bmwad)
D_AddFile (allwads, bmwad);
}
if (DoomStartupInfo.LoadWidescreen == 1 || (DoomStartupInfo.LoadWidescreen != 0 && autoloadwidescreen))
{
const char *wswad = BaseFileSearch ("game_widescreen_gfx.pk3", NULL);
if (wswad)
D_AddFile (allwads, wswad);
}
}
if (!(gameinfo.flags & GI_SHAREWARE) && !Args->CheckParm("-noautoload") && !disableautoload)
@ -3008,7 +3020,7 @@ void D_Cleanup()
// delete DoomStartupInfo data
DoomStartupInfo.Name = "";
DoomStartupInfo.BkColor = DoomStartupInfo.FgColor = DoomStartupInfo.Type = 0;
DoomStartupInfo.LoadLights = DoomStartupInfo.LoadBrightmaps = -1;
DoomStartupInfo.LoadWidescreen = DoomStartupInfo.LoadLights = DoomStartupInfo.LoadBrightmaps = -1;
GC::FullGC(); // clean up before taking down the object list.

View file

@ -83,6 +83,7 @@ struct FStartupInfo
int Type;
int LoadLights = -1;
int LoadBrightmaps = -1;
int LoadWidescreen = -1;
enum
{
DefaultStartup,