Browse Source

Add usage to front-page documentation

James Bowman 6 years ago
parent
commit
530e91e9ae
3 changed files with 42 additions and 2 deletions
  1. 38 0
      README.md
  2. 2 1
      scripts/gd2asset
  3. 2 1
      scripts/gd3asset

+ 38 - 0
README.md

@@ -1,5 +1,43 @@
 # gd2-asset
 
+
+usage:
+    
+    gd2asset <options> <assets>
+    gd3asset <options> <assets>
+
+      -3          target GD3 (FT810 series)
+      -d          dither all pixel conversions
+      -f <name>   output asset file (default is header file)
+      -o <name>   output header file
+
+    If no output header file is given, then "default_assets.h" is used
+
+    Each asset is a filename, optionally followed by some var=val
+    assignments. For example:
+      pic1.png                 image, format ARGB4
+      pic2.jpg,format=L8       image, format L8
+      serif.ttf,size=16        font, 16 pixels high
+
+    Options various file types:
+
+    jpg,png,bmp,gif:
+     format   L1 L2 L4 L8 RGB332 ARGB2 ARGB4 RGB565 ARGB1555. Default ARGB4
+
+    ttf
+     size     height in pixels. Default 12
+     format   L1 L2 L4 L8 RGB332 ARGB2 ARGB4 RGB565 ARGB1555. Default ARGB4
+     topchar  maximum ASCII code encoded. Default 127
+
+    wav
+     (no options)
+
+    The assets are compiled into flash, or if the "-f" option is given
+    into a file. In this case the file should be copied to the
+    microSD card.
+    In either case, calling LOAD_ASSETS() from the program loads all
+    assets.
+
 To test run `go`, it should produce:
 
     Assets report

+ 2 - 1
scripts/gd2asset

@@ -110,8 +110,9 @@ if __name__ == '__main__':
         optlist, args = getopt.getopt(sys.argv[1:], "3do:f:")
     except getopt.GetoptError:
         print 'usage: gd2asset <options> <assets>'
+        print '       gd3asset <options> <assets>'
         print
-        print '  -3          target GD3 (FT810 series)'
+        print '  -3          target GD3 (FT810 series) - set by gd3asset'
         print '  -d          dither all pixel conversions'
         print '  -f <name>   output asset file (default is header file)'
         print '  -o <name>   output header file'

+ 2 - 1
scripts/gd3asset

@@ -110,8 +110,9 @@ if __name__ == '__main__':
         optlist, args = getopt.getopt(sys.argv[1:], "3do:f:")
     except getopt.GetoptError:
         print 'usage: gd2asset <options> <assets>'
+        print '       gd3asset <options> <assets>'
         print
-        print '  -3          target GD3 (FT810 series)'
+        print '  -3          target GD3 (FT810 series) - set by gd3asset'
         print '  -d          dither all pixel conversions'
         print '  -f <name>   output asset file (default is header file)'
         print '  -o <name>   output header file'