svm-sprite

command
v0.0.0-...-a3a69d7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 26, 2020 License: BSD-3-Clause Imports: 10 Imported by: 0

README

svm-sprite

This tool takes an image as input and generates SVM sourcecode as output. It splits the image up into sprite-sized chunks and generates data statements for each of them. Effectively embedding all sprites in the input image in a program which imports the sourcecode.

Example

$ svm-sprite -out font.svm font.png

Will generate a file font.svm with contents like:

const SpriteCount = 94

:Sprites
d32 16#000ff000
d32 16#000ff000
d32 16#000ff000
d32 16#000ff000
d32 16#00000000
d32 16#000ff000
d32 16#000ff000
d32 16#00000000

d32 16#0ff00ff0
d32 16#0ff00ff0
d32 16#0ff00ff0
d32 16#00000000
d32 16#00000000
d32 16#00000000
d32 16#00000000
d32 16#00000000

d32 16#0ff0ff00
d32 16#fffffff0
d32 16#ff000ff0
d32 16#0f000f00
d32 16#ff000ff0
d32 16#fffffff0
d32 16#0ff0ff00
d32 16#00000000

<snip>

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL