From 2bfd7c43fee19b16da7d0a0354765fc8e8a4dfc0 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sun, 18 Apr 2010 21:29:42 +0000 Subject: Split out WAD command line parsing code into common code shared between games. Subversion-branch: /branches/raven-branch Subversion-revision: 1910 --- src/hexen/h2_main.c | 27 ++++----------------------- 1 file changed, 4 insertions(+), 23 deletions(-) (limited to 'src/hexen') 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++) { @@ -483,27 +485,6 @@ static void ExecOptionSKILL(char **args, int tag) autostart = true; } -//========================================================================== -// -// 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 -- cgit v1.2.3