13 switch (task->
state) {
18 switch (object->
anim) {
20 task->
tiles[1] = object;
21 task->
homeY[1] =
object->y;
28 task->
tiles[0] = object;
29 task->
homeY[0] =
object->y;
42 tile0 = task->
tiles[0];
43 tile1 = task->
tiles[1];
50 task->
y[0] = tile0->
y;
51 task->
y[1] = tile1->
y;
58 if (task->
timer >= 0x1E) {
68 tile0->
y = task->
y[0] + d;
69 tile1->
y = task->
y[1] + d;
78 if (++task->
shake >= 0xFE) {
84 tile0->
y = task->
homeY[0] - 0x7F;
85 tile1->
y = task->
homeY[1] - 0x7F;
88 task->
y[0] = tile0->
y;
89 task->
y[1] = tile1->
y;
93 }
else if (task->
shake & 1) {
97 player->
pos.
y += 0x100;
101 player->
pos.
y -= 0x100;
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_TASK_ACTOR
every character (FIELDSTG_createActor)
FieldState FIELDSTG_state
TaskRegistry TASK_REGISTRY
SoundState SOUND
rsin and rcos (libgte) read rsin_tbl[a - 0x800] and the like: their addresses before the table fall i...
A character on the field (FIELDSTG_createActor): the player (kind 0) and the other characters.
StageTile * objects
the map objects, up to the first margin 0
s32(* getFrameTime)(void)
void(* setState)(struct Lift *task, s32 state)
void(* nextSubstate)(struct Lift *task)
s16 y[2]
the objects' y when the move started
s16 raised
the objects are 0x7F up from their place, and the next move takes them down (LIFT_DOWN; flag 0x1C3D a...
s16 shake
the step of the shake table, then a frame count
StageTile * tiles[2]
the map objects 3 and 2
void(* nextState)(struct Lift *task)
s16 homeY[2]
the objects' place on the map
short(* playSound)(s32 id)
returns the voice of a key-on
An object of a map, which FIELDSTG draws: a record of the table at FieldState.objects,...
u8 anim
which of a stage's animations sets frame (1-3); FIELDSTG finds objects by it (its lift,...
void *(* find)(s32 id, s32 key1, s32 key2)
void updateTileLift(Lift *task)
The lift: moves the map objects of animations 3 and 2 (shown only while it moves) and the player 0x7F...
s16 tileLiftShake[]
Defined below, after the code that uses them.