diff options
author | Simon Howard | 2010-11-30 20:00:06 +0000 |
---|---|---|
committer | Simon Howard | 2010-11-30 20:00:06 +0000 |
commit | 9e54684b11cf8e8e4ae19ebd2d754ee472c70089 (patch) | |
tree | 04de62e8b2f81ba24cd26affee3f99cd2a62ba0c /src/d_iwad.c | |
parent | e18391bb0f7b2690d0055fb031caa5fe7d3cdecf (diff) | |
download | chocolate-doom-9e54684b11cf8e8e4ae19ebd2d754ee472c70089.tar.gz chocolate-doom-9e54684b11cf8e8e4ae19ebd2d754ee472c70089.tar.bz2 chocolate-doom-9e54684b11cf8e8e4ae19ebd2d754ee472c70089.zip |
Add support for HACX v1.2 IWAD file.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 2176
Diffstat (limited to 'src/d_iwad.c')
-rw-r--r-- | src/d_iwad.c | 35 |
1 files changed, 24 insertions, 11 deletions
diff --git a/src/d_iwad.c b/src/d_iwad.c index ea0d29d0..89a7fba3 100644 --- a/src/d_iwad.c +++ b/src/d_iwad.c @@ -326,16 +326,22 @@ static struct {"doom.wad", doom}, {"doom1.wad", doom}, {"chex.wad", doom}, + {"hacx.wad", doom2}, }; - + // Hack for chex quest mode -static void CheckChex(char *iwad_name) +static void CheckSpecialIWADs(char *iwad_name) { - if (!strcmp(iwad_name, "chex.wad")) + if (!strcasecmp(iwad_name, "chex.wad")) { gameversion = exe_chex; } + + if (!strcasecmp(iwad_name, "hacx.wad")) + { + gameversion = exe_hacx; + } } // Returns true if the specified path is a path to a file @@ -408,7 +414,7 @@ static char *SearchDirectoryForIWAD(char *dir) if (filename != NULL) { - CheckChex(iwads[i].name); + CheckSpecialIWADs(iwads[i].name); gamemission = iwads[i].mission; return filename; @@ -441,7 +447,7 @@ static void IdentifyIWADByName(char *name) if (!strcasecmp(name + strlen(name) - strlen(iwadname), iwadname)) { - CheckChex(iwads[i].name); + CheckSpecialIWADs(iwads[i].name); gamemission = iwads[i].mission; break; } @@ -701,6 +707,13 @@ static char *SaveGameIWADName(void) return "chex.wad"; } + // Hacx hack + + if (gameversion == exe_hacx) + { + return "hacx.wad"; + } + // Find what subdirectory to use for savegames // // They should be stored in something like @@ -770,6 +783,10 @@ void D_SetSaveGameDir(void) static char *banners[] = { + // doom2.wad + " " + "DOOM 2: Hell on Earth v%i.%i" + " ", // doom1.wad " " "DOOM Shareware Startup v%i.%i" @@ -786,10 +803,6 @@ static char *banners[] = " " "The Ultimate DOOM Startup v%i.%i" " ", - // doom2.wad - " " - "DOOM 2: Hell on Earth v%i.%i" - " ", // tnt.wad " " "DOOM 2: TNT - Evilution v%i.%i" @@ -809,13 +822,13 @@ static char *GetGameName(char *gamename) { size_t i; char *deh_sub; - + for (i=0; i<arrlen(banners); ++i) { // Has the banner been replaced? deh_sub = DEH_String(banners[i]); - + if (deh_sub != banners[i]) { // Has been replaced |