mirror of
https://github.com/italicsjenga/agb.git
synced 2025-01-26 00:56:38 +11:00
packed(4) to ensure alignment
This commit is contained in:
parent
83c28254a1
commit
63b0fa63c6
1 changed files with 3 additions and 3 deletions
|
@ -139,7 +139,7 @@ pub fn arc_tan2(x: i16, y: i32) -> i16 {
|
||||||
result
|
result
|
||||||
}
|
}
|
||||||
|
|
||||||
#[repr(C, packed)]
|
#[repr(C, packed(4))]
|
||||||
pub struct BgAffineSetData {
|
pub struct BgAffineSetData {
|
||||||
pub matrix: AffineMatrixAttributes,
|
pub matrix: AffineMatrixAttributes,
|
||||||
pub position: Vector2D<Num<i32, 8>>,
|
pub position: Vector2D<Num<i32, 8>>,
|
||||||
|
@ -161,7 +161,7 @@ pub fn bg_affine_matrix(
|
||||||
scale: Vector2D<Num<i16, 8>>,
|
scale: Vector2D<Num<i16, 8>>,
|
||||||
rotation: Num<u16, 8>,
|
rotation: Num<u16, 8>,
|
||||||
) -> BgAffineSetData {
|
) -> BgAffineSetData {
|
||||||
#[repr(C, packed)]
|
#[repr(C, packed(4))]
|
||||||
struct Input {
|
struct Input {
|
||||||
bg_center: Vector2D<Num<i32, 8>>,
|
bg_center: Vector2D<Num<i32, 8>>,
|
||||||
display_center: Vector2D<i16>,
|
display_center: Vector2D<i16>,
|
||||||
|
@ -200,7 +200,7 @@ pub fn obj_affine_matrix(
|
||||||
rotation: Num<u8, 8>,
|
rotation: Num<u8, 8>,
|
||||||
) -> AffineMatrixAttributes {
|
) -> AffineMatrixAttributes {
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
#[repr(C, packed)]
|
#[repr(C, packed(4))]
|
||||||
struct Input {
|
struct Input {
|
||||||
scale: Vector2D<Num<i16, 8>>,
|
scale: Vector2D<Num<i16, 8>>,
|
||||||
rotation: u16,
|
rotation: u16,
|
||||||
|
|
Loading…
Add table
Reference in a new issue