diff --git a/src/common/engine/i_interface.cpp b/src/common/engine/i_interface.cpp index 7fc82c4cc..73d06ff04 100644 --- a/src/common/engine/i_interface.cpp +++ b/src/common/engine/i_interface.cpp @@ -1,4 +1,5 @@ #include "i_interface.h" SystemCallbacks *sysCallbacks; -double refreshfreq; \ No newline at end of file +double refreshfreq; +FString endoomName; diff --git a/src/common/engine/i_interface.h b/src/common/engine/i_interface.h index 134cae975..77f223806 100644 --- a/src/common/engine/i_interface.h +++ b/src/common/engine/i_interface.h @@ -22,3 +22,4 @@ struct WadStuff }; +extern FString endoomName; diff --git a/src/d_main.cpp b/src/d_main.cpp index eaae9b22e..bc664e4d3 100644 --- a/src/d_main.cpp +++ b/src/d_main.cpp @@ -2958,6 +2958,8 @@ static int D_DoomMain_Internal (void) gameinfo.nokeyboardcheats = iwad_info->nokeyboardcheats; gameinfo.ConfigName = iwad_info->Configname; lastIWAD = iwad; + endoomName = gameinfo.Endoom; + if ((gameinfo.flags & GI_SHAREWARE) && pwads.Size() > 0) { @@ -3098,6 +3100,26 @@ static int D_DoomMain_Internal (void) if (!batchrun) Printf ("ST_Init: Init startup screen.\n"); if (!restart) { + if (GameStartupInfo.Type == FStartupInfo::DefaultStartup) + { + switch (gameinfo.gametype) + { + case GAME_Hexen: + GameStartupInfo.Type = FStartupInfo::HexenStartup; + break; + + case GAME_Heretic: + GameStartupInfo.Type = FStartupInfo::HereticStartup; + break; + + case GAME_Strife: + GameStartupInfo.Type = FStartupInfo::StrifeStartup; + break; + + default: + break; + } + } StartScreen = FStartupScreen::CreateInstance (TexMan.GuesstimateNumTextures() + 5); } else diff --git a/src/win32/st_start.cpp b/src/win32/st_start.cpp index 34e919bb4..32aa3c1c6 100644 --- a/src/win32/st_start.cpp +++ b/src/win32/st_start.cpp @@ -45,17 +45,16 @@ #include "i_system.h" #include "i_input.h" #include "hardware.h" -#include "gi.h" #include "filesystem.h" -#include "s_sound.h" #include "m_argv.h" -#include "d_main.h" #include "engineerrors.h" #include "s_music.h" +#include "printf.h" +#include "startupinfo.h" +#include "i_interface.h" // MACROS ------------------------------------------------------------------ - // How many ms elapse between blinking text flips. On a standard VGA // adapter, the characters are on for 16 frames and then off for another 16. // The number here therefore corresponds roughly to the blink rate on a @@ -117,18 +116,15 @@ FStartupScreen *FStartupScreen::CreateInstance(int max_progress) if (!Args->CheckParm("-nostartup")) { - if (GameStartupInfo.Type == FStartupInfo::HexenStartup || - (gameinfo.gametype == GAME_Hexen && GameStartupInfo.Type == FStartupInfo::DefaultStartup)) + if (GameStartupInfo.Type == FStartupInfo::HexenStartup) { scr = new FHexenStartupScreen(max_progress, hr); } - else if (GameStartupInfo.Type == FStartupInfo::HereticStartup || - (gameinfo.gametype == GAME_Heretic && GameStartupInfo.Type == FStartupInfo::DefaultStartup)) + else if (GameStartupInfo.Type == FStartupInfo::HereticStartup) { scr = new FHereticStartupScreen(max_progress, hr); } - else if (GameStartupInfo.Type == FStartupInfo::StrifeStartup || - (gameinfo.gametype == GAME_Strife && GameStartupInfo.Type == FStartupInfo::DefaultStartup)) + else if (GameStartupInfo.Type == FStartupInfo::StrifeStartup) { scr = new FStrifeStartupScreen(max_progress, hr); } @@ -512,12 +508,12 @@ void FStrifeStartupScreen::SetWindowSize() int RunEndoom() { - if (showendoom == 0 || gameinfo.Endoom.Len() == 0) + if (showendoom == 0 || endoomName.Len() == 0) { return 0; } - int endoom_lump = fileSystem.CheckNumForFullName (gameinfo.Endoom, true); + int endoom_lump = fileSystem.CheckNumForFullName (endoomName, true); uint8_t endoom_screen[4000]; uint8_t *font;