From 7265576e2a841561c44cb496e3131808b5dce892 Mon Sep 17 00:00:00 2001 From: Corwin Date: Mon, 3 Apr 2023 22:41:13 +0100 Subject: [PATCH] fix affine matrix copying --- agb/src/display/object/affine.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agb/src/display/object/affine.rs b/agb/src/display/object/affine.rs index 87597a1e..5dd44a6a 100644 --- a/agb/src/display/object/affine.rs +++ b/agb/src/display/object/affine.rs @@ -61,7 +61,7 @@ impl AffineMatrixVram { for (idx, component) in components.iter().enumerate() { unsafe { (OBJECT_ATTRIBUTE_MEMORY as *mut u16) - .add(location * 4 * idx + 3) + .add(location * 16 + idx * 4 + 3) .write_volatile(*component); } }