9#define STAGE_CHILDREN_SIZE 4
12#if VERSION_US || VERSION_JP
13#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_05)
14#define EVENT_TEXT_FILE (TEXT_EVENTS_200 - 1)
15#define STAGE_FILE 0x199
16#define STAGE_ARCHIVE 0x314
18#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_05)
19#define EVENT_TEXT_FILE (TEXT_EVENTS_200 - 1)
20#define STAGE_FILE 0x1A7
21#define STAGE_ARCHIVE 0x323
92 { 0x200, 0x100, 0x21C, 0x1A6, 0x70, 0xA6, 0x230, 0x1FE },
93 { 0x200, 0x100, 0x200, 0x100, 0, 0, 0x220, 0x1FE },
94 { 0x200, 0x100, 0x216, 0x138, 0x58, 0x38, 0x200, 0x1FD },
95 { 0x200, 0x100, 0x208, 0x1BC, 0x20, 0xBC, 0x210, 0x1FD },
96 { 0x200, 0x100, 0x210, 0x1BC, 0x40, 0xBC, 0x220, 0x1FD },
97 { 0x200, 0x100, 0x200, 0x1BC, 0, 0xBC, 0x230, 0x1FD },
98 { 0x1C0, 0x100, 0x1F4, 0x140, 0x2D0, 0x40, 0x150, 0x1FF },
99 { 0x140, 0x100, 0x162, 0x1DC, 0x88, 0xDC, 0x160, 0x1FF },
100 { 0x1C0, 0x100, 0x1CE, 0x1A4, 0x238, 0xA4, 0x170, 0x1FF },
101 { 0x140, 0x100, 0x178, 0x100, 0xE0, 0, 0x150, 0x1FE },
102 { 0x1C0, 0x100, 0x1D6, 0x1A9, 0x258, 0xA9, 0x160, 0x1FE },
103 { 0x140, 0x100, 0x174, 0x1DC, 0xD0, 0xDC, 0x170, 0x1FE },
104 { 0x1C0, 0x100, 0x1C0, 0x1AE, 0x200, 0xAE, 0x140, 0x1FD },
105 { 0x1C0, 0x100, 0x1E6, 0x1AF, 0x298, 0xAF, 0x150, 0x1FD },
106 { 0x1C0, 0x100, 0x1EE, 0x1AF, 0x2B8, 0xAF, 0x160, 0x1FD },
107 { 0x140, 0x100, 0x178, 0x120, 0xE0, 0x20, 0x170, 0x1FD },
108 { 0x1C0, 0x100, 0x1DE, 0x1A9, 0x278, 0xA9, 0x140, 0x1FC },
1248 { 1, 0, 0x40, 2, 0x11, 2, 0, 1, 4, 0, 384, 79, 0, 0 },
1249 { 1, 0, 0x40, 2, 0x11, 2, 0, 1, 4, 0, 492, 137, 0, 0 },
1250 { 1, 0, 0x40, 2, 0x11, 2, 0, 1, 4, 0, 548, 165, 0, 0 },
1251 { 1, 0, 0x40, 6, 3, 1, 3, 8, 4, 0, 485, 145, 0, 0 },
1252 { 1, 0, 0x40, 6, 9, 1, 9, 0xE, 4, 0, 541, 172, 0, 0 },
1253 { 1, 0x64, 0x40, 6, 0x12, 0, 0, 0, 0, 0, 304, 99, 0, 0 },
1254 { 1, 0x65, 0x40, 6, 0x13, 0, 0, 0, 0, 0, 64, 285, 0, 0 },
1255 { 1, 0, 0xA0, 4, 0, 0, 0, 0, 0, 0, 144, 257, 380, 0 },
1256 { 1, 0, 0xA0, 4, 1, 0, 0, 0, 0, 0, 256, 257, 337, 0 },
1257 { 1, 0, 0xA0, 4, 2, 0, 0, 0, 0, 0, 384, 261, 287, 0 },
1258 { 1, 0, 0x60, 4, 0xF, 0, 0, 0, 0, 0, 240, 73, 150, 0 },
1259 { 1, 0, 0x60, 4, 0x10, 0, 0, 0, 0, 0, 0, 255, 335, 0 },
1260 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1263 { { {
CODES_END, 0 }, {
CODES_END, 0 } },
SLOT_EXIT, 0x200, 0x1E0, 0x1DA, 7, 0, 0, 0 },
1264 { { {
CODES_END, 0 }, {
CODES_END, 0 } },
SLOT_EXIT, 0x200, 0x240, 0x1AA, 7, 0, 0, 0 },
1265 { { {
CODES_END, 0 }, {
CODES_END, 0 } },
SLOT_EXIT, 0x20E, 0x218, 0xE4, 3, 0x64, 0, 0 },
1266 { { {
CODES_END, 0 }, {
CODES_END, 0 } },
SLOT_EXIT, 0x20E, 0x128, 0x19C, 3, 0x65, 0, 0 },
1267 { { {
CODES_END, 0 }, {
CODES_END, 0 } },
SLOT_CLIMB_DOWN, 4, 0x11F, 0xBA, 0, 0, 0, 0 },
1268 { { {
CODES_END, 0 }, {
CODES_END, 0 } },
SLOT_CLIMB_UP, 4, 0x110, 0xFE, 0, 0, 0, 0 },
1269 { { {
CODES_END, 0 }, {
CODES_END, 0 } }, 0, 0, 0, 0, 0, 0, 0, 0 },
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_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 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 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_SHOP_1
SHOP1BGM: the inns, shops and towers.
#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 SPECIAL_STORY_JUNGLE_SOUND_TO_AMATERASU_BRIDGE
GAME.progress is from STORY_JUNGLE_SOUND to STORY_AMATERASU_BRIDGE (PROGRESS_RANGES[0x12])
@ STORY_BLACK_ID_PASS
WSTAG756 (Battle Gate), event 911: the Black ID Pass.
@ STORY_BYAKKO_BADGE
WSTAG655 (Mirage Room), event 431: HiAndromon guards the way to Numemon (the Byakko Badge)
@ STORY_WHITE_ID_PASS
WSTAG676 (Bai Hu Dome), event 901: the General says the A.o.A came on Bulbmon (the White ID Pass)
@ 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_BLUE_ID_PASS
WSTAG421 (Qing Long City), event 743: with the Blue ID Pass a Trooper takes the player for the Qing L...
@ STORY_AGUMON_SUITS
WSTAG380 (Divermon's Lake), event 205: the Mischievous Mat, caught in his Etemon Suit,...
@ STORY_BYAKKO_LEADER_FOUGHT
WSTAG620 (the rebels' hideout), event 534: the Byakko Leader takes the player for the A....
@ STORY_SEPIKMON_MASK_LOST
WSTAG480 (Jungle Grave), event 171: Sepikmon will say how to beat Zanbamon once the player finds his ...
@ STORY_AMATERASU_BRIDGE
WSTAG206 (Amaterasu Bridge), event 922: an Attacker holds the bridge.
@ STORY_ZANBAMON_DRIVEN_OFF
WSTAG475 (Shaman House), event 230: the Smelly Herb drives Zanbamon off the way.
@ STORY_CONTROL_ROOM
WSTAG325 (Control Room, Asuka City), event 560: a Soldier guards the way.
@ STORY_BULBMON_BEATEN
WSTAG521 (Zhu Que Hall), event 751: Bulbmon is beaten (the Red ID Pass); its hole leads on to the Ama...
@ STORY_GENJI_BEATEN
WSTAG200, event 52: after the first battle, won against Tamer Genji (event 50), the Digimon Navi give...
@ 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_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_LISA_SAVED
WSTAG605 (Operation Room), event 511: the player saves Lisa from WaruMonzaemon (the Rusty Rifle)
@ STORY_LOOKING_FOR_TEDDY
WSTAG212, event 273: Kail and the player will put on the Agumon Suits to look for Teddy.
@ STORY_JUNGLE_SOUND
WSTAG545 (Bug Maze Pit), event 711: Patamon heard a weird sound from the jungle, where its leader wen...
@ STORY_SOUTH_STATION_GHOST
WSTAG440 (South Station), event 152: a ghost's voice in the empty station.
@ STORY_WAY_TO_AMATERASU
WSTAG305, events 893 and 895: the way into Amaterasu City, the A.o.A's headquarters,...
@ STORY_DE_KNOWLEDGE
WSTAG526 (Zhu Que UG Lake), event 760: the fight with Zanbamon (the DE Knowledge)
@ STORY_MOVIE_BATTLES
WSTAG820, event 1080, with Snatchmon: each encounter plays MODE_BATTLE_MOVIE first.
@ STORY_GENBU_BADGE
WSTAG755 (Battle Gate), event 781: the Xuen Wu Chief, who holds the Black ID Pass,...
@ STORY_STAFF_PASS
WSTAG620, event 551: Nick finds a Staff Pass for the player.
@ STORY_SEIRYU_BADGE
WSTAG420, event 71: the Seiryu Leader is beaten (the Silver ID and the Seiryu Badge),...
@ STORY_CODE_PASSES_NEEDED
WSTAG685, event 690: Leader Chuck says stopping Knightmon takes the four City Leaders' Code Passes.
@ STORY_FAKE_BLUE_CARD
WSTAG410 (East Station), event 90: the Blue Card the player was given turns out to be a fake.
@ STORY_NETWORK_OFFLINE
WSTAG750, event 886: the news say the Optical Network is offline.
@ 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 FLAG_PAWN_SHOP_GOMAMON_TALKED
wstag245 Smith's Shop: Gomamon introduces the Pawn Shop once; set there, later talks differ
#define FLAG_MR_SMITH_TALKED
wstag245 Smith's Shop: Mr.
#define SPECIAL_STORY_DE_SINCERITY_TO_LISA_SAVED
GAME.progress is from STORY_DE_SINCERITY to STORY_LISA_SAVED (PROGRESS_RANGES[0xF])
#define SPECIAL_STORY_SEIRYU_BADGE_TO_ZANBAMON_DRIVEN_OFF
GAME.progress is from STORY_SEIRYU_BADGE to STORY_ZANBAMON_DRIVEN_OFF (PROGRESS_RANGES[0xE])
#define FLAG_ITEM_SHOP_WIZARDMON_TALKED
wstag245/425: Wizardmon says they run the Item Shop once; set there, later talks differ
#define SPECIAL_STORY_KNIGHTMON_REPROGRAMMED_TO_BULBMON_FOUND
GAME.progress is from STORY_KNIGHTMON_REPROGRAMMED to STORY_BULBMON_FOUND (PROGRESS_RANGES[0x11])
#define FLAG_SMITH_EL_DORADO_ID_SHOWN
wstag245 Smith's Shop: with the El Dorado ID, talking to the staff starts the event where Smith Junio...
#define FLAG_ARMORY_GARGOMON_TALKED
wstag245/425: Gargomon says the Armory is run by them once; set there, later talks differ
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,...
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,...
u16 actor85Talk1Conditions[]
u16 actor10Talk2Conditions[]
void(* stageFuncs[])(void)
The stage's functions (common/start_stage.inc.c calls the first): a StageFuncs in the stages with a t...
u16 actor7Talk1Conditions[]
u16 actor90Talk2Conditions[]
u16 actor0Talk0Conditions[]
u16 actor32Talk1Conditions[]
u16 actor10Talk1Actions[]
u16 actor8Talk1Conditions[]
u16 actor89Talk2Conditions[]
u16 actor0Talk1Conditions[]
u16 actor2Talk1Conditions[]
u16 actor4Talk3Conditions[]
u16 actor87Talk2Conditions[]
u16 actor16Talk1Actions[]
u16 actor85Talk1Actions[]
u16 actor90Talk0Conditions[]
u16 actor13Talk2Conditions[]
u16 actor92Talk2Conditions[]
u16 actor88Talk0Conditions[]
u16 actor84Talk0Conditions[]
u16 actor7Talk2Conditions[]
u16 actor12Talk2Conditions[]
u16 actor5Talk0Conditions[]
u16 actor81Talk2Conditions[]
u16 actor78Talk2Conditions[]
u16 actor84Talk1Actions[]
u16 actor89Talk1Conditions[]
u16 actor16Talk2Conditions[]
u16 actor78Talk0Conditions[]
u16 actor79Talk0Conditions[]
u16 actor11Talk1Conditions[]
u16 actor89Talk0Conditions[]
u16 actor86Talk0Conditions[]
u16 actor15Talk1Actions[]
u16 actor85Talk2Conditions[]
u16 actor80Talk1Conditions[]
u16 actor76Talk1Conditions[]
u16 actor1Talk1Conditions[]
u16 actor92Talk0Conditions[]
u16 actor8Talk2Conditions[]
u16 actor13Talk1Actions[]
u16 actor80Talk2Conditions[]
u16 actor80Talk1Actions[]
u16 actor9Talk0Conditions[]
u16 actor6Talk1Conditions[]
u16 actor3Talk0Conditions[]
u16 actor91Talk2Conditions[]
u16 actor15Talk2Conditions[]
u16 actor7Talk0Conditions[]
u16 actor92Talk1Actions[]
FieldActorEntry * stageActors[]
u16 actor2Talk3Conditions[]
u16 actor80Talk0Conditions[]
u16 actor83Talk2Conditions[]
u16 actor10Talk1Conditions[]
u16 actor11Talk0Conditions[]
u16 actor4Talk1Conditions[]
u16 actor82Talk0Conditions[]
u16 actor90Talk1Conditions[]
u16 actor83Talk1Conditions[]
u16 actor6Talk2Conditions[]
u16 actor82Talk1Actions[]
u16 actor81Talk1Actions[]
u16 actor10Talk0Conditions[]
u16 actor78Talk1Conditions[]
u16 actor32Talk2Conditions[]
u16 actor91Talk1Actions[]
u16 actor13Talk0Conditions[]
u16 actor14Talk1Actions[]
u16 actor1Talk0Conditions[]
u16 actor88Talk2Conditions[]
u16 actor3Talk2Conditions[]
u16 actor3Talk1Conditions[]
u16 actor86Talk2Conditions[]
u16 actor86Talk1Conditions[]
u16 actor2Talk2Conditions[]
u16 actor84Talk1Conditions[]
u16 actor78Talk1Actions[]
u16 actor15Talk1Conditions[]
u16 actor91Talk0Conditions[]
u16 actor14Talk1Conditions[]
void setupStage(void)
Sets the stage up: its map, actors and events, playing SHOP1BGM.
u16 actor12Talk0Conditions[]
u16 actor4Talk0Conditions[]
u16 actor83Talk1Actions[]
StageTile stageObjects[]
The tables and color setupStage gives FIELDSTG_state (FieldState)
u16 actor16Talk1Conditions[]
u16 actor87Talk0Conditions[]
u16 actor83Talk0Conditions[]
u16 actor9Talk1Conditions[]
u16 actor11Talk1Actions[]
u16 actor88Talk1Actions[]
u16 actor32Talk0Conditions[]
u16 actor86Talk1Actions[]
u16 actor2Talk0Conditions[]
u16 actor87Talk1Actions[]
u16 actor6Talk0Conditions[]
u16 actor12Talk1Conditions[]
u16 actor12Talk1Actions[]
u16 actor88Talk1Conditions[]
u16 actor32Talk1Actions[]
u16 actor79Talk2Conditions[]
u16 actor76Talk0Actions[]
u16 actor5Talk1Conditions[]
u16 actor90Talk1Actions[]
u16 actor5Talk2Conditions[]
u16 actor16Talk0Conditions[]
u16 actor91Talk1Conditions[]
u16 actor92Talk1Conditions[]
u16 actor87Talk1Conditions[]
u16 actor81Talk0Conditions[]
u16 actor13Talk1Conditions[]
u16 actor82Talk1Conditions[]
u16 actor9Talk2Conditions[]
u16 actor79Talk1Actions[]
u16 actor14Talk2Conditions[]
u16 actor15Talk0Conditions[]
u16 actor76Talk0Conditions[]
u16 actor89Talk1Actions[]
u16 actor85Talk0Conditions[]
u16 actor11Talk2Conditions[]
u16 actor8Talk0Conditions[]
u16 actor4Talk2Conditions[]
u16 actor84Talk2Conditions[]
u16 actor82Talk2Conditions[]
u16 actor81Talk1Conditions[]
u16 actor14Talk0Conditions[]
u16 actor76Talk1Actions[]
u16 actor79Talk1Conditions[]