Code review

This commit is contained in:
kouta 2024-07-10 09:29:07 -03:00
parent 8c6e1ae0a9
commit 1340b992cb
2 changed files with 2 additions and 3 deletions

View file

@ -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

View file

@ -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<u8> = self.tiles_mut().iter().map(|a| a.tile_index(TileFormat::EightBpp).raw_index() as u8).collect();
unsafe {
let tiledata: Vec<u8> = 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(),