38 angle = source->
angle;
44 if ((xScale == yScale || -xScale == yScale) && angle == 0) {
50 xReciprocal = reciprocal;
51 if (-xScale == yScale)
52 xReciprocal = -reciprocal;
54 matrix->
rows[0] = (
u16)xReciprocal;
55 matrix->
rows[1] = (
u32)reciprocal << 16;
63 *coefficient = cosine / xScale;
65 *coefficient = sine / xScale;
67 *coefficient = (-sine) / yScale;
69 *coefficient = cosine / yScale;
90 *(
void **)slotEntry = previousHead;
union AffineMatrix gObjAffineMatrices[]
u8 gObjAffineCount
The matrices handed out this frame (up to 32), copied into OAM with the sprites.
void * gRenderSlotHeads[]
static s32 Iwram_SignedDivide(s32 dividend, s32 divisor)
void MemFree(void *buffer)
#define RamCode_Load(to, code, bytes)
Allocates a heap copy; release it with MemFree when finished.
@ OBJ_AFFINE_MATRIX_COUNT
@ RENDER_DEPTH_SLOT_COUNT
void Render_ResetFrame(void)
Starts a new frame of sprites: frees the affine matrices and empties the 256 depth slots sprites are ...
s32 AffineMatrix_BuildForEffect(struct AffineTransform *source)
Hands out the next OAM affine matrix for a sprite drawn with source's scale and rotation and fills it...
void Runtime_PushSlotEntry(void *slotEntry, s32 slot)
Links a sprite entry into depth slot slot (clamped to 0..255) for this frame.
void(*) OamBuildRoutine(void *work)
void Render_BuildOamList(void *work)
Builds this frame's OAM list in work from the sprites linked into the depth slots,...
What every part of the runtime object shares: its includes and the library call two parts make.
s32 _call_via_r3(s32, s32, s32, s32)
const u8 Render_BuildOamListKernel[]
One OAM rotation-scaling matrix: pa, pb, pc and pd in 8.8 fixed point, the inverse of the transform t...
s16 coefficients[4]
pa, pb, pc and pd
u32 rows[2]
pa and pb, then pc and pd, written whole when only the diagonal is set.