Skip to content

Commit

Permalink
Play sound if need to reopen WAD launcher
Browse files Browse the repository at this point in the history
Also revert previous commit. Can't check DOOMRETRO.WAD until it is
loaded, and it can't be loaded until an IWAD has.
  • Loading branch information
bradharding committed Apr 27, 2014
1 parent 76393bb commit 5388359
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/d_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,13 @@ along with DOOM RETRO. If not, see http://www.gnu.org/licenses/.
====================================================================
*/

#pragma comment(lib, "winmm.lib")

#define WIN32_LEAN_AND_MEAN

#include <windows.h>
#include <Commdlg.h>
#include <MMSystem.h>

#include "am_map.h"
#include "d_iwad.h"
Expand Down Expand Up @@ -722,11 +725,6 @@ static void D_DoomMainSetup(void)
if (!M_FileExists("doomretro.wad.temp"))
I_Error("Can't find doomretro.wad.");

if (W_CheckNumForName("BLD2A0") < 0 ||
W_CheckNumForName("MEDBA0") < 0 ||
W_CheckNumForName("STBAR2") < 0)
I_Error("Wrong version of doomretro.wad.");

if (iwadfile)
{
if (D_AddFile(iwadfile))
Expand All @@ -749,6 +747,8 @@ static void D_DoomMainSetup(void)
rename("doomretro.wad.temp", "doomretro.wad");
I_Quit(false);
}
else if (!choseniwad)
PlaySound((LPCTSTR)SND_ALIAS_SYSTEMHAND, NULL, SND_ALIAS_ID | SND_ASYNC);

} while (!choseniwad);

Expand All @@ -763,6 +763,11 @@ static void D_DoomMainSetup(void)
if (!W_MergeFile("doomretro.wad.temp"))
I_Error("Can't find doomretro.wad.");

if (W_CheckNumForName("BLD2A0") < 0 ||
W_CheckNumForName("MEDBA0") < 0 ||
W_CheckNumForName("STBAR2") < 0)
I_Error("Wrong version of doomretro.wad.");

p = M_CheckParmWithArgs("-file", 1);
if (p > 0)
{
Expand Down

0 comments on commit 5388359

Please sign in to comment.