8 return rsin(angle >> 2) * radius / 4096;
24 if (task->
dist.
x < 0) {
30 if (task->
dist.
y < 0) {
81 switch (task->
state) {
97 if (dx + dy * 2 < best) {
101 near.
y = found->
key2;
116 switch (task->
step) {
130 switch (task->
step) {
GfxState GFX
GFX: the graphics state and its methods.
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...
void FIELDSTG_resumePartners(void)
Makes the partners follow the player again (FIELDSTG_followLeader)
void FIELDSTG_haltPartners(void)
Makes the partners stop following: each walks out the rest of its trail (FIELDSTG_drainTrail)
#define FIELD_TASK_LAUNCHER
a stage's launchers (FIELDSTG_runLaunch)
FIELDSTG.PRO: the field mode, where the player walks around the map.
FieldState FIELDSTG_state
s32 FIELDSTG_scaleSin(s32 angle, s32 radius)
radius times the sine of angle
Launch * FIELDSTG_createLaunch(Actor *actor, SlotDest *dest)
Creates the flight of an actor to the tile at dest; two stages' modes (0x26C, 0x2D4) set theirs up.
void FIELDSTG_runLaunch(Launch *task)
Sends an actor from the nearest FIELD_TASK_LAUNCHER (y counts twice in the distance) to its dest tile...
static void flyToDest(Launch *task)
The flight: the distances to the destination taken once, then the player moved along them on a sine c...
TaskRegistry TASK_REGISTRY
SoundState SOUND
rsin and rcos (libgte) read rsin_tbl[a - 0x800] and the like: their addresses before the table fall i...
#define SOUND_TELEPORT
TELEPORT.
The stage overlays' symbols that FIELDSTG links against (the Makefile's CHILDREN_fieldstg): each stag...
void * WSTAG746_startEvent8000(void)
void * WSTAG745_startEvent8000(void)
A character on the field (FIELDSTG_createActor): the player (kind 0) and the other characters.
void(* setGoal)(struct Actor *, s32, s32, s32)
s32(* isWalking)(struct Actor *)
void(* resetControl)(struct Actor *)
s32 hasShadow
drawn with a shadow
s32 busy
an event, a warp, a launch or a battle has the player
s32(* getFrameTime)(void)
Launches an actor, spinning, from the nearest launcher (FIELD_TASK_LAUNCHER) to a tile (FIELDSTG_crea...
void(* nextStep)(struct Launch *task)
void(* nextState)(struct Launch *task)
void(* nextSubstate)(struct Launch *task)
SlotDest * dest
the tile it lands on
Task * from
the nearest FIELD_TASK_LAUNCHER
void(* setState)(struct Launch *task, s32 state)
Where a slot leads: a StageSlot from its arg on, as the warps (FieldTask.warp) and the launches (Laun...
short(* playSound)(s32 id)
returns the voice of a key-on
void *(* find)(s32 id, s32 key1, s32 key2)
Any task, seen through its header.
void(* setState)(struct Task *task, s32 state)
void * createTask(void(*update)(), s32 size, s32 childrenSize)
createTaskWithId for a task nothing needs to find