From 2614fd1af0cce8ba218c9df6fb659030e6882e67 Mon Sep 17 00:00:00 2001 From: Gwilym Inzani Date: Sun, 18 Aug 2024 09:54:20 +0100 Subject: [PATCH] Make affine map indexes u16 --- agb/src/display/tiled/map.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/agb/src/display/tiled/map.rs b/agb/src/display/tiled/map.rs index c5269e49..5cd34295 100644 --- a/agb/src/display/tiled/map.rs +++ b/agb/src/display/tiled/map.rs @@ -432,7 +432,7 @@ impl AffineMap { vram: &mut VRamManager, pos: impl Into>, tileset: &TileSet<'_>, - tile_id: u8, + tile_index: u16, ) { let pos = self.map_size().gba_offset(pos.into()); let colours = self.colours(); @@ -442,8 +442,6 @@ impl AffineMap { vram.remove_tile(old_tile.tile_index(colours)); } - let tile_index = tile_id as u16; - let new_tile = if tile_index != TRANSPARENT_TILE_INDEX { let new_tile_idx = vram.add_tile(tileset, tile_index); Tile::new(new_tile_idx, TileSetting(0))