6
.idea/Rust-for-Arduboy.iml
generated
|
@ -20,6 +20,12 @@
|
|||
<sourceFolder url="file://$MODULE_DIR$/Examples/snake/src" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/Project/game/src" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/arduboy-rust/src" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/Examples/ArduboyFX/fxbasicexample/src" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/Examples/ArduboyFX/fxchompies/src" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/Examples/ArduboyFX/fxdrawballs/src" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/Examples/ArduboyFX/fxdrawframes/src" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/Examples/ArduboyFX/fxhelloworld/src" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/Examples/ArduboyFX/fxloadgamestate/src" isTestSource="false" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/target" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
|
|
3
.idea/dictionaries/zenn.xml
generated
Normal file
|
@ -0,0 +1,3 @@
|
|||
<component name="ProjectDictionaryState">
|
||||
<dictionary name="zenn" />
|
||||
</component>
|
10
.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
|
@ -0,0 +1,10 @@
|
|||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="DuplicatedCode" enabled="true" level="WEAK WARNING" enabled_by_default="true">
|
||||
<Languages>
|
||||
<language minSize="268" name="Rust" />
|
||||
</Languages>
|
||||
</inspection_tool>
|
||||
</profile>
|
||||
</component>
|
1
.idea/vcs.xml
generated
|
@ -2,6 +2,5 @@
|
|||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/Project/arduboy_fx" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
42
Cargo.lock
generated
|
@ -114,6 +114,48 @@ dependencies = [
|
|||
"arduboy-rust",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fxbasicexample"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"arduboy-rust",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fxchompies"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"arduboy-rust",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fxdrawballs"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"arduboy-rust",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fxdrawframes"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"arduboy-rust",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fxhelloworld"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"arduboy-rust",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fxloadgamestate"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"arduboy-rust",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "game"
|
||||
version = "0.1.0"
|
||||
|
|
|
@ -13,6 +13,12 @@ members = [
|
|||
"Examples/Arduboy-Tutorials/demo6",
|
||||
"Examples/Arduboy-Tutorials/demo7",
|
||||
"Examples/Arduboy-Tutorials/demo9",
|
||||
"Examples/ArduboyFX/fxbasicexample",
|
||||
"Examples/ArduboyFX/fxchompies",
|
||||
"Examples/ArduboyFX/fxdrawballs",
|
||||
"Examples/ArduboyFX/fxdrawframes",
|
||||
"Examples/ArduboyFX/fxhelloworld",
|
||||
"Examples/ArduboyFX/fxloadgamestate",
|
||||
"Examples/drboy",
|
||||
"Examples/ardvoice",
|
||||
"Examples/rustacean",
|
||||
|
|
|
@ -223,8 +223,8 @@ unsafe fn gameplay() {
|
|||
arduboy.set_cursor(101, 2);
|
||||
arduboy.print(G.ai_score as u16);
|
||||
|
||||
arduboy.draw_fast_hline(0, 0, WIDTH, Color::White);
|
||||
arduboy.draw_fast_hline(0, (HEIGHT - 1) as i16, WIDTH, Color::White);
|
||||
arduboy.draw_fast_hline(0, 0, WIDTH as u8, Color::White);
|
||||
arduboy.draw_fast_hline(0, (HEIGHT - 1) as i16, WIDTH as u8, Color::White);
|
||||
|
||||
G.player.draw();
|
||||
G.ai.draw();
|
||||
|
|
|
@ -12,7 +12,7 @@ const WORLD_HEIGHT: usize = 7;
|
|||
const PLAYER_SIZE: i16 = 16;
|
||||
const PLAYER_X_OFFSET: i16 = WIDTH as i16 / 2 - PLAYER_SIZE / 2;
|
||||
const PLAYER_Y_OFFSET: i16 = HEIGHT as i16 / 2 - PLAYER_SIZE / 2;
|
||||
const TILE_SIZE: u8 = 16;
|
||||
const TILE_SIZE: i16 = 16;
|
||||
const GRASS: u8 = 0;
|
||||
const WATER: u8 = 1;
|
||||
const TREES: u8 = 2;
|
||||
|
@ -119,20 +119,20 @@ unsafe fn draw_player() {
|
|||
}
|
||||
|
||||
unsafe fn draw_world() {
|
||||
let tileswide: u8 = WIDTH / TILE_SIZE + 1;
|
||||
let tilestall: u8 = HEIGHT / TILE_SIZE + 1;
|
||||
for y in 0..tilestall as i16 {
|
||||
for x in 0..tileswide as i16 {
|
||||
let tilesx: i16 = x - mapx / TILE_SIZE as i16;
|
||||
let tilesy: i16 = y - mapy / TILE_SIZE as i16;
|
||||
let tileswide: i16 = WIDTH / TILE_SIZE + 1;
|
||||
let tilestall: i16 = HEIGHT / TILE_SIZE + 1;
|
||||
for y in 0..tilestall {
|
||||
for x in 0..tileswide {
|
||||
let tilesx: i16 = x - mapx / TILE_SIZE;
|
||||
let tilesy: i16 = y - mapy / TILE_SIZE;
|
||||
if tilesx >= 0
|
||||
&& tilesy >= 0
|
||||
&& tilesx < WORLD_WIDTH as i16
|
||||
&& tilesy < WORLD_HEIGHT as i16
|
||||
{
|
||||
sprites::draw_override(
|
||||
x * TILE_SIZE as i16 + mapx % TILE_SIZE as i16,
|
||||
y * TILE_SIZE as i16 + mapy % TILE_SIZE as i16,
|
||||
x * TILE_SIZE + mapx % TILE_SIZE,
|
||||
y * TILE_SIZE + mapy % TILE_SIZE,
|
||||
get_sprite_addr!(tiles),
|
||||
world[tilesy as usize][tilesx as usize],
|
||||
)
|
||||
|
@ -141,9 +141,9 @@ unsafe fn draw_world() {
|
|||
}
|
||||
arduboy.fill_rect(0, 0, 48, 8, Color::Black);
|
||||
arduboy.set_cursor(0, 0);
|
||||
arduboy.print(0 - mapx / TILE_SIZE as i16);
|
||||
arduboy.print(0 - mapx / TILE_SIZE);
|
||||
arduboy.print(f!(b",\0"));
|
||||
arduboy.print(0 - mapy / TILE_SIZE as i16)
|
||||
arduboy.print(0 - mapy / TILE_SIZE)
|
||||
}
|
||||
fn titlescreen() {
|
||||
arduboy.set_cursor(0, 0);
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
//Include the Arduboy Library
|
||||
//Initialize the arduboy object
|
||||
use arduboy_rust::prelude::*;
|
||||
use arduboy_tone::arduboy_tone_pitch::*;
|
||||
use arduboy_tones::tones_pitch::*;
|
||||
const arduboy: Arduboy2 = Arduboy2::new();
|
||||
const sound: ArduboyTones = ArduboyTones::new();
|
||||
// Progmem data
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
//Initialize the arduboy object
|
||||
#[allow(unused_imports)]
|
||||
use arduboy_rust::prelude::*;
|
||||
use arduboy_tone::arduboy_tone_pitch::*;
|
||||
use arduboy_tones::tones_pitch::*;
|
||||
const arduboy: Arduboy2 = Arduboy2::new();
|
||||
const sound: ArduboyTones = ArduboyTones::new();
|
||||
const NDUR: u16 = 100;
|
||||
|
|
11
Examples/ArduboyFX/fxbasicexample/Cargo.toml
Normal file
|
@ -0,0 +1,11 @@
|
|||
[package]
|
||||
name = "fxbasicexample"
|
||||
version = "0.1.0"
|
||||
authors = ["ZennDev <zenndev@protonmail.com>"]
|
||||
edition = "2021"
|
||||
|
||||
[lib]
|
||||
crate-type = ["staticlib"]
|
||||
|
||||
[dependencies]
|
||||
arduboy-rust = { path = "../../../arduboy-rust" }
|
BIN
Examples/ArduboyFX/fxbasicexample/assets/FXlogo.png
Normal file
After Width: | Height: | Size: 613 B |
BIN
Examples/ArduboyFX/fxbasicexample/fxdata/fxdata-data.bin
Normal file
BIN
Examples/ArduboyFX/fxbasicexample/fxdata/fxdata.bin
Normal file
15
Examples/ArduboyFX/fxbasicexample/fxdata/fxdata.h
Normal file
|
@ -0,0 +1,15 @@
|
|||
#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 = 0xffff;
|
||||
constexpr uint24_t FX_DATA_BYTES = 234;
|
||||
|
||||
constexpr uint24_t FXlogo = 0x000000;
|
||||
constexpr uint16_t FXlogoWidth = 115;
|
||||
constexpr uint16_t FXlogoHeight = 16;
|
||||
|
65
Examples/ArduboyFX/fxbasicexample/fxdata/fxdata.txt
Normal file
|
@ -0,0 +1,65 @@
|
|||
/*******************************************************************************
|
||||
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
|
||||
|
||||
********************************************************************************
|
||||
basic example :
|
||||
*******************************************************************************/
|
||||
|
||||
// Arduboy FX logo image:
|
||||
|
||||
image_t FXlogo = "../assets/FXlogo.png"
|
51
Examples/ArduboyFX/fxbasicexample/src/lib.rs
Normal file
|
@ -0,0 +1,51 @@
|
|||
#![no_std]
|
||||
#![allow(non_upper_case_globals)]
|
||||
|
||||
//Include the Arduboy Library
|
||||
#[allow(unused_imports)]
|
||||
use arduboy_rust::prelude::*;
|
||||
|
||||
#[allow(dead_code)]
|
||||
const arduboy: Arduboy2 = Arduboy2::new();
|
||||
|
||||
// Progmem data
|
||||
|
||||
// dynamic ram variables
|
||||
const FX_DATA_PAGE: u16 = 0xffff;
|
||||
#[allow(dead_code)]
|
||||
const FX_DATA_BYTES: u32 = 234;
|
||||
const FXlogo: u32 = 0x000000;
|
||||
const FXlogoWith: i16 = 115;
|
||||
const FXlogoHeight: i16 = 16;
|
||||
|
||||
static mut x: i16 = (WIDTH - FXlogoWith) / 2;
|
||||
static mut y: i16 = 25;
|
||||
static mut xDir: i8 = 1;
|
||||
static mut yDir: i8 = 1;
|
||||
// The setup() function runs once when you turn your Arduboy on
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn setup() {
|
||||
// put your setup code here, to run once:
|
||||
arduboy.begin();
|
||||
arduboy.set_frame_rate(30);
|
||||
fx::begin_data(FX_DATA_PAGE);
|
||||
}
|
||||
// The loop() function repeats forever after setup() is done
|
||||
#[no_mangle]
|
||||
#[export_name = "loop"]
|
||||
pub unsafe extern "C" fn loop_() {
|
||||
// put your main code here, to run repeatedly:
|
||||
if !arduboy.next_frame() {
|
||||
return;
|
||||
}
|
||||
fx::draw_bitmap(x, y, FXlogo, 0, 0);
|
||||
x += xDir as i16;
|
||||
y += yDir as i16;
|
||||
if x == 0 || x == WIDTH - FXlogoWith {
|
||||
xDir = -xDir;
|
||||
}
|
||||
if y == 0 || y == HEIGHT - FXlogoHeight {
|
||||
yDir = -yDir;
|
||||
}
|
||||
fx::display_clear()
|
||||
}
|
11
Examples/ArduboyFX/fxchompies/Cargo.toml
Normal file
|
@ -0,0 +1,11 @@
|
|||
[package]
|
||||
name = "fxchompies"
|
||||
version = "0.1.0"
|
||||
authors = ["ZennDev <zenndev@protonmail.com>"]
|
||||
edition = "2021"
|
||||
|
||||
[lib]
|
||||
crate-type = ["staticlib"]
|
||||
|
||||
[dependencies]
|
||||
arduboy-rust = { path = "../../../arduboy-rust" }
|
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
After Width: | Height: | Size: 14 KiB |
BIN
Examples/ArduboyFX/fxchompies/assets/whale.png
Normal file
After Width: | Height: | Size: 920 B |
BIN
Examples/ArduboyFX/fxchompies/fxdata/fxdata-data.bin
Normal file
BIN
Examples/ArduboyFX/fxchompies/fxdata/fxdata.bin
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.15 ****/
|
||||
|
||||
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
|
@ -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"
|
105
Examples/ArduboyFX/fxchompies/src/lib.rs
Normal file
|
@ -0,0 +1,105 @@
|
|||
#![no_std]
|
||||
#![allow(non_upper_case_globals)]
|
||||
|
||||
//Include the Arduboy Library
|
||||
//Initialize the arduboy object
|
||||
use arduboy_rust::prelude::*;
|
||||
use arduboyfx::fx_consts::*;
|
||||
const arduboy: Arduboy2 = Arduboy2::new();
|
||||
|
||||
// FX Data
|
||||
const FX_DATA_PAGE: u16 = 0xff65;
|
||||
const FX_DATA_BYTES: u32 = 39470;
|
||||
const mapGfx: u32 = 0x000000;
|
||||
const mapGfxWidth: u16 = 816;
|
||||
const mapGfxHeight: u16 = 368;
|
||||
const whaleGfx: u32 = 0x0092A4;
|
||||
const whaleGfxWidth: u16 = 107;
|
||||
const whaleGfxHeight: u16 = 69;
|
||||
|
||||
static mut showposition: bool = true;
|
||||
static mut select: usize = 0;
|
||||
static mut color: u8 = 0;
|
||||
static mut x: [i16; 2] = [0, 0];
|
||||
static mut y: [i16; 2] = [0, 0];
|
||||
static mut mode: u8 = 0;
|
||||
|
||||
//The setup() function runs once when you turn your Arduboy on
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn setup() {
|
||||
// put your setup code here, to run once:
|
||||
arduboy.begin();
|
||||
arduboy.set_frame_rate(120);
|
||||
fx::begin_data(FX_DATA_PAGE);
|
||||
}
|
||||
#[no_mangle]
|
||||
#[export_name = "loop"]
|
||||
pub unsafe extern "C" fn loop_() {
|
||||
// put your main code here, to run repeatedly:
|
||||
if !arduboy.next_frame() {
|
||||
return;
|
||||
}
|
||||
arduboy.poll_buttons();
|
||||
if arduboy.pressed(A) && arduboy.pressed(B) {
|
||||
if arduboy.every_x_frames(120) {
|
||||
mode += 1;
|
||||
if mode == 5 {
|
||||
mode = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
if arduboy.just_pressed(B) {
|
||||
showposition = !showposition;
|
||||
}
|
||||
if arduboy.pressed(B) {
|
||||
select = 0;
|
||||
} else {
|
||||
select = 1
|
||||
}
|
||||
if arduboy.just_pressed(A) {
|
||||
color ^= dbmReverse;
|
||||
}
|
||||
if arduboy.pressed(A) {
|
||||
if arduboy.just_pressed(UP) {
|
||||
y[select] -= 1;
|
||||
}
|
||||
if arduboy.just_pressed(DOWN) {
|
||||
y[select] += 1;
|
||||
}
|
||||
if arduboy.just_pressed(LEFT) {
|
||||
x[select] -= 1;
|
||||
}
|
||||
if arduboy.just_pressed(RIGHT) {
|
||||
x[select] += 1;
|
||||
}
|
||||
} else {
|
||||
if arduboy.pressed(UP) {
|
||||
y[select] -= 1;
|
||||
}
|
||||
if arduboy.pressed(DOWN) {
|
||||
y[select] += 1;
|
||||
}
|
||||
if arduboy.pressed(LEFT) {
|
||||
x[select] -= 1;
|
||||
}
|
||||
if arduboy.pressed(RIGHT) {
|
||||
x[select] += 1;
|
||||
}
|
||||
}
|
||||
fx::draw_bitmap(x[0], y[0], mapGfx, 0, dbmNormal);
|
||||
match mode {
|
||||
0 => fx::draw_bitmap(x[1], y[1], whaleGfx, 0, dbmMasked | color),
|
||||
1 => fx::draw_bitmap(x[1], y[1], whaleGfx, 0, dbfMasked | dbmBlack),
|
||||
2 => fx::draw_bitmap(x[1], y[1], whaleGfx, 0, dbfMasked | dbmWhite),
|
||||
3 => fx::draw_bitmap(x[1], y[1], whaleGfx, 0, dbfMasked | dbmInvert),
|
||||
4 => fx::draw_bitmap(x[1], y[1], whaleGfx, 0, dbfMasked | dbmReverse),
|
||||
_ => (),
|
||||
}
|
||||
if showposition {
|
||||
arduboy.set_cursor(0, 0);
|
||||
arduboy.print(x[select]);
|
||||
arduboy.set_cursor(0, 8);
|
||||
arduboy.print(y[select]);
|
||||
}
|
||||
fx::display_clear();
|
||||
}
|
11
Examples/ArduboyFX/fxdrawballs/Cargo.toml
Normal file
|
@ -0,0 +1,11 @@
|
|||
[package]
|
||||
name = "fxdrawballs"
|
||||
version = "0.1.0"
|
||||
authors = ["ZennDev <zenndev@protonmail.com>"]
|
||||
edition = "2021"
|
||||
|
||||
[lib]
|
||||
crate-type = ["staticlib"]
|
||||
|
||||
[dependencies]
|
||||
arduboy-rust = { path = "../../../arduboy-rust" }
|
BIN
Examples/ArduboyFX/fxdrawballs/assets/ball.png
Normal file
After Width: | Height: | Size: 206 B |
BIN
Examples/ArduboyFX/fxdrawballs/assets/ball_16x16.png
Normal file
After Width: | Height: | Size: 843 B |
BIN
Examples/ArduboyFX/fxdrawballs/assets/tiles_16x16.png
Normal file
After Width: | Height: | Size: 252 B |
BIN
Examples/ArduboyFX/fxdrawballs/fxdata/fxdata-data.bin
Normal file
BIN
Examples/ArduboyFX/fxdrawballs/fxdata/fxdata.bin
Normal file
21
Examples/ArduboyFX/fxdrawballs/fxdata/fxdata.h
Normal 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;
|
||||
|
97
Examples/ArduboyFX/fxdrawballs/fxdata/fxdata.txt
Normal 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"
|
581
Examples/ArduboyFX/fxdrawballs/src/lib.rs
Normal file
|
@ -0,0 +1,581 @@
|
|||
#![no_std]
|
||||
#![allow(non_upper_case_globals)]
|
||||
|
||||
use arduboy_rust::arduboyfx::fx_consts::{dbmMasked, dbmNormal};
|
||||
//Include the Arduboy Library
|
||||
//Initialize the arduboy object
|
||||
use arduboy_rust::prelude::*;
|
||||
const arduboy: Arduboy2 = Arduboy2::new();
|
||||
|
||||
// FX Data
|
||||
const FX_DATA_PAGE: u16 = 0xfffe;
|
||||
const FX_DATA_BYTES: u32 = 392;
|
||||
const FX_DATA_TILES: u32 = 0x000000;
|
||||
const FX_DATA_TILES_WIDTH: u16 = 16;
|
||||
const FX_DATA_TILESHEIGHT: u16 = 16;
|
||||
const FX_DATA_TILES_FRAMES: u8 = 2;
|
||||
const FX_DATA_TILEMAP: u32 = 0x000044;
|
||||
const FX_DATA_BALLS: u32 = 0x000144;
|
||||
const FX_DATA_BALLS_WIDTH: u16 = 16;
|
||||
const FX_DATA_BALLSHEIGHT: u16 = 16;
|
||||
|
||||
const FRAME_RATE: u8 = 60;
|
||||
const MAX_BALLS: u8 = 55;
|
||||
const CIRCLE_POINTS: u8 = 84;
|
||||
const VISABLE_TILES_PER_COLUMN: u8 = 5;
|
||||
const VISABLE_TILES_PER_ROW: u8 = 9;
|
||||
|
||||
const ballWidth: u8 = 16;
|
||||
const ballHeight: u8 = 16;
|
||||
const tilemapWidth: u8 = 16;
|
||||
const tileWidth: u8 = 16;
|
||||
const tileHeight: u8 = 16;
|
||||
|
||||
static mut circle_points: [Point; CIRCLE_POINTS as usize] = [
|
||||
Point { x: -15, y: 0 },
|
||||
Point { x: -15, y: 1 },
|
||||
Point { x: -15, y: 2 },
|
||||
Point { x: -15, y: 3 },
|
||||
Point { x: -15, y: 4 },
|
||||
Point { x: -14, y: 5 },
|
||||
Point { x: -14, y: 6 },
|
||||
Point { x: -13, y: 7 },
|
||||
Point { x: -13, y: 8 },
|
||||
Point { x: -12, y: 9 },
|
||||
Point { x: -11, y: 10 },
|
||||
Point { x: -10, y: 11 },
|
||||
Point { x: -9, y: 12 },
|
||||
Point { x: -8, y: 13 },
|
||||
Point { x: -7, y: 13 },
|
||||
Point { x: -6, y: 14 },
|
||||
Point { x: -5, y: 14 },
|
||||
Point { x: -4, y: 14 },
|
||||
Point { x: -3, y: 15 },
|
||||
Point { x: -2, y: 15 },
|
||||
Point { x: -1, y: 15 },
|
||||
Point { x: 0, y: 15 },
|
||||
Point { x: 1, y: 15 },
|
||||
Point { x: 2, y: 15 },
|
||||
Point { x: 3, y: 15 },
|
||||
Point { x: 4, y: 14 },
|
||||
Point { x: 5, y: 14 },
|
||||
Point { x: 6, y: 14 },
|
||||
Point { x: 7, y: 13 },
|
||||
Point { x: 8, y: 13 },
|
||||
Point { x: 9, y: 12 },
|
||||
Point { x: 10, y: 11 },
|
||||
Point { x: 11, y: 10 },
|
||||
Point { x: 12, y: 9 },
|
||||
Point { x: 12, y: 8 },
|
||||
Point { x: 13, y: 7 },
|
||||
Point { x: 13, y: 6 },
|
||||
Point { x: 14, y: 5 },
|
||||
Point { x: 14, y: 4 },
|
||||
Point { x: 14, y: 3 },
|
||||
Point { x: 14, y: 2 },
|
||||
Point { x: 14, y: 1 },
|
||||
Point { x: 15, y: 0 },
|
||||
Point { x: 15, y: -1 },
|
||||
Point { x: 15, y: -2 },
|
||||
Point { x: 15, y: -3 },
|
||||
Point { x: 15, y: -4 },
|
||||
Point { x: 14, y: -5 },
|
||||
Point { x: 14, y: -6 },
|
||||
Point { x: 13, y: -7 },
|
||||
Point { x: 13, y: -8 },
|
||||
Point { x: 12, y: -9 },
|
||||
Point { x: 11, y: -10 },
|
||||
Point { x: 10, y: -11 },
|
||||
Point { x: 9, y: -12 },
|
||||
Point { x: 8, y: -13 },
|
||||
Point { x: 7, y: -13 },
|
||||
Point { x: 6, y: -14 },
|
||||
Point { x: 5, y: -14 },
|
||||
Point { x: 4, y: -14 },
|
||||
Point { x: 3, y: -15 },
|
||||
Point { x: 2, y: -15 },
|
||||
Point { x: 1, y: -15 },
|
||||
Point { x: 0, y: -15 },
|
||||
Point { x: -1, y: -15 },
|
||||
Point { x: -2, y: -15 },
|
||||
Point { x: -3, y: -15 },
|
||||
Point { x: -4, y: -14 },
|
||||
Point { x: -5, y: -14 },
|
||||
Point { x: -6, y: -14 },
|
||||
Point { x: -7, y: -13 },
|
||||
Point { x: -8, y: -13 },
|
||||
Point { x: -9, y: -12 },
|
||||
Point { x: -10, y: -11 },
|
||||
Point { x: -11, y: -10 },
|
||||
Point { x: -12, y: -9 },
|
||||
Point { x: -12, y: -8 },
|
||||
Point { x: -13, y: -7 },
|
||||
Point { x: -13, y: -6 },
|
||||
Point { x: -14, y: -5 },
|
||||
Point { x: -14, y: -4 },
|
||||
Point { x: -14, y: -3 },
|
||||
Point { x: -14, y: -2 },
|
||||
Point { x: -14, y: -1 },
|
||||
];
|
||||
|
||||
static mut camera: Point = Point { x: 0, y: 0 };
|
||||
static mut map_location: Point = Point { x: 16, y: 16 };
|
||||
struct Ball {
|
||||
x: i16,
|
||||
y: i16,
|
||||
xspeed: i16,
|
||||
yspeed: i16,
|
||||
}
|
||||
|
||||
static mut ball: [Ball; MAX_BALLS as usize] = [
|
||||
Ball {
|
||||
x: 0,
|
||||
y: 0,
|
||||
xspeed: 0,
|
||||
yspeed: 0,
|
||||
},
|
||||
Ball {
|
||||
x: 0,
|
||||
y: 0,
|
||||
xspeed: 0,
|
||||
yspeed: 0,
|
||||
},
|
||||
Ball {
|
||||
x: 0,
|
||||
y: 0,
|
||||
xspeed: 0,
|
||||
yspeed: 0,
|
||||
},
|
||||
Ball {
|
||||
x: 0,
|
||||
y: 0,
|
||||
xspeed: 0,
|
||||
yspeed: 0,
|
||||
},
|
||||
Ball {
|
||||
x: 0,
|
||||
y: 0,
|
||||
xspeed: 0,
|
||||
yspeed: 0,
|
||||
},
|
||||
Ball {
|
||||
x: 0,
|
||||
y: 0,
|
||||
xspeed: 0,
|
||||
yspeed: 0,
|
||||
},
|
||||
Ball {
|
||||
x: 0,
|
||||
y: 0,
|
||||
xspeed: 0,
|
||||
yspeed: 0,
|
||||
},
|
||||
Ball {
|
||||
x: 0,
|
||||
y: 0,
|
||||
xspeed: 0,
|
||||
yspeed: 0,
|
||||
},
|
||||
Ball {
|
||||
x: 0,
|
||||
y: 0,
|
||||
xspeed: 0,
|
||||
yspeed: 0,
|
||||
},
|
||||
Ball {
|
||||
x: 0,
|
||||
y: 0,
|
||||
xspeed: 0,
|
||||
yspeed: 0,
|
||||
},
|
||||
Ball {
|
||||
x: 0,
|
||||
y: 0,
|
||||
xspeed: 0,
|
||||
yspeed: 0,
|
||||
},
|
||||
Ball {
|
||||
x: 0,
|
||||
y: 0,
|
||||
xspeed: 0,
|
||||
yspeed: 0,
|
||||
},
|
||||
Ball {
|
||||
x: 0,
|
||||
y: 0,
|
||||
xspeed: 0,
|
||||
yspeed: 0,
|
||||
},
|
||||
Ball {
|
||||
x: 0,
|
||||
y: 0,
|
||||
xspeed: 0,
|
||||
yspeed: 0,
|
||||
},
|
||||
Ball {
|
||||
x: 0,
|
||||
y: 0,
|
||||
xspeed: 0,
|
||||
yspeed: 0,
|
||||
},
|
||||
Ball {
|
||||
x: 0,
|
||||
y: 0,
|
||||
xspeed: 0,
|
||||
yspeed: 0,
|
||||
},
|
||||
Ball {
|
||||
x: 0,
|
||||
y: 0,
|
||||
xspeed: 0,
|
||||
yspeed: 0,
|
||||
},
|
||||
Ball {
|
||||
x: 0,
|
||||
y: 0,
|
||||
xspeed: 0,
|
||||
yspeed: 0,
|
||||
},
|
||||
Ball {
|
||||
x: 0,
|
||||
y: 0,
|
||||
xspeed: 0,
|
||||
yspeed: 0,
|
||||
},
|
||||
Ball {
|
||||
x: 0,
|
||||
y: 0,
|
||||
xspeed: 0,
|
||||
yspeed: 0,
|
||||
},
|
||||
Ball {
|
||||
x: 0,
|
||||
y: 0,
|
||||
xspeed: 0,
|
||||
yspeed: 0,
|
||||
},
|
||||
Ball {
|
||||
x: 0,
|
||||
y: 0,
|
||||
xspeed: 0,
|
||||
yspeed: 0,
|
||||
},
|
||||
Ball {
|
||||
x: 0,
|
||||
y: 0,
|
||||
xspeed: 0,
|
||||
yspeed: 0,
|
||||
},
|
||||
Ball {
|
||||
x: 0,
|
||||
y: 0,
|
||||
xspeed: 0,
|
||||
yspeed: 0,
|
||||
},
|
||||
Ball {
|
||||
x: 0,
|
||||
y: 0,
|
||||
xspeed: 0,
|
||||
yspeed: 0,
|
||||
},
|
||||
Ball {
|
||||
x: 0,
|
||||
y: 0,
|
||||
xspeed: 0,
|
||||
yspeed: 0,
|
||||
},
|
||||
Ball {
|
||||
x: 0,
|
||||
y: 0,
|
||||
xspeed: 0,
|
||||
yspeed: 0,
|
||||
},
|
||||
Ball {
|
||||
x: 0,
|
||||
y: 0,
|
||||
xspeed: 0,
|
||||
yspeed: 0,
|
||||
},
|
||||
Ball {
|
||||
x: 0,
|
||||
y: 0,
|
||||
xspeed: 0,
|
||||
yspeed: 0,
|
||||
},
|
||||
Ball {
|
||||
x: 0,
|
||||
y: 0,
|
||||
xspeed: 0,
|
||||
yspeed: 0,
|
||||
},
|
||||
Ball {
|
||||
x: 0,
|
||||
y: 0,
|
||||
xspeed: 0,
|
||||
yspeed: 0,
|
||||
},
|
||||
Ball {
|
||||
x: 0,
|
||||
y: 0,
|
||||
xspeed: 0,
|
||||
yspeed: 0,
|
||||
},
|
||||
Ball {
|
||||
x: 0,
|
||||
y: 0,
|
||||
xspeed: 0,
|
||||
yspeed: 0,
|
||||
},
|
||||
Ball {
|
||||
x: 0,
|
||||
y: 0,
|
||||
xspeed: 0,
|
||||
yspeed: 0,
|
||||
},
|
||||
Ball {
|
||||
x: 0,
|
||||
y: 0,
|
||||
xspeed: 0,
|
||||
yspeed: 0,
|
||||
},
|
||||
Ball {
|
||||
x: 0,
|
||||
y: 0,
|
||||
xspeed: 0,
|
||||
yspeed: 0,
|
||||
},
|
||||
Ball {
|
||||
x: 0,
|
||||
y: 0,
|
||||
xspeed: 0,
|
||||
yspeed: 0,
|
||||
},
|
||||
Ball {
|
||||
x: 0,
|
||||
y: 0,
|
||||
xspeed: 0,
|
||||
yspeed: 0,
|
||||
},
|
||||
Ball {
|
||||
x: 0,
|
||||
y: 0,
|
||||
xspeed: 0,
|
||||
yspeed: 0,
|
||||
},
|
||||
Ball {
|
||||
x: 0,
|
||||
y: 0,
|
||||
xspeed: 0,
|
||||
yspeed: 0,
|
||||
},
|
||||
Ball {
|
||||
x: 0,
|
||||
y: 0,
|
||||
xspeed: 0,
|
||||
yspeed: 0,
|
||||
},
|
||||
Ball {
|
||||
x: 0,
|
||||
y: 0,
|
||||
xspeed: 0,
|
||||
yspeed: 0,
|
||||
},
|
||||
Ball {
|
||||
x: 0,
|
||||
y: 0,
|
||||
xspeed: 0,
|
||||
yspeed: 0,
|
||||
},
|
||||
Ball {
|
||||
x: 0,
|
||||
y: 0,
|
||||
xspeed: 0,
|
||||
yspeed: 0,
|
||||
},
|
||||
Ball {
|
||||
x: 0,
|
||||
y: 0,
|
||||
xspeed: 0,
|
||||
yspeed: 0,
|
||||
},
|
||||
Ball {
|
||||
x: 0,
|
||||
y: 0,
|
||||
xspeed: 0,
|
||||
yspeed: 0,
|
||||
},
|
||||
Ball {
|
||||
x: 0,
|
||||
y: 0,
|
||||
xspeed: 0,
|
||||
yspeed: 0,
|
||||
},
|
||||
Ball {
|
||||
x: 0,
|
||||
y: 0,
|
||||
xspeed: 0,
|
||||
yspeed: 0,
|
||||
},
|
||||
Ball {
|
||||
x: 0,
|
||||
y: 0,
|
||||
xspeed: 0,
|
||||
yspeed: 0,
|
||||
},
|
||||
Ball {
|
||||
x: 0,
|
||||
y: 0,
|
||||
xspeed: 0,
|
||||
yspeed: 0,
|
||||
},
|
||||
Ball {
|
||||
x: 0,
|
||||
y: 0,
|
||||
xspeed: 0,
|
||||
yspeed: 0,
|
||||
},
|
||||
Ball {
|
||||
x: 0,
|
||||
y: 0,
|
||||
xspeed: 0,
|
||||
yspeed: 0,
|
||||
},
|
||||
Ball {
|
||||
x: 0,
|
||||
y: 0,
|
||||
xspeed: 0,
|
||||
yspeed: 0,
|
||||
},
|
||||
Ball {
|
||||
x: 0,
|
||||
y: 0,
|
||||
xspeed: 0,
|
||||
yspeed: 0,
|
||||
},
|
||||
Ball {
|
||||
x: 0,
|
||||
y: 0,
|
||||
xspeed: 0,
|
||||
yspeed: 0,
|
||||
},
|
||||
];
|
||||
static mut balls_visible: u8 = MAX_BALLS;
|
||||
static mut pos: u8 = 0;
|
||||
|
||||
static mut tilemap_buffer: [u8; VISABLE_TILES_PER_ROW as usize] = [0, 0, 0, 0, 0, 0, 0, 0, 0];
|
||||
//The setup() function runs once when you turn your Arduboy on
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn setup() {
|
||||
// put your setup code here, to run once:
|
||||
arduboy.begin();
|
||||
arduboy.set_frame_rate(FRAME_RATE);
|
||||
fx::begin_data(FX_DATA_PAGE);
|
||||
ball.iter_mut().for_each(|b| {
|
||||
b.x = random_less_than(113) as i16;
|
||||
b.y = random_less_than(49) as i16;
|
||||
b.xspeed = 1;
|
||||
if random_less_than(100) > 49 {
|
||||
b.xspeed = -b.xspeed
|
||||
}
|
||||
b.yspeed = 1;
|
||||
if random_less_than(100) > 49 {
|
||||
b.yspeed = -b.yspeed
|
||||
}
|
||||
})
|
||||
}
|
||||
#[no_mangle]
|
||||
#[export_name = "loop"]
|
||||
pub unsafe extern "C" fn loop_() {
|
||||
// put your main code here, to run repeatedly:
|
||||
if !arduboy.next_frame() {
|
||||
return;
|
||||
}
|
||||
arduboy.poll_buttons();
|
||||
if arduboy.just_pressed(A) && balls_visible < MAX_BALLS {
|
||||
balls_visible += 1;
|
||||
}
|
||||
if arduboy.just_pressed(B) && balls_visible > 0 {
|
||||
balls_visible -= 1;
|
||||
}
|
||||
|
||||
if arduboy.pressed(UP) && map_location.y > 16 {
|
||||
map_location.y -= 1;
|
||||
}
|
||||
if arduboy.pressed(DOWN) && map_location.y < 176 {
|
||||
map_location.y += 1;
|
||||
}
|
||||
if arduboy.pressed(LEFT) && map_location.x > 16 {
|
||||
map_location.x -= 1;
|
||||
}
|
||||
if arduboy.pressed(RIGHT) && map_location.x < 112 {
|
||||
map_location.x += 1;
|
||||
}
|
||||
|
||||
camera.x = map_location.x + circle_points[pos as usize].x;
|
||||
camera.y = map_location.y + circle_points[pos as usize].y;
|
||||
|
||||
// Draw tilemap
|
||||
for y in 0..VISABLE_TILES_PER_COLUMN as i16 {
|
||||
fx::read_data_array(
|
||||
FX_DATA_TILEMAP,
|
||||
(y + camera.y / tileHeight as i16) as u8,
|
||||
(camera.x / tileWidth as i16) as u8,
|
||||
tileWidth,
|
||||
tilemap_buffer.as_ptr(),
|
||||
VISABLE_TILES_PER_ROW as usize,
|
||||
);
|
||||
|
||||
for x in 0..VISABLE_TILES_PER_ROW as i16 {
|
||||
fx::draw_bitmap(
|
||||
x * tileWidth as i16 - camera.x % tileWidth as i16,
|
||||
y * tileHeight as i16 - camera.y % tileHeight as i16,
|
||||
FX_DATA_TILES,
|
||||
tilemap_buffer[x as usize],
|
||||
dbmNormal,
|
||||
)
|
||||
}
|
||||
}
|
||||
if !arduboy.not_pressed(UP)
|
||||
&& !arduboy.not_pressed(DOWN)
|
||||
&& !arduboy.not_pressed(LEFT)
|
||||
&& !arduboy.not_pressed(RIGHT)
|
||||
{
|
||||
pos += 1 % CIRCLE_POINTS;
|
||||
if pos > 80 {
|
||||
pos = 0
|
||||
}
|
||||
}
|
||||
for i in 0..balls_visible as usize {
|
||||
fx::draw_bitmap(ball[i].x, ball[i].y, FX_DATA_BALLS, 0, dbmMasked);
|
||||
}
|
||||
for i in 0..balls_visible as usize {
|
||||
if ball[i].xspeed > 0 {
|
||||
ball[i].x += ball[i].xspeed;
|
||||
if ball[i].x > WIDTH - ballWidth as i16 {
|
||||
ball[i].x = WIDTH - ballWidth as i16;
|
||||
ball[i].xspeed = -ball[i].xspeed;
|
||||
}
|
||||
} else {
|
||||
ball[i].x += ball[i].xspeed;
|
||||
if ball[i].x < 0 {
|
||||
ball[i].x = 0;
|
||||
ball[i].xspeed = -ball[i].xspeed;
|
||||
}
|
||||
}
|
||||
|
||||
if ball[i].yspeed > 0 {
|
||||
ball[i].y += ball[i].yspeed;
|
||||
if ball[i].y > HEIGHT - ballHeight as i16 {
|
||||
ball[i].y = HEIGHT - ballHeight as i16;
|
||||
ball[i].yspeed = -ball[i].yspeed;
|
||||
}
|
||||
} else {
|
||||
ball[i].y += ball[i].yspeed;
|
||||
if ball[i].y < 0 {
|
||||
ball[i].y = 0;
|
||||
ball[i].yspeed = -ball[i].yspeed;
|
||||
}
|
||||
}
|
||||
}
|
||||
fx::display_clear();
|
||||
}
|
11
Examples/ArduboyFX/fxdrawframes/Cargo.toml
Normal file
|
@ -0,0 +1,11 @@
|
|||
[package]
|
||||
name = "fxdrawframes"
|
||||
version = "0.1.0"
|
||||
authors = ["ZennDev <zenndev@protonmail.com>"]
|
||||
edition = "2021"
|
||||
|
||||
[lib]
|
||||
crate-type = ["staticlib"]
|
||||
|
||||
[dependencies]
|
||||
arduboy-rust = { path = "../../../arduboy-rust" }
|
BIN
Examples/ArduboyFX/fxdrawframes/assets/arduboy-logo.png
Normal file
After Width: | Height: | Size: 413 B |
BIN
Examples/ArduboyFX/fxdrawframes/assets/fx-logo.png
Normal file
After Width: | Height: | Size: 260 B |
83
Examples/ArduboyFX/fxdrawframes/fxdata/ArduboyLogo_Frame.txt
Normal 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
|
||||
|
||||
}
|
BIN
Examples/ArduboyFX/fxdrawframes/fxdata/fxdata.bin
Normal file
21
Examples/ArduboyFX/fxdrawframes/fxdata/fxdata.h
Normal 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;
|
95
Examples/ArduboyFX/fxdrawframes/fxdata/fxdata.txt
Normal 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
|
||||
}
|
20
Examples/ArduboyFX/fxdrawframes/src/lib.rs
Normal file
|
@ -0,0 +1,20 @@
|
|||
#![no_std]
|
||||
#![allow(non_upper_case_globals)]
|
||||
//Include the Arduboy Library
|
||||
//Initialize the arduboy object
|
||||
use arduboy_rust::prelude::*;
|
||||
const arduboy: Arduboy2 = Arduboy2::new();
|
||||
//The setup() function runs once when you turn your Arduboy on
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn setup() {
|
||||
// put your setup code here, to run once:
|
||||
arduboy.begin();
|
||||
arduboy.clear();
|
||||
arduboy.print(f!(b"Holmes is cool!\0"));
|
||||
arduboy.display();
|
||||
}
|
||||
#[no_mangle]
|
||||
#[export_name = "loop"]
|
||||
pub unsafe extern "C" fn loop_() {
|
||||
// put your main code here, to run repeatedly:
|
||||
}
|
11
Examples/ArduboyFX/fxhelloworld/Cargo.toml
Normal file
|
@ -0,0 +1,11 @@
|
|||
[package]
|
||||
name = "fxhelloworld"
|
||||
version = "0.1.0"
|
||||
authors = ["ZennDev <zenndev@protonmail.com>"]
|
||||
edition = "2021"
|
||||
|
||||
[lib]
|
||||
crate-type = ["staticlib"]
|
||||
|
||||
[dependencies]
|
||||
arduboy-rust = { path = "../../../arduboy-rust" }
|
BIN
Examples/ArduboyFX/fxhelloworld/fxdata/arduboyFont_6x8.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
Examples/ArduboyFX/fxhelloworld/fxdata/fxdata-data.bin
Normal file
BIN
Examples/ArduboyFX/fxhelloworld/fxdata/fxdata.bin
Normal file
22
Examples/ArduboyFX/fxhelloworld/fxdata/fxdata.h
Normal file
|
@ -0,0 +1,22 @@
|
|||
#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 = 0xffc9;
|
||||
constexpr uint24_t FX_DATA_BYTES = 13937;
|
||||
|
||||
constexpr uint24_t arduboyFont = 0x000000;
|
||||
constexpr uint16_t arduboyFontWidth = 6;
|
||||
constexpr uint16_t arduboyFontHeight = 8;
|
||||
constexpr uint16_t arduboyFontFrames = 256;
|
||||
|
||||
constexpr uint24_t maskedFont = 0x000604;
|
||||
constexpr uint16_t maskedFontWidth = 16;
|
||||
constexpr uint16_t maskedFontHeight = 24;
|
||||
constexpr uint8_t maskedFontFrames = 128;
|
||||
|
||||
constexpr uint24_t helloWorld = 0x003608;
|
5
Examples/ArduboyFX/fxhelloworld/fxdata/fxdata.txt
Normal file
|
@ -0,0 +1,5 @@
|
|||
|
||||
image_t arduboyFont = "arduboyFont_6x8.png"
|
||||
image_t maskedFont = "maskedFont_16x24.png"
|
||||
|
||||
string helloWorld = 'Hello World! This example uses the FX::drawString() function to draw text from the FX flash chip.'
|
BIN
Examples/ArduboyFX/fxhelloworld/fxdata/maskedFont_16x24.png
Normal file
After Width: | Height: | Size: 5.1 KiB |
89
Examples/ArduboyFX/fxhelloworld/src/lib.rs
Normal file
|
@ -0,0 +1,89 @@
|
|||
#![no_std]
|
||||
#![allow(non_upper_case_globals)]
|
||||
|
||||
//Include the Arduboy Library
|
||||
//Initialize the arduboy object
|
||||
use arduboy_rust::prelude::*;
|
||||
use arduboyfx::fx_consts::*;
|
||||
const arduboy: Arduboy2 = Arduboy2::new();
|
||||
|
||||
//FX Data
|
||||
const FX_DATA_PAGE: u16 = 0xffc9;
|
||||
const FX_DATA_BYTES: u32 = 13937;
|
||||
const arduboyFont: u32 = 0x000000;
|
||||
const arduboyFontWidth: u16 = 6;
|
||||
const arduboyFontHeight: u16 = 8;
|
||||
const arduboyFontFrames: u16 = 256;
|
||||
const maskedFont: u32 = 0x000604;
|
||||
const maskedFontWidth: u16 = 16;
|
||||
const maskedFontHeight: u16 = 24;
|
||||
const maskedFontFrames: u8 = 128;
|
||||
const helloWorld: u32 = 0x003608;
|
||||
|
||||
static mut frames: u16 = 0;
|
||||
static mut speed: u8 = 1;
|
||||
static mut scroll_x: i16 = 128;
|
||||
static mut font_mode: u8 = dcmNormal;
|
||||
static mut leading_digits: i8 = 5;
|
||||
static str: &str = "FX Demo\0";
|
||||
//The setup() function runs once when you turn your Arduboy on
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn setup() {
|
||||
// put your setup code here, to run once:
|
||||
arduboy.begin();
|
||||
fx::begin_data(FX_DATA_PAGE);
|
||||
fx::set_font(arduboyFont, dcmNormal);
|
||||
fx::set_cursor_range(0, 32767);
|
||||
}
|
||||
#[no_mangle]
|
||||
#[export_name = "loop"]
|
||||
pub unsafe extern "C" fn loop_() {
|
||||
// put your main code here, to run repeatedly:
|
||||
if !arduboy.next_frame() {
|
||||
return;
|
||||
}
|
||||
arduboy.poll_buttons();
|
||||
fx::set_cursor(0, 0);
|
||||
fx::set_font_mode(dcmNormal);
|
||||
fx::draw_string(str);
|
||||
|
||||
fx::set_cursor(WIDTH - 5 * arduboyFontWidth as i16, 0);
|
||||
fx::draw_number(frames, leading_digits);
|
||||
|
||||
fx::set_cursor(scroll_x, 24);
|
||||
fx::set_font(maskedFont, dcmMasked | font_mode);
|
||||
fx::draw_string(helloWorld);
|
||||
|
||||
fx::set_cursor(13, HEIGHT - arduboyFontHeight as i16);
|
||||
fx::set_font(arduboyFont, font_mode);
|
||||
fx::draw_string(" Press any button \0");
|
||||
|
||||
fx::display_clear();
|
||||
|
||||
scroll_x -= speed as i16;
|
||||
if scroll_x < -1792 {
|
||||
scroll_x = 128
|
||||
}
|
||||
frames += 1;
|
||||
if arduboy.just_pressed(ANY_BUTTON) {
|
||||
frames = 0
|
||||
}
|
||||
if arduboy.just_pressed(UP) {
|
||||
speed = 2
|
||||
}
|
||||
if arduboy.just_pressed(DOWN) {
|
||||
speed = 1
|
||||
}
|
||||
if arduboy.just_pressed(LEFT) {
|
||||
leading_digits = if leading_digits == -5 { 0 } else { -5 }
|
||||
}
|
||||
if arduboy.just_pressed(RIGHT) {
|
||||
leading_digits = if leading_digits == 5 { 0 } else { 5 }
|
||||
}
|
||||
if arduboy.just_pressed(A) {
|
||||
font_mode = dcmNormal
|
||||
}
|
||||
if arduboy.just_pressed(B) {
|
||||
font_mode = dcmReverse
|
||||
}
|
||||
}
|
11
Examples/ArduboyFX/fxloadgamestate/Cargo.toml
Normal file
|
@ -0,0 +1,11 @@
|
|||
[package]
|
||||
name = "fxloadgamestate"
|
||||
version = "0.1.0"
|
||||
authors = ["ZennDev <zenndev@protonmail.com>"]
|
||||
edition = "2021"
|
||||
|
||||
[lib]
|
||||
crate-type = ["staticlib"]
|
||||
|
||||
[dependencies]
|
||||
arduboy-rust = { path = "../../../arduboy-rust" }
|
|
@ -0,0 +1 @@
|
|||
<EFBFBD><EFBFBD>
|
1
Examples/ArduboyFX/fxloadgamestate/fxdata/fxdata.bin
Normal file
|
@ -0,0 +1 @@
|
|||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
14
Examples/ArduboyFX/fxloadgamestate/fxdata/fxdata.h
Normal file
|
@ -0,0 +1,14 @@
|
|||
#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 = 0xfff0;
|
||||
constexpr uint24_t FX_DATA_BYTES = 0;
|
||||
|
||||
constexpr uint16_t FX_SAVE_PAGE = 0xfff0;
|
||||
constexpr uint24_t FX_SAVE_BYTES = 2;
|
||||
|
4
Examples/ArduboyFX/fxloadgamestate/fxdata/fxdata.txt
Normal file
|
@ -0,0 +1,4 @@
|
|||
|
||||
savesection //4K block save section. Any data below will be stored in save data area
|
||||
|
||||
uint16_t 0xFFFF //game state end marker / start of unused space
|
57
Examples/ArduboyFX/fxloadgamestate/src/lib.rs
Normal file
|
@ -0,0 +1,57 @@
|
|||
#![no_std]
|
||||
#![allow(non_upper_case_globals)]
|
||||
|
||||
//Include the Arduboy Library
|
||||
//Initialize the arduboy object
|
||||
use arduboy_rust::prelude::*;
|
||||
|
||||
const arduboy: Arduboy2 = Arduboy2::new();
|
||||
//The setup() function runs once when you turn your Arduboy on
|
||||
const FX_DATA_PAGE: u16 = 0xfff0;
|
||||
const FX_DATA_BYTES: u32 = 0;
|
||||
const FX_SAVE_PAGE: u16 = 0xfff0;
|
||||
const FX_SAVE_BYTES: u32 = 2;
|
||||
|
||||
struct GameState {
|
||||
name: &'static str,
|
||||
count: u16,
|
||||
}
|
||||
|
||||
static mut gamestate: GameState = GameState {
|
||||
name: "\0",
|
||||
count: 0,
|
||||
};
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn setup() {
|
||||
// put your setup code here, to run once:
|
||||
arduboy.begin();
|
||||
fx::begin_data_save(FX_DATA_PAGE, FX_SAVE_PAGE);
|
||||
if fx::load_game_state(&mut gamestate) > 1 {
|
||||
gamestate.name = "Hello World !!!\0";
|
||||
gamestate.count = 1;
|
||||
} else {
|
||||
gamestate.name = "Save state Loaded\0";
|
||||
gamestate.count += 1;
|
||||
}
|
||||
fx::save_game_state(&gamestate);
|
||||
arduboy.clear();
|
||||
arduboy.set_cursor(0, 32 - 8);
|
||||
arduboy.print(gamestate.name);
|
||||
arduboy.set_cursor(0, 32 + 8);
|
||||
arduboy.print("Number of times this\nscetch is run: \0");
|
||||
arduboy.print(gamestate.count);
|
||||
fx::display();
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
#[export_name = "loop"]
|
||||
pub unsafe extern "C" fn loop_() {
|
||||
// put your main code here, to run repeatedly:
|
||||
if !arduboy.next_frame() {
|
||||
return;
|
||||
}
|
||||
if arduboy.buttons_state() > 0 {
|
||||
arduboy.exit_to_bootloader()
|
||||
}
|
||||
}
|
|
@ -4,7 +4,7 @@
|
|||
//Include the Arduboy Library
|
||||
#[allow(unused_imports)]
|
||||
use arduboy_rust::prelude::*;
|
||||
use arduboy_tone::arduboy_tone_pitch::*;
|
||||
use arduboy_tones::tones_pitch::*;
|
||||
mod gameloop;
|
||||
|
||||
#[allow(dead_code)]
|
||||
|
@ -154,7 +154,6 @@ pub unsafe extern "C" fn loop_() {
|
|||
gameloop::gameloop();
|
||||
}
|
||||
GameMode::Losescreen => {
|
||||
//todo
|
||||
arduboy.set_text_size(2);
|
||||
arduboy.set_cursor(13, p.gameover_height);
|
||||
arduboy.print(get_string_addr!(text_gameover));
|
||||
|
|
|
@ -16,11 +16,8 @@ const arduboy: Arduboy2 = Arduboy2::new();
|
|||
#[no_mangle]
|
||||
pub unsafe extern "C" fn setup() {
|
||||
// put your setup code here, to run once:
|
||||
arduboy.begin();
|
||||
arduboy.set_frame_rate(30);
|
||||
arduboy.clear();
|
||||
|
||||
}
|
||||
|
||||
// The loop() function repeats forever after setup() is done
|
||||
#[no_mangle]
|
||||
#[export_name = "loop"]
|
||||
|
@ -29,5 +26,5 @@ pub unsafe extern "C" fn loop_() {
|
|||
if !arduboy.next_frame() {
|
||||
return;
|
||||
}
|
||||
arduboy.display();
|
||||
|
||||
}
|
||||
|
|
210
README.md
|
@ -3,13 +3,15 @@
|
|||
Running Rust on the [Arduboy](https://arduboy.com/) miniature game system.
|
||||
|
||||
The most important first.
|
||||
I didn't create this project from scratch, @Seeker14491 the legend has already done a lot in his old project [ArduboyRust](https://github.com/Seeker14491/ArduboyRust)
|
||||
I didn't create this project from scratch, @Seeker14491 the legend has already done a lot in his old
|
||||
project [ArduboyRust](https://github.com/Seeker14491/ArduboyRust)
|
||||
|
||||
I just updated and completed the project.
|
||||
|
||||
### What do i mean by completed?
|
||||
|
||||
I provided all the important functions from the [Arduboy2](https://github.com/MLXXXp/Arduboy2) library in a safe Rust API.
|
||||
I provided all the important functions from the [Arduboy2](https://github.com/MLXXXp/Arduboy2) library in a safe Rust
|
||||
API.
|
||||
|
||||
Most of the Arduboy2 funktions can be called the same way like in C.
|
||||
|
||||
|
@ -30,19 +32,22 @@ add the following rule to the lsp settings :
|
|||
|
||||
```json
|
||||
{
|
||||
"rust-analyzer.checkOnSave.allTargets": false
|
||||
"rust-analyzer.checkOnSave.allTargets": false
|
||||
}
|
||||
```
|
||||
|
||||
If your using Visual Studio Code: Create a folder named `.vscode` and a file named `settings.json` inside. Past the setting above in the new file. (I have excluded my `.vscode` folder because I have many different settings there that you don't need)
|
||||
If your using Visual Studio Code: Create a folder named `.vscode` and a file named `settings.json` inside. Past the
|
||||
setting above in the new file. (I have excluded my `.vscode` folder because I have many different settings there that
|
||||
you don't need)
|
||||
|
||||
Your game is located in the Project/game folder. This is also the folder you are working in
|
||||
|
||||
Inside the game folder you will find a lib.rs file which contains the setup and loop function as you know it from a normal Arduboy C project.
|
||||
Inside the game folder you will find a lib.rs file which contains the setup and loop function as you know it from a
|
||||
normal Arduboy C project.
|
||||
|
||||
You can find the Docs here:
|
||||
|
||||
- [arduboy-rust Crate Docs](https://zenndev1337.github.io/Rust-for-Arduboy/)
|
||||
- [arduboy-rust Crate Docs](https://zenndev1337.github.io/Rust-for-Arduboy/)
|
||||
|
||||
or you can use the following command to open the arduboy-rust Crate docs locally
|
||||
|
||||
|
@ -53,7 +58,8 @@ cargo doc -p arduboy-rust --open
|
|||
Most of the time you will use the prelude.
|
||||
There is listed witch funktionality you will have.
|
||||
|
||||
And last but not least there are multiple examples inside of the Examples folder which shows you how to use the functions.
|
||||
And last but not least there are multiple examples inside of the Examples folder which shows you how to use the
|
||||
functions.
|
||||
I will from time to time also upload my projects to the Example folder so you have as much ressurces as possible.
|
||||
|
||||
## Usage of the run tool
|
||||
|
@ -62,134 +68,118 @@ I will from time to time also upload my projects to the Example folder so you ha
|
|||
|
||||
requirements:
|
||||
|
||||
- [PlatformIO Core](https://docs.platformio.org/en/latest/core/installation/methods/pypi.html) must be installed
|
||||
- The Arduboy must be plugged in
|
||||
- You are in the root directory of this project
|
||||
- [PlatformIO Core](https://docs.platformio.org/en/latest/core/installation/methods/pypi.html) must be installed
|
||||
- The Arduboy must be plugged in
|
||||
- You are in the root directory of this project
|
||||
|
||||
All builded `.hex` files are saved inside of `arduboy-rust/Wrapper-Project/build/<GAMENAME>.hex` after you uploaded them to the Arduboy.
|
||||
All builded `.hex` files are saved inside of `arduboy-rust/Wrapper-Project/build/<GAMENAME>.hex` after you uploaded them
|
||||
to the Arduboy.
|
||||
|
||||
To upload your own game to the Arduboy use:
|
||||
|
||||
Linux:
|
||||
|
||||
```bash
|
||||
./run
|
||||
./run <Project_Name>
|
||||
```
|
||||
|
||||
Windows:
|
||||
|
||||
```ps1
|
||||
.\run.bat
|
||||
.\run.bat <Project_Name>
|
||||
```
|
||||
|
||||
## Play ZennDev1337 Games
|
||||
## List of all the Example Games:
|
||||
|
||||
### Dr. Boy
|
||||
### ZennDev1337 Games
|
||||
|
||||
To upload snake to the Arduboy use:
|
||||
- drboy
|
||||
|
||||
Linux:
|
||||
### Rust Games
|
||||
|
||||
```bash
|
||||
./run drboy
|
||||
```
|
||||
|
||||
Windows:
|
||||
|
||||
```ps1
|
||||
.\run.bat drboy
|
||||
```
|
||||
|
||||
### Snake
|
||||
|
||||
To upload snake to the Arduboy use:
|
||||
|
||||
Linux:
|
||||
|
||||
```bash
|
||||
./run snake
|
||||
```
|
||||
|
||||
Windows:
|
||||
|
||||
```ps1
|
||||
.\run.bat snake
|
||||
```
|
||||
|
||||
## Play Rust Games
|
||||
|
||||
### I'm now a Rustacean <3
|
||||
|
||||
To upload rustacean to the Arduboy use:
|
||||
|
||||
Linux:
|
||||
|
||||
```bash
|
||||
./run rustacean
|
||||
```
|
||||
|
||||
Windows:
|
||||
|
||||
```ps1
|
||||
.\run.bat rustacean
|
||||
```
|
||||
|
||||
## Play Demo Games
|
||||
- snake
|
||||
- rustacean
|
||||
|
||||
### The demo games / tutorials from the official Arduboy forum [Rewritten in Rust]
|
||||
|
||||
- [Make Your Own Arduboy Game: Part 1 - Setting Up Your Computer](https://community.arduboy.com/t/make-your-own-arduboy-game-part-1-setting-up-your-computer/7924/1)
|
||||
- [demo2] [Make Your Own Arduboy Game: Part 2 - Printing Text](https://community.arduboy.com/t/make-your-own-arduboy-game-part-2-printing-text/7925)
|
||||
- [demo3] [Make Your Own Arduboy Game: Part 3 - Storing Data & Loops](https://community.arduboy.com/t/make-your-own-arduboy-game-part-3-storing-data-loops/7926)
|
||||
- [demo4] [Make Your Own Arduboy Game: Part 4 - Questions & Button Input](https://community.arduboy.com/t/make-your-own-arduboy-game-part-4-questions-button-input/7927)
|
||||
- [demo5] [Make Your Own Arduboy Game: Part 5 - Your First Game!](https://community.arduboy.com/t/make-your-own-arduboy-game-part-5-your-first-game/7928)
|
||||
- [demo6] [Make Your Own Arduboy Game: Part 6 - Graphics!](https://community.arduboy.com/t/make-your-own-arduboy-game-part-6-graphics/7929)
|
||||
Link for the [ZennDev1337 Tile Converter](https://zenndev1337.github.io/Rust-for-Arduboy/tile-converter.html)
|
||||
- [demo7] [Make Your Own Arduboy Game: Part 7 - Make Pong From Scratch!](https://community.arduboy.com/t/make-your-own-arduboy-game-part-7-make-pong-from-scratch/7930)
|
||||
- Prepare for demo9 [Make Your Own Arduboy Game: Part 8 - Starting DinoSmasher](https://community.arduboy.com/t/make-your-own-arduboy-game-part-8-starting-dinosmasher/7932)
|
||||
- [demo9] [Make Your Own Arduboy Game: Part 9 - Mapping DinoSmasher](https://community.arduboy.com/t/make-your-own-arduboy-game-part-9-mapping-dinosmasher/7931)
|
||||
- [eeprom] [Help, I’m struggling with EEPROM!](https://community.arduboy.com/t/help-im-struggling-with-eeprom/7178)
|
||||
- [progmem] Usage of the big 28'000 Bytes flash memory for Bitmaps Sound sequeces and Text.
|
||||
- [tone] [ArduboyTonesTest](https://github.com/MLXXXp/ArduboyTones/blob/master/examples/ArduboyTonesTest/ArduboyTonesTest.ino)
|
||||
- [Make Your Own Arduboy Game: Part 1 - Setting Up Your Computer](https://community.arduboy.com/t/make-your-own-arduboy-game-part-1-setting-up-your-computer/7924/1)
|
||||
- [demo2] [Make Your Own Arduboy Game: Part 2 - Printing Text](https://community.arduboy.com/t/make-your-own-arduboy-game-part-2-printing-text/7925)
|
||||
- [demo3] [Make Your Own Arduboy Game: Part 3 - Storing Data & Loops](https://community.arduboy.com/t/make-your-own-arduboy-game-part-3-storing-data-loops/7926)
|
||||
- [demo4] [Make Your Own Arduboy Game: Part 4 - Questions & Button Input](https://community.arduboy.com/t/make-your-own-arduboy-game-part-4-questions-button-input/7927)
|
||||
- [demo5] [Make Your Own Arduboy Game: Part 5 - Your First Game!](https://community.arduboy.com/t/make-your-own-arduboy-game-part-5-your-first-game/7928)
|
||||
- [demo6] [Make Your Own Arduboy Game: Part 6 - Graphics!](https://community.arduboy.com/t/make-your-own-arduboy-game-part-6-graphics/7929)
|
||||
Link for the [ZennDev1337 Tile Converter](https://zenndev1337.github.io/Rust-for-Arduboy/tile-converter.html)
|
||||
- [demo7] [Make Your Own Arduboy Game: Part 7 - Make Pong From Scratch!](https://community.arduboy.com/t/make-your-own-arduboy-game-part-7-make-pong-from-scratch/7930)
|
||||
- Prepare for
|
||||
demo9 [Make Your Own Arduboy Game: Part 8 - Starting DinoSmasher](https://community.arduboy.com/t/make-your-own-arduboy-game-part-8-starting-dinosmasher/7932)
|
||||
- [demo9] [Make Your Own Arduboy Game: Part 9 - Mapping DinoSmasher](https://community.arduboy.com/t/make-your-own-arduboy-game-part-9-mapping-dinosmasher/7931)
|
||||
- [eeprom] [Help, I’m struggling with EEPROM!](https://community.arduboy.com/t/help-im-struggling-with-eeprom/7178)
|
||||
- [eeprom-byte] [Help, I’m struggling with EEPROM!](https://community.arduboy.com/t/help-im-struggling-with-eeprom/7178)
|
||||
- [progmem] Usage of the big 28'000 Bytes flash memory for Bitmaps Sound sequeces and Text.
|
||||
- [tone] [ArduboyTonesTest](https://github.com/MLXXXp/ArduboyTones/blob/master/examples/ArduboyTonesTest/ArduboyTonesTest.ino)
|
||||
|
||||
To upload a demo to the Arduboy use:
|
||||
## Usage of the FX Chip
|
||||
|
||||
requirements:
|
||||
|
||||
```
|
||||
python3 -m pip install pyserial pillow
|
||||
```
|
||||
|
||||
You need to create a fxdata folder in your project directory.
|
||||
|
||||
Don't forget to uncomment the `ArduboyFX_Library` line in the `import_config.h` file.
|
||||
|
||||
run Commands:
|
||||
|
||||
```
|
||||
|Project_Dir
|
||||
->fxdata
|
||||
->src
|
||||
->lib.rs
|
||||
>cargo.toml
|
||||
```
|
||||
|
||||
You also need a fxdata.txt file in this new folder.
|
||||
|
||||
See the examples in `Examples/ArduboyFX`.
|
||||
|
||||
More information:
|
||||
|
||||
- [Arduboy-Python-Utilities by MrBlinky](https://github.com/MrBlinky/Arduboy-Python-Utilities)
|
||||
|
||||
run Commands:
|
||||
|
||||
- `fxbuild` is used to build the fxdata.dat file.
|
||||
- `fxupload` is used to upload the fxdata.dat file.
|
||||
- `fxall` is used to build and upload the fxdata.dat file and build and upload the game all in one step.
|
||||
|
||||
Linux:
|
||||
|
||||
```bash
|
||||
./run demo2
|
||||
./run demo3
|
||||
./run demo4
|
||||
./run demo5
|
||||
./run demo6
|
||||
./run demo7
|
||||
./run demo9
|
||||
./run eeprom
|
||||
./run eeprom-byte
|
||||
./run progmem
|
||||
./run tone
|
||||
./run fxbuild <Project_Name>
|
||||
./run fxupload <Project_Name>
|
||||
./run fxall <Project_Name>
|
||||
```
|
||||
|
||||
Windows:
|
||||
|
||||
```ps1
|
||||
.\run.bat demo2
|
||||
.\run.bat demo3
|
||||
.\run.bat demo4
|
||||
.\run.bat demo5
|
||||
.\run.bat demo6
|
||||
.\run.bat demo7
|
||||
.\run.bat eeprom
|
||||
.\run.bat eeprom-byte
|
||||
.\run.bat progmem
|
||||
.\run.bat tone
|
||||
.\run.bat fxbuild <Project_Name>
|
||||
.\run.bat fxupload <Project_Name>
|
||||
.\run.bat fxall <Project_Name>
|
||||
```
|
||||
|
||||
### Convert the fxdata.h file to Rust
|
||||
|
||||
[FXdata Converter by ZennDev1337](https://zenndev1337.github.io/Rust-for-Arduboy/fxdata-converter.html)
|
||||
|
||||
# Create a new project
|
||||
|
||||
In the root of the repo use the command:
|
||||
|
||||
(Don't use "-" in the name because of a cargo feature that takes the "-" and mixes sometimes with a "\_". You will have some weird behavior with the run tool.)
|
||||
(Don't use "-" in the name because of a cargo feature that takes the "-" and mixes sometimes with a "\_". You will have
|
||||
some weird behavior with the run tool.)
|
||||
|
||||
```bash
|
||||
cargo new --vcs=none --lib ./Project/newproject
|
||||
|
@ -215,6 +205,7 @@ Next jump in your lib.rs file and add the following:
|
|||
//Include the Arduboy Library
|
||||
#[allow(unused_imports)]
|
||||
use arduboy_rust::prelude::*;
|
||||
|
||||
#[allow(dead_code)]
|
||||
const arduboy: Arduboy2 = Arduboy2::new();
|
||||
|
||||
|
@ -261,30 +252,35 @@ To run and upload your game use the run tool
|
|||
|
||||
## Creating and building an Arduboy crate [Outdated]
|
||||
|
||||
You can find instructions on how all build steps work in detail here [ArduboyRust creating and building an arduboy crate](https://github.com/Seeker14491/ArduboyRust#creating-and-building-an-arduboy-crate)
|
||||
You can find instructions on how all build steps work in detail
|
||||
here [ArduboyRust creating and building an arduboy crate](https://github.com/Seeker14491/ArduboyRust#creating-and-building-an-arduboy-crate)
|
||||
|
||||
## Linking the static library to the Arduino C++ project [Outdated]
|
||||
|
||||
Instructions on how to link all the static libraries in the Arduino C++ project can be found here [ArduboyRust linking the static library to the arduino c++ project](https://github.com/Seeker14491/ArduboyRust#linking-the-static-library-to-the-arduino-c-project)
|
||||
Instructions on how to link all the static libraries in the Arduino C++ project can be found
|
||||
here [ArduboyRust linking the static library to the arduino c++ project](https://github.com/Seeker14491/ArduboyRust#linking-the-static-library-to-the-arduino-c-project)
|
||||
|
||||
## Credits
|
||||
|
||||
Thanks to @Seeker14491 who wrote [ArduboyRust](https://github.com/Seeker14491/ArduboyRust), the starting point for me to create my own project based on this project. (you are a hero <3)
|
||||
Thanks to @Seeker14491 who wrote [ArduboyRust](https://github.com/Seeker14491/ArduboyRust), the starting point for me to
|
||||
create my own project based on this project. (you are a hero <3)
|
||||
|
||||
Thanks to @simon-i1-h who wrote [arduboy-hello-rs](https://github.com/simon-i1-h/arduboy-hello-rs), the proof of concept that inspired me to try Rust on the Arduboy.
|
||||
Thanks to @simon-i1-h who wrote [arduboy-hello-rs](https://github.com/simon-i1-h/arduboy-hello-rs), the proof of concept
|
||||
that inspired me to try Rust on the Arduboy.
|
||||
|
||||
## License
|
||||
|
||||
You can license it under either one of those licenses:
|
||||
|
||||
- Apache License, Version 2.0
|
||||
([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
|
||||
- MIT license
|
||||
([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
|
||||
- Apache License, Version 2.0
|
||||
([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
|
||||
- MIT license
|
||||
([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
|
||||
|
||||
Whichever you may prefer.
|
||||
|
||||
## Contribution
|
||||
|
||||
Unless you explicitly state otherwise, any contribution intentionally submitted
|
||||
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
|
||||
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any
|
||||
additional terms or conditions.
|
||||
|
|
121
Tools/Arduboy-Python-Utilities/LICENSE
Normal file
|
@ -0,0 +1,121 @@
|
|||
Creative Commons Legal Code
|
||||
|
||||
CC0 1.0 Universal
|
||||
|
||||
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
|
||||
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
|
||||
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
|
||||
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
|
||||
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
|
||||
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
|
||||
THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
|
||||
HEREUNDER.
|
||||
|
||||
Statement of Purpose
|
||||
|
||||
The laws of most jurisdictions throughout the world automatically confer
|
||||
exclusive Copyright and Related Rights (defined below) upon the creator
|
||||
and subsequent owner(s) (each and all, an "owner") of an original work of
|
||||
authorship and/or a database (each, a "Work").
|
||||
|
||||
Certain owners wish to permanently relinquish those rights to a Work for
|
||||
the purpose of contributing to a commons of creative, cultural and
|
||||
scientific works ("Commons") that the public can reliably and without fear
|
||||
of later claims of infringement build upon, modify, incorporate in other
|
||||
works, reuse and redistribute as freely as possible in any form whatsoever
|
||||
and for any purposes, including without limitation commercial purposes.
|
||||
These owners may contribute to the Commons to promote the ideal of a free
|
||||
culture and the further production of creative, cultural and scientific
|
||||
works, or to gain reputation or greater distribution for their Work in
|
||||
part through the use and efforts of others.
|
||||
|
||||
For these and/or other purposes and motivations, and without any
|
||||
expectation of additional consideration or compensation, the person
|
||||
associating CC0 with a Work (the "Affirmer"), to the extent that he or she
|
||||
is an owner of Copyright and Related Rights in the Work, voluntarily
|
||||
elects to apply CC0 to the Work and publicly distribute the Work under its
|
||||
terms, with knowledge of his or her Copyright and Related Rights in the
|
||||
Work and the meaning and intended legal effect of CC0 on those rights.
|
||||
|
||||
1. Copyright and Related Rights. A Work made available under CC0 may be
|
||||
protected by copyright and related or neighboring rights ("Copyright and
|
||||
Related Rights"). Copyright and Related Rights include, but are not
|
||||
limited to, the following:
|
||||
|
||||
i. the right to reproduce, adapt, distribute, perform, display,
|
||||
communicate, and translate a Work;
|
||||
ii. moral rights retained by the original author(s) and/or performer(s);
|
||||
iii. publicity and privacy rights pertaining to a person's image or
|
||||
likeness depicted in a Work;
|
||||
iv. rights protecting against unfair competition in regards to a Work,
|
||||
subject to the limitations in paragraph 4(a), below;
|
||||
v. rights protecting the extraction, dissemination, use and reuse of data
|
||||
in a Work;
|
||||
vi. database rights (such as those arising under Directive 96/9/EC of the
|
||||
European Parliament and of the Council of 11 March 1996 on the legal
|
||||
protection of databases, and under any national implementation
|
||||
thereof, including any amended or successor version of such
|
||||
directive); and
|
||||
vii. other similar, equivalent or corresponding rights throughout the
|
||||
world based on applicable law or treaty, and any national
|
||||
implementations thereof.
|
||||
|
||||
2. Waiver. To the greatest extent permitted by, but not in contravention
|
||||
of, applicable law, Affirmer hereby overtly, fully, permanently,
|
||||
irrevocably and unconditionally waives, abandons, and surrenders all of
|
||||
Affirmer's Copyright and Related Rights and associated claims and causes
|
||||
of action, whether now known or unknown (including existing as well as
|
||||
future claims and causes of action), in the Work (i) in all territories
|
||||
worldwide, (ii) for the maximum duration provided by applicable law or
|
||||
treaty (including future time extensions), (iii) in any current or future
|
||||
medium and for any number of copies, and (iv) for any purpose whatsoever,
|
||||
including without limitation commercial, advertising or promotional
|
||||
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
|
||||
member of the public at large and to the detriment of Affirmer's heirs and
|
||||
successors, fully intending that such Waiver shall not be subject to
|
||||
revocation, rescission, cancellation, termination, or any other legal or
|
||||
equitable action to disrupt the quiet enjoyment of the Work by the public
|
||||
as contemplated by Affirmer's express Statement of Purpose.
|
||||
|
||||
3. Public License Fallback. Should any part of the Waiver for any reason
|
||||
be judged legally invalid or ineffective under applicable law, then the
|
||||
Waiver shall be preserved to the maximum extent permitted taking into
|
||||
account Affirmer's express Statement of Purpose. In addition, to the
|
||||
extent the Waiver is so judged Affirmer hereby grants to each affected
|
||||
person a royalty-free, non transferable, non sublicensable, non exclusive,
|
||||
irrevocable and unconditional license to exercise Affirmer's Copyright and
|
||||
Related Rights in the Work (i) in all territories worldwide, (ii) for the
|
||||
maximum duration provided by applicable law or treaty (including future
|
||||
time extensions), (iii) in any current or future medium and for any number
|
||||
of copies, and (iv) for any purpose whatsoever, including without
|
||||
limitation commercial, advertising or promotional purposes (the
|
||||
"License"). The License shall be deemed effective as of the date CC0 was
|
||||
applied by Affirmer to the Work. Should any part of the License for any
|
||||
reason be judged legally invalid or ineffective under applicable law, such
|
||||
partial invalidity or ineffectiveness shall not invalidate the remainder
|
||||
of the License, and in such case Affirmer hereby affirms that he or she
|
||||
will not (i) exercise any of his or her remaining Copyright and Related
|
||||
Rights in the Work or (ii) assert any associated claims and causes of
|
||||
action with respect to the Work, in either case contrary to Affirmer's
|
||||
express Statement of Purpose.
|
||||
|
||||
4. Limitations and Disclaimers.
|
||||
|
||||
a. No trademark or patent rights held by Affirmer are waived, abandoned,
|
||||
surrendered, licensed or otherwise affected by this document.
|
||||
b. Affirmer offers the Work as-is and makes no representations or
|
||||
warranties of any kind concerning the Work, express, implied,
|
||||
statutory or otherwise, including without limitation warranties of
|
||||
title, merchantability, fitness for a particular purpose, non
|
||||
infringement, or the absence of latent or other defects, accuracy, or
|
||||
the present or absence of errors, whether or not discoverable, all to
|
||||
the greatest extent permissible under applicable law.
|
||||
c. Affirmer disclaims responsibility for clearing rights of other persons
|
||||
that may apply to the Work or any use thereof, including without
|
||||
limitation any person's Copyright and Related Rights in the Work.
|
||||
Further, Affirmer disclaims responsibility for obtaining any necessary
|
||||
consents, permissions or other rights required for any use of the
|
||||
Work.
|
||||
d. Affirmer understands and acknowledges that Creative Commons is not a
|
||||
party to this document and has no duty or obligation with respect to
|
||||
this CC0 or use of the Work.
|
390
Tools/Arduboy-Python-Utilities/fxdata-build.py
Normal file
|
@ -0,0 +1,390 @@
|
|||
#FX data build tool version 1.15 by Mr.Blinky May 2021 - Mar.2023
|
||||
|
||||
VERSION = '1.15'
|
||||
|
||||
import sys
|
||||
import os
|
||||
import re
|
||||
import platform
|
||||
|
||||
constants = [
|
||||
#normal bitmap modes
|
||||
("dbmNormal", 0x00),
|
||||
("dbmOverwrite", 0x00),
|
||||
("dbmWhite", 0x01),
|
||||
("dbmReverse", 0x08),
|
||||
("dbmBlack", 0x0D),
|
||||
("dbmInvert", 0x02),
|
||||
#masked bitmap modes for frame
|
||||
("dbmMasked", 0x10),
|
||||
("dbmMasked_dbmWhite", 0x11),
|
||||
("dbmMasked_dbmReverse", 0x18),
|
||||
("dbmMasked_dbmBlack", 0x1D),
|
||||
("dbmMasked_dbmInvert", 0x12),
|
||||
#bitmap modes for last bitmap in a frame
|
||||
("dbmNormal_end", 0x40),
|
||||
("dbmOverwrite_end", 0x40),
|
||||
("dbmWhite_end", 0x41),
|
||||
("dbmReverse_end", 0x48),
|
||||
("dbmBlack_end", 0x4D),
|
||||
("dbmInvert_end", 0x42),
|
||||
#masked bitmap modes for last bitmap in a frame
|
||||
("dbmMasked_end", 0x50),
|
||||
("dbmMasked_dbmWhite_end", 0x51),
|
||||
("dbmMasked_dbmReverse_end", 0x58),
|
||||
("dbmMasked_dbmBlack_end", 0x5D),
|
||||
("dbmMasked_dbmInvert_end", 0x52),
|
||||
#bitmap modes for last bitmap of the last frame
|
||||
("dbmNormal_last", 0x80),
|
||||
("dbmOverwrite_last", 0x80),
|
||||
("dbmWhite_last", 0x81),
|
||||
("dbmReverse_last", 0x88),
|
||||
("dbmBlack_last", 0x8D),
|
||||
("dbmInvert_last", 0x82),
|
||||
#masked bitmap modes for last bitmap in a frame
|
||||
("dbmMasked_last", 0x90),
|
||||
("dbmMasked_dbmWhite_last", 0x91),
|
||||
("dbmMasked_dbmReverse_last", 0x98),
|
||||
("dbmMasked_dbmBlack_last", 0x9D),
|
||||
("dbmMasked_dbmInvert_last", 0x92),
|
||||
]
|
||||
|
||||
def print(s):
|
||||
sys.stdout.write(s + '\n')
|
||||
sys.stdout.flush()
|
||||
|
||||
print('FX data build tool version {} by Mr.Blinky May 2021 - Jan 2023\nUsing Python version {}'.format(VERSION,platform.python_version()))
|
||||
|
||||
bytes = bytearray()
|
||||
symbols = []
|
||||
header = []
|
||||
label = ''
|
||||
indent =''
|
||||
blkcom = False
|
||||
namespace = False
|
||||
include = False
|
||||
try:
|
||||
toolspath = os.path.dirname(os.path.abspath(sys.argv[0]))
|
||||
sys.path.insert(0, toolspath)
|
||||
from PIL import Image
|
||||
except Exception as e:
|
||||
sys.stderr.write(str(e) + "\n")
|
||||
sys.stderr.write("PILlow python module not found or wrong version.\n")
|
||||
sys.stderr.write("Make sure the correct module is installed or placed at {}\n".format(toolspath))
|
||||
sys.exit(-1)
|
||||
|
||||
def rawData(filename):
|
||||
global path
|
||||
with open(path + filename,"rb") as file:
|
||||
bytes = bytearray(file.read())
|
||||
file.close()
|
||||
return bytes
|
||||
|
||||
def includeFile(filename):
|
||||
global path
|
||||
print("Including file {}".format(path + filename))
|
||||
with open(path + filename,"r") as file:
|
||||
lines = file.readlines()
|
||||
file.close()
|
||||
return lines
|
||||
|
||||
def imageData(filename):
|
||||
global path, symbols
|
||||
filename = path + filename
|
||||
|
||||
## parse filename ## FILENAME_[WxH]_[S].[EXT]"
|
||||
spriteWidth = 0
|
||||
spriteHeight = 0
|
||||
spacing = 0
|
||||
elements = os.path.basename(os.path.splitext(filename)[0]).split("_")
|
||||
lastElement = len(elements)-1
|
||||
#get width and height from filename
|
||||
i = lastElement
|
||||
while i > 0:
|
||||
subElements = list(filter(None,elements[i].split('x')))
|
||||
if len(subElements) == 2 and subElements[0].isnumeric() and subElements[1].isnumeric():
|
||||
spriteWidth = int(subElements[0])
|
||||
spriteHeight = int(subElements[1])
|
||||
if i < lastElement and elements[i+1].isnumeric():
|
||||
spacing = int(elements[i+1])
|
||||
break
|
||||
else: i -= 1
|
||||
|
||||
#load image
|
||||
img = Image.open(filename).convert("RGBA")
|
||||
pixels = list(img.getdata())
|
||||
#check for transparency
|
||||
transparency = False
|
||||
for i in pixels:
|
||||
if i[3] < 255:
|
||||
transparency = True
|
||||
break
|
||||
|
||||
# check for multiple frames/tiles
|
||||
if spriteWidth > 0:
|
||||
hframes = (img.size[0] - spacing) // (spriteWidth + spacing)
|
||||
else:
|
||||
spriteWidth = img.size[0] - 2 * spacing
|
||||
hframes = 1
|
||||
if spriteHeight > 0:
|
||||
vframes = (img.size[1] - spacing) // (spriteHeight + spacing)
|
||||
else:
|
||||
spriteHeight = img.size[1] - 2* spacing
|
||||
vframes = 1
|
||||
|
||||
#create byte array for bin file
|
||||
size = (spriteHeight+7) // 8 * spriteWidth * hframes * vframes
|
||||
if transparency:
|
||||
size += size
|
||||
bytes = bytearray([spriteWidth >> 8, spriteWidth & 0xFF, spriteHeight >> 8, spriteHeight & 0xFF])
|
||||
bytes += bytearray(size)
|
||||
i = 4
|
||||
b = 0
|
||||
m = 0
|
||||
fy = spacing
|
||||
frames = 0
|
||||
for v in range(vframes):
|
||||
fx = spacing
|
||||
for h in range(hframes):
|
||||
for y in range (0,spriteHeight,8):
|
||||
line = " "
|
||||
for x in range (0,spriteWidth):
|
||||
for p in range (0,8):
|
||||
b = b >> 1
|
||||
m = m >> 1
|
||||
if (y + p) < spriteHeight: #for heights that are not a multiple of 8 pixels
|
||||
if pixels[(fy + y + p) * img.size[0] + fx + x][1] > 64:
|
||||
b |= 0x80 #white pixel
|
||||
if pixels[(fy + y + p) * img.size[0] + fx + x][3] > 64:
|
||||
m |= 0x80 #opaque pixel
|
||||
else:
|
||||
b &= 0x7F #for transparent pixel clear possible white pixel
|
||||
bytes[i] = b
|
||||
i += 1
|
||||
if transparency:
|
||||
bytes[i] = m
|
||||
i += 1
|
||||
frames += 1
|
||||
fx += spriteWidth + spacing
|
||||
fy += spriteHeight + spacing
|
||||
label = symbols[-1][0]
|
||||
if label.upper() == label:
|
||||
writeHeader('{}constexpr uint16_t {}_WIDTH = {};'.format(indent,label,spriteWidth))
|
||||
writeHeader('{}constexpr uint16_t {}HEIGHT = {};'.format(indent,label,spriteHeight))
|
||||
if frames > 1: writeHeader('{}constexpr uint8_t {}_FRAMES = {};'.format(indent,label,frames))
|
||||
elif '_' in label:
|
||||
writeHeader('{}constexpr uint16_t {}_width = {};'.format(indent,label,spriteWidth))
|
||||
writeHeader('{}constexpr uint16_t {}_height = {};'.format(indent,label,spriteHeight))
|
||||
if frames > 1: writeHeader('{}constexpr uint8_t {}_frames = {};'.format(indent,label,frames))
|
||||
else:
|
||||
writeHeader('{}constexpr uint16_t {}Width = {};'.format(indent,label,spriteWidth))
|
||||
writeHeader('{}constexpr uint16_t {}Height = {};'.format(indent,label,spriteHeight))
|
||||
if frames > 255: writeHeader('{}constexpr uint16_t {}Frames = {};'.format(indent,label,frames))
|
||||
elif frames > 1: writeHeader('{}constexpr uint8_t {}Frames = {};'.format(indent,label,frames))
|
||||
writeHeader('')
|
||||
return bytes
|
||||
|
||||
def addLabel(label,length):
|
||||
global symbols
|
||||
symbols.append((label,length))
|
||||
writeHeader('{}constexpr uint24_t {} = 0x{:06X};'.format(indent,label,length))
|
||||
|
||||
def writeHeader(s):
|
||||
global header
|
||||
header.append(s)
|
||||
|
||||
################################################################################
|
||||
|
||||
if (len(sys.argv) != 2) or (os.path.isfile(sys.argv[1]) != True) :
|
||||
sys.stderr.write("FX data script file not found.\n")
|
||||
sys.exit(-1)
|
||||
|
||||
filename = os.path.abspath(sys.argv[1])
|
||||
datafilename = os.path.splitext(filename)[0] + '-data.bin'
|
||||
savefilename = os.path.splitext(filename)[0] + '-save.bin'
|
||||
devfilename = os.path.splitext(filename)[0] + '.bin'
|
||||
headerfilename = os.path.splitext(filename)[0] + '.h'
|
||||
path = os.path.dirname(filename) + os.sep
|
||||
saveStart = -1
|
||||
|
||||
with open(filename,"r") as file:
|
||||
lines = file.readlines()
|
||||
file.close()
|
||||
|
||||
print("Building FX data using {}".format(filename))
|
||||
lineNr = 0
|
||||
while lineNr < len(lines):
|
||||
parts = [p for p in re.split("([ ,]|[\\'].*[\\'])", lines[lineNr]) if p.strip() and p != ',']
|
||||
for i in range (len(parts)):
|
||||
part = parts[i]
|
||||
#strip unwanted chars
|
||||
if part[:1] == '\t' : part = part[1:]
|
||||
if part[:1] == '{' : part = part[1:]
|
||||
if part[-1:] == '\n': part = part[:-1]
|
||||
if part[-1:] == ';' : part = part[:-1]
|
||||
if part[-1:] == '}' : part = part[:-1]
|
||||
if part[-1:] == ';' : part = part[:-1]
|
||||
if part[-1:] == '.' : part = part[:-1]
|
||||
if part[-1:] == ',' : part = part[:-1]
|
||||
if part[-2:] == '[]': part = part[:-2]
|
||||
#handle comments
|
||||
if blkcom == True:
|
||||
p = part.find('*/',2)
|
||||
if p >= 0:
|
||||
part = part[p+2:]
|
||||
blkcom = False
|
||||
else:
|
||||
if part[:2] == '//':
|
||||
break
|
||||
elif part[:2] == '/*':
|
||||
p = part.find('*/',2)
|
||||
if p >= 0: part = part[p+2:]
|
||||
else: blkcom = True;
|
||||
#handle types
|
||||
elif part == '=' : pass
|
||||
elif part == 'const' : pass
|
||||
elif part == 'PROGMEM' : pass
|
||||
elif part == 'align' : t = 0
|
||||
elif part == 'int8_t' : t = 1
|
||||
elif part == 'uint8_t' : t = 1
|
||||
elif part == 'int16_t' : t = 2
|
||||
elif part == 'uint16_t': t = 2
|
||||
elif part == 'int24_t' : t = 3
|
||||
elif part == 'uint24_t': t = 3
|
||||
elif part == 'int32_t' : t = 4
|
||||
elif part == 'uint32_t': t = 4
|
||||
elif part == 'image_t' : t = 5
|
||||
elif part == 'raw_t' : t = 6
|
||||
elif part == 'String' : t = 7
|
||||
elif part == 'string' : t = 7
|
||||
elif part == 'include' : include = True
|
||||
elif part == 'datasection' : pass
|
||||
elif part == 'savesection' : saveStart = len(bytes)
|
||||
#handle namespace
|
||||
elif part == 'namespace':
|
||||
namespace = True
|
||||
elif namespace == True:
|
||||
namespace = False
|
||||
writeHeader("namespace {}\n{{".format(part))
|
||||
indent += ' '
|
||||
elif part == 'namespace_end':
|
||||
indent = indent[:-2]
|
||||
writeHeader('}\n')
|
||||
namespace = False
|
||||
#handle strings
|
||||
elif (part[:1] == "'") or (part[:1] == '"'):
|
||||
if part[:1] == "'": part = part[1:part.rfind("'")]
|
||||
else: part = part[1:part.rfind('"')]
|
||||
#handle include
|
||||
if include == True:
|
||||
lines[lineNr+1:lineNr+1] = includeFile(part)
|
||||
include = False
|
||||
elif t == 1: bytes += part.encode('utf-8').decode('unicode_escape').encode('utf-8')
|
||||
elif t == 5: bytes += imageData(part)
|
||||
elif t == 6: bytes += rawData(part)
|
||||
elif t == 7: bytes += part.encode('utf-8').decode('unicode_escape').encode('utf-8') + b'\x00'
|
||||
else:
|
||||
sys.stderr.write('ERROR in line {}: unsupported string for type\n'.format(lineNr))
|
||||
sys.exit(-1)
|
||||
#handle values
|
||||
elif part[:1].isnumeric() or (part[:1] == '-' and part[1:2].isnumeric()):
|
||||
n = int(part,0)
|
||||
if t == 4: bytes.append((n >> 24) & 0xFF)
|
||||
if t >= 3: bytes.append((n >> 16) & 0xFF)
|
||||
if t >= 2: bytes.append((n >> 8) & 0xFF)
|
||||
if t >= 1: bytes.append((n >> 0) & 0xFF)
|
||||
#handle align
|
||||
if t == 0:
|
||||
align = len(bytes) % n
|
||||
if align: bytes += b'\xFF' * (n - align)
|
||||
#handle labels
|
||||
elif part[:1].isalpha():
|
||||
for j in range(len(part)):
|
||||
if part[j] == '=':
|
||||
addLabel(label,len(bytes))
|
||||
label = ''
|
||||
part = part[j+1:]
|
||||
parts.insert(i+1,part)
|
||||
break
|
||||
elif part[j].isalnum() or part[j] == '_':
|
||||
label += part[j]
|
||||
else:
|
||||
sys.stderr.write('ERROR in line {}: Bad label: {}\n'.format(lineNr,label))
|
||||
sys.exit(-1)
|
||||
if (label != '') and (i < len(parts) - 1) and (parts[i+1][:1] == '='):
|
||||
addLabel(label,len(bytes))
|
||||
label = ''
|
||||
#handle included constants
|
||||
if label != '':
|
||||
for symbol in constants:
|
||||
if symbol[0] == label:
|
||||
if t == 4: bytes.append((symbol[1] >> 24) & 0xFF)
|
||||
if t >= 3: bytes.append((symbol[1] >> 16) & 0xFF)
|
||||
if t >= 2: bytes.append((symbol[1] >> 8) & 0xFF)
|
||||
if t >= 1: bytes.append((symbol[1] >> 0) & 0xFF)
|
||||
label = ''
|
||||
break
|
||||
#handle symbol values
|
||||
if label != '':
|
||||
for symbol in symbols:
|
||||
if symbol[0] == label:
|
||||
if t == 4: bytes.append((symbol[1] >> 24) & 0xFF)
|
||||
if t >= 3: bytes.append((symbol[1] >> 16) & 0xFF)
|
||||
if t >= 2: bytes.append((symbol[1] >> 8) & 0xFF)
|
||||
if t >= 1: bytes.append((symbol[1] >> 0) & 0xFF)
|
||||
label = ''
|
||||
break
|
||||
if label != '':
|
||||
sys.stderr.write('ERROR in line {}: Undefined symbol: {}\n'.format(lineNr,label))
|
||||
sys.exit(-1)
|
||||
elif len(part) > 0:
|
||||
sys.stderr.write('ERROR unable to parse {} in element: {}\n'.format(part,str(parts)))
|
||||
sys.exit(-1)
|
||||
lineNr += 1
|
||||
|
||||
if saveStart >= 0:
|
||||
dataSize = saveStart
|
||||
dataPages = (dataSize + 255) // 256
|
||||
saveSize = len(bytes) - saveStart
|
||||
savePages = (saveSize + 4095) // 4096 * 16
|
||||
else:
|
||||
dataSize = len(bytes)
|
||||
dataPages = (dataSize + 255) // 256
|
||||
saveSize = 0
|
||||
savePages = 0
|
||||
savePadding = 0
|
||||
dataPadding = dataPages * 256 - dataSize
|
||||
savePadding = savePages * 256 - saveSize
|
||||
|
||||
print("Saving FX data header file {}".format(headerfilename))
|
||||
with open(headerfilename,"w") as file:
|
||||
file.write('#pragma once\n\n')
|
||||
file.write('/**** FX data header generated by fxdata-build.py tool version {} ****/\n\n'.format(VERSION))
|
||||
file.write('using uint24_t = __uint24;\n\n')
|
||||
file.write('// Initialize FX hardware using FX::begin(FX_DATA_PAGE); in the setup() function.\n\n')
|
||||
file.write('constexpr uint16_t FX_DATA_PAGE = 0x{:04x};\n'.format(65536 - dataPages - savePages))
|
||||
file.write('constexpr uint24_t FX_DATA_BYTES = {};\n\n'.format(dataSize))
|
||||
if saveSize > 0:
|
||||
file.write('constexpr uint16_t FX_SAVE_PAGE = 0x{:04x};\n'.format(65536 - savePages))
|
||||
file.write('constexpr uint24_t FX_SAVE_BYTES = {};\n\n'.format(saveSize))
|
||||
for line in header:
|
||||
file.write(line + '\n')
|
||||
file.close()
|
||||
|
||||
print("Saving {} bytes FX data to {}".format(dataSize,datafilename))
|
||||
with open(datafilename,"wb") as file:
|
||||
file.write(bytes[0:dataSize])
|
||||
file.close()
|
||||
if saveSize > 0:
|
||||
print("Saving {} bytes FX savedata to {}".format(saveSize,savefilename))
|
||||
with open(savefilename,"wb") as file:
|
||||
file.write(bytes[saveStart:len(bytes)])
|
||||
file.close()
|
||||
print("Saving FX development data to {}".format(devfilename))
|
||||
with open(devfilename,"wb") as file:
|
||||
file.write(bytes[0:dataSize])
|
||||
if dataPadding > 0: file.write(b'\xFF' * dataPadding)
|
||||
if saveSize > 0:
|
||||
file.write(bytes[saveStart:len(bytes)])
|
||||
if savePadding > 0: file.write(b'\xFF' * savePadding)
|
||||
file.close()
|
229
Tools/Arduboy-Python-Utilities/fxdata-upload.py
Normal file
|
@ -0,0 +1,229 @@
|
|||
|
||||
VERSION = '1.20'
|
||||
title ="Arduboy FX data uploader v" + VERSION + " by Mr.Blinky Feb.2022-Mar.2023"
|
||||
|
||||
import sys
|
||||
import os
|
||||
import time
|
||||
|
||||
try:
|
||||
toolspath = os.path.dirname(os.path.abspath(sys.argv[0]))
|
||||
sys.path.insert(0, toolspath)
|
||||
from serial.tools.list_ports import comports
|
||||
from serial import Serial
|
||||
except:
|
||||
sys.stderr.write("pySerial python module not found or wrong version.\n")
|
||||
sys.stderr.write("Make sure the correct module is installed or placed at {}\n".format(toolspath))
|
||||
sys.exit(-1)
|
||||
|
||||
compatibledevices = [
|
||||
#Arduboy Leonardo
|
||||
"VID:PID=2341:0036", "VID:PID=2341:8036",
|
||||
"VID:PID=2A03:0036", "VID:PID=2A03:8036",
|
||||
#Arduboy Micro
|
||||
"VID:PID=2341:0037", "VID:PID=2341:8037",
|
||||
"VID:PID=2A03:0037", "VID:PID=2A03:8037",
|
||||
#Genuino Micro
|
||||
"VID:PID=2341:0237", "VID:PID=2341:8237",
|
||||
#Sparkfun Pro Micro 5V
|
||||
"VID:PID=1B4F:9205", "VID:PID=1B4F:9206",
|
||||
#Adafruit ItsyBitsy 5V
|
||||
"VID:PID=239A:000E", "VID:PID=239A:800E",
|
||||
]
|
||||
|
||||
manufacturers = {
|
||||
0x01 : "Spansion",
|
||||
0x14 : "Cypress",
|
||||
0x1C : "EON",
|
||||
0x1F : "Adesto(Atmel)",
|
||||
0x20 : "Micron",
|
||||
0x37 : "AMIC",
|
||||
0x9D : "ISSI",
|
||||
0xC2 : "General Plus",
|
||||
0xC8 : "Giga Device",
|
||||
0xBF : "Microchip",
|
||||
0xEF : "Winbond"
|
||||
}
|
||||
|
||||
PAGESIZE = 256
|
||||
BLOCKSIZE = 65536
|
||||
PAGES_PER_BLOCK = BLOCKSIZE // PAGESIZE
|
||||
MAX_PAGES = 65536
|
||||
bootloader_active = False
|
||||
|
||||
def print(s):
|
||||
sys.stdout.write(s + '\n')
|
||||
sys.stdout.flush()
|
||||
|
||||
def getComPort(verbose):
|
||||
global bootloader_active
|
||||
devicelist = list(comports())
|
||||
for device in devicelist:
|
||||
for vidpid in compatibledevices:
|
||||
if vidpid in device[2]:
|
||||
port=device[0]
|
||||
bootloader_active = (compatibledevices.index(vidpid) & 1) == 0
|
||||
if verbose : sys.stdout.write("Found {} at port {} ".format(device[1],port))
|
||||
return port
|
||||
if verbose : print("Arduboy not found.")
|
||||
|
||||
def bootloaderStart():
|
||||
global bootloader
|
||||
## find and connect to Arduboy in bootloader mode ##
|
||||
port = getComPort(True)
|
||||
if port is None : sys.exit(-1)
|
||||
if not bootloader_active:
|
||||
print("Selecting bootloader mode...")
|
||||
try:
|
||||
bootloader = Serial(port,1200)
|
||||
time.sleep(0.1)
|
||||
bootloader.close()
|
||||
time.sleep(0.5)
|
||||
except:
|
||||
sys.stderr.write("COM port not available.\n")
|
||||
sys.exit(-1)
|
||||
#wait for disconnect and reconnect in bootloader mode
|
||||
while getComPort(False) == port :
|
||||
time.sleep(0.1)
|
||||
if bootloader_active: break
|
||||
while getComPort(False) is None : time.sleep(0.1)
|
||||
port = getComPort(True)
|
||||
|
||||
sys.stdout.write("Opening port ...")
|
||||
sys.stdout.flush()
|
||||
for retries in range(20):
|
||||
try:
|
||||
time.sleep(0.1)
|
||||
bootloader = Serial(port,57600)
|
||||
break
|
||||
except:
|
||||
if retries == 19:
|
||||
print(" Failed!")
|
||||
sys.exit(-1)
|
||||
sys.stdout.write(".")
|
||||
sys.stdout.flush()
|
||||
time.sleep(0.4)
|
||||
print("\r")
|
||||
|
||||
def getVersion():
|
||||
bootloader.write(b"V")
|
||||
return int(bootloader.read(2))
|
||||
|
||||
def getJedecID():
|
||||
bootloader.write(b"j")
|
||||
jedec_id = bootloader.read(3)
|
||||
time.sleep(0.5)
|
||||
bootloader.write(b"j")
|
||||
jedec_id2 = bootloader.read(3)
|
||||
if jedec_id2 != jedec_id or jedec_id == b'\x00\x00\x00' or jedec_id == b'\xFF\xFF\xFF':
|
||||
sys.stderr.write("No FX flash chip detected.\n")
|
||||
sys.exit(-1)
|
||||
return bytearray(jedec_id)
|
||||
|
||||
def bootloaderExit():
|
||||
global bootloader
|
||||
bootloader.write(b"E")
|
||||
bootloader.read(1)
|
||||
|
||||
################################################################################
|
||||
|
||||
def writeFlash(pagenumber, flashdata):
|
||||
bootloaderStart()
|
||||
|
||||
#check version
|
||||
if getVersion() < 13:
|
||||
sys.stderr.write("Bootloader has no flash cart support\nWrite aborted!\n")
|
||||
sys.exit(-1)
|
||||
|
||||
## detect flash cart ##
|
||||
jedec_id = getJedecID()
|
||||
if jedec_id[0] in manufacturers.keys():
|
||||
manufacturer = manufacturers[jedec_id[0]]
|
||||
else:
|
||||
manufacturer = "unknown"
|
||||
capacity = 1 << jedec_id[2]
|
||||
print("Detected FX flash chip with ID {:02X}{:02X}{:02X} size {}KB".format(jedec_id[0],jedec_id[1],jedec_id[2],capacity // 1024))
|
||||
|
||||
oldtime=time.time()
|
||||
# when starting partially in a block, preserve the beginning of old block data
|
||||
if pagenumber % PAGES_PER_BLOCK:
|
||||
blocklen = pagenumber % PAGES_PER_BLOCK * PAGESIZE
|
||||
blockaddr = pagenumber // PAGES_PER_BLOCK * PAGES_PER_BLOCK
|
||||
#read partial block data start
|
||||
bootloader.write(bytearray([ord("A"), blockaddr >> 8, blockaddr & 0xFF]))
|
||||
bootloader.read(1)
|
||||
bootloader.write(bytearray([ord("g"), (blocklen >> 8) & 0xFF, blocklen & 0xFF,ord("C")]))
|
||||
flashdata = bootloader.read(blocklen) + flashdata
|
||||
pagenumber = blockaddr
|
||||
|
||||
# when ending partially in a block, preserve the ending of old block data
|
||||
if len(flashdata) % BLOCKSIZE:
|
||||
blocklen = BLOCKSIZE - len(flashdata) % BLOCKSIZE
|
||||
blockaddr = pagenumber + len(flashdata) // PAGESIZE
|
||||
#read partial block data end
|
||||
bootloader.write(bytearray([ord("A"), blockaddr >> 8, blockaddr & 0xFF]))
|
||||
bootloader.read(1)
|
||||
bootloader.write(bytearray([ord("g"), (blocklen >> 8) & 0xFF, blocklen & 0xFF,ord("C")]))
|
||||
flashdata += bootloader.read(blocklen)
|
||||
|
||||
## write to flash cart ##
|
||||
blocks = len(flashdata) // BLOCKSIZE
|
||||
for block in range (blocks):
|
||||
if (block & 1 == 0) or verifyAfterWrite:
|
||||
bootloader.write(b"x\xC2") #RGB LED RED, buttons disabled
|
||||
else:
|
||||
bootloader.write(b"x\xC0") #RGB LED OFF, buttons disabled
|
||||
bootloader.read(1)
|
||||
sys.stdout.write("\rWriting block {}/{} ".format(block + 1,blocks))
|
||||
sys.stdout.flush()
|
||||
blockaddr = pagenumber + block * BLOCKSIZE // PAGESIZE
|
||||
blocklen = BLOCKSIZE
|
||||
#write block
|
||||
bootloader.write(bytearray([ord("A"), blockaddr >> 8, blockaddr & 0xFF]))
|
||||
bootloader.read(1)
|
||||
bootloader.write(bytearray([ord("B"), (blocklen >> 8) & 0xFF, blocklen & 0xFF,ord("C")]))
|
||||
bootloader.write(flashdata[block * BLOCKSIZE : block * BLOCKSIZE + blocklen])
|
||||
bootloader.read(1)
|
||||
if verifyAfterWrite:
|
||||
sys.stdout.write("\rVerifying block {}/{}".format(block + 1,blocks))
|
||||
sys.stdout.flush()
|
||||
bootloader.write(b"x\xC1") #RGB BLUE RED, buttons disabled
|
||||
bootloader.read(1)
|
||||
bootloader.write(bytearray([ord("A"), blockaddr >> 8, blockaddr & 0xFF]))
|
||||
bootloader.read(1)
|
||||
bootloader.write(bytearray([ord("g"), (blocklen >> 8) & 0xFF, blocklen & 0xFF,ord("C")]))
|
||||
if bootloader.read(blocklen) != flashdata[block * BLOCKSIZE : block * BLOCKSIZE + blocklen]:
|
||||
sys.stderr.write(" verify failed!\n\nWrite aborted.")
|
||||
bootloader.write(b"x\x40")#RGB LED off, buttons enabled
|
||||
bootloader.read(1)
|
||||
sys.exit(-1)
|
||||
|
||||
#write complete
|
||||
bootloader.write(b"x\x44")#RGB LED GREEN, buttons enabled
|
||||
bootloader.read(1)
|
||||
time.sleep(0.5)
|
||||
bootloader.write(b"x\x40")#RGB LED off, buttons enabled
|
||||
bootloader.read(1)
|
||||
bootloader.close()
|
||||
print("\rFX Data uploaded successfully")
|
||||
|
||||
################################################################################
|
||||
|
||||
print(title)
|
||||
|
||||
if (len(sys.argv) != 2) or (os.path.isfile(sys.argv[1]) != True) :
|
||||
sys.stderr.write("FX data file not found.\n")
|
||||
|
||||
filename = os.path.abspath(sys.argv[1])
|
||||
|
||||
verifyAfterWrite = True
|
||||
|
||||
print('Uploading FX data from file "{}"'.format(filename))
|
||||
f = open(filename,"rb")
|
||||
programdata = bytearray(f.read())
|
||||
f.close()
|
||||
if len(programdata) % PAGESIZE:
|
||||
programdata += b'\xFF' * (PAGESIZE - (len(programdata) % PAGESIZE))
|
||||
programpage = MAX_PAGES - (len(programdata) // PAGESIZE)
|
||||
|
||||
writeFlash(programpage, programdata)
|
|
@ -22,3 +22,4 @@ lib_deps =
|
|||
mlxxxp/Arduboy2@^6.0.0
|
||||
ArduboyTones@^1.0.3
|
||||
https://github.com/igvina/ArdVoice
|
||||
https://github.com/MrBlinky/ArduboyFX
|
||||
|
|
|
@ -200,4 +200,12 @@ extern "C"
|
|||
{
|
||||
arduboy.setRGBled(red, green, blue);
|
||||
}
|
||||
uint8_t arduboy_buttons_state()
|
||||
{
|
||||
return arduboy.buttonsState();
|
||||
}
|
||||
void arduboy_exit_to_bootloader()
|
||||
{
|
||||
arduboy.exitToBootloader();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,105 @@
|
|||
#pragma once
|
||||
|
||||
extern "C"
|
||||
{
|
||||
void arduboyfx_begin(void)
|
||||
{
|
||||
FX::begin();
|
||||
}
|
||||
void arduboyfx_begin_data(uint16_t datapage)
|
||||
{
|
||||
FX::begin(datapage);
|
||||
}
|
||||
void arduboyfx_begin_data_save(uint16_t datapage,uint16_t savepage )
|
||||
{
|
||||
FX::begin(datapage,savepage);
|
||||
}
|
||||
void arduboyfx_display()
|
||||
{
|
||||
FX::display();
|
||||
}
|
||||
void arduboyfx_display_clear()
|
||||
{
|
||||
FX::display(true);
|
||||
}
|
||||
void arduboyfx_draw_bitmap(int16_t x,int16_t y,uint24_t address,uint8_t frame,uint8_t mode )
|
||||
{
|
||||
FX::drawBitmap(x,y,address,frame,mode);
|
||||
}
|
||||
void arduboyfx_read_data_array(uint24_t address,uint8_t index,uint8_t offset,uint8_t elementSize,uint8_t * buffer,size_t length )
|
||||
{
|
||||
FX::readDataArray(address,index,offset,elementSize,buffer,length);
|
||||
}
|
||||
void arduboyfx_set_frame(uint24_t frame,uint8_t repeat )
|
||||
{
|
||||
FX::setFrame(frame,repeat);
|
||||
}
|
||||
uint24_t arduboyfx_draw_frame(uint24_t address)
|
||||
{
|
||||
return FX::drawFrame(address);
|
||||
}
|
||||
void arduboyfx_set_cursor(int16_t x,int16_t y)
|
||||
{
|
||||
FX::setCursor(x,y);
|
||||
}
|
||||
void arduboyfx_draw_string_fx(uint24_t address)
|
||||
{
|
||||
FX::drawString(address);
|
||||
}
|
||||
void arduboyfx_draw_string_buffer(const uint8_t * buffer )
|
||||
{
|
||||
FX::drawString(buffer);
|
||||
}
|
||||
void arduboyfx_draw_string(const char *str)
|
||||
{
|
||||
FX::drawString(str);
|
||||
}
|
||||
void arduboyfx_set_cursor_x(int16_t x)
|
||||
{
|
||||
FX::setCursorX(x);
|
||||
}
|
||||
void arduboyfx_set_cursor_y(int16_t y)
|
||||
{
|
||||
FX::setCursorY(y);
|
||||
}
|
||||
void arduboyfx_set_font(uint24_t address, uint8_t mode)
|
||||
{
|
||||
FX::setFont(address,mode);
|
||||
}
|
||||
void arduboyfx_set_font_mode(uint8_t mode)
|
||||
{
|
||||
FX::setFontMode(mode);
|
||||
}
|
||||
void arduboyfx_set_cursor_range(int16_t left,int16_t wrap)
|
||||
{
|
||||
FX::setCursorRange(left, wrap);
|
||||
}
|
||||
void arduboyfx_draw_number_i16(int16_t n, int8_t digits)
|
||||
{
|
||||
FX::drawNumber(n,digits);
|
||||
}
|
||||
void arduboyfx_draw_number_i32(int32_t n, int8_t digits)
|
||||
{
|
||||
FX::drawNumber(n,digits);
|
||||
}
|
||||
void arduboyfx_draw_number_u16(uint16_t n, int8_t digits)
|
||||
{
|
||||
FX::drawNumber(n,digits);
|
||||
}
|
||||
void arduboyfx_draw_number_u32(uint32_t n, int8_t digits)
|
||||
{
|
||||
FX::drawNumber(n,digits);
|
||||
}
|
||||
void arduboyfx_draw_char(uint8_t c)
|
||||
{
|
||||
FX::drawChar(c);
|
||||
}
|
||||
uint8_t arduboyfx_load_game_state(uint8_t *gameState,size_t size)
|
||||
{
|
||||
return FX::loadGameState(gameState, size);
|
||||
}
|
||||
void arduboyfx_save_game_state(uint8_t *gameState,size_t size)
|
||||
{
|
||||
FX::saveGameState(gameState, size);
|
||||
}
|
||||
}
|
|
@ -13,6 +13,12 @@ Arduboy2 arduboy;
|
|||
#include <ArduboyTones.h>
|
||||
#include "./library/arduboy/arduboy_tones_export.h"
|
||||
#endif
|
||||
|
||||
#if defined(ArduboyFX_Library)
|
||||
#include <ArduboyFX.h>
|
||||
#include "./library/arduboy/arduboyfx_export.h"
|
||||
#endif
|
||||
|
||||
#if defined(ArdVoice_Library)
|
||||
#include <ArdVoice.h>
|
||||
ArdVoice ardvoice;
|
||||
|
|
|
@ -23,6 +23,10 @@ pub const A: ButtonSet = ButtonSet {
|
|||
pub const B: ButtonSet = ButtonSet {
|
||||
flag_set: 0b00000100,
|
||||
};
|
||||
/// Just a `const` for the any
|
||||
pub const ANY_BUTTON: ButtonSet = ButtonSet {
|
||||
flag_set: 0b11111111,
|
||||
};
|
||||
/// Just a `const` for the UP button
|
||||
pub const UP_BUTTON: ButtonSet = UP;
|
||||
/// Just a `const` for the RIGHT button
|
||||
|
|
|
@ -33,8 +33,9 @@ mod print;
|
|||
#[doc(inline)]
|
||||
pub extern crate heapless;
|
||||
pub use crate::library::arduboy2::{self, Arduboy2, Color, FONT_SIZE, HEIGHT, WIDTH};
|
||||
pub use crate::library::arduboy_tone::{self, ArduboyTones};
|
||||
pub use crate::library::arduboy_tones::{self, ArduboyTones};
|
||||
pub use crate::library::ardvoice::{self, ArdVoice};
|
||||
pub use crate::library::eeprom::{EEPROM, EEPROMBYTE};
|
||||
pub use crate::library::{arduino, c, sprites};
|
||||
pub use crate::library::arduboyfx::{self};
|
||||
pub mod serial_print;
|
||||
|
|
|
@ -2,11 +2,13 @@
|
|||
//!
|
||||
//! All of the functions are safe wrapped inside the [Arduboy2] struct.
|
||||
#![allow(dead_code)]
|
||||
|
||||
use crate::hardware::buttons::ButtonSet;
|
||||
use crate::print::Printable;
|
||||
use core::ffi::{c_char, c_int, c_long, c_size_t, c_uchar, c_uint, c_ulong};
|
||||
use core::mem;
|
||||
use core::ops::Not;
|
||||
|
||||
/// The standard font size of the arduboy
|
||||
///
|
||||
/// this is to calculate with it.
|
||||
|
@ -14,11 +16,11 @@ pub const FONT_SIZE: u8 = 6;
|
|||
/// The standard width of the arduboy
|
||||
///
|
||||
/// this is to calculate with it.
|
||||
pub const WIDTH: u8 = 128;
|
||||
pub const WIDTH: i16 = 128;
|
||||
/// The standard height of the arduboy
|
||||
///
|
||||
/// this is to calculate with it.
|
||||
pub const HEIGHT: u8 = 64;
|
||||
pub const HEIGHT: i16 = 64;
|
||||
|
||||
/// This item is to chose between Black or White
|
||||
#[derive(Debug, Copy, Clone, Hash, Eq, PartialEq, Ord, PartialOrd)]
|
||||
|
@ -29,6 +31,7 @@ pub enum Color {
|
|||
/// Led is on
|
||||
White,
|
||||
}
|
||||
|
||||
impl Not for Color {
|
||||
type Output = Self;
|
||||
|
||||
|
@ -39,6 +42,7 @@ impl Not for Color {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// This struct is used by a few Arduboy functions.
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
pub struct Rect {
|
||||
|
@ -51,6 +55,7 @@ pub struct Rect {
|
|||
/// Rect height
|
||||
pub height: u8,
|
||||
}
|
||||
|
||||
/// This struct is used by a few Arduboy functions.
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
pub struct Point {
|
||||
|
@ -62,10 +67,13 @@ pub struct Point {
|
|||
|
||||
/// This is the struct to interact in a save way with the Arduboy2 C++ library.
|
||||
pub struct Arduboy2 {}
|
||||
|
||||
impl Arduboy2 {
|
||||
/// gives you a new instance of the [Arduboy2]
|
||||
/// ## Example
|
||||
/// ```
|
||||
/// #![allow(non_upper_case_globals)]
|
||||
/// use arduboy_rust::prelude::*;
|
||||
/// const arduboy: Arduboy2 = Arduboy2::new();
|
||||
/// ```
|
||||
pub const fn new() -> Self {
|
||||
|
@ -342,8 +350,11 @@ impl Arduboy2 {
|
|||
///- ASCII carriage return (\r, 0x0D, musical eighth note). This character will be ignored.
|
||||
///
|
||||
///
|
||||
///Example
|
||||
/// ## Example
|
||||
/// ```
|
||||
/// #![allow(non_upper_case_globals)]
|
||||
/// use arduboy_rust::prelude::*;
|
||||
/// const arduboy: Arduboy2 = Arduboy2::new();
|
||||
/// let value: i16 = 42;
|
||||
///
|
||||
/// arduboy.print(b"Hello World\n\0"[..]); // Prints "Hello World" and then sets the
|
||||
|
@ -506,10 +517,10 @@ impl Arduboy2 {
|
|||
///Parameters
|
||||
///- color The name of the LED to set. The value given should be one of RED_LED, GREEN_LED or BLUE_LED.
|
||||
///- val The brightness value for the LED, from 0 to 255.
|
||||
///
|
||||
///
|
||||
///**Note**
|
||||
///> In order to use this function, the 3 parameter version must first be called at least once, in order to initialize the hardware.
|
||||
///
|
||||
///
|
||||
///This 2 parameter version of the function will set the brightness of a single LED within the RGB LED without affecting the current brightness of the other two. See the description of the 3 parameter version of this function for more details on the RGB LED.
|
||||
pub fn set_rgb_led_single(&self, color: u8, val: u8) {
|
||||
unsafe { set_rgb_led_single(color, val) }
|
||||
|
@ -542,10 +553,14 @@ impl Arduboy2 {
|
|||
///
|
||||
///## Example
|
||||
///If you wanted to fire a shot every 5 frames while the A button is being held down:
|
||||
/// ```
|
||||
///```
|
||||
/// #![allow(non_upper_case_globals)]
|
||||
/// use arduboy_rust::prelude::*;
|
||||
/// const arduboy: Arduboy2 = Arduboy2::new();
|
||||
///
|
||||
/// if arduboy.everyXFrames(5) {
|
||||
/// if arduboy.pressed(A_BUTTON) {
|
||||
/// fireShot();
|
||||
/// //fireShot(); // just some example
|
||||
/// }
|
||||
/// }
|
||||
/// ```
|
||||
|
@ -627,10 +642,30 @@ impl Arduboy2 {
|
|||
pub fn idle(&self) {
|
||||
unsafe { idle() }
|
||||
}
|
||||
///Get the current state of all buttons as a bitmask.
|
||||
///
|
||||
///### Returns
|
||||
///A bitmask of the state of all the buttons.
|
||||
///
|
||||
///The returned mask contains a bit for each button. For any pressed button, its bit will be 1. For released buttons their associated bits will be 0.
|
||||
///
|
||||
///The following defined mask values should be used for the buttons:
|
||||
/// LEFT_BUTTON, RIGHT_BUTTON, UP_BUTTON, DOWN_BUTTON, A_BUTTON, B_BUTTON
|
||||
pub fn buttons_state(&self) -> u8 {
|
||||
unsafe { arduboy_buttons_state() }
|
||||
}
|
||||
///Exit the sketch and start the bootloader.
|
||||
///
|
||||
///The sketch will exit and the bootloader will be started in command mode. The effect will be similar to pressing the reset button.
|
||||
///
|
||||
///This function is intended to be used to allow uploading a new sketch, when the USB code has been removed to gain more code space. Ideally, the sketch would present a "New Sketch Upload" menu or prompt telling the user to "Press and hold the DOWN button when the procedure to upload a new sketch has been initiated".
|
||||
///The sketch would then wait for the DOWN button to be pressed and then call this function.
|
||||
pub fn exit_to_bootloader(&self) {
|
||||
unsafe { arduboy_exit_to_bootloader() }
|
||||
}
|
||||
}
|
||||
|
||||
extern "C" {
|
||||
|
||||
#[link_name = "arduboy_begin"]
|
||||
fn begin();
|
||||
|
||||
|
@ -788,4 +823,10 @@ extern "C" {
|
|||
|
||||
#[link_name = "arduboy_set_rgb_led"]
|
||||
fn set_rgb_led(red: c_uchar, green: c_uchar, blue: c_uchar);
|
||||
|
||||
#[link_name = "arduboy_buttons_state"]
|
||||
fn arduboy_buttons_state() -> u8;
|
||||
|
||||
#[link_name = "arduboy_exit_to_bootloader"]
|
||||
fn arduboy_exit_to_bootloader();
|
||||
}
|
||||
|
|
|
@ -1,39 +1,10 @@
|
|||
//!This is the Module to interact in a save way with the ArduboyTones C++ library.
|
||||
//!
|
||||
//! You will need to uncomment the ArduboyTones_Library in the import_config.h file.
|
||||
pub use crate::library::arduboy_tone_pitch;
|
||||
pub mod tones_pitch;
|
||||
|
||||
use core::ffi::{c_uchar, c_uint, c_ulong};
|
||||
extern "C" {
|
||||
#[link_name = "sound_tone"]
|
||||
fn sound_tone(frequency: c_uint, duration: c_ulong);
|
||||
#[link_name = "sound_tone2"]
|
||||
fn sound_tone2(frequency1: c_uint, duration1: c_ulong, frequency2: c_uint, duration2: c_ulong);
|
||||
#[link_name = "sound_tone3"]
|
||||
fn sound_tone3(
|
||||
frequency1: c_uint,
|
||||
duration1: c_ulong,
|
||||
frequency2: c_uint,
|
||||
duration2: c_ulong,
|
||||
frequency3: c_uint,
|
||||
duration3: c_ulong,
|
||||
);
|
||||
|
||||
#[link_name = "sound_tones"]
|
||||
fn sound_tones(tones: *const c_uint);
|
||||
|
||||
#[link_name = "sound_no_tone"]
|
||||
fn sound_no_tone();
|
||||
|
||||
#[link_name = "sound_playing"]
|
||||
fn sound_playing() -> bool;
|
||||
|
||||
#[link_name = "sound_tones_in_ram"]
|
||||
fn sound_tones_in_ram(tones: *mut c_ulong);
|
||||
|
||||
#[link_name = "sound_volume_mode"]
|
||||
fn sound_volume_mode(mode: c_uchar);
|
||||
|
||||
}
|
||||
///This is the struct to interact in a save way with the ArduboyTones C++ library.
|
||||
///
|
||||
/// You will need to uncomment the ArduboyTones_Library in the import_config.h file.
|
||||
|
@ -42,6 +13,7 @@ impl ArduboyTones {
|
|||
///Get a new instance of [ArduboyTones]
|
||||
/// ## Example
|
||||
/// ```
|
||||
/// use arduboy_rust::prelude::*;
|
||||
/// const sound: ArduboyTones = ArduboyTones::new();
|
||||
/// ```
|
||||
pub const fn new() -> ArduboyTones {
|
||||
|
@ -79,7 +51,11 @@ impl ArduboyTones {
|
|||
frequency3: u16,
|
||||
duration3: u32,
|
||||
) {
|
||||
unsafe { sound_tone3(frequency1, duration1, frequency2, duration2, frequency3, duration3) }
|
||||
unsafe {
|
||||
sound_tone3(
|
||||
frequency1, duration1, frequency2, duration2, frequency3, duration3,
|
||||
)
|
||||
}
|
||||
}
|
||||
/// Play a tone sequence from frequency/duration pairs in a PROGMEM array.
|
||||
///
|
||||
|
@ -94,11 +70,13 @@ impl ArduboyTones {
|
|||
///
|
||||
/// Example:
|
||||
/// ```
|
||||
/// use arduboy_rust::prelude::*;
|
||||
/// const sound:ArduboyTones=ArduboyTones::new();
|
||||
/// progmem!(
|
||||
/// static sound1:[u8;_]=[220,1000, 0,250, 440,500, 880,2000,TONES_END]
|
||||
/// static sound1:[u8;_]=[220,1000, 0,250, 440,500, 880,2000,TONES_END];
|
||||
/// );
|
||||
///
|
||||
/// tones(get_tones_addr!(sound1));
|
||||
/// sound.tones(get_tones_addr!(sound1));
|
||||
/// ```
|
||||
pub fn tones(&self, tones: *const u16) {
|
||||
unsafe { sound_tones(tones) }
|
||||
|
@ -130,6 +108,8 @@ impl ArduboyTones {
|
|||
/// Example:
|
||||
///
|
||||
/// ```
|
||||
/// use arduboy_rust::prelude::*;
|
||||
/// use arduboy_tones::tones_pitch::*;
|
||||
/// let sound2: [u16; 9] = [220, 1000, 0, 250, 440, 500, 880, 2000, TONES_END];
|
||||
/// ```
|
||||
/// Using `tones()`, with the data in PROGMEM, is normally a better
|
||||
|
@ -150,3 +130,28 @@ impl ArduboyTones {
|
|||
unsafe { sound_volume_mode(mode) }
|
||||
}
|
||||
}
|
||||
extern "C" {
|
||||
#[link_name = "sound_tone"]
|
||||
fn sound_tone(frequency: c_uint, duration: c_ulong);
|
||||
#[link_name = "sound_tone2"]
|
||||
fn sound_tone2(frequency1: c_uint, duration1: c_ulong, frequency2: c_uint, duration2: c_ulong);
|
||||
#[link_name = "sound_tone3"]
|
||||
fn sound_tone3(
|
||||
frequency1: c_uint,
|
||||
duration1: c_ulong,
|
||||
frequency2: c_uint,
|
||||
duration2: c_ulong,
|
||||
frequency3: c_uint,
|
||||
duration3: c_ulong,
|
||||
);
|
||||
#[link_name = "sound_tones"]
|
||||
fn sound_tones(tones: *const c_uint);
|
||||
#[link_name = "sound_no_tone"]
|
||||
fn sound_no_tone();
|
||||
#[link_name = "sound_playing"]
|
||||
fn sound_playing() -> bool;
|
||||
#[link_name = "sound_tones_in_ram"]
|
||||
fn sound_tones_in_ram(tones: *mut c_ulong);
|
||||
#[link_name = "sound_volume_mode"]
|
||||
fn sound_volume_mode(mode: c_uchar);
|
||||
}
|
9
arduboy-rust/src/library/arduboyfx.rs
Normal file
|
@ -0,0 +1,9 @@
|
|||
//! This is the Module to interact in a save way with the ArduboyFX C++ library.
|
||||
//!
|
||||
//! You will need to uncomment the ArduboyFX_Library in the import_config.h file.
|
||||
pub mod fx_consts;
|
||||
mod drawable_number;
|
||||
pub use drawable_number::DrawableNumber;
|
||||
mod drawable_string;
|
||||
pub use drawable_string::DrawableString;
|
||||
pub mod fx;
|
38
arduboy-rust/src/library/arduboyfx/drawable_number.rs
Normal file
|
@ -0,0 +1,38 @@
|
|||
use core::ffi::{c_char, c_int, c_long, c_uint, c_ulong};
|
||||
pub trait DrawableNumber
|
||||
where
|
||||
Self: Sized,
|
||||
{
|
||||
fn draw(self, digits: i8);
|
||||
}
|
||||
impl DrawableNumber for i16 {
|
||||
fn draw(self, digits: i8) {
|
||||
unsafe { arduboyfx_draw_number_i16(self, digits) }
|
||||
}
|
||||
}
|
||||
impl DrawableNumber for u16 {
|
||||
fn draw(self, digits: i8) {
|
||||
unsafe { arduboyfx_draw_number_u16(self, digits) }
|
||||
}
|
||||
}
|
||||
impl DrawableNumber for i32 {
|
||||
fn draw(self, digits: i8) {
|
||||
unsafe { arduboyfx_draw_number_i32(self, digits) }
|
||||
}
|
||||
}
|
||||
impl DrawableNumber for u32 {
|
||||
fn draw(self, digits: i8) {
|
||||
unsafe { arduboyfx_draw_number_u32(self, digits) }
|
||||
}
|
||||
}
|
||||
|
||||
extern "C" {
|
||||
#[link_name = "arduboyfx_draw_number_i16"]
|
||||
fn arduboyfx_draw_number_i16(n: c_int, digits: c_char);
|
||||
#[link_name = "arduboyfx_draw_number_u16"]
|
||||
fn arduboyfx_draw_number_u16(n: c_uint, digits: c_char);
|
||||
#[link_name = "arduboyfx_draw_number_i32"]
|
||||
fn arduboyfx_draw_number_i32(n: c_long, digits: c_char);
|
||||
#[link_name = "arduboyfx_draw_number_u32"]
|
||||
fn arduboyfx_draw_number_u32(n: c_ulong, digits: c_char);
|
||||
}
|
53
arduboy-rust/src/library/arduboyfx/drawable_string.rs
Normal file
|
@ -0,0 +1,53 @@
|
|||
use core::ffi::{c_char, c_uchar, c_ulong};
|
||||
use crate::library::progmem::Pstring;
|
||||
|
||||
pub trait DrawableString
|
||||
where
|
||||
Self: Sized,
|
||||
{
|
||||
fn draw(self);
|
||||
}
|
||||
impl DrawableString for &[u8] {
|
||||
fn draw(self) {
|
||||
unsafe {
|
||||
arduboyfx_draw_string(self as *const [u8] as *const i8);
|
||||
}
|
||||
}
|
||||
}
|
||||
impl DrawableString for &str {
|
||||
fn draw(self) {
|
||||
unsafe {
|
||||
arduboyfx_draw_string(self.as_bytes() as *const [u8] as *const i8);
|
||||
}
|
||||
}
|
||||
}
|
||||
impl<const N: usize> DrawableString for crate::heapless::String<N> {
|
||||
fn draw(self) {
|
||||
unsafe {
|
||||
arduboyfx_draw_string(self.as_bytes() as *const [u8] as *const i8);
|
||||
}
|
||||
}
|
||||
}
|
||||
impl DrawableString for Pstring {
|
||||
fn draw(self) {
|
||||
unsafe {
|
||||
arduboyfx_draw_string_buffer(self.pointer as *const u8);
|
||||
}
|
||||
}
|
||||
}
|
||||
impl DrawableString for u32 {
|
||||
fn draw(self) {
|
||||
unsafe {
|
||||
arduboyfx_draw_string_fx(self);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extern "C" {
|
||||
#[link_name = "arduboyfx_draw_string_fx"]
|
||||
fn arduboyfx_draw_string_fx(address: c_ulong);
|
||||
#[link_name = "arduboyfx_draw_string_buffer"]
|
||||
fn arduboyfx_draw_string_buffer(buffer: *const c_uchar);
|
||||
#[link_name = "arduboyfx_draw_string"]
|
||||
fn arduboyfx_draw_string(cstr: *const c_char);
|
||||
}
|
136
arduboy-rust/src/library/arduboyfx/fx.rs
Normal file
|
@ -0,0 +1,136 @@
|
|||
//! Functions given by the ArduboyFX library.
|
||||
//!
|
||||
//! You can use the 'FX::' module to access the functions after the import of the prelude
|
||||
//! ```
|
||||
//! use arduboy_rust::prelude::*;
|
||||
//!
|
||||
//! fn setup() {
|
||||
//! FX::begin()
|
||||
//! }
|
||||
//! ```
|
||||
//! You will need to uncomment the ArduboyFX_Library in the import_config.h file.
|
||||
#![allow(non_upper_case_globals)]
|
||||
use super::drawable_number::DrawableNumber;
|
||||
use super::drawable_string::DrawableString;
|
||||
use core::ffi::{c_int, c_size_t, c_uchar, c_uint, c_ulong};
|
||||
pub fn begin() {
|
||||
unsafe { arduboyfx_begin() }
|
||||
}
|
||||
pub fn begin_data(datapage: u16) {
|
||||
unsafe { arduboyfx_begin_data(datapage) }
|
||||
}
|
||||
pub fn begin_data_save(datapage: u16, savepage: u16) {
|
||||
unsafe { arduboyfx_begin_data_save(datapage, savepage) }
|
||||
}
|
||||
pub fn display() {
|
||||
unsafe { arduboyfx_display() }
|
||||
}
|
||||
pub fn display_clear() {
|
||||
unsafe { arduboyfx_display_clear() }
|
||||
}
|
||||
pub fn draw_number(n: impl DrawableNumber, digits: i8) {
|
||||
n.draw(digits)
|
||||
}
|
||||
pub fn draw_string(string: impl DrawableString) {
|
||||
string.draw()
|
||||
}
|
||||
pub fn draw_char(c: u8) {
|
||||
unsafe { arduboyfx_draw_char(c) }
|
||||
}
|
||||
pub fn draw_bitmap(x: i16, y: i16, address: u32, frame: u8, mode: u8) {
|
||||
unsafe { arduboyfx_draw_bitmap(x, y, address, frame, mode) }
|
||||
}
|
||||
pub fn draw_frame(address: u32) -> u32 {
|
||||
unsafe { arduboyfx_draw_frame(address) }
|
||||
}
|
||||
pub fn set_frame(frame: u32, repeat: u8) {
|
||||
unsafe { arduboyfx_set_frame(frame, repeat) }
|
||||
}
|
||||
pub fn read_data_array(
|
||||
address: u32,
|
||||
index: u8,
|
||||
offset: u8,
|
||||
element_size: u8,
|
||||
buffer: *const u8,
|
||||
length: usize,
|
||||
) {
|
||||
unsafe { arduboyfx_read_data_array(address, index, offset, element_size, buffer, length) }
|
||||
}
|
||||
pub fn set_cursor(x: i16, y: i16) {
|
||||
unsafe { arduboyfx_set_cursor(x, y) }
|
||||
}
|
||||
pub fn set_cursor_x(x: i16) {
|
||||
unsafe { arduboyfx_set_cursor_x(x) }
|
||||
}
|
||||
pub fn set_cursor_y(y: i16) {
|
||||
unsafe { arduboyfx_set_cursor_y(y) }
|
||||
}
|
||||
pub fn set_cursor_range(left: i16, wrap: i16) {
|
||||
unsafe { arduboyfx_set_cursor_range(left, wrap) }
|
||||
}
|
||||
pub fn set_font(address: u32, mode: u8) {
|
||||
unsafe { arduboyfx_set_font(address, mode) }
|
||||
}
|
||||
pub fn set_font_mode(mode: u8) {
|
||||
unsafe { arduboyfx_set_font_mode(mode) };
|
||||
}
|
||||
pub fn load_game_state<T>(your_struct: &mut T) -> u8 {
|
||||
let pointer = your_struct as *mut T;
|
||||
let object_pointer = pointer as *mut u8;
|
||||
let object_size = core::mem::size_of::<T>();
|
||||
|
||||
unsafe { arduboyfx_load_game_state(object_pointer, object_size) }
|
||||
}
|
||||
pub fn save_game_state<T>(your_struct: &T) {
|
||||
let pointer = your_struct as *const T;
|
||||
let object_pointer = pointer as *const u8;
|
||||
let object_size = core::mem::size_of::<T>();
|
||||
|
||||
unsafe { arduboyfx_save_game_state(object_pointer, object_size) }
|
||||
}
|
||||
extern "C" {
|
||||
#[link_name = "arduboyfx_begin"]
|
||||
fn arduboyfx_begin();
|
||||
#[link_name = "arduboyfx_begin_data"]
|
||||
fn arduboyfx_begin_data(datapage: c_uint);
|
||||
#[link_name = "arduboyfx_begin_data_save"]
|
||||
fn arduboyfx_begin_data_save(datapage: c_uint, savepage: c_uint);
|
||||
#[link_name = "arduboyfx_display"]
|
||||
fn arduboyfx_display();
|
||||
#[link_name = "arduboyfx_display_clear"]
|
||||
fn arduboyfx_display_clear();
|
||||
#[link_name = "arduboyfx_read_data_array"]
|
||||
fn arduboyfx_read_data_array(
|
||||
address: c_ulong,
|
||||
index: c_uchar,
|
||||
offset: c_uchar,
|
||||
element_size: c_uchar,
|
||||
buffer: *const c_uchar,
|
||||
length: c_size_t,
|
||||
);
|
||||
#[link_name = "arduboyfx_draw_bitmap"]
|
||||
fn arduboyfx_draw_bitmap(x: c_int, y: c_int, address: c_ulong, frame: c_uchar, mode: c_uchar);
|
||||
#[link_name = "arduboyfx_set_frame"]
|
||||
fn arduboyfx_set_frame(frame: c_ulong, repeat: c_uchar);
|
||||
#[link_name = "arduboyfx_draw_frame"]
|
||||
fn arduboyfx_draw_frame(address: c_ulong) -> c_ulong;
|
||||
#[link_name = "arduboyfx_set_cursor"]
|
||||
fn arduboyfx_set_cursor(x: c_int, y: c_int);
|
||||
#[link_name = "arduboyfx_set_cursor_x"]
|
||||
fn arduboyfx_set_cursor_x(x: c_int);
|
||||
#[link_name = "arduboyfx_set_cursor_y"]
|
||||
fn arduboyfx_set_cursor_y(y: c_int);
|
||||
#[link_name = "arduboyfx_set_font"]
|
||||
fn arduboyfx_set_font(address: c_ulong, mode: c_uchar);
|
||||
#[link_name = "arduboyfx_set_font_mode"]
|
||||
fn arduboyfx_set_font_mode(mode: c_uchar);
|
||||
#[link_name = "arduboyfx_set_cursor_range"]
|
||||
fn arduboyfx_set_cursor_range(left: c_int, wrap: c_int);
|
||||
#[link_name = "arduboyfx_draw_char"]
|
||||
fn arduboyfx_draw_char(c: c_uchar);
|
||||
#[link_name = "arduboyfx_load_game_state"]
|
||||
fn arduboyfx_load_game_state(object: *mut u8, size: usize) -> u8;
|
||||
#[link_name = "arduboyfx_save_game_state"]
|
||||
fn arduboyfx_save_game_state(object: *const u8, size: usize);
|
||||
|
||||
}
|
61
arduboy-rust/src/library/arduboyfx/fx_consts.rs
Normal file
|
@ -0,0 +1,61 @@
|
|||
//! Consts given by the ArduboyFX library.
|
||||
//!
|
||||
//! You can use the `use arduboyfx::fx_consts::*;` module to access the consts.
|
||||
//! ```
|
||||
//! use arduboy_rust::prelude::*;
|
||||
//! use arduboyfx::fx_consts::*;
|
||||
//!
|
||||
//! fn setup(){
|
||||
//! let demo = dbmBlack;
|
||||
//! }
|
||||
//!
|
||||
//! ```
|
||||
#![allow(non_upper_case_globals)]
|
||||
pub const dbfWhiteBlack: u8 = 0;
|
||||
pub const dbfInvert: u8 = 0;
|
||||
pub const dbfBlack: u8 = 0;
|
||||
pub const dbfReverseBlack: u8 = 3;
|
||||
pub const dbfMasked: u8 = 4;
|
||||
pub const dbfFlip: u8 = 5;
|
||||
pub const dbfExtraRow: u8 = 7;
|
||||
pub const dbfEndFrame: u8 = 6;
|
||||
pub const dbfLastFrame: u8 = 7;
|
||||
pub const dbmBlack: u8 = (1 << dbfReverseBlack) | (1 << dbfBlack) | (1 << dbfWhiteBlack);
|
||||
pub const dbmWhite: u8 = 1 << dbfWhiteBlack;
|
||||
pub const dbmInvert: u8 = 1 << dbfInvert;
|
||||
pub const dbmFlip: u8 = 1 << dbfFlip;
|
||||
pub const dbmNormal: u8 = 0;
|
||||
pub const dbmOverwrite: u8 = 0;
|
||||
pub const dbmReverse: u8 = 1 << dbfReverseBlack;
|
||||
pub const dbmMasked: u8 = 1 << dbfMasked;
|
||||
pub const dbmEndFrame: u8 = 1 << dbfEndFrame;
|
||||
pub const dbmLastFrame: u8 = 1 << dbfLastFrame;
|
||||
pub const dcfWhiteBlack: u8 = 0;
|
||||
pub const dcfInvert: u8 = 1;
|
||||
pub const dcfBlack: u8 = 2;
|
||||
pub const dcfReverseBlack: u8 = 3;
|
||||
pub const dcfMasked: u8 = 4;
|
||||
pub const dcfProportional: u8 = 5;
|
||||
pub const dcmBlack: u8 = (1 << dcfReverseBlack) | (1 << dcfBlack) | (1 << dcfWhiteBlack);
|
||||
pub const dcmWhite: u8 = 1 << dcfWhiteBlack;
|
||||
pub const dcmInvert: u8 = 1 << dcfInvert;
|
||||
pub const dcmNormal: u8 = 0;
|
||||
pub const dcmOverwrite: u8 = 0;
|
||||
pub const dcmReverse: u8 = 1 << dcfReverseBlack;
|
||||
pub const dcmMasked: u8 = 1 << dcfMasked;
|
||||
pub const dcmProportional: u8 = 1 << dcfProportional;
|
||||
pub const FX_VECTOR_KEY_VALUE: u16 = 0x9518;
|
||||
pub const FX_DATA_VECTOR_KEY_POINTER: u16 = 0x0014;
|
||||
pub const FX_DATA_VECTOR_PAGE_POINTER: u16 = 0x0016;
|
||||
pub const FX_SAVE_VECTOR_KEY_POINTER: u16 = 0x0018;
|
||||
pub const FX_SAVE_VECTOR_PAGE_POINTER: u16 = 0x001A;
|
||||
pub const SFC_JEDEC_ID: u8 = 0x9F;
|
||||
pub const SFC_READSTATUS1: u8 = 0x05;
|
||||
pub const SFC_READSTATUS2: u8 = 0x35;
|
||||
pub const SFC_READSTATUS3: u8 = 0x15;
|
||||
pub const SFC_READ: u8 = 0x03;
|
||||
pub const SFC_WRITE_ENABLE: u8 = 0x06;
|
||||
pub const SFC_WRITE: u8 = 0x02;
|
||||
pub const SFC_ERASE: u8 = 0x20;
|
||||
pub const SFC_RELEASE_POWERDOWN: u8 = 0xAB;
|
||||
pub const SFC_POWERDOWN: u8 = 0xB9;
|
|
@ -140,6 +140,7 @@ impl EEPROMBYTE {
|
|||
}
|
||||
|
||||
///Use this struct to store and read single bytes to/from eeprom memory without using a check digit.
|
||||
///
|
||||
///Unlike the other eeprom structs, this does not need to be initialised.
|
||||
pub struct EEPROMBYTECHECKLESS {
|
||||
idx: i16,
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
pub mod arduboy2;
|
||||
pub mod arduboy_tone;
|
||||
pub mod arduboy_tone_pitch;
|
||||
pub mod arduboy_tones;
|
||||
pub mod arduino;
|
||||
pub mod ardvoice;
|
||||
pub mod c;
|
||||
pub mod eeprom;
|
||||
pub mod progmem;
|
||||
pub mod sprites;
|
||||
pub mod arduboyfx;
|
|
@ -10,7 +10,8 @@ pub use crate::hardware::buttons::{self, *};
|
|||
pub use crate::hardware::led::{self, *};
|
||||
pub use crate::heapless::{LinearMap, String, Vec};
|
||||
pub use crate::library::arduboy2::{self, *};
|
||||
pub use crate::library::arduboy_tone::{self, ArduboyTones};
|
||||
pub use crate::library::arduboy_tones::{self, ArduboyTones};
|
||||
pub use crate::library::arduboyfx::{self, fx};
|
||||
pub use crate::library::arduino::*;
|
||||
pub use crate::library::ardvoice::{self, ArdVoice};
|
||||
pub use crate::library::c::*;
|
||||
|
@ -19,9 +20,10 @@ pub use crate::library::eeprom::{EEPROM, EEPROMBYTE, EEPROMBYTECHECKLESS};
|
|||
pub use crate::library::progmem::Pstring;
|
||||
pub use crate::library::sprites;
|
||||
pub use crate::print::*;
|
||||
#[doc(inline)]
|
||||
pub use crate::serial_print as serial;
|
||||
pub use crate::{
|
||||
f, get_ardvoice_tone_addr, get_sprite_addr, get_string_addr, get_tones_addr, progmem,
|
||||
serial_print as serial,
|
||||
};
|
||||
use core::cmp;
|
||||
pub use core::ffi::{
|
||||
|
|
|
@ -23,6 +23,7 @@ extern "C" {
|
|||
///
|
||||
///Example
|
||||
/// ```
|
||||
/// use arduboy_rust::prelude::*;
|
||||
/// let value: i16 = 42;
|
||||
///
|
||||
/// serial::print(b"Hello World\n\0"[..]); // Prints "Hello World" and then sets the
|
||||
|
@ -42,6 +43,7 @@ pub fn print(x: impl Serialprintable) {
|
|||
///
|
||||
///Example
|
||||
/// ```
|
||||
/// use arduboy_rust::prelude::*;
|
||||
/// let value: i16 = 42;
|
||||
///
|
||||
/// serial::print(b"Hello World\n\0"[..]); // Prints "Hello World" and then sets the
|
||||
|
@ -58,6 +60,7 @@ pub fn println(x: impl Serialprintlnable) {
|
|||
///
|
||||
/// ### Example
|
||||
/// ```
|
||||
/// use arduboy_rust::prelude::*;
|
||||
/// serial::begin(9600)
|
||||
/// ```
|
||||
pub fn begin(baud_rates: u32) {
|
||||
|
@ -69,10 +72,11 @@ pub fn end() {
|
|||
}
|
||||
/// Reads incoming serial data.
|
||||
/// Use only inside of [available()]:
|
||||
/// ```
|
||||
/// if (serial::available() > 0) {
|
||||
///```
|
||||
/// use arduboy_rust::prelude::*;
|
||||
/// if serial::available() > 0 {
|
||||
/// // read the incoming byte:
|
||||
/// let incoming_byte: i16 = Serial::read();
|
||||
/// let incoming_byte: i16 = serial::read();
|
||||
///
|
||||
/// // say what you got:
|
||||
/// serial::print("I received: ");
|
||||
|
@ -89,23 +93,24 @@ pub fn read() -> i16 {
|
|||
///
|
||||
/// Use only inside of [available()]:
|
||||
/// ```
|
||||
/// if (Serial::available() > 0) {
|
||||
/// use arduboy_rust::prelude::*;
|
||||
/// if serial::available() > 0 {
|
||||
/// // read the incoming byte:
|
||||
/// let incomingByte: &str = Serial::read_as_utf8_str();
|
||||
/// let incoming_byte: &str = serial::read_as_utf8_str();
|
||||
///
|
||||
/// // say what you got:
|
||||
/// Serial::print("I received: ");
|
||||
/// Serial::println(incomingByte);
|
||||
/// serial::print("I received: ");
|
||||
/// serial::println(incoming_byte);
|
||||
/// }
|
||||
/// ```
|
||||
/// ### Returns
|
||||
///
|
||||
///The first byte of incoming serial data available (or -1 if no data is available). Data type: &str.
|
||||
pub fn read_as_utf8_str() -> &'static str {
|
||||
let intcoming_byte = unsafe { serial_read() };
|
||||
let incoming_byte = unsafe { serial_read() };
|
||||
static mut L: [u8; 2] = [0, 0];
|
||||
unsafe {
|
||||
L[0] = intcoming_byte as u8;
|
||||
L[0] = incoming_byte as u8;
|
||||
}
|
||||
unsafe { core::str::from_utf8(&L).unwrap() }
|
||||
}
|
||||
|
@ -113,13 +118,14 @@ pub fn read_as_utf8_str() -> &'static str {
|
|||
/// Get the number of bytes (characters) available for reading from the serial port. This is data that’s already arrived and stored in the serial receive buffer (which holds 64 bytes).
|
||||
/// ### Example
|
||||
/// ```
|
||||
/// if (Serial::available() > 0) {
|
||||
/// use arduboy_rust::prelude::*;
|
||||
/// if serial::available() > 0 {
|
||||
/// // read the incoming byte:
|
||||
/// incomingByte = Serial::read();
|
||||
/// let incoming_byte = serial::read();
|
||||
///
|
||||
/// // say what you got:
|
||||
/// Serial::print("I received: ");
|
||||
/// Serial::println(incomingByte);
|
||||
/// serial::print("I received: ");
|
||||
/// serial::println(incoming_byte);
|
||||
/// }
|
||||
/// ```
|
||||
pub fn available() -> i16 {
|
||||
|
@ -218,7 +224,7 @@ impl Serialprintlnable for &str {
|
|||
|
||||
fn default_parameters() -> Self::Parameters {}
|
||||
}
|
||||
impl<const N: usize> Serialprintlnable for crate::heapless::String<N> {
|
||||
impl<const N: usize> Serialprintlnable for heapless::String<N> {
|
||||
type Parameters = ();
|
||||
|
||||
fn println_2(self, _params: Self::Parameters) {
|
||||
|
@ -361,7 +367,7 @@ impl Serialprintable for &str {
|
|||
|
||||
fn default_parameters() -> Self::Parameters {}
|
||||
}
|
||||
impl<const N: usize> Serialprintable for crate::heapless::String<N> {
|
||||
impl<const N: usize> Serialprintable for heapless::String<N> {
|
||||
type Parameters = ();
|
||||
|
||||
fn print_2(self, _params: Self::Parameters) {
|
||||
|
|
|
@ -100,7 +100,6 @@
|
|||
|
||||
.topnav {
|
||||
background-color: #000000;
|
||||
overflow: hidden;
|
||||
height: 47px;
|
||||
}
|
||||
|
||||
|
@ -126,7 +125,7 @@
|
|||
display: none;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 1049px) {
|
||||
@media screen and (max-width: 800px) {
|
||||
.topnav a:not(:first-child) {
|
||||
display: none;
|
||||
}
|
||||
|
@ -137,10 +136,10 @@
|
|||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 1049px) {
|
||||
@media screen and (max-width: 800px) {
|
||||
.topnav.responsive {
|
||||
position: relative;
|
||||
height: 247px;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.topnav {
|
||||
|
@ -215,13 +214,31 @@
|
|||
</style>
|
||||
<div class="wrapper">
|
||||
<div class="topnav" id="myTopnav">
|
||||
<a href="https://zenndev1337.github.io/Rust-for-Arduboy/index.html">Rust for Arduboy</a>
|
||||
<a href="https://zenndev1337.github.io/Rust-for-Arduboy/image-converter.html">Image
|
||||
Converter</a>
|
||||
<a href="https://zenndev1337.github.io/Rust-for-Arduboy/tile-converter.html">Tile Converter</a>
|
||||
<a href="https://zenndev1337.github.io/Rust-for-Arduboy/sprite-converter.html">Sprite Converter</a>
|
||||
<a href="https://zenndev1337.github.io/Rust-for-Arduboy/arduboy-file-converter.html" class="active">.arduboy
|
||||
Generator</a>
|
||||
<a
|
||||
href="https://zenndev1337.github.io/Rust-for-Arduboy/index.html"
|
||||
><nobr>Rust for Arduboy</nobr></a
|
||||
>
|
||||
<a
|
||||
href="https://zenndev1337.github.io/Rust-for-Arduboy/image-converter.html"
|
||||
><nobr>Image Converter</nobr></a
|
||||
>
|
||||
<a
|
||||
href="https://zenndev1337.github.io/Rust-for-Arduboy/tile-converter.html"
|
||||
><nobr>Tile Converter</nobr></a
|
||||
>
|
||||
<a
|
||||
href="https://zenndev1337.github.io/Rust-for-Arduboy/sprite-converter.html"
|
||||
><nobr>Sprite Converter</nobr></a
|
||||
>
|
||||
<a
|
||||
href="https://zenndev1337.github.io/Rust-for-Arduboy/arduboy-file-converter.html" class="active"
|
||||
><nobr>.arduboy Generator</nobr></a
|
||||
>
|
||||
<a
|
||||
href="https://zenndev1337.github.io/Rust-for-Arduboy/fxdata-converter.html"
|
||||
|
||||
><nobr>fxdata.h Converter</nobr></a
|
||||
>
|
||||
<a href="javascript:void(0);" class="icon" onclick="myFunction()">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-list"
|
||||
viewBox="0 0 16 16">
|
||||
|
@ -816,7 +833,6 @@
|
|||
name = name || blob.name || 'download';
|
||||
a.download = name;
|
||||
a.rel = 'noopener'; // tabnabbing
|
||||
// TODO: detect chrome extensions & packaged apps
|
||||
// a.target = '_blank'
|
||||
|
||||
if (typeof blob === 'string') {
|
||||
|
@ -1294,7 +1310,6 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|||
|
||||
/**
|
||||
* Create the _pako object.
|
||||
* TODO: lazy-loading this object isn't the best solution but it's the
|
||||
* quickest. The best solution is to lazy-load the worker list. See also the
|
||||
* issue #446.
|
||||
*/
|
||||
|
@ -1558,7 +1573,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|||
decToHex(encodedComment.length, 2) +
|
||||
// disk number start
|
||||
"\x00\x00" +
|
||||
// internal file attributes TODO
|
||||
// internal file attributes
|
||||
"\x00\x00" +
|
||||
// external file attributes
|
||||
decToHex(extFileAttr, 4) +
|
||||
|
@ -1965,7 +1980,6 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|||
JSZip.support = require("./support");
|
||||
JSZip.defaults = require("./defaults");
|
||||
|
||||
// TODO find a better way to handle this version,
|
||||
// a require('package.json').version doesn't work with webpack, see #327
|
||||
JSZip.version = "3.10.1";
|
||||
|
||||
|
@ -2335,7 +2349,6 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|||
var object = new ZipObject(name, zipObjectContent, o);
|
||||
this.files[name] = object;
|
||||
/*
|
||||
TODO: we can't throw an exception because we have async promises
|
||||
(we can have a promise of a Date() for example) but returning a
|
||||
promise is useless because file(name, data) returns the JSZip
|
||||
object for chaining. Should we break that to allow the user
|
||||
|
@ -2433,7 +2446,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|||
file = this.files[filename];
|
||||
relativePath = filename.slice(this.root.length, filename.length);
|
||||
if (relativePath && filename.slice(0, this.root.length) === this.root) { // the file is in the current root
|
||||
cb(relativePath, file); // TODO reverse the parameters ? need to be clean AND consistent with the filter search fn...
|
||||
cb(relativePath, file); // reverse the parameters ? need to be clean AND consistent with the filter search fn...
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -3036,7 +3049,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|||
var GenericWorker = require("./GenericWorker");
|
||||
|
||||
// the size of the generated chunks
|
||||
// TODO expose this as a public variable
|
||||
// expose this as a public variable
|
||||
var DEFAULT_BLOCK_SIZE = 16 * 1024;
|
||||
|
||||
/**
|
||||
|
@ -4112,14 +4125,14 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|||
function arrayLikeToString(array) {
|
||||
// Performances notes :
|
||||
// --------------------
|
||||
// String.fromCharCode.apply(null, array) is the fastest, see
|
||||
// String.fromCharCode.apply(null, array) is the fastest
|
||||
// see http://jsperf.com/converting-a-uint8array-to-a-string/2
|
||||
// but the stack is limited (and we can get huge arrays !).
|
||||
//
|
||||
// result += String.fromCharCode(array[i]); generate too many strings !
|
||||
//
|
||||
// This code is inspired by http://jsperf.com/arraybuffer-to-string-apply-performance/2
|
||||
// TODO : we now have workers that split the work. Do we still need that ?
|
||||
// we now have workers that split the work. Do we still need that ?
|
||||
var chunk = 65536,
|
||||
type = exports.getTypeOf(array),
|
||||
canUseApply = true;
|
||||
|
@ -9213,7 +9226,6 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|||
this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */
|
||||
this.check = 0; /* protected copy of check value */
|
||||
this.total = 0; /* protected copy of output count */
|
||||
// TODO: may be {}
|
||||
this.head = null; /* where to save gzip header information */
|
||||
|
||||
/* sliding window */
|
||||
|
@ -9745,7 +9757,6 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|||
if (have === 0) { break inf_leave; }
|
||||
copy = 0;
|
||||
do {
|
||||
// TODO: 2 or 1 bytes?
|
||||
len = input[next + copy++];
|
||||
/* use constant limit because in js we should not preallocate memory */
|
||||
if (state.head && len &&
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="The standard font size of the arduboy"><title>FONT_SIZE in arduboy_rust::arduboy2 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-47e7ab555ef2818a.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="arduboy_rust" data-themes="" data-resource-suffix="" data-rustdoc-version="1.74.0-nightly (d9c8274fb 2023-09-12)" data-channel="nightly" data-search-js="search-5d3eaacf19ebf04f.js" data-settings-js="settings-74424d7eec62a23e.js" data-settings-css="settings-8c76f75bfb6bd192.css" data-theme-light-css="light-f194925aa375ae96.css" data-theme-dark-css="dark-1dd4d1ce031e15de.css" data-theme-ayu-css="ayu-49e58d069f567085.css" ><script src="../../static.files/storage-db41da1a38ea3cb8.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-8d035c8cea6edbc4.js"></script><noscript><link rel="stylesheet" media="(prefers-color-scheme:light)" href="../../static.files/light-f194925aa375ae96.css"><link rel="stylesheet" media="(prefers-color-scheme:dark)" href="../../static.files/dark-1dd4d1ce031e15de.css"><link rel="stylesheet" href="../../static.files/noscript-cffde32267a19fd6.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc constant"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="logo-container" href="../../arduboy_rust/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../../arduboy_rust/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><div class="sidebar-elems"><h2><a href="index.html">In arduboy_rust::arduboy2</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Constant <a href="../index.html">arduboy_rust</a>::<wbr><a href="index.html">arduboy2</a>::<wbr><a class="constant" href="#">FONT_SIZE</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/arduboy_rust/library/arduboy2.rs.html#13">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub const FONT_SIZE: u8 = 6;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The standard font size of the arduboy</p>
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="The standard font size of the arduboy"><title>FONT_SIZE in arduboy_rust::arduboy2 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-cb6f1f67f1bcd037.css" id="mainThemeStyle"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="arduboy_rust" data-themes="" data-resource-suffix="" data-rustdoc-version="1.73.0-nightly (8131b9774 2023-08-02)" data-channel="nightly" data-search-js="search-6dfdfced5eff6596.js" data-settings-js="settings-de11bff964e9d4e5.js" data-settings-css="settings-8c76f75bfb6bd192.css" data-theme-light-css="light-6d2c9675f3d09c26.css" data-theme-dark-css="dark-45ceb8f2e522f4d1.css" data-theme-ayu-css="ayu-fd19013d6ce078bf.css" ><script src="../../static.files/storage-db41da1a38ea3cb8.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-0795b7d26be81095.js"></script><noscript><link rel="stylesheet" media="(prefers-color-scheme:light)" href="../../static.files/light-6d2c9675f3d09c26.css"><link rel="stylesheet" media="(prefers-color-scheme:dark)" href="../../static.files/dark-45ceb8f2e522f4d1.css"><link rel="stylesheet" href="../../static.files/noscript-cffde32267a19fd6.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc constant"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="logo-container" href="../../arduboy_rust/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../../arduboy_rust/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><div class="sidebar-elems"><h2><a href="index.html">In arduboy_rust::arduboy2</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Constant <a href="../index.html">arduboy_rust</a>::<wbr><a href="index.html">arduboy2</a>::<wbr><a class="constant" href="#">FONT_SIZE</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/arduboy_rust/library/arduboy2.rs.html#15">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub const FONT_SIZE: u8 = 6;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The standard font size of the arduboy</p>
|
||||
<p>this is to calculate with it.</p>
|
||||
</div></details></section></div></main></body></html>
|
|
@ -1,3 +1,3 @@
|
|||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="The standard height of the arduboy"><title>HEIGHT in arduboy_rust::arduboy2 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-47e7ab555ef2818a.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="arduboy_rust" data-themes="" data-resource-suffix="" data-rustdoc-version="1.74.0-nightly (d9c8274fb 2023-09-12)" data-channel="nightly" data-search-js="search-5d3eaacf19ebf04f.js" data-settings-js="settings-74424d7eec62a23e.js" data-settings-css="settings-8c76f75bfb6bd192.css" data-theme-light-css="light-f194925aa375ae96.css" data-theme-dark-css="dark-1dd4d1ce031e15de.css" data-theme-ayu-css="ayu-49e58d069f567085.css" ><script src="../../static.files/storage-db41da1a38ea3cb8.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-8d035c8cea6edbc4.js"></script><noscript><link rel="stylesheet" media="(prefers-color-scheme:light)" href="../../static.files/light-f194925aa375ae96.css"><link rel="stylesheet" media="(prefers-color-scheme:dark)" href="../../static.files/dark-1dd4d1ce031e15de.css"><link rel="stylesheet" href="../../static.files/noscript-cffde32267a19fd6.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc constant"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="logo-container" href="../../arduboy_rust/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../../arduboy_rust/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><div class="sidebar-elems"><h2><a href="index.html">In arduboy_rust::arduboy2</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Constant <a href="../index.html">arduboy_rust</a>::<wbr><a href="index.html">arduboy2</a>::<wbr><a class="constant" href="#">HEIGHT</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/arduboy_rust/library/arduboy2.rs.html#21">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub const HEIGHT: u8 = 64;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The standard height of the arduboy</p>
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="The standard height of the arduboy"><title>HEIGHT in arduboy_rust::arduboy2 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-cb6f1f67f1bcd037.css" id="mainThemeStyle"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="arduboy_rust" data-themes="" data-resource-suffix="" data-rustdoc-version="1.73.0-nightly (8131b9774 2023-08-02)" data-channel="nightly" data-search-js="search-6dfdfced5eff6596.js" data-settings-js="settings-de11bff964e9d4e5.js" data-settings-css="settings-8c76f75bfb6bd192.css" data-theme-light-css="light-6d2c9675f3d09c26.css" data-theme-dark-css="dark-45ceb8f2e522f4d1.css" data-theme-ayu-css="ayu-fd19013d6ce078bf.css" ><script src="../../static.files/storage-db41da1a38ea3cb8.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-0795b7d26be81095.js"></script><noscript><link rel="stylesheet" media="(prefers-color-scheme:light)" href="../../static.files/light-6d2c9675f3d09c26.css"><link rel="stylesheet" media="(prefers-color-scheme:dark)" href="../../static.files/dark-45ceb8f2e522f4d1.css"><link rel="stylesheet" href="../../static.files/noscript-cffde32267a19fd6.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc constant"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="logo-container" href="../../arduboy_rust/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../../arduboy_rust/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><div class="sidebar-elems"><h2><a href="index.html">In arduboy_rust::arduboy2</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Constant <a href="../index.html">arduboy_rust</a>::<wbr><a href="index.html">arduboy2</a>::<wbr><a class="constant" href="#">HEIGHT</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/arduboy_rust/library/arduboy2.rs.html#23">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub const HEIGHT: i16 = 64;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The standard height of the arduboy</p>
|
||||
<p>this is to calculate with it.</p>
|
||||
</div></details></section></div></main></body></html>
|
|
@ -1,3 +1,3 @@
|
|||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="The standard width of the arduboy"><title>WIDTH in arduboy_rust::arduboy2 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-47e7ab555ef2818a.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="arduboy_rust" data-themes="" data-resource-suffix="" data-rustdoc-version="1.74.0-nightly (d9c8274fb 2023-09-12)" data-channel="nightly" data-search-js="search-5d3eaacf19ebf04f.js" data-settings-js="settings-74424d7eec62a23e.js" data-settings-css="settings-8c76f75bfb6bd192.css" data-theme-light-css="light-f194925aa375ae96.css" data-theme-dark-css="dark-1dd4d1ce031e15de.css" data-theme-ayu-css="ayu-49e58d069f567085.css" ><script src="../../static.files/storage-db41da1a38ea3cb8.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-8d035c8cea6edbc4.js"></script><noscript><link rel="stylesheet" media="(prefers-color-scheme:light)" href="../../static.files/light-f194925aa375ae96.css"><link rel="stylesheet" media="(prefers-color-scheme:dark)" href="../../static.files/dark-1dd4d1ce031e15de.css"><link rel="stylesheet" href="../../static.files/noscript-cffde32267a19fd6.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc constant"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="logo-container" href="../../arduboy_rust/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../../arduboy_rust/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><div class="sidebar-elems"><h2><a href="index.html">In arduboy_rust::arduboy2</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Constant <a href="../index.html">arduboy_rust</a>::<wbr><a href="index.html">arduboy2</a>::<wbr><a class="constant" href="#">WIDTH</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/arduboy_rust/library/arduboy2.rs.html#17">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub const WIDTH: u8 = 128;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The standard width of the arduboy</p>
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="The standard width of the arduboy"><title>WIDTH in arduboy_rust::arduboy2 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-cb6f1f67f1bcd037.css" id="mainThemeStyle"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="arduboy_rust" data-themes="" data-resource-suffix="" data-rustdoc-version="1.73.0-nightly (8131b9774 2023-08-02)" data-channel="nightly" data-search-js="search-6dfdfced5eff6596.js" data-settings-js="settings-de11bff964e9d4e5.js" data-settings-css="settings-8c76f75bfb6bd192.css" data-theme-light-css="light-6d2c9675f3d09c26.css" data-theme-dark-css="dark-45ceb8f2e522f4d1.css" data-theme-ayu-css="ayu-fd19013d6ce078bf.css" ><script src="../../static.files/storage-db41da1a38ea3cb8.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-0795b7d26be81095.js"></script><noscript><link rel="stylesheet" media="(prefers-color-scheme:light)" href="../../static.files/light-6d2c9675f3d09c26.css"><link rel="stylesheet" media="(prefers-color-scheme:dark)" href="../../static.files/dark-45ceb8f2e522f4d1.css"><link rel="stylesheet" href="../../static.files/noscript-cffde32267a19fd6.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc constant"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="logo-container" href="../../arduboy_rust/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../../arduboy_rust/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><div class="sidebar-elems"><h2><a href="index.html">In arduboy_rust::arduboy2</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Constant <a href="../index.html">arduboy_rust</a>::<wbr><a href="index.html">arduboy2</a>::<wbr><a class="constant" href="#">WIDTH</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/arduboy_rust/library/arduboy2.rs.html#19">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub const WIDTH: i16 = 128;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The standard width of the arduboy</p>
|
||||
<p>this is to calculate with it.</p>
|
||||
</div></details></section></div></main></body></html>
|
|
@ -1,3 +1,3 @@
|
|||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="This is the Module to interact in a save way with the Arduboy2 C++ library."><title>arduboy_rust::arduboy2 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-47e7ab555ef2818a.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="arduboy_rust" data-themes="" data-resource-suffix="" data-rustdoc-version="1.74.0-nightly (d9c8274fb 2023-09-12)" data-channel="nightly" data-search-js="search-5d3eaacf19ebf04f.js" data-settings-js="settings-74424d7eec62a23e.js" data-settings-css="settings-8c76f75bfb6bd192.css" data-theme-light-css="light-f194925aa375ae96.css" data-theme-dark-css="dark-1dd4d1ce031e15de.css" data-theme-ayu-css="ayu-49e58d069f567085.css" ><script src="../../static.files/storage-db41da1a38ea3cb8.js"></script><script defer src="../../static.files/main-8d035c8cea6edbc4.js"></script><noscript><link rel="stylesheet" media="(prefers-color-scheme:light)" href="../../static.files/light-f194925aa375ae96.css"><link rel="stylesheet" media="(prefers-color-scheme:dark)" href="../../static.files/dark-1dd4d1ce031e15de.css"><link rel="stylesheet" href="../../static.files/noscript-cffde32267a19fd6.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="logo-container" href="../../arduboy_rust/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../../arduboy_rust/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2 class="location"><a href="#">Module arduboy2</a></h2><div class="sidebar-elems"><section><ul class="block"><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#constants">Constants</a></li></ul></section></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Module <a href="../index.html">arduboy_rust</a>::<wbr><a class="mod" href="#">arduboy2</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/arduboy_rust/library/arduboy2.rs.html#1-791">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>This is the Module to interact in a save way with the Arduboy2 C++ library.</p>
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="This is the Module to interact in a save way with the Arduboy2 C++ library."><title>arduboy_rust::arduboy2 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-cb6f1f67f1bcd037.css" id="mainThemeStyle"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="arduboy_rust" data-themes="" data-resource-suffix="" data-rustdoc-version="1.73.0-nightly (8131b9774 2023-08-02)" data-channel="nightly" data-search-js="search-6dfdfced5eff6596.js" data-settings-js="settings-de11bff964e9d4e5.js" data-settings-css="settings-8c76f75bfb6bd192.css" data-theme-light-css="light-6d2c9675f3d09c26.css" data-theme-dark-css="dark-45ceb8f2e522f4d1.css" data-theme-ayu-css="ayu-fd19013d6ce078bf.css" ><script src="../../static.files/storage-db41da1a38ea3cb8.js"></script><script defer src="../../static.files/main-0795b7d26be81095.js"></script><noscript><link rel="stylesheet" media="(prefers-color-scheme:light)" href="../../static.files/light-6d2c9675f3d09c26.css"><link rel="stylesheet" media="(prefers-color-scheme:dark)" href="../../static.files/dark-45ceb8f2e522f4d1.css"><link rel="stylesheet" href="../../static.files/noscript-cffde32267a19fd6.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="logo-container" href="../../arduboy_rust/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../../arduboy_rust/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2 class="location"><a href="#">Module arduboy2</a></h2><div class="sidebar-elems"><section><ul class="block"><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#constants">Constants</a></li></ul></section></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Module <a href="../index.html">arduboy_rust</a>::<wbr><a class="mod" href="#">arduboy2</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/arduboy_rust/library/arduboy2.rs.html#1-832">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>This is the Module to interact in a save way with the Arduboy2 C++ library.</p>
|
||||
<p>All of the functions are safe wrapped inside the <a href="../prelude/arduboy2/struct.Arduboy2.html" title="struct arduboy_rust::prelude::arduboy2::Arduboy2">Arduboy2</a> struct.</p>
|
||||
</div></details><h2 id="structs" class="small-section-header"><a href="#structs">Structs</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.Arduboy2.html" title="struct arduboy_rust::arduboy2::Arduboy2">Arduboy2</a></div><div class="desc docblock-short">This is the struct to interact in a save way with the Arduboy2 C++ library.</div></li><li><div class="item-name"><a class="struct" href="struct.Point.html" title="struct arduboy_rust::arduboy2::Point">Point</a></div><div class="desc docblock-short">This struct is used by a few Arduboy functions.</div></li><li><div class="item-name"><a class="struct" href="struct.Rect.html" title="struct arduboy_rust::arduboy2::Rect">Rect</a></div><div class="desc docblock-short">This struct is used by a few Arduboy functions.</div></li></ul><h2 id="enums" class="small-section-header"><a href="#enums">Enums</a></h2><ul class="item-table"><li><div class="item-name"><a class="enum" href="enum.Color.html" title="enum arduboy_rust::arduboy2::Color">Color</a></div><div class="desc docblock-short">This item is to chose between Black or White</div></li></ul><h2 id="constants" class="small-section-header"><a href="#constants">Constants</a></h2><ul class="item-table"><li><div class="item-name"><a class="constant" href="constant.FONT_SIZE.html" title="constant arduboy_rust::arduboy2::FONT_SIZE">FONT_SIZE</a></div><div class="desc docblock-short">The standard font size of the arduboy</div></li><li><div class="item-name"><a class="constant" href="constant.HEIGHT.html" title="constant arduboy_rust::arduboy2::HEIGHT">HEIGHT</a></div><div class="desc docblock-short">The standard height of the arduboy</div></li><li><div class="item-name"><a class="constant" href="constant.WIDTH.html" title="constant arduboy_rust::arduboy2::WIDTH">WIDTH</a></div><div class="desc docblock-short">The standard width of the arduboy</div></li></ul></section></div></main></body></html>
|
|
@ -1 +0,0 @@
|
|||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `NOTE_A0` constant in crate `arduboy_rust`."><title>NOTE_A0 in arduboy_rust::arduboy_tone::arduboy_tone_pitch - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-47e7ab555ef2818a.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="arduboy_rust" data-themes="" data-resource-suffix="" data-rustdoc-version="1.74.0-nightly (d9c8274fb 2023-09-12)" data-channel="nightly" data-search-js="search-5d3eaacf19ebf04f.js" data-settings-js="settings-74424d7eec62a23e.js" data-settings-css="settings-8c76f75bfb6bd192.css" data-theme-light-css="light-f194925aa375ae96.css" data-theme-dark-css="dark-1dd4d1ce031e15de.css" data-theme-ayu-css="ayu-49e58d069f567085.css" ><script src="../../../static.files/storage-db41da1a38ea3cb8.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-8d035c8cea6edbc4.js"></script><noscript><link rel="stylesheet" media="(prefers-color-scheme:light)" href="../../../static.files/light-f194925aa375ae96.css"><link rel="stylesheet" media="(prefers-color-scheme:dark)" href="../../../static.files/dark-1dd4d1ce031e15de.css"><link rel="stylesheet" href="../../../static.files/noscript-cffde32267a19fd6.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc constant"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="logo-container" href="../../../arduboy_rust/index.html"><img class="rust-logo" src="../../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../../../arduboy_rust/index.html"><img class="rust-logo" src="../../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><div class="sidebar-elems"><h2><a href="index.html">In arduboy_rust::arduboy_tone::arduboy_tone_pitch</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Constant <a href="../../index.html">arduboy_rust</a>::<wbr><a href="../index.html">arduboy_tone</a>::<wbr><a href="index.html">arduboy_tone_pitch</a>::<wbr><a class="constant" href="#">NOTE_A0</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../../src/arduboy_rust/library/arduboy_tone_pitch.rs.html#19">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub const NOTE_A0: u16 = 28;</code></pre></section></div></main></body></html>
|
|
@ -1 +0,0 @@
|
|||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `NOTE_A0H` constant in crate `arduboy_rust`."><title>NOTE_A0H in arduboy_rust::arduboy_tone::arduboy_tone_pitch - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-47e7ab555ef2818a.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="arduboy_rust" data-themes="" data-resource-suffix="" data-rustdoc-version="1.74.0-nightly (d9c8274fb 2023-09-12)" data-channel="nightly" data-search-js="search-5d3eaacf19ebf04f.js" data-settings-js="settings-74424d7eec62a23e.js" data-settings-css="settings-8c76f75bfb6bd192.css" data-theme-light-css="light-f194925aa375ae96.css" data-theme-dark-css="dark-1dd4d1ce031e15de.css" data-theme-ayu-css="ayu-49e58d069f567085.css" ><script src="../../../static.files/storage-db41da1a38ea3cb8.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-8d035c8cea6edbc4.js"></script><noscript><link rel="stylesheet" media="(prefers-color-scheme:light)" href="../../../static.files/light-f194925aa375ae96.css"><link rel="stylesheet" media="(prefers-color-scheme:dark)" href="../../../static.files/dark-1dd4d1ce031e15de.css"><link rel="stylesheet" href="../../../static.files/noscript-cffde32267a19fd6.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc constant"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="logo-container" href="../../../arduboy_rust/index.html"><img class="rust-logo" src="../../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../../../arduboy_rust/index.html"><img class="rust-logo" src="../../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><div class="sidebar-elems"><h2><a href="index.html">In arduboy_rust::arduboy_tone::arduboy_tone_pitch</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Constant <a href="../../index.html">arduboy_rust</a>::<wbr><a href="../index.html">arduboy_tone</a>::<wbr><a href="index.html">arduboy_tone_pitch</a>::<wbr><a class="constant" href="#">NOTE_A0H</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../../src/arduboy_rust/library/arduboy_tone_pitch.rs.html#140">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub const NOTE_A0H: u16 = _; // 32_796u16</code></pre></section></div></main></body></html>
|
|
@ -1 +0,0 @@
|
|||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `NOTE_A1` constant in crate `arduboy_rust`."><title>NOTE_A1 in arduboy_rust::arduboy_tone::arduboy_tone_pitch - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-47e7ab555ef2818a.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="arduboy_rust" data-themes="" data-resource-suffix="" data-rustdoc-version="1.74.0-nightly (d9c8274fb 2023-09-12)" data-channel="nightly" data-search-js="search-5d3eaacf19ebf04f.js" data-settings-js="settings-74424d7eec62a23e.js" data-settings-css="settings-8c76f75bfb6bd192.css" data-theme-light-css="light-f194925aa375ae96.css" data-theme-dark-css="dark-1dd4d1ce031e15de.css" data-theme-ayu-css="ayu-49e58d069f567085.css" ><script src="../../../static.files/storage-db41da1a38ea3cb8.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-8d035c8cea6edbc4.js"></script><noscript><link rel="stylesheet" media="(prefers-color-scheme:light)" href="../../../static.files/light-f194925aa375ae96.css"><link rel="stylesheet" media="(prefers-color-scheme:dark)" href="../../../static.files/dark-1dd4d1ce031e15de.css"><link rel="stylesheet" href="../../../static.files/noscript-cffde32267a19fd6.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc constant"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="logo-container" href="../../../arduboy_rust/index.html"><img class="rust-logo" src="../../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../../../arduboy_rust/index.html"><img class="rust-logo" src="../../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><div class="sidebar-elems"><h2><a href="index.html">In arduboy_rust::arduboy_tone::arduboy_tone_pitch</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Constant <a href="../../index.html">arduboy_rust</a>::<wbr><a href="../index.html">arduboy_tone</a>::<wbr><a href="index.html">arduboy_tone_pitch</a>::<wbr><a class="constant" href="#">NOTE_A1</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../../src/arduboy_rust/library/arduboy_tone_pitch.rs.html#31">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub const NOTE_A1: u16 = 55;</code></pre></section></div></main></body></html>
|
|
@ -1 +0,0 @@
|
|||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `NOTE_A1H` constant in crate `arduboy_rust`."><title>NOTE_A1H in arduboy_rust::arduboy_tone::arduboy_tone_pitch - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-47e7ab555ef2818a.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="arduboy_rust" data-themes="" data-resource-suffix="" data-rustdoc-version="1.74.0-nightly (d9c8274fb 2023-09-12)" data-channel="nightly" data-search-js="search-5d3eaacf19ebf04f.js" data-settings-js="settings-74424d7eec62a23e.js" data-settings-css="settings-8c76f75bfb6bd192.css" data-theme-light-css="light-f194925aa375ae96.css" data-theme-dark-css="dark-1dd4d1ce031e15de.css" data-theme-ayu-css="ayu-49e58d069f567085.css" ><script src="../../../static.files/storage-db41da1a38ea3cb8.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-8d035c8cea6edbc4.js"></script><noscript><link rel="stylesheet" media="(prefers-color-scheme:light)" href="../../../static.files/light-f194925aa375ae96.css"><link rel="stylesheet" media="(prefers-color-scheme:dark)" href="../../../static.files/dark-1dd4d1ce031e15de.css"><link rel="stylesheet" href="../../../static.files/noscript-cffde32267a19fd6.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc constant"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="logo-container" href="../../../arduboy_rust/index.html"><img class="rust-logo" src="../../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../../../arduboy_rust/index.html"><img class="rust-logo" src="../../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><div class="sidebar-elems"><h2><a href="index.html">In arduboy_rust::arduboy_tone::arduboy_tone_pitch</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Constant <a href="../../index.html">arduboy_rust</a>::<wbr><a href="../index.html">arduboy_tone</a>::<wbr><a href="index.html">arduboy_tone_pitch</a>::<wbr><a class="constant" href="#">NOTE_A1H</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../../src/arduboy_rust/library/arduboy_tone_pitch.rs.html#152">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub const NOTE_A1H: u16 = _; // 32_823u16</code></pre></section></div></main></body></html>
|
|
@ -1 +0,0 @@
|
|||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `NOTE_A2` constant in crate `arduboy_rust`."><title>NOTE_A2 in arduboy_rust::arduboy_tone::arduboy_tone_pitch - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-47e7ab555ef2818a.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="arduboy_rust" data-themes="" data-resource-suffix="" data-rustdoc-version="1.74.0-nightly (d9c8274fb 2023-09-12)" data-channel="nightly" data-search-js="search-5d3eaacf19ebf04f.js" data-settings-js="settings-74424d7eec62a23e.js" data-settings-css="settings-8c76f75bfb6bd192.css" data-theme-light-css="light-f194925aa375ae96.css" data-theme-dark-css="dark-1dd4d1ce031e15de.css" data-theme-ayu-css="ayu-49e58d069f567085.css" ><script src="../../../static.files/storage-db41da1a38ea3cb8.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-8d035c8cea6edbc4.js"></script><noscript><link rel="stylesheet" media="(prefers-color-scheme:light)" href="../../../static.files/light-f194925aa375ae96.css"><link rel="stylesheet" media="(prefers-color-scheme:dark)" href="../../../static.files/dark-1dd4d1ce031e15de.css"><link rel="stylesheet" href="../../../static.files/noscript-cffde32267a19fd6.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc constant"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="logo-container" href="../../../arduboy_rust/index.html"><img class="rust-logo" src="../../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../../../arduboy_rust/index.html"><img class="rust-logo" src="../../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><div class="sidebar-elems"><h2><a href="index.html">In arduboy_rust::arduboy_tone::arduboy_tone_pitch</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Constant <a href="../../index.html">arduboy_rust</a>::<wbr><a href="../index.html">arduboy_tone</a>::<wbr><a href="index.html">arduboy_tone_pitch</a>::<wbr><a class="constant" href="#">NOTE_A2</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../../src/arduboy_rust/library/arduboy_tone_pitch.rs.html#43">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub const NOTE_A2: u16 = 110;</code></pre></section></div></main></body></html>
|
|
@ -1 +0,0 @@
|
|||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `NOTE_A2H` constant in crate `arduboy_rust`."><title>NOTE_A2H in arduboy_rust::arduboy_tone::arduboy_tone_pitch - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-47e7ab555ef2818a.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="arduboy_rust" data-themes="" data-resource-suffix="" data-rustdoc-version="1.74.0-nightly (d9c8274fb 2023-09-12)" data-channel="nightly" data-search-js="search-5d3eaacf19ebf04f.js" data-settings-js="settings-74424d7eec62a23e.js" data-settings-css="settings-8c76f75bfb6bd192.css" data-theme-light-css="light-f194925aa375ae96.css" data-theme-dark-css="dark-1dd4d1ce031e15de.css" data-theme-ayu-css="ayu-49e58d069f567085.css" ><script src="../../../static.files/storage-db41da1a38ea3cb8.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-8d035c8cea6edbc4.js"></script><noscript><link rel="stylesheet" media="(prefers-color-scheme:light)" href="../../../static.files/light-f194925aa375ae96.css"><link rel="stylesheet" media="(prefers-color-scheme:dark)" href="../../../static.files/dark-1dd4d1ce031e15de.css"><link rel="stylesheet" href="../../../static.files/noscript-cffde32267a19fd6.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc constant"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="logo-container" href="../../../arduboy_rust/index.html"><img class="rust-logo" src="../../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../../../arduboy_rust/index.html"><img class="rust-logo" src="../../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><div class="sidebar-elems"><h2><a href="index.html">In arduboy_rust::arduboy_tone::arduboy_tone_pitch</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Constant <a href="../../index.html">arduboy_rust</a>::<wbr><a href="../index.html">arduboy_tone</a>::<wbr><a href="index.html">arduboy_tone_pitch</a>::<wbr><a class="constant" href="#">NOTE_A2H</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../../src/arduboy_rust/library/arduboy_tone_pitch.rs.html#164">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub const NOTE_A2H: u16 = _; // 32_878u16</code></pre></section></div></main></body></html>
|
|
@ -1 +0,0 @@
|
|||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `NOTE_A3` constant in crate `arduboy_rust`."><title>NOTE_A3 in arduboy_rust::arduboy_tone::arduboy_tone_pitch - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-47e7ab555ef2818a.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="arduboy_rust" data-themes="" data-resource-suffix="" data-rustdoc-version="1.74.0-nightly (d9c8274fb 2023-09-12)" data-channel="nightly" data-search-js="search-5d3eaacf19ebf04f.js" data-settings-js="settings-74424d7eec62a23e.js" data-settings-css="settings-8c76f75bfb6bd192.css" data-theme-light-css="light-f194925aa375ae96.css" data-theme-dark-css="dark-1dd4d1ce031e15de.css" data-theme-ayu-css="ayu-49e58d069f567085.css" ><script src="../../../static.files/storage-db41da1a38ea3cb8.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-8d035c8cea6edbc4.js"></script><noscript><link rel="stylesheet" media="(prefers-color-scheme:light)" href="../../../static.files/light-f194925aa375ae96.css"><link rel="stylesheet" media="(prefers-color-scheme:dark)" href="../../../static.files/dark-1dd4d1ce031e15de.css"><link rel="stylesheet" href="../../../static.files/noscript-cffde32267a19fd6.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc constant"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="logo-container" href="../../../arduboy_rust/index.html"><img class="rust-logo" src="../../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../../../arduboy_rust/index.html"><img class="rust-logo" src="../../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><div class="sidebar-elems"><h2><a href="index.html">In arduboy_rust::arduboy_tone::arduboy_tone_pitch</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Constant <a href="../../index.html">arduboy_rust</a>::<wbr><a href="../index.html">arduboy_tone</a>::<wbr><a href="index.html">arduboy_tone_pitch</a>::<wbr><a class="constant" href="#">NOTE_A3</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../../src/arduboy_rust/library/arduboy_tone_pitch.rs.html#55">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub const NOTE_A3: u16 = 220;</code></pre></section></div></main></body></html>
|
|
@ -1 +0,0 @@
|
|||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `NOTE_A3H` constant in crate `arduboy_rust`."><title>NOTE_A3H in arduboy_rust::arduboy_tone::arduboy_tone_pitch - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-47e7ab555ef2818a.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="arduboy_rust" data-themes="" data-resource-suffix="" data-rustdoc-version="1.74.0-nightly (d9c8274fb 2023-09-12)" data-channel="nightly" data-search-js="search-5d3eaacf19ebf04f.js" data-settings-js="settings-74424d7eec62a23e.js" data-settings-css="settings-8c76f75bfb6bd192.css" data-theme-light-css="light-f194925aa375ae96.css" data-theme-dark-css="dark-1dd4d1ce031e15de.css" data-theme-ayu-css="ayu-49e58d069f567085.css" ><script src="../../../static.files/storage-db41da1a38ea3cb8.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-8d035c8cea6edbc4.js"></script><noscript><link rel="stylesheet" media="(prefers-color-scheme:light)" href="../../../static.files/light-f194925aa375ae96.css"><link rel="stylesheet" media="(prefers-color-scheme:dark)" href="../../../static.files/dark-1dd4d1ce031e15de.css"><link rel="stylesheet" href="../../../static.files/noscript-cffde32267a19fd6.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc constant"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="logo-container" href="../../../arduboy_rust/index.html"><img class="rust-logo" src="../../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../../../arduboy_rust/index.html"><img class="rust-logo" src="../../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><div class="sidebar-elems"><h2><a href="index.html">In arduboy_rust::arduboy_tone::arduboy_tone_pitch</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Constant <a href="../../index.html">arduboy_rust</a>::<wbr><a href="../index.html">arduboy_tone</a>::<wbr><a href="index.html">arduboy_tone_pitch</a>::<wbr><a class="constant" href="#">NOTE_A3H</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../../src/arduboy_rust/library/arduboy_tone_pitch.rs.html#176">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub const NOTE_A3H: u16 = _; // 32_988u16</code></pre></section></div></main></body></html>
|