Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
wstag445.c
Go to the documentation of this file.
1/*
2 * WSTAG445: Bulk Swamp, South Sector.
3 */
4
5#include "common.h"
6#include "field/stage.h"
7
8/*
9 * Back from the battle after event 1265, starts event 1266, with
10 * MetalGreymon, unless it has played
11 */
12void updateStage(StageTask *task, void **children) {
13 switch (task->state) {
14 case TASK_INIT:
15 default:
16 task->nextState(task);
18 children[0] = FIELDSTG_startEvent(0x4F2);
19 }
20 break;
21 case TASK_RUN:
22 case TASK_DONE:
23 case TASK_KILL:
24 break;
25 }
26}
27
28#define STAGE_CHILDREN_SIZE 4
30
31/*
32 * After event 1265, with MetalGreymon: lets event 1266 start and starts the
33 * stage's event battle 1
34 */
39
40/*
41 * After event 1266, with MetalGreymon: gives the player the Agumon DDNA and
42 * keeps it from playing again
43 */
48
49const CVECTOR stageColor = { 0x80, 0x80, 0x80, 0x00 };
50#if VERSION_US || VERSION_JP
51#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_06)
52#define EVENT_TEXT_FILE (TEXT_EVENTS_400 - 1)
53#define STAGE_FILE 0x501
54#elif VERSION_EU
55#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_06)
56#define EVENT_TEXT_FILE (TEXT_EVENTS_400 - 1)
57#define STAGE_FILE 0x511
58#endif
59/*
60 * Sets the stage up: its map, actors, battles and events, playing the
61 * ambience ENV_0012; battle list 0 before STORY_KNIGHTMON_REPROGRAMMED, 1 from then on
62 */
89
91 SCRIPT_FOLLOW(1, 2),
92 SCRIPT_WALK(2, 0x104, 0x14A, 3),
93 SCRIPT_PLACE(0x7B, 0xE8, 0x13C),
94 SCRIPT_POSE(0x7B, 1, 7),
97 SCRIPT_POSE(2, 1, 3),
98 SCRIPT_WAIT(6),
99 SCRIPT_WAIT(0x1E),
100 SCRIPT_TALK(0, 1, 2, 1),
101 SCRIPT_POSE(2, 7, 3),
103 SCRIPT_POSE(2, 1, 3),
104 SCRIPT_WAIT(0x1E),
105 SCRIPT_TALK(0, 2, 0x7B, 2),
107 SCRIPT_WAIT(0x1E),
109 /* after the end, the original's padding up to a word, which isn't zeros */
110#if VERSION_US
111 0x8FBF,
112#endif
113};
115 SCRIPT_FOLLOW(1, 2),
116 SCRIPT_PLACE(2, 0x104, 0x14A),
117 SCRIPT_POSE(2, 1, 3),
118 SCRIPT_PLACE(0x7B, 0xE8, 0x13C),
119 SCRIPT_POSE(0x7B, 1, 7),
120 SCRIPT_WAIT(0x78),
121 SCRIPT_TALK(0, 1, 2, 1),
122 SCRIPT_POSE(2, 7, 3),
124 SCRIPT_POSE(2, 1, 3),
125 SCRIPT_WAIT(0x1E),
126 SCRIPT_TALK(0, 2, 0x7B, 2),
129 SCRIPT_WAIT(0x1E),
130 SCRIPT_TALK(0, 3, 2, 1),
131 SCRIPT_POSE(2, 7, 3),
133 SCRIPT_POSE(2, 1, 3),
134 SCRIPT_WAIT(0x3C),
136};
246 { 0x200, 0x100, 0x21C, 0x1A6, 0x70, 0xA6, 0x230, 0x1FE },
247 { 0x200, 0x100, 0x200, 0x100, 0, 0, 0x220, 0x1FE },
248 { 0x200, 0x100, 0x216, 0x138, 0x58, 0x38, 0x200, 0x1FD },
249 { 0x200, 0x100, 0x208, 0x1BC, 0x20, 0xBC, 0x210, 0x1FD },
250 { 0x200, 0x100, 0x210, 0x1BC, 0x40, 0xBC, 0x220, 0x1FD },
251 { 0x200, 0x100, 0x200, 0x1BC, 0, 0xBC, 0x230, 0x1FD },
252 { 0x140, 0x100, 0x176, 0x1A5, 0xD8, 0xA5, 0x160, 0x1FF },
253 { 0x140, 0x100, 0x140, 0x1B5, 0, 0xB5, 0x170, 0x1FF },
254 { 0x140, 0x100, 0x166, 0x100, 0x98, 0, 0x140, 0x1FE },
255 { 0x140, 0x100, 0x148, 0x1B5, 0x20, 0xB5, 0x150, 0x1FE },
256 { 0x140, 0x100, 0x150, 0x1B5, 0x40, 0xB5, 0x160, 0x1FE },
257 { 0x140, 0x100, 0x158, 0x1BD, 0x60, 0xBD, 0x170, 0x1FE },
258};
265 FLAG(0, 0), 1,
266 PARTY_STAT(2), 1,
267 PARTY_STAT(4), 1,
269 CODES_END,
270};
273 FLAG(0, 0), 1,
274 PARTY_STAT(2), 1,
275 PARTY_STAT(4), 1,
277 ITEM(0, 0x12), 0,
278 CODES_END,
279};
281 FLAG(0, 0), 1,
282 PARTY_STAT(2), 1,
283 PARTY_STAT(4), 1,
285 ITEM(0, 0x12), 1,
286 PARTY_STAT(6), 0,
287 CODES_END,
288};
290 FLAG(0, 0), 1,
291 PARTY_STAT(2), 1,
292 PARTY_STAT(4), 1,
294 ITEM(0, 0x12), 1,
295 PARTY_STAT(6), 1,
296 CODES_END,
297};
305 FLAG(0, 0), 1,
306 PARTY_STAT(2), 1,
307 PARTY_STAT(4), 1,
309 CODES_END,
310};
313 FLAG(0, 0), 1,
314 PARTY_STAT(2), 1,
315 PARTY_STAT(4), 1,
317 ITEM(0, 0x12), 0,
318 CODES_END,
319};
321 FLAG(0, 0), 1,
322 PARTY_STAT(2), 1,
323 PARTY_STAT(4), 1,
325 ITEM(0, 0x12), 1,
326 PARTY_STAT(6), 0,
327 CODES_END,
328};
330 FLAG(0, 0), 1,
331 PARTY_STAT(2), 1,
332 PARTY_STAT(4), 1,
334 ITEM(0, 0x12), 1,
335 PARTY_STAT(6), 1,
336 CODES_END,
337};
345 FLAG(0, 0), 1,
346 PARTY_STAT(2), 1,
347 PARTY_STAT(4), 1,
349 CODES_END,
350};
353 FLAG(0, 0), 1,
354 PARTY_STAT(2), 1,
355 PARTY_STAT(4), 1,
357 ITEM(0, 0x12), 0,
358 CODES_END,
359};
361 FLAG(0, 0), 1,
362 PARTY_STAT(2), 1,
363 PARTY_STAT(6), 0,
364 PARTY_STAT(4), 1,
365 ITEM(0, 0x12), 1,
367 CODES_END,
368};
370 FLAG(0, 0), 1,
371 PARTY_STAT(2), 1,
372 PARTY_STAT(4), 1,
374 ITEM(0, 0x12), 1,
375 PARTY_STAT(6), 1,
376 CODES_END,
377};
392 FLAG(0, 0), 1,
393 PARTY_STAT(2), 1,
394 PARTY_STAT(4), 1,
396 CODES_END,
397};
400 PARTY_STAT(4), 1,
401 ITEM(0, 0x12), 0,
402 FLAG(0, 0), 1,
403 PARTY_STAT(2), 1,
405 CODES_END,
406};
408 PARTY_STAT(4), 1,
409 ITEM(0, 0x12), 1,
410 FLAG(0, 0), 1,
411 PARTY_STAT(2), 1,
413 PARTY_STAT(6), 0,
414 CODES_END,
415};
417 FLAG(0, 0), 1,
418 PARTY_STAT(2), 1,
420 PARTY_STAT(4), 1,
421 ITEM(0, 0x12), 1,
422 PARTY_STAT(6), 1,
423 CODES_END,
424};
437 { NULL, NULL, 0x27F },
438 { NULL, NULL, 0 },
439};
467 { NULL, NULL, 0x1F },
468 { NULL, NULL, 0 },
469};
471 { NULL, NULL, 0x1F },
472 { NULL, NULL, 0 },
473};
475 { NULL, NULL, 0x11C },
476 { NULL, NULL, 0 },
477};
479 { NULL, NULL, 0x11D },
480 { NULL, NULL, 0 },
481};
483 { NULL, NULL, 0x12B },
484 { NULL, NULL, 0 },
485};
488 { actor10Talk1Conditions, NULL, 0x2BE },
489 { NULL, NULL, 0 },
490};
492 { NULL, NULL, 0x12A },
493 { NULL, NULL, 0 },
494};
506 { NULL, NULL, 0x331 },
507 { NULL, NULL, 0 },
508};
510 { NULL, NULL, 0x331 },
511 { NULL, NULL, 0 },
512};
514 { NULL, NULL, 0x331 },
515 { NULL, NULL, 0 },
516};
575 &actor0,
576 &actor1,
577 &actor2,
578 &actor3,
579 &actor4,
580 &actor5,
581 &actor6,
582 &actor7,
583 &actor8,
584 &actor9,
585 &actor10,
586 &actor11,
587 &actor12,
588 &actor13,
589 &actor14,
590 &actor15,
591 NULL,
592};
594 { 1, 0, 0x40, 2, 2, 1, 2, 7, 8, 0, 95, 22, 0, 0 },
595 { 1, 0, 0x40, 2, 2, 1, 2, 7, 8, 0, 700, 48, 0, 0 },
596 { 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x34, 0xA, 0, 235, 430, 0, 0 },
597 { 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x34, 0xA, 0, 273, 238, 0, 0 },
598 { 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x34, 0xA, 0, 363, 254, 0, 0 },
599 { 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x34, 0xA, 0, 696, 424, 0, 0 },
600 { 1, 0, 0x40, 6, 0x35, 1, 0x35, 0x37, 0xA, 0, 94, 336, 0, 0 },
601 { 1, 0, 0x40, 6, 0x35, 1, 0x35, 0x37, 0xA, 0, 662, 456, 0, 0 },
602 { 1, 0, 0x40, 6, 0x38, 1, 0x38, 0x3A, 0xA, 0, 367, 482, 0, 0 },
603 { 1, 0, 0x40, 6, 0x38, 1, 0x38, 0x3A, 0xA, 0, 476, 345, 0, 0 },
604 { 1, 0, 0x40, 6, 0x38, 1, 0x38, 0x3A, 0xA, 0, 669, 498, 0, 0 },
605 { 1, 0, 0x40, 6, 0x3B, 1, 0x3B, 0x3D, 0xA, 0, 417, 446, 0, 0 },
606 { 1, 0, 0x40, 6, 0x3B, 1, 0x3B, 0x3D, 0xA, 0, 421, 278, 0, 0 },
607 { 1, 0, 0x40, 6, 0x3B, 1, 0x3B, 0x3D, 0xA, 0, 596, 526, 0, 0 },
608 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 166, 432, 0, 0 },
609 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 229, 375, 0, 0 },
610 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 436, 275, 0, 0 },
611 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 483, 489, 0, 0 },
612 { 1, 0, 0x40, 6, 0x41, 1, 0x41, 0x43, 0xA, 0, 172, 351, 0, 0 },
613 { 1, 0, 0x40, 6, 0x41, 1, 0x41, 0x43, 0xA, 0, 283, 392, 0, 0 },
614 { 1, 0, 0x40, 6, 0x41, 1, 0x41, 0x43, 0xA, 0, 451, 287, 0, 0 },
615 { 1, 0, 0x40, 6, 0x41, 1, 0x41, 0x43, 0xA, 0, 550, 507, 0, 0 },
616 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 127, 287, 0, 0 },
617 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 133, 280, 0, 0 },
618 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 185, 434, 0, 0 },
619 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 219, 401, 0, 0 },
620 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 390, 474, 0, 0 },
621 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 417, 508, 0, 0 },
622 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 669, 570, 0, 0 },
623 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 672, 562, 0, 0 },
624 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 683, 497, 0, 0 },
625 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 690, 430, 0, 0 },
626 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 709, 426, 0, 0 },
627 { 1, 0x64, 0x40, 6, 1, 0, 0, 0, 0, 0, 490, 108, 0, 0 },
628 { 1, 0, 0x40, 0xA, 0x4B, 1, 0x4B, 0x4E, 0xA, 0, -4, 274, 0, 0 },
629 { 1, 0, 0x40, 0xA, 0x4B, 1, 0x4B, 0x4E, 0xA, 0, -2, 366, 0, 0 },
630 { 1, 0, 0x40, 0xA, 0x4B, 1, 0x4B, 0x4E, 0xA, 0, 65, 485, 0, 0 },
631 { 1, 0, 0x40, 0xA, 0x4B, 1, 0x4B, 0x4E, 0xA, 0, 85, 170, 0, 0 },
632 { 1, 0, 0x40, 0xA, 0x4B, 1, 0x4B, 0x4E, 0xA, 0, 129, 227, 0, 0 },
633 { 1, 0, 0x40, 0xA, 0x4B, 1, 0x4B, 0x4E, 0xA, 0, 159, 389, 0, 0 },
634 { 1, 0, 0x40, 0xA, 0x4B, 1, 0x4B, 0x4E, 0xA, 0, 176, 334, 0, 0 },
635 { 1, 0, 0x40, 0xA, 0x4B, 1, 0x4B, 0x4E, 0xA, 0, 273, 212, 0, 0 },
636 { 1, 0, 0x40, 0xA, 0x4B, 1, 0x4B, 0x4E, 0xA, 0, 355, 284, 0, 0 },
637 { 1, 0, 0x40, 0xA, 0x4B, 1, 0x4B, 0x4E, 0xA, 0, 358, 517, 0, 0 },
638 { 1, 0, 0x40, 0xA, 0x4B, 1, 0x4B, 0x4E, 0xA, 0, 378, 421, 0, 0 },
639 { 1, 0, 0x40, 0xA, 0x4B, 1, 0x4B, 0x4E, 0xA, 0, 389, 573, 0, 0 },
640 { 1, 0, 0x40, 0xA, 0x4B, 1, 0x4B, 0x4E, 0xA, 0, 471, 540, 0, 0 },
641 { 1, 0, 0x40, 0xA, 0x4B, 1, 0x4B, 0x4E, 0xA, 0, 498, 475, 0, 0 },
642 { 1, 0, 0x40, 0xA, 0x4B, 1, 0x4B, 0x4E, 0xA, 0, 500, 291, 0, 0 },
643 { 1, 0, 0x40, 0xA, 0x4B, 1, 0x4B, 0x4E, 0xA, 0, 556, 625, 0, 0 },
644 { 1, 0, 0x40, 0xA, 0x4B, 1, 0x4B, 0x4E, 0xA, 0, 650, 485, 0, 0 },
645 { 1, 0, 0x40, 0xA, 0x4B, 1, 0x4B, 0x4E, 0xA, 0, 687, 407, 0, 0 },
646 { 1, 0, 0x40, 0xA, 0x4B, 1, 0x4B, 0x4E, 0xA, 0, 750, 536, 0, 0 },
647 { 1, 0, 0x40, 0xA, 0x4F, 1, 0x4F, 0x52, 0xA, 0, 104, 604, 0, 0 },
648 { 1, 0, 0x40, 0xA, 0x4F, 1, 0x4F, 0x52, 0xA, 0, 133, 404, 0, 0 },
649 { 1, 0, 0x40, 0xA, 0x4F, 1, 0x4F, 0x52, 0xA, 0, 136, 302, 0, 0 },
650 { 1, 0, 0x40, 0xA, 0x4F, 1, 0x4F, 0x52, 0xA, 0, 142, 447, 0, 0 },
651 { 1, 0, 0x40, 0xA, 0x4F, 1, 0x4F, 0x52, 0xA, 0, 212, 399, 0, 0 },
652 { 1, 0, 0x40, 0xA, 0x4F, 1, 0x4F, 0x52, 0xA, 0, 290, 266, 0, 0 },
653 { 1, 0, 0x40, 0xA, 0x4F, 1, 0x4F, 0x52, 0xA, 0, 300, 550, 0, 0 },
654 { 1, 0, 0x40, 0xA, 0x4F, 1, 0x4F, 0x52, 0xA, 0, 341, 568, 0, 0 },
655 { 1, 0, 0x40, 0xA, 0x4F, 1, 0x4F, 0x52, 0xA, 0, 377, 471, 0, 0 },
656 { 1, 0, 0x40, 0xA, 0x4F, 1, 0x4F, 0x52, 0xA, 0, 420, 254, 0, 0 },
657 { 1, 0, 0x40, 0xA, 0x4F, 1, 0x4F, 0x52, 0xA, 0, 480, 327, 0, 0 },
658 { 1, 0, 0x40, 0xA, 0x4F, 1, 0x4F, 0x52, 0xA, 0, 576, 564, 0, 0 },
659 { 1, 0, 0x40, 0xA, 0x4F, 1, 0x4F, 0x52, 0xA, 0, 623, 521, 0, 0 },
660 { 1, 0, 0x40, 0xA, 0x4F, 1, 0x4F, 0x52, 0xA, 0, 750, 426, 0, 0 },
661 { 1, 0, 0x58, 4, 0, 0, 0, 0, 0, 0, 464, 77, 161, 0 },
662 { 1, 0, 0x80, 4, 0xD, 0, 0, 0, 0, 0, 358, 119, 155, 0 },
663 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 223, 167, 167, 0 },
664 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 248, 140, 140, 0 },
665 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 295, 115, 115, 0 },
666 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 304, 151, 151, 0 },
667 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 599, 123, 123, 0 },
668 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 656, 313, 313, 0 },
669 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 690, 375, 375, 0 },
670 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
671};
673 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x234, 0x668, 0xB4, 1, 0, 0, 0 },
674 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x232, 0x190, 0x218, 3, 0x64, 0, 0 },
675 { { { CODES_END, 0 }, { CODES_END, 0 } }, 0, 0, 0, 0, 0, 0, 0, 0 },
676};
677void (*stageFuncs[])(void) = {
679};
681 { 1265, script1265, EVENT_TEXT(0x13), NULL, endEvent1265 },
682 { 1266, script1266, EVENT_TEXT(0x14), NULL, endEvent1266 },
683 { -1, NULL, 0, NULL, NULL },
684};
#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
EventTask * FIELDSTG_startEvent(s32 id)
Starts the event id of FieldState.events: its script, start and end, and its text; the player stands ...
Definition event.c:250
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 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_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 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 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 EVENT_BATTLE(id)
action: FIELDSTG_battleFuncs.startEventBattle
Definition game_state.h:72
#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 PARTY_STAT(id)
checkPartyStat
Definition game_state.h:71
#define CARD_BATTLE(opponent, kind)
action: startCardBattle
Definition game_state.h:73
#define MUSIC_SWAMP
ENV_0012: the South Sector's swamps and Bulk Bridge.
Definition sound.h:128
#define MUSIC_BATTLE
BATL0000: the maps' random battles (AreaBattle, nearly all of them)
Definition sound.h:76
#define MUSIC_BOSS
BOSS_000: the sectors' boss battles.
Definition sound.h:108
#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_BATTLE_1
BATL1000: the Digimon Arena's battles and some event battles (AreaBattle)
Definition sound.h:77
#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 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_BULBMON_FOUND
WSTAG520 (Suzaku Hall), event 695: another earthquake; Bulbmon digs the holes.
Definition story.h:103
@ STORY_AGUMON_SUITS
WSTAG380 (Divermon's Lake), event 205: the Mischievous Mat, caught in his Etemon Suit,...
Definition story.h:52
@ STORY_SEPIKMON_MASK_LOST
WSTAG480 (Jungle Grave), event 171: Sepikmon will say how to beat Zanbamon once the player finds his ...
Definition story.h:49
@ STORY_ZANBAMON_DRIVEN_OFF
WSTAG475 (Shaman House), event 230: the Smelly Herb drives Zanbamon off the way.
Definition story.h:55
@ STORY_KNIGHTMON_REPROGRAMMED
WSTAG210 (Main Lobby, Asuka City), event 685: the A.o.A have reprogrammed Knightmon,...
Definition story.h:97
@ STORY_MOVIE_BATTLES
WSTAG820, event 1080, with Snatchmon: each encounter plays MODE_BATTLE_MOVIE first.
Definition story.h:146
@ STORY_CODE_PASSES_NEEDED
WSTAG685, event 690: Leader Chuck says stopping Knightmon takes the four City Leaders' Code Passes.
Definition story.h:100
#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_KNIGHTMON_REPROGRAMMED_TO_AMATERASU_BRIDGE
GAME.progress is from STORY_KNIGHTMON_REPROGRAMMED to STORY_AMATERASU_BRIDGE (PROGRESS_RANGES[4])
Definition story.h:1875
#define FLAG_CARD_BATTLE_WON
set by updateModeFlags on the way back from a card battle: 1 if the player won it (FLAGS_00....
Definition story.h:166
#define SPECIAL_STORY_GENJI_BEATEN_TO_GAME_MASTER_CAUGHT
GAME.progress is from STORY_GENJI_BEATEN to STORY_GAME_MASTER_CAUGHT (PROGRESS_RANGES[1])
Definition story.h:1866
#define FLAG_METALGREYMON_DDNA_FOUGHT
wstag445 Bulk Swamp: set when talking to MetalGreymon starts his Agumon DDNA challenge event; later h...
Definition story.h:1161
#define FLAG_CARD_BATTLE_ENDED
set by updateModeFlags on the way back from a card battle; the talks that follow one test it and clea...
Definition story.h:169
#define FLAG_GEORGE_FOUGHT
wstag445 (Bulk Swamp): Tamer George says "I'll show who's the boss in Digimon Battle!...
Definition story.h:850
#define FLAG_WARGROWLMON_DDNA_REQUEST_SEEN
wstag445 event 1266: the player asks WarGrowlmon for the Guilmon DDNA and he wants a battle; set at i...
Definition story.h:1360
#define FLAG_METALGREYMON_WIN_SEEN
wstag445 event 1265: MetalGreymon loses and gives the Agumon DDNA; set at its end,...
Definition story.h:1357
#define FLAG_AGUMON_DDNA_REQUESTED
wstag405: DRI Johann asks the player to get Agumon's DDNA from MetalGreymon; tested in wstag445 with ...
Definition story.h:585
#define SPECIAL_STORY_SINCE_GENJI_BEATEN
GAME.progress is STORY_GENJI_BEATEN or later (PROGRESS_RANGES[6], to 0x63)
Definition story.h:1881
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
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
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
Definition gfx.h:352
AreaBattle place1Area2Battle4
Definition wstag445.c:219
u16 actor1Conditions[]
Definition wstag445.c:523
u16 actor0Talk0Actions[]
Definition wstag445.c:260
FieldActorEntry actor0
Definition wstag445.c:558
AreaBattle place1Area1Battle2
Definition wstag445.c:204
AreaBattle place1Area0Battle3
Definition wstag445.c:192
AreaBattle place0Area1Battle2
Definition wstag445.c:152
void(* stageFuncs[])(void)
The stage's functions (common/start_stage.inc.c calls the first): a StageFuncs in the stages with a t...
Definition wstag445.c:677
FieldActorEntry actor6
Definition wstag445.c:564
AreaBattle place1Area1Battle5
Definition wstag445.c:207
u16 actor11Conditions[]
Definition wstag445.c:553
u16 actor0Talk0Conditions[]
Definition wstag445.c:259
AreaBattle place0Area0Battle6
Definition wstag445.c:143
AreaBattle place0Area1Battle7
Definition wstag445.c:157
FieldTalk actor2Talks[]
Definition wstag445.c:440
u16 actor3Talk3Conditions[]
Definition wstag445.c:344
u16 actor0Talk1Conditions[]
Definition wstag445.c:261
u16 actor2Talk1Conditions[]
Definition wstag445.c:301
u16 actor4Talk1Actions[]
Definition wstag445.c:381
AreaBattle place0Area3Battle0
Definition wstag445.c:176
u16 actor10Conditions[]
Definition wstag445.c:552
AreaBattle place0Area1Battle5
Definition wstag445.c:155
BattleList place0Area3Battles
Definition wstag445.c:184
AreaBattle place1Area0Battle6
Definition wstag445.c:195
AreaBattle place1Area0Battle1
Definition wstag445.c:190
AreaBattle place1Area2Battle7
Definition wstag445.c:222
u16 actor4Talk2Actions[]
Definition wstag445.c:383
AreaBattle place1Area3Battle3
Definition wstag445.c:231
AreaBattle place0Area2Battle1
Definition wstag445.c:164
u16 actor12Talk2Conditions[]
Definition wstag445.c:389
u16 actor3Talk4Conditions[]
Definition wstag445.c:352
FieldTalk actor14Talks[]
Definition wstag445.c:509
AreaBattle place0Area1Battle0
Definition wstag445.c:150
AreaBattle place0Area2Battle0
Definition wstag445.c:163
BattleList place0Area2Battles
Definition wstag445.c:171
FieldTalk actor5Talks[]
Definition wstag445.c:466
BattleList place1Area1Battles
Definition wstag445.c:210
u16 actor0Talk6Actions[]
Definition wstag445.c:298
AreaBattle place1Area1Battle7
Definition wstag445.c:209
AreaBattle place0Area0Battle1
Definition wstag445.c:138
AreaBattle place0Area3Battle7
Definition wstag445.c:183
FieldActorEntry actor5
Definition wstag445.c:563
AreaBattle place1Area3Battle5
Definition wstag445.c:233
AreaBattle place1Area3Battle7
Definition wstag445.c:235
FieldActorEntry actor2
Definition wstag445.c:560
AreaBattle place1Area1Battle4
Definition wstag445.c:206
const CVECTOR stageColor
the color the setup copies to FIELDSTG_state.spriteColor
Definition wstag445.c:49
u16 actor3Talk0Conditions[]
Definition wstag445.c:339
AreaBattle place0Area0Battle2
Definition wstag445.c:139
u16 actor0Talk3Conditions[]
Definition wstag445.c:264
u16 actor12Talk2Actions[]
Definition wstag445.c:390
u16 actor9Conditions[]
Definition wstag445.c:551
FieldActorEntry * stageActors[]
Definition wstag445.c:574
AreaBattle place0Area0Battle4
Definition wstag445.c:141
u16 actor2Talk3Conditions[]
Definition wstag445.c:304
u16 actor3Talk6Actions[]
Definition wstag445.c:378
u16 actor12Talk6Actions[]
Definition wstag445.c:425
u16 actor10Talk1Conditions[]
Definition wstag445.c:386
void endEvent1266(void)
After event 1266, with MetalGreymon: gives the player the Agumon DDNA and keeps it from playing again...
Definition wstag445.c:44
BattleList place0Area1Battles
Definition wstag445.c:158
u16 actor4Talk1Conditions[]
Definition wstag445.c:380
u16 actor12Talk4Conditions[]
Definition wstag445.c:399
AreaBattle place0Area1Battle4
Definition wstag445.c:154
AreaBattle place1Area2Battle0
Definition wstag445.c:215
BattleList place1Area0Battles
Definition wstag445.c:197
u16 actor10Talk0Conditions[]
Definition wstag445.c:384
FieldTalk actor1Talks[]
Definition wstag445.c:436
u16 actor13Conditions[]
Definition wstag445.c:555
AreaBattle place0Area3Battle1
Definition wstag445.c:177
FieldTalk actor0Talks[]
Definition wstag445.c:426
AreaBattle place0Area3Battle2
Definition wstag445.c:178
u16 actor0Talk4Conditions[]
Definition wstag445.c:272
AreaBattle place1Area2Battle2
Definition wstag445.c:217
u16 actor3Talk2Conditions[]
Definition wstag445.c:342
FieldActorEntry actor10
Definition wstag445.c:568
u16 actor3Talk1Conditions[]
Definition wstag445.c:341
AreaBattle place1Area3Battle2
Definition wstag445.c:230
u16 actor2Talk0Actions[]
Definition wstag445.c:300
FieldTalk actor4Talks[]
Definition wstag445.c:460
u16 actor4Conditions[]
Definition wstag445.c:541
FieldActorEntry actor4
Definition wstag445.c:562
u16 actor3Conditions[]
Definition wstag445.c:535
u16 actor2Talk2Conditions[]
Definition wstag445.c:302
FieldTalk actor11Talks[]
Definition wstag445.c:491
FieldActorEntry actor8
Definition wstag445.c:566
AreaBattle place0Area0Battle7
Definition wstag445.c:144
AreaBattle place1Area3Battle0
Definition wstag445.c:228
u16 actor2Talk3Actions[]
Definition wstag445.c:311
ActorImage stageImages[]
Definition wstag445.c:245
AreaBattle place0Area1Battle6
Definition wstag445.c:156
FieldTalk actor6Talks[]
Definition wstag445.c:470
void setupStage(void)
Sets the stage up: its map, actors, battles and events, playing the ambience ENV_0012; battle list 0 ...
Definition wstag445.c:63
AreaBattle place0Area1Battle3
Definition wstag445.c:153
u16 actor12Talk5Conditions[]
Definition wstag445.c:407
u16 actor12Talk0Conditions[]
Definition wstag445.c:387
s16 script1265[]
Definition wstag445.c:90
u16 actor10Talk0Actions[]
Definition wstag445.c:385
u16 actor4Talk0Conditions[]
Definition wstag445.c:379
AreaBattle place0Area3Battle4
Definition wstag445.c:180
AreaBattle place0Area2Battle6
Definition wstag445.c:169
AreaBattle place0Area0Battle3
Definition wstag445.c:140
u16 actor3Talk6Conditions[]
Definition wstag445.c:369
StageTile stageObjects[]
The tables and color setupStage gives FIELDSTG_state (FieldState)
Definition wstag445.c:593
FieldActorEntry actor9
Definition wstag445.c:567
u16 actor8Conditions[]
Definition wstag445.c:550
u16 actor12Talk3Conditions[]
Definition wstag445.c:391
u16 actor5Conditions[]
Definition wstag445.c:547
FieldTalk actor10Talks[]
Definition wstag445.c:486
FieldTalk actor3Talks[]
Definition wstag445.c:450
u16 actor2Talk6Actions[]
Definition wstag445.c:338
FieldTalk actor9Talks[]
Definition wstag445.c:482
AreaBattle place0Area2Battle4
Definition wstag445.c:167
u16 actor2Talk5Conditions[]
Definition wstag445.c:320
u16 actor3Talk2Actions[]
Definition wstag445.c:343
AreaBattle place1Area1Battle1
Definition wstag445.c:203
FieldTalk actor15Talks[]
Definition wstag445.c:513
BattleList place1Area2Battles
Definition wstag445.c:223
u16 actor0Talk2Actions[]
Definition wstag445.c:263
u16 actor0Talk5Conditions[]
Definition wstag445.c:280
u16 actor2Talk0Conditions[]
Definition wstag445.c:299
AreaBattle place1Area2Battle3
Definition wstag445.c:218
FieldActorEntry actor15
Definition wstag445.c:573
FieldActorEntry actor12
Definition wstag445.c:570
u16 actor15Conditions[]
Definition wstag445.c:557
AreaBattle place1Area1Battle3
Definition wstag445.c:205
u16 actor2Talk2Actions[]
Definition wstag445.c:303
u16 actor3Talk5Conditions[]
Definition wstag445.c:360
u16 actor3Talk3Actions[]
Definition wstag445.c:351
u16 actor6Conditions[]
Definition wstag445.c:548
u16 actor12Talk1Conditions[]
Definition wstag445.c:388
u16 actor0Talk2Conditions[]
Definition wstag445.c:262
AreaBattle place0Area3Battle6
Definition wstag445.c:182
u16 actor12Talk6Conditions[]
Definition wstag445.c:416
u16 actor14Conditions[]
Definition wstag445.c:556
AreaBattle place0Area3Battle3
Definition wstag445.c:179
s16 script1266[]
Definition wstag445.c:114
AreaBattle place1Area2Battle1
Definition wstag445.c:216
FieldActorEntry actor7
Definition wstag445.c:565
u16 actor2Talk6Conditions[]
Definition wstag445.c:329
StageSlot stageSlots[]
Definition wstag445.c:672
BattleList place1Area3Battles
Definition wstag445.c:236
AreaBattle place1Area2Battle5
Definition wstag445.c:220
FieldActorEntry actor13
Definition wstag445.c:571
AreaBattle place1Area1Battle6
Definition wstag445.c:208
AreaBattle place1Area0Battle2
Definition wstag445.c:191
u16 actor0Talk6Conditions[]
Definition wstag445.c:289
BattleList place0Area0Battles
Definition wstag445.c:145
AreaBattle place0Area2Battle3
Definition wstag445.c:166
AreaBattle place1Area3Battle6
Definition wstag445.c:234
FieldActorEntry actor11
Definition wstag445.c:569
AreaBattle place1Area0Battle0
Definition wstag445.c:189
FieldActorEntry actor1
Definition wstag445.c:559
FieldTalk actor13Talks[]
Definition wstag445.c:505
#define STAGE_FILE
Definition wstag445.c:57
AreaBattle place1Area3Battle1
Definition wstag445.c:229
AreaBattle place0Area0Battle5
Definition wstag445.c:142
AreaBattle place1Area1Battle0
Definition wstag445.c:202
AreaBattle place0Area3Battle5
Definition wstag445.c:181
u16 actor7Conditions[]
Definition wstag445.c:549
AreaBattle place0Area2Battle2
Definition wstag445.c:165
u16 actor2Conditions[]
Definition wstag445.c:529
AreaBattle place1Area0Battle5
Definition wstag445.c:194
u16 actor12Talk3Actions[]
Definition wstag445.c:398
FieldTalk actor7Talks[]
Definition wstag445.c:474
AreaBattle place1Area2Battle6
Definition wstag445.c:221
AreaBattle place1Area0Battle7
Definition wstag445.c:196
AreaBattle place0Area2Battle7
Definition wstag445.c:170
void endEvent1265(void)
After event 1265, with MetalGreymon: lets event 1266 start and starts the stage's event battle 1.
Definition wstag445.c:35
#define STAGE_TEXT
Definition wstag445.c:55
AreaBattle place1Area0Battle4
Definition wstag445.c:193
u16 actor2Talk4Conditions[]
Definition wstag445.c:312
u16 actor3Talk0Actions[]
Definition wstag445.c:340
FieldTalk actor8Talks[]
Definition wstag445.c:478
AreaBattle place0Area1Battle1
Definition wstag445.c:151
FieldTalk actor12Talks[]
Definition wstag445.c:495
u16 actor4Talk2Conditions[]
Definition wstag445.c:382
AreaBattle place0Area2Battle5
Definition wstag445.c:168
FieldActorEntry actor3
Definition wstag445.c:561
FieldBattles stageBattles[]
Definition wstag445.c:241
AreaBattle place0Area0Battle0
Definition wstag445.c:137
FieldActorEntry actor14
Definition wstag445.c:572
FieldEvent stageEvents[]
Definition wstag445.c:680
AreaBattle place1Area3Battle4
Definition wstag445.c:232
u16 actor12Conditions[]
Definition wstag445.c:554
u16 actor0Conditions[]
Definition wstag445.c:517
u16 actor0Talk3Actions[]
Definition wstag445.c:271