Crate firefly_rust
source ·Expand description
§firefly-rust
Rust SDK for making Firefly Zero games.
§Installation
cargo add firefly_rust
§Cargo features
std
: required if you don’t build your project with#![no_std]
. It will remove from the crate the custom panic handler to avoid conflicts with the standard library.alloc
: required if you want to useFileBuf
. Allows the crate to do memory allocations. If you enablealloc
but notstd
, you have to also provide a global allocator. We recommend using talc.sudo
: required if you want to usesudo
module. Enables privileged access to the device.nalgebra_support
: can be activated if you use nalgebra. Enables type conversion to and from nalgebra vectors.
§License
MIT License. You can do whatever you want with the SDK, modify it, embed into any apps and games. Have fun!
Re-exports§
pub use graphics::*;
Modules§
- Functions for accessing files in the app data dir.
- Draw shapes, images, and text on the screen.
- A few useful math (trigonometric) functions for f32.
- Functions for accessing files in the app ROM.
- Structs for working with shapes as values.
- Functions available only to privileged apps.
Structs§
- State of the buttons.
- DPad-like representation of the
Pad
. - A file loaded from ROM or data dir into the memory.
- Like File but owns the buffer.
- A loaded font file.
- A loaded image file.
- A finger position on the touch pad.
- A subregion of an image. Constructed using
Image::sub
.
Enums§
- The player ID.
Functions§
- Get a random value.
- Log a debug message.
- Log an error message.
- Exit the app after the current update is finished.
- Get the currently pressed buttons.
- Get the current touch pad state.
- Set the random seed.