Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
wstag830.c
Go to the documentation of this file.
1/*
2 * WSTAG830: Seabed, Underground: below the bridges. A tunnel under the Asuka
3 * and Amaterasu Bridges (WSTAG205, 206); it joins WSTAG825.
4 */
5
6#include "common.h"
7#include "field/stage.h"
8
12
13const CVECTOR stageColor = { 0x54, 0x67, 0x96, 0x01 };
14#if VERSION_US || VERSION_JP
15#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_04)
16#define STAGE_FILE 0x6F1
17#elif VERSION_EU
18#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_04)
19#define STAGE_FILE 0x701
20#endif
21/* Sets the stage up: its map, actors and battles, playing BGM_0027 */
42
43StagePoint placePoints2_1Point2 = { 0x2E0, 2, 1, 176, 0x178, 5, NULL };
44StagePoint placePoints2_1Point1 = { 0x202, 0, 0, 0x420, 0x1F0, 0, &placePoints2_1Point2 };
45StagePoint placePoints2_1Point0 = { 0x202, 0, 0, 0x150, 0x148, 0, &placePoints2_1Point1 };
47StagePoint placePoints12_1Point2 = { 0x2E0, 12, 1, 176, 0x178, 5, NULL };
48StagePoint placePoints12_1Point1 = { 0x272, 0, 0, 0x420, 0x1F0, 0, &placePoints12_1Point2 };
49StagePoint placePoints12_1Point0 = { 0x272, 0, 0, 0x150, 0x148, 0, &placePoints12_1Point1 };
164 { 0x200, 0x100, 0x21C, 0x1A6, 0x70, 0xA6, 0x230, 0x1FE },
165 { 0x200, 0x100, 0x200, 0x100, 0, 0, 0x220, 0x1FE },
166 { 0x200, 0x100, 0x216, 0x138, 0x58, 0x38, 0x200, 0x1FD },
167 { 0x200, 0x100, 0x208, 0x1BC, 0x20, 0xBC, 0x210, 0x1FD },
168 { 0x200, 0x100, 0x210, 0x1BC, 0x40, 0xBC, 0x220, 0x1FD },
169 { 0x200, 0x100, 0x200, 0x1BC, 0, 0xBC, 0x230, 0x1FD },
170 { 0x180, 0x100, 0x1A0, 0x100, 0x180, 0, 0x160, 0x1FF },
171};
172FieldActorEntry actor0 = { NULL, NULL, 0x147, 4, 0, 0, 0 };
174 &actor0,
175 NULL,
176};
178 { 1, 0, 0x8F, 2, 0x37, 1, 0x37, 0x4B, 0xA, 0, 550, 238, 0, 0 },
179 { 1, 0, 0xB6, 2, 0x4C, 1, 0x4C, 0x62, 0xA, 0, 239, 158, 0, 0 },
180 { 1, 0, 0xB6, 2, 0x4C, 1, 0x4C, 0x62, 0xA, 0, 661, 204, 0, 0 },
181 { 1, 0, 0xB6, 2, 0x4C, 1, 0x4C, 0x62, 0xA, 0, 896, 119, 0, 0 },
182 { 1, 0, 0xFF, 2, 0x33, 2, 0, 7, 0x18, 0, 188, -92, 0, 0 },
183 { 1, 0, 0xFF, 2, 0x33, 2, 0, 7, 0x18, 0, 428, -20, 0, 0 },
184 { 1, 0, 0x40, 2, 0, 0, 0, 0, 0, 0, 128, 276, 0, 0 },
185 { 1, 0, 0x40, 2, 1, 0, 0, 0, 0, 0, 192, 297, 0, 0 },
186 { 1, 0, 0x52, 2, 2, 0, 0, 0, 0, 0, 256, 292, 0, 0 },
187 { 1, 0, 0x40, 2, 3, 0, 0, 0, 0, 0, 320, 320, 0, 0 },
188 { 1, 0, 0x48, 2, 4, 0, 0, 0, 0, 0, 768, 312, 0, 0 },
189 { 1, 0, 0x54, 2, 5, 0, 0, 0, 0, 0, 832, 270, 0, 0 },
190 { 1, 0, 0x40, 2, 6, 0, 0, 0, 0, 0, 512, 335, 0, 0 },
191 { 1, 0, 0x44, 2, 7, 0, 0, 0, 0, 0, 576, 316, 0, 0 },
192 { 1, 0, 0x40, 2, 8, 0, 0, 0, 0, 0, 640, 337, 0, 0 },
193 { 1, 0, 0x40, 2, 9, 0, 0, 0, 0, 0, 704, 338, 0, 0 },
194 { 1, 0, 0x8F, 6, 0x37, 1, 0x37, 0x4B, 0xA, 0, 460, 182, 0, 0 },
195 { 1, 0, 0x68, 6, 0x34, 1, 0x34, 0x36, 0xA, 0, 348, 194, 0, 0 },
196 { 1, 0, 0x68, 6, 0x34, 1, 0x34, 0x36, 0xA, 0, 761, 156, 0, 0 },
197 { 1, 0, 0xFF, 4, 0x32, 2, 0, 7, 0x18, 0, 188, 36, 280, 0 },
198 { 1, 0, 0xFF, 4, 0x32, 2, 0, 7, 0x18, 0, 428, 108, 352, 0 },
199 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
200};
202 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x2E1, 0xE0, 0x110, 4, 0, 0, 0 },
203 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x2E1, 0x1D0, 0x154, 4, 0, 0, 0 },
204 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x2E1, 0x390, 0x108, 5, 0, 0, 0 },
205 { { { CODES_END, 0 }, { CODES_END, 0 } }, 0, 0, 0, 0, 0, 0, 0, 0 },
206};
207void (*stageFuncs[])(void) = {
209};
#define NULL
Definition common.h:17
GameState GAME
The save data, the game mode and the methods.
Definition state.c:64
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,...
Definition field_map.h:85
#define SLOT_EXIT
The kinds of StageSlot (type).
Definition field_map.h:255
#define FIELD_MAP_AREAS
a cell's value: its battle area (FieldBattles), or 0
Definition field_map.h:87
#define FIELD_MAP_TRIGGERS
a cell's value: a direction (3 bits) and a StageSlot (5)
Definition field_map.h:88
FieldMap FIELDSTG_map
Definition fieldstg.c:3660
FieldState FIELDSTG_state
Definition fieldstg.c:2641
#define CODES_END
Definition game_state.h:83
#define MUSIC_BATTLE
BATL0000: the maps' random battles (AreaBattle, nearly all of them)
Definition sound.h:76
#define MUSIC_SEABED
BGM_0027: the Seabed tunnels.
Definition sound.h:103
#define MUSIC(bank, n)
A field's or a battle's music (FieldState.music, Battle.music): track (SEP) n of the first sequence o...
Definition sound.h:70
#define MUSIC_BANK(music)
The sound bank of a music, which a stage loads for it (FieldState.soundBank)
Definition sound.h:148
FIELDSTG's start of the stage (StageEntry.init in FIELDSTG_stages): the stage's task,...
Where an actor's frames go in VRAM: one of the records after the FieldImage (Actor....
Definition field_map.h:114
A battle of an area's BattleList, which can start on the field (see FIELDSTG_startEncounter); FIGHTST...
Definition field_map.h:402
The battles of an area of the map (its cells' value at FieldMap.files[4]), one picked at random.
Definition field_map.h:411
A character of the field (FieldState.actors, a list of pointers up to NULL), which FIELDSTG_updateFie...
Definition field_map.h:194
The battles of a place (FieldState.battles), by area of the map: the fourth area's are also the ones ...
Definition field_map.h:422
void(* setFile)(s32 index, s32 file)
FIELDSTG_setMapFile.
Definition field_map.h:100
void(* setFirstMap)(s32 index)
FIELDSTG_setFirstMap: the map the player starts on (GAME.mapIndex), when the mode is new.
Definition field_map.h:104
FieldBattles *(* findBattles)(FieldBattles *list, s32 id)
the place of the list with that id
Definition field_map.h:476
s32 sheetEntry
the stage's sprite sheet, loaded before the field starts, or 0
Definition field_map.h:445
s32 soundBank
SOUND.loadBank's, or 0.
Definition field_map.h:459
StageTile * objects
the map objects, up to the first margin 0
Definition field_map.h:446
s32 imageFile
or an image archive file, or 0
Definition field_map.h:449
FieldBattles * battles
Definition field_map.h:450
Vec2 start
where the player starts
Definition field_map.h:456
StageSlot * slots
up to the first type 0
Definition field_map.h:447
ActorImage * actors
then the actors', from actors[2]
Definition field_map.h:454
s32 mapFile
the file of the map's tiles (FIELDSTG_createMapStreamer)
Definition field_map.h:444
s32 startDir
and its direction
Definition field_map.h:457
CVECTOR spriteColor
the field's sprites' color, unless cd is 0
Definition field_map.h:458
s32 textFile
the stage's text file, for the talks
Definition field_map.h:461
union FieldState::@12 images
s32 music
SOUND.playSound's, or 0.
Definition field_map.h:460
u16 place
where the last warp or trigger put the player (FieldBattles.id)
Definition game_state.h:506
Where an exit (StageSlot) leads: copyPlacePoints copies a place's points to the stage's first slots,...
Definition stage.h:50
The points of a place (GAME.place and GAME.placeArg, which the exit the player came through set)
Definition stage.h:62
What the player can trigger on a map (FIELDSTG_updateTriggers): a record of the table at FieldState....
Definition field_map.h:276
An object of a map, which FIELDSTG draws: a record of the table at FieldState.objects,...
Definition field_map.h:208
Definition gfx.h:352
AreaBattle place12Area0Battle5
Definition wstag830.c:112
FieldActorEntry actor0
Definition wstag830.c:172
AreaBattle place2Area3Battle5
Definition wstag830.c:99
AreaBattle place12Area1Battle2
Definition wstag830.c:122
void(* stageFuncs[])(void)
The stage's functions (common/start_stage.inc.c calls the first): a StageFuncs in the stages with a t...
Definition wstag830.c:207
StagePoint placePoints12_1Point2
Definition wstag830.c:47
AreaBattle place2Area2Battle6
Definition wstag830.c:87
BattleList place12Area1Battles
Definition wstag830.c:128
AreaBattle place2Area1Battle1
Definition wstag830.c:69
AreaBattle place2Area2Battle5
Definition wstag830.c:86
AreaBattle place2Area2Battle2
Definition wstag830.c:83
BattleList place12Area2Battles
Definition wstag830.c:141
AreaBattle place12Area3Battle6
Definition wstag830.c:152
AreaBattle place12Area2Battle1
Definition wstag830.c:134
StagePoints placePoints12_1
Definition wstag830.c:50
AreaBattle place2Area0Battle0
Definition wstag830.c:55
BattleList place12Area0Battles
Definition wstag830.c:115
AreaBattle place12Area1Battle7
Definition wstag830.c:127
AreaBattle place2Area2Battle4
Definition wstag830.c:85
StagePoint placePoints12_1Point1
Definition wstag830.c:48
AreaBattle place2Area3Battle0
Definition wstag830.c:94
AreaBattle place2Area0Battle1
Definition wstag830.c:56
AreaBattle place2Area3Battle2
Definition wstag830.c:96
AreaBattle place2Area0Battle3
Definition wstag830.c:58
AreaBattle place12Area0Battle1
Definition wstag830.c:108
const CVECTOR stageColor
the color the setup copies to FIELDSTG_state.spriteColor
Definition wstag830.c:13
AreaBattle place2Area0Battle5
Definition wstag830.c:60
StagePoints placePoints2_1
Definition wstag830.c:46
BattleList place2Area1Battles
Definition wstag830.c:76
AreaBattle place12Area2Battle3
Definition wstag830.c:136
FieldActorEntry * stageActors[]
Definition wstag830.c:173
AreaBattle place2Area1Battle2
Definition wstag830.c:70
StagePoint placePoints2_1Point2
Definition wstag830.c:43
AreaBattle place2Area0Battle4
Definition wstag830.c:59
AreaBattle place2Area2Battle3
Definition wstag830.c:84
AreaBattle place2Area1Battle4
Definition wstag830.c:72
StagePoint placePoints2_1Point1
Definition wstag830.c:44
AreaBattle place12Area3Battle2
Definition wstag830.c:148
AreaBattle place2Area3Battle4
Definition wstag830.c:98
AreaBattle place2Area0Battle2
Definition wstag830.c:57
AreaBattle place2Area3Battle1
Definition wstag830.c:95
AreaBattle place12Area1Battle6
Definition wstag830.c:126
AreaBattle place2Area1Battle0
Definition wstag830.c:68
ActorImage stageImages[]
Definition wstag830.c:163
AreaBattle place12Area2Battle5
Definition wstag830.c:138
void setupStage(void)
Sets the stage up: its map, actors and battles, playing BGM_0027.
Definition wstag830.c:22
AreaBattle place12Area1Battle5
Definition wstag830.c:125
AreaBattle place12Area0Battle2
Definition wstag830.c:109
BattleList place12Area3Battles
Definition wstag830.c:154
StagePoints * placePoints[]
Names some stages define.
Definition wstag830.c:52
StageTile stageObjects[]
The tables and color setupStage gives FIELDSTG_state (FieldState)
Definition wstag830.c:177
AreaBattle place2Area1Battle6
Definition wstag830.c:74
AreaBattle place12Area0Battle6
Definition wstag830.c:113
AreaBattle place12Area0Battle3
Definition wstag830.c:110
AreaBattle place12Area2Battle2
Definition wstag830.c:135
StagePoints placePoints0_0
Definition wstag830.c:51
AreaBattle place12Area1Battle1
Definition wstag830.c:121
AreaBattle place12Area3Battle7
Definition wstag830.c:153
AreaBattle place12Area3Battle4
Definition wstag830.c:150
AreaBattle place12Area1Battle0
Definition wstag830.c:120
StageSlot stageSlots[]
Definition wstag830.c:201
AreaBattle place12Area2Battle4
Definition wstag830.c:137
AreaBattle place2Area0Battle7
Definition wstag830.c:62
AreaBattle place2Area3Battle6
Definition wstag830.c:100
AreaBattle place12Area1Battle4
Definition wstag830.c:124
AreaBattle place2Area1Battle3
Definition wstag830.c:71
StagePoint placePoints2_1Point0
Definition wstag830.c:45
AreaBattle place12Area0Battle4
Definition wstag830.c:111
#define STAGE_FILE
Definition wstag830.c:19
AreaBattle place12Area0Battle0
Definition wstag830.c:107
AreaBattle place12Area3Battle5
Definition wstag830.c:151
AreaBattle place12Area3Battle3
Definition wstag830.c:149
AreaBattle place2Area3Battle7
Definition wstag830.c:101
AreaBattle place12Area1Battle3
Definition wstag830.c:123
AreaBattle place2Area1Battle5
Definition wstag830.c:73
AreaBattle place2Area1Battle7
Definition wstag830.c:75
AreaBattle place12Area0Battle7
Definition wstag830.c:114
AreaBattle place12Area3Battle1
Definition wstag830.c:147
AreaBattle place12Area2Battle0
Definition wstag830.c:133
AreaBattle place2Area2Battle7
Definition wstag830.c:88
StagePoint placePoints12_1Point0
Definition wstag830.c:49
AreaBattle place2Area3Battle3
Definition wstag830.c:97
BattleList place2Area3Battles
Definition wstag830.c:102
#define STAGE_TEXT
Definition wstag830.c:18
BattleList place2Area0Battles
Definition wstag830.c:63
AreaBattle place2Area2Battle0
Definition wstag830.c:81
AreaBattle place12Area3Battle0
Definition wstag830.c:146
AreaBattle place12Area2Battle6
Definition wstag830.c:139
BattleList place2Area2Battles
Definition wstag830.c:89
FieldBattles stageBattles[]
Definition wstag830.c:159
AreaBattle place12Area2Battle7
Definition wstag830.c:140
AreaBattle place2Area0Battle6
Definition wstag830.c:61
AreaBattle place2Area2Battle1
Definition wstag830.c:82