[wip]save progress

[skip ci]
This commit is contained in:
andy5995
2018-09-14 22:44:50 -05:00
parent 737d978b08
commit c6854c8c21

View File

@@ -200,26 +200,28 @@ void printParameterHelp(const char *argv0, bool foundInvalidArgs) {
if (foundInvalidArgs == true) { if (foundInvalidArgs == true) {
printf("\n\n"); printf("\n\n");
} }
printf("\n\%s, usage\n\ printf("\n\nUsage: %s [OPTION]... VALUE...\n\n\
Commandline Parameter: Description:\n\n\ Options for running zetaglest from the command line\n\n\
%s Displays this help text.", %s display usage",
extractFileFromDirectoryPath(argv0).c_str(), GAME_ARGS[GAME_ARG_HELP]); extractFileFromDirectoryPath(argv0).c_str(), GAME_ARGS[GAME_ARG_HELP]);
//
// '--' options should be indented 2 spaces, regardless of indentation of
// the 'printf' statement
//
printf("\n\n\ printf("\n\n\
%s\n\ %s\n\
Automatically starts a game with the last game\n\ Automatically starts a game with the last settings played",
settings you played.",
GAME_ARGS[GAME_ARG_AUTOSTART_LASTGAME]); GAME_ARGS[GAME_ARG_AUTOSTART_LASTGAME]);
printf("\n\n\ printf("\n\n\
%s=x\n\ %s=FILE\n\
Loads the last saved game.\n\ Loads the last saved game.\n\
Where 'x' is an optional name of the saved game file to load.\n\ FILE - optional name of the saved game file to load.\n\
If 'x' is not specified we load the last game that was saved.", If FILE is not specified, the last game that was saved is loaded",
GAME_ARGS[GAME_ARG_AUTOSTART_LAST_SAVED_GAME]); GAME_ARGS[GAME_ARG_AUTOSTART_LAST_SAVED_GAME]);
printf("\n\n\ printf("\n\n\
%s=x,y,z\n\ %s=x,y,z\n\
Run in auto test mode\n\ Run in auto test mode\n\
Where 'x' is an optional maximum # seconds to play.\n\ Where 'x' is an optional maximum # seconds to play.\n\
If 'x' is not specified the default is 1200 seconds (20 minutes).\n\ If 'x' is not specified the default is 1200 seconds (20 minutes).\n\
@@ -231,41 +233,54 @@ GAME_ARGS[GAME_ARG_AUTOSTART_LAST_SAVED_GAME]);
not specified (or is empty) then auto test continues to cycle.", not specified (or is empty) then auto test continues to cycle.",
GAME_ARGS[GAME_ARG_AUTO_TEST]); GAME_ARGS[GAME_ARG_AUTO_TEST]);
printf("\n\n%s=x:y \t\tAuto connect to host server at IP or hostname x using", GAME_ARGS[GAME_ARG_CONNECT]); printf("\n\n\
printf("\n\n \t port y. Shortcut version of using %s and %s.", GAME_ARGS[GAME_ARG_CLIENT], GAME_ARGS[GAME_ARG_USE_PORTS]); %s=x:y\n\
printf("\n \t*NOTE: to automatically connect to the first LAN host you may"); Auto connect to host server at IP or hostname x using\n\
printf("\n\n \t use: %s=auto-connect", GAME_ARGS[GAME_ARG_CONNECT]); port y. Shortcut version of using %s and %s.\n\
*NOTE: to automatically connect to the first LAN host you may use:\n\
%s=auto-connect",
GAME_ARGS[GAME_ARG_CONNECT], GAME_ARGS[GAME_ARG_CLIENT],
GAME_ARGS[GAME_ARG_USE_PORTS], GAME_ARGS[GAME_ARG_CONNECT]);
printf("\n\n%s=x \tAuto connect to host server at IP or hostname x.", GAME_ARGS[GAME_ARG_CLIENT]); printf("\n\n\
printf("\n\n \t*NOTE: to automatically connect to the first LAN host you may"); %s=x\n\
printf("\n\n \t use: %s=auto-connect", GAME_ARGS[GAME_ARG_CLIENT]); Auto connect to host server at IP or hostname x.\n\
*NOTE: to automatically connect to the first LAN host you may use\n\
%s=auto-connect",
GAME_ARGS[GAME_ARG_CLIENT], GAME_ARGS[GAME_ARG_CLIENT]);
printf("\n\n%s \t\tAuto create a host server.", GAME_ARGS[GAME_ARG_SERVER]); printf("\n\n\
%s\n\
Auto create a host server.",
GAME_ARGS[GAME_ARG_SERVER]);
printf("\n\n%s=x,x ", GAME_ARGS[GAME_ARG_MASTERSERVER_MODE]); printf("\n\n\
printf("\n\n \tRun as a headless server."); %s=x,x\n\
printf("\n\n \tWhere x is an optional comma delimited command list of one or"); Run as a headless server.\n\
printf("\n\n \t more of the following: "); Where 'x' is an optional comma delimited command list of one or\n\
printf("\n\n \t'exit' - which quits the application after a game has no more"); more of the following:\n\
printf("\n\n \t connected players."); exit - the application quits after all players have disconnected\n\
printf("\n\n \t'vps' - which does NOT read commands from the local console"); vps - commands from the local console are NOT read (for some vps's)\n\
printf("\n\n \t (for some vps's)."); lan - prevents broadcasting the hosting server to the masterserver\n\
printf("\n\n \t'lan' - which does not broadcast the hosting server to the"); (for local LAN games).",
printf("\n\n \t masterserver (for local LAN games)."); GAME_ARGS[GAME_ARG_MASTERSERVER_MODE]);
printf("\n\n%s ", GAME_ARGS[GAME_ARG_MASTERSERVER_STATUS]); printf("\n\n\
printf("\n\n \tCheck the current status of a headless server."); %s\n\
Check the current status of a headless server",
GAME_ARGS[GAME_ARG_MASTERSERVER_STATUS]);
printf("\n\n%s=x,y,z \tForce hosted games to listen internally on port", GAME_ARGS[GAME_ARG_USE_PORTS]); printf("\n\n\
printf("\n\n \t x, externally on port y and for game status on port z."); %s=x,y,z\n\
printf("\n\n \tWhere x is the internal port # on the local machine to"); Force hosted games to listen internally on port 'x', externally on\n\
printf("\n\n \t listen for connects."); port 'y' and for game status on port 'z'\n\n\
printf("\n\n \tWhere y is the external port # on the router/proxy to"); 'x' - internal listening port on the local machine\n\
printf("\n\n \t forward connection from to the internal port #."); 'y' - external port on the router/proxy from which to forward connections\n\
printf("\n\n \tWhere z is the game status port # on the local machine"); to the internal port\n\
printf("\n\n \t to listen for status requests."); 'z' - game status port on the local machine from which to listen\n\
printf("\n\n \t*NOTE: If enabled the FTP Server port #'s will be set"); for status requests\n\
printf("\n\n \t to x+1 to x+9."); NOTE: If enabled, the FTP Server port's will be set to x+1 to x+9.",
GAME_ARGS[GAME_ARG_USE_PORTS]);
printf("\n\n%s=x \tSet server title.", GAME_ARGS[GAME_ARG_SERVER_TITLE]); printf("\n\n%s=x \tSet server title.", GAME_ARGS[GAME_ARG_SERVER_TITLE]);