mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 13:01:47 +00:00
- Added startup screen customization, courtesy of Gez.
SVN r3375 (trunk)
This commit is contained in:
parent
67bbc0f95c
commit
d54f9c3616
3 changed files with 45 additions and 5 deletions
|
@ -1701,6 +1701,25 @@ static FString ParseGameInfo(TArray<FString> &pwads, const char *fn, const char
|
||||||
sc.MustGetString();
|
sc.MustGetString();
|
||||||
DoomStartupInfo.BkColor = V_GetColor(NULL, sc.String);
|
DoomStartupInfo.BkColor = V_GetColor(NULL, sc.String);
|
||||||
}
|
}
|
||||||
|
else if (!nextKey.CompareNoCase("STARTUPTYPE"))
|
||||||
|
{
|
||||||
|
sc.MustGetString();
|
||||||
|
FString sttype = sc.String;
|
||||||
|
if (!sttype.CompareNoCase("DOOM"))
|
||||||
|
DoomStartupInfo.Type = FStartupInfo::DoomStartup;
|
||||||
|
else if (!sttype.CompareNoCase("HERETIC"))
|
||||||
|
DoomStartupInfo.Type = FStartupInfo::HereticStartup;
|
||||||
|
else if (!sttype.CompareNoCase("HEXEN"))
|
||||||
|
DoomStartupInfo.Type = FStartupInfo::HexenStartup;
|
||||||
|
else if (!sttype.CompareNoCase("STRIFE"))
|
||||||
|
DoomStartupInfo.Type = FStartupInfo::StrifeStartup;
|
||||||
|
else DoomStartupInfo.Type = FStartupInfo::DefaultStartup;
|
||||||
|
}
|
||||||
|
else if (!nextKey.CompareNoCase("STARTUPSONG"))
|
||||||
|
{
|
||||||
|
sc.MustGetString();
|
||||||
|
DoomStartupInfo.Song = sc.String;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return iwad;
|
return iwad;
|
||||||
}
|
}
|
||||||
|
|
11
src/d_main.h
11
src/d_main.h
|
@ -94,6 +94,17 @@ struct FStartupInfo
|
||||||
FString Name;
|
FString Name;
|
||||||
DWORD FgColor; // Foreground color for title banner
|
DWORD FgColor; // Foreground color for title banner
|
||||||
DWORD BkColor; // Background color for title banner
|
DWORD BkColor; // Background color for title banner
|
||||||
|
FString Song;
|
||||||
|
int Type;
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
DefaultStartup,
|
||||||
|
DoomStartup,
|
||||||
|
HereticStartup,
|
||||||
|
HexenStartup,
|
||||||
|
StrifeStartup,
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
extern FStartupInfo DoomStartupInfo;
|
extern FStartupInfo DoomStartupInfo;
|
||||||
|
|
|
@ -52,6 +52,7 @@
|
||||||
#include "w_wad.h"
|
#include "w_wad.h"
|
||||||
#include "s_sound.h"
|
#include "s_sound.h"
|
||||||
#include "m_argv.h"
|
#include "m_argv.h"
|
||||||
|
#include "d_main.h"
|
||||||
|
|
||||||
// MACROS ------------------------------------------------------------------
|
// MACROS ------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -276,15 +277,18 @@ FStartupScreen *FStartupScreen::CreateInstance(int max_progress)
|
||||||
|
|
||||||
if (!Args->CheckParm("-nostartup"))
|
if (!Args->CheckParm("-nostartup"))
|
||||||
{
|
{
|
||||||
if (gameinfo.gametype == GAME_Hexen)
|
if (DoomStartupInfo.Type == FStartupInfo::HexenStartup ||
|
||||||
|
(gameinfo.gametype == GAME_Hexen && DoomStartupInfo.Type == FStartupInfo::DefaultStartup))
|
||||||
{
|
{
|
||||||
scr = new FHexenStartupScreen(max_progress, hr);
|
scr = new FHexenStartupScreen(max_progress, hr);
|
||||||
}
|
}
|
||||||
else if (gameinfo.gametype == GAME_Heretic)
|
else if (DoomStartupInfo.Type == FStartupInfo::HereticStartup ||
|
||||||
|
(gameinfo.gametype == GAME_Heretic && DoomStartupInfo.Type == FStartupInfo::DefaultStartup))
|
||||||
{
|
{
|
||||||
scr = new FHereticStartupScreen(max_progress, hr);
|
scr = new FHereticStartupScreen(max_progress, hr);
|
||||||
}
|
}
|
||||||
else if (gameinfo.gametype == GAME_Strife)
|
else if (DoomStartupInfo.Type == FStartupInfo::StrifeStartup ||
|
||||||
|
(gameinfo.gametype == GAME_Strife && DoomStartupInfo.Type == FStartupInfo::DefaultStartup))
|
||||||
{
|
{
|
||||||
scr = new FStrifeStartupScreen(max_progress, hr);
|
scr = new FStrifeStartupScreen(max_progress, hr);
|
||||||
}
|
}
|
||||||
|
@ -684,8 +688,14 @@ FHexenStartupScreen::FHexenStartupScreen(int max_progress, HRESULT &hr)
|
||||||
LayoutMainWindow (Window, NULL);
|
LayoutMainWindow (Window, NULL);
|
||||||
InvalidateRect (StartupScreen, NULL, TRUE);
|
InvalidateRect (StartupScreen, NULL, TRUE);
|
||||||
|
|
||||||
|
if (DoomStartupInfo.Song.IsNotEmpty())
|
||||||
|
{
|
||||||
|
S_ChangeMusic(DoomStartupInfo.Song.GetChars(), true, true);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
S_ChangeMusic ("orb", true, true);
|
S_ChangeMusic ("orb", true, true);
|
||||||
|
}
|
||||||
hr = S_OK;
|
hr = S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue