Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
wstag203.c
Go to the documentation of this file.
1/*
2 * WSTAG203: Amaterasu City, Central Sector: the streets by the Cargo Tower. On
3 * the Amaterasu server; its Asuka server twin is WSTAG202.
4 */
5
6#include "common.h"
7#include "field/stage.h"
8
11
12const CVECTOR stageColor = { 0x80, 0x80, 0x80, 0x00 };
13#if VERSION_US || VERSION_JP
14#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_03)
15#define STAGE_FILE 0x51B
16#elif VERSION_EU
17#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_03)
18#define STAGE_FILE 0x52B
19#endif
20/*
21 * Sets the stage up: its map, actors and battles, playing ASKA_BGM; BGM_0029
22 * instead except at STORY_PRESIDENT_ARRESTED once flag 0x1A0A is set
23 */
47
48AreaBattle area0Battle0 = { 0, 0, MUSIC(1, 0) };
49AreaBattle area0Battle1 = { 0, 0, MUSIC(1, 0) };
50AreaBattle area0Battle2 = { 0, 0, MUSIC(1, 0) };
51AreaBattle area0Battle3 = { 0, 0, MUSIC(1, 0) };
52AreaBattle area0Battle4 = { 0, 0, MUSIC(1, 0) };
53AreaBattle area0Battle5 = { 0, 0, MUSIC(1, 0) };
54AreaBattle area0Battle6 = { 0, 0, MUSIC(1, 0) };
55AreaBattle area0Battle7 = { 0, 0, MUSIC(1, 0) };
61AreaBattle area1Battle0 = { 0, 0, MUSIC(1, 0) };
62AreaBattle area1Battle1 = { 0, 0, MUSIC(1, 0) };
63AreaBattle area1Battle2 = { 0, 0, MUSIC(1, 0) };
64AreaBattle area1Battle3 = { 0, 0, MUSIC(1, 0) };
65AreaBattle area1Battle4 = { 0, 0, MUSIC(1, 0) };
66AreaBattle area1Battle5 = { 0, 0, MUSIC(1, 0) };
67AreaBattle area1Battle6 = { 0, 0, MUSIC(1, 0) };
68AreaBattle area1Battle7 = { 0, 0, MUSIC(1, 0) };
74AreaBattle area2Battle0 = { 0, 0, MUSIC(1, 0) };
75AreaBattle area2Battle1 = { 0, 0, MUSIC(1, 0) };
76AreaBattle area2Battle2 = { 0, 0, MUSIC(1, 0) };
77AreaBattle area2Battle3 = { 0, 0, MUSIC(1, 0) };
78AreaBattle area2Battle4 = { 0, 0, MUSIC(1, 0) };
79AreaBattle area2Battle5 = { 0, 0, MUSIC(1, 0) };
80AreaBattle area2Battle6 = { 0, 0, MUSIC(1, 0) };
81AreaBattle area2Battle7 = { 0, 0, MUSIC(1, 0) };
87AreaBattle area3Battle0 = { 0, 0, MUSIC(1, 0) };
88AreaBattle area3Battle1 = { 0, 0, MUSIC(1, 0) };
89AreaBattle area3Battle2 = { 0, 0, MUSIC(1, 0) };
90AreaBattle area3Battle3 = { 0, 0, MUSIC(1, 0) };
92AreaBattle area3Battle5 = { 0, 0, MUSIC(1, 0) };
93AreaBattle area3Battle6 = { 0, 0, MUSIC(1, 0) };
104 { 0x200, 0x100, 0x21C, 0x1A6, 0x70, 0xA6, 0x230, 0x1FE },
105 { 0x200, 0x100, 0x200, 0x100, 0, 0, 0x220, 0x1FE },
106 { 0x200, 0x100, 0x216, 0x138, 0x58, 0x38, 0x200, 0x1FD },
107 { 0x200, 0x100, 0x208, 0x1BC, 0x20, 0xBC, 0x210, 0x1FD },
108 { 0x200, 0x100, 0x210, 0x1BC, 0x40, 0xBC, 0x220, 0x1FD },
109 { 0x200, 0x100, 0x200, 0x1BC, 0, 0xBC, 0x230, 0x1FD },
110 { 0x180, 0x100, 0x180, 0x141, 0x100, 0x41, 0x170, 0x1FE },
111 { 0x180, 0x100, 0x19A, 0x165, 0x168, 0x65, 0x170, 0x1FD },
112 { 0x180, 0x100, 0x1B0, 0x100, 0x1C0, 0, 0x170, 0x1FC },
113 { 0x180, 0x100, 0x188, 0x151, 0x120, 0x51, 0x140, 0x1FB },
114 { 0x180, 0x100, 0x1AE, 0x152, 0x1B8, 0x52, 0x150, 0x1FB },
115 { 0x180, 0x100, 0x1B6, 0x152, 0x1D8, 0x52, 0x160, 0x1FB },
116 { 0x180, 0x100, 0x1A2, 0x163, 0x188, 0x63, 0x170, 0x1FB },
117 { 0x180, 0x100, 0x1B4, 0x17A, 0x1D0, 0x7A, 0x140, 0x1FA },
118 { 0x180, 0x100, 0x18A, 0x17F, 0x128, 0x7F, 0x150, 0x1FA },
119 { 0x180, 0x100, 0x192, 0x17F, 0x148, 0x7F, 0x160, 0x1FA },
120 { 0x180, 0x100, 0x19A, 0x185, 0x168, 0x85, 0x170, 0x1FA },
121 { 0x180, 0x100, 0x1A2, 0x18B, 0x188, 0x8B, 0x140, 0x1F9 },
122};
124 { NULL, NULL, 0xE3 },
125 { NULL, NULL, 0 },
126};
128 { NULL, NULL, 0xE4 },
129 { NULL, NULL, 0 },
130};
132 { NULL, NULL, 0xE2 },
133 { NULL, NULL, 0 },
134};
136 { NULL, NULL, 0xDC },
137 { NULL, NULL, 0 },
138};
140 { NULL, NULL, 0xDA },
141 { NULL, NULL, 0 },
142};
144 { NULL, NULL, 0xD8 },
145 { NULL, NULL, 0 },
146};
148 { NULL, NULL, 0xE1 },
149 { NULL, NULL, 0 },
150};
152 { NULL, NULL, 0xDF },
153 { NULL, NULL, 0 },
154};
156 { NULL, NULL, 0xE0 },
157 { NULL, NULL, 0 },
158};
160 { NULL, NULL, 0xDE },
161 { NULL, NULL, 0 },
162};
164 { NULL, NULL, 0xDD },
165 { NULL, NULL, 0 },
166};
168 { NULL, NULL, 0xDB },
169 { NULL, NULL, 0 },
170};
172 { NULL, NULL, 0xD9 },
173 { NULL, NULL, 0 },
174};
176 { NULL, NULL, 0xD7 },
177 { NULL, NULL, 0 },
178};
180 { NULL, NULL, 0xE5 },
181 { NULL, NULL, 0 },
182};
184 { NULL, NULL, 0xE6 },
185 { NULL, NULL, 0 },
186};
234FieldActorEntry actor7 = { actor7Conditions, actor7Talks, 0x35, 0xA, 513, 425, 7 };
235FieldActorEntry actor8 = { actor8Conditions, actor8Talks, 0x9D, 0xB, 513, 425, 7 };
236FieldActorEntry actor9 = { actor9Conditions, actor9Talks, 0x9D, 0xB, 513, 425, 7 };
244 &actor0,
245 &actor1,
246 &actor2,
247 &actor3,
248 &actor4,
249 &actor5,
250 &actor6,
251 &actor7,
252 &actor8,
253 &actor9,
254 &actor10,
255 &actor11,
256 &actor12,
257 &actor13,
258 &actor14,
259 &actor15,
260 NULL,
261};
263 { 1, 0, 0x40, 2, 0x47, 2, 0, 3, 6, 0, 174, 210, 0, 0 },
264 { 1, 0, 0x40, 2, 0x47, 2, 0, 3, 6, 0, 244, 175, 0, 0 },
265 { 1, 0, 0x40, 2, 0x47, 2, 0, 3, 6, 0, 840, 188, 0, 0 },
266 { 1, 0, 0x40, 2, 0x47, 2, 0, 3, 6, 0, 886, 211, 0, 0 },
267 { 1, 0, 0x40, 2, 0x48, 2, 0, 3, 6, 0, 341, 183, 0, 0 },
268 { 1, 0, 0x40, 2, 4, 0, 0, 0, 0, 0, 95, 116, 0, 0 },
269 { 1, 0, 0x40, 2, 0xD, 0, 0, 0, 0, 0, 168, 256, 0, 0 },
270 { 1, 0, 0x40, 2, 0xE, 0, 0, 0, 0, 0, 846, 150, 0, 0 },
271 { 1, 0, 0x58, 2, 0xF, 0, 0, 0, 0, 0, 426, 256, 0, 0 },
272 { 1, 0, 0x50, 2, 0x10, 0, 0, 0, 0, 0, 323, 384, 0, 0 },
273 { 1, 0, 0x40, 2, 0x11, 0, 0, 0, 0, 0, 640, 256, 0, 0 },
274 { 1, 0, 0x60, 2, 0x12, 0, 0, 0, 0, 0, 548, 202, 0, 0 },
275 { 1, 0, 0x40, 2, 0x13, 0, 0, 0, 0, 0, 676, 384, 0, 0 },
276 { 1, 0, 0x40, 6, 0x48, 2, 0, 3, 6, 0, 386, 160, 0, 0 },
277 { 1, 0, 0x40, 6, 0x48, 2, 0, 3, 6, 0, 498, 105, 0, 0 },
278 { 1, 0, 0x40, 6, 0x2C, 1, 0x2C, 0x3B, 0xA, 0, 155, 282, 0, 0 },
279 { 1, 0, 0x40, 6, 0x2C, 1, 0x2C, 0x3B, 0xA, 0, 668, 159, 0, 0 },
280 { 1, 0, 0x40, 6, 0x2C, 1, 0x2C, 0x3B, 0xA, 0, 847, 321, 0, 0 },
281 { 1, 0, 0x40, 6, 0x3C, 1, 0x3C, 0x46, 0xA, 0, 185, 405, 0, 0 },
282 { 1, 0, 0x40, 6, 0x3C, 1, 0x3C, 0x46, 0xA, 0, 408, 477, 0, 0 },
283 { 1, 0, 0x40, 6, 0x3C, 1, 0x3C, 0x46, 0xA, 0, 686, 248, 0, 0 },
284 { 1, 0, 0x40, 6, 0x3C, 1, 0x3C, 0x46, 0xA, 0, 745, 469, 0, 0 },
285 { 1, 0x64, 0x40, 6, 0xA, 0, 0, 0, 0, 0, 350, 152, 0, 0 },
286 { 1, 0x65, 0x40, 6, 0xB, 0, 0, 0, 0, 0, 463, 106, 0, 0 },
287 { 1, 0x66, 0x40, 6, 0xC, 0, 0, 0, 0, 0, 878, 199, 0, 0 },
288 { 1, 0, 0x40, 4, 0, 0, 0, 0, 0, 0, 224, 268, 289, 0 },
289 { 1, 0, 0x41, 4, 1, 0, 0, 0, 0, 0, 336, 159, 216, 0 },
290 { 1, 0, 0x46, 4, 2, 0, 0, 0, 0, 0, 448, 103, 162, 0 },
291 { 1, 0, 0x40, 4, 3, 0, 0, 0, 0, 0, 891, 200, 247, 0 },
292 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
293};
295 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x27A, 0x68, 0x134, 3, 0, 0, 0 },
296 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x282, 0x218, 0xF4, 3, 0x64, 0, 0 },
297 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x280, 0x216, 0xE2, 3, 0x65, 0, 0 },
298 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x27F, 0x98, 0x14A, 5, 0x66, 0, 0 },
299 { { { ITEM(0, 5), 1 }, { CODES_END, 0 } }, SLOT_GAUGE, 0x40, 0xFFF0, 0, 0, 0, 0, 0 },
300 { { { ITEM(0, 5), 1 }, { CODES_END, 0 } }, SLOT_GAUGE, 0x20, 0x18, 0, 0, 0, 0, 0 },
301 { { { ITEM(0, 5), 1 }, { CODES_END, 0 } }, SLOT_GAUGE, 0xFFE0, 0x1C, 0, 0, 0, 0, 0 },
302 { { { CODES_END, 0 }, { CODES_END, 0 } }, 0, 0, 0, 0, 0, 0, 0, 0 },
303};
304void (*stageFuncs[])(void) = {
306};
#define NULL
Definition common.h:17
unsigned short u16
Definition common.h:10
GameFlags FLAGS_00
The flag bitset FLAGS_00 and the event functions.
Definition events.c:701
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_GAUGE
the gauge game
Definition field_map.h:261
#define SLOT_EXIT
The kinds of StageSlot (type).
Definition field_map.h:255
#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 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...
Definition game_state.h:80
#define PROGRESS(n)
GAME.progress is n.
Definition game_state.h:69
#define MUSIC_ASUKA_CITY
ASKA_BGM: the Central Sector's streets and bridges, the Underground Path.
Definition sound.h:78
#define MUSIC_BATTLE
BATL0000: the maps' random battles (AreaBattle, nearly all of them)
Definition sound.h:76
#define MUSIC_CITY_CRISIS
BGM_0029: the cities and their streets instead of their music while the story is at a crisis (Knightm...
Definition sound.h:105
#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,...
#define FLAG_OINKMON_CITIZENS_RESTORED
wstag435 Gale Tower: Airdramon spins the windmill and turns everyone back from Oinkmon; tested in 62 ...
Definition story.h:1031
@ STORY_PRESIDENT_ARRESTED
WSTAG226 (Login Room, Amaterasu City), event 935, after the President of MAGAMI gives himself up (WST...
Definition story.h:136
@ STORY_MOVIE_BATTLES
WSTAG820, event 1080, with Snatchmon: each encounter plays MODE_BATTLE_MOVIE first.
Definition story.h:146
#define SPECIAL_STORY_ASUKA_HEADQUARTERS_TO_OPERATION_SIGMA
GAME.progress is from STORY_ASUKA_HEADQUARTERS to STORY_OPERATION_SIGMA (PROGRESS_RANGES[0x13])
Definition story.h:1920
#define SPECIAL_STORY_AMATERASU_BRIDGE_TO_PRESIDENT_ARRESTED
GAME.progress is from STORY_AMATERASU_BRIDGE to STORY_PRESIDENT_ARRESTED (PROGRESS_RANGES[0x14])
Definition story.h:1923
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
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
What a character says (FIELDSTG_runActorAction): the first whose conditions hold, or the last,...
Definition field_map.h:176
s32(* checkCondition)(u16 code, u16 value)
Definition game_state.h:53
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
u16 actor1Conditions[]
Definition wstag203.c:188
AreaBattle area2Battle7
Definition wstag203.c:81
FieldActorEntry actor0
Definition wstag203.c:227
void(* stageFuncs[])(void)
The stage's functions (common/start_stage.inc.c calls the first): a StageFuncs in the stages with a t...
Definition wstag203.c:304
FieldActorEntry actor6
Definition wstag203.c:233
u16 actor11Conditions[]
Definition wstag203.c:214
FieldTalk actor2Talks[]
Definition wstag203.c:131
AreaBattle area2Battle6
Definition wstag203.c:80
u16 actor10Conditions[]
Definition wstag203.c:213
FieldTalk actor14Talks[]
Definition wstag203.c:179
FieldTalk actor5Talks[]
Definition wstag203.c:143
AreaBattle area1Battle6
Definition wstag203.c:67
FieldActorEntry actor5
Definition wstag203.c:232
AreaBattle area0Battle7
Definition wstag203.c:55
FieldActorEntry actor2
Definition wstag203.c:229
const CVECTOR stageColor
the color the setup copies to FIELDSTG_state.spriteColor
Definition wstag203.c:12
AreaBattle area3Battle4
Definition wstag203.c:91
AreaBattle area3Battle3
Definition wstag203.c:90
AreaBattle area0Battle1
Definition wstag203.c:49
AreaBattle area2Battle0
Definition wstag203.c:74
u16 actor9Conditions[]
Definition wstag203.c:208
FieldActorEntry * stageActors[]
Definition wstag203.c:243
AreaBattle area1Battle2
Definition wstag203.c:63
AreaBattle area3Battle0
Definition wstag203.c:87
AreaBattle area0Battle6
Definition wstag203.c:54
FieldTalk actor1Talks[]
Definition wstag203.c:127
u16 actor13Conditions[]
Definition wstag203.c:220
AreaBattle area3Battle2
Definition wstag203.c:89
FieldTalk actor0Talks[]
Definition wstag203.c:123
AreaBattle area3Battle1
Definition wstag203.c:88
AreaBattle area0Battle3
Definition wstag203.c:51
FieldActorEntry actor10
Definition wstag203.c:237
FieldTalk actor4Talks[]
Definition wstag203.c:139
u16 actor4Conditions[]
Definition wstag203.c:195
FieldActorEntry actor4
Definition wstag203.c:231
u16 actor3Conditions[]
Definition wstag203.c:190
AreaBattle area3Battle6
Definition wstag203.c:93
FieldTalk actor11Talks[]
Definition wstag203.c:167
FieldActorEntry actor8
Definition wstag203.c:235
ActorImage stageImages[]
Definition wstag203.c:103
FieldTalk actor6Talks[]
Definition wstag203.c:147
void setupStage(void)
Sets the stage up: its map, actors and battles, playing ASKA_BGM; BGM_0029 instead except at STORY_PR...
Definition wstag203.c:24
AreaBattle area2Battle4
Definition wstag203.c:78
StageTile stageObjects[]
The tables and color setupStage gives FIELDSTG_state (FieldState)
Definition wstag203.c:262
FieldActorEntry actor9
Definition wstag203.c:236
u16 actor8Conditions[]
Definition wstag203.c:207
u16 actor5Conditions[]
Definition wstag203.c:196
FieldTalk actor10Talks[]
Definition wstag203.c:163
FieldTalk actor3Talks[]
Definition wstag203.c:135
FieldTalk actor9Talks[]
Definition wstag203.c:159
BattleList area3Battles
Definition wstag203.c:95
AreaBattle area3Battle5
Definition wstag203.c:92
AreaBattle area0Battle5
Definition wstag203.c:53
BattleList area1Battles
Definition wstag203.c:69
FieldTalk actor15Talks[]
Definition wstag203.c:183
BattleList area2Battles
Definition wstag203.c:82
FieldActorEntry actor15
Definition wstag203.c:242
FieldActorEntry actor12
Definition wstag203.c:239
u16 actor15Conditions[]
Definition wstag203.c:226
AreaBattle area1Battle4
Definition wstag203.c:65
u16 actor6Conditions[]
Definition wstag203.c:201
AreaBattle area2Battle2
Definition wstag203.c:76
AreaBattle area1Battle5
Definition wstag203.c:66
u16 actor14Conditions[]
Definition wstag203.c:225
FieldActorEntry actor7
Definition wstag203.c:234
StageSlot stageSlots[]
Definition wstag203.c:294
AreaBattle area2Battle1
Definition wstag203.c:75
FieldActorEntry actor13
Definition wstag203.c:240
AreaBattle area1Battle3
Definition wstag203.c:64
AreaBattle area1Battle0
Definition wstag203.c:61
FieldActorEntry actor11
Definition wstag203.c:238
FieldActorEntry actor1
Definition wstag203.c:228
AreaBattle area0Battle0
Definition wstag203.c:48
AreaBattle area0Battle2
Definition wstag203.c:50
FieldTalk actor13Talks[]
Definition wstag203.c:175
#define STAGE_FILE
Definition wstag203.c:18
AreaBattle area2Battle5
Definition wstag203.c:79
AreaBattle area1Battle1
Definition wstag203.c:62
u16 actor7Conditions[]
Definition wstag203.c:202
AreaBattle area2Battle3
Definition wstag203.c:77
u16 actor2Conditions[]
Definition wstag203.c:189
FieldTalk actor7Talks[]
Definition wstag203.c:151
AreaBattle area0Battle4
Definition wstag203.c:52
#define STAGE_TEXT
Definition wstag203.c:17
FieldTalk actor8Talks[]
Definition wstag203.c:155
FieldTalk actor12Talks[]
Definition wstag203.c:171
AreaBattle area3Battle7
Definition wstag203.c:94
BattleList area0Battles
Definition wstag203.c:56
AreaBattle area1Battle7
Definition wstag203.c:68
FieldActorEntry actor3
Definition wstag203.c:230
FieldBattles stageBattles[]
Definition wstag203.c:100
FieldActorEntry actor14
Definition wstag203.c:241
u16 actor12Conditions[]
Definition wstag203.c:219
u16 actor0Conditions[]
Definition wstag203.c:187