From ef586e36e0a871bd1cc9222148a47605d1b554a5 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sun, 18 Sep 2011 23:15:58 +0000 Subject: Fix a minor annoyance with Strife startup - we are *not* emulating the "Final Doom" executable. -gameversion processing code remains in case support for other Strife versions is desired in the future. Strip out some redundant gameversion / chex stuff as well. Subversion-branch: /branches/v2-branch Subversion-revision: 2385 --- src/strife/d_main.c | 101 +++++--------------------------------------------- src/strife/doomstat.c | 2 +- src/strife/p_mobj.c | 28 +------------- 3 files changed, 11 insertions(+), 120 deletions(-) diff --git a/src/strife/d_main.c b/src/strife/d_main.c index bd4ac6a1..2eab0308 100644 --- a/src/strife/d_main.c +++ b/src/strife/d_main.c @@ -945,21 +945,6 @@ static void SetSaveGameDir(char *iwad_filename) M_CreateSaveDirs(savegamedir); } -// Check if the IWAD file is the Chex Quest IWAD. -// Returns true if this is chex.wad. -// haleyjd 08/23/10: there is no Chex Quest based on Strife, -// though I must admit that makes an intriguing idea.... -/* -static boolean CheckChex(char *iwadname) -{ - char *chex_iwadname = "chex.wad"; - - return (strlen(iwadname) > strlen(chex_iwadname) - && !strcasecmp(iwadname + strlen(iwadname) - strlen(chex_iwadname), - chex_iwadname)); -} -*/ - // print title for every printed line char title[128]; @@ -1027,10 +1012,7 @@ static struct char *cmdline; GameVersion_t version; } gameversions[] = { - {"Doom 1.9", "1.9", exe_doom_1_9}, - {"Ultimate Doom", "ultimate", exe_ultimate}, - {"Final Doom", "final", exe_final}, - {"Chex Quest", "chex", exe_chex}, + {"Strife 1.31", "1.31", exe_strife_1_31}, { NULL, NULL, 0}, }; @@ -1041,12 +1023,15 @@ static void InitGameVersion(void) int p; int i; + // This is mostly redundant for now, as we only support + // Strife v1.31. But perhaps in the future we might decide + // to support older versions ... + //! // @arg // @category compat // - // Emulate a specific version of Doom. Valid values are "1.9", - // "ultimate" and "final". + // Emulate a specific version of Doom. Valid values are "1.31". // p = M_CheckParmWithArgs("-gameversion", 1); @@ -1061,7 +1046,7 @@ static void InitGameVersion(void) break; } } - + if (gameversions[i].description == NULL) { printf("Supported game versions:\n"); @@ -1071,52 +1056,13 @@ static void InitGameVersion(void) printf("\t%s (%s)\n", gameversions[i].cmdline, gameversions[i].description); } - + I_Error("Unknown game version '%s'", myargv[p+1]); } } else { - // Determine automatically - - // haleyjd 08/23/10: Removed Chex mode, as it is irrelevant to Strife - if (gamemode == shareware || gamemode == registered) - { - // original - - gameversion = exe_doom_1_9; - } - else if (gamemode == retail) - { - gameversion = exe_ultimate; - } - else if (gamemode == commercial) - { - if (gamemission == doom2) - { - gameversion = exe_doom_1_9; - } - else - { - // Final Doom: tnt or plutonia - - gameversion = exe_final; - } - } - } - - // The original exe does not support retail - 4th episode not supported - - if (gameversion < exe_ultimate && gamemode == retail) - { - gamemode = registered; - } - - // EXEs prior to the Final Doom exes do not support Final Doom. - - if (gameversion < exe_final && gamemode == commercial) - { - gamemission = doom2; + gameversion = exe_strife_1_31; } } @@ -1135,34 +1081,6 @@ void PrintGameVersion(void) } } -// Load the Chex Quest dehacked file, if we are in Chex mode. -// haleyjd 08/23/2010: Removed, as irrelevant to Strife. -/* -static void LoadChexDeh(void) -{ - char *chex_deh; - - if (gameversion == exe_chex) - { - 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. It can be found in your nearest\n" - "/idgames repository mirror at:\n\n" - " utils/exe_edit/patches/chexdeh.zip"); - } - - if (!DEH_LoadFile(chex_deh)) - { - I_Error("Failed to load chex.deh needed for emulating chex.exe."); - } - } -} -*/ - // Function called at exit to display the ENDOOM screen static void D_Endoom(void) @@ -1726,7 +1644,6 @@ void D_DoomMain (void) D_IdentifyVersion(); InitGameVersion(); - //LoadChexDeh(); - haleyjd: removed, as irrelevant to Strife D_SetGameDescription(); SetSaveGameDir(iwadfile); diff --git a/src/strife/doomstat.c b/src/strife/doomstat.c index b591358f..df1c34ab 100644 --- a/src/strife/doomstat.c +++ b/src/strife/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_strife_1_31; char *gamedescription; // Set if homebrew PWAD stuff has been added. diff --git a/src/strife/p_mobj.c b/src/strife/p_mobj.c index 30c6ac41..8d1a7f3a 100644 --- a/src/strife/p_mobj.c +++ b/src/strife/p_mobj.c @@ -350,33 +350,7 @@ void P_ZMovement (mobj_t* mo) { // hit the floor - // Note (id): - // somebody left this after the setting momz to 0, - // kinda useless there. - // - // cph - This was the a bug in the linuxdoom-1.10 source which - // caused it not to sync Doom 2 v1.9 demos. Someone - // added the above comment and moved up the following code. So - // demos would desync in close lost soul fights. - // Note that this only applies to original Doom 1 or Doom2 demos - not - // Final Doom and Ultimate Doom. So we test demo_compatibility *and* - // gamemission. (Note we assume that Doom1 is always Ult Doom, which - // seems to hold for most published demos.) - // - // fraggle - cph got the logic here slightly wrong. There are three - // versions of Doom 1.9: - // - // * The version used in registered doom 1.9 + doom2 - no bounce - // * The version used in ultimate doom - has bounce - // * The version used in final doom - has bounce - // - // So we need to check that this is either retail or commercial - // (but not doom2) - - // [STRIFE] not applicable - //int correct_lost_soul_bounce = gameversion >= exe_ultimate; - - if (/*correct_lost_soul_bounce &&*/ mo->flags & MF_BOUNCE) + if (mo->flags & MF_BOUNCE) { // the skull slammed into something // villsa [STRIFE] affect reactiontime -- cgit v1.2.3