From ed4adeba77bf7dd803e7b944ee5f871965a0ca29 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Wed, 9 Mar 2011 01:06:07 +0000 Subject: Add support for the alternate version of the Final Doom executable that fixes the demo loop crash (thanks Porsche Monty, Enjay). Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2297 --- src/d_main.c | 10 ++++++++-- src/doomdef.h | 1 + src/doomstat.c | 2 +- src/m_menu.c | 1 + 4 files changed, 11 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/d_main.c b/src/d_main.c index 73978c2f..2cfc6b44 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -500,6 +500,9 @@ void D_DoAdvanceDemo (void) // include a DEMO4 lump, so the game bombs out with an error // when it reaches this point in the demo sequence. + // However! There is an alternate version of Final Doom that + // includes a fixed executable. + if (gameversion == exe_ultimate || gameversion == exe_final) demosequence = (demosequence+1)%7; else @@ -659,6 +662,7 @@ static struct {"Hacx", "hacx", exe_hacx}, {"Ultimate Doom", "ultimate", exe_ultimate}, {"Final Doom", "final", exe_final}, + {"Final Doom (alt)", "final2", exe_final2}, {"Chex Quest", "chex", exe_chex}, { NULL, NULL, 0}, }; @@ -675,7 +679,7 @@ static void InitGameVersion(void) // @category compat // // Emulate a specific version of Doom. Valid values are "1.9", - // "ultimate" and "final". + // "ultimate", "final", "final2", "hacx" and "chex". // p = M_CheckParmWithArgs("-gameversion", 1); @@ -731,8 +735,10 @@ static void InitGameVersion(void) else { // Final Doom: tnt or plutonia + // Default to the "alt" version of the executable that + // fixes the demo loop behavior. - gameversion = exe_final; + gameversion = exe_final2; } } } diff --git a/src/doomdef.h b/src/doomdef.h index f9cd4fd9..fa85a47f 100644 --- a/src/doomdef.h +++ b/src/doomdef.h @@ -107,6 +107,7 @@ typedef enum exe_hacx, // Hacx executable (Doom 1.9 with patch applied) exe_ultimate, // Ultimate Doom (retail) exe_final, // Final Doom + exe_final2, // Final Doom (alternate exe) exe_chex, // Chex Quest executable (based on Final Doom) } GameVersion_t; diff --git a/src/doomstat.c b/src/doomstat.c index 22804459..e5fe46b2 100644 --- a/src/doomstat.c +++ b/src/doomstat.c @@ -32,7 +32,7 @@ // Game Mode - identify IWAD as shareware, retail etc. GameMode_t gamemode = indetermined; GameMission_t gamemission = doom; -GameVersion_t gameversion = exe_final; +GameVersion_t gameversion = exe_final2; char *gamedescription; // Set if homebrew PWAD stuff has been added. diff --git a/src/m_menu.c b/src/m_menu.c index efc4fefe..7144f715 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -820,6 +820,7 @@ void M_DrawReadThis1(void) break; case exe_final: + case exe_final2: // Final Doom always displays "HELP". -- cgit v1.2.3 From d610772a0b58e63f665403386f167b3e19a5dcfd Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Wed, 9 Mar 2011 19:02:15 +0000 Subject: Add null sector dereference emulation code from Prboom+, to fix desync with CLNJ-506.LMP (thanks entryway). Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2298 --- src/i_system.c | 106 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/i_system.h | 1 + src/p_map.c | 59 ++++++++++++++++---------------- src/p_setup.c | 25 ++++++++++++-- 4 files changed, 159 insertions(+), 32 deletions(-) (limited to 'src') diff --git a/src/i_system.c b/src/i_system.c index 9f599192..4db97276 100644 --- a/src/i_system.c +++ b/src/i_system.c @@ -369,3 +369,109 @@ void I_Error (char *error, ...) exit(-1); } +// +// Read Access Violation emulation. +// +// From PrBoom+, by entryway. +// + +// C:\>debug +// -d 0:0 +// +// DOS 6.22: +// 0000:0000 (57 92 19 00) F4 06 70 00-(16 00) +// DOS 7.1: +// 0000:0000 (9E 0F C9 00) 65 04 70 00-(16 00) +// Win98: +// 0000:0000 (9E 0F C9 00) 65 04 70 00-(16 00) +// DOSBox under XP: +// 0000:0000 (00 00 00 F1) ?? ?? ?? 00-(07 00) + +#define DOS_MEM_DUMP_SIZE 10 + +static const unsigned char mem_dump_dos622[DOS_MEM_DUMP_SIZE] = { + 0x57, 0x92, 0x19, 0x00, 0xF4, 0x06, 0x70, 0x00, 0x16, 0x00}; +static const unsigned char mem_dump_win98[DOS_MEM_DUMP_SIZE] = { + 0x9E, 0x0F, 0xC9, 0x00, 0x65, 0x04, 0x70, 0x00, 0x16, 0x00}; +static const unsigned char mem_dump_dosbox[DOS_MEM_DUMP_SIZE] = { + 0x00, 0x00, 0x00, 0xF1, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00}; +static unsigned char mem_dump_custom[DOS_MEM_DUMP_SIZE]; + +static const unsigned char *dos_mem_dump = mem_dump_dos622; + +boolean I_GetMemoryValue(unsigned int offset, void *value, int size) +{ + static boolean firsttime = true; + + if (firsttime) + { + int p, i, val; + + firsttime = false; + i = 0; + + //! + // @category compat + // @arg + // + // Specify DOS version to emulate for NULL pointer dereference + // emulation. Supported versions are: dos622, dos71, dosbox. + // The default is to emulate DOS 7.1 (Windows 98). + // + + p = M_CheckParmWithArgs("-setmem", 1); + + if (p > 0) + { + if (!strcasecmp(myargv[p + 1], "dos622")) + { + dos_mem_dump = mem_dump_dos622; + } + if (!strcasecmp(myargv[p + 1], "dos71")) + { + dos_mem_dump = mem_dump_win98; + } + else if (!strcasecmp(myargv[p + 1], "dosbox")) + { + dos_mem_dump = mem_dump_dosbox; + } + else + { + for (i = 0; i < DOS_MEM_DUMP_SIZE; ++i) + { + ++p; + + if (p >= myargc || myargv[p][0] == '-') + { + break; + } + + M_StrToInt(myargv[p], &val); + mem_dump_custom[i++] = (unsigned char) val; + } + + dos_mem_dump = mem_dump_custom; + } + } + } + + switch (size) + { + case 1: + *((unsigned char *) value) = dos_mem_dump[offset]; + return true; + case 2: + *((unsigned short *) value) = dos_mem_dump[offset] + | (dos_mem_dump[offset + 1] << 8); + return true; + case 4: + *((unsigned int *) value) = dos_mem_dump[offset] + | (dos_mem_dump[offset + 1] << 8) + | (dos_mem_dump[offset + 2] << 16) + | (dos_mem_dump[offset + 3] << 24); + return true; + } + + return false; +} + diff --git a/src/i_system.h b/src/i_system.h index a5e06a50..06e7f662 100644 --- a/src/i_system.h +++ b/src/i_system.h @@ -86,6 +86,7 @@ void I_Tactile (int on, int off, int total); void I_Error (char *error, ...); +boolean I_GetMemoryValue(unsigned int offset, void *value, int size); #endif diff --git a/src/p_map.c b/src/p_map.c index 1ac76349..cac44dd2 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -885,24 +885,16 @@ PTR_AimTraverse (intercept_t* in) dist = FixedMul (attackrange, in->frac); - // Return false if there is no back sector. This should never - // be the case if the line is two-sided; however, some WADs - // (eg. ottawau.wad) use this as an "impassible glass" trick - // and rely on Vanilla Doom's (unintentional) support for this. - - if (li->backsector == NULL) - { - return false; - } - - if (li->frontsector->floorheight != li->backsector->floorheight) + if (li->backsector == NULL + || li->frontsector->floorheight != li->backsector->floorheight) { slope = FixedDiv (openbottom - shootz , dist); if (slope > bottomslope) bottomslope = slope; } - if (li->frontsector->ceilingheight != li->backsector->ceilingheight) + if (li->backsector == NULL + || li->frontsector->ceilingheight != li->backsector->ceilingheight) { slope = FixedDiv (opentop - shootz , dist); if (slope < topslope) @@ -983,26 +975,35 @@ boolean PTR_ShootTraverse (intercept_t* in) dist = FixedMul (attackrange, in->frac); - // Check if backsector is NULL. See comment in PTR_AimTraverse. + // e6y: emulation of missed back side on two-sided lines. + // backsector can be NULL when emulating missing back side. - if (li->backsector == NULL) + if (li->backsector == NULL) { - goto hitline; - } + slope = FixedDiv (openbottom - shootz , dist); + if (slope > aimslope) + goto hitline; - if (li->frontsector->floorheight != li->backsector->floorheight) - { - slope = FixedDiv (openbottom - shootz , dist); - if (slope > aimslope) - goto hitline; - } - - if (li->frontsector->ceilingheight != li->backsector->ceilingheight) - { - slope = FixedDiv (opentop - shootz , dist); - if (slope < aimslope) - goto hitline; - } + slope = FixedDiv (opentop - shootz , dist); + if (slope < aimslope) + goto hitline; + } + else + { + if (li->frontsector->floorheight != li->backsector->floorheight) + { + slope = FixedDiv (openbottom - shootz , dist); + if (slope > aimslope) + goto hitline; + } + + if (li->frontsector->ceilingheight != li->backsector->ceilingheight) + { + slope = FixedDiv (opentop - shootz , dist); + if (slope < aimslope) + goto hitline; + } + } // shot continues return true; diff --git a/src/p_setup.c b/src/p_setup.c index 3fc95cab..e18ec81e 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -155,7 +155,24 @@ void P_LoadVertexes (int lump) W_ReleaseLumpNum(lump); } +// +// GetSectorAtNullAddress +// +sector_t* GetSectorAtNullAddress(void) +{ + static boolean null_sector_is_initialized = false; + static sector_t null_sector; + + if (!null_sector_is_initialized) + { + memset(&null_sector, 0, sizeof(null_sector)); + I_GetMemoryValue(0, &null_sector.floorheight, 4); + I_GetMemoryValue(4, &null_sector.ceilingheight, 4); + null_sector_is_initialized = true; + } + return &null_sector; +} // // P_LoadSegs @@ -204,10 +221,12 @@ void P_LoadSegs (int lump) if (sidenum < 0 || sidenum >= numsides) { - sidenum = 0; + li->backsector = GetSectorAtNullAddress(); + } + else + { + li->backsector = sides[sidenum].sector; } - - li->backsector = sides[sidenum].sector; } else { -- cgit v1.2.3 From 6e099632c653dd42dbe1f719c5887844091da0cc Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Mon, 28 Mar 2011 00:24:47 +0000 Subject: Fix weapon cycling from the shotgun to the chaingun in Doom 1 (thanks Alexandre Xavier). Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2311 --- src/g_game.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') diff --git a/src/g_game.c b/src/g_game.c index f91e630e..933a1b7b 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -428,6 +428,13 @@ int G_CmdChecksum (ticcmd_t* cmd) static boolean WeaponSelectable(weapontype_t weapon) { + // Can't select the super shotgun in Doom 1. + + if (weapon == wp_supershotgun && gamemission == doom) + { + return false; + } + // Can't select a weapon if we don't own it. if (!players[consoleplayer].weaponowned[weapon]) -- cgit v1.2.3 From d706f9693ee6bfd3976fcb232c1563c32b1cff88 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Mon, 28 Mar 2011 21:32:14 +0000 Subject: Allow .lmp files to be loaded (and demo files to be played back) that have long filenames (thanks blzut3). Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2312 --- src/w_wad.c | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/w_wad.c b/src/w_wad.c index 9425705c..e93147e3 100644 --- a/src/w_wad.c +++ b/src/w_wad.c @@ -74,27 +74,38 @@ static lumpinfo_t **lumphash; static void ExtractFileBase(char *path, char *dest) { - char* src; - int length; + char *src; + char *filename; + int length; src = path + strlen(path) - 1; - + // back up until a \ or the start while (src != path && *(src - 1) != DIR_SEPARATOR) { src--; } - - // copy up to eight characters - memset (dest,0,8); + + filename = src; + + // Copy up to eight characters + // Note: Vanilla Doom exits with an error if a filename is specified + // with a base of more than eight characters. To remove the 8.3 + // filename limit, instead we simply truncate the name. + length = 0; - - while (*src && *src != '.') + memset(dest, 0, 8); + + while (*src != '\0' && *src != '.') { - if (++length == 9) - I_Error ("Filename base of %s >8 chars",path); + if (length >= 8) + { + printf("Warning: Truncated '%s' lump name to '%.8s'.\n", + filename, dest); + break; + } - *dest++ = toupper((int)*src++); + dest[length++] = toupper((int)*src++); } } -- cgit v1.2.3 From a4ff8b18d8c02b566ec1e203f983fc111408a752 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Mon, 28 Mar 2011 21:36:00 +0000 Subject: Fix OPL MIDI playback when using an empty .mus / .mid file (thanks Alexandre Xavier). Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2313 --- src/i_oplmusic.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/i_oplmusic.c b/src/i_oplmusic.c index e8d65d6d..97ba0783 100644 --- a/src/i_oplmusic.c +++ b/src/i_oplmusic.c @@ -1080,7 +1080,7 @@ static void ScheduleTrack(opl_track_data_t *track); // Restart a song from the beginning. -static void RestartSong(void) +static void RestartSong(void *unused) { unsigned int i; @@ -1118,10 +1118,15 @@ static void TrackTimerCallback(void *arg) --running_tracks; // When all tracks have finished, restart the song. + // Don't restart the song immediately, but wait for 5ms + // before triggering a restart. Otherwise it is possible + // to construct an empty MIDI file that causes the game + // to lock up in an infinite loop. (5ms should be short + // enough not to be noticeable by the listener). if (running_tracks <= 0 && song_looping) { - RestartSong(); + OPL_SetCallback(5, RestartSong, NULL); } return; -- cgit v1.2.3 From 15a1c4924707f78ca4f9e109292e1ca35e83f1f7 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Mon, 28 Mar 2011 23:33:09 +0000 Subject: Emulate bug with IDMUS cheat when emulating v1.9 (thanks Alexandre Xavier). Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2314 --- src/st_stuff.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/st_stuff.c b/src/st_stuff.c index d9c45098..b1a46df5 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -521,8 +521,13 @@ ST_Responder (event_t* ev) plyr->message = DEH_String(STSTR_MUS); cht_GetParam(&cheat_mus, buf); - - if (gamemode == commercial) + + // Note: The original v1.9 had a bug that tried to play back + // the Doom II music regardless of gamemode. This was fixed + // in the Ultimate Doom executable so that it would work for + // the Doom 1 music as well. + + if (gamemode == commercial || gameversion < exe_ultimate) { musnum = mus_runnin + (buf[0]-'0')*10 + buf[1]-'0' - 1; -- cgit v1.2.3 From 72b17f7b82b70cac0a12283b0b26b01e634c3728 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Wed, 30 Mar 2011 19:00:51 +0000 Subject: On OS X, display a dialog box when exiting with I_Error, like on Windows. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2317 --- src/i_system.c | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) (limited to 'src') diff --git a/src/i_system.c b/src/i_system.c index 4db97276..7d3687be 100644 --- a/src/i_system.c +++ b/src/i_system.c @@ -38,6 +38,8 @@ #include #endif +#include "config.h" + #include "deh_main.h" #include "doomdef.h" #include "doomstat.h" @@ -59,6 +61,10 @@ #include "w_wad.h" #include "z_zone.h" +#ifdef __MACOSX__ +#include +#endif + #define DEFAULT_RAM 16 /* MiB */ #define MIN_RAM 4 /* MiB */ @@ -364,6 +370,43 @@ void I_Error (char *error, ...) } #endif +#ifdef __MACOSX__ + { + CFStringRef message; + char msgbuf[512]; + int i; + + va_start(argptr, error); + memset(msgbuf, 0, sizeof(msgbuf)); + vsnprintf(msgbuf, sizeof(msgbuf) - 1, error, argptr); + va_end(argptr); + + // The CoreFoundation message box wraps text lines, so replace + // newline characters with spaces so that multiline messages + // are continuous. + + for (i = 0; msgbuf[i] != '\0'; ++i) + { + if (msgbuf[i] == '\n') + { + msgbuf[i] = ' '; + } + } + + message = CFStringCreateWithCString(NULL, msgbuf, + kCFStringEncodingUTF8); + + CFUserNotificationDisplayNotice(0, + kCFUserNotificationCautionAlertLevel, + NULL, + NULL, + NULL, + CFSTR(PACKAGE_STRING), + message, + NULL); + } +#endif + // abort(); exit(-1); -- cgit v1.2.3 From 30952764cf640001a2e8a0e2e4fefec734b147d9 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sun, 17 Apr 2011 17:33:04 +0000 Subject: Fix libtextscreen window hotkeys to work when shift is held down / capslock turned on. Fix a similar problem in-game when typing cheat codes or using menu hotkeys (thanks Alexandre Xavier). Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2327 --- src/i_video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/i_video.c b/src/i_video.c index cd5d2ace..15e4a6b7 100644 --- a/src/i_video.c +++ b/src/i_video.c @@ -563,7 +563,7 @@ void I_GetEvent(void) } else { - event.data2 = sdlevent.key.keysym.unicode; + event.data2 = tolower(sdlevent.key.keysym.unicode); } if (event.data1 != 0) -- cgit v1.2.3 From 4511434446e523a5e2a7383b14846df2b91df8f1 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Mon, 18 Apr 2011 22:10:16 +0000 Subject: Add test hack for simulating Porsche Monty's scanline emulation (see comment in file). Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2328 --- src/i_scale.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src') diff --git a/src/i_scale.c b/src/i_scale.c index 3f7b3a7d..0b702311 100644 --- a/src/i_scale.c +++ b/src/i_scale.c @@ -964,6 +964,21 @@ static boolean I_Stretch5x(int x1, int y1, int x2, int y2) screenp += dest_pitch; bufp += SCREENWIDTH; } + // test hack for Porsche Monty... scan line simulation: + // See here: http://www.doomworld.com/vb/post/962612 + + if (M_CheckParm("-scanline") > 0) + { + screenp = (byte *) dest_buffer + 2 * dest_pitch; + + for (y=0; y<1198; y += 3) + { + memset(screenp, 0, 1600); + + screenp += dest_pitch * 3; + } + } + return true; } -- cgit v1.2.3 From 085797aeb4c05857b315ebf4448322829151aedc Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sun, 24 Apr 2011 22:22:11 +0000 Subject: Infer -server when -privateserver is specified (thanks Porsche Monty). Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2330 --- src/d_net.c | 3 ++- src/net_server.c | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/d_net.c b/src/d_net.c index 57fe2399..558c3e4d 100644 --- a/src/d_net.c +++ b/src/d_net.c @@ -278,7 +278,8 @@ void D_CheckNetGame (void) // Start a multiplayer server, listening for connections. // - if (M_CheckParm("-server") > 0) + if (M_CheckParm("-server") > 0 + || M_CheckParm("-privateserver") > 0) { NET_SV_Init(); NET_SV_AddModule(&net_loop_server_module); diff --git a/src/net_server.c b/src/net_server.c index b3a9ea92..d889c120 100644 --- a/src/net_server.c +++ b/src/net_server.c @@ -1565,6 +1565,7 @@ void NET_SV_RegisterWithMaster(void) { //! // When running a server, don't register with the global master server. + // Implies -server. // // @category net // -- cgit v1.2.3 From 6e9294e05572d46d3897744d78f4604b412ceb65 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sun, 8 May 2011 00:31:01 +0000 Subject: Shut up compiler warnings. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2333 --- src/deh_io.c | 2 +- src/i_scale.c | 1 + src/p_setup.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/deh_io.c b/src/deh_io.c index 92c81632..83609068 100644 --- a/src/deh_io.c +++ b/src/deh_io.c @@ -181,7 +181,7 @@ int DEH_GetCharLump(deh_context_t *context) int DEH_GetChar(deh_context_t *context) { - int result; + int result = 0; // Read characters, but ignore carriage returns // Essentially this is a DOS->Unix conversion diff --git a/src/i_scale.c b/src/i_scale.c index 0b702311..8cecb1f8 100644 --- a/src/i_scale.c +++ b/src/i_scale.c @@ -30,6 +30,7 @@ #include "doomtype.h" #include "i_video.h" +#include "m_argv.h" #include "z_zone.h" #if defined(_MSC_VER) && !defined(__cplusplus) diff --git a/src/p_setup.c b/src/p_setup.c index e18ec81e..58d5f462 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -700,7 +700,7 @@ static void PadRejectArray(byte *array, unsigned int len) if (len > sizeof(rejectpad)) { fprintf(stderr, "PadRejectArray: REJECT lump too short to pad! (%i > %i)\n", - len, sizeof(rejectpad)); + len, (int) sizeof(rejectpad)); // Pad remaining space with 0 (or 0xff, if specified on command line). -- cgit v1.2.3 From 184ea9ba501adf04b9b352760774fde268c0cc7f Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sat, 14 May 2011 20:11:26 +0000 Subject: Convert build system to using the PROGRAM_PREFIX system used on raven-branch. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2336 --- src/Makefile.am | 12 ++++++------ src/doom-screensaver.desktop.in | 4 ++-- src/m_config.c | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/Makefile.am b/src/Makefile.am index 26fe7c7d..7a690cf1 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,7 +1,7 @@ gamesdir = $(prefix)/games -games_PROGRAMS = chocolate-doom chocolate-server +games_PROGRAMS = @PROGRAM_PREFIX@doom @PROGRAM_PREFIX@server AM_CFLAGS = -I../opl -I../textscreen -I../pcsound @SDLMIXER_CFLAGS@ @SDLNET_CFLAGS@ @@ -21,8 +21,8 @@ net_server.c net_server.h \ net_structrw.c net_structrw.h \ z_native.c z_zone.h -chocolate_server_SOURCES=$(DEDSERV_FILES) -chocolate_server_LDADD = ../wince/libc_wince.a @LDFLAGS@ @SDLNET_LIBS@ +@PROGRAM_PREFIX@server_SOURCES=$(DEDSERV_FILES) +@PROGRAM_PREFIX@server_LDADD = ../wince/libc_wince.a @LDFLAGS@ @SDLNET_LIBS@ MAIN_SOURCE_FILES=\ am_map.c am_map.h \ @@ -167,12 +167,12 @@ SOURCE_FILES = $(MAIN_SOURCE_FILES) \ $(FEATURE_SOUND_SOURCE_FILES) if HAVE_WINDRES -chocolate_doom_SOURCES=$(SOURCE_FILES) resource.rc +@PROGRAM_PREFIX@doom_SOURCES=$(SOURCE_FILES) resource.rc else -chocolate_doom_SOURCES=$(SOURCE_FILES) +@PROGRAM_PREFIX@doom_SOURCES=$(SOURCE_FILES) endif -chocolate_doom_LDADD = \ +@PROGRAM_PREFIX@doom_LDADD = \ ../wince/libc_wince.a \ ../textscreen/libtextscreen.a \ ../pcsound/libpcsound.a \ diff --git a/src/doom-screensaver.desktop.in b/src/doom-screensaver.desktop.in index cee79c2d..1d6e3303 100644 --- a/src/doom-screensaver.desktop.in +++ b/src/doom-screensaver.desktop.in @@ -3,8 +3,8 @@ Encoding=UTF-8 Name=Doom Comment=DOOM by Id Software. -TryExec=@PACKAGE_TARNAME@ -Exec=@PACKAGE_TARNAME@ +TryExec=@PACKAGE_PREFIX@doom +Exec=@PACKAGE_PREFIX@doom StartupNotify=false Terminal=false Type=Application diff --git a/src/m_config.c b/src/m_config.c index 04d0a963..d0fd5185 100644 --- a/src/m_config.c +++ b/src/m_config.c @@ -1452,9 +1452,9 @@ void M_LoadDefaults (void) else { extra_defaults.filename - = malloc(strlen(configdir) + strlen(PACKAGE_TARNAME) + 10); - sprintf(extra_defaults.filename, "%s%s.cfg", - configdir, PACKAGE_TARNAME); + = malloc(strlen(configdir) + strlen(PROGRAM_PREFIX) + 15); + sprintf(extra_defaults.filename, "%s%sdoom.cfg", + configdir, PROGRAM_PREFIX); } LoadDefaultCollection(&doom_defaults); -- cgit v1.2.3 From d07b88e469abbb7c82d10fbe17473d529aaa4388 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sat, 14 May 2011 21:07:55 +0000 Subject: Add freedesktop.org desktop files for chocolate-doom, chocolate-setup (thanks Adrián Chaves Fernández). Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2337 --- src/Makefile.am | 10 ++++++++++ src/doom-screensaver.desktop.in | 4 ++-- src/doom.desktop.in | 7 +++++++ 3 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 src/doom.desktop.in (limited to 'src') diff --git a/src/Makefile.am b/src/Makefile.am index 7a690cf1..3a2eeca6 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -185,6 +185,16 @@ EXTRA_DIST = \ icon.c \ doom-screensaver.desktop.in +appdir = $(prefix)/share/applications +app_DATA = @PROGRAM_PREFIX@doom.desktop \ + @PROGRAM_PREFIX@doom-screensaver.desktop + +@PROGRAM_PREFIX@doom-screensaver.desktop: doom-screensaver.desktop + cp $^ $@ + +@PROGRAM_PREFIX@doom.desktop : doom.desktop + cp $^ $@ + .rc.o: $(WINDRES) $^ -o $@ %.o : %.rc diff --git a/src/doom-screensaver.desktop.in b/src/doom-screensaver.desktop.in index 1d6e3303..59a087e4 100644 --- a/src/doom-screensaver.desktop.in +++ b/src/doom-screensaver.desktop.in @@ -1,8 +1,8 @@ [Desktop Entry] Encoding=UTF-8 -Name=Doom -Comment=DOOM by Id Software. +Name=@PACKAGE_NAME@ +Comment=@PACKAGE_SHORTDESC@ TryExec=@PACKAGE_PREFIX@doom Exec=@PACKAGE_PREFIX@doom StartupNotify=false diff --git a/src/doom.desktop.in b/src/doom.desktop.in new file mode 100644 index 00000000..44b76e62 --- /dev/null +++ b/src/doom.desktop.in @@ -0,0 +1,7 @@ +[Desktop Entry] +Name=@PACKAGE_NAME@ +Exec=@PROGRAM_PREFIX@doom +Icon=@PROGRAM_PREFIX@doom +Type=Application +Comment=@PACKAGE_SHORTDESC@ +Categories=Game;ActionGame; -- cgit v1.2.3 From 75ddea9c27110a1ea7e96b4dc9776dc0998d267b Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sat, 14 May 2011 21:47:12 +0000 Subject: Fix install of screensaver desktop file. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2338 --- src/Makefile.am | 14 +++++++------- src/doom-screensaver.desktop.in | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/Makefile.am b/src/Makefile.am index 3a2eeca6..24c6e2b2 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -181,18 +181,18 @@ endif @SDLMIXER_LIBS@ \ @SDLNET_LIBS@ -EXTRA_DIST = \ - icon.c \ - doom-screensaver.desktop.in +EXTRA_DIST = icon.c appdir = $(prefix)/share/applications -app_DATA = @PROGRAM_PREFIX@doom.desktop \ - @PROGRAM_PREFIX@doom-screensaver.desktop +app_DATA = @PROGRAM_PREFIX@doom.desktop -@PROGRAM_PREFIX@doom-screensaver.desktop: doom-screensaver.desktop +@PROGRAM_PREFIX@doom.desktop : doom.desktop cp $^ $@ -@PROGRAM_PREFIX@doom.desktop : doom.desktop +screensaverdir = $(prefix)/share/applications/screensavers +screensaver_DATA = @PROGRAM_PREFIX@doom-screensaver.desktop + +@PROGRAM_PREFIX@doom-screensaver.desktop: doom-screensaver.desktop cp $^ $@ .rc.o: diff --git a/src/doom-screensaver.desktop.in b/src/doom-screensaver.desktop.in index 59a087e4..178575a2 100644 --- a/src/doom-screensaver.desktop.in +++ b/src/doom-screensaver.desktop.in @@ -3,8 +3,8 @@ Encoding=UTF-8 Name=@PACKAGE_NAME@ Comment=@PACKAGE_SHORTDESC@ -TryExec=@PACKAGE_PREFIX@doom -Exec=@PACKAGE_PREFIX@doom +TryExec=@PROGRAM_PREFIX@doom +Exec=@PROGRAM_PREFIX@doom StartupNotify=false Terminal=false Type=Application -- cgit v1.2.3 From a0ce233f505cecf8a9e5235dcfddf3e78a2231c6 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sat, 14 May 2011 21:50:46 +0000 Subject: Fix display of ENDOOM screen. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2339 --- src/i_system.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/i_system.c b/src/i_system.c index 7d3687be..15e91653 100644 --- a/src/i_system.c +++ b/src/i_system.c @@ -268,7 +268,7 @@ void I_Endoom(void) { TXT_UpdateScreen(); - if (TXT_GetChar() >= 0) + if (TXT_GetChar() > 0) { break; } -- cgit v1.2.3 From dcd1a6c3a4b692e0fa905075ef38273f85c138f4 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Tue, 17 May 2011 22:06:22 +0000 Subject: Detect chex.deh if it is in the same directory as the IWAD file. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2340 --- src/d_main.c | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/d_main.c b/src/d_main.c index 2cfc6b44..c6979712 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -777,11 +777,37 @@ void PrintGameVersion(void) static void LoadChexDeh(void) { - char *chex_deh; + char *chex_deh = NULL; + char *sep; if (gameversion == exe_chex) { - chex_deh = D_FindWADByName("chex.deh"); + // Look for chex.deh in the same directory as the IWAD file. + + sep = strrchr(iwadfile, DIR_SEPARATOR); + + if (sep != NULL) + { + chex_deh = malloc(strlen(iwadfile) + 9); + strcpy(chex_deh, iwadfile); + chex_deh[sep - iwadfile + 1] = '\0'; + strcat(chex_deh, "chex.deh"); + } + else + { + chex_deh = strdup("chex.deh"); + } + + // If the dehacked patch isn't found, try searching the WAD + // search path instead. We might find it... + + if (!M_FileExists(chex_deh)) + { + free(chex_deh); + chex_deh = D_FindWADByName("chex.deh"); + } + + // Still not found? if (chex_deh == NULL) { -- cgit v1.2.3 From fa328faf056affa216f2f3a8764ca0d56262efe9 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Mon, 13 Jun 2011 20:27:32 +0000 Subject: Link chocolate-setup against SDL_mixer to fix compile on Mac OS X. Subversion-branch: /branches/raven-branch Subversion-revision: 2346 --- src/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/Makefile.am b/src/Makefile.am index 6c0adfae..5dc9fe11 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -185,7 +185,7 @@ endif @PROGRAM_PREFIX@setup_LDADD = setup/libsetup.a \ $(top_builddir)/wince/libc_wince.a \ $(top_builddir)/textscreen/libtextscreen.a \ - @LDFLAGS@ @SDL_LIBS@ @SDLNET_LIBS@ + @LDFLAGS@ @SDL_LIBS@ @SDLMIXER_LIBS@ @SDLNET_LIBS@ EXTRA_DIST = \ icon.c \ -- cgit v1.2.3 From b2318d4849a6cd033372ef9164cd06b74c78583c Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Tue, 14 Jun 2011 00:02:40 +0000 Subject: Add missing include so that the OS X error window is displayed. Subversion-branch: /branches/raven-branch Subversion-revision: 2349 --- src/i_system.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/i_system.c b/src/i_system.c index 1d961956..b3cd2769 100644 --- a/src/i_system.c +++ b/src/i_system.c @@ -38,6 +38,8 @@ #include #endif +#include "SDL.h" + #include "config.h" #include "deh_str.h" -- cgit v1.2.3 From 736082f2c07aec39311b8356e474f447c06abcd3 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Thu, 21 Jul 2011 14:21:57 +0000 Subject: Don't use $^ in Makefiles, as it s a GNU make extension (thanks Jakub Lach). Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2354 --- src/Makefile.am | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/Makefile.am b/src/Makefile.am index 24c6e2b2..40be7787 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -187,26 +187,26 @@ appdir = $(prefix)/share/applications app_DATA = @PROGRAM_PREFIX@doom.desktop @PROGRAM_PREFIX@doom.desktop : doom.desktop - cp $^ $@ + cp $< $@ screensaverdir = $(prefix)/share/applications/screensavers screensaver_DATA = @PROGRAM_PREFIX@doom-screensaver.desktop @PROGRAM_PREFIX@doom-screensaver.desktop: doom-screensaver.desktop - cp $^ $@ + cp $< $@ .rc.o: - $(WINDRES) $^ -o $@ + $(WINDRES) $< -o $@ %.o : %.rc - $(WINDRES) $^ -o $@ + $(WINDRES) $< -o $@ if HAVE_PYTHON icon.c : ../data/doom8.ico - ../data/convert-icon $^ $@ + ../data/convert-icon $< $@ endif midiread : midifile.c - $(CC) -DTEST $(CFLAGS) @LDFLAGS@ $^ -o $@ + $(CC) -DTEST $(CFLAGS) @LDFLAGS@ $< -o $@ -- cgit v1.2.3 From aa621807015f56e451432fe1d9cdd05fcdeb92cf Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sat, 20 Aug 2011 18:10:23 +0000 Subject: Fix gnome-screensaver .desktop file (thanks Rahul Sundaram). Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2356 --- src/doom-screensaver.desktop.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/doom-screensaver.desktop.in b/src/doom-screensaver.desktop.in index 178575a2..315f964c 100644 --- a/src/doom-screensaver.desktop.in +++ b/src/doom-screensaver.desktop.in @@ -1,6 +1,5 @@ [Desktop Entry] -Encoding=UTF-8 Name=@PACKAGE_NAME@ Comment=@PACKAGE_SHORTDESC@ TryExec=@PROGRAM_PREFIX@doom @@ -8,5 +7,6 @@ Exec=@PROGRAM_PREFIX@doom StartupNotify=false Terminal=false Type=Application -Categories=Screensaver +OnlyShowIn=GNOME; +Categories=Screensaver; -- cgit v1.2.3 From 358db83778b46427fe267f86532d3a84d25a50ac Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Mon, 29 Aug 2011 20:37:26 +0000 Subject: Fix bug with detection of IWAD type by filename (thanks mether). Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2359 --- src/d_iwad.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/d_iwad.c b/src/d_iwad.c index c0d33707..be5a3880 100644 --- a/src/d_iwad.c +++ b/src/d_iwad.c @@ -430,22 +430,24 @@ static char *SearchDirectoryForIWAD(char *dir) static void IdentifyIWADByName(char *name) { size_t i; + char *p; - gamemission = none; - - for (i=0; i myargc - 2) return; - if (cdrom) - { - sprintf(file, SAVEGAMENAMECD "%c.hsg", myargv[p + 1][0]); - } - else - { - sprintf(file, SAVEGAMENAME "%c.hsg", myargv[p + 1][0]); - } - G_LoadGame(file); + filename = SV_Filename(myargv[p + 1][0] - '0'); + G_LoadGame(filename); G_DoLoadGame(); // load the gameskill etc info from savegame G_RecordDemo(gameskill, 1, gameepisode, gamemap, myargv[p + 2]); D_DoomLoop(); // never returns + free(filename); } /* @@ -940,6 +934,8 @@ void D_DoomMain(void) gamedescription = "Heretic (registered)"; } + savegamedir = M_GetSaveGameDir("heretic.wad"); + I_PrintStartupBanner(gamedescription); // haleyjd: removed WATCOMC @@ -1033,15 +1029,11 @@ void D_DoomMain(void) p = M_CheckParm("-loadgame"); if (p && p < myargc - 1) { - if (cdrom) - { - sprintf(file, SAVEGAMENAMECD "%c.hsg", myargv[p + 1][0]); - } - else - { - sprintf(file, SAVEGAMENAME "%c.hsg", myargv[p + 1][0]); - } - G_LoadGame(file); + char *filename; + + filename = SV_Filename(myargv[p + 1][0] - '0'); + G_LoadGame(filename); + free(filename); } // Check valid episode and map diff --git a/src/heretic/doomdef.h b/src/heretic/doomdef.h index aa1d0c0d..b2508335 100644 --- a/src/heretic/doomdef.h +++ b/src/heretic/doomdef.h @@ -66,7 +66,6 @@ #include "d_ticcmd.h" #define SAVEGAMENAME "hticsav" -#define SAVEGAMENAMECD "c:\\heretic.cd\\hticsav" /* =============================================================================== @@ -740,6 +739,7 @@ void G_SaveGame(int slot, char *description); // called by M_Responder // Support routines for saving games +char *SV_Filename(int slot); void SV_Open(char *fileName); void SV_Close(char *fileName); void SV_Write(void *buffer, int size); @@ -747,6 +747,8 @@ void SV_WriteByte(byte val); void SV_WriteWord(unsigned short val); void SV_WriteLong(unsigned int val); +extern char *savegamedir; + void G_RecordDemo(skill_t skill, int numplayers, int episode, int map, char *name); // only called by startup code diff --git a/src/heretic/g_game.c b/src/heretic/g_game.c index b37f95e0..9b3e3799 100644 --- a/src/heretic/g_game.c +++ b/src/heretic/g_game.c @@ -25,6 +25,7 @@ // G_game.c #include +#include #include #include "doomdef.h" #include "doomkeys.h" @@ -133,6 +134,7 @@ boolean precache = true; // if true, load all graphics at start short consistancy[MAXPLAYERS][BACKUPTICS]; +char *savegamedir; byte *savebuffer, *save_p; @@ -1294,11 +1296,11 @@ void G_DoWorldDone(void) // //--------------------------------------------------------------------------- -char savename[256]; +static char *savename = NULL; void G_LoadGame(char *name) { - strcpy(savename, name); + savename = strdup(name); gameaction = ga_loadgame; } @@ -1322,6 +1324,9 @@ void G_DoLoadGame(void) gameaction = ga_nothing; length = M_ReadFile(savename, &savebuffer); + free(savename); + savename = NULL; + save_p = savebuffer + SAVESTRINGSIZE; // Skip the description field memset(vcheck, 0, sizeof(vcheck)); @@ -1684,21 +1689,15 @@ void G_SaveGame(int slot, char *description) void G_DoSaveGame(void) { int i; - char name[100]; + char *filename; char verString[VERSIONSIZE]; char *description; - if (cdrom) - { - sprintf(name, SAVEGAMENAMECD "%d.hsg", savegameslot); - } - else - { - sprintf(name, SAVEGAMENAME "%d.hsg", savegameslot); - } + filename = SV_Filename(savegameslot); + description = savedescription; - SV_Open(name); + SV_Open(filename); SV_Write(description, SAVESTRINGSIZE); memset(verString, 0, sizeof(verString)); DEH_snprintf(verString, VERSIONSIZE, "version %i", HERETIC_VERSION); @@ -1717,11 +1716,32 @@ void G_DoSaveGame(void) P_ArchiveWorld(); P_ArchiveThinkers(); P_ArchiveSpecials(); - SV_Close(name); + SV_Close(filename); gameaction = ga_nothing; savedescription[0] = 0; P_SetMessage(&players[consoleplayer], DEH_String(TXT_GAMESAVED), true); + + free(filename); +} + +//========================================================================== +// +// SV_Filename +// +// Generate the filename to use for a particular savegame slot. +// Returns a malloc()'d buffer that must be freed by the caller. +// +//========================================================================== + +char *SV_Filename(int slot) +{ + char *filename; + + filename = malloc(strlen(savegamedir) + strlen(SAVEGAMENAME) + 8); + sprintf(filename, "%s" SAVEGAMENAME "%d.hsg", savegamedir, slot); + + return filename; } //========================================================================== diff --git a/src/heretic/mn_menu.c b/src/heretic/mn_menu.c index 955e0124..930df426 100644 --- a/src/heretic/mn_menu.c +++ b/src/heretic/mn_menu.c @@ -645,19 +645,14 @@ void MN_LoadSlotText(void) FILE *fp; int count; int i; - char name[256]; + char *filename; for (i = 0; i < 6; i++) { - if (cdrom) - { - sprintf(name, SAVEGAMENAMECD "%d.hsg", i); - } - else - { - sprintf(name, SAVEGAMENAME "%d.hsg", i); - } - fp = fopen(name, "rb+"); + filename = SV_Filename(i); + fp = fopen(filename, "rb+"); + free(filename); + if (!fp) { SlotText[i][0] = 0; // empty the string @@ -826,21 +821,17 @@ static boolean SCMessages(int option) static boolean SCLoadGame(int option) { - char name[256]; + char *filename; if (!SlotStatus[option]) { // slot's empty...don't try and load return false; } - if (cdrom) - { - sprintf(name, SAVEGAMENAMECD "%d.hsg", option); - } - else - { - sprintf(name, SAVEGAMENAME "%d.hsg", option); - } - G_LoadGame(name); + + filename = SV_Filename(option); + G_LoadGame(filename); + free(filename); + MN_DeactivateMenu(); BorderNeedRefresh = true; if (quickload == -1) -- cgit v1.2.3 From a74c5e46b0cd578880f9fcbb45e6c3ef26d1c941 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Mon, 5 Sep 2011 22:30:09 +0000 Subject: Place Hexen savegames in configdir/savegames/hexen.wad/ rather than configdir/hexndata/, to be in line with Doom / Heretic behavior. Subversion-branch: /branches/raven-branch Subversion-revision: 2362 --- src/hexen/h2_main.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/hexen/h2_main.c b/src/hexen/h2_main.c index 4f9fe312..c78d662a 100644 --- a/src/hexen/h2_main.c +++ b/src/hexen/h2_main.c @@ -184,8 +184,17 @@ void D_BindVariables(void) static void D_SetDefaultSavePath(void) { - SavePath = malloc(strlen(configdir) + 10); - sprintf(SavePath, "%shexndata%c", configdir, DIR_SEPARATOR); + SavePath = M_GetSaveGameDir("hexen.wad"); + + // If we are not using a savegame path (probably because we are on + // Windows and not using a config dir), behave like Vanilla Hexen + // and use hexndata/: + + if (!strcmp(SavePath, "")) + { + SavePath = malloc(10); + sprintf(SavePath, "hexndata%c", DIR_SEPARATOR); + } } // -- cgit v1.2.3 From df292a6dce27e7b20faa0c829aa0c58a3693f979 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sun, 11 Sep 2011 17:01:56 +0000 Subject: Don't show error dialog if running from the console on OS X. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2364 --- src/i_system.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/i_system.c b/src/i_system.c index 15e91653..65ca8854 100644 --- a/src/i_system.c +++ b/src/i_system.c @@ -371,6 +371,7 @@ void I_Error (char *error, ...) #endif #ifdef __MACOSX__ + if (!I_ConsoleStdout()) { CFStringRef message; char msgbuf[512]; -- cgit v1.2.3 From 11024d8214580d63ca7a9e70a121f5ff542a2fce Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sun, 11 Sep 2011 23:32:11 +0000 Subject: Oops. Subversion-branch: /branches/raven-branch Subversion-revision: 2366 --- src/d_iwad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/d_iwad.c b/src/d_iwad.c index 12a7ada2..45c58e57 100644 --- a/src/d_iwad.c +++ b/src/d_iwad.c @@ -444,7 +444,7 @@ static GameMission_t IdentifyIWADByName(char *name, int mask) // Check if it ends in this IWAD name. - if (!strcasecmp(name, iwadname)) + if (!strcasecmp(name, iwads[i].name)) { mission = iwads[i].mission; break; -- cgit v1.2.3