19#if VERSION_US || VERSION_JP
20#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_02)
21#define EVENT_TEXT_FILE (TEXT_EVENTS_600 - 1)
22#define STAGE_FILE 0x53E
24#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_02)
25#define EVENT_TEXT_FILE (TEXT_EVENTS_600 - 1)
26#define STAGE_FILE 0x54E
144 { 0x200, 0x100, 0x21C, 0x1A6, 0x70, 0xA6, 0x230, 0x1FE },
145 { 0x200, 0x100, 0x200, 0x100, 0, 0, 0x220, 0x1FE },
146 { 0x200, 0x100, 0x216, 0x138, 0x58, 0x38, 0x200, 0x1FD },
147 { 0x200, 0x100, 0x208, 0x1BC, 0x20, 0xBC, 0x210, 0x1FD },
148 { 0x200, 0x100, 0x210, 0x1BC, 0x40, 0xBC, 0x220, 0x1FD },
149 { 0x200, 0x100, 0x200, 0x1BC, 0, 0xBC, 0x230, 0x1FD },
150 { 0x140, 0x100, 0x164, 0x1A7, 0x90, 0xA7, 0x160, 0x1FF },
151 { 0x140, 0x100, 0x150, 0x178, 0x40, 0x78, 0x170, 0x1FF },
152 { 0x140, 0x100, 0x140, 0x18B, 0, 0x8B, 0x160, 0x1FE },
153 { 0x140, 0x100, 0x16C, 0x1A5, 0xB0, 0xA5, 0x170, 0x1FE },
154 { 0x140, 0x100, 0x174, 0x1A5, 0xD0, 0xA5, 0x160, 0x1FD },
155 { 0x140, 0x100, 0x15C, 0x1A7, 0x70, 0xA7, 0x170, 0x1FD },
156 { 0x140, 0x100, 0x14A, 0x1A8, 0x28, 0xA8, 0x160, 0x1FC },
430 { 1, 0, 0x40, 6, 0x32, 2, 0, 7, 0xE, 0, 252, 269, 0, 0 },
431 { 1, 0, 0x40, 6, 0x33, 2, 0, 7, 0xE, 0, 482, 625, 0, 0 },
432 { 1, 0, 0x40, 6, 0x34, 2, 0, 7, 0xE, 0, 195, 353, 0, 0 },
433 { 1, 0, 0x40, 6, 0x34, 2, 0, 7, 0xE, 0, 339, 386, 0, 0 },
434 { 1, 0, 0x40, 6, 0x34, 2, 0, 7, 0xE, 0, 539, 364, 0, 0 },
435 { 1, 0, 0x40, 6, 0x35, 2, 0, 7, 0xE, 0, 366, 485, 0, 0 },
436 { 1, 0, 0x40, 6, 0x36, 2, 0, 7, 0xE, 0, 475, 430, 0, 0 },
437 { 1, 0, 0x40, 6, 0x37, 2, 0, 0xB, 0xA, 0, 164, 326, 0, 0 },
438 { 1, 0, 0x40, 6, 0x38, 2, 0, 0xB, 0xA, 0, 164, 354, 0, 0 },
439 { 1, 0, 0x40, 6, 0x39, 2, 0, 0xB, 0xA, 0, 508, 337, 0, 0 },
440 { 1, 0, 0x40, 6, 0x3A, 2, 0, 0xB, 0xA, 0, 512, 364, 0, 0 },
441 { 1, 0, 0x40, 6, 0x3B, 2, 0, 0xB, 0xA, 0, 568, 388, 0, 0 },
442 { 1, 0, 0x40, 6, 0x3C, 2, 0, 0xB, 0xA, 0, 481, 426, 0, 0 },
443 { 1, 0, 0x40, 6, 0x3D, 2, 0, 0xB, 0xA, 0, 453, 432, 0, 0 },
444 { 1, 0, 0x40, 6, 0x3E, 2, 0, 0xB, 0xA, 0, 346, 480, 0, 0 },
445 { 1, 0, 0x40, 6, 0x3F, 2, 0, 0xB, 0xA, 0, 342, 488, 0, 0 },
446 { 1, 0, 0x40, 4, 0, 0, 0, 0, 0, 0, 311, 96, 151, 0 },
447 { 1, 0, 0x40, 4, 1, 0, 0, 0, 0, 0, 318, 579, 600, 0 },
448 { 1, 0, 0x40, 4, 2, 0, 0, 0, 0, 0, 335, 572, 595, 0 },
449 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
452 { { {
CODES_END, 0 }, {
CODES_END, 0 } },
SLOT_EXIT, 0x25C, 0xA8, 0x1B4, 5, 0, 0, 0 },
453 { { {
CODES_END, 0 }, {
CODES_END, 0 } },
SLOT_EXIT, 0x25A, 0x298, 0x104, 7, 0, 0, 0 },
454 { { {
CODES_END, 0 }, {
CODES_END, 0 } },
SLOT_CLIMB_DOWN, 4, 0xFD, 0xD0, 0, 0, 0, 0 },
455 { { {
CODES_END, 0 }, {
CODES_END, 0 } },
SLOT_CLIMB_UP, 4, 0xEC, 0x118, 0, 0, 0, 0 },
456 { { {
CODES_END, 0 }, {
CODES_END, 0 } },
SLOT_CLIMB_DOWN, 8, 0x133, 0xC8, 0, 0, 0, 0 },
457 { { {
CODES_END, 0 }, {
CODES_END, 0 } },
SLOT_CLIMB_UP, 8, 0x142, 0x150, 0, 0, 0, 0 },
458 { { {
CODES_END, 0 }, {
CODES_END, 0 } },
SLOT_CLIMB_DOWN, 4, 0x192, 0x148, 0, 0, 0, 0 },
459 { { {
CODES_END, 0 }, {
CODES_END, 0 } },
SLOT_CLIMB_UP, 4, 0x1A2, 0x190, 0, 0, 0, 0 },
460 { { {
CODES_END, 0 }, {
CODES_END, 0 } },
SLOT_CLIMB_DOWN, 4, 0x1C2, 0x1A0, 0, 0, 0, 0 },
461 { { {
CODES_END, 0 }, {
CODES_END, 0 } },
SLOT_CLIMB_UP, 4, 0x1D2, 0x1E8, 0, 0, 0, 0 },
462 { { {
CODES_END, 0 }, {
CODES_END, 0 } },
SLOT_CLIMB_DOWN, 4, 0x25C, 0x160, 0, 0, 0, 0 },
463 { { {
CODES_END, 0 }, {
CODES_END, 0 } },
SLOT_CLIMB_UP, 4, 0x24C, 0x1A8, 0, 0, 0, 0 },
464 { { {
CODES_END, 0 }, {
CODES_END, 0 } },
SLOT_CLIMB_DOWN, 4, 0x1AC, 0x228, 0, 0, 0, 0 },
465 { { {
CODES_END, 0 }, {
CODES_END, 0 } },
SLOT_CLIMB_UP, 4, 0x19C, 0x270, 0, 0, 0, 0 },
466 { { {
CODES_END, 0 }, {
CODES_END, 0 } },
SLOT_DROP, 5, 0, 0, 0, 0, 0, 0 },
467 { { {
CODES_END, 0 }, {
CODES_END, 0 } },
SLOT_DROP, 9, 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.
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.
#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 FIELD_COMMAND_PLAY_SAVEDEMO
#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_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 START_EVENT(index)
action: FIELDSTG_startListedEvent
#define EVENT_BATTLE(id)
action: FIELDSTG_battleFuncs.startEventBattle
#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 CARD(id)
a card: the player has one, or gets or loses one
#define FLAG(group, id)
The codes of the (code, value) pairs that FLAGS_00 checks as conditions and applies as actions (event...
#define PARTY_STAT(id)
checkPartyStat
#define CARD_BATTLE(opponent, kind)
action: startCardBattle
#define MUSIC_MIRAGE_HALL
BGM_0020: the Mirage Hall and Mirage Room.
#define MUSIC_CITY_CRISIS
BGM_0029: the cities and their streets instead of their music while the story is at a crisis (Knightm...
#define MUSIC(bank, n)
A field's or a battle's music (FieldState.music, Battle.music): track (SEP) n of the first sequence o...
#define MUSIC_BATTLE_1
BATL1000: the Digimon Arena's battles and some event battles (AreaBattle)
#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,...
@ STORY_BYAKKO_BADGE
WSTAG655 (Mirage Room), event 431: HiAndromon guards the way to Numemon (the Byakko Badge)
@ STORY_PRESIDENT_ARRESTED
WSTAG226 (Login Room, Amaterasu City), event 935, after the President of MAGAMI gives himself up (WST...
@ STORY_GUNSLINGER
WSTAG810 (Gunslinger 1F), event 1035.
@ STORY_NUMEMON_FOUND
WSTAG685 (Underground Cave, Byakko City), event 413: the rock blocking the hole is Numemon.
@ STORY_KNIGHTMON_REPROGRAMMED
WSTAG210 (Main Lobby, Asuka City), event 685: the A.o.A have reprogrammed Knightmon,...
@ STORY_LISA_SAVED
WSTAG605 (Operation Room), event 511: the player saves Lisa from WaruMonzaemon (the Rusty Rifle)
@ STORY_ASUKA_HEADQUARTERS
WSTAG310 (A.o.A Headquarters, Asuka City), event 961.
@ STORY_DE_SINCERITY
WSTAG460 (Reliability Spot), event 370: the Qing Long Chief, asked for the Digi-Egg of Knowledge,...
#define SPECIAL_STORY_ASUKA_HEADQUARTERS_TO_OPERATION_SIGMA
GAME.progress is from STORY_ASUKA_HEADQUARTERS to STORY_OPERATION_SIGMA (PROGRESS_RANGES[0x13])
#define SPECIAL_STORY_GENJI_BEATEN_TO_PRESIDENT_ARRESTED
GAME.progress is from STORY_GENJI_BEATEN to STORY_PRESIDENT_ARRESTED (PROGRESS_RANGES[0x1A])
#define SPECIAL_STORY_KNIGHTMON_REPROGRAMMED_TO_AMATERASU_BRIDGE
GAME.progress is from STORY_KNIGHTMON_REPROGRAMMED to STORY_AMATERASU_BRIDGE (PROGRESS_RANGES[4])
#define FLAG_CARD_BATTLE_WON
set by updateModeFlags on the way back from a card battle: 1 if the player won it (FLAGS_00....
#define SPECIAL_STORY_GENJI_BEATEN_TO_GAME_MASTER_CAUGHT
GAME.progress is from STORY_GENJI_BEATEN to STORY_GAME_MASTER_CAUGHT (PROGRESS_RANGES[1])
#define FLAG_CARD_BATTLE_ENDED
set by updateModeFlags on the way back from a card battle; the talks that follow one test it and clea...
#define SPECIAL_SHOW_ITEM_GET_ICON
an action: the player's icon plays its animation 3 with SOUND_ITEM_GET (FIELD_COMMAND_ICON3); the tal...
#define FLAG_NAKANO_FOUGHT
wstag650 (Mirage Hall): Tamer Nakano says "Oh - your Digimon look interesting.
#define SPECIAL_STORY_GENJI_BEATEN_TO_MOVIE_BATTLES
GAME.progress is from STORY_GENJI_BEATEN to 0x2C (PROGRESS_RANGES[2]); nothing sets 0x2C,...
#define SPECIAL_STORY_BYAKKO_LEADER_FOUGHT_TO_CONTROL_ROOM
GAME.progress is from STORY_BYAKKO_LEADER_FOUGHT to STORY_CONTROL_ROOM (PROGRESS_RANGES[0x10])
#define SPECIAL_STORY_SINCE_GENJI_BEATEN
GAME.progress is STORY_GENJI_BEATEN or later (PROGRESS_RANGES[6], to 0x63)
Where an actor's frames go in VRAM: one of the records after the FieldImage (Actor....
A battle of an area's BattleList, which can start on the field (see FIELDSTG_startEncounter); FIGHTST...
The battles of an area of the map (its cells' value at FieldMap.files[4]), one picked at random.
A character of the field (FieldState.actors, a list of pointers up to NULL), which FIELDSTG_updateFie...
The battles of a place (FieldState.battles), by area of the map: the fourth area's are also the ones ...
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)
What the player can trigger on a map (FIELDSTG_updateTriggers): a record of the table at FieldState....
An object of a map, which FIELDSTG draws: a record of the table at FieldState.objects,...
void(* stageFuncs[])(void)
The stage's functions (common/start_stage.inc.c calls the first): a StageFuncs in the stages with a t...
u16 actor17Talk3Actions[]
u16 actor13Talk2Conditions[]
u16 actor20Talk1Conditions[]
u16 actor18Talk2Actions[]
u16 actor16Talk2Conditions[]
void endEvent1458(void)
After event 1458, with Guardromon: applies 0x7C15, an action that does nothing (applyAction's mode ch...
u16 actor18Talk1Actions[]
u16 actor15Talk2Conditions[]
FieldActorEntry * stageActors[]
u16 actor17Talk2Conditions[]
u16 actor17Talk1Conditions[]
u16 actor18Talk1Conditions[]
u16 actor16Talk0Actions[]
u16 actor17Talk0Conditions[]
u16 actor13Talk0Conditions[]
u16 actor14Talk1Actions[]
u16 actor20Talk2Actions[]
u16 actor15Talk1Conditions[]
u16 actor14Talk1Conditions[]
void setupStage(void)
Sets the stage up: its map, actors, battles and events, playing BGM_0020; BGM_0029 instead at story s...
u16 actor20Talk2Conditions[]
u16 actor13Talk0Actions[]
u16 actor17Talk3Conditions[]
StageTile stageObjects[]
The tables and color setupStage gives FIELDSTG_state (FieldState)
u16 actor16Talk1Conditions[]
u16 actor15Talk2Actions[]
u16 actor18Talk3Conditions[]
u16 actor17Talk1Actions[]
u16 actor16Talk2Actions[]
u16 actor14Talk2Actions[]
u16 actor16Talk0Conditions[]
u16 actor17Talk0Actions[]
u16 actor18Talk3Actions[]
u16 actor18Talk2Conditions[]
u16 actor13Talk1Conditions[]
u16 actor20Talk0Conditions[]
u16 actor14Talk2Conditions[]
u16 actor15Talk0Conditions[]
u16 actor15Talk0Actions[]
u16 actor18Talk0Conditions[]
FieldBattles stageBattles[]
u16 actor13Talk2Actions[]
u16 actor14Talk0Conditions[]