Add a hack to display the vlid options available for the --game command line
parameter when an invalid option is specified. git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3726 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
2f80c51cc8
commit
8dc285468b
|
@ -292,6 +292,13 @@ bool ParseCommandLine(int argc, const char** argv)
|
|||
abort();
|
||||
return false;
|
||||
}
|
||||
if (strcmp(token, "CAM_1A") && strcmp(token, "CAM_2A") && strcmp(token, "CAM_3A")
|
||||
&& strcmp(token, "TUTORIAL3") && strcmp(token, "FASTPLAY"))
|
||||
{
|
||||
fprintf(stderr, "The game parameter requires on of the following keywords:\n");
|
||||
fprintf(stderr, "\tCAM_1A\n\tCAM_2A\n\tCAM_3A\n\tTUTORIAL3\n\tFASTPLAY\n");
|
||||
exit(1);
|
||||
}
|
||||
strlcpy(aLevelName, token, sizeof(aLevelName));
|
||||
SetGameMode(GS_NORMAL);
|
||||
break;
|
||||
|
|
|
@ -58,10 +58,8 @@ typedef enum _title_mode {
|
|||
extern tMode titleMode; // the global case
|
||||
|
||||
#define DEFAULT_LEVEL "CAM_1A"
|
||||
//#define DEFAULT_LEVEL "CAM_2A"
|
||||
#define TUTORIAL_LEVEL "TUTORIAL3"
|
||||
|
||||
|
||||
#define MAX_LEVEL_NAME_SIZE (256)
|
||||
|
||||
extern char aLevelName[MAX_LEVEL_NAME_SIZE+1]; //256]; // vital! the wrf file to use.
|
||||
|
|
Loading…
Reference in New Issue