15 switch (task->
state) {
21 if (task->
step == 0) {
38 if (anim[step][1] < time) {
39 time -= anim[step][1];
41 if (anim[step][0] == 0xFF) {
44 task->
frame = anim[step][0];
void FIELDSTG_updateActorIcon(ActorIcon *task)
The icon over the player's head: plays the animation of its substate (FIELDSTG_iconAnims) and follows...
ActorIcon * FIELDSTG_createActorIcon(Actor *actor)
Creates the player's icon, in the modes before MODE_NEW_GAME only.
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...
#define FIELD_LAYER_MAP
the map, its objects and characters, and the menus
#define ACTOR_CLIMB_OFF_TOP
#define ACTOR_GET_OVER_EDGE
onto the wall from above (FIELDSTG_startClimbDown)
#define FIELD_TASK_ICON
the icon over the player's head
FIELDSTG.PRO: the field mode, where the player walks around the map.
#define FIELD_SPRITES_X
Where the field keeps its textures in VRAM: the two images of FIELD_SPRITES_FILE (its entries 2 and 3...
#define FIELD_SPRITES_FILE
The field's effect sprites (FIELDSTG_drawSpotEffect): the discs number their files differently.
IconOffset FIELDSTG_iconPath[]
up to (0, 0)
u8(*[] FIELDSTG_iconAnims)[2]
FIELDSTG_updateActorIcon's animation of each substate.
s32 FIELDSTG_iconPathStep
the step in FIELDSTG_iconPath
FileCache FILE_CACHE
The file cache.
#define MODE_NEW_GAME
Game modes (GameState: mode >> 8 is the overlay) that more than their own overlay asks for.
SoundState SOUND
rsin and rcos (libgte) read rsin_tbl[a - 0x800] and the like: their addresses before the table fall i...
void initSpriteDrawer(SpriteDrawer *obj)
Clears a sprite drawer to neutral (no scale, gray tint, follows the scroll), gives it its methods and...
The player's icon (FIELD_TASK_ICON, FIELDSTG_createActorIcon): the field commands FIELD_COMMAND_ICON1...
void(* nextStep)(struct ActorIcon *task)
u8(* anim)[2]
(frame, time) pairs; 0xFF loops to a step
void(* nextState)(struct ActorIcon *task)
A character on the field (FIELDSTG_createActor): the player (kind 0) and the other characters.
s32 climbSide
a climb shifts it a tile right (1) or left (0)
void *(* getEntry)(u32 fileAndIndex)
s32(* getFrameTime)(void)
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)
void * createTaskWithId(void(*update)(), s32 size, s32 childrenSize, s32 id)
Allocates a zeroed task of size bytes (header included) with room for childrenSize / 4 child tasks.