mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 08:11:33 +11:00
Code review
This commit is contained in:
parent
8c6e1ae0a9
commit
1340b992cb
|
@ -8,7 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
### Fixed
|
### 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
|
## [0.20.5] - 2024/06/18
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,6 @@ use super::{
|
||||||
};
|
};
|
||||||
|
|
||||||
use alloc::{vec, vec::Vec};
|
use alloc::{vec, vec::Vec};
|
||||||
use crate::display::tiled::TileFormat::FourBpp;
|
|
||||||
|
|
||||||
pub trait TiledMapTypes: private::Sealed {
|
pub trait TiledMapTypes: private::Sealed {
|
||||||
type Size: BackgroundSize + Copy;
|
type Size: BackgroundSize + Copy;
|
||||||
|
@ -90,8 +89,8 @@ impl TiledMap for AffineMap
|
||||||
let screenblock_memory = self.screenblock_memory() as *mut u8;
|
let screenblock_memory = self.screenblock_memory() as *mut u8;
|
||||||
|
|
||||||
if *self.tiles_dirty() {
|
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 {
|
unsafe {
|
||||||
let tiledata: Vec<u8> = self.tiles_mut().iter().map(|a| a.tile_index(FourBpp).raw_index() as u8).collect();
|
|
||||||
screenblock_memory.copy_from(
|
screenblock_memory.copy_from(
|
||||||
tiledata.as_ptr(),
|
tiledata.as_ptr(),
|
||||||
self.map_size().num_tiles(),
|
self.map_size().num_tiles(),
|
||||||
|
|
Loading…
Reference in a new issue