https://github.com/mogenson/embedded-graphics-gba
embedded graphics implementation for the Game Boy Advance
https://github.com/mogenson/embedded-graphics-gba
embedded-graphics gba rust
Last synced: about 1 year ago
JSON representation
embedded graphics implementation for the Game Boy Advance
- Host: GitHub
- URL: https://github.com/mogenson/embedded-graphics-gba
- Owner: mogenson
- License: mit
- Created: 2020-06-04T19:50:01.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-07-11T16:35:12.000Z (almost 6 years ago)
- Last Synced: 2025-02-06T00:38:56.241Z (over 1 year ago)
- Topics: embedded-graphics, gba, rust
- Language: Rust
- Homepage:
- Size: 82 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Embedded Graphics Game Boy Advance Display
This crate implements the [embedded-graphics](https://github.com/jamwaffles/embedded-graphics) `DrawTarget` trait for the Game Boy Advance. This works when the GBA's display is used in a bitmap mode: `Mode3`, `Mode4`, or `Mode5`.
The GBA `Tile4bpp` and `Tile8bpp` objects also accept `Drawable` items to create sprites.
`PaletteColor` is a custom `PixelColor` that represents an index into a GBA color palette.
## Example

The [draw.rs](./examples/draw.rs) example loads a background image using the [tinytga](https://crates.io/crates/tinytga) crate. Use the D-pad, A button, and B button to draw over the background. The start button clears the screen. The [gba](https://github.com/rust-console/gba) crate builds the example into a GBA ROM.