Arduboy-homemade-package/board-package-source/libraries/ArduboyFX/examples/chompies/fxdata.txt

70 lines
2.3 KiB
Plaintext

/*******************************************************************************
FX Data resource file.
********************************************************************************
Run this file through the fx-data.py Python script (drag and drop) to create
a c-style header file that can be included with your project.
a .bin file will also be created containing the actual resource data. This .bin
file can be uploaded to the FX flash chip using the uploader-gui.py Python
script (Use Upload Development data button).
The .bin file can also be uploaded to FX flash chip using the flash-writer.py
Python command line script using the -d switch.
Data types:
int8_t, uint8_t values will be stored as 8-bit bytes (unsigned char)
int16_t, uint16_t values will be stored as 16-bit (half)words (int)
int24_t,uint24_t values will be stored as 24-bit address that points to
a FX data resource
int32_t,uint32_t values will be stored as 32-bit long words
image_t a filename with a relative path to a .bmp or .png image file
raw_t a filename with a relative path to a raw file
to create a constant to point to a FX resource, a similar format as in C(++):
is used.
image_t FXlogo = "FX-logo.png";
image_t FxSprite = "FXSprite.png";
when data of the same format is used the data type may be ommited. The semicolon
may also be ommited in all cases.
image_t FXlogo = "FX-logo.png"
FxSprite = "FXSprite.png"
or even:
image_t FXlogo = "FX-logo.png", FxSprite = "FXSprite.png"
When specifying multiple data make sure they are seperated by at least a space
(comma is optional). A data array can be simplified. For examle:
uint8_t tilemap[] = {
0, 1, 2, 3, 4, 5, 6
};
can also be written simply as:
uint8_t tilemap = 0 1 2 3 4 5 6
data can be commented out using // for a single line or
using /* */ for a block comment
********************************************************************************
Chompies draw bitmap example :
*******************************************************************************/
// A large map background image:
image_t map = "assets/map.png"
// chompies masked sprite image:
image_t whale = "assets/whale.png"