Import the sprites in the pong code

This commit is contained in:
GBA bot 2022-01-02 00:21:59 +00:00
parent e02fda5fc9
commit acee6a3c51

View file

@ -14,6 +14,10 @@
// up correctly. // up correctly.
extern crate agb; extern crate agb;
mod gfx {
agb::include_gfx!("gfx/sprites.toml");
}
// The main function must take 0 arguments and never return. The agb::entry decorator // The main function must take 0 arguments and never return. The agb::entry decorator
// ensures that everything is in order. `agb` will call this after setting up the stack // ensures that everything is in order. `agb` will call this after setting up the stack
// and interrupt handlers correctly. // and interrupt handlers correctly.
@ -21,5 +25,9 @@ extern crate agb;
fn main() -> ! { fn main() -> ! {
let mut gba = agb::Gba::new(); let mut gba = agb::Gba::new();
let mut object = gba.display.object.get();
object.set_sprite_palettes(gfx::sprites::sprites.palettes);
object.set_sprite_tilemap(gfx::sprites::sprites.tiles);
loop {} loop {}
} }