include/window/window_sprite.h
Sprites as OAM takes them, and the window sprites: the characters, icons and portraits a window carries.
Included by menu_internal.h, shop_internal.h, window_internal.h, effect_sprite.h, scene.h, scene_effects.h and window.h.
Structures
| Name | Description | |
|---|---|---|
struct | ICON_ATTR | An icon sprite's OAM attributes, as OAM lays them out. |
struct | ICON_SPR | An icon's sprite: its link in the sprite list and its OAM attributes. |
struct | OAM_DATA | Attributes zero through two as the hardware lays them out in OAM, plus the halfword after them. |
struct | QUEUED_SPR | A sprite as the depth queue takes it: syOAMAddSpriteAtDepth writes the link to the next sprite queued at the same depth, and the OAM attributes follow. |
struct | WINDOW_SPR | A window sprite: a sprite in a window's sprite list (a character, an icon or a portrait), with its VRAM cache slot and OAM attributes. |
struct | WINDOW_SPR_LIST | A list of window sprites: its first sprite and the link to append after. |
Macros
| Name | Description | |
|---|---|---|
#define | ICON_NONE VRAM_CACHE_ENTRY_COUNT | An icon slot that holds no VRAM cache entry. |
#define | OAM_MIRROR_X 8 | OAM_DATA.matrix's bits for a sprite that is not affine: mirrored left to right, top to bottom. |
#define | OAM_MIRROR_Y 16 |
Functions
| Name | Description | |
|---|---|---|
Sint32 | mnWindowSpriteCreateAbilityIcon (struct WINDOW *window, Sint32 x, Sint32 y, Sint32 abilityId) | Shows ability abilityId's icon as a 16x16 sprite at (x, y) pixels of window. |
static inline QUEUED_SPR * | mnWindowSpriteGetSprite (WINDOW_SPR *sprite) | The queued sprite of window sprite sprite (WINDOW_SPR.sprite). |
Variables
| Name | Description | |
|---|---|---|
STATIC_ASSERT( | offsetof (WINDOW_SPR, sprite.oam) |
Description
Sprites as OAM takes them, and the window sprites: the characters, icons and portraits a window carries.
Macros in detail
ICON_NONE
#define ICON_NONE VRAM_CACHE_ENTRY_COUNT
An icon slot that holds no VRAM cache entry.
Referenced by mnItemIconGridDraw(), mnItemIconGridInit(), mnItemIconGridLoadItems() and mnItemIconGridRelease().
Definition at line 13 of file window_sprite.h.
OAM_MIRROR_X
#define OAM_MIRROR_X 8
OAM_DATA.matrix's bits for a sprite that is not affine: mirrored left to
right, top to bottom.
Referenced by mnOpenBackdropScreen().
Definition at line 45 of file window_sprite.h.
OAM_MIRROR_Y
#define OAM_MIRROR_Y 16
Definition at line 46 of file window_sprite.h.
Functions in detail
mnWindowSpriteGetSprite
static inline QUEUED_SPR *mnWindowSpriteGetSprite(WINDOW_SPR *sprite)
The queued sprite of window sprite sprite (WINDOW_SPR.sprite).
Referenced by fdWindowSpriteListMove(), mnGlyphAddBlankSprite(), mnGlyphDraw(), mnGlyphDrawAsSprite(), mnWindowPutGlyph() and mnWindowSpriteUpdateScaleAnimation().
Definition at line 97 of file window_sprite.h.
Variables in detail
offsetof
STATIC_ASSERT(offsetof(WINDOW_SPR, sprite.oam)
Definition at line 116 of file window_sprite.h.