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: 413 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 260 B

View file

@ -0,0 +1,83 @@
ArduboyLogo_Frame[] = {
int16_t 20, -15, int24_t ArduboyLogo, int8_t 0, dbmNormal_end
int16_t 20, -14, int24_t ArduboyLogo, int8_t 0, dbmNormal_end
int16_t 20, -13, int24_t ArduboyLogo, int8_t 0, dbmNormal_end
int16_t 20, -12, int24_t ArduboyLogo, int8_t 0, dbmNormal_end
int16_t 20, -11, int24_t ArduboyLogo, int8_t 0, dbmNormal_end
int16_t 20, -10, int24_t ArduboyLogo, int8_t 0, dbmNormal_end
int16_t 20, -9, int24_t ArduboyLogo, int8_t 0, dbmNormal_end
int16_t 20, -8, int24_t ArduboyLogo, int8_t 0, dbmNormal_end
int16_t 20, -7, int24_t ArduboyLogo, int8_t 0, dbmNormal_end
int16_t 20, -6, int24_t ArduboyLogo, int8_t 0, dbmNormal_end
int16_t 20, -5, int24_t ArduboyLogo, int8_t 0, dbmNormal_end
int16_t 20, -4, int24_t ArduboyLogo, int8_t 0, dbmNormal_end
int16_t 20, -3, int24_t ArduboyLogo, int8_t 0, dbmNormal_end
int16_t 20, -2, int24_t ArduboyLogo, int8_t 0, dbmNormal_end
int16_t 20, -1, int24_t ArduboyLogo, int8_t 0, dbmNormal_end
int16_t 20, 0, int24_t ArduboyLogo, int8_t 0, dbmNormal_end
int16_t 20, 1, int24_t ArduboyLogo, int8_t 0, dbmNormal_end
int16_t 20, 2, int24_t ArduboyLogo, int8_t 0, dbmNormal_end
int16_t 20, 3, int24_t ArduboyLogo, int8_t 0, dbmNormal_end
int16_t 20, 4, int24_t ArduboyLogo, int8_t 0, dbmNormal_end
int16_t 20, 5, int24_t ArduboyLogo, int8_t 0, dbmNormal_end
int16_t 20, 6, int24_t ArduboyLogo, int8_t 0, dbmNormal_end
int16_t 20, 7, int24_t ArduboyLogo, int8_t 0, dbmNormal_end
int16_t 20, 8, int24_t ArduboyLogo, int8_t 0, dbmNormal_end
int16_t 20, 9, int24_t ArduboyLogo, int8_t 0, dbmNormal_end
int16_t 20, 10, int24_t ArduboyLogo, int8_t 0, dbmNormal_end
int16_t 20, 11, int24_t ArduboyLogo, int8_t 0, dbmNormal_end
int16_t 20, 12, int24_t ArduboyLogo, int8_t 0, dbmNormal_end
int16_t 20, 13, int24_t ArduboyLogo, int8_t 0, dbmNormal_end
int16_t 20, 14, int24_t ArduboyLogo, int8_t 0, dbmNormal_end
int16_t 20, 15, int24_t ArduboyLogo, int8_t 0, dbmNormal_end
int16_t 20, 16, int24_t ArduboyLogo, int8_t 0, dbmNormal_end
int16_t 20, 17, int24_t ArduboyLogo, int8_t 0, dbmNormal_end
int16_t 20, 18, int24_t ArduboyLogo, int8_t 0, dbmNormal_end
int16_t 20, 19, int24_t ArduboyLogo, int8_t 0, dbmNormal_end
int16_t 20, 20, int24_t ArduboyLogo, int8_t 0, dbmNormal_end
int16_t 20, 21, int24_t ArduboyLogo, int8_t 0, dbmNormal_end
int16_t 20, 22, int24_t ArduboyLogo, int8_t 0, dbmNormal_end
int16_t 20, 23, int24_t ArduboyLogo, int8_t 0, dbmNormal_end
int16_t 20, 24, int24_t ArduboyLogo, int8_t 0, dbmNormal_last
}

Binary file not shown.

View file

@ -0,0 +1,21 @@
#pragma once
/**** FX data header generated by fxdata-build.py tool version 1.12 ****/
using uint24_t = __uint24;
// Initialize FX hardware using FX::begin(FX_DATA_PAGE); in the setup() function.
constexpr uint16_t FX_DATA_PAGE = 0xfffd;
constexpr uint24_t FX_DATA_BYTES = 674;
constexpr uint24_t ArduboyLogo = 0x000000;
constexpr uint16_t ArduboyLogoWidth = 88;
constexpr uint16_t ArduboyLogoHeight = 16;
constexpr uint24_t FXLogo = 0x0000B4;
constexpr uint16_t FXLogoWidth = 28;
constexpr uint16_t FXLogoHeight = 16;
constexpr uint24_t ArduboyLogo_Frame = 0x000128;
constexpr uint24_t ArduboyLogo_LastFrame = 0x000290;

View file

@ -0,0 +1,95 @@
/*******************************************************************************
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 Arduino plugin or using the
fxdata-upload.py or uploader-gui.py (Use Upload Development data button).
Note fxdata.txt file maybe split up into multiple parts and can be included
using the include directive.
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 arduboyLogo = "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
Symbols
For the drawFrames functions there are some predefined bitmap mode symbols:
dbmNormal
dbmOverwrite
dbmWhite
dbmReverse
dbmBlack
dbmInvert
dbmMasked
to mark the end of a frame _end is appended to the above symbols like
dbmNormal_end
to mark the end of the last frame in a frames list append _last to the above
symbols like
dbmNormal_last
********************************************************************************
drawFrame example :
*******************************************************************************/
// Arduboy FX logo image:
image_t ArduboyLogo = "../assets/arduboy-logo.png"
image_t FXLogo = "../assets/fx-logo.png"
include "ArduboyLogo_Frame.txt"
ArduboyLogo_LastFrame[] = { // create a reference to last frame
int16_t 12, 24, int24_t ArduboyLogo, int8_t 0, dbmNormal
int16_t 100, 24, int24_t FXLogo, int8_t 0, dbmMasked_last
}