diff --git a/agb/src/display/affine.rs b/agb/src/display/affine.rs index 921d460d..5ee173b4 100644 --- a/agb/src/display/affine.rs +++ b/agb/src/display/affine.rs @@ -90,13 +90,20 @@ type AffineMatrixElement = Num; #[derive(Debug, PartialEq, Eq, Clone, Copy)] /// An affine matrix stored in a way that is efficient for the GBA to perform /// operations on. This implements multiplication. +/// +/// ```txt +/// a b x +/// c d y +/// 0 0 0 +/// ``` +#[allow(missing_docs)] pub struct AffineMatrix { - a: AffineMatrixElement, - b: AffineMatrixElement, - c: AffineMatrixElement, - d: AffineMatrixElement, - x: AffineMatrixElement, - y: AffineMatrixElement, + pub a: AffineMatrixElement, + pub b: AffineMatrixElement, + pub c: AffineMatrixElement, + pub d: AffineMatrixElement, + pub x: AffineMatrixElement, + pub y: AffineMatrixElement, } #[derive(Debug, Clone, Copy, PartialEq, Eq)] @@ -318,11 +325,17 @@ impl From for AffineMatrix { #[derive(Debug, PartialEq, Eq, Clone, Copy)] #[repr(C, packed(4))] /// An affine matrix that can be used in affine objects +/// +/// ```txt +/// a b +/// c d +/// ``` +#[allow(missing_docs)] pub struct AffineMatrixObject { - a: Num, - b: Num, - c: Num, - d: Num, + pub a: Num, + pub b: Num, + pub c: Num, + pub d: Num, } impl Default for AffineMatrixObject { 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))