all FX functions are now safe wrapped and I added the crate to the docs also it is added to the prelude
This commit is contained in:
parent
522844499e
commit
b9e517fa21
1649 changed files with 72257 additions and 0 deletions
2
Examples/ArduboyFX/fxchompies/assets/licence.txt
Normal file
2
Examples/ArduboyFX/fxchompies/assets/licence.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
The map and whale images were made by Arduboy community member and twitter user
|
||||
2bitCrook and are shared under a CC-BY-NC-SA licence.
|
BIN
Examples/ArduboyFX/fxchompies/assets/map.png
Normal file
BIN
Examples/ArduboyFX/fxchompies/assets/map.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
BIN
Examples/ArduboyFX/fxchompies/assets/whale.png
Normal file
BIN
Examples/ArduboyFX/fxchompies/assets/whale.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 920 B |
BIN
Examples/ArduboyFX/fxchompies/fxdata/fxdata.bin
Normal file
BIN
Examples/ArduboyFX/fxchompies/fxdata/fxdata.bin
Normal file
Binary file not shown.
19
Examples/ArduboyFX/fxchompies/fxdata/fxdata.h
Normal file
19
Examples/ArduboyFX/fxchompies/fxdata/fxdata.h
Normal file
|
@ -0,0 +1,19 @@
|
|||
#pragma once
|
||||
|
||||
/**** FX data header generated by fxdata-build.py tool version 1.07 ****/
|
||||
|
||||
using uint24_t = __uint24;
|
||||
|
||||
// Initialize FX hardware using FX::begin(FX_DATA_PAGE); in the setup() function.
|
||||
|
||||
constexpr uint16_t FX_DATA_PAGE = 0xff65;
|
||||
constexpr uint24_t FX_DATA_BYTES = 39470;
|
||||
|
||||
constexpr uint24_t mapGfx = 0x000000;
|
||||
constexpr uint16_t mapGfxWidth = 816;
|
||||
constexpr uint16_t mapGfxHeight = 368;
|
||||
|
||||
constexpr uint24_t whaleGfx = 0x0092A4;
|
||||
constexpr uint16_t whaleGfxWidth = 107;
|
||||
constexpr uint16_t whaleGfxHeight = 69;
|
||||
|
69
Examples/ArduboyFX/fxchompies/fxdata/fxdata.txt
Normal file
69
Examples/ArduboyFX/fxchompies/fxdata/fxdata.txt
Normal file
|
@ -0,0 +1,69 @@
|
|||
/*******************************************************************************
|
||||
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 mapGfx = "../assets/map.png"
|
||||
|
||||
// chompies masked sprite image:
|
||||
|
||||
image_t whaleGfx = "../assets/whale.png"
|
Loading…
Add table
Add a link
Reference in a new issue