Closed NicolasVargas11235 closed 2 years ago
They're just flat, raw pixels. The sprite library optionally uses some transparency metadata to speed up transparent blitting.
Use this script:
https://github.com/Wren6991/PicoDVI/blob/master/software/scripts/packtiles
You'll need to install the pillow image library for python3
pip3 install pillow
packtiles
has a help option that gives a summary of arguments.
This command will regenerate the raspberry sprite image from sprite_bounce:
./scripts/packtiles -sdmf rgab5515 assets/raspberry_128x128.png assets/raspberry_128x128_rgab5515.h
Apologies for the late reply. Thank you @Wren6991, I gave the command a try and it worked like a charm! I did have to modify the command slightly, as my image did not have any transparency data. Swithing to -sdf worked fine, for anyone looking to do the same. Thanks again!
I have the code up and running but I am interested in trying an example of my own. What was used to create the image H files? Is this code included in this repo? Thanks