From c14396d9f4132b8d0866e0307be7a5085edd7ddb Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sat, 2 Aug 2008 13:29:37 +0000 Subject: Search for chex.deh in WAD path. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1169 --- src/d_main.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/d_main.c b/src/d_main.c index 9aa85f9c..91ea48ef 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -774,15 +774,24 @@ void PrintGameVersion(void) static void LoadChexDeh(void) { + char *chex_deh; + if (gameversion == exe_chex) { - if (!DEH_LoadFile("chex.deh")) + chex_deh = D_FindWADByName("chex.deh"); + + if (chex_deh == NULL) { I_Error("Unable to find Chex Quest dehacked file (chex.deh).\n" "The dehacked file is required in order to emulate\n" "chex.exe correctly. Please download it from the\n" "/idgames repository."); } + + if (!DEH_LoadFile(chex_deh)) + { + I_Error("Failed to load chex.deh needed for emulating chex.exe."); + } } } -- cgit v1.2.3