17 switch (task->
state) {
22 for (i = 0; i < 2; i++) {
39 for (j = 0; j < 2; j++) {
79 for (k = 0; k < 2; k++) {
113#define ASK_CHOICE(n) \
114 void *FIELDSTG_askChoice##n(void) { \
115 ChoiceTask *task = createTask(FIELDSTG_runChoice, sizeof(ChoiceTask), sizeof(ChoiceChildren)); \
#define TASK_INIT
Tasks: every game object is a task, a heap block that starts with this header and is updated once per...
Cursor * createCursor(s16 layerId, s32 depth, s16 x, s16 y)
A menu cursor on a layer at (x, y)
EventTask * FIELDSTG_startEvent(s32 id)
Starts the event id of FieldState.events: its script, start and end, and its text; the player stands ...
void FIELDSTG_runChoice(ChoiceTask *task, ChoiceChildren *children)
A yes/no question of the story (FIELDSTG_askChoice0 to FIELDSTG_askChoice15 make one per type): asks ...
#define ASK_CHOICE(n)
Asks question n of FIELDSTG_choices: the start of the FieldEvent before the events of its answers (FI...
#define FIELD_LAYER_MAP
the map, its objects and characters, and the menus
FIELDSTG.PRO: the field mode, where the player walks around the map.
#define FIELD_MENU_SPRITES_X
the executable's FILE_MENU_SPRITES
s32(* FIELDSTG_tweenUpdate)(PanelAnim *tween)
FIELDSTG_updateTween.
ChoiceText FIELDSTG_choices[16]
void(* FIELDSTG_tweenStart)(PanelAnim *tween, s32 in)
FIELDSTG_startTween.
#define FILE_MENU_SPRITES
Files the engine loads by number.
FileCache FILE_CACHE
The file cache.
#define PAD_PRESSED(button)
One button of pad 1: newly pressed, auto-repeated while held, or held.
#define PAD_REPEATED(button)
SoundState SOUND
rsin and rcos (libgte) read rsin_tbl[a - 0x800] and the like: their addresses before the table fall i...
#define SOUND_SELECT
Sounds the overlays share, with SOUNDTST's names.
#define SOUND_CURSOR
SYSTEM02: a cursor moves.
void initSpriteDrawer(SpriteDrawer *obj)
Clears a sprite drawer to neutral (no scale, gray tint, follows the scroll), gives it its methods and...
The children of a yes/no question at the bottom of the screen: FIELDSTG's ChoiceTask and the stages' ...
struct EventTask * event
the answer's (FIELDSTG_startEvent)
A yes/no question of the story (FIELDSTG_runChoice); its children are a ChoiceChildren (field_map....
s32 type
FIELDSTG_choices's.
PanelAnim tween
the panel's width
void(* nextState)(struct ChoiceTask *task)
s32 text
the file counted from TEXT_FILE(1) << 16 | its entry: the question, then the answers
s16 events[2]
FIELDSTG_startEvent's, for each answer.
void(* setPos)()
(cursor, x, y)
void(* setVisible)()
(cursor, visible)
void *(* getEntry)(u32 fileAndIndex)
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(* setScale)()
(x, y, z), ONE = 1.0
void(* setLayerId)()
(id, depth)
void(* setFollowScroll)()
(on)
void(* draw)()
(sheet, frame, x, y)
void(* setTexture)()
(x, y)
void(* setVisible)(struct TextWindow *obj, u8 arg)
TextWindow * createTextWindow(s16 layerId, s16 style, s16 x, s16 y)
A text window on a layer, in a font style, at (x, y)