diff options
author | Simon Howard | 2006-10-27 23:15:23 +0000 |
---|---|---|
committer | Simon Howard | 2006-10-27 23:15:23 +0000 |
commit | 3579a07a56d6bdd2150e6d3a07817b60b53cea20 (patch) | |
tree | 0853816a1f9fd2a66ebb43a37fec2bb21c73e4e9 | |
parent | 3ab5b528112a0bc9e10bb852e8ae8f2a47103348 (diff) | |
download | chocolate-doom-3579a07a56d6bdd2150e6d3a07817b60b53cea20.tar.gz chocolate-doom-3579a07a56d6bdd2150e6d3a07817b60b53cea20.tar.bz2 chocolate-doom-3579a07a56d6bdd2150e6d3a07817b60b53cea20.zip |
Allow multiple dehacked patches to be specified with the -deh command
line paramter, as with -file.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 741
-rw-r--r-- | src/deh_main.c | 16 |
1 files 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; + } } } |