10 switch (task->
state) {
34#define STAGE_CHILDREN_SIZE 4
51#if VERSION_US || VERSION_JP
52#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_06)
53#define EVENT_TEXT_FILE (TEXT_EVENTS_400 - 1)
54#define STAGE_FILE 0x223
55#define STAGE_ARCHIVE 0x3CA
57#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_06)
58#define EVENT_TEXT_FILE (TEXT_EVENTS_400 - 1)
59#define STAGE_FILE 0x232
60#define STAGE_ARCHIVE 0x3DA
328 { 0x200, 0x100, 0x21C, 0x1A6, 0x70, 0xA6, 0x230, 0x1FE },
329 { 0x200, 0x100, 0x200, 0x100, 0, 0, 0x220, 0x1FE },
330 { 0x200, 0x100, 0x216, 0x138, 0x58, 0x38, 0x200, 0x1FD },
331 { 0x200, 0x100, 0x208, 0x1BC, 0x20, 0xBC, 0x210, 0x1FD },
332 { 0x200, 0x100, 0x210, 0x1BC, 0x40, 0xBC, 0x220, 0x1FD },
333 { 0x200, 0x100, 0x200, 0x1BC, 0, 0xBC, 0x230, 0x1FD },
334 { 0x140, 0x100, 0x14C, 0x100, 0x30, 0, 0x150, 0x1FF },
335 { 0x140, 0x100, 0x140, 0x100, 0, 0, 0x160, 0x1FF },
336 { 0x140, 0x100, 0x154, 0x100, 0x50, 0, 0x170, 0x1FF },
337 { 0x140, 0x100, 0x15C, 0x100, 0x70, 0, 0x140, 0x1FE },
459 { 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x37, 0xA, 0, 216, 262, 0, 0 },
460 { 1, 0, 0x40, 6, 0x38, 1, 0x38, 0x3D, 0xA, 0, 72, 170, 0, 0 },
461 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x43, 0xA, 0, 348, 225, 0, 0 },
462 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x43, 0xA, 0, 355, 229, 0, 0 },
463 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
466 { { {
CODES_END, 0 }, {
CODES_END, 0 } },
SLOT_EXIT, 0x237, 0x412, 0x1A4, 1, 0, 0, 0 },
467 { { {
PROGRESS(
STORY_SOUTH_STATION_GHOST), 1 }, {
CODES_END, 0 } },
SLOT_EVENT, 0xA0, 0, 0, 0, 0, 0, 0 },
468 { { {
CODES_END, 0 }, {
CODES_END, 0 } }, 0, 0, 0, 0, 0, 0, 0, 0 },
GameFlags FLAGS_00
The flag bitset FLAGS_00 and the event functions.
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...
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 FIELD_COMMAND_HALT_PARTNERS
The field commands, which an event script hands FIELD_TASK_COMMANDS as the first argument of a pose c...
#define SCRIPT_END
The commands of an event script (FieldEvent.script), as FIELDSTG_runEvent reads them: a halfword kind...
#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 FIELD_COMMAND_ICON3
its substate 3, with ITEM_GET
#define FIELD_COMMAND_PLAY_MASK_SET
#define SLOT_EVENT
starts the event arg
#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_WAIT_ANIM(id)
until its animation ends
#define FIELD_TASK_COMMANDS
script command 813 (FIELDSTG_startCommandTask): the field commands
#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 ITEM(kind, id)
an item, in the bag or equipped; kind (bits 9-11) isn't read, and the scripts set it after the item's...
#define PROGRESS(n)
GAME.progress is n.
#define MUSIC_SHAMAN_HOUSE
BGM_0013: the Shaman House.
#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,...
#define FLAG_SINCERITY_SYMBOL_FOUND
wstag455 Bios Swamp: "There it is! The Symbol of Sincerity!" behind a wall; then Sepikmon advises ask...
#define SPECIAL_STORY_JUNGLE_SOUND_TO_AMATERASU_BRIDGE
GAME.progress is from STORY_JUNGLE_SOUND to STORY_AMATERASU_BRIDGE (PROGRESS_RANGES[0x12])
@ STORY_PRESIDENT_ARRESTED
WSTAG226 (Login Room, Amaterasu City), event 935, after the President of MAGAMI gives himself up (WST...
@ STORY_BULBMON_FOUND
WSTAG520 (Suzaku Hall), event 695: another earthquake; Bulbmon digs the holes.
@ STORY_AGUMON_SUITS
WSTAG380 (Divermon's Lake), event 205: the Mischievous Mat, caught in his Etemon Suit,...
@ STORY_SEPIKMON_MASK_LOST
WSTAG480 (Jungle Grave), event 171: Sepikmon will say how to beat Zanbamon once the player finds his ...
@ STORY_ZANBAMON_DRIVEN_OFF
WSTAG475 (Shaman House), event 230: the Smelly Herb drives Zanbamon off the way.
@ STORY_KNIGHTMON_REPROGRAMMED
WSTAG210 (Main Lobby, Asuka City), event 685: the A.o.A have reprogrammed Knightmon,...
@ STORY_TEDDY_FOUND
WSTAG212, event 352: Teddy is found; MAGAMI is part of the A.o.A, and the player sets off to beat the...
@ STORY_LOOKING_FOR_TEDDY
WSTAG212, event 273: Kail and the player will put on the Agumon Suits to look for Teddy.
@ STORY_SOUTH_STATION_GHOST
WSTAG440 (South Station), event 152: a ghost's voice in the empty station.
@ STORY_MOVIE_BATTLES
WSTAG820, event 1080, with Snatchmon: each encounter plays MODE_BATTLE_MOVIE first.
@ STORY_CODE_PASSES_NEEDED
WSTAG685, event 690: Leader Chuck says stopping Knightmon takes the four City Leaders' Code Passes.
#define SPECIAL_STORY_ASUKA_HEADQUARTERS_TO_OPERATION_SIGMA
GAME.progress is from STORY_ASUKA_HEADQUARTERS to STORY_OPERATION_SIGMA (PROGRESS_RANGES[0x13])
#define FLAG_SWAMP_INN_SEPIKMON_HINT_TALKED
wstag470 Swamp Inn: Gatomon says Sepikmon of the Shaman House could stop Zanbamon but is missing; let...
#define SPECIAL_STORY_DE_SINCERITY_TO_LISA_SAVED
GAME.progress is from STORY_DE_SINCERITY to STORY_LISA_SAVED (PROGRESS_RANGES[0xF])
#define FLAG_SEPIKMON_BOMB_HINT_TALKED
wstag475 Shaman House: Sepikmon says to ask his friend Baronmon about bombs; Baronmon then talks abou...
#define FLAG_SEPIKMON_LOST_MASK_SEEN
wstag475 Shaman House event 180: the player meets maskless Sepikmon ("A monster!"),...
#define FLAG_BARONMON_CHANGE_ACCOUNT_TALKED
wstag475 Shaman House: Baronmon announces his "Change Account" art for renaming Digimon once; later t...
#define FLAG_BRIDGE_SEPIKMON_TALKED
wstag205 Asuka Bridge: a "Sepikmon" boasts he found his mask and won't help; then Etemon says Sepikmo...
#define SPECIAL_STORY_SINCE_DE_SINCERITY
GAME.progress is STORY_DE_SINCERITY or later (PROGRESS_RANGES[0xC], to 0x63)
#define SPECIAL_STORY_BYAKKO_LEADER_FOUGHT_TO_CONTROL_ROOM
GAME.progress is from STORY_BYAKKO_LEADER_FOUGHT to STORY_CONTROL_ROOM (PROGRESS_RANGES[0x10])
Where an actor's frames go in VRAM: one of the records after the FieldImage (Actor....
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)
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)
An object of a map, which FIELDSTG draws: a record of the table at FieldState.objects,...
void endEvent230(void)
After event 230, with Sepikmon: moves the story on to STORY_ZANBAMON_DRIVEN_OFF and gives the player ...
void(* stageFuncs[])(void)
The stage's functions (common/start_stage.inc.c calls the first): a StageFuncs in the stages with a t...
u16 actor0Talk0Conditions[]
u16 actor8Talk1Conditions[]
u16 actor0Talk1Conditions[]
u16 actor8Talk2Conditions[]
FieldActorEntry * stageActors[]
void setupStage(void)
Sets the stage up: its map, actors and events, playing BGM_0013.
StageTile stageObjects[]
The tables and color setupStage gives FIELDSTG_state (FieldState)
void endEvent180(void)
After event 180, with Voice and Sepikmon: keeps it from playing again.
u16 actor8Talk0Conditions[]