Alchemy
Loading...
Searching...
No Matches

affine.h File Reference

Sprite rotation and scale, and the affine matrices handed out each frame. More...

Go to the source code of this file.

Data Structures

struct  AffineTransform
 A sprite's rotation and scale: scales in 8.8 fixed point (0x100 is full size), the angle in 1/65536 turns. More...
union  AffineMatrix
 One OAM rotation-scaling matrix: pa, pb, pc and pd in 8.8 fixed point, the inverse of the transform the sprite is drawn with. More...

Functions

 STATIC_ASSERT (sizeof(struct AffineTransform)==8)
 STATIC_ASSERT (offsetof(struct AffineTransform, scaleY)==2)
 STATIC_ASSERT (offsetof(struct AffineTransform, angle)==4)
 STATIC_ASSERT (sizeof(union AffineMatrix)==8)

Variables

u8 gObjAffineCount
 The matrices handed out this frame (up to 32), copied into OAM with the sprites.
union AffineMatrix gObjAffineMatrices []

Detailed Description

Sprite rotation and scale, and the affine matrices handed out each frame.

Definition in file affine.h.

Function Documentation

◆ STATIC_ASSERT() [1/4]

STATIC_ASSERT ( sizeof(struct AffineTransform) = =8)

◆ STATIC_ASSERT() [2/4]

STATIC_ASSERT ( offsetof(struct AffineTransform, scaleY) = =2)

◆ STATIC_ASSERT() [3/4]

STATIC_ASSERT ( offsetof(struct AffineTransform, angle) = =4)

◆ STATIC_ASSERT() [4/4]

STATIC_ASSERT ( sizeof(union AffineMatrix) = =8)

Variable Documentation

◆ gObjAffineCount

u8 gObjAffineCount
extern

The matrices handed out this frame (up to 32), copied into OAM with the sprites.

Referenced by AffineMatrix_BuildForEffect(), Render_ResetFrame(), and STATIC_ASSERT().

◆ gObjAffineMatrices

union AffineMatrix gObjAffineMatrices[]
extern