mirror of
https://github.com/italicsjenga/agb.git
synced 2025-01-26 00:56:38 +11:00
Merge pull request #51 from corwinkuiper/fix-affine
fix index for affine matrix
This commit is contained in:
commit
1807b0adc6
1 changed files with 1 additions and 1 deletions
|
@ -228,7 +228,7 @@ impl AffineMatrix<'_> {
|
||||||
#[allow(clippy::identity_op)]
|
#[allow(clippy::identity_op)]
|
||||||
/// Commits matrix to OAM, will cause any objects using this matrix to be updated.
|
/// Commits matrix to OAM, will cause any objects using this matrix to be updated.
|
||||||
pub fn commit(&self) {
|
pub fn commit(&self) {
|
||||||
let id = self.loan.index as usize;
|
let id = self.loan.index as usize * 4;
|
||||||
OBJECT_ATTRIBUTE_MEMORY.set((id + 0) * 4 + 3, self.attributes.p_a as u16);
|
OBJECT_ATTRIBUTE_MEMORY.set((id + 0) * 4 + 3, self.attributes.p_a as u16);
|
||||||
OBJECT_ATTRIBUTE_MEMORY.set((id + 1) * 4 + 3, self.attributes.p_b as u16);
|
OBJECT_ATTRIBUTE_MEMORY.set((id + 1) * 4 + 3, self.attributes.p_b as u16);
|
||||||
OBJECT_ATTRIBUTE_MEMORY.set((id + 2) * 4 + 3, self.attributes.p_c as u16);
|
OBJECT_ATTRIBUTE_MEMORY.set((id + 2) * 4 + 3, self.attributes.p_c as u16);
|
||||||
|
|
Loading…
Add table
Reference in a new issue