r5151 - trunk/misc

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Tue Dec 2 08:44:37 EST 2008


Author: div0
Date: 2008-12-02 08:44:36 -0500 (Tue, 02 Dec 2008)
New Revision: 5151

Modified:
   trunk/misc/bsptool.pl
Log:
bsptool: add a help message


Modified: trunk/misc/bsptool.pl
===================================================================
--- trunk/misc/bsptool.pl	2008-12-02 13:37:02 UTC (rev 5150)
+++ trunk/misc/bsptool.pl	2008-12-02 13:44:36 UTC (rev 5151)
@@ -12,6 +12,33 @@
 
 # READ THE BSP
 
+if(!@ARGV || $ARGV[0] eq '-h' || $ARGV[0] eq '--help')
+{
+	print <<EOF;
+Usage:
+  $0 filename.bsp [operations...]
+
+Operations are:
+  Information requests:
+    -i                print info about the BSP file
+    -xlumpname        extract a lump (see -i)
+
+  Changes:
+    -dlumpname        delete a lump (see -i)
+    -gfilename.tga    save the lightgrid as filename.tga (debugging)
+    -Gratio           scale down the lightgrid to reduce BSP file size
+    -ljpgNNN          externalize the lightmaps as JPEG, quality NNN (number from 1 to 100)
+    -lpng             externalize the lightmaps as PNG
+    -ltga             externalize the lightmaps as TGA
+    -mMESSAGE         set the BSP file comment message
+
+  Save commands:
+    -o                actually apply the changes to the BSP
+    -ofilename2.bsp   save the changes to a new BSP file
+EOF
+	exit;
+}
+
 my $fn = shift @ARGV;
 $fn =~ /(.*)\.bsp$/
 	or die "invalid input file name (must be a .bsp): $fn";




More information about the nexuiz-commits mailing list