Index: code/tools/asm/q3asm.c =================================================================== --- code/tools/asm/q3asm.c (revision 1387) +++ code/tools/asm/q3asm.c (working copy) @@ -1526,6 +1516,19 @@ } } +static void ShowHelp( char *argv0 ) { + Error("Usage: %s [OPTION]... [FILES]...\n\ +Assemble LCC bytecode assembly to Q3VM bytecode.\n\ +\n\ + -o OUTPUT Write assembled output to file OUTPUT.qvm\n\ + -f LISTFILE Read options and list of files to assemble from LISTFILE.q3asm\n\ + -b BUCKETS Set symbol hash table to BUCKETS buckets\n\ + -v Verbose compilation report\n\ + -vq3 Produce a qvm file compatible with Q3 1.32b\n\ + -h --help -? Show this help\n\ +", argv0); +} + /* ============== main @@ -1538,15 +1541,7 @@ // _chdir( "/quake3/jccode/cgame/lccout" ); // hack for vc profiler if ( argc < 2 ) { - Error("Usage: %s [OPTION]... [FILES]...\n\ -Assemble LCC bytecode assembly to Q3VM bytecode.\n\ -\n\ - -o OUTPUT Write assembled output to file OUTPUT.qvm\n\ - -f LISTFILE Read options and list of files to assemble from LISTFILE\n\ - -b BUCKETS Set symbol hash table to BUCKETS buckets\n\ - -v Verbose compilation report\n\ - -vq3 Produce a qvm file compatible with Q3 1.32b\n\ -", argv[0]); + ShowHelp( argv[0] ); } start = I_FloatTime (); @@ -1559,6 +1554,12 @@ if ( argv[i][0] != '-' ) { break; } + if( !strcmp( argv[ i ], "-h" ) || + !strcmp( argv[ i ], "--help" ) || + !strcmp( argv[ i ], "-?") ) { + ShowHelp( argv[0] ); + } + if ( !strcmp( argv[i], "-o" ) ) { if ( i == argc - 1 ) { Error( "-o must preceed a filename" );