diff --git a/book/games/pong/src/main.rs b/book/games/pong/src/main.rs index 9cc6f4f9..121f2950 100644 --- a/book/games/pong/src/main.rs +++ b/book/games/pong/src/main.rs @@ -14,6 +14,10 @@ // up correctly. 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 // ensures that everything is in order. `agb` will call this after setting up the stack // and interrupt handlers correctly. @@ -21,5 +25,9 @@ extern crate agb; fn main() -> ! { 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 {} }