diff --git a/agb/src/display/tiled/map.rs b/agb/src/display/tiled/map.rs index 9abe79a8..c094e966 100644 --- a/agb/src/display/tiled/map.rs +++ b/agb/src/display/tiled/map.rs @@ -40,7 +40,7 @@ trait TiledMapPrivate: TiledMapTypes { unsafe { MemoryMapped::new(0x0400_0008 + 2 * self.background_id()) } } fn screenblock_memory(&self) -> *mut u16 { - (0x0600_0000 + 0x1000 * self.screenblock() as usize / 2) as *mut u16 + (0x0600_0000 + 0x1000 * self.screenblock() / 2) as *mut u16 } } diff --git a/agb/src/display/tiled/vram_manager.rs b/agb/src/display/tiled/vram_manager.rs index 6b3dbf43..3464f54e 100644 --- a/agb/src/display/tiled/vram_manager.rs +++ b/agb/src/display/tiled/vram_manager.rs @@ -333,7 +333,7 @@ impl VRamManager { pub(crate) fn gc(&mut self) { for tile_index in self.indices_to_gc.drain(..) { - let key = tile_index.refcount_key() as usize; + let key = tile_index.refcount_key(); if self.reference_counts[key].current_count() > 0 { continue; // it has since been added back }