mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-12-03 17:32:40 +00:00
- 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:
parent
e5b63c6693
commit
260ca8f37c
2 changed files with 14 additions and 1 deletions
|
@ -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, disableautoload, false, CVAR_ARCHIVE | CVAR_NOINITCALL | CVAR_GLOBALCONFIG)
|
||||||
CVAR (Bool, autoloadbrightmaps, 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, 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)
|
CVAR (Bool, r_debug_disable_vis_filter, false, 0)
|
||||||
|
|
||||||
bool wantToRestart;
|
bool wantToRestart;
|
||||||
|
@ -2000,6 +2001,11 @@ static FString ParseGameInfo(TArray<FString> &pwads, const char *fn, const char
|
||||||
sc.MustGetNumber();
|
sc.MustGetNumber();
|
||||||
DoomStartupInfo.LoadBrightmaps = !!sc.Number;
|
DoomStartupInfo.LoadBrightmaps = !!sc.Number;
|
||||||
}
|
}
|
||||||
|
else if (!nextKey.CompareNoCase("LOADWIDESCREEN"))
|
||||||
|
{
|
||||||
|
sc.MustGetNumber();
|
||||||
|
DoomStartupInfo.LoadWidescreen = !!sc.Number;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Silently ignore unknown properties
|
// Silently ignore unknown properties
|
||||||
|
@ -2161,6 +2167,12 @@ static void AddAutoloadFiles(const char *autoname)
|
||||||
if (bmwad)
|
if (bmwad)
|
||||||
D_AddFile (allwads, 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)
|
if (!(gameinfo.flags & GI_SHAREWARE) && !Args->CheckParm("-noautoload") && !disableautoload)
|
||||||
|
@ -3008,7 +3020,7 @@ void D_Cleanup()
|
||||||
// delete DoomStartupInfo data
|
// delete DoomStartupInfo data
|
||||||
DoomStartupInfo.Name = "";
|
DoomStartupInfo.Name = "";
|
||||||
DoomStartupInfo.BkColor = DoomStartupInfo.FgColor = DoomStartupInfo.Type = 0;
|
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.
|
GC::FullGC(); // clean up before taking down the object list.
|
||||||
|
|
||||||
|
|
|
@ -83,6 +83,7 @@ struct FStartupInfo
|
||||||
int Type;
|
int Type;
|
||||||
int LoadLights = -1;
|
int LoadLights = -1;
|
||||||
int LoadBrightmaps = -1;
|
int LoadBrightmaps = -1;
|
||||||
|
int LoadWidescreen = -1;
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
DefaultStartup,
|
DefaultStartup,
|
||||||
|
|
Loading…
Reference in a new issue