mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-02-07 17:11:17 +00:00
- add 'loadwidescreen' to gameinfo, works exactly like 'loadbrightmaps' or 'loadlights'
This commit is contained in:
parent
7479648083
commit
34c57ab6be
2 changed files with 8 additions and 2 deletions
|
@ -12,6 +12,7 @@ struct FStartupInfo
|
||||||
int Type;
|
int Type;
|
||||||
int LoadLights = -1;
|
int LoadLights = -1;
|
||||||
int LoadBrightmaps = -1;
|
int LoadBrightmaps = -1;
|
||||||
|
int LoadWidescreen = -1;
|
||||||
int modern = 0;
|
int modern = 0;
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
|
|
|
@ -1937,6 +1937,11 @@ static FString ParseGameInfo(TArray<FString> &pwads, const char *fn, const char
|
||||||
sc.MustGetNumber();
|
sc.MustGetNumber();
|
||||||
GameStartupInfo.LoadBrightmaps = !!sc.Number;
|
GameStartupInfo.LoadBrightmaps = !!sc.Number;
|
||||||
}
|
}
|
||||||
|
else if (!nextKey.CompareNoCase("LOADWIDESCREEN"))
|
||||||
|
{
|
||||||
|
sc.MustGetNumber();
|
||||||
|
GameStartupInfo.LoadWidescreen = !!sc.Number;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Silently ignore unknown properties
|
// Silently ignore unknown properties
|
||||||
|
@ -2071,7 +2076,7 @@ static void AddAutoloadFiles(const char *autoname)
|
||||||
if (bmwad)
|
if (bmwad)
|
||||||
D_AddFile (allwads, bmwad, true, -1, GameConfig);
|
D_AddFile (allwads, bmwad, true, -1, GameConfig);
|
||||||
}
|
}
|
||||||
if (autoloadwidescreen)
|
if (GameStartupInfo.LoadWidescreen == 1 || (GameStartupInfo.LoadWidescreen != 0 && autoloadwidescreen))
|
||||||
{
|
{
|
||||||
const char *wswad = BaseFileSearch ("game_widescreen_gfx.pk3", NULL, false, GameConfig);
|
const char *wswad = BaseFileSearch ("game_widescreen_gfx.pk3", NULL, false, GameConfig);
|
||||||
if (wswad)
|
if (wswad)
|
||||||
|
@ -3730,7 +3735,7 @@ void D_Cleanup()
|
||||||
// delete GameStartupInfo data
|
// delete GameStartupInfo data
|
||||||
GameStartupInfo.Name = "";
|
GameStartupInfo.Name = "";
|
||||||
GameStartupInfo.BkColor = GameStartupInfo.FgColor = GameStartupInfo.Type = 0;
|
GameStartupInfo.BkColor = GameStartupInfo.FgColor = GameStartupInfo.Type = 0;
|
||||||
GameStartupInfo.LoadLights = GameStartupInfo.LoadBrightmaps = -1;
|
GameStartupInfo.LoadWidescreen = GameStartupInfo.LoadLights = GameStartupInfo.LoadBrightmaps = -1;
|
||||||
|
|
||||||
GC::FullGC(); // clean up before taking down the object list.
|
GC::FullGC(); // clean up before taking down the object list.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue