From 40c4a26cb13b129cedc71daeed867d8b2a055aa1 Mon Sep 17 00:00:00 2001 From: Corwin Date: Mon, 7 Mar 2022 20:38:13 +0000 Subject: [PATCH] update example --- agb/examples/sprites.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/agb/examples/sprites.rs b/agb/examples/sprites.rs index 868472cf..7342032b 100644 --- a/agb/examples/sprites.rs +++ b/agb/examples/sprites.rs @@ -3,15 +3,15 @@ extern crate alloc; -use agb::display::object::{ObjectController, Sprite, TagMap}; +use agb::display::object::{Graphics, ObjectController, Sprite, TagMap}; 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/boss.aseprite" ); -const SPRITES: &[Sprite] = SPRITE_TAGS.0; -const TAG_MAP: &TagMap = SPRITE_TAGS.1; +const SPRITES: &[Sprite] = GRAPHICS.sprites(); +const TAG_MAP: &TagMap = GRAPHICS.tags(); fn all_sprites(gfx: &ObjectController) { let mut input = agb::input::ButtonController::new();