From 3579a07a56d6bdd2150e6d3a07817b60b53cea20 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Fri, 27 Oct 2006 23:15:23 +0000 Subject: Allow multiple dehacked patches to be specified with the -deh command line paramter, as with -file. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 741 --- src/deh_main.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/deh_main.c b/src/deh_main.c index 5da6b0bf..8f82b5bb 100644 --- a/src/deh_main.c +++ b/src/deh_main.c @@ -335,16 +335,22 @@ static void DEH_ParseFile(char *filename) void DEH_Init(void) { - int argc; + int p; InitialiseSections(); - argc = M_CheckParm("-deh"); + p = M_CheckParm("-deh"); - if (argc > 0) + if (p > 0) { - printf(" loading %s\n", myargv[argc+1]); - DEH_ParseFile(myargv[argc+1]); + ++p; + + while (p < myargc && myargv[p][0] != '-') + { + printf(" loading %s\n", myargv[p]); + DEH_ParseFile(myargv[p]); + ++p; + } } } -- cgit v1.2.3