Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
wstag320.c
Go to the documentation of this file.
1/*
2 * WSTAG320: Asuka Sewers, Asuka City.
3 */
4
5#include "common.h"
6#include "field/stage.h"
7
8/* Hides the map objects with animation 10 from story progress 0x16 on */
9void updateStage(StageTask *task) {
10 StageTile *tile;
11
12 switch (task->state) {
13 case TASK_INIT:
14 default:
16 for (tile = FIELDSTG_state.objects; tile->margin != 0; tile++) {
17 if (tile->anim == 10) {
18 tile->visible = 0;
19 }
20 }
21 }
22 task->nextState(task);
23 break;
24 case TASK_RUN:
25 case TASK_DONE:
26 case TASK_KILL:
27 break;
28 }
29}
30
32
33/* After event 290, with Mischievous Mat: gives the player the Agumon Suit */
34void endEvent290(void) {
35 FLAGS_00.applyAction(ITEM(0, 0xF), 1);
36}
37
38const CVECTOR stageColor = { 0x54, 0x67, 0x96, 0x00 };
39#if VERSION_US || VERSION_JP
40#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_05)
41#define EVENT_TEXT_FILE (TEXT_EVENTS_300 - 1)
42#define STAGE_FILE 0x295
43#define STAGE_ARCHIVE 0x317
44#elif VERSION_EU
45#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_05)
46#define EVENT_TEXT_FILE (TEXT_EVENTS_300 - 1)
47#define STAGE_FILE 0x2A4
48#define STAGE_ARCHIVE 0x326
49#endif
50/*
51 * Sets the stage up: its map, actors, battles and events, playing BGM_0003;
52 * BGM_0029 instead at story steps 0x14 to 0x17 and 0x27 to 0x28
53 */
83
85 SCRIPT_FOLLOW(1, 2),
86 SCRIPT_WALK(2, 0x181, 0xC1, 7),
87 SCRIPT_PLACE(0x37, 0x1A1, 0xD1),
88 SCRIPT_POSE(0x37, 1, 3),
91 SCRIPT_POSE(2, 1, 7),
92 SCRIPT_WAIT(6),
93 SCRIPT_WAIT(0x1E),
94 SCRIPT_TALK(0, 1, 0x37, 2),
96 SCRIPT_WAIT(0x1E),
97 SCRIPT_TALK(0, 2, 2, 0),
98 SCRIPT_POSE(2, 7, 7),
100 SCRIPT_POSE(2, 1, 7),
101 SCRIPT_WAIT(0x1E),
102 SCRIPT_TALK(0, 3, 0x37, 2),
104 SCRIPT_WAIT(0x1E),
105 SCRIPT_TALK(0, 4, 2, 0),
106 SCRIPT_POSE(2, 7, 7),
108 SCRIPT_POSE(2, 1, 7),
109 SCRIPT_WAIT(0x1E),
110 SCRIPT_TALK(0, 5, 0x37, 2),
113 SCRIPT_WAIT(0x1E),
114 SCRIPT_TALK(0, 6, 2, 0),
115 SCRIPT_POSE(2, 7, 7),
117 SCRIPT_POSE(2, 1, 7),
118 SCRIPT_WAIT(0x1E),
119 SCRIPT_TALK(0, 7, 0x37, 2),
121 SCRIPT_WAIT(0x1E),
122 SCRIPT_WALK(2, 0x199, 0xB5, 5),
124 SCRIPT_WALK(2, 0x15D, 0x77, 3),
125 SCRIPT_WAIT(6),
126 SCRIPT_LEAVE(0x20B, 0x240, 0x140, 3),
128};
142AreaBattle area1Battle0 = { 0, 0, MUSIC(1, 0) };
143AreaBattle area1Battle1 = { 0, 0, MUSIC(1, 0) };
144AreaBattle area1Battle2 = { 0, 0, MUSIC(1, 0) };
145AreaBattle area1Battle3 = { 0, 0, MUSIC(1, 0) };
146AreaBattle area1Battle4 = { 0, 0, MUSIC(1, 0) };
147AreaBattle area1Battle5 = { 0, 0, MUSIC(1, 0) };
148AreaBattle area1Battle6 = { 0, 0, MUSIC(1, 0) };
149AreaBattle area1Battle7 = { 0, 0, MUSIC(1, 0) };
155AreaBattle area2Battle0 = { 0, 0, MUSIC(1, 0) };
156AreaBattle area2Battle1 = { 0, 0, MUSIC(1, 0) };
157AreaBattle area2Battle2 = { 0, 0, MUSIC(1, 0) };
158AreaBattle area2Battle3 = { 0, 0, MUSIC(1, 0) };
159AreaBattle area2Battle4 = { 0, 0, MUSIC(1, 0) };
160AreaBattle area2Battle5 = { 0, 0, MUSIC(1, 0) };
161AreaBattle area2Battle6 = { 0, 0, MUSIC(1, 0) };
162AreaBattle area2Battle7 = { 0, 0, MUSIC(1, 0) };
168AreaBattle area3Battle0 = { 0, 0, MUSIC(1, 0) };
169AreaBattle area3Battle1 = { 0, 0, MUSIC(1, 0) };
170AreaBattle area3Battle2 = { 0, 0, MUSIC(1, 0) };
171AreaBattle area3Battle3 = { 0, 0, MUSIC(1, 0) };
172AreaBattle area3Battle4 = { 0, 0, MUSIC(1, 0) };
173AreaBattle area3Battle5 = { 0, 0, MUSIC(1, 0) };
174AreaBattle area3Battle6 = { 0, 0, MUSIC(1, 0) };
175AreaBattle area3Battle7 = { 0, 0, MUSIC(1, 0) };
185 { 0x200, 0x100, 0x21C, 0x1A6, 0x70, 0xA6, 0x230, 0x1FE },
186 { 0x200, 0x100, 0x200, 0x100, 0, 0, 0x220, 0x1FE },
187 { 0x200, 0x100, 0x216, 0x138, 0x58, 0x38, 0x200, 0x1FD },
188 { 0x200, 0x100, 0x208, 0x1BC, 0x20, 0xBC, 0x210, 0x1FD },
189 { 0x200, 0x100, 0x210, 0x1BC, 0x40, 0xBC, 0x220, 0x1FD },
190 { 0x200, 0x100, 0x200, 0x1BC, 0, 0xBC, 0x230, 0x1FD },
191 { 0x180, 0x100, 0x1B8, 0x100, 0x1E0, 0, 0x170, 0x1F5 },
192 { 0x180, 0x100, 0x194, 0x150, 0x150, 0x50, 0x140, 0x1F4 },
193 { 0x180, 0x100, 0x19E, 0x130, 0x178, 0x30, 0x160, 0x1F4 },
194 { 0x180, 0x100, 0x19C, 0x150, 0x170, 0x50, 0x170, 0x1F4 },
195 { 0x180, 0x100, 0x1A4, 0x170, 0x190, 0x70, 0x140, 0x1F3 },
196};
218 { NULL, actor0Talk0Actions, 0x453 },
219 { NULL, NULL, 0 },
220};
228 { NULL, NULL, 0x455 },
229 { NULL, NULL, 0 },
230};
232 { NULL, NULL, 0x456 },
233 { NULL, NULL, 0 },
234};
236 { NULL, NULL, 0x45A },
237 { NULL, NULL, 0 },
238};
240 { NULL, NULL, 0x458 },
241 { NULL, NULL, 0 },
242};
244 { NULL, NULL, 0x45D },
245 { NULL, NULL, 0 },
246};
248 { NULL, NULL, 0x455 },
249 { NULL, NULL, 0 },
250};
252 { NULL, NULL, 0x459 },
253 { NULL, NULL, 0 },
254};
256 { NULL, NULL, 0x45B },
257 { NULL, NULL, 0 },
258};
260 { NULL, NULL, 0x457 },
261 { NULL, NULL, 0 },
262};
264 { NULL, actor11Talk0Actions, 0x44D },
265 { NULL, NULL, 0 },
266};
268 { NULL, NULL, 0x89 },
269 { NULL, NULL, 0 },
270};
272 { NULL, NULL, 0x53 },
273 { NULL, NULL, 0 },
274};
281 { NULL, NULL, 0x45C },
282 { NULL, NULL, 0 },
283};
325 &actor0,
326 &actor1,
327 &actor2,
328 &actor3,
329 &actor4,
330 &actor5,
331 &actor6,
332 &actor7,
333 &actor8,
334 &actor9,
335 &actor10,
336 &actor11,
337 &actor12,
338 &actor13,
339 &actor14,
340 &actor15,
341 NULL,
342};
344 { 1, 0, 0x40, 2, 0x47, 1, 0x47, 0x4C, 4, 0, 395, 311, 0, 0 },
345 { 1, 0, 0x40, 2, 0x47, 1, 0x47, 0x4C, 4, 0, 871, 533, 0, 0 },
346 { 1, 0, 0x40, 2, 0x47, 1, 0x47, 0x4C, 4, 0, 1037, 703, 0, 0 },
347 { 1, 0, 0x40, 2, 0x4D, 2, 0, 3, 4, 0, 1012, 671, 0, 0 },
348 { 1, 0, 0x40, 2, 0x52, 2, 0, 3, 8, 0, 442, 116, 0, 0 },
349 { 1, 0, 0x40, 2, 0x52, 2, 0, 3, 8, 0, 473, 132, 0, 0 },
350 { 1, 0, 0x40, 2, 0x53, 2, 0, 3, 4, 0, 299, 39, 0, 0 },
351 { 1, 0, 0x40, 2, 0x5A, 0, 0, 0, 0, 0, 472, 396, 0, 0 },
352 { 1, 0, 0x40, 2, 0x5E, 2, 0, 5, 4, 0, 871, 417, 0, 0 },
353 { 1, 0, 0x40, 2, 0x5E, 2, 0, 5, 4, 0, 871, 449, 0, 0 },
354 { 1, 0, 0x40, 2, 0x5E, 2, 0, 5, 4, 0, 871, 481, 0, 0 },
355 { 1, 0, 0x40, 2, 0x5E, 2, 0, 5, 4, 0, 871, 513, 0, 0 },
356 { 1, 0, 0x40, 2, 0x5E, 2, 0, 5, 4, 0, 871, 544, 0, 0 },
357 { 1, 0, 0x40, 6, 0x47, 1, 0x47, 0x4C, 4, 0, 735, 465, 0, 0 },
358 { 1, 0, 0x40, 6, 0x4E, 2, 0, 3, 6, 0, 328, 658, 0, 0 },
359 { 1, 0, 0x40, 6, 0x4E, 2, 0, 3, 6, 0, 616, 802, 0, 0 },
360 { 1, 0, 0x40, 6, 0x4E, 2, 0, 3, 6, 0, 760, 730, 0, 0 },
361 { 1, 0, 0x40, 6, 0x4E, 2, 0, 3, 6, 0, 904, 802, 0, 0 },
362 { 1, 0, 0x40, 6, 0x4F, 2, 0, 3, 6, 0, 351, 643, 0, 0 },
363 { 1, 0, 0x40, 6, 0x4F, 2, 0, 3, 6, 0, 639, 787, 0, 0 },
364 { 1, 0, 0x40, 6, 0x4F, 2, 0, 3, 6, 0, 783, 715, 0, 0 },
365 { 1, 0, 0x40, 6, 0x4F, 2, 0, 3, 6, 0, 927, 787, 0, 0 },
366 { 1, 0, 0x40, 6, 0x51, 2, 0, 3, 6, 0, 324, 632, 0, 0 },
367 { 1, 0, 0x40, 6, 0x51, 2, 0, 3, 6, 0, 612, 776, 0, 0 },
368 { 1, 0, 0x40, 6, 0x51, 2, 0, 3, 6, 0, 756, 704, 0, 0 },
369 { 1, 0, 0x40, 6, 0x51, 2, 0, 3, 6, 0, 900, 776, 0, 0 },
370 { 1, 0, 0x40, 6, 0x50, 2, 0, 3, 6, 0, 305, 643, 0, 0 },
371 { 1, 0, 0x40, 6, 0x50, 2, 0, 3, 6, 0, 593, 788, 0, 0 },
372 { 1, 0, 0x40, 6, 0x50, 2, 0, 3, 6, 0, 737, 715, 0, 0 },
373 { 1, 0, 0x40, 6, 0x50, 2, 0, 3, 6, 0, 881, 787, 0, 0 },
374 { 1, 0, 0x40, 6, 0x54, 2, 0, 3, 8, 0, 202, 416, 0, 0 },
375 { 1, 0, 0x40, 6, 0x54, 2, 0, 3, 8, 0, 210, 420, 0, 0 },
376 { 1, 0, 0x40, 6, 0x54, 2, 0, 3, 8, 0, 218, 424, 0, 0 },
377 { 1, 0, 0x40, 6, 0x54, 2, 0, 3, 8, 0, 226, 428, 0, 0 },
378 { 1, 0, 0x40, 6, 0x54, 2, 0, 3, 8, 0, 234, 432, 0, 0 },
379 { 1, 0, 0x40, 6, 0x54, 2, 0, 3, 8, 0, 242, 436, 0, 0 },
380 { 1, 0, 0x40, 6, 0x54, 2, 0, 3, 8, 0, 250, 440, 0, 0 },
381 { 1, 0, 0x40, 6, 0x54, 2, 0, 3, 8, 0, 258, 444, 0, 0 },
382 { 1, 0, 0x40, 6, 0x54, 2, 0, 3, 8, 0, 266, 352, 0, 0 },
383 { 1, 0, 0x40, 6, 0x54, 2, 0, 3, 8, 0, 274, 356, 0, 0 },
384 { 1, 0, 0x40, 6, 0x54, 2, 0, 3, 8, 0, 282, 360, 0, 0 },
385 { 1, 0, 0x40, 6, 0x54, 2, 0, 3, 8, 0, 290, 364, 0, 0 },
386 { 1, 0, 0x40, 6, 0x54, 2, 0, 3, 8, 0, 298, 368, 0, 0 },
387 { 1, 0, 0x40, 6, 0x54, 2, 0, 3, 8, 0, 306, 372, 0, 0 },
388 { 1, 0, 0x40, 6, 0x54, 2, 0, 3, 8, 0, 314, 376, 0, 0 },
389 { 1, 0, 0x40, 6, 0x55, 2, 0, 3, 8, 0, 322, 380, 0, 0 },
390 { 1, 0, 0x40, 6, 0x56, 2, 0, 3, 8, 0, 270, 444, 0, 0 },
391 { 1, 0, 0x40, 6, 0x56, 2, 0, 3, 8, 0, 278, 440, 0, 0 },
392 { 1, 0, 0x40, 6, 0x56, 2, 0, 3, 8, 0, 286, 436, 0, 0 },
393 { 1, 0, 0x40, 6, 0x56, 2, 0, 3, 8, 0, 294, 432, 0, 0 },
394 { 1, 0, 0x40, 6, 0x56, 2, 0, 3, 8, 0, 302, 428, 0, 0 },
395 { 1, 0, 0x40, 6, 0x56, 2, 0, 3, 8, 0, 310, 424, 0, 0 },
396 { 1, 0, 0x40, 6, 0x56, 2, 0, 3, 8, 0, 358, 400, 0, 0 },
397 { 1, 0, 0x40, 6, 0x56, 2, 0, 3, 8, 0, 366, 396, 0, 0 },
398 { 1, 0, 0x40, 6, 0x56, 2, 0, 3, 8, 0, 374, 392, 0, 0 },
399 { 1, 0, 0x40, 6, 0x56, 2, 0, 3, 8, 0, 382, 388, 0, 0 },
400 { 1, 0, 0x40, 6, 0x56, 2, 0, 3, 8, 0, 390, 384, 0, 0 },
401 { 1, 0, 0x40, 6, 0x57, 2, 0, 3, 8, 0, 349, 405, 0, 0 },
402 { 1, 0, 0x40, 6, 0x58, 2, 0, 3, 4, 0, 439, 395, 0, 0 },
403 { 1, 0, 0x40, 6, 0x59, 2, 0, 3, 4, 0, 540, 398, 0, 0 },
404 { 1, 0, 0x40, 6, 0x5B, 2, 0, 3, 4, 0, 612, 416, 0, 0 },
405 { 1, 0, 0x40, 6, 0x5F, 2, 0, 1, 4, 0, 646, 530, 0, 0 },
406 { 1, 0, 0x40, 6, 0x5F, 2, 0, 1, 4, 0, 688, 509, 0, 0 },
407 { 1, 0, 0x40, 6, 0x5F, 2, 0, 1, 4, 0, 790, 602, 0, 0 },
408 { 1, 0, 0x40, 6, 0x5F, 2, 0, 1, 4, 0, 790, 746, 0, 0 },
409 { 1, 0, 0x40, 6, 0x5F, 2, 0, 1, 4, 0, 832, 581, 0, 0 },
410 { 1, 0, 0x40, 6, 0x5F, 2, 0, 1, 4, 0, 832, 725, 0, 0 },
411 { 1, 0, 0x40, 6, 0x60, 2, 0, 1, 4, 0, 358, 674, 0, 0 },
412 { 1, 0, 0x40, 6, 0x60, 2, 0, 1, 4, 0, 400, 653, 0, 0 },
413 { 1, 0, 0x40, 6, 0x60, 2, 0, 1, 4, 0, 519, 754, 0, 0 },
414 { 1, 0, 0x40, 6, 0x60, 2, 0, 1, 4, 0, 535, 458, 0, 0 },
415 { 1, 0, 0x40, 6, 0x60, 2, 0, 1, 4, 0, 560, 733, 0, 0 },
416 { 1, 0, 0x40, 6, 0x60, 2, 0, 1, 4, 0, 576, 437, 0, 0 },
417 { 1, 0, 0x40, 6, 0x61, 2, 0, 1, 4, 0, 648, 724, 0, 0 },
418 { 1, 0, 0x40, 6, 0x61, 2, 0, 1, 4, 0, 690, 746, 0, 0 },
419 { 1, 0, 0x40, 6, 0x61, 2, 0, 1, 4, 0, 792, 653, 0, 0 },
420 { 1, 0, 0x40, 6, 0x61, 2, 0, 1, 4, 0, 833, 674, 0, 0 },
421 { 1, 0, 0x40, 6, 0x61, 2, 0, 1, 4, 0, 936, 725, 0, 0 },
422 { 1, 0, 0x40, 6, 0x61, 2, 0, 1, 4, 0, 978, 746, 0, 0 },
423 { 1, 0, 0x40, 6, 0x62, 2, 0, 1, 4, 0, 654, 640, 0, 0 },
424 { 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x34, 0xA, 0, 102, 448, 0, 0 },
425 { 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x34, 0xA, 0, 159, 484, 0, 0 },
426 { 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x34, 0xA, 0, 174, 374, 0, 0 },
427 { 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x34, 0xA, 0, 273, 382, 0, 0 },
428 { 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x34, 0xA, 0, 390, 366, 0, 0 },
429 { 1, 0, 0x40, 6, 0x35, 1, 0x35, 0x37, 0xA, 0, 128, 396, 0, 0 },
430 { 1, 0, 0x40, 6, 0x35, 1, 0x35, 0x37, 0xA, 0, 177, 460, 0, 0 },
431 { 1, 0, 0x40, 6, 0x35, 1, 0x35, 0x37, 0xA, 0, 209, 367, 0, 0 },
432 { 1, 0, 0x40, 6, 0x38, 1, 0x38, 0x3A, 0xA, 0, 94, 418, 0, 0 },
433 { 1, 0, 0x40, 6, 0x38, 1, 0x38, 0x3A, 0xA, 0, 194, 530, 0, 0 },
434 { 1, 0, 0x40, 6, 0x3B, 1, 0x3B, 0x3D, 0xA, 0, 98, 495, 0, 0 },
435 { 1, 0, 0x40, 6, 0x3B, 1, 0x3B, 0x3D, 0xA, 0, 546, 532, 0, 0 },
436 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 366, 486, 0, 0 },
437 { 1, 0, 0x40, 6, 0x41, 1, 0x41, 0x43, 0xA, 0, 251, 381, 0, 0 },
438 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 70, 467, 0, 0 },
439 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 76, 433, 0, 0 },
440 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 129, 505, 0, 0 },
441 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 179, 534, 0, 0 },
442 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 186, 472, 0, 0 },
443 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 187, 526, 0, 0 },
444 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 263, 395, 0, 0 },
445 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 352, 473, 0, 0 },
446 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 393, 415, 0, 0 },
447 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 553, 516, 0, 0 },
448 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 956, 689, 0, 0 },
449 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 966, 668, 0, 0 },
450 { 1, 0xA, 0xA0, 6, 0, 0, 0, 0, 0, 0, 792, 381, 0, 0 },
451 { 1, 0, 0x60, 6, 1, 0, 0, 0, 0, 0, 721, 691, 0, 0 },
452 { 1, 0, 0x60, 6, 1, 0, 0, 0, 0, 0, 865, 763, 0, 0 },
453 { 1, 0, 0x40, 6, 0x5E, 2, 0, 5, 4, 0, 775, 369, 0, 0 },
454 { 1, 0, 0x40, 6, 0x5E, 2, 0, 5, 4, 0, 775, 401, 0, 0 },
455 { 1, 0, 0x40, 6, 0x5E, 2, 0, 5, 4, 0, 775, 433, 0, 0 },
456 { 1, 0, 0x40, 6, 0x5E, 2, 0, 5, 4, 0, 775, 465, 0, 0 },
457 { 1, 0, 0x40, 6, 0x5E, 2, 0, 5, 4, 0, 775, 497, 0, 0 },
458 { 1, 0, 0x40, 0xA, 0x20, 1, 0x20, 0x22, 6, 0, 546, 665, 0, 0 },
459 { 1, 0, 0x40, 0xA, 0x20, 1, 0x20, 0x22, 6, 0, 833, 798, 0, 0 },
460 { 1, 0, 0x40, 0xA, 0x2A, 1, 0x2A, 0x2D, 6, 0, 545, 558, 0, 0 },
461 { 1, 0, 0x40, 0xA, 0x2A, 1, 0x2A, 0x2D, 6, 0, 834, 701, 0, 0 },
462 { 1, 0, 0x40, 0xA, 0x23, 1, 0x23, 0x25, 6, 0, -12, 814, 0, 0 },
463 { 1, 0, 0x40, 0xA, 0x23, 1, 0x23, 0x25, 6, 0, 0, 364, 0, 0 },
464 { 1, 0, 0x40, 0xA, 0x23, 1, 0x23, 0x25, 6, 0, 100, 758, 0, 0 },
465 { 1, 0, 0x40, 0xA, 0x23, 1, 0x23, 0x25, 6, 0, 212, 702, 0, 0 },
466 { 1, 0, 0x40, 0xA, 0x23, 1, 0x23, 0x25, 6, 0, 324, 646, 0, 0 },
467 { 1, 0, 0x40, 0xA, 0x2E, 1, 0x2E, 0x31, 0xA, 0, -14, 713, 0, 0 },
468 { 1, 0, 0x40, 0xA, 0x2E, 1, 0x2E, 0x31, 0xA, 0, 99, 658, 0, 0 },
469 { 1, 0, 0x40, 0xA, 0x2E, 1, 0x2E, 0x31, 0xA, 0, 210, 602, 0, 0 },
470 { 1, 0, 0x40, 0xA, 0x2E, 1, 0x2E, 0x31, 0xA, 0, 322, 546, 0, 0 },
471 { 1, 0, 0x40, 0xA, 0x26, 1, 0x26, 0x29, 6, 0, 11, 408, 0, 0 },
472 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
473};
475 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x20B, 0x242, 0x13E, 3, 0, 0, 0 },
476 { { { SPECIAL_STORY_CONTROL_ROOM_TO_GUNSLINGER, 1 }, { CODES_END, 0 } }, SLOT_EXIT, 0x21A, 0x68, 0x304, 5, 0, 0, 0 },
477 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x21C, 0x88, 0x1B4, 5, 0, 0, 0 },
478 { { { SPECIAL_STORY_SINCE_DE_SINCERITY, 1 }, { CODES_END, 0 } }, SLOT_WARP0, 0x2E0, 0x240, 0xD8, 1, 0, 2, 1 },
479 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_CLIMB_DOWN, 4, 0x130, 0xF8, 0, 0, 0, 0 },
480 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_CLIMB_UP, 4, 0x120, 0x140, 0, 0, 0, 0 },
481 { { { SPECIAL_STORY_SINCE_DE_SINCERITY, 1 }, { CODES_END, 0 } }, SLOT_WARP0, 0x2E0, 0x240, 0xD8, 1, 0, 2, 1 },
482 { { { CODES_END, 0 }, { CODES_END, 0 } }, 0, 0, 0, 0, 0, 0, 0, 0 },
483};
484void (*stageFuncs[])(void) = {
486};
488 { 290, script290, EVENT_TEXT(2), NULL, endEvent290 },
489 { -1, NULL, 0, NULL, NULL },
490};
#define NULL
Definition common.h:17
signed short s16
Definition common.h:9
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
#define TASK_RUN
Definition task.h:35
#define TASK_KILL
Definition task.h:37
#define TASK_INIT
Tasks: every game object is a task, a heap block that starts with this header and is updated once per...
Definition task.h:34
#define TASK_DONE
Definition task.h:36
The stage overlays (AAA/PRO/WSTAG###.PRO), loaded at 0x800A4CA4 on top of FIELDSTG.
#define EVENT_TEXT(n)
An entry of the stage's events' text file, for FieldEvent.text.
Definition stage.h:732
void updateStage()
The names every stage defines, each its own (config/<version>/stages/<stage>.txt).
#define SLOT_CLIMB_UP
Definition field_map.h:256
#define SCRIPT_WAIT_WALK(id)
until the character gets to its goal
Definition field_map.h:168
#define FIELD_COMMAND_HALT_PARTNERS
The field commands, which an event script hands FIELD_TASK_COMMANDS as the first argument of a pose c...
Definition field_map.h:41
#define SCRIPT_END
The commands of an event script (FieldEvent.script), as FIELDSTG_runEvent reads them: a halfword kind...
Definition field_map.h:156
#define SCRIPT_LEAVE(mode, x, y, dir)
FIELDSTG_leaveField; ends the event.
Definition field_map.h:170
#define SCRIPT_COMMAND(id, command, arg)
the same word for a script command's id: FIELDSTG_setEventPose creates its task if none runs and hand...
Definition field_map.h:161
#define SCRIPT_FOLLOW(snap, id)
FIELDSTG_followWithCamera.
Definition field_map.h:171
#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 FIELD_COMMAND_ICON3
its substate 3, with ITEM_GET
Definition field_map.h:44
#define SLOT_CLIMB_DOWN
Definition field_map.h:257
#define SCRIPT_WALK(id, x, y, dir)
Actor.setGoal: walks to (x, y), then faces dir.
Definition field_map.h:162
#define SCRIPT_WAIT_BOX
until box 0 closes
Definition field_map.h:167
#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 SCRIPT_POSE(id, set, dir)
Actor.setPose: its animation set, facing dir.
Definition field_map.h:158
#define FIELD_MAP_TRIGGERS
a cell's value: a direction (3 bits) and a StageSlot (5)
Definition field_map.h:88
#define SCRIPT_WAIT(frames)
Definition field_map.h:166
#define FIELD_TASK_COMMANDS
script command 813 (FIELDSTG_startCommandTask): the field commands
Definition field_map.h:33
#define SLOT_WARP0
the same with effect and cutscene 0
Definition field_map.h:264
#define SCRIPT_PLACE(id, x, y)
puts a character at (x, y)
Definition field_map.h:157
#define SCRIPT_TALK(box, entry, id, kind)
box of the event's boxes shows the event text's entry: a talk box at the corner kind next to the char...
Definition field_map.h:165
FieldMap FIELDSTG_map
Definition fieldstg.c:3660
FieldState FIELDSTG_state
Definition fieldstg.c:2641
#define START_EVENT(index)
action: FIELDSTG_startListedEvent
Definition game_state.h:81
#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 FLAG(group, id)
The codes of the (code, value) pairs that FLAGS_00 checks as conditions and applies as actions (event...
Definition game_state.h:68
#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_SEWERS
BGM_0003: the Admin Center's basement and the cities' sewers.
Definition sound.h:80
#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_KAIL_ETEMON_SUIT_TALKED
wstag210 Main Lobby: Kail explains the man used an Etemon Suit and sends the player to ask about Digi...
Definition story.h:1061
#define SPECIAL_GAIN_300_BIT
an action: gives the player 300 BIT (MONEY_GAINS[1])
Definition story.h:1824
#define SPECIAL_STORY_JUNGLE_SOUND_TO_AMATERASU_BRIDGE
GAME.progress is from STORY_JUNGLE_SOUND to STORY_AMATERASU_BRIDGE (PROGRESS_RANGES[0x12])
Definition story.h:1917
@ STORY_PRESIDENT_ARRESTED
WSTAG226 (Login Room, Amaterasu City), event 935, after the President of MAGAMI gives himself up (WST...
Definition story.h:136
@ STORY_AGUMON_SUITS
WSTAG380 (Divermon's Lake), event 205: the Mischievous Mat, caught in his Etemon Suit,...
Definition story.h:52
@ STORY_BYAKKO_LEADER_FOUGHT
WSTAG620 (the rebels' hideout), event 534: the Byakko Leader takes the player for the A....
Definition story.h:85
@ STORY_ZANBAMON_DRIVEN_OFF
WSTAG475 (Shaman House), event 230: the Smelly Herb drives Zanbamon off the way.
Definition story.h:55
@ STORY_CONTROL_ROOM
WSTAG325 (Control Room, Asuka City), event 560: a Soldier guards the way.
Definition story.h:90
@ STORY_GUNSLINGER
WSTAG810 (Gunslinger 1F), event 1035.
Definition story.h:143
@ STORY_KNIGHTMON_REPROGRAMMED
WSTAG210 (Main Lobby, Asuka City), event 685: the A.o.A have reprogrammed Knightmon,...
Definition story.h:97
@ STORY_TEDDY_FOUND
WSTAG212, event 352: Teddy is found; MAGAMI is part of the A.o.A, and the player sets off to beat the...
Definition story.h:67
@ STORY_LOOKING_FOR_TEDDY
WSTAG212, event 273: Kail and the player will put on the Agumon Suits to look for Teddy.
Definition story.h:61
@ STORY_MOVIE_BATTLES
WSTAG820, event 1080, with Snatchmon: each encounter plays MODE_BATTLE_MOVIE first.
Definition story.h:146
@ STORY_STAFF_PASS
WSTAG620, event 551: Nick finds a Staff Pass for the player.
Definition story.h:87
@ STORY_ASUKA_HEADQUARTERS
WSTAG310 (A.o.A Headquarters, Asuka City), event 961.
Definition story.h:138
#define FLAG_SUIT_COUPLE_TALKED
wstag202: Jake and Grandma Beth show their Digimon suits from Etemon; then a man replaces Etemon in t...
Definition story.h:1055
#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_CONTROL_ROOM_TO_GUNSLINGER
GAME.progress is from STORY_CONTROL_ROOM to 0x2A (PROGRESS_RANGES[9]); nothing sets 0x2A,...
Definition story.h:1890
#define FLAG_ASUKA_SEWERS_300_BIT_FOUND
wstag320: chest that gives 300 BIT ("I got 300 BIT!"); its conditions test it 0
Definition story.h:176
#define SPECIAL_STORY_DE_SINCERITY_TO_LISA_SAVED
GAME.progress is from STORY_DE_SINCERITY to STORY_LISA_SAVED (PROGRESS_RANGES[0xF])
Definition story.h:1908
#define SPECIAL_STORY_SINCE_DE_SINCERITY
GAME.progress is STORY_DE_SINCERITY or later (PROGRESS_RANGES[0xC], to 0x63)
Definition story.h:1899
#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...
Definition story.h:1982
#define SPECIAL_STORY_KNIGHTMON_REPROGRAMMED_TO_BULBMON_FOUND
GAME.progress is from STORY_KNIGHTMON_REPROGRAMMED to STORY_BULBMON_FOUND (PROGRESS_RANGES[0x11])
Definition story.h:1914
#define FLAG_ASUKA_SEWERS_CRIMSON_BLADE_FOUND
wstag320: chest that gives the Crimson Blade, "I got" text; its conditions test it 0
Definition story.h:197
#define FLAG_MISCHIEVOUS_MAT_TALKED
wstag320 Asuka Sewers: Mischievous Mat says no Etemon was there; Kail then reacts to "a man instead o...
Definition story.h:1058
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
An event of the table FieldState.events, up to the first id -1, which FIELDSTG_startEvent starts.
Definition field_map.h:141
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
FieldEvent * events
up to the first id -1
Definition field_map.h:451
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
void(* applyAction)(s32 code, s32 value)
Definition game_state.h:52
What the player can trigger on a map (FIELDSTG_updateTriggers): a record of the table at FieldState....
Definition field_map.h:276
The task a stage starts (startStage), updated by its updateStage.
Definition stage.h:26
void(* nextState)(struct StageTask *task)
Definition stage.h:27
s32 state
Definition stage.h:27
An object of a map, which FIELDSTG draws: a record of the table at FieldState.objects,...
Definition field_map.h:208
u8 margin
how far off the view it is still drawn; 0 ends the table
Definition field_map.h:214
u8 anim
which of a stage's animations sets frame (1-3); FIELDSTG finds objects by it (its lift,...
Definition field_map.h:210
Definition gfx.h:352
u16 actor1Conditions[]
Definition wstag320.c:285
u16 actor0Talk0Actions[]
Definition wstag320.c:197
AreaBattle area2Battle7
Definition wstag320.c:162
FieldActorEntry actor0
Definition wstag320.c:308
void(* stageFuncs[])(void)
The stage's functions (common/start_stage.inc.c calls the first): a StageFuncs in the stages with a t...
Definition wstag320.c:484
FieldActorEntry actor6
Definition wstag320.c:314
u16 actor11Conditions[]
Definition wstag320.c:299
FieldTalk actor2Talks[]
Definition wstag320.c:227
AreaBattle area2Battle6
Definition wstag320.c:161
u16 actor10Conditions[]
Definition wstag320.c:298
FieldTalk actor14Talks[]
Definition wstag320.c:275
FieldTalk actor5Talks[]
Definition wstag320.c:239
AreaBattle area1Battle6
Definition wstag320.c:148
FieldActorEntry actor5
Definition wstag320.c:313
u16 actor1Talk1Conditions[]
Definition wstag320.c:205
AreaBattle area0Battle7
Definition wstag320.c:136
FieldActorEntry actor2
Definition wstag320.c:310
const CVECTOR stageColor
the color the setup copies to FIELDSTG_state.spriteColor
Definition wstag320.c:38
AreaBattle area3Battle4
Definition wstag320.c:172
AreaBattle area3Battle3
Definition wstag320.c:171
AreaBattle area0Battle1
Definition wstag320.c:130
AreaBattle area2Battle0
Definition wstag320.c:155
u16 actor9Conditions[]
Definition wstag320.c:297
FieldActorEntry * stageActors[]
Definition wstag320.c:324
AreaBattle area1Battle2
Definition wstag320.c:144
AreaBattle area3Battle0
Definition wstag320.c:168
AreaBattle area0Battle6
Definition wstag320.c:135
FieldTalk actor1Talks[]
Definition wstag320.c:221
u16 actor13Conditions[]
Definition wstag320.c:301
AreaBattle area3Battle2
Definition wstag320.c:170
u16 actor1Talk0Conditions[]
Definition wstag320.c:203
FieldTalk actor0Talks[]
Definition wstag320.c:217
AreaBattle area3Battle1
Definition wstag320.c:169
#define STAGE_ARCHIVE
Definition wstag320.c:48
AreaBattle area0Battle3
Definition wstag320.c:132
FieldActorEntry actor10
Definition wstag320.c:318
void endEvent290(void)
After event 290, with Mischievous Mat: gives the player the Agumon Suit.
Definition wstag320.c:34
FieldTalk actor4Talks[]
Definition wstag320.c:235
u16 actor4Conditions[]
Definition wstag320.c:292
FieldActorEntry actor4
Definition wstag320.c:312
u16 actor3Conditions[]
Definition wstag320.c:291
AreaBattle area3Battle6
Definition wstag320.c:174
FieldTalk actor11Talks[]
Definition wstag320.c:263
FieldActorEntry actor8
Definition wstag320.c:316
ActorImage stageImages[]
Definition wstag320.c:184
u16 actor14Talk1Conditions[]
Definition wstag320.c:216
u16 actor1Talk1Actions[]
Definition wstag320.c:206
FieldTalk actor6Talks[]
Definition wstag320.c:243
void setupStage(void)
Sets the stage up: its map, actors, battles and events, playing BGM_0003; BGM_0029 instead at story s...
Definition wstag320.c:54
AreaBattle area2Battle4
Definition wstag320.c:159
StageTile stageObjects[]
The tables and color setupStage gives FIELDSTG_state (FieldState)
Definition wstag320.c:343
FieldActorEntry actor9
Definition wstag320.c:317
u16 actor8Conditions[]
Definition wstag320.c:296
u16 actor5Conditions[]
Definition wstag320.c:293
FieldTalk actor10Talks[]
Definition wstag320.c:259
FieldTalk actor3Talks[]
Definition wstag320.c:231
FieldTalk actor9Talks[]
Definition wstag320.c:255
BattleList area3Battles
Definition wstag320.c:176
AreaBattle area3Battle5
Definition wstag320.c:173
AreaBattle area0Battle5
Definition wstag320.c:134
BattleList area1Battles
Definition wstag320.c:150
FieldTalk actor15Talks[]
Definition wstag320.c:280
BattleList area2Battles
Definition wstag320.c:163
FieldActorEntry actor15
Definition wstag320.c:323
FieldActorEntry actor12
Definition wstag320.c:320
u16 actor15Conditions[]
Definition wstag320.c:307
AreaBattle area1Battle4
Definition wstag320.c:146
u16 actor6Conditions[]
Definition wstag320.c:294
AreaBattle area2Battle2
Definition wstag320.c:157
u16 actor14Talk0Actions[]
Definition wstag320.c:215
AreaBattle area1Battle5
Definition wstag320.c:147
u16 actor14Conditions[]
Definition wstag320.c:306
FieldActorEntry actor7
Definition wstag320.c:315
StageSlot stageSlots[]
Definition wstag320.c:474
AreaBattle area2Battle1
Definition wstag320.c:156
u16 actor1Talk0Actions[]
Definition wstag320.c:204
FieldActorEntry actor13
Definition wstag320.c:321
AreaBattle area1Battle3
Definition wstag320.c:145
AreaBattle area1Battle0
Definition wstag320.c:142
FieldActorEntry actor11
Definition wstag320.c:319
u16 actor1Talk2Conditions[]
Definition wstag320.c:207
FieldActorEntry actor1
Definition wstag320.c:309
AreaBattle area0Battle0
Definition wstag320.c:129
AreaBattle area0Battle2
Definition wstag320.c:131
FieldTalk actor13Talks[]
Definition wstag320.c:271
#define STAGE_FILE
Definition wstag320.c:47
AreaBattle area2Battle5
Definition wstag320.c:160
s16 script290[]
Definition wstag320.c:84
AreaBattle area1Battle1
Definition wstag320.c:143
u16 actor11Talk0Actions[]
Definition wstag320.c:208
u16 actor7Conditions[]
Definition wstag320.c:295
AreaBattle area2Battle3
Definition wstag320.c:158
u16 actor2Conditions[]
Definition wstag320.c:290
FieldTalk actor7Talks[]
Definition wstag320.c:247
AreaBattle area0Battle4
Definition wstag320.c:133
#define STAGE_TEXT
Definition wstag320.c:45
FieldTalk actor8Talks[]
Definition wstag320.c:251
FieldTalk actor12Talks[]
Definition wstag320.c:267
AreaBattle area3Battle7
Definition wstag320.c:175
BattleList area0Battles
Definition wstag320.c:137
AreaBattle area1Battle7
Definition wstag320.c:149
FieldActorEntry actor3
Definition wstag320.c:311
FieldBattles stageBattles[]
Definition wstag320.c:181
FieldActorEntry actor14
Definition wstag320.c:322
FieldEvent stageEvents[]
Definition wstag320.c:487
u16 actor12Conditions[]
Definition wstag320.c:300
u16 actor14Talk0Conditions[]
Definition wstag320.c:214
u16 actor0Conditions[]
Definition wstag320.c:284