mirror of
https://github.com/italicsjenga/agb.git
synced 2025-01-26 09:06:33 +11:00
fix wave example
This commit is contained in:
parent
da6ff40a32
commit
99f992353a
1 changed files with 1 additions and 13 deletions
|
@ -19,19 +19,7 @@ pub fn main() -> ! {
|
||||||
let mut gba = agb::Gba::new();
|
let mut gba = agb::Gba::new();
|
||||||
let mut gfx = gba.display.video.tiled0();
|
let mut gfx = gba.display.video.tiled0();
|
||||||
|
|
||||||
gfx.set_background_palettes(example_logo::PALETTE_DATA);
|
example_logo::display_logo(&mut gfx);
|
||||||
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();
|
|
||||||
|
|
||||||
let mut time = 0;
|
let mut time = 0;
|
||||||
let cosines = [0_u16; 32];
|
let cosines = [0_u16; 32];
|
||||||
|
|
Loading…
Add table
Reference in a new issue