mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 23:02:08 +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 LoadLights = -1;
|
||||
int LoadBrightmaps = -1;
|
||||
int LoadWidescreen = -1;
|
||||
int modern = 0;
|
||||
enum
|
||||
{
|
||||
|
|
|
@ -1937,6 +1937,11 @@ static FString ParseGameInfo(TArray<FString> &pwads, const char *fn, const char
|
|||
sc.MustGetNumber();
|
||||
GameStartupInfo.LoadBrightmaps = !!sc.Number;
|
||||
}
|
||||
else if (!nextKey.CompareNoCase("LOADWIDESCREEN"))
|
||||
{
|
||||
sc.MustGetNumber();
|
||||
GameStartupInfo.LoadWidescreen = !!sc.Number;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Silently ignore unknown properties
|
||||
|
@ -2071,7 +2076,7 @@ static void AddAutoloadFiles(const char *autoname)
|
|||
if (bmwad)
|
||||
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);
|
||||
if (wswad)
|
||||
|
@ -3730,7 +3735,7 @@ void D_Cleanup()
|
|||
// delete GameStartupInfo data
|
||||
GameStartupInfo.Name = "";
|
||||
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.
|
||||
|
||||
|
|
Loading…
Reference in a new issue