summaryrefslogtreecommitdiff
path: root/src/hexen
diff options
context:
space:
mode:
authorSimon Howard2009-03-08 23:46:09 +0000
committerSimon Howard2009-03-08 23:46:09 +0000
commitf0c5cc898d993d3388dfbce5833e8ccca7b2f03f (patch)
tree4ba918a271e4ea0142170c28b53e35b6f9d506f3 /src/hexen
parent67fbcdce28b89b24f8fb27d5f25393ad775af719 (diff)
downloadchocolate-doom-f0c5cc898d993d3388dfbce5833e8ccca7b2f03f.tar.gz
chocolate-doom-f0c5cc898d993d3388dfbce5833e8ccca7b2f03f.tar.bz2
chocolate-doom-f0c5cc898d993d3388dfbce5833e8ccca7b2f03f.zip
Fix -cdrom command line parameter to work with Heretic and Hexen;
compiles now work on Windows. Subversion-branch: /branches/raven-branch Subversion-revision: 1452
Diffstat (limited to 'src/hexen')
-rw-r--r--src/hexen/h2_main.c28
1 files changed, 25 insertions, 3 deletions
diff --git a/src/hexen/h2_main.c b/src/hexen/h2_main.c
index 166c3064..042128db 100644
--- a/src/hexen/h2_main.c
+++ b/src/hexen/h2_main.c
@@ -116,7 +116,7 @@ boolean respawnparm; // checkparm of -respawn
boolean randomclass; // checkparm of -randclass
boolean debugmode; // checkparm of -debug
boolean ravpic; // checkparm of -ravpic
-boolean cdrom; // true if cd-rom mode active
+boolean cdrom = false; // true if cd-rom mode active
boolean cmdfrag; // true if a CMD_FRAG packet should be sent out
boolean singletics; // debug flag to cancel adaptiveness
boolean artiskip; // whether shift-enter skips an artifact
@@ -246,7 +246,29 @@ void D_DoomMain(void)
// Load defaults before initing other systems
ST_Message("M_LoadDefaults: Load system defaults.\n");
D_BindVariables();
- M_SetConfigDir();
+
+#ifdef _WIN32
+
+ //!
+ // @platform windows
+ // @vanilla
+ //
+ // Save configuration data and savegames in c:\hexndata,
+ // allowing play from CD.
+ //
+
+ cdrom = M_ParmExists("-cdrom");
+#endif
+
+ if (cdrom)
+ {
+ M_SetConfigDir("c:\\hexndata\\");
+ }
+ else
+ {
+ M_SetConfigDir(NULL);
+ }
+
D_SetDefaultSavePath();
M_SetConfigFilenames("hexen.cfg", PROGRAM_PREFIX "hexen.cfg");
M_LoadDefaults();
@@ -399,7 +421,7 @@ static void HandleArgs(void)
artiskip = M_ParmExists("-artiskip");
debugmode = M_ParmExists("-debug");
deathmatch = M_ParmExists("-deathmatch");
- cdrom = M_ParmExists("-cdrom");
+
cmdfrag = M_ParmExists("-cmdfrag");
// Process command line options