From 99f992353a02e3e1890ed52f668a7311378ea396 Mon Sep 17 00:00:00 2001 From: Corwin Kuiper Date: Fri, 6 Aug 2021 23:26:51 +0100 Subject: [PATCH] fix wave example --- agb/examples/wave.rs | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/agb/examples/wave.rs b/agb/examples/wave.rs index cd990a4c..c25f3260 100644 --- a/agb/examples/wave.rs +++ b/agb/examples/wave.rs @@ -19,19 +19,7 @@ pub fn main() -> ! { let mut gba = agb::Gba::new(); let mut gfx = gba.display.video.tiled0(); - gfx.set_background_palettes(example_logo::PALETTE_DATA); - gfx.set_background_tilemap(0, example_logo::TILE_DATA); - - let mut back = gfx.get_background().unwrap(); - - let mut entries: [u16; 30 * 20] = [0; 30 * 20]; - for tile_id in 0..(30 * 20) { - let palette_entry = example_logo::PALETTE_ASSIGNMENT[tile_id as usize] as u16; - entries[tile_id as usize] = tile_id | (palette_entry << 12); - } - - back.draw_full_map(&entries, (30_u32, 20_u32).into(), 0); - back.show(); + example_logo::display_logo(&mut gfx); let mut time = 0; let cosines = [0_u16; 32];