11 switch (screen->
state) {
67 if (screen->
step != 0) {
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...
#define TEXT_MEMORY_CARD
MEMCRD.
#define TEXT_AREA_NAMES
STAREA.
#define TEXT_SHOP_NAMES
SHPNAM.
FileCache FILE_CACHE
The file cache.
#define MODE_TITLE
STDWTITL's title screen; its movies follow.
#define SCREEN_LAYER
The layer over the whole screen that most modes create first and draw their menus on (FIELDSTG and ST...
Heap HEAP
The functions that return what a call left in v0 (allocMemHigh, findTask) and the ones that take othe...
MemCardFuncs MEMCARD_FUNCS
STGMCARD.PRO: the memory card screen (MODE_CONTINUE).
ScreenFade * STGMCARD_createFader(void)
#define FILE_GMCARD_SHEET
#define FILE_GMCARD_SPRITES
The sprite archive of the screen.
MemCardSaves * STGMCARD_createSaves(MemCardScreen *screen)
Creates the save list (task) of the main task.
SoundState SOUND
rsin and rcos (libgte) read rsin_tbl[a - 0x800] and the like: their addresses before the table fall i...
#define MUSIC_MEMORY_CARD
BGM_0030: the memory card screen and the player's name entry.
void initSpriteDrawer(SpriteDrawer *obj)
Clears a sprite drawer to neutral (no scale, gray tint, follows the scroll), gives it its methods and...
MemCardScreenFuncs STGMCARD_funcs
STGMCARD's data (data/stgmcard.c)
SaveIcon STGMCARD_saveIcon
MemCardModeEntry STGMCARD_prevModes[]
s32 STGMCARD_places[]
the place a save shows (a string of TEXT_SHOP_NAMES), by the low byte of the game mode: the save poin...
Memory card save header (first CARD_SECTOR_SIZE bytes of a save)
s32(* isLoading)(s32 file)
void(* request)(s32 file)
void *(* getEntry)(u32 fileAndIndex)
void(* requestMode)(s32 mode, s32 arg)
s32 fieldMode
where the menu returns to
void *(* alloc)(s32 size, s32 tag)
void(* zero)(void *ptr, s32 size)
void(* setHeader)(char *title, CardClut *clut, s32 count, void **icons)
u8 area
a string of TEXT_AREA_NAMES
SaveData * dataBuf
the saved part of the game state
s32(* filesLoading)(void)
void(* freeBuffers)(void)
The children of the main task.
struct MemCardSaves * saves
The main task of the screen (STGMCARD_createScreen)
s32 bgScroll
the background's offset, 0 to 95
s32 place
a string of TEXT_SHOP_NAMES (STGMCARD_places)
void(* nextState)(struct MemCardScreen *task)
void(* nextSubstate)(struct MemCardScreen *task)
s32 bgTick
it moves every other frame
s32 area
a string of TEXT_AREA_NAMES, from the previous mode
s32 loading
opened from the title screen: the game mode's argument is not negative (saving: negative)
SaveIconFrame * frames[3]
void(* start)(struct ScreenFade *fade, s32 fadeIn, s32 frames)
TASK_DONE when done.
void(* stopSound)(s32 id)
short(* playSound)(s32 id)
returns the voice of a key-on
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)
Text helpers (initTextTools)
char *(* getString)()
(table, index)
void(* convert)()
(dst, src, mode): font codes <-> Shift-JIS
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 initTextTools(TextTools *obj)
Clears a text tools object, gives it its methods and binds it.
void initTimLoader(TimLoader *obj)
Clears a TIM loader, gives it its methods and binds it.