19#define STAGE_CHILDREN_SIZE 4
22#if VERSION_US || VERSION_JP
23#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_02)
24#define STAGE_FILE 0x484
26#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_02)
27#define STAGE_FILE 0x494
51 { 50, 8 }, { 51, 8 }, { 52, 8 }, { 53, 8 },
52 { 54, 8 }, { 55, 8 }, { 56, 8 }, { 57, 8 },
53 { 58, 8 }, { 59, 8 }, { 60, 8 }, { 82, 160 },
57 { 61, 8 }, { 62, 8 }, { 63, 8 }, { 64, 8 },
58 { 65, 8 }, { 66, 8 }, { 67, 8 }, { 68, 8 },
59 { 69, 8 }, { 70, 8 }, { 71, 8 }, { 82, 160 },
63 { 72, 8 }, { 73, 8 }, { 74, 8 }, { 75, 8 },
64 { 76, 8 }, { 77, 8 }, { 78, 8 }, { 79, 8 },
65 { 80, 8 }, { 81, 8 }, { 82, 160 }, { 255, 0 },
123 { 0x200, 0x100, 0x21C, 0x1A6, 0x70, 0xA6, 0x230, 0x1FE },
124 { 0x200, 0x100, 0x200, 0x100, 0, 0, 0x220, 0x1FE },
125 { 0x200, 0x100, 0x216, 0x138, 0x58, 0x38, 0x200, 0x1FD },
126 { 0x200, 0x100, 0x208, 0x1BC, 0x20, 0xBC, 0x210, 0x1FD },
127 { 0x200, 0x100, 0x210, 0x1BC, 0x40, 0xBC, 0x220, 0x1FD },
128 { 0x200, 0x100, 0x200, 0x1BC, 0, 0xBC, 0x230, 0x1FD },
129 { 0x180, 0x100, 0x188, 0x100, 0x120, 0, 0x170, 0x1FF },
130 { 0x180, 0x100, 0x190, 0x100, 0x140, 0, 0x140, 0x1FE },
311 { 1, 3, 0x40, 2, 0x48, 0, 0, 0, 0, 0, 302, 396, 0, 0 },
312 { 1, 2, 0x40, 6, 0x3D, 0, 0, 0, 0, 0, 120, 716, 0, 0 },
313 { 1, 2, 0x40, 6, 0x3D, 0, 0, 0, 0, 0, 277, 632, 0, 0 },
314 { 1, 1, 0x40, 6, 0x32, 0, 0, 0, 0, 0, 342, 321, 0, 0 },
315 { 1, 1, 0x40, 6, 0x32, 0, 0, 0, 0, 0, 604, 413, 0, 0 },
316 { 1, 2, 0x40, 6, 0x3D, 0, 0, 0, 0, 0, 726, 314, 0, 0 },
317 { 1, 2, 0x40, 6, 0x3D, 0, 0, 0, 0, 0, 752, 174, 0, 0 },
318 { 1, 2, 0x40, 6, 0x3D, 0, 0, 0, 0, 0, 772, 512, 0, 0 },
319 { 1, 2, 0x40, 6, 0x3D, 0, 0, 0, 0, 0, 949, 77, 0, 0 },
320 { 1, 0, 0x40, 4, 0, 0, 0, 0, 0, 0, 541, 275, 326, 0 },
321 { 1, 0, 0x40, 4, 1, 0, 0, 0, 0, 0, 364, 459, 509, 0 },
322 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
325 { { {
CODES_END, 0 }, {
CODES_END, 0 } },
SLOT_EXIT, 0x248, 0x90, 0x540, 5, 0, 0, 0 },
326 { { {
CODES_END, 0 }, {
CODES_END, 0 } },
SLOT_EXIT, 0x258, 0x340, 0xF0, 1, 0, 1, 1 },
327 { { {
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 PROGRESS(n)
GAME.progress is n.
#define FLAG(group, id)
The codes of the (code, value) pairs that FLAGS_00 checks as conditions and applies as actions (event...
#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_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_BYAKKO_LEADER_FOUGHT
WSTAG620 (the rebels' hideout), event 534: the Byakko Leader takes the player for the A....
@ STORY_NUMEMON_FOUND
WSTAG685 (Underground Cave, Byakko City), event 413: the rock blocking the hole is Numemon.
@ STORY_MOVIE_BATTLES
WSTAG820, event 1080, with Snatchmon: each encounter plays MODE_BATTLE_MOVIE first.
@ 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_KEITH_NICK_SEARCH_STARTED
wstag620 Secret Room: set after event 540; then Lisa says "Find Keith and Nick" and people in 10 stag...
#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_KNIGHTMON_REPROGRAMMED_TO_BULBMON_FOUND
GAME.progress is from STORY_KNIGHTMON_REPROGRAMMED to STORY_BULBMON_FOUND (PROGRESS_RANGES[0x11])
#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....
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,...
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...
AnimFrame updateTileAnimsFrames2[]
u16 actor11Talk1Conditions[]
u16 actor1Talk1Conditions[]
u16 actor9Talk0Conditions[]
FieldActorEntry * stageActors[]
u16 actor17Talk1Conditions[]
u16 actor11Talk0Conditions[]
u16 actor12Talk0Actions[]
u16 actor16Talk0Actions[]
u16 actor17Talk0Conditions[]
u16 actor13Talk0Conditions[]
u16 actor1Talk0Conditions[]
AnimFrame updateTileAnimsFrames1[]
u16 actor15Talk1Conditions[]
u16 actor14Talk1Conditions[]
void setupStage(void)
Sets the stage up: its map, actors and battles, playing the ambience ENV_0016.
u16 actor12Talk0Conditions[]
u16 actor13Talk0Actions[]
StageTile stageObjects[]
The tables and color setupStage gives FIELDSTG_state (FieldState)
u16 actor16Talk1Conditions[]
u16 actor9Talk1Conditions[]
u16 actor12Talk1Conditions[]
u16 actor14Talk0Actions[]
AnimFrame updateTileAnimsFrames0[]
Defined below, after the code that uses them.
u16 actor16Talk0Conditions[]
u16 actor17Talk0Actions[]
u16 actor11Talk0Actions[]
u16 actor13Talk1Conditions[]
u16 actor15Talk0Conditions[]
u16 actor15Talk0Actions[]
FieldBattles stageBattles[]
u16 actor14Talk0Conditions[]