* print available games on wrong -game and -format args
This commit is contained in:
parent
293fab0ffb
commit
ac1dd904f1
|
|
@ -406,6 +406,12 @@ void HelpCommon()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void HelpGames(){
|
||||||
|
Sys_Printf( "Available games:\n" );
|
||||||
|
for( game_t *game = games; game->arg != NULL; ++game )
|
||||||
|
Sys_Printf( " %s\n", game->arg );
|
||||||
|
}
|
||||||
|
|
||||||
void HelpMain(const char* arg)
|
void HelpMain(const char* arg)
|
||||||
{
|
{
|
||||||
printf("Usage: q3map2 [stage] [common options...] [stage options...] [stage source file]\n");
|
printf("Usage: q3map2 [stage] [common options...] [stage options...] [stage source file]\n");
|
||||||
|
|
@ -455,9 +461,7 @@ void HelpMain(const char* arg)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if( striEqual( arg, "game" ) ){
|
if( striEqual( arg, "game" ) ){
|
||||||
printf( "Available games:\n" );
|
HelpGames();
|
||||||
for( game_t *game = games; game->arg != NULL; ++game )
|
|
||||||
printf( " %s\n", game->arg );
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -196,9 +196,6 @@ void LokiInitPaths( char *argv0 ){
|
||||||
*/
|
*/
|
||||||
|
|
||||||
game_t *GetGame( char *arg ){
|
game_t *GetGame( char *arg ){
|
||||||
int i;
|
|
||||||
|
|
||||||
|
|
||||||
/* dummy check */
|
/* dummy check */
|
||||||
if ( strEmptyOrNull( arg ) ) {
|
if ( strEmptyOrNull( arg ) ) {
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
@ -217,7 +214,7 @@ game_t *GetGame( char *arg ){
|
||||||
}
|
}
|
||||||
|
|
||||||
/* test it */
|
/* test it */
|
||||||
i = 0;
|
int i = 0;
|
||||||
while ( games[ i ].arg != NULL )
|
while ( games[ i ].arg != NULL )
|
||||||
{
|
{
|
||||||
if ( striEqual( arg, games[ i ].arg ) ) {
|
if ( striEqual( arg, games[ i ].arg ) ) {
|
||||||
|
|
@ -227,6 +224,8 @@ game_t *GetGame( char *arg ){
|
||||||
}
|
}
|
||||||
|
|
||||||
/* no matching game */
|
/* no matching game */
|
||||||
|
Sys_Warning( "Game \"%s\" is unknown.\n", arg );
|
||||||
|
HelpGames();
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1524,6 +1524,7 @@ inline float Random( void ){ /* returns a pseudorandom number between 0 and 1 */
|
||||||
|
|
||||||
/* help.c */
|
/* help.c */
|
||||||
void HelpMain(const char* arg);
|
void HelpMain(const char* arg);
|
||||||
|
void HelpGames();
|
||||||
|
|
||||||
/* path_init.c */
|
/* path_init.c */
|
||||||
game_t *GetGame( char *arg );
|
game_t *GetGame( char *arg );
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user