12 switch (task->
state) {
29 if (items[0]->result == 2) {
CARDGAME.PRO: the card battle (mode 0x700).
CardBattle * CARDGAME_createBattle(s32 arg)
Creates the card battle against opponent arg (CARDGAME_loadOpponent), with its functions,...
Task * CARDGAME_start(void)
The mode's entry point (MODE_ENTRY_POINTS)
void CARDGAME_updateScene(Task *task, CardBattle **items)
The mode's task: sets up the display and starts the battle, then returns to the field once it is over...
RECT CARDGAME_screenRect
The data: the rest of the overlay's, this object's tables and the variables, which the second object ...
GfxState GFX
GFX: the graphics state and its methods.
GameState GAME
The save data, the game mode and the methods.
FileCache FILE_CACHE
The file cache.
#define MODE_STAGE_SELECT
STAGSLCT, the debug stage select.
#define SCREEN_WIDTH
The screen the modes draw on (setDisplayMode, their layers' rects)
#define FILE_CARDGAME_TIMS
CARDGAME's own pictures, a TIM archive.
The card battle (CARDGAME_createBattle).
void(* setState)(struct CardBattle *task, s32 state)
void *(* getEntry)(u32 fileAndIndex)
void(* requestMode)(s32 mode, s32 arg)
s32 fieldMode
where the menu returns to
void(* allocPrimBuffers)(s32 size)
struct Layer *(* createLayer)(RECT *rect, s32 otShift, s32 id)
void(* setDisplayMode)(s32 w, s32 h, s32 hires, s32 interlace)
A drawing layer (GFX.funcs.createLayer): a DRAWENV with a pair of ordering tables,...
void(* setBgColor)()
no prototype: callers would truncate u8 args
Any task, seen through its header.
void(* setState)(struct Task *task, s32 state)
void(* nextSubstate)(struct Task *task)
void(* nextState)(struct Task *task)
Uploads TIM images to VRAM (initTimLoader); acts on TIM_LOADER.
void(* setImagePos)()
(x, y)
void(* loadArchive)()
(archive): each image 64 halfwords to the right
void * createTask(void(*update)(), s32 size, s32 childrenSize)
createTaskWithId for a task nothing needs to find
void initTimLoader(TimLoader *obj)
Clears a TIM loader, gives it its methods and binds it.