- [X] Changelog updated
This PR adds the possibility for graphics imported through
`include_background_gfx!` to be used as public modules, e.g.:
```rust
/// graphics.rs
agb::include_background_gfx!(pub background, "d77bba", tiles256 => 256 "map.aseprite");
/// main.rs
#![no_std]
#![no_main]
use agb::display::Priority;
use agb::display::tiled::RegularBackgroundSize::Background64x64;
use agb::display::tiled::{TiledMap, TileFormat};
mod graphics;
#[agb::entry]
fn main(mut gba: agb::Gba) -> ! {
let (tiled, mut vram) = gba.display.video.tiled1();
let vblank = agb::interrupt::VBlank::get();
let tileset = &graphics::background::tiles256.tiles;
vram.set_background_palettes(graphics::background::PALETTES);
let mut bg = tiled.regular(Priority::P2, Background64x64, TileFormat::EightBpp);
for y in 0..64u16 {
for x in 0..64u16 {
bg.set_tile(&mut vram, (x, y), tileset, graphics::background::tiles256.tile_settings[1]);
}
}
bg.set_visible(true);
bg.commit(&mut vram);
loop {
vblank.wait_for_vblank();
}
}
```
* Integrates num_traits more closely.
* Implements signed for our num, and the vector2d / rect abs now can use
our fixnum.
* This is potentially breaking.
Some fonts look a bit weird if you don't do kerning.
@corwinkuiper can you check if I've done the correct thing for object
font rendering? I'm not entirely sure... Although it does render
correctly in my tests :D
- [x] Changelog updated / no changelog update needed