summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS6
-rw-r--r--src/doom/d_main.c52
2 files changed, 57 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index ede6b242..048a3041 100644
--- a/NEWS
+++ b/NEWS
@@ -72,6 +72,9 @@
Alexandre-Xavier).
* Level warping on the command line (-warp) to episodes higher
than 4 is possible, matching Vanilla behavior (thanks plumsinus).
+ * The -cdrom command line parameter writes savegames to the
+ correct directory now, matching Vanilla Doom behavior (thanks
+ Alexandre-Xavier).
Heretic:
* Weapon cycling keys for mouse and joystick were fixed (thanks
@@ -166,6 +169,9 @@
* A use-after-free bug has been fixed where a click in a window
that causes the window to close could lead to a crash (thanks
DuClare).
+ * Characters that are unprintable in the Extended ASCII chart
+ are just ignored when they're typed, rather than appearing as
+ an upside-down question mark (thanks Alexandre-Xavier).
2.0.0 (2013-12-09):
diff --git a/src/doom/d_main.c b/src/doom/d_main.c
index a8f23aee..10606161 100644
--- a/src/doom/d_main.c
+++ b/src/doom/d_main.c
@@ -681,6 +681,38 @@ static char *GetGameName(char *gamename)
return gamename;
}
+static void SetMissionForPackName(char *pack_name)
+{
+ int i;
+ static const struct
+ {
+ char *name;
+ int mission;
+ } packs[] = {
+ { "doom2", doom2 },
+ { "tnt", pack_tnt },
+ { "plutonia", pack_plut },
+ };
+
+ for (i = 0; i < arrlen(packs); ++i)
+ {
+ if (!strcasecmp(pack_name, packs[i].name))
+ {
+ gamemission = packs[i].mission;
+ return;
+ }
+ }
+
+ printf("Valid mission packs are:\n");
+
+ for (i = 0; i < arrlen(packs); ++i)
+ {
+ printf("\t%s\n", packs[i].name);
+ }
+
+ I_Error("Unknown mission pack name: %s", pack_name);
+}
+
//
// Find out what version of Doom is playing.
//
@@ -742,9 +774,27 @@ void D_IdentifyVersion(void)
}
else
{
- // Doom 2 of some kind.
+ int p;
+ // Doom 2 of some kind.
gamemode = commercial;
+
+ // We can manually override the gamemission that we got from the
+ // IWAD detection code. This allows us to eg. play Plutonia 2
+ // with Freedoom and get the right level names.
+
+ //!
+ // @arg <pack>
+ //
+ // Explicitly specify a Doom II "mission pack" to run as, instead of
+ // detecting it based on the filename. Valid values are: "doom2",
+ // "tnt" and "plutonia".
+ //
+ p = M_CheckParmWithArgs("-pack", 1);
+ if (p > 0)
+ {
+ SetMissionForPackName(myargv[p + 1]);
+ }
}
}