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:
ZennDev1337 2023-10-04 14:55:54 +02:00
parent 522844499e
commit b9e517fa21
1649 changed files with 72257 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 206 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 843 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 252 B

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,21 @@
#pragma once
/**** FX data header generated by fxdata-build.py tool version 1.15 ****/
using uint24_t = __uint24;
// Initialize FX hardware using FX::begin(FX_DATA_PAGE); in the setup() function.
constexpr uint16_t FX_DATA_PAGE = 0xfffe;
constexpr uint24_t FX_DATA_BYTES = 392;
constexpr uint24_t FX_DATA_TILES = 0x000000;
constexpr uint16_t FX_DATA_TILES_WIDTH = 16;
constexpr uint16_t FX_DATA_TILESHEIGHT = 16;
constexpr uint8_t FX_DATA_TILES_FRAMES = 2;
constexpr uint24_t FX_DATA_TILEMAP = 0x000044;
constexpr uint24_t FX_DATA_BALLS = 0x000144;
constexpr uint16_t FX_DATA_BALLS_WIDTH = 16;
constexpr uint16_t FX_DATA_BALLSHEIGHT = 16;

View file

@ -0,0 +1,97 @@
/*******************************************************************************
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
********************************************************************************
Draw balls demo example :
*******************************************************************************/
// Background tiles graphics
image_t FX_DATA_TILES = "../assets/tiles_16x16.png"
// 16 x 16 tilemap
uint8_t FX_DATA_TILEMAP[] = {
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01,
0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
0x01, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x01, 0x00, 0x01, 0x00,
0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x01,
0x01, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
0x00, 0x01, 0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01,
0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
0x01, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x01, 0x00, 0x01, 0x00,
0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x01,
0x01, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
0x00, 0x01, 0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01,
0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01
};
// masked ball sprite graphics
image_t FX_DATA_BALLS = "../assets//ball.png"
//image_t FX_DATA_BALLS = "../assets/ball_16x16.png"