src/system/system_oam.c
The tick's sprite lists: affine matrices, depth slots and the OAM build. More…
Included by system.c.
Typedefs
| Name | Description | |
|---|---|---|
typedef void (* | OAM_BUILD_ROUTINE )(void *work); |
Enumerations
| Name | Description | |
|---|---|---|
enum | anonymous enum { OBJ_AFFINE_MATRIX_COUNT, RENDER_DEPTH_SLOT_COUNT } |
Functions
| Name | Description | |
|---|---|---|
void | syOAMResetTick (void) | Starts a new tick of sprites: frees the affine matrices and empties the RENDER_DEPTH_SLOT_COUNT depth slots sprites are linked into. |
Sint32 | syOAMMatrixAllocateFromTransform (AFFINE_TRANSFORM *src) | Hands out the next OAM affine matrix for a sprite drawn with src's scale and rotation and fills it in. |
void | syOAMAddSpriteAtDepth (void *slotEntry, Sint32 slot) | Links a sprite entry into depth slot slot (clamped to the RENDER_DEPTH_SLOT_COUNT slots) for this tick. |
void | syOAMBuildBuffer (void *work) | Builds this tick's OAM list in work from the sprites linked into the depth slots, with a RAM copy of the ARM builder. |
Description
The tick's sprite lists: affine matrices, depth slots and the OAM build. Part
of system.c.
Typedefs in detail
OAM_BUILD_ROUTINE
typedef void (*OAM_BUILD_ROUTINE)(void *work);
Referenced by syOAMBuildBuffer().
Definition at line 22 of file system_oam.c.
Enumerations in detail
anonymous enum
enum { OBJ_AFFINE_MATRIX_COUNT, RENDER_DEPTH_SLOT_COUNT }
| Enumerator | Value | Description |
|---|---|---|
OBJ_AFFINE_MATRIX_COUNT | 32 | the OAM's rotation-scaling matrices |
RENDER_DEPTH_SLOT_COUNT | 256 | depth slots a sprite is linked into |
Definition at line 4 of file system_oam.c.
Functions in detail
syOAMResetTick
void syOAMResetTick(void)
Starts a new tick of sprites: frees the affine matrices and empties the
RENDER_DEPTH_SLOT_COUNT depth slots sprites are linked into.
References _call_via_r3(), OamDepthLists, OamMatrixCount and syIWRAMWordsClear.
Referenced by sySynch().
Definition at line 12 of file system_oam.c.
syOAMMatrixAllocateFromTransform
Sint32 syOAMMatrixAllocateFromTransform(AFFINE_TRANSFORM *src)
Hands out the next OAM affine matrix for a sprite drawn with src's scale
and rotation and fills it in. Returns the matrix number, 0 to 31.
References OamMatrices, OamMatrixCount, Sint32, syCos(), syIntegerDivide() and sySin().
Referenced by fdRenderApplyProjectedPlacement(), fdRenderPlaceProjectedSprite(), mnBattleCommandRowRun(), mnBattleTargetRunSelection(), mnIconMenuDrawIcons(), mnSelectionMenuDraw(), mnWindowSpritePulse(), mnWindowSpriteUpdateAll(), mnWindowSpriteUpdateScaleAnimation() and scColossoUpdateLettering().
Definition at line 26 of file system_oam.c.
syOAMAddSpriteAtDepth
void syOAMAddSpriteAtDepth(void *slotEntry, Sint32 slot)
Links a sprite entry into depth slot slot (clamped to the
RENDER_DEPTH_SLOT_COUNT slots) for this tick.
References OamDepthLists and Sint32.
Referenced by btMessageWaitForAdvance(), btMessageWaitForAdvanceAt(), btPlaybackRun(), fdEffectUpdateSparkles(), fdGroundMaskDrawMarks(), fdMapScreenUpdateMarkers(), fdMotesUpdate(), fdRenderApplyProjectedPlacement(), fdRenderPlaceProjectedSprite(), fdWeatherUpdateRain(), mnArrowSetPos(), mnBattleCommandRowRun(), mnBattleDjinnMenuRun(), mnBattleItemMenuRun(), mnBattleMenuUpdate(), mnBattlePsynergyMenuRun(), mnBattleStatusScreenRun(), mnBattleSummonMenuRun(), mnBattleTargetRunSelection(), mnDjinnShowJoinedMessage(), mnIconMenuDrawIcons(), mnPartyShowJoinedMessage(), mnPartyShowPairJoinedMessage(), mnSelectionMenuDraw(), mnSelectionMenuDrawArrow(), mnTitleShowTitleScreen(), mnWindowSpriteUpdateAll(), scColossoDrawGauge(), scColossoUpdateLettering(), scColossoUpdatePointer(), scHeatGaugeDraw(), scLemurianShipCloseCurtains(), scSolSanctumStatueUpdateScrollingSprites() and scTitleUpdateSpriteReveal().
Definition at line 84 of file system_oam.c.
syOAMBuildBuffer
void syOAMBuildBuffer(void *work)
Builds this tick's OAM list in work from the sprites linked into the depth
slots, with a RAM copy of the ARM builder.
References syHeapRelease(), syOAMBuildBufferKernel and syOAMBuildBufferKernelCodeSize.
Referenced by sySynch().
Definition at line 101 of file system_oam.c.