mirror of
https://github.com/italicsjenga/gba.git
synced 2025-01-10 02:51:31 +11:00
Fix definition of row_col
for affine screenblock (#177)
I believe `TextScreenblockAddress` also needs to be split into types for size 0 to 3.
This commit is contained in:
parent
a9425f45ce
commit
d5d6e04313
|
@ -345,7 +345,7 @@ macro_rules! make_affine_screenblock_address_type {
|
||||||
pub const fn row_col(self, row: usize, col: usize) -> VolAddress<u8x2, Safe, Safe> {
|
pub const fn row_col(self, row: usize, col: usize) -> VolAddress<u8x2, Safe, Safe> {
|
||||||
assert!(row < Self::HEIGHT, "`row` out of bounds.");
|
assert!(row < Self::HEIGHT, "`row` out of bounds.");
|
||||||
assert!(col < Self::WIDTH, "`col` out of bounds.");
|
assert!(col < Self::WIDTH, "`col` out of bounds.");
|
||||||
self.block.index(row * 32 + col)
|
self.block.index(row * Self::WIDTH + col)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
|
|
Loading…
Reference in a new issue