16 switch (task->
state) {
31#define STAGE_CHILDREN_SIZE 4
45#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_08)
46#define STAGE_FILE 0x8E9
47#define STAGE_FILE_8 0x19E
49#define STAGE_TEXT 0x89A
50#define STAGE_FILE 0x8A4
51#define STAGE_FILE_8 0x190
87 switch (task->
state) {
103 if (object->
anim >= 1 && object->
anim <= 3) {
116 for (j = 0; j < 3; j++) {
139 for (k = 0; k < 3; k++) {
168 { 0x200, 0x100, 0x21C, 0x1A6, 0x70, 0xA6, 0x230, 0x1FE },
169 { 0x200, 0x100, 0x200, 0x100, 0, 0, 0x220, 0x1FE },
170 { 0x200, 0x100, 0x216, 0x138, 0x58, 0x38, 0x200, 0x1FD },
171 { 0x200, 0x100, 0x208, 0x1BC, 0x20, 0xBC, 0x210, 0x1FD },
172 { 0x200, 0x100, 0x210, 0x1BC, 0x40, 0xBC, 0x220, 0x1FD },
173 { 0x200, 0x100, 0x200, 0x1BC, 0, 0xBC, 0x230, 0x1FD },
174 { 0x140, 0x100, 0x14A, 0x1B8, 0x28, 0xB8, 0x170, 0x1FE },
175 { 0x140, 0x100, 0x170, 0x1B0, 0xC0, 0xB0, 0x160, 0x1FD },
190 { 0, 1, 0x50, 6, 0x46, 0, 0, 0, 0, 0, 112, 274, 0, 0 },
191 { 1, 0, 0x40, 6, 0x3F, 1, 0x3F, 0x42, 6, 0, 116, 258, 0, 0 },
192 { 1, 0, 0x40, 6, 0x3F, 1, 0x3F, 0x42, 6, 0, 228, 282, 0, 0 },
193 { 1, 0, 0x40, 6, 0x3F, 1, 0x3F, 0x42, 6, 0, 340, 258, 0, 0 },
194 { 1, 0, 0x40, 6, 0x3F, 1, 0x3F, 0x42, 6, 0, 355, 346, 0, 0 },
195 { 0, 2, 0x50, 4, 0x48, 0, 0, 0, 0, 0, 112, 227, 301, 0 },
196 { 0, 3, 0x50, 4, 0x55, 0, 0, 0, 0, 0, 112, 227, 294, 0 },
197 { 1, 0, 0x40, 4, 0x3B, 1, 0x3B, 0x3E, 6, 0, 116, 274, 300, 0 },
198 { 1, 0, 0x40, 4, 0x3B, 1, 0x3B, 0x3E, 6, 0, 228, 298, 324, 0 },
199 { 1, 0, 0x40, 4, 0x3B, 1, 0x3B, 0x3E, 6, 0, 340, 274, 300, 0 },
200 { 1, 0, 0x40, 4, 0x3B, 1, 0x3B, 0x3E, 6, 0, 355, 362, 388, 0 },
201 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
204 { { {
CODES_END, 0 }, {
CODES_END, 0 } },
SLOT_EXIT, 0x273, 0x2DA, 0x17E, 1, 0, 0, 0 },
205 { { {
CODES_END, 0 }, {
CODES_END, 0 } }, 0, 0, 0, 0, 0, 0, 0, 0 },
210#define EVENT_TEXT_FILE EXTRA_TEXT
265 { 70, 4 }, { 71, 4 }, { 70, 4 }, { 71, 4 },
269 { 0x12C, 56 }, { 85, 6 }, { 86, 6 }, { 87, 4 },
270 { 88, 4 }, { 89, 4 }, { 90, 4 }, { 88, 4 },
271 { 89, 4 }, { 90, 4 }, { 88, 4 }, { 89, 4 },
272 { 90, 4 }, { 88, 4 }, { 89, 4 }, { 90, 4 },
273 { 88, 4 }, { 89, 4 }, { 90, 4 }, { 255, 0x3E7 },
276 { 0x12C, 16 }, { 72, 4 }, { 73, 4 }, { 74, 4 },
277 { 73, 4 }, { 75, 6 }, { 76, 6 }, { 77, 14 },
278 { 78, 114 }, { 79, 6 }, { 80, 6 }, { 81, 6 },
279 { 82, 6 }, { 83, 6 }, { 84, 8 }, { 255, 0x3E7 },
GameFlags FLAGS_00
The flag bitset FLAGS_00 and the event functions.
#define TASK_INIT
Tasks: every game object is a task, a heap block that starts with this header and is updated once per...
EventTask * FIELDSTG_startEvent(s32 id)
Starts the event id of FieldState.events: its script, start and end, and its text; the player stands ...
The stage overlays (AAA/PRO/WSTAG###.PRO), loaded at 0x800A4CA4 on top of FIELDSTG.
#define EVENT_TEXT(n)
An entry of the stage's events' text file, for FieldEvent.text.
void updateStage()
The names every stage defines, each its own (config/<version>/stages/<stage>.txt).
#define SCRIPT_WAIT_WALK(id)
until the character gets to its goal
#define SCRIPT_END
The commands of an event script (FieldEvent.script), as FIELDSTG_runEvent reads them: a halfword kind...
#define SCRIPT_LOOK_AT(snap, x, y)
FIELDSTG_pointCamera.
#define SCRIPT_LEAVE(mode, x, y, dir)
FIELDSTG_leaveField; ends the event.
#define SCRIPT_COMMAND(id, command, arg)
the same word for a script command's id: FIELDSTG_setEventPose creates its task if none runs and hand...
#define SCRIPT_FOLLOW(snap, id)
FIELDSTG_followWithCamera.
#define FIELD_MAP_FLOOR0
Some of FieldMap's maps (files): those of the floors the player walks on come first,...
#define SCRIPT_WALK(id, x, y, dir)
Actor.setGoal: walks to (x, y), then faces dir.
#define SCRIPT_WAIT_BOX
until box 0 closes
#define SLOT_EXIT
The kinds of StageSlot (type).
#define SCRIPT_POSE(id, set, dir)
Actor.setPose: its animation set, facing dir.
#define FIELD_MAP_TRIGGERS
a cell's value: a direction (3 bits) and a StageSlot (5)
#define SCRIPT_WAIT(frames)
#define SCRIPT_PLACE(id, x, y)
puts a character at (x, y)
#define SCRIPT_TALK(box, entry, id, kind)
box of the event's boxes shows the event text's entry: a talk box at the corner kind next to the char...
FieldState FIELDSTG_state
#define FLAG(group, id)
The codes of the (code, value) pairs that FLAGS_00 checks as conditions and applies as actions (event...
void resetTileEffect(StageTileEffect *task)
Restarts the three animations of a StageTileEffect, from the stage's updateTileEffectFrames.
SoundState SOUND
rsin and rcos (libgte) read rsin_tbl[a - 0x800] and the like: their addresses before the table fall i...
#define MUSIC_DIGIMON_LAB
ENV_0011: Asuka's Digimon Lab and Login Room.
#define MUSIC_BANK(music)
The sound bank of a music, which a stage loads for it (FieldState.soundBank)
FIELDSTG's start of the stage (StageEntry.init in FIELDSTG_stages): the stage's task,...
s32 stepAnimationOnce(StageTileAnim *obj, AnimFrame *frames, s32 depth)
Steps OBJ's animation through FRAMES by the frame time (at most 4) and returns its frame,...
#define SPECIAL_HEAL_PARTY
the European and Japanese versions, an action: restores the party's HP and MP
Where an actor's frames go in VRAM: one of the records after the FieldImage (Actor....
One frame of a sprite animation; frame 0xFF ends it (or loops it)
A character of the field (FieldState.actors, a list of pointers up to NULL), which FIELDSTG_updateFie...
An event of the table FieldState.events, up to the first id -1, which FIELDSTG_startEvent starts.
void(* setFile)(s32 index, s32 file)
FIELDSTG_setMapFile.
void(* setFirstMap)(s32 index)
FIELDSTG_setFirstMap: the map the player starts on (GAME.mapIndex), when the mode is new.
s32 sheetEntry
the stage's sprite sheet, loaded before the field starts, or 0
FieldEvent * events
up to the first id -1
s32 soundBank
SOUND.loadBank's, or 0.
StageTile * objects
the map objects, up to the first margin 0
s32 imageFile
or an image archive file, or 0
Vec2 start
where the player starts
StageSlot * slots
up to the first type 0
ActorImage * actors
then the actors', from actors[2]
s32 mapFile
the file of the map's tiles (FIELDSTG_createMapStreamer)
s32 startDir
and its direction
s32 textFile
the stage's text file, for the talks
union FieldState::@12 images
s32 music
SOUND.playSound's, or 0.
What a character says (FIELDSTG_runActorAction): the first whose conditions hold, or the last,...
void(* applyAction)(s32 code, s32 value)
s32(* checkCondition)(u16 code, u16 value)
short(* playSound)(s32 id)
returns the voice of a key-on
What the player can trigger on a map (FIELDSTG_updateTriggers): a record of the table at FieldState....
The task a stage starts (startStage), updated by its updateStage.
void(* nextState)(struct StageTask *task)
Three map objects (animations 1 to 3) moved to (x, y) and animated once when the substate is set to 1...
void(* setState)(struct StageTileEffect *task, s32 state)
void(* setSubstate)(struct StageTileEffect *task, s32 substate)
void(* nextState)(struct StageTileEffect *task)
void(* nextStep)(struct StageTileEffect *task)
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 * 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.
void(* stageFuncs[])(void)
The stage's functions (common/start_stage.inc.c calls the first): a StageFuncs in the stages with a t...
void updateTileEffect(StageTileEffect *task)
Moves the map objects with animations 1 to 3 to (x, y) and plays their animations once with a sound,...
AnimFrame * updateTileEffectFrames[]
Defined below, after the code that uses them.
FieldActorEntry * stageActors[]
AnimFrame updateTileEffectFrames_0[]
void * createCommand855(s32 id)
Creates the StageTileEffect of updateTileEffect at (0x150, 0x112) with the given id.
void setupStage(void)
Sets the stage up: its map, actors and events, playing the ambience ENV_0011.
StageTile stageObjects[]
The tables and color setupStage gives FIELDSTG_state (FieldState)
AnimFrame updateTileEffectFrames_2[]
s16 script1600[]
Defined below, after the tables that use them.
AnimFrame updateTileEffectFrames_1[]
void endEvent1600(void)
After event 1600, with the Tour Leader (Digimon Online's practice): heals the party's HP and MP (the ...