fix wave example

This commit is contained in:
Corwin Kuiper 2021-08-06 23:26:51 +01:00
parent da6ff40a32
commit 99f992353a

View file

@ -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];