97 cmd->
handle(task, command, arg);
GfxState GFX
GFX: the graphics state and its methods.
#define FIELD_LAYER_MAP
the map, its objects and characters, and the menus
#define FIELD_TASK_ACTOR
every character (FIELDSTG_createActor)
FIELDSTG.PRO: the field mode, where the player walks around the map.
ScriptCommand FIELDSTG_scriptCommands[]
The script commands (FIELDSTG_findScriptCommand), up to the first id 0.
ScriptTimer FIELDSTG_scriptTimer
Heap HEAP
The functions that return what a call left in v0 (allocMemHigh, findTask) and the ones that take othe...
TaskRegistry TASK_REGISTRY
void FIELDSTG_resetScriptTimer(void)
Stops the scripts' timer.
void FIELDSTG_waitScriptTime(s32 time, s32 *pc)
A script's wait: counts time down, then moves the script on.
void FIELDSTG_handleScriptCommand(s32 task, s32 id, s32 command, s32 arg)
Hands the task of script command id a command and its argument, through the command's handle.
void FIELDSTG_toScreenPos(Vec2 *pos)
Turns a map position into a screen one.
ScriptCommand * FIELDSTG_findScriptCommand(s32 id)
The script command id of FIELDSTG_scriptCommands, or NULL.
void FIELDSTG_waitWalkDone(s32 id, s32 *pc)
A script's wait for the actor id to reach its goal.
void FIELDSTG_clearScriptFlag(void)
A script helper: clears the script flag of character 1, or else of character 2.
s32 FIELDSTG_createScriptCommand(s32 id)
Creates the task of script command id, or returns 0.
Actor * FIELDSTG_findActor(s32 character)
The actor of a character (Actor.key1), or NULL.
void FIELDSTG_waitAnimDone(s32 id, s32 *pc)
A script's wait for the animation of the actor id to end.
A character on the field (FIELDSTG_createActor): the player (kind 0) and the other characters.
s32(* isAnimDone)(struct Actor *)
s32(* isWalking)(struct Actor *)
s32 scriptFlag
cleared by FIELDSTG_clearScriptFlag; nothing in FIELDSTG or the stages reads it
s32(* getFrameTime)(void)
struct Layer *(* getLayer)(s32 id)
void(* zero)(void *ptr, s32 size)
A drawing layer (GFX.funcs.createLayer): a DRAWENV with a pair of ordering tables,...
An entry of the script command table FIELDSTG_scriptCommands (ids from 0x320)
s32(* create)(s32 id)
creates the command's task; FIELDSTG's own return nothing or a Lift, so the table casts them
void(* handle)()
(task, command, arg): each command's task has its own type
void *(* find)(s32 id, s32 key1, s32 key2)