summaryrefslogtreecommitdiff
path: root/src/d_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/d_main.c')
-rw-r--r--src/d_main.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/d_main.c b/src/d_main.c
index a5b38949..10eab2b0 100644
--- a/src/d_main.c
+++ b/src/d_main.c
@@ -660,6 +660,7 @@ static struct
GameVersion_t version;
} gameversions[] = {
{"Doom 1.9", "1.9", exe_doom_1_9},
+ {"Hacx", "hacx", exe_hacx},
{"Ultimate Doom", "ultimate", exe_ultimate},
{"Final Doom", "final", exe_final},
{"Chex Quest", "chex", exe_chex},
@@ -711,7 +712,7 @@ static void InitGameVersion(void)
{
// Determine automatically
- if (gameversion == exe_chex)
+ if (gameversion == exe_chex || gameversion == exe_hacx)
{
// Already determined
}
@@ -796,6 +797,20 @@ static void LoadChexDeh(void)
}
}
+static void LoadHacxDeh(void)
+{
+ // If this is the HACX IWAD, we need to load the DEHACKED lump.
+
+ if (gameversion == exe_hacx)
+ {
+ if (!DEH_LoadLumpByName("DEHACKED"))
+ {
+ I_Error("DEHACKED lump not found. Please check that this is the "
+ "Hacx v1.2 IWAD.");
+ }
+ }
+}
+
//
// D_DoomMain
//
@@ -1227,6 +1242,7 @@ void D_DoomMain (void)
D_IdentifyVersion();
InitGameVersion();
LoadChexDeh();
+ LoadHacxDeh();
D_SetGameDescription();
D_SetSaveGameDir();