mirror of
https://github.com/italicsjenga/agb.git
synced 2025-01-22 23:26:33 +11:00
update example
This commit is contained in:
parent
8f7e7748e2
commit
40c4a26cb1
1 changed files with 4 additions and 4 deletions
|
@ -3,15 +3,15 @@
|
||||||
|
|
||||||
extern crate alloc;
|
extern crate alloc;
|
||||||
|
|
||||||
use agb::display::object::{ObjectController, Sprite, TagMap};
|
use agb::display::object::{Graphics, ObjectController, Sprite, TagMap};
|
||||||
use alloc::vec::Vec;
|
use alloc::vec::Vec;
|
||||||
|
|
||||||
const SPRITE_TAGS: (&[Sprite], &TagMap) = agb::include_aseprite!(
|
const GRAPHICS: &Graphics = agb::include_aseprite!(
|
||||||
"../examples/the-purple-night/gfx/objects.aseprite",
|
"../examples/the-purple-night/gfx/objects.aseprite",
|
||||||
"../examples/the-purple-night/gfx/boss.aseprite"
|
"../examples/the-purple-night/gfx/boss.aseprite"
|
||||||
);
|
);
|
||||||
const SPRITES: &[Sprite] = SPRITE_TAGS.0;
|
const SPRITES: &[Sprite] = GRAPHICS.sprites();
|
||||||
const TAG_MAP: &TagMap = SPRITE_TAGS.1;
|
const TAG_MAP: &TagMap = GRAPHICS.tags();
|
||||||
|
|
||||||
fn all_sprites(gfx: &ObjectController) {
|
fn all_sprites(gfx: &ObjectController) {
|
||||||
let mut input = agb::input::ButtonController::new();
|
let mut input = agb::input::ButtonController::new();
|
||||||
|
|
Loading…
Add table
Reference in a new issue