From 1340b992cbd26cc5dd211c813a2a89b8586c8670 Mon Sep 17 00:00:00 2001 From: kouta Date: Wed, 10 Jul 2024 09:29:07 -0300 Subject: [PATCH] Code review --- CHANGELOG.md | 2 +- agb/src/display/tiled/map.rs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 25320141..90ec1ca1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ### Fixed -- Kludge fix for tilemap gaps in affine graphics modes. +- There are no longer gaps between tiles in affine graphics modes. ## [0.20.5] - 2024/06/18 diff --git a/agb/src/display/tiled/map.rs b/agb/src/display/tiled/map.rs index 747f465f..0b1d5bdf 100644 --- a/agb/src/display/tiled/map.rs +++ b/agb/src/display/tiled/map.rs @@ -15,7 +15,6 @@ use super::{ }; use alloc::{vec, vec::Vec}; -use crate::display::tiled::TileFormat::FourBpp; pub trait TiledMapTypes: private::Sealed { type Size: BackgroundSize + Copy; @@ -90,8 +89,8 @@ impl TiledMap for AffineMap let screenblock_memory = self.screenblock_memory() as *mut u8; if *self.tiles_dirty() { + let tiledata: Vec = self.tiles_mut().iter().map(|a| a.tile_index(TileFormat::EightBpp).raw_index() as u8).collect(); unsafe { - let tiledata: Vec = self.tiles_mut().iter().map(|a| a.tile_index(FourBpp).raw_index() as u8).collect(); screenblock_memory.copy_from( tiledata.as_ptr(), self.map_size().num_tiles(),