39 switch (task->
state) {
48 if (task->
key1 == 0) {
57 if (task->
key2 != 1) {
127 if (command == 0x325 || command == 0x327) {
void FIELDSTG_updateBalloon(Balloon *task)
A balloon's update: it pops open over the player (or another actor), stays while the trigger is on of...
s32 FIELDSTG_stepBalloonAnim(Balloon *task)
Steps a balloon's animation (FIELDSTG_triggerAnims) and returns its frame.
void FIELDSTG_createPlayerBalloon(s32 id)
The balloon over the player: script commands 803 to 806 (FIELDSTG_scriptCommands)
Balloon * FIELDSTG_createBalloon(s32 kind, s32 anim, s32 id)
Creates a balloon of a kind (its sprites) with an animation, under a task id.
void FIELDSTG_balloonCommand(Balloon *task, s32 command, s32 id)
A balloon's script commands: 0x325 and 0x327 put it over the actor id with animation 0 or 1,...
void FIELDSTG_drawBalloon(Balloon *task)
Draws a balloon over its actor: its frame, and once open, its animation.
GfxState GFX
GFX: the graphics state and its 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 FIELD_TASK_ACTOR
every character (FIELDSTG_createActor)
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.
#define SOUND_FUKIDASH
a balloon
FieldState FIELDSTG_state
u8 FIELDSTG_triggerAnims[][9]
FIELDSTG_stepBalloonAnim's animations: (frame, time) pairs up to 0xFF.
FileCache FILE_CACHE
The file cache.
TaskRegistry TASK_REGISTRY
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...
s32 z
how high it is off the ground, in 1/256 pixels (drawn that much higher)
A balloon over an actor's head (FIELDSTG_createBalloon): it pops up, plays its FIELDSTG_triggerAnims ...
s32 frame
into its FIELDSTG_triggerAnims row
void(* nextSubstate)(struct Balloon *task)
void(* nextState)(struct Balloon *task)
s32 popEnd
and closes to here
void(* setState)(struct Balloon *task, s32 state)
Actor * actor
the player when NULL
s32 popStart
the pop-up's sprites, times 4: it opens from here
s32 pop
the pop-up's sprite, times 4
s32 menuOpen
the field menu (START) or the inn (FIELDSTG_openInn) is open: the pad doesn't move the player
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 *(* find)(s32 id, s32 key1, s32 key2)
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.