mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-24 08:41:34 +11:00
Import the sprites in the pong code
This commit is contained in:
parent
e02fda5fc9
commit
acee6a3c51
|
@ -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 {}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue