From 742231fbc589fe22ca538339392d90069f638952 Mon Sep 17 00:00:00 2001 From: Gwilym Kuiper Date: Sat, 19 Feb 2022 20:59:59 +0000 Subject: [PATCH] Try a different transparent tile then 0 --- agb/src/display/background.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/agb/src/display/background.rs b/agb/src/display/background.rs index d486987b..db2724fa 100644 --- a/agb/src/display/background.rs +++ b/agb/src/display/background.rs @@ -70,6 +70,8 @@ pub struct RegularMap { tiles_dirty: bool, } +pub const TRANSPARENT_TILE_INDEX: u16 = 1 << 10 - 1; + impl RegularMap { fn new(background_id: u8, screenblock: u8, priority: Priority) -> Self { Self { @@ -101,7 +103,7 @@ impl RegularMap { let tile_index = tile_setting.index(); - let new_tile = if tile_index != 0 { + let new_tile = if tile_index != TRANSPARENT_TILE_INDEX { let new_tile_idx = vram.add_tile(tileset_ref, tile_index); Tile::new(new_tile_idx, tile_setting) } else {