shithub: choc

Download patch

ref: ed4adeba77bf7dd803e7b944ee5f871965a0ca29
parent: b0519667da8edcea1592a0ba7b0dfa4b4709e034
author: Simon Howard <[email protected]>
date: Tue Mar 8 20:06:07 EST 2011

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

--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,16 @@
 1.6.0 (2011-??-??):
 
+     * Added support for the alternate version of the Final Doom
+       executable included in some later versions of the Id Anthology.
+       This version fixed the demo loop crash that occurred with the
+       "original" Final Doom executable.
+
+       This executable can be selected on the command line with
+       -gameversion final2. It has been made the default when playing
+       with the Final Doom IWADs (the original behavior can be
+       selected with -gameversion final).  (thanks Porsche Monty,
+       Enjay).
+
     Compatibility:
      * Very short sound effects are not played, to better emulate the
        behavior of DMX in Vanilla Doom (thanks to Quasar for help in
--- a/NOT-BUGS
+++ b/NOT-BUGS
@@ -31,29 +31,6 @@
 
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-== Game exits in demo loop when playing Final Doom ==
-
-When playing with the Final Doom IWAD files (tnt.wad, plutonia.wad),
-if you leave the game at the title screen to play through the demo
-loop, it will eventually exit with the following error message:
-
-    W_GetNumForName: demo4 not found!
-
-This is the same behavior as the Vanilla executables that were
-bundled with Final Doom.  When Ultimate Doom was developed, a fourth
-demo was added to the demo loop, and this change was retained in the
-Final Doom version of the executable.  However, the Final Doom IWADs
-do not include a fourth demo, so the game crashes.
-
-One way to work around this problem is to make the game emulate the
-original (pre-Ultimate Doom) v1.9 executable.  To do this, add the
-command line argument "-gameversion 1.9" when running the game.
-However, be aware this version does have some subtle differences that
-will affect the playback of Final Doom demos (lost soul bouncing,
-teleport behavior).
-
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
 == Game exits when accessing the options menu ==
 
 The game may exit with the message "Bad V_DrawPatch" when accessing
--- a/src/d_main.c
+++ b/src/d_main.c
@@ -500,6 +500,9 @@
     // 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 @@
     {"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 @@
     // @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 @@
             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;
             }
         }
     }
--- a/src/doomdef.h
+++ b/src/doomdef.h
@@ -107,6 +107,7 @@
     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;
 
--- 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.
--- a/src/m_menu.c
+++ b/src/m_menu.c
@@ -820,6 +820,7 @@
             break;
 
         case exe_final:
+        case exe_final2:
 
             // Final Doom always displays "HELP".