spriteCreator - TBTerra/pictor GitHub Wiki

spriteCreator

SpriteCreator is a command line utility for generating sprite structures of the available sprite types from PNG images.


Usage

SpriteCreator is called from the command line with the following syntax:

spriteCreator <image input file> <sprite output file> <sprite name> <sprite type[..]>

Parameters:

  1. image input file - The file-name of the PNG image to be used for the sprite generation, this must include the file extension.
  2. sprite output file - The file-name of the file to append the generated sprites to, this must include the file extension.
  3. sprite name - The name allocated to the generated sprite structure, this is the name used to address the sprite when using Pictor.
  4. sprite type[..] - The type (or types) of sprite to be generated, as a hexadecimal digit (or string of hexadecimal digits) referring to the type number in the sprite types list.
  • When supplying multiple values for the sprite type argument only the first type generated is given the name supplied in sprite name, all subsequent sprites created in the execution have the name appended with the type digit.

For example: spriteCreator Image.png test_sprite.h SpRiTe 7 would generate a type 7 sprite named SpRiTe from the image named Image and append the output to the file test_sprite.h.

And spriteCreator Image.png test_sprite.h SpRiTe 789 would generate a type 7 sprite named SpRiTe, a type 8 sprite named SpRiTe8 and a type 9 sprite named SpRiTe9. All from the image named Image and appended the output to the file test_sprite.h.