diff --git a/agb/src/display/background.rs b/agb/src/display/background.rs index b9b33e52..7e43ac04 100644 --- a/agb/src/display/background.rs +++ b/agb/src/display/background.rs @@ -342,8 +342,13 @@ impl RegularMap { } let tile_index = tile_setting.index(); - let new_tile_idx = vram.add_tile(tileset_ref, tile_index); - let new_tile = Tile::new(new_tile_idx, tile_setting); + + let new_tile = if tile_index != 0 { + let new_tile_idx = vram.add_tile(tileset_ref, tile_index); + Tile::new(new_tile_idx, tile_setting) + } else { + Tile::default() + }; self.tiles[pos] = new_tile; self.tiles_dirty = true; diff --git a/examples/the-hat-chooses-the-wizard/src/main.rs b/examples/the-hat-chooses-the-wizard/src/main.rs index f1f88326..063f6de0 100644 --- a/examples/the-hat-chooses-the-wizard/src/main.rs +++ b/examples/the-hat-chooses-the-wizard/src/main.rs @@ -806,7 +806,7 @@ fn main(mut agb: agb::Gba) -> ! { let mut music_box = sfx::MusicBox::new(); let vblank = agb::interrupt::VBlank::get(); - let mut current_level = 0; + let mut current_level = 8; loop { if current_level == map_tiles::LEVELS.len() as u32 {