16#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_09)
17#define STAGE_FILE 0x937
18#define STAGE_FILE_8 0x704
20#define STAGE_TEXT 0x89B
21#define STAGE_FILE 0x915
22#define STAGE_FILE_8 0x6F4
79 { 0x200, 0x100, 0x21C, 0x1A6, 0x70, 0xA6, 0x230, 0x1FE },
80 { 0x200, 0x100, 0x200, 0x100, 0, 0, 0x220, 0x1FE },
81 { 0x200, 0x100, 0x216, 0x138, 0x58, 0x38, 0x200, 0x1FD },
82 { 0x200, 0x100, 0x208, 0x1BC, 0x20, 0xBC, 0x210, 0x1FD },
83 { 0x200, 0x100, 0x210, 0x1BC, 0x40, 0xBC, 0x220, 0x1FD },
84 { 0x200, 0x100, 0x200, 0x1BC, 0, 0xBC, 0x230, 0x1FD },
85 { 0x140, 0x100, 0x14A, 0x1A0, 0x28, 0xA0, 0x150, 0x1FF },
86 { 0x180, 0x100, 0x1B0, 0x178, 0x1C0, 0x78, 0x160, 0x1FF },
87 { 0x140, 0x100, 0x170, 0x1D0, 0xC0, 0xD0, 0x170, 0x1FF },
88 { 0x180, 0x100, 0x1A0, 0x100, 0x180, 0, 0x140, 0x1FE },
183 { 1, 0, 0x8F, 2, 0x37, 1, 0x37, 0x4B, 0xA, 0, 200, 265, 0, 0 },
184 { 1, 0, 0x8F, 2, 0x37, 1, 0x37, 0x4B, 0xA, 0, 560, 185, 0, 0 },
185 { 1, 0, 0x8F, 2, 0x37, 1, 0x37, 0x4B, 0xA, 0, 857, 33, 0, 0 },
186 { 1, 0, 0xB6, 2, 0x4C, 1, 0x4C, 0x62, 0xA, 0, 395, 180, 0, 0 },
187 { 1, 0, 0x8F, 6, 0x37, 1, 0x37, 0x4B, 0xA, 0, 500, 39, 0, 0 },
188 { 1, 0, 0xB6, 6, 0x4C, 1, 0x4C, 0x62, 0xA, 0, 659, 0, 0, 0 },
189 { 1, 0, 0x68, 6, 0x34, 1, 0x34, 0x36, 0xA, 0, 176, 128, 0, 0 },
190 { 1, 0, 0x68, 6, 0x34, 1, 0x34, 0x36, 0xA, 0, 758, 41, 0, 0 },
191 { 1, 0, 0x8A, 4, 3, 0, 0, 0, 0, 0, 416, 191, 327, 0 },
192 { 1, 0, 0x52, 4, 4, 0, 0, 0, 0, 0, 384, 174, 311, 0 },
193 { 1, 0, 0x83, 4, 5, 0, 0, 0, 0, 0, 352, 169, 295, 0 },
194 { 1, 0, 0x8E, 4, 6, 0, 0, 0, 0, 0, 320, 154, 279, 0 },
195 { 1, 0, 0x54, 4, 8, 0, 0, 0, 0, 0, 672, 177, 268, 0 },
196 { 1, 0, 0x66, 4, 9, 0, 0, 0, 0, 0, 640, 162, 251, 0 },
197 { 1, 0, 0x60, 4, 0xA, 0, 0, 0, 0, 0, 624, 156, 242, 0 },
198 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
201 { { {
CODES_END, 0 }, {
CODES_END, 0 } },
SLOT_EXIT, 0x2E4, 0x340, 0xA0, 5, 0, 0, 0 },
202 { { {
CODES_END, 0 }, {
CODES_END, 0 } },
SLOT_EXIT, 0x2E4, 0xC0, 0x180, 1, 0, 0, 0 },
203 { { {
CODES_END, 0 }, {
CODES_END, 0 } }, 0, 0, 0, 0, 0, 0, 0, 0 },
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 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 FLAG(group, id)
The codes of the (code, value) pairs that FLAGS_00 checks as conditions and applies as actions (event...
#define PLACE_ARG(n)
GAME.placeArg is n.
#define MUSIC_BATTLE
BATL0000: the maps' random battles (AreaBattle, nearly all of them)
#define MUSIC_SEABED
BGM_0027: the Seabed tunnels.
#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_ALL_PARTNERS_UNLOCKED
the European and Japanese versions: all eight partners are unlocked
#define FLAG_SEABED_KHAKKHARA_FOUND
wstag964 (extra chapter): chest that gives the Khakkhara, "I got" text; its conditions test it 0
#define SPECIAL_ALL_PARTNERS_LEVEL_45
the European and Japanese versions: every unlocked partner is at level 45 or more
#define FLAG_SEABED_CLUSTER_CANNON_FOUND
wstag964 (extra chapter): chest that gives the Cluster Cannon, "I got" text; its conditions test it 0
#define FLAG_SEABED_WISDOM_CHIP_FOUND
wstag964 (extra chapter): chest that gives the Wisdom Chip, "I got" text; its conditions test it 0
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 ...
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.
FieldBattles *(* findBattles)(FieldBattles *list, s32 id)
the place of the list with that id
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
CVECTOR spriteColor
the field's sprites' color, unless cd is 0
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,...
u16 place
where the last warp or trigger put the player (FieldBattles.id)
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,...
AreaBattle place3Area3Battle1
AreaBattle place3Area3Battle2
AreaBattle place2Area3Battle5
StagePoint placePoints4_1Point0
AreaBattle place3Area0Battle5
AreaBattle place5Area2Battle4
void(* stageFuncs[])(void)
The stage's functions (common/start_stage.inc.c calls the first): a StageFuncs in the stages with a t...
AreaBattle place5Area1Battle2
AreaBattle place3Area0Battle3
AreaBattle place2Area2Battle6
AreaBattle place5Area3Battle5
AreaBattle place4Area0Battle2
StagePoint placePoints5_2Point0
AreaBattle place2Area1Battle1
AreaBattle place2Area2Battle5
AreaBattle place5Area0Battle6
AreaBattle place4Area1Battle4
AreaBattle place4Area2Battle6
u16 actor3Talk3Conditions[]
AreaBattle place2Area2Battle2
u16 actor4Talk3Conditions[]
StagePoints placePoints5_2
AreaBattle place5Area0Battle4
BattleList place4Area2Battles
AreaBattle place4Area0Battle5
AreaBattle place3Area2Battle3
StagePoint placePoints4_1Point1
BattleList place3Area0Battles
AreaBattle place4Area1Battle1
BattleList place3Area1Battles
AreaBattle place3Area1Battle6
AreaBattle place2Area0Battle0
StagePoint placePoints5_3Point0
AreaBattle place2Area2Battle4
AreaBattle place3Area3Battle3
StagePoint placePoints2_2Point0
AreaBattle place2Area3Battle0
AreaBattle place2Area0Battle1
AreaBattle place5Area2Battle3
AreaBattle place2Area3Battle2
AreaBattle place2Area0Battle3
AreaBattle place4Area2Battle5
AreaBattle place3Area0Battle7
AreaBattle place3Area1Battle3
AreaBattle place4Area0Battle4
AreaBattle place3Area0Battle0
StagePoint placePoints3_1Point0
const CVECTOR stageColor
the color the setup copies to FIELDSTG_state.spriteColor
BattleList place5Area1Battles
AreaBattle place2Area0Battle5
u16 actor3Talk0Conditions[]
StagePoints placePoints2_1
BattleList place2Area1Battles
AreaBattle place5Area3Battle3
StagePoints placePoints2_2
AreaBattle place5Area1Battle0
StagePoint placePoints2_4Point1
FieldActorEntry * stageActors[]
AreaBattle place5Area0Battle1
StagePoints placePoints2_3
StagePoint placePoints2_3Point1
AreaBattle place2Area1Battle2
AreaBattle place2Area0Battle4
StagePoint placePoints2_3Point0
AreaBattle place2Area2Battle3
AreaBattle place4Area1Battle6
AreaBattle place4Area0Battle6
AreaBattle place5Area1Battle3
AreaBattle place5Area1Battle4
AreaBattle place2Area1Battle4
StagePoint placePoints2_1Point1
AreaBattle place4Area0Battle7
u16 actor4Talk1Conditions[]
AreaBattle place5Area2Battle7
BattleList place3Area2Battles
AreaBattle place3Area2Battle5
AreaBattle place4Area3Battle7
AreaBattle place5Area0Battle3
AreaBattle place4Area0Battle1
AreaBattle place5Area0Battle0
AreaBattle place2Area3Battle4
AreaBattle place5Area2Battle6
AreaBattle place4Area0Battle3
AreaBattle place4Area1Battle0
AreaBattle place2Area0Battle2
AreaBattle place3Area1Battle5
AreaBattle place3Area0Battle4
AreaBattle place4Area2Battle4
StagePoint placePoints5_2Point1
AreaBattle place2Area3Battle1
AreaBattle place5Area1Battle6
AreaBattle place5Area0Battle2
u16 actor3Talk2Conditions[]
AreaBattle place3Area2Battle0
AreaBattle place3Area2Battle2
u16 actor3Talk1Conditions[]
AreaBattle place3Area2Battle7
AreaBattle place5Area3Battle4
BattleList place4Area3Battles
AreaBattle place4Area1Battle2
AreaBattle place2Area1Battle0
AreaBattle place5Area0Battle7
BattleList place4Area0Battles
AreaBattle place3Area1Battle1
void setupStage(void)
Sets the stage up: its map, actors and battles, playing BGM_0027.
AreaBattle place5Area1Battle7
StagePoint placePoints5_3Point1
StagePoints * placePoints[]
Names some stages define.
u16 actor4Talk0Conditions[]
AreaBattle place3Area3Battle6
StagePoint placePoints3_1Point1
AreaBattle place3Area3Battle5
AreaBattle place3Area1Battle4
StageTile stageObjects[]
The tables and color setupStage gives FIELDSTG_state (FieldState)
AreaBattle place5Area3Battle7
AreaBattle place4Area0Battle0
StagePoint placePoints2_2Point1
AreaBattle place2Area1Battle6
AreaBattle place4Area1Battle7
AreaBattle place5Area2Battle2
AreaBattle place3Area3Battle0
AreaBattle place4Area2Battle2
AreaBattle place3Area3Battle4
AreaBattle place3Area2Battle1
AreaBattle place4Area2Battle3
AreaBattle place5Area0Battle5
AreaBattle place5Area3Battle6
AreaBattle place3Area0Battle1
AreaBattle place5Area2Battle5
BattleList place5Area2Battles
AreaBattle place5Area1Battle1
AreaBattle place4Area3Battle3
BattleList place4Area1Battles
AreaBattle place5Area3Battle2
BattleList place3Area3Battles
AreaBattle place2Area0Battle7
AreaBattle place2Area3Battle6
AreaBattle place4Area3Battle0
AreaBattle place3Area2Battle6
AreaBattle place3Area1Battle0
AreaBattle place4Area2Battle1
AreaBattle place5Area2Battle1
AreaBattle place3Area2Battle4
StagePoint placePoints5_1Point0
AreaBattle place2Area1Battle3
StagePoint placePoints2_1Point0
StagePoint placePoints5_1Point1
BattleList place5Area3Battles
StagePoints placePoints2_4
AreaBattle place3Area1Battle2
StagePoints placePoints5_3
AreaBattle place4Area2Battle0
AreaBattle place4Area1Battle3
AreaBattle place2Area3Battle7
AreaBattle place2Area1Battle5
AreaBattle place3Area1Battle7
AreaBattle place2Area1Battle7
AreaBattle place4Area3Battle1
AreaBattle place3Area0Battle2
AreaBattle place3Area0Battle6
AreaBattle place2Area2Battle7
AreaBattle place4Area3Battle5
StagePoints placePoints3_1
AreaBattle place2Area3Battle3
BattleList place2Area3Battles
StagePoints placePoints5_1
BattleList place2Area0Battles
AreaBattle place4Area1Battle5
StagePoint placePoints2_4Point0
AreaBattle place5Area3Battle0
AreaBattle place2Area2Battle0
AreaBattle place3Area3Battle7
AreaBattle place5Area2Battle0
u16 actor4Talk2Conditions[]
StagePoints placePoints4_1
BattleList place2Area2Battles
AreaBattle place4Area2Battle7
AreaBattle place4Area3Battle4
FieldBattles stageBattles[]
AreaBattle place5Area3Battle1
AreaBattle place4Area3Battle2
BattleList place5Area0Battles
AreaBattle place2Area0Battle6
AreaBattle place5Area1Battle5
AreaBattle place4Area3Battle6
AreaBattle place2Area2Battle1