This header file provides variables and function prototypes for handling SRB2's command line parameters (or command line arguments).
Externs
Data name
|
Data type
|
Non-extern location(s)
|
Description
|
myargc
|
INT32
|
m_argv.c
|
Number of command line arguments supplied to the program
|
**myargv
|
char
|
m_argv.c
|
The table storing all parameters in the program's command line arguments as strings
|
myargmalloc
|
boolean
|
m_argv.c
|
This is true if myargv was re-allocated (using malloc ) by the game when a response file is detected, so that it can mark it as being safe to use free on at game quit or crash.
|
Function prototypes
Function name
|
Return type
|
Params
|
Defined in
|
Description
|
M_CheckParm
|
INT32
|
const char *check
|
m_argv.c
|
Checks for the given parameter in the program's command line arguments. Returns the position of the given parameter in the arg list (a number from 1 to argc -1, or 0 if not found)
|
M_PushSpecialParameters
|
void
|
none
|
m_argv.c
|
Pushes all parameters beginning with a '+', e.g. +map map01 , to the console buffer (but does not execute them)
|
M_IsNextParm
|
boolean
|
none
|
m_argv.c
|
Returns true if there is an available next parameter. This function assumes M_CheckParm was used immediately beforehand, so it can use the position of the last parameter found by M_CheckParm
|
M_GetNextParm
|
const char *
|
none
|
m_argv.c
|
Returns the next parameter after a M_CheckParm , NULL if not found. M_IsNextParm should be used beforehand to verify there is a next parameter to use
|
M_FindResponseFile
|
void
|
none
|
m_argv.c
|
Finds and loads a response file. This is done by searching for the first parameter beginning with a '@', e.g.: @moreargs.txt
|