23#define STAGE_CHILDREN_SIZE 4
26#if VERSION_US || VERSION_JP
27#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_02)
28#define STAGE_FILE 0x48C
30#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_02)
31#define STAGE_FILE 0x49C
55 { 50, 8 }, { 51, 8 }, { 52, 8 }, { 53, 8 },
56 { 54, 8 }, { 55, 8 }, { 56, 8 }, { 57, 8 },
57 { 58, 8 }, { 59, 8 }, { 60, 8 }, { 82, 160 },
61 { 61, 8 }, { 62, 8 }, { 63, 8 }, { 64, 8 },
62 { 65, 8 }, { 66, 8 }, { 67, 8 }, { 68, 8 },
63 { 69, 8 }, { 70, 8 }, { 71, 8 }, { 82, 160 },
67 { 72, 8 }, { 73, 8 }, { 74, 8 }, { 75, 8 },
68 { 76, 8 }, { 77, 8 }, { 78, 8 }, { 79, 8 },
69 { 80, 8 }, { 81, 8 }, { 82, 160 }, { 255, 0 },
173 { 0x200, 0x100, 0x21C, 0x1A6, 0x70, 0xA6, 0x230, 0x1FE },
174 { 0x200, 0x100, 0x200, 0x100, 0, 0, 0x220, 0x1FE },
175 { 0x200, 0x100, 0x216, 0x138, 0x58, 0x38, 0x200, 0x1FD },
176 { 0x200, 0x100, 0x208, 0x1BC, 0x20, 0xBC, 0x210, 0x1FD },
177 { 0x200, 0x100, 0x210, 0x1BC, 0x40, 0xBC, 0x220, 0x1FD },
178 { 0x200, 0x100, 0x200, 0x1BC, 0, 0xBC, 0x230, 0x1FD },
179 { 0x140, 0x100, 0x176, 0x160, 0xD8, 0x60, 0x170, 0x1FF },
180 { 0x140, 0x100, 0x176, 0x188, 0xD8, 0x88, 0x140, 0x1FE },
181 { 0x180, 0x100, 0x1B0, 0x188, 0x1C0, 0x88, 0x150, 0x1FE },
182 { 0x180, 0x100, 0x188, 0x194, 0x120, 0x94, 0x160, 0x1FE },
183 { 0x180, 0x100, 0x180, 0x19C, 0x100, 0x9C, 0x170, 0x1FE },
184 { 0x180, 0x100, 0x1B6, 0x100, 0x1D8, 0, 0x140, 0x1FD },
406 { 1, 3, 0xC8, 2, 0x48, 0, 0, 0, 0, 0, 50, 640, 0, 0 },
407 { 1, 3, 0xC8, 2, 0x48, 0, 0, 0, 0, 0, 348, 103, 0, 0 },
408 { 1, 3, 0xC8, 2, 0x48, 0, 0, 0, 0, 0, 369, 851, 0, 0 },
409 { 1, 0, 0x40, 2, 7, 1, 7, 0xC, 4, 0, 570, 141, 0, 0 },
410 { 1, 0, 0x40, 2, 7, 1, 7, 0xC, 4, 0, 906, 499, 0, 0 },
411 { 1, 2, 0x40, 6, 0x3D, 0, 0, 0, 0, 0, 56, 957, 0, 0 },
412 { 1, 1, 0x40, 6, 0x32, 0, 0, 0, 0, 0, 92, 232, 0, 0 },
413 { 1, 1, 0x40, 6, 0x32, 0, 0, 0, 0, 0, 113, 400, 0, 0 },
414 { 1, 2, 0x40, 6, 0x3D, 0, 0, 0, 0, 0, 340, 812, 0, 0 },
415 { 1, 2, 0x40, 6, 0x3D, 0, 0, 0, 0, 0, 891, 290, 0, 0 },
416 { 1, 2, 0x40, 6, 0x3D, 0, 0, 0, 0, 0, 1096, 196, 0, 0 },
417 { 1, 0, 0x40, 4, 0, 0, 0, 0, 0, 0, 417, 278, 329, 0 },
418 { 1, 0, 0x48, 4, 1, 0, 0, 0, 0, 0, 348, 278, 342, 0 },
419 { 1, 0, 0x4A, 4, 2, 0, 0, 0, 0, 0, 529, 611, 680, 0 },
420 { 1, 0, 0x5A, 4, 3, 0, 0, 0, 0, 0, 422, 570, 656, 0 },
421 { 1, 0, 0x58, 4, 4, 0, 0, 0, 0, 0, 384, 635, 719, 0 },
422 { 1, 0, 0x60, 4, 5, 0, 0, 0, 0, 0, 919, 519, 608, 0 },
423 { 1, 0, 0x5E, 4, 6, 0, 0, 0, 0, 0, 583, 159, 248, 0 },
424 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
427 { { {
CODES_END, 0 }, {
CODES_END, 0 } },
SLOT_EXIT, 0x258, 0x340, 0xF0, 5, 0, 0, 0 },
428 { { {
CODES_END, 0 }, {
CODES_END, 0 } },
SLOT_EXIT, 0x258, 0x368, 0x2EC, 7, 0, 0, 0 },
429 { { {
CODES_END, 0 }, {
CODES_END, 0 } },
SLOT_EXIT, 0x258, 0x128, 0x2F4, 1, 0, 0, 0 },
430 { { {
CODES_END, 0 }, {
CODES_END, 0 } },
SLOT_EXIT, 0x258, 0x110, 0x108, 3, 0, 0, 0 },
431 { { {
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 FIELD_MAP_FLOOR0
Some of FieldMap's maps (files): those of the floors the player walks on come first,...
#define SLOT_EXIT
The kinds of StageSlot (type).
#define FIELD_MAP_AREAS
a cell's value: its battle area (FieldBattles), or 0
#define FIELD_MAP_TRIGGERS
a cell's value: a direction (3 bits) and a StageSlot (5)
FieldState FIELDSTG_state
#define PLACE(n)
the place and its argument the last exit or warp set (checkWarpArg): the numbers of the stage's Stage...
#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 PLACE_ARG(n)
GAME.placeArg is n.
#define MUSIC_BATTLE
BATL0000: the maps' random battles (AreaBattle, nearly all of them)
#define MUSIC_DESERT
ENV_0016: the West Sector's deserts and the Mirage Tower.
#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_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_KOTEMON_LOCKED
PARTNER_KOTEMON is still locked.
#define SPECIAL_PARTY_LEVEL_TOTAL_60
the party's levels add up to 60 or more (2 * 15 + 30)
#define FLAG_MONMON_DDNA_REQUESTED
wstag635: DRI Yang asks for Monmon DDNA from Armormon; tested at Armormon in wstag385 with the DDNA n...
#define SPECIAL_STORY_ASUKA_HEADQUARTERS_TO_OPERATION_SIGMA
GAME.progress is from STORY_ASUKA_HEADQUARTERS to STORY_OPERATION_SIGMA (PROGRESS_RANGES[0x13])
#define SPECIAL_UNLOCK_KUMAMON
an action: unlocks PARTNER_KUMAMON; the talks that take or give its DDNA apply it
#define FLAG_DRI_YANG_TALKED
wstag635 Mobius Desert: DRI Yang, with a twisted ankle, introduces himself once; set there,...
#define SPECIAL_PARTY_LEVEL_TOTAL_90
the party's levels add up to 90 or more (4 * 15 + 30)
#define SPECIAL_MONMON_UNLOCKED
PARTNER_MONMON is unlocked.
#define FLAG_DRI_YUJI_TALKED
wstag635 Mobius Desert: DRI Yuji introduces himself once; set there, later talks differ
#define FLAG_DRI_KEN_TALKED
wstag635 Mobius Desert: DRI Ken introduces himself as an athletic researcher once; set there,...
#define SPECIAL_MONMON_LOCKED
PARTNER_MONMON is still locked.
#define SPECIAL_KUMAMON_UNLOCKED
PARTNER_KUMAMON is unlocked.
#define SPECIAL_UNLOCK_KOTEMON
an action: unlocks PARTNER_KOTEMON; the talks that take or give its DDNA apply it
#define SPECIAL_KUMAMON_LOCKED
PARTNER_KUMAMON is still locked.
#define SPECIAL_STORY_SINCE_DE_SINCERITY
GAME.progress is STORY_DE_SINCERITY or later (PROGRESS_RANGES[0xC], to 0x63)
#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 SPECIAL_KOTEMON_UNLOCKED
PARTNER_KOTEMON is unlocked.
#define FLAG_KUMAMON_DDNA_REQUESTED
wstag635: DRI Yuji wants Kumamon DDNA from GrapLeomon; tested at GrapLeomon in wstag490 with the DDNA...
#define FLAG_KOTEMON_DDNA_REQUESTED
wstag635: DRI Ken wants Kotemon DDNA from Kyukimon; tested at Kyukimon in wstag525 with the DDNA not ...
#define SPECIAL_UNLOCK_MONMON
an action: unlocks PARTNER_MONMON; the talks that take or give its DDNA apply it
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 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 ...
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
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,...
Where an exit (StageSlot) leads: copyPlacePoints copies a place's points to the stage's first slots,...
The points of a place (GAME.place and GAME.placeArg, which the exit the player came through set)
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,...
StagePoints placePoints1_5
StagePoint placePoints1_7Point3
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[]
AnimFrame updateTileAnimsFrames2[]
u16 actor0Talk0Conditions[]
u16 actor7Talk4Conditions[]
StagePoint placePoints1_3Point3
StagePoints placePoints1_7
StagePoint placePoints1_1Point0
StagePoint placePoints1_5Point3
u16 actor8Talk1Conditions[]
u16 actor0Talk1Conditions[]
u16 actor2Talk1Conditions[]
StagePoint placePoints1_5Point2
StagePoint placePoints1_7Point0
StagePoints placePoints1_2
u16 actor7Talk2Conditions[]
StagePoint placePoints1_8Point1
StagePoint placePoints1_6Point2
StagePoint placePoints1_5Point0
u16 actor1Talk1Conditions[]
u16 actor3Talk0Conditions[]
StagePoint placePoints1_3Point0
StagePoint placePoints1_2Point0
u16 actor0Talk3Conditions[]
u16 actor7Talk0Conditions[]
FieldActorEntry * stageActors[]
StagePoints placePoints1_8
u16 actor2Talk3Conditions[]
StagePoint placePoints1_2Point2
StagePoint placePoints1_4Point1
StagePoint placePoints1_4Point3
u16 actor1Talk0Conditions[]
StagePoint placePoints1_6Point3
StagePoint placePoints1_2Point3
u16 actor0Talk4Conditions[]
StagePoint placePoints1_1Point2
u16 actor3Talk1Conditions[]
u16 actor2Talk2Conditions[]
AnimFrame updateTileAnimsFrames1[]
StagePoint placePoints1_6Point1
StagePoints placePoints1_1
StagePoint placePoints1_1Point1
void setupStage(void)
Sets the stage up: its map, actors and battles, playing the ambience ENV_0016.
StagePoints * placePoints[]
Names some stages define.
StagePoint placePoints1_8Point3
StageTile stageObjects[]
The tables and color setupStage gives FIELDSTG_state (FieldState)
StagePoint placePoints1_5Point1
StagePoint placePoints1_4Point2
StagePoints placePoints0_0
StagePoint placePoints1_7Point1
StagePoint placePoints1_2Point1
u16 actor2Talk0Conditions[]
StagePoint placePoints1_4Point0
u16 actor0Talk2Conditions[]
StagePoint placePoints1_3Point1
StagePoints placePoints1_4
StagePoint placePoints1_1Point3
StagePoint placePoints1_8Point0
AnimFrame updateTileAnimsFrames0[]
Defined below, after the code that uses them.
StagePoint placePoints1_6Point0
StagePoint placePoints1_8Point2
u16 actor7Talk3Conditions[]
StagePoint placePoints1_7Point2
u16 actor2Talk4Conditions[]
StagePoint placePoints1_3Point2
StagePoints placePoints1_6
u16 actor8Talk0Conditions[]
StagePoints placePoints1_3
FieldBattles stageBattles[]