24 for (i = 0; i < task->
count; i++) {
43 if (++task->
count > 40) {
60 switch (task->
state) {
void initCardDrawer(CardDrawer *obj)
Clears a card drawer, gives it its methods and binds it.
DeckCards * STCRDDEK_createDeckCards(DeckEditor *editor)
Creates the deck's cards (task) on the editor's grid.
void STCRDDEK_updateDeckCards(DeckCards *task)
The deck cards' task: shows one more card each frame, then keeps drawing all 40 until the editor kill...
void STCRDDEK_drawDeckCards(DeckCards *task)
Draws the deck's cards shown so far on the grid, 9 a row: each one's frame in its color and its image...
void STCRDDEK_loadNextCard(DeckCards *task)
Shows one more of the deck's cards, loading its image into its cell of VRAM; TASK_DONE once all 40 ar...
STCRDDEK: the deck editor, where the player builds the three decks from the cards they own and rename...
#define STCRDDEK_SPRITES
sprite bank
GameState GAME
The save data, the game mode and the methods.
#define TASK_INIT
Tasks: every game object is a task, a heap block that starts with this header and is updated once per...
FileCache FILE_CACHE
The file cache.
#define SCREEN_LAYER
The layer over the whole screen that most modes create first and draw their menus on (FIELDSTG and ST...
void initSpriteDrawer(SpriteDrawer *obj)
Clears a sprite drawer to neutral (no scale, gray tint, follows the scroll), gives it its methods and...
Draws the cards' images (CardImage), from files 0x7E7-0x7EB.
void(* setClutPos)()
(x, y)
void(* setImagePos)()
(x, y)
void(* setLayer)()
(id, depth)
Draws the deck's cards, appearing one per frame.
void(* nextState)(struct DeckCards *task)
s32 count
cards shown so far
void *(* getEntry)(u32 fileAndIndex)
Draws sprites from a sprite sheet (such as file 0x277, the menu graphics): a sheet has a table of fra...
void(* setLayerId)()
(id, depth)
void(* draw)()
(sheet, frame, x, y)
void(* setTexture)()
(x, y)
void * createTask(void(*update)(), s32 size, s32 childrenSize)
createTaskWithId for a task nothing needs to find