Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

- Added startup screen customization, courtesy of Gez.

git-svn-id: http://mancubus.net/svn/hosted/zdoom/zdoom/trunk@3375 a95907f1-e10c-0410-b46f-9e587ccb1026
  • Loading branch information...
commit 4b9eb33111eedd9564368d7b280eed22a7e0f802 1 parent 66530d5
rheit authored
Showing with 45 additions and 5 deletions.
  1. +19 −0 src/d_main.cpp
  2. +11 −0 src/d_main.h
  3. +15 −5 src/win32/st_start.cpp
19 src/d_main.cpp
View
@@ -1701,6 +1701,25 @@ static FString ParseGameInfo(TArray<FString> &pwads, const char *fn, const char
sc.MustGetString();
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;
}
11 src/d_main.h
View
@@ -94,6 +94,17 @@ struct FStartupInfo
FString Name;
DWORD FgColor; // Foreground color for title banner
DWORD BkColor; // Background color for title banner
+ FString Song;
+ int Type;
+ enum
+ {
+ DefaultStartup,
+ DoomStartup,
+ HereticStartup,
+ HexenStartup,
+ StrifeStartup,
+ };
+
};
extern FStartupInfo DoomStartupInfo;
20 src/win32/st_start.cpp
View
@@ -52,6 +52,7 @@
#include "w_wad.h"
#include "s_sound.h"
#include "m_argv.h"
+#include "d_main.h"
// MACROS ------------------------------------------------------------------
@@ -276,15 +277,18 @@ FStartupScreen *FStartupScreen::CreateInstance(int max_progress)
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);
}
- 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);
}
- 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);
}
@@ -684,8 +688,14 @@ FHexenStartupScreen::FHexenStartupScreen(int max_progress, HRESULT &hr)
LayoutMainWindow (Window, NULL);
InvalidateRect (StartupScreen, NULL, TRUE);
- S_ChangeMusic ("orb", true, true);
-
+ if (DoomStartupInfo.Song.IsNotEmpty())
+ {
+ S_ChangeMusic(DoomStartupInfo.Song.GetChars(), true, true);
+ }
+ else
+ {
+ S_ChangeMusic ("orb", true, true);
+ }
hr = S_OK;
}
Please sign in to comment.
Something went wrong with that request. Please try again.