summaryrefslogtreecommitdiff
path: root/src/heretic
diff options
context:
space:
mode:
authorSimon Howard2013-08-10 21:30:03 +0000
committerSimon Howard2013-08-10 21:30:03 +0000
commit17c10da2f3bbcdbfd8d1b45204a5748434456833 (patch)
treed706ddf544a67802367cf5157ebc75f4ec0f377c /src/heretic
parent81e92c1bb287bb0b793bd9c5f4a3889e8f6ee4a3 (diff)
downloadchocolate-doom-17c10da2f3bbcdbfd8d1b45204a5748434456833.tar.gz
chocolate-doom-17c10da2f3bbcdbfd8d1b45204a5748434456833.tar.bz2
chocolate-doom-17c10da2f3bbcdbfd8d1b45204a5748434456833.zip
Add documentation comments for Heretic and Hexen command line arguments.
Subversion-branch: /branches/v2-branch Subversion-revision: 2611
Diffstat (limited to 'src/heretic')
-rw-r--r--src/heretic/d_main.c145
-rw-r--r--src/heretic/p_setup.c13
2 files changed, 133 insertions, 25 deletions
diff --git a/src/heretic/d_main.c b/src/heretic/d_main.c
index f37adcec..8ca49ba6 100644
--- a/src/heretic/d_main.c
+++ b/src/heretic/d_main.c
@@ -418,8 +418,16 @@ void D_CheckRecordFrom(void)
int p;
char *filename;
- p = M_CheckParm("-recordfrom");
- if (!p || p > myargc - 2)
+ //!
+ // @vanilla
+ // @category demo
+ // @arg <savenum> <demofile>
+ //
+ // Record a demo, loading from the given filename. Equivalent
+ // to -loadgame <savenum> -record <demofile>.
+
+ p = M_CheckParmWithArgs("-recordfrom", 2);
+ if (!p)
return;
filename = SV_Filename(myargv[p + 1][0] - '0');
@@ -799,11 +807,39 @@ void D_DoomMain(void)
I_AtExit(D_Endoom, false);
- nomonsters = M_CheckParm("-nomonsters");
- respawnparm = M_CheckParm("-respawn");
- ravpic = M_CheckParm("-ravpic");
- noartiskip = M_CheckParm("-noartiskip");
- debugmode = M_CheckParm("-debug");
+ //!
+ // @vanilla
+ //
+ // Disable monsters.
+ //
+
+ nomonsters = M_ParmExists("-nomonsters");
+
+ //!
+ // @vanilla
+ //
+ // Monsters respawn after being killed.
+ //
+
+ respawnparm = M_ParmExists("-respawn");
+
+ //!
+ // @vanilla
+ //
+ // Take screenshots when F1 is pressed.
+ //
+
+ ravpic = M_ParmExists("-ravpic");
+
+ //!
+ // @vanilla
+ //
+ // Allow artifacts to be used when the run key is held down.
+ //
+
+ noartiskip = M_ParmExists("-noartiskip");
+
+ debugmode = M_ParmExists("-debug");
startskill = sk_medium;
startepisode = 1;
startmap = 1;
@@ -812,27 +848,57 @@ void D_DoomMain(void)
//
// get skill / episode / map from parms
//
- if (M_CheckParm("-deathmatch"))
+
+ //!
+ // @vanilla
+ // @category net
+ //
+ // Start a deathmatch game.
+ //
+
+ if (M_ParmExists("-deathmatch"))
{
deathmatch = true;
}
- p = M_CheckParm("-skill");
- if (p && p < myargc - 1)
+ //!
+ // @arg <skill>
+ // @vanilla
+ //
+ // Set the game skill, 1-5 (1: easiest, 5: hardest). A skill of
+ // 0 disables all monsters.
+ //
+
+ p = M_CheckParmWithArgs("-skill", 1);
+ if (p)
{
startskill = myargv[p + 1][0] - '1';
autostart = true;
}
- p = M_CheckParm("-episode");
- if (p && p < myargc - 1)
+ //!
+ // @arg <n>
+ // @vanilla
+ //
+ // Start playing on episode n (1-4)
+ //
+
+ p = M_CheckParmWithArgs("-episode", 1);
+ if (p)
{
startepisode = myargv[p + 1][0] - '0';
startmap = 1;
autostart = true;
}
- p = M_CheckParm("-warp");
+ //!
+ // @arg <x> <y>
+ // @vanilla
+ //
+ // Start a game immediately, warping to level ExMy.
+ //
+
+ p = M_CheckParmWithArgs("-warp", 2);
if (p && p < myargc - 2)
{
startepisode = myargv[p + 1][0] - '0';
@@ -904,12 +970,30 @@ void D_DoomMain(void)
D_AddFile(iwadfile);
W_ParseCommandLine();
- p = M_CheckParm("-playdemo");
+ //!
+ // @arg <demo>
+ // @category demo
+ // @vanilla
+ //
+ // Play back the demo named demo.lmp.
+ //
+
+ p = M_CheckParmWithArgs("-playdemo", 1);
if (!p)
{
- p = M_CheckParm("-timedemo");
+ //!
+ // @arg <demo>
+ // @category demo
+ // @vanilla
+ //
+ // Play back the demo named demo.lmp, determining the framerate
+ // of the screen.
+ //
+
+ p = M_CheckParmWithArgs("-timedemo", 1);
}
- if (p && p < myargc - 1)
+
+ if (p)
{
DEH_snprintf(file, sizeof(file), "%s.lmp", myargv[p + 1]);
D_AddFile(file);
@@ -1019,29 +1103,44 @@ void D_DoomMain(void)
D_CheckRecordFrom();
- p = M_CheckParm("-record");
- if (p && p < myargc - 1)
+ //!
+ // @arg <x>
+ // @category demo
+ // @vanilla
+ //
+ // Record a demo named x.lmp.
+ //
+
+ p = M_CheckParmWithArgs("-record", 1);
+ if (p)
{
G_RecordDemo(startskill, 1, startepisode, startmap, myargv[p + 1]);
D_DoomLoop(); // Never returns
}
- p = M_CheckParm("-playdemo");
- if (p && p < myargc - 1)
+ p = M_CheckParmWithArgs("-playdemo", 1);
+ if (p)
{
singledemo = true; // Quit after one demo
G_DeferedPlayDemo(myargv[p + 1]);
D_DoomLoop(); // Never returns
}
- p = M_CheckParm("-timedemo");
- if (p && p < myargc - 1)
+ p = M_CheckParmWithArgs("-timedemo", 1);
+ if (p)
{
G_TimeDemo(myargv[p + 1]);
D_DoomLoop(); // Never returns
}
- p = M_CheckParm("-loadgame");
+ //!
+ // @arg <s>
+ // @vanilla
+ //
+ // Load the game in savegame slot s.
+ //
+
+ p = M_CheckParmWithArgs("-loadgame", 1);
if (p && p < myargc - 1)
{
char *filename;
diff --git a/src/heretic/p_setup.c b/src/heretic/p_setup.c
index a3bd2912..7eb7f3c2 100644
--- a/src/heretic/p_setup.c
+++ b/src/heretic/p_setup.c
@@ -620,8 +620,17 @@ void P_SetupLevel(int episode, int map, int playermask, skill_t skill)
P_RemoveMobj(mobj);
}
}
- parm = M_CheckParm("-timer");
- if (parm && parm < myargc - 1)
+
+ //!
+ // @arg <n>
+ // @category net
+ // @vanilla
+ //
+ // For multiplayer games: exit each level after n minutes.
+ //
+
+ parm = M_CheckParmWithArgs("-timer", 1);
+ if (parm)
{
TimerGame = atoi(myargv[parm + 1]) * 35 * 60;
}