Skip to Content
The Alchemy Project

include/window/window_sprite.h

Sprites as the windows draw them: a sprite's OAM attributes, and the lists of characters, icons and portraits each window shows as sprites.

Included by menu_internal.h, djinn_menu.h, shop.h, cursor.h, djinn_preview.h, menu_list.h, settings_menu.h and window.h.

Structures

NameDescription
structGLYPH_RECTA 16-byte rectangle.
unionOAM_ATTR2_WORDA sprite's OAM attribute 2 (tile index, priority and palette) and the halfword after it, as one word or as fields.
structOAM_DATAAttributes zero through two copied to OAM, plus the halfword after them.
structQUEUED_SPRA 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.
structWINDOW_SPRA window sprite: a sprite in a window's sprite list (a character, an icon or a portrait), with its VRAM cache slot, depth slot (syOAMAddSpriteAtDepth: higher draws in front; glyphs use 254) and OAM attributes.
structWINDOW_SPR_LISTA list of window sprites: its first sprite and the link to append after.

Enumerations

NameDescription
enumWINDOW_SPR_KIND { WINDOW_SPRITE_PLAIN, WINDOW_SPRITE_ICON, WINDOW_SPRITE_PORTR … }WINDOW_SPR.kind: what a window sprite owns besides itself, which mnWindowSpriteRelease frees.

Description

Sprites as the windows draw them: a sprite's OAM attributes, and the lists of characters, icons and portraits each window shows as sprites.

Enumerations in detail

WINDOW_SPR_KIND

enum WINDOW_SPR_KIND

WINDOW_SPR.kind: what a window sprite owns besides itself, which mnWindowSpriteRelease frees.

EnumeratorValueDescription
WINDOW_SPRITE_PLAIN0a glyph in the window's glyph tiles
WINDOW_SPRITE_ICON1its own VRAM cache entry
WINDOW_SPRITE_PORTRAIT2a VRAM cache entry and a palette slot

Definition at line 78 of file window_sprite.h.