Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
wstag400.c
Go to the documentation of this file.
1/*
2 * WSTAG400: Kicking Forest, East Sector.
3 */
4
5#include "common.h"
6#include "field/stage.h"
7
8/* Creates the event object when flag 0x1A26 is set and 0x1C4B is not */
9void updateStage(StageTask *task, void **children) {
10 switch (task->state) {
11 case TASK_INIT:
12 default:
14 children[0] = FIELDSTG_startEvent(0x514);
15 }
16 task->nextState(task);
17 break;
18 case TASK_RUN:
19 case TASK_DONE:
20 case TASK_KILL:
21 break;
22 }
23}
24
25#define STAGE_CHILDREN_SIZE 4
27
28/* After event 1300, with the player: keeps it from playing again */
29void endEvent1300(void) {
30 FLAGS_00.applyAction(FLAG(0x1C, 0x4B), 1);
31}
32
33/* After event 1301, with Agumon: sets flag 0x1C4C (which decides whether actors 1 and 2 appear) */
34void endEvent1301(void) {
35 FLAGS_00.applyAction(FLAG(0x1C, 0x4C), 1);
36}
37
38/*
39 * After event 1302, with Agumon: sets flag 0x1C4D (which decides whether
40 * actors 12 and 13 appear)
41 */
42void endEvent1302(void) {
43 FLAGS_00.applyAction(FLAG(0x1C, 0x4D), 1);
44}
45
46/*
47 * After event 1303, with Agumon: sets flag 0x1C4E (which decides whether
48 * actors 14 and 15 appear)
49 */
50void endEvent1303(void) {
51 FLAGS_00.applyAction(FLAG(0x1C, 0x4E), 1);
52}
53
54/*
55 * After event 1304, with Veemon: lets event 1305 of WSTAG395 start and
56 * clears flag 0x1A26 (which decides whether actors 1 to 3 and 12 to 15
57 * appear and what actor 2 in WSTAG395 says)
58 */
63
64/*
65 * After events 1507 to 1509, where the player gives up looking for Veemon
66 * and leaves the Kicking Forest: clears flags 0x1A26 and 0x1C4B to 0x1C4E,
67 * so the search starts over
68 */
71 FLAGS_00.applyAction(FLAG(0x1C, 0x4B), 0);
72 FLAGS_00.applyAction(FLAG(0x1C, 0x4C), 0);
73 FLAGS_00.applyAction(FLAG(0x1C, 0x4D), 0);
74 FLAGS_00.applyAction(FLAG(0x1C, 0x4E), 0);
75}
76
77/* Defined below, after the code that uses them */
80const CVECTOR stageColor = { 0x54, 0x67, 0x96, 0x00 };
81#if VERSION_US || VERSION_JP
82#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_06)
83#define EVENT_TEXT_FILE (TEXT_EVENTS_400 - 1)
84#define STAGE_FILE 0x3FA
85#elif VERSION_EU
86#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_06)
87#define EVENT_TEXT_FILE (TEXT_EVENTS_400 - 1)
88#define STAGE_FILE 0x40A
89#endif
90/*
91 * Sets the stage up: its map, actors, battles and events, playing the
92 * ambience ENV05_00; battle list 0 before STORY_TEDDY_FOUND, 1 from then on
93 */
119
121 SCRIPT_PLACE(2, 0xEF, 0xE1),
122 SCRIPT_POSE(2, 1, 7),
123 SCRIPT_WAIT(0x1E),
124 SCRIPT_WALK(2, 0x170, 0x120, 7),
126 SCRIPT_POSE(2, 1, 7),
127 SCRIPT_WAIT(0x1E),
128 SCRIPT_TALK(0, 1, 2, 2),
129 SCRIPT_POSE(2, 7, 7),
131 SCRIPT_POSE(2, 1, 7),
132 SCRIPT_WAIT(0x1E),
134};
136 SCRIPT_WALK(2, 0x3F8, 0x105, 7),
137 SCRIPT_WALK(0x22, 0x418, 0x114, 7),
139 SCRIPT_WAIT_WALK(0x22),
140 SCRIPT_POSE(2, 1, 7),
141 SCRIPT_POSE(0x22, 1, 3),
142 SCRIPT_COMMAND(0x323, 0x325, 2),
143 SCRIPT_WAIT(0x78),
144 SCRIPT_COMMAND(0x323, 0x326, 2),
145 SCRIPT_WAIT(0x1E),
146 SCRIPT_TALK(0, 1, 0x22, 2),
148 SCRIPT_WAIT(0x1E),
150};
152 SCRIPT_WALK(2, 0x464, 0x41F, 7),
153 SCRIPT_WALK(0xE2, 0x484, 0x42F, 7),
155 SCRIPT_WAIT_WALK(0xE2),
156 SCRIPT_POSE(2, 1, 7),
157 SCRIPT_POSE(0xE2, 1, 3),
158 SCRIPT_COMMAND(0x323, 0x325, 2),
159 SCRIPT_WAIT(0x78),
160 SCRIPT_COMMAND(0x323, 0x326, 2),
161 SCRIPT_WAIT(0x1E),
162 SCRIPT_TALK(0, 1, 0xE2, 2),
163 SCRIPT_TALK(0, 1, 0xE2, 2),
165 SCRIPT_WAIT(0x1E),
167};
169 SCRIPT_WALK(2, 0xB8, 0x34C, 1),
170 SCRIPT_WALK(0xE3, 0x99, 0x35C, 1),
172 SCRIPT_WAIT_WALK(0xE3),
173 SCRIPT_POSE(2, 1, 1),
174 SCRIPT_POSE(0xE3, 1, 5),
175 SCRIPT_COMMAND(0x323, 0x325, 2),
176 SCRIPT_WAIT(0x78),
177 SCRIPT_COMMAND(0x323, 0x326, 2),
178 SCRIPT_WAIT(0x1E),
179 SCRIPT_TALK(0, 1, 0xE3, 0),
181 SCRIPT_WAIT(0x1E),
183};
185 SCRIPT_WALK(2, 0x148, 0x1AC, 7),
186 SCRIPT_WALK(0x23, 0x168, 0x1BD, 7),
188 SCRIPT_WAIT_WALK(0x23),
189 SCRIPT_POSE(2, 1, 7),
190 SCRIPT_POSE(0x23, 1, 3),
191 SCRIPT_COMMAND(0x323, 0x325, 2),
192 SCRIPT_WAIT(0x78),
193 SCRIPT_COMMAND(0x323, 0x326, 2),
194 SCRIPT_WAIT(0x1E),
195 SCRIPT_TALK(0, 1, 0x23, 2),
197 SCRIPT_POSE(0x23, 1, 4),
198 SCRIPT_WAIT(0x1E),
199 SCRIPT_LEAVE(0x229, 0x5CF, 0x3E8, 7),
201};
203 SCRIPT_WALK(2, 0xB0, 0xC1, 3),
206 SCRIPT_POSE(2, 1, 7),
207 SCRIPT_WAIT(0x1E),
208 SCRIPT_TALK(0, 1, 2, 2),
209 SCRIPT_POSE(2, 7, 7),
211 SCRIPT_POSE(2, 1, 7),
212 SCRIPT_WAIT(0x1E),
213 SCRIPT_COMMAND(0x323, 0x327, 2),
214 SCRIPT_WAIT(0x5A),
215 SCRIPT_COMMAND(0x323, 0x326, 2),
216 SCRIPT_WAIT(0x1E),
217 SCRIPT_TALK(0, 2, 2, 2),
218 SCRIPT_POSE(2, 7, 7),
220 SCRIPT_POSE(2, 1, 3),
221 SCRIPT_WAIT(0x3C),
222 SCRIPT_LEAVE(0x229, 0x654, 0x442, 3),
224};
226 SCRIPT_WALK(2, 0x648, 0xCD, 5),
229 SCRIPT_POSE(2, 1, 1),
230 SCRIPT_WAIT(0x1E),
231 SCRIPT_TALK(0, 1, 2, 2),
232 SCRIPT_POSE(2, 7, 1),
234 SCRIPT_POSE(2, 1, 1),
235 SCRIPT_WAIT(0x1E),
236 SCRIPT_COMMAND(0x323, 0x327, 2),
237 SCRIPT_WAIT(0x5A),
238 SCRIPT_COMMAND(0x323, 0x326, 2),
239 SCRIPT_WAIT(0x1E),
240 SCRIPT_TALK(0, 2, 2, 2),
241 SCRIPT_POSE(2, 7, 1),
243 SCRIPT_POSE(2, 1, 5),
244 SCRIPT_WAIT(0x3C),
245 SCRIPT_LEAVE(0x22B, 0xB0, 0x4F8, 5),
247};
249 SCRIPT_WALK(2, 0xD0, 0x2FD, 3),
252 SCRIPT_POSE(2, 1, 7),
253 SCRIPT_WAIT(0x1E),
254 SCRIPT_TALK(0, 1, 2, 2),
255 SCRIPT_POSE(2, 7, 7),
257 SCRIPT_POSE(2, 1, 7),
258 SCRIPT_WAIT(0x1E),
259 SCRIPT_COMMAND(0x323, 0x327, 2),
260 SCRIPT_WAIT(0x5A),
261 SCRIPT_COMMAND(0x323, 0x326, 2),
262 SCRIPT_WAIT(0x1E),
263 SCRIPT_TALK(0, 2, 2, 2),
264 SCRIPT_POSE(2, 7, 7),
266 SCRIPT_POSE(2, 1, 3),
267 SCRIPT_WAIT(0x3C),
268 SCRIPT_LEAVE(0x22C, 0x384, 0x160, 3),
270};
382 { 0x200, 0x100, 0x21C, 0x1A6, 0x70, 0xA6, 0x230, 0x1FE },
383 { 0x200, 0x100, 0x200, 0x100, 0, 0, 0x220, 0x1FE },
384 { 0x200, 0x100, 0x216, 0x138, 0x58, 0x38, 0x200, 0x1FD },
385 { 0x200, 0x100, 0x208, 0x1BC, 0x20, 0xBC, 0x210, 0x1FD },
386 { 0x200, 0x100, 0x210, 0x1BC, 0x40, 0xBC, 0x220, 0x1FD },
387 { 0x200, 0x100, 0x200, 0x1BC, 0, 0xBC, 0x230, 0x1FD },
388 { 0x180, 0x100, 0x1B8, 0x140, 0x1E0, 0x40, 0x160, 0x1FF },
389 { 0x180, 0x100, 0x1B4, 0x100, 0x1D0, 0, 0x170, 0x1FF },
390 { 0x180, 0x100, 0x1B4, 0x120, 0x1D0, 0x20, 0x140, 0x1FE },
391 { 0x180, 0x100, 0x1A8, 0x125, 0x1A0, 0x25, 0x150, 0x1FE },
392 { 0x180, 0x100, 0x1B0, 0x140, 0x1C0, 0x40, 0x160, 0x1FE },
393 { 0x180, 0x100, 0x1B0, 0x160, 0x1C0, 0x60, 0x170, 0x1FE },
394 { 0x180, 0x100, 0x1B0, 0x180, 0x1C0, 0x80, 0x140, 0x1FD },
395};
403u16 actor1Talk0Actions[] = { START_EVENT(0x31), 1, FLAG(0, 0), 1, CODES_END };
467 { NULL, actor0Talk0Actions, 0x26D },
468 { NULL, NULL, 0 },
469};
472 { actor1Talk1Conditions, NULL, 0x32F },
473 { NULL, NULL, 0 },
474};
476 { NULL, NULL, 0x32F },
477 { NULL, NULL, 0 },
478};
480 { NULL, actor3Talk0Actions, 0x2E2 },
481 { NULL, NULL, 0 },
482};
490 { NULL, NULL, 0x27D },
491 { NULL, NULL, 0 },
492};
533 { actor12Talk1Conditions, NULL, 0x32F },
534 { NULL, NULL, 0 },
535};
537 { NULL, NULL, 0x32F },
538 { NULL, NULL, 0 },
539};
542 { actor14Talk1Conditions, NULL, 0x32F },
543 { NULL, NULL, 0 },
544};
546 { NULL, NULL, 0x32F },
547 { NULL, NULL, 0 },
548};
555 ITEM(0, 0x192), 1,
557 ITEM(0, 0x12), 0,
558 CODES_END,
559};
567 ITEM(0, 0x192), 1,
570 ITEM(0, 0x12), 0,
571 CODES_END,
572};
581 ITEM(0, 0x192), 1,
584 ITEM(0, 0x12), 0,
585 CODES_END,
586};
588 ITEM(0, 0x192), 1,
590 ITEM(0, 0x12), 1,
592 CODES_END,
593};
595 ITEM(0, 0x192), 1,
596 ITEM(0, 0x12), 1,
599 CODES_END,
600};
610FieldActorEntry actor4 = { actor4Conditions, actor4Talks, 0x39, 7, 1655, 1299, 7 };
611FieldActorEntry actor5 = { actor5Conditions, actor5Talks, 0x39, 7, 1655, 1299, 7 };
612FieldActorEntry actor6 = { actor6Conditions, actor6Talks, 0x39, 7, 1655, 1299, 7 };
613FieldActorEntry actor7 = { actor7Conditions, actor7Talks, 0x39, 7, 1655, 1299, 7 };
614FieldActorEntry actor8 = { actor8Conditions, actor8Talks, 0x39, 7, 1655, 1299, 7 };
615FieldActorEntry actor9 = { actor9Conditions, actor9Talks, 0x39, 7, 1655, 1299, 7 };
623 &actor0,
624 &actor1,
625 &actor2,
626 &actor3,
627 &actor4,
628 &actor5,
629 &actor6,
630 &actor7,
631 &actor8,
632 &actor9,
633 &actor10,
634 &actor11,
635 &actor12,
636 &actor13,
637 &actor14,
638 &actor15,
639 NULL,
640};
642 { 1, 0, 0x78, 2, 0, 0, 0, 0, 0, 0, 432, 785, 0, 0 },
643 { 1, 0, 0x40, 2, 3, 1, 3, 8, 8, 0, 730, 539, 0, 0 },
644 { 1, 0, 0x40, 2, 3, 1, 3, 8, 8, 0, 791, 950, 0, 0 },
645 { 1, 0, 0x40, 2, 3, 1, 3, 8, 8, 0, 792, 87, 0, 0 },
646 { 1, 0, 0x40, 2, 9, 0, 0, 0, 0, 0, 303, 734, 0, 0 },
647 { 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x34, 0xA, 0, 351, 829, 0, 0 },
648 { 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x34, 0xA, 0, 374, 627, 0, 0 },
649 { 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x34, 0xA, 0, 500, 726, 0, 0 },
650 { 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x34, 0xA, 0, 571, 414, 0, 0 },
651 { 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x34, 0xA, 0, 631, 562, 0, 0 },
652 { 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x34, 0xA, 0, 639, 644, 0, 0 },
653 { 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x34, 0xA, 0, 862, 571, 0, 0 },
654 { 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x34, 0xA, 0, 954, 512, 0, 0 },
655 { 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x34, 0xA, 0, 1127, 485, 0, 0 },
656 { 1, 0, 0x40, 6, 0x35, 1, 0x35, 0x37, 0xA, 0, 341, 879, 0, 0 },
657 { 1, 0, 0x40, 6, 0x35, 1, 0x35, 0x37, 0xA, 0, 374, 929, 0, 0 },
658 { 1, 0, 0x40, 6, 0x35, 1, 0x35, 0x37, 0xA, 0, 485, 453, 0, 0 },
659 { 1, 0, 0x40, 6, 0x35, 1, 0x35, 0x37, 0xA, 0, 684, 535, 0, 0 },
660 { 1, 0, 0x40, 6, 0x35, 1, 0x35, 0x37, 0xA, 0, 784, 488, 0, 0 },
661 { 1, 0, 0x40, 6, 0x35, 1, 0x35, 0x37, 0xA, 0, 928, 521, 0, 0 },
662 { 1, 0, 0x40, 6, 0x35, 1, 0x35, 0x37, 0xA, 0, 1013, 479, 0, 0 },
663 { 1, 0, 0x40, 6, 0x35, 1, 0x35, 0x37, 0xA, 0, 1117, 497, 0, 0 },
664 { 1, 0, 0x40, 6, 0x38, 1, 0x38, 0x3A, 0xA, 0, 303, 945, 0, 0 },
665 { 1, 0, 0x40, 6, 0x38, 1, 0x38, 0x3A, 0xA, 0, 329, 932, 0, 0 },
666 { 1, 0, 0x40, 6, 0x38, 1, 0x38, 0x3A, 0xA, 0, 390, 785, 0, 0 },
667 { 1, 0, 0x40, 6, 0x38, 1, 0x38, 0x3A, 0xA, 0, 438, 796, 0, 0 },
668 { 1, 0, 0x40, 6, 0x38, 1, 0x38, 0x3A, 0xA, 0, 445, 512, 0, 0 },
669 { 1, 0, 0x40, 6, 0x38, 1, 0x38, 0x3A, 0xA, 0, 450, 586, 0, 0 },
670 { 1, 0, 0x40, 6, 0x38, 1, 0x38, 0x3A, 0xA, 0, 519, 438, 0, 0 },
671 { 1, 0, 0x40, 6, 0x38, 1, 0x38, 0x3A, 0xA, 0, 620, 642, 0, 0 },
672 { 1, 0, 0x40, 6, 0x38, 1, 0x38, 0x3A, 0xA, 0, 663, 555, 0, 0 },
673 { 1, 0, 0x40, 6, 0x38, 1, 0x38, 0x3A, 0xA, 0, 825, 587, 0, 0 },
674 { 1, 0, 0x40, 6, 0x38, 1, 0x38, 0x3A, 0xA, 0, 986, 492, 0, 0 },
675 { 1, 0, 0x40, 6, 0x38, 1, 0x38, 0x3A, 0xA, 0, 1456, 664, 0, 0 },
676 { 1, 0, 0x40, 6, 0x3B, 1, 0x3B, 0x3D, 0xA, 0, 513, 546, 0, 0 },
677 { 1, 0, 0x40, 6, 0x3B, 1, 0x3B, 0x3D, 0xA, 0, 687, 476, 0, 0 },
678 { 1, 0, 0x40, 6, 0x3B, 1, 0x3B, 0x3D, 0xA, 0, 1189, 636, 0, 0 },
679 { 1, 0, 0x40, 6, 0x3B, 1, 0x3B, 0x3D, 0xA, 0, 1215, 553, 0, 0 },
680 { 1, 0, 0x40, 6, 0x3B, 1, 0x3B, 0x3D, 0xA, 0, 1344, 618, 0, 0 },
681 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 444, 485, 0, 0 },
682 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 473, 730, 0, 0 },
683 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 544, 555, 0, 0 },
684 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 669, 458, 0, 0 },
685 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 760, 581, 0, 0 },
686 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 1052, 481, 0, 0 },
687 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 1152, 493, 0, 0 },
688 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 1272, 585, 0, 0 },
689 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 1397, 643, 0, 0 },
690 { 1, 0, 0x40, 6, 0x41, 1, 0x41, 0x43, 0xA, 0, 434, 724, 0, 0 },
691 { 1, 0, 0x40, 6, 0x41, 1, 0x41, 0x43, 0xA, 0, 446, 530, 0, 0 },
692 { 1, 0, 0x40, 6, 0x41, 1, 0x41, 0x43, 0xA, 0, 588, 580, 0, 0 },
693 { 1, 0, 0x40, 6, 0x41, 1, 0x41, 0x43, 0xA, 0, 730, 486, 0, 0 },
694 { 1, 0, 0x40, 6, 0x41, 1, 0x41, 0x43, 0xA, 0, 788, 597, 0, 0 },
695 { 1, 0, 0x40, 6, 0x41, 1, 0x41, 0x43, 0xA, 0, 807, 504, 0, 0 },
696 { 1, 0, 0x40, 6, 0x41, 1, 0x41, 0x43, 0xA, 0, 1087, 490, 0, 0 },
697 { 1, 0, 0x40, 6, 0x41, 1, 0x41, 0x43, 0xA, 0, 1204, 634, 0, 0 },
698 { 1, 0, 0x40, 6, 0x41, 1, 0x41, 0x43, 0xA, 0, 1237, 569, 0, 0 },
699 { 1, 0, 0x40, 6, 0x41, 1, 0x41, 0x43, 0xA, 0, 1284, 600, 0, 0 },
700 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 343, 853, 0, 0 },
701 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 354, 839, 0, 0 },
702 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 359, 937, 0, 0 },
703 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 368, 802, 0, 0 },
704 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 372, 910, 0, 0 },
705 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 398, 765, 0, 0 },
706 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 415, 714, 0, 0 },
707 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 445, 783, 0, 0 },
708 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 456, 726, 0, 0 },
709 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 627, 650, 0, 0 },
710 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 652, 632, 0, 0 },
711 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 824, 605, 0, 0 },
712 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 834, 506, 0, 0 },
713 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 883, 535, 0, 0 },
714 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 974, 510, 0, 0 },
715 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 1030, 1476, 0, 0 },
716 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 1144, 525, 0, 0 },
717 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 1155, 526, 0, 0 },
718 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 1159, 517, 0, 0 },
719 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 1276, 774, 0, 0 },
720 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 1287, 778, 0, 0 },
721 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 1294, 769, 0, 0 },
722 { 1, 0x64, 0x40, 6, 2, 0, 0, 0, 0, 0, 177, 719, 0, 0 },
723 { 1, 0, 0xE0, 0xA, 0x4A, 1, 0x4A, 0x4C, 8, 0, 184, 992, 0, 0 },
724 { 1, 0, 0x40, 4, 1, 0, 0, 0, 0, 0, 134, 729, 771, 0 },
725 { 1, 0, 0x40, 4, 0xA, 0, 0, 0, 0, 0, 139, 776, 813, 0 },
726 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 166, 303, 303, 0 },
727 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 184, 248, 248, 0 },
728 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 204, 335, 335, 0 },
729 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 208, 279, 279, 0 },
730 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 208, 471, 471, 0 },
731 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 240, 311, 311, 0 },
732 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 240, 503, 503, 0 },
733 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 246, 871, 871, 0 },
734 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 256, 351, 351, 0 },
735 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 256, 447, 447, 0 },
736 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 264, 911, 911, 0 },
737 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 272, 391, 391, 0 },
738 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 272, 535, 535, 0 },
739 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 272, 791, 791, 0 },
740 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 288, 479, 479, 0 },
741 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 304, 327, 327, 0 },
742 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 304, 423, 423, 0 },
743 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 320, 367, 367, 0 },
744 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 345, 212, 212, 0 },
745 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 367, 263, 263, 0 },
746 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 399, 239, 239, 0 },
747 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 432, 279, 279, 0 },
748 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 432, 951, 951, 0 },
749 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 432, 999, 999, 0 },
750 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 458, 252, 252, 0 },
751 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 480, 303, 303, 0 },
752 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 480, 975, 975, 0 },
753 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 506, 276, 276, 0 },
754 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 528, 999, 999, 0 },
755 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 544, 1135, 1135, 0 },
756 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 560, 295, 295, 0 },
757 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 576, 975, 975, 0 },
758 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 592, 271, 271, 0 },
759 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 592, 823, 823, 0 },
760 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 592, 1015, 1015, 0 },
761 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 592, 1159, 1159, 0 },
762 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 608, 319, 319, 0 },
763 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 633, 291, 291, 0 },
764 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 640, 1039, 1039, 0 },
765 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 640, 1183, 1183, 0 },
766 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 647, 827, 827, 0 },
767 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 672, 1071, 1071, 0 },
768 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 681, 315, 315, 0 },
769 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 688, 1207, 1207, 0 },
770 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 703, 815, 815, 0 },
771 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 720, 1047, 1047, 0 },
772 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 729, 339, 339, 0 },
773 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 736, 1087, 1087, 0 },
774 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 752, 711, 711, 0 },
775 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 752, 807, 807, 0 },
776 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 768, 1119, 1119, 0 },
777 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 783, 843, 843, 0 },
778 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 784, 743, 743, 0 },
779 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 784, 1159, 1159, 0 },
780 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 800, 1255, 1255, 0 },
781 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 832, 815, 815, 0 },
782 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 832, 1135, 1135, 0 },
783 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 848, 759, 759, 0 },
784 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 864, 1167, 1167, 0 },
785 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 864, 1231, 1231, 0 },
786 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 880, 791, 791, 0 },
787 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 911, 970, 970, 0 },
788 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 912, 1143, 1143, 0 },
789 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 927, 1241, 1241, 0 },
790 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 928, 271, 271, 0 },
791 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 928, 799, 799, 0 },
792 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 928, 1183, 1183, 0 },
793 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 935, 858, 858, 0 },
794 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 960, 943, 943, 0 },
795 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 976, 295, 295, 0 },
796 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 976, 983, 983, 0 },
797 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 976, 1159, 1159, 0 },
798 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 989, 1034, 1034, 0 },
799 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 991, 1262, 1262, 0 },
800 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 997, 201, 201, 0 },
801 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 1024, 959, 959, 0 },
802 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 1040, 999, 999, 0 },
803 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 1040, 1143, 1143, 0 },
804 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 1042, 1251, 1251, 0 },
805 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 1055, 215, 215, 0 },
806 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 1064, 1083, 1083, 0 },
807 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 1087, 1222, 1222, 0 },
808 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 1088, 1119, 1119, 0 },
809 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 1104, 231, 231, 0 },
810 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 1120, 319, 319, 0 },
811 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 1120, 911, 911, 0 },
812 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 1120, 1007, 1007, 0 },
813 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 1145, 1251, 1251, 0 },
814 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 1152, 255, 255, 0 },
815 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 1152, 943, 943, 0 },
816 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 1168, 295, 295, 0 },
817 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 1168, 983, 983, 0 },
818 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 1184, 335, 335, 0 },
819 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 1184, 1279, 1279, 0 },
820 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 1200, 919, 919, 0 },
821 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 1200, 1239, 1239, 0 },
822 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 1216, 367, 367, 0 },
823 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 1216, 959, 959, 0 },
824 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 1223, 1188, 1188, 0 },
825 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 1232, 1303, 1303, 0 },
826 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 1248, 1263, 1263, 0 },
827 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 1264, 343, 343, 0 },
828 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 1264, 935, 935, 0 },
829 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 1264, 1175, 1175, 0 },
830 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 1280, 975, 975, 0 },
831 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 1280, 1327, 1327, 0 },
832 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 1311, 1182, 1182, 0 },
833 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 1312, 327, 327, 0 },
834 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 1312, 367, 367, 0 },
835 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 1321, 1146, 1146, 0 },
836 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 1328, 951, 951, 0 },
837 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 1344, 991, 991, 0 },
838 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 1344, 1118, 1118, 0 },
839 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 1344, 1311, 1311, 0 },
840 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 1360, 343, 343, 0 },
841 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 1376, 1023, 1023, 0 },
842 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 1392, 1327, 1327, 0 },
843 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 1398, 1051, 1051, 0 },
844 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 1400, 227, 227, 0 },
845 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 1440, 207, 207, 0 },
846 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 1440, 1063, 1063, 0 },
847 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 1456, 1319, 1319, 0 },
848 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 1488, 407, 407, 0 },
849 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 1503, 1295, 1295, 0 },
850 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 1504, 223, 223, 0 },
851 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 1525, 443, 443, 0 },
852 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 1542, 298, 298, 0 },
853 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 1568, 1279, 1279, 0 },
854 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 1584, 279, 279, 0 },
855 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 1601, 464, 464, 0 },
856 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
857};
859 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x22B, 0xB0, 0x4F8, 5, 0, 0, 0 },
860 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x229, 0x654, 0x442, 3, 0, 0, 0 },
861 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x22C, 0x384, 0x160, 3, 0x64, 0, 0 },
862 { { { SPECIAL_STORY_SINCE_DE_SINCERITY, 1 }, { FLAG_VEEMON_HIDE_AND_SEEK_ACTIVE, 0 } }, SLOT_WARP0, 0x2E0, 0x240, 0xD8, 1, 0, 1, 1 },
863 { { { SPECIAL_STORY_SINCE_DE_KNOWLEDGE, 1 }, { CODES_END, 0 } }, SLOT_WARP1, 0x2E9, 0xB0, 0xF8, 7, 0, 2, 1 },
864 { { { SPECIAL_STORY_SINCE_DE_KNOWLEDGE, 1 }, { FLAG_VEEMON_HIDE_AND_SEEK_ACTIVE, 0 } }, SLOT_WARP1, 0x2E9, 0xB0, 0xF8, 7, 0, 3, 4 },
865 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_DROP, 7, 0, 0, 0, 0, 0, 0 },
866 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_CLIMB_DOWN, 7, 0x34D, 0xFA, 0, 0, 0, 0 },
867 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_CLIMB_UP, 7, 0x33F, 0x16C, 0, 0, 0, 0 },
868 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_CLIMB_DOWN, 5, 0x59E, 0x111, 0, 0, 0, 0 },
869 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_CLIMB_UP, 5, 0x58F, 0x163, 0, 0, 0, 0 },
870 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_CLIMB_DOWN, 7, 0x2DE, 0x4E3, 0, 0, 0, 0 },
871 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_CLIMB_UP, 7, 0x2D0, 0x550, 0, 0, 0, 0 },
872 { { { ITEM(0, 5), 1 }, { ITEM(0, 4), 1 } }, SLOT_GAUGE, 0x40, 0x30, 0, 0, 0, 0, 0 },
873 { { { ITEM(0, 5), 1 }, { ITEM(0, 4), 1 } }, SLOT_GAUGE, 0xFFC0, 0x30, 0, 0, 0, 0, 0 },
874 { { { ITEM(0, 5), 1 }, { ITEM(0, 4), 1 } }, SLOT_GAUGE, 0, 0x50, 0, 0, 0, 0, 0 },
875 { { { ITEM(0, 5), 1 }, { ITEM(0, 4), 1 } }, SLOT_GAUGE, 0x60, 0x10, 0, 0, 0, 0, 0 },
876 { { { ITEM(0, 5), 1 }, { ITEM(0, 4), 1 } }, SLOT_GAUGE, 0x50, 0xFFE8, 0, 0, 0, 0, 0 },
877 { { { ITEM(0, 5), 1 }, { ITEM(0, 4), 1 } }, SLOT_GAUGE, 0xFFC0, 0xFFF0, 0, 0, 0, 0, 0 },
878 { { { ITEM(0, 5), 1 }, { ITEM(0, 4), 1 } }, SLOT_GAUGE, 0xFFD0, 0xFFF0, 0, 0, 0, 0, 0 },
879 { { { FLAG(0, FIELD_FLAG_ENCOUNTERED), 0 }, { CODES_END, 0 } }, SLOT_EVENT, 0x2328, 0, 0, 0, 0, 0, 0 },
880 { { { FLAG_VEEMON_HIDE_AND_SEEK_ACTIVE, 1 }, { CODES_END, 0 } }, SLOT_EVENT, 0x5E3, 0, 0, 0, 0, 0, 0 },
881 { { { FLAG_VEEMON_HIDE_AND_SEEK_ACTIVE, 1 }, { CODES_END, 0 } }, SLOT_EVENT, 0x5E4, 0, 0, 0, 0, 0, 0 },
882 { { { FLAG_VEEMON_HIDE_AND_SEEK_ACTIVE, 1 }, { CODES_END, 0 } }, SLOT_EVENT, 0x5E5, 0, 0, 0, 0, 0, 0 },
883 { { { CODES_END, 0 }, { CODES_END, 0 } }, 0, 0, 0, 0, 0, 0, 0, 0 },
884};
885void (*stageFuncs[])(void) = {
887};
889 { 1300, script1300, EVENT_TEXT(0x22), NULL, endEvent1300 },
890 { 1301, script1301, EVENT_TEXT(0x23), NULL, endEvent1301 },
891 { 1302, script1302, EVENT_TEXT(0x24), NULL, endEvent1302 },
892 { 1303, script1303, EVENT_TEXT(0x25), NULL, endEvent1303 },
893 { 1304, script1304, EVENT_TEXT(0x26), NULL, endEvent1304 },
897 { 9000, NULL, 0, FIELDSTG_startEventBattle5, NULL },
898 { -1, NULL, 0, NULL, NULL },
899};
#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).
void * FIELDSTG_startEventBattle5(void)
Starts battle 5 of the fourth area: the end of the stages' events 9000.
Definition field.c:1010
#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 SLOT_WARP1
a warp (FieldWarp at arg) with effect and cutscene 1
Definition field_map.h:263
#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 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_CLIMB_DOWN
Definition field_map.h:257
#define SLOT_EVENT
starts the event arg
Definition field_map.h:262
#define FIELD_FLAG_ENCOUNTERED
The FLAGS_00 flag that every encounter sets (FIELDSTG_startEncounter); until it is set,...
Definition field_map.h:190
#define SLOT_GAUGE
the gauge game
Definition field_map.h:261
#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 SLOT_DROP
Definition field_map.h:258
#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 CARD(id)
a card: the player has one, or gets or loses one
Definition game_state.h:82
#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_BATTLE
BATL0000: the maps' random battles (AreaBattle, nearly all of them)
Definition sound.h:76
#define MUSIC_WIRE_FOREST
ENV05_00: the Wire Forests and the Kicking Forest.
Definition sound.h:121
#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 FLAG_BOB_FOUGHT
wstag400 (Kicking Forest): Tamer Bob says "I guess you must battle to get the answer.
Definition story.h:838
@ STORY_PRESIDENT_ARRESTED
WSTAG226 (Login Room, Amaterasu City), event 935, after the President of MAGAMI gives himself up (WST...
Definition story.h:136
@ 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
#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_SINCE_DE_KNOWLEDGE
GAME.progress is STORY_DE_KNOWLEDGE or later (PROGRESS_RANGES[0xD], to 0x63)
Definition story.h:1902
#define SPECIAL_STORY_GENJI_BEATEN_TO_PRESIDENT_ARRESTED
GAME.progress is from STORY_GENJI_BEATEN to STORY_PRESIDENT_ARRESTED (PROGRESS_RANGES[0x1A])
Definition story.h:1941
#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_KICKING_FOREST_DOWN_JACKET_FOUND
wstag400: chest that gives the Down Jacket, "I got" text; its conditions test it 0
Definition story.h:296
#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_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_VEEMON_HIDE_AND_SEEK_ACTIVE
wstag395 Wind Prairie: set when Veemon asks "You want to play?"; Kicking Forest hiders appear; cleare...
Definition story.h:1097
#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_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
u16 actor1Conditions[]
Definition wstag400.c:550
s16 script1509[]
Definition wstag400.c:248
u16 actor0Talk0Actions[]
Definition wstag400.c:396
u16 actor10Talk2Conditions[]
Definition wstag400.c:453
FieldActorEntry actor0
Definition wstag400.c:606
void(* stageFuncs[])(void)
The stage's functions (common/start_stage.inc.c calls the first): a StageFuncs in the stages with a t...
Definition wstag400.c:885
FieldActorEntry actor6
Definition wstag400.c:612
AreaBattle battles1Area3Battle5
Definition wstag400.c:367
u16 actor7Talk1Conditions[]
Definition wstag400.c:418
u16 actor9Talk1Actions[]
Definition wstag400.c:428
BattleList battles1Area1Battles
Definition wstag400.c:344
u16 actor11Conditions[]
Definition wstag400.c:601
AreaBattle battles0Area1Battle4
Definition wstag400.c:288
u16 actor10Talk1Actions[]
Definition wstag400.c:452
FieldTalk actor2Talks[]
Definition wstag400.c:475
AreaBattle battles0Area0Battle3
Definition wstag400.c:274
u16 actor8Talk1Conditions[]
Definition wstag400.c:423
AreaBattle battles1Area2Battle4
Definition wstag400.c:353
FieldBattles stageBattles0[]
Defined below, after the code that uses them.
Definition wstag400.c:375
AreaBattle battles0Area1Battle2
Definition wstag400.c:286
u16 actor10Conditions[]
Definition wstag400.c:594
BattleList battles0Area3Battles
Definition wstag400.c:318
AreaBattle battles1Area2Battle2
Definition wstag400.c:351
AreaBattle battles1Area0Battle4
Definition wstag400.c:327
BattleList battles1Area3Battles
Definition wstag400.c:370
AreaBattle battles0Area1Battle3
Definition wstag400.c:287
u16 actor4Talk2Actions[]
Definition wstag400.c:410
BattleList battles0Area0Battles
Definition wstag400.c:279
u16 actor7Talk2Conditions[]
Definition wstag400.c:419
u16 actor10Talk3Actions[]
Definition wstag400.c:455
FieldTalk actor14Talks[]
Definition wstag400.c:540
FieldTalk actor5Talks[]
Definition wstag400.c:489
AreaBattle battles0Area3Battle3
Definition wstag400.c:313
s16 script1301[]
Definition wstag400.c:135
u16 actor11Talk1Conditions[]
Definition wstag400.c:457
u16 actor11Talk2Actions[]
Definition wstag400.c:459
AreaBattle battles1Area1Battle5
Definition wstag400.c:341
FieldBattles stageBattles1[]
Definition wstag400.c:378
AreaBattle battles1Area1Battle3
Definition wstag400.c:339
AreaBattle battles1Area0Battle5
Definition wstag400.c:328
FieldActorEntry actor5
Definition wstag400.c:611
AreaBattle battles0Area0Battle7
Definition wstag400.c:278
AreaBattle battles1Area3Battle0
Definition wstag400.c:362
u16 actor1Talk1Conditions[]
Definition wstag400.c:404
s16 script1508[]
Definition wstag400.c:225
FieldActorEntry actor2
Definition wstag400.c:608
u16 actor8Talk2Conditions[]
Definition wstag400.c:424
const CVECTOR stageColor
the color the setup copies to FIELDSTG_state.spriteColor
Definition wstag400.c:80
AreaBattle battles1Area0Battle6
Definition wstag400.c:329
u16 actor9Talk0Conditions[]
Definition wstag400.c:426
u16 actor6Talk1Conditions[]
Definition wstag400.c:412
u16 actor9Talk2Actions[]
Definition wstag400.c:435
AreaBattle battles1Area0Battle0
Definition wstag400.c:323
AreaBattle battles1Area2Battle6
Definition wstag400.c:355
BattleList battles1Area0Battles
Definition wstag400.c:331
u16 actor9Conditions[]
Definition wstag400.c:587
u16 actor7Talk0Conditions[]
Definition wstag400.c:416
AreaBattle battles0Area0Battle5
Definition wstag400.c:276
FieldActorEntry * stageActors[]
Definition wstag400.c:622
u16 actor7Talk0Actions[]
Definition wstag400.c:417
AreaBattle battles0Area2Battle2
Definition wstag400.c:299
AreaBattle battles1Area1Battle2
Definition wstag400.c:338
AreaBattle battles0Area3Battle7
Definition wstag400.c:317
u16 actor10Talk1Conditions[]
Definition wstag400.c:451
u16 actor11Talk0Conditions[]
Definition wstag400.c:456
AreaBattle battles1Area3Battle7
Definition wstag400.c:369
u16 actor4Talk1Conditions[]
Definition wstag400.c:408
AreaBattle battles0Area3Battle1
Definition wstag400.c:311
AreaBattle battles0Area2Battle1
Definition wstag400.c:298
u16 actor12Talk0Actions[]
Definition wstag400.c:461
u16 actor6Talk2Conditions[]
Definition wstag400.c:414
s16 script1302[]
Definition wstag400.c:151
u16 actor10Talk0Conditions[]
Definition wstag400.c:449
AreaBattle battles1Area3Battle2
Definition wstag400.c:364
FieldTalk actor1Talks[]
Definition wstag400.c:470
u16 actor13Conditions[]
Definition wstag400.c:603
AreaBattle battles1Area2Battle3
Definition wstag400.c:352
AreaBattle battles1Area3Battle6
Definition wstag400.c:368
AreaBattle battles0Area2Battle3
Definition wstag400.c:300
AreaBattle battles0Area0Battle4
Definition wstag400.c:275
AreaBattle battles0Area3Battle6
Definition wstag400.c:316
BattleList battles0Area2Battles
Definition wstag400.c:305
u16 actor1Talk0Conditions[]
Definition wstag400.c:402
FieldTalk actor0Talks[]
Definition wstag400.c:466
u16 actor6Talk2Actions[]
Definition wstag400.c:415
FieldActorEntry actor10
Definition wstag400.c:616
FieldTalk actor4Talks[]
Definition wstag400.c:483
u16 actor4Conditions[]
Definition wstag400.c:553
FieldActorEntry actor4
Definition wstag400.c:610
u16 actor3Conditions[]
Definition wstag400.c:552
AreaBattle battles0Area1Battle6
Definition wstag400.c:290
AreaBattle battles0Area2Battle0
Definition wstag400.c:297
AreaBattle battles1Area1Battle1
Definition wstag400.c:337
FieldTalk actor11Talks[]
Definition wstag400.c:525
FieldActorEntry actor8
Definition wstag400.c:614
AreaBattle battles0Area2Battle5
Definition wstag400.c:302
AreaBattle battles1Area0Battle3
Definition wstag400.c:326
ActorImage stageImages[]
Definition wstag400.c:381
u16 actor14Talk1Conditions[]
Definition wstag400.c:465
AreaBattle battles0Area1Battle5
Definition wstag400.c:289
BattleList battles0Area1Battles
Definition wstag400.c:292
AreaBattle battles0Area2Battle4
Definition wstag400.c:301
FieldTalk actor6Talks[]
Definition wstag400.c:493
void setupStage(void)
Sets the stage up: its map, actors, battles and events, playing the ambience ENV05_00; battle list 0 ...
Definition wstag400.c:94
u16 actor12Talk0Conditions[]
Definition wstag400.c:460
u16 actor10Talk0Actions[]
Definition wstag400.c:450
u16 actor4Talk0Conditions[]
Definition wstag400.c:406
AreaBattle battles1Area3Battle4
Definition wstag400.c:366
StageTile stageObjects[]
The tables and color setupStage gives FIELDSTG_state (FieldState)
Definition wstag400.c:641
s16 script1507[]
Definition wstag400.c:202
AreaBattle battles0Area1Battle7
Definition wstag400.c:291
FieldActorEntry actor9
Definition wstag400.c:615
u16 actor8Conditions[]
Definition wstag400.c:580
AreaBattle battles1Area1Battle4
Definition wstag400.c:340
AreaBattle battles0Area3Battle4
Definition wstag400.c:314
u16 actor9Talk1Conditions[]
Definition wstag400.c:427
u16 actor5Conditions[]
Definition wstag400.c:560
FieldTalk actor10Talks[]
Definition wstag400.c:518
FieldTalk actor3Talks[]
Definition wstag400.c:479
s16 script1304[]
Definition wstag400.c:184
FieldTalk actor9Talks[]
Definition wstag400.c:511
u16 actor8Talk2Actions[]
Definition wstag400.c:425
FieldTalk actor15Talks[]
Definition wstag400.c:545
AreaBattle battles0Area2Battle6
Definition wstag400.c:303
AreaBattle battles1Area2Battle0
Definition wstag400.c:349
FieldActorEntry actor15
Definition wstag400.c:621
FieldActorEntry actor12
Definition wstag400.c:618
u16 actor15Conditions[]
Definition wstag400.c:605
AreaBattle battles0Area0Battle1
Definition wstag400.c:272
u16 actor6Talk0Conditions[]
Definition wstag400.c:411
BattleList battles1Area2Battles
Definition wstag400.c:357
AreaBattle battles1Area2Battle5
Definition wstag400.c:354
u16 actor6Conditions[]
Definition wstag400.c:566
u16 actor12Talk1Conditions[]
Definition wstag400.c:462
u16 actor14Talk0Actions[]
Definition wstag400.c:464
void endEvent1304(void)
After event 1304, with Veemon: lets event 1305 of WSTAG395 start and clears flag 0x1A26 (which decide...
Definition wstag400.c:59
void endEvent1302(void)
After event 1302, with Agumon: sets flag 0x1C4D (which decides whether actors 12 and 13 appear)
Definition wstag400.c:42
u16 actor14Conditions[]
Definition wstag400.c:604
u16 actor9Talk3Actions[]
Definition wstag400.c:448
AreaBattle battles1Area1Battle0
Definition wstag400.c:336
FieldActorEntry actor7
Definition wstag400.c:613
s16 script1303[]
Definition wstag400.c:168
void endEvent1300(void)
After event 1300, with the player: keeps it from playing again.
Definition wstag400.c:29
StageSlot stageSlots[]
Definition wstag400.c:858
u16 actor1Talk0Actions[]
Definition wstag400.c:403
void endEvent1303(void)
After event 1303, with Agumon: sets flag 0x1C4E (which decides whether actors 14 and 15 appear)
Definition wstag400.c:50
FieldActorEntry actor13
Definition wstag400.c:619
u16 actor8Talk0Actions[]
Definition wstag400.c:422
AreaBattle battles1Area3Battle3
Definition wstag400.c:365
FieldActorEntry actor11
Definition wstag400.c:617
FieldActorEntry actor1
Definition wstag400.c:607
u16 actor10Talk3Conditions[]
Definition wstag400.c:454
s16 script1300[]
Definition wstag400.c:120
FieldTalk actor13Talks[]
Definition wstag400.c:536
void endEvents1507To1509(void)
After events 1507 to 1509, where the player gives up looking for Veemon and leaves the Kicking Forest...
Definition wstag400.c:69
#define STAGE_FILE
Definition wstag400.c:88
u16 actor4Talk0Actions[]
Definition wstag400.c:407
void endEvent1301(void)
After event 1301, with Agumon: sets flag 0x1C4C (which decides whether actors 1 and 2 appear)
Definition wstag400.c:34
AreaBattle battles0Area0Battle0
Definition wstag400.c:271
AreaBattle battles0Area2Battle7
Definition wstag400.c:304
AreaBattle battles1Area2Battle1
Definition wstag400.c:350
AreaBattle battles1Area0Battle7
Definition wstag400.c:330
AreaBattle battles0Area1Battle1
Definition wstag400.c:285
u16 actor7Conditions[]
Definition wstag400.c:573
AreaBattle battles0Area3Battle2
Definition wstag400.c:312
u16 actor6Talk1Actions[]
Definition wstag400.c:413
AreaBattle battles1Area2Battle7
Definition wstag400.c:356
u16 actor2Conditions[]
Definition wstag400.c:551
FieldTalk actor7Talks[]
Definition wstag400.c:499
u16 actor9Talk2Conditions[]
Definition wstag400.c:429
AreaBattle battles0Area1Battle0
Definition wstag400.c:284
AreaBattle battles0Area3Battle5
Definition wstag400.c:315
u16 actor9Talk3Conditions[]
Definition wstag400.c:442
#define STAGE_TEXT
Definition wstag400.c:86
AreaBattle battles1Area0Battle1
Definition wstag400.c:324
AreaBattle battles1Area1Battle6
Definition wstag400.c:342
u16 actor3Talk0Actions[]
Definition wstag400.c:405
FieldTalk actor8Talks[]
Definition wstag400.c:505
u16 actor11Talk2Conditions[]
Definition wstag400.c:458
FieldTalk actor12Talks[]
Definition wstag400.c:531
AreaBattle battles0Area0Battle2
Definition wstag400.c:273
AreaBattle battles0Area3Battle0
Definition wstag400.c:310
u16 actor8Talk0Conditions[]
Definition wstag400.c:421
u16 actor4Talk2Conditions[]
Definition wstag400.c:409
AreaBattle battles0Area0Battle6
Definition wstag400.c:277
AreaBattle battles1Area1Battle7
Definition wstag400.c:343
AreaBattle battles1Area3Battle1
Definition wstag400.c:363
FieldActorEntry actor3
Definition wstag400.c:609
AreaBattle battles1Area0Battle2
Definition wstag400.c:325
FieldActorEntry actor14
Definition wstag400.c:620
FieldEvent stageEvents[]
Definition wstag400.c:888
u16 actor12Conditions[]
Definition wstag400.c:602
u16 actor14Talk0Conditions[]
Definition wstag400.c:463
u16 actor0Conditions[]
Definition wstag400.c:549
u16 actor7Talk2Actions[]
Definition wstag400.c:420