summaryrefslogtreecommitdiff
path: root/src/hexen
diff options
context:
space:
mode:
authorSimon Howard2010-04-18 21:29:42 +0000
committerSimon Howard2010-04-18 21:29:42 +0000
commit2bfd7c43fee19b16da7d0a0354765fc8e8a4dfc0 (patch)
tree23fc8b595b366fc1fa55ad4de0c88e1ef2f2e1f2 /src/hexen
parentd29437d459167d40bac2d0c2c7881f3e3b8f2e8f (diff)
downloadchocolate-doom-2bfd7c43fee19b16da7d0a0354765fc8e8a4dfc0.tar.gz
chocolate-doom-2bfd7c43fee19b16da7d0a0354765fc8e8a4dfc0.tar.bz2
chocolate-doom-2bfd7c43fee19b16da7d0a0354765fc8e8a4dfc0.zip
Split out WAD command line parsing code into common code shared between
games. Subversion-branch: /branches/raven-branch Subversion-revision: 1910
Diffstat (limited to 'src/hexen')
-rw-r--r--src/hexen/h2_main.c27
1 files changed, 4 insertions, 23 deletions
diff --git a/src/hexen/h2_main.c b/src/hexen/h2_main.c
index ef223c0e..a20bd91a 100644
--- a/src/hexen/h2_main.c
+++ b/src/hexen/h2_main.c
@@ -46,6 +46,7 @@
#include "m_controls.h"
#include "p_local.h"
#include "v_video.h"
+#include "w_main.h"
// MACROS ------------------------------------------------------------------
@@ -88,7 +89,6 @@ static void PageDrawer(void);
static void HandleArgs(void);
static void CheckRecordFrom(void);
static void DrawAndBlit(void);
-static void ExecOptionFILE(char **args, int tag);
static void ExecOptionSCRIPTS(char **args, int tag);
static void ExecOptionSKILL(char **args, int tag);
static void ExecOptionPLAYDEMO(char **args, int tag);
@@ -133,7 +133,6 @@ static int pagetic;
static char *pagename;
static execOpt_t ExecOptions[] = {
- {"-file", ExecOptionFILE, 1, 0},
{"-scripts", ExecOptionSCRIPTS, 1, 0},
{"-skill", ExecOptionSKILL, 1, 0},
{"-playdemo", ExecOptionPLAYDEMO, 1, 0},
@@ -422,6 +421,9 @@ static void HandleArgs(void)
cmdfrag = M_ParmExists("-cmdfrag");
+ // Check WAD file command line options
+ W_ParseCommandLine();
+
// Process command line options
for (opt = ExecOptions; opt->name != NULL; opt++)
{
@@ -485,27 +487,6 @@ static void ExecOptionSKILL(char **args, int tag)
//==========================================================================
//
-// ExecOptionFILE
-//
-//==========================================================================
-
-static void ExecOptionFILE(char **args, int tag)
-{
- char *filename;
- int p;
-
- p = M_CheckParm("-file");
- while (++p != myargc && myargv[p][0] != '-')
- {
- filename = D_TryFindWADByName(myargv[p]);
-
- D_AddFile(filename);
- }
-}
-
-
-//==========================================================================
-//
// ExecOptionPLAYDEMO
//
//==========================================================================