Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
wstag386.c
Go to the documentation of this file.
1/*
2 * WSTAG386: Duel Island, East Sector. On the Amaterasu server; its Asuka
3 * server twin is WSTAG385.
4 */
5
6#include "common.h"
7#include "field/stage.h"
8
11
12#if VERSION_US || VERSION_JP
13#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_04)
14#define EVENT_TEXT_FILE (TEXT_EVENTS_300 - 1)
15#define STAGE_FILE 0x57D
16#elif VERSION_EU
17#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_04)
18#define EVENT_TEXT_FILE (TEXT_EVENTS_300 - 1)
19#define STAGE_FILE 0x58D
20#endif
21/* Sets the stage up: its map, actors and events, playing BGM_0008 */
40
42 SCRIPT_WALK(2, 0x1F7, 0x214, 3),
43 SCRIPT_PLACE(0x145, 0x1E0, 0x209),
44 SCRIPT_POSE(0x145, 1, 7),
47 SCRIPT_POSE(2, 1, 3),
48 SCRIPT_WAIT(0x1E),
49 SCRIPT_POSE(0x145, 1, 3),
50 SCRIPT_WAIT(0x1E),
51 SCRIPT_WALK(0x145, 0x1D5, 0x202, 3),
52 SCRIPT_WAIT_WALK(0x145),
53 SCRIPT_POSE(0x145, 1, 3),
54 SCRIPT_WAIT(0x1E),
55 SCRIPT_POSE(0x145, 1, 5),
56 SCRIPT_WAIT(0x1E),
57 SCRIPT_WALK(0x145, 0x1F8, 0x1F0, 5),
58 SCRIPT_WAIT_WALK(0x145),
59 SCRIPT_POSE(0x145, 1, 5),
60 SCRIPT_WAIT(0x1E),
61 SCRIPT_POSE(0x145, 1, 1),
62 SCRIPT_WAIT(0x1E),
63 SCRIPT_TALK(0, 1, 0x145, 0),
65 SCRIPT_WAIT(0x1E),
67};
69 SCRIPT_WALK(2, 0x191, 0x1E1, 1),
70 SCRIPT_PLACE(0x144, 0x177, 0x1ED),
71 SCRIPT_POSE(0x144, 1, 5),
74 SCRIPT_POSE(2, 1, 1),
75 SCRIPT_WAIT(0x1E),
76 SCRIPT_POSE(0x144, 1, 1),
77 SCRIPT_WAIT(0x1E),
78 SCRIPT_WALK(0x144, 0x165, 0x1F5, 1),
79 SCRIPT_WAIT_WALK(0x144),
80 SCRIPT_POSE(0x144, 1, 1),
81 SCRIPT_WAIT(0x1E),
82 SCRIPT_POSE(0x144, 1, 3),
83 SCRIPT_WAIT(0x1E),
84 SCRIPT_WALK(0x144, 0x141, 0x1E5, 3),
85 SCRIPT_WAIT_WALK(0x144),
86 SCRIPT_POSE(0x144, 1, 3),
87 SCRIPT_WAIT(0x1E),
88 SCRIPT_POSE(0x144, 1, 7),
89 SCRIPT_WAIT(0x1E),
90 SCRIPT_TALK(0, 1, 0x144, 3),
92 SCRIPT_WAIT(0x1E),
94};
96 SCRIPT_WALK(2, 0x128, 0x1FC, 3),
97 SCRIPT_PLACE(0x143, 0x110, 0x1F1),
98 SCRIPT_POSE(0x143, 1, 7),
101 SCRIPT_POSE(2, 1, 3),
102 SCRIPT_WAIT(0x1E),
103 SCRIPT_POSE(0x143, 1, 3),
104 SCRIPT_WAIT(0x1E),
105 SCRIPT_WALK(0x143, 0xCC, 0x1CE, 3),
106 SCRIPT_WAIT_WALK(0x143),
107 SCRIPT_POSE(0x143, 1, 3),
108 SCRIPT_WAIT(0x1E),
109 SCRIPT_POSE(0x143, 1, 7),
110 SCRIPT_WAIT(0x1E),
111 SCRIPT_TALK(0, 1, 0x143, 3),
113 SCRIPT_WAIT(0x1E),
115};
117 SCRIPT_WALK(2, 0x140, 0x180, 3),
118 SCRIPT_PLACE(0x129, 0x129, 0x175),
119 SCRIPT_POSE(0x129, 1, 7),
122 SCRIPT_POSE(2, 1, 3),
123 SCRIPT_WAIT(0x1E),
124 SCRIPT_POSE(0x129, 1, 5),
125 SCRIPT_WAIT(0x1E),
126 SCRIPT_WALK(0x129, 0x155, 0x15D, 5),
127 SCRIPT_WAIT_WALK(0x129),
128 SCRIPT_POSE(0x129, 1, 5),
129 SCRIPT_WAIT(0x1E),
130 SCRIPT_POSE(0x129, 1, 1),
131 SCRIPT_WAIT(0x1E),
132 SCRIPT_TALK(0, 1, 0x129, 3),
134 SCRIPT_WAIT(0x1E),
136};
138 SCRIPT_WALK(2, 0xF0, 0x118, 3),
139 SCRIPT_PLACE(0x12A, 0xD8, 0x10D),
140 SCRIPT_POSE(0x12A, 1, 7),
143 SCRIPT_POSE(2, 1, 3),
144 SCRIPT_WAIT(0x1E),
145 SCRIPT_POSE(0x12A, 1, 5),
146 SCRIPT_WAIT(0x1E),
147 SCRIPT_WALK(0x12A, 0x104, 0xF7, 5),
148 SCRIPT_WAIT_WALK(0x12A),
149 SCRIPT_POSE(0x12A, 1, 5),
150 SCRIPT_WAIT(0x1E),
151 SCRIPT_POSE(0x12A, 1, 1),
152 SCRIPT_WAIT(0x1E),
153 SCRIPT_TALK(0, 1, 0x12A, 0),
155 SCRIPT_WAIT(0x1E),
157};
159 SCRIPT_WALK(2, 0xB7, 0xBD, 3),
160 SCRIPT_PLACE(0xC0, 0x9F, 0xB1),
161 SCRIPT_POSE(0xC0, 1, 7),
164 SCRIPT_WAIT(0x1E),
165 SCRIPT_TALK(0, 1, 0xC0, 2),
168 SCRIPT_WAIT(0x1E),
169 SCRIPT_TALK(0, 2, 2, 1),
170 SCRIPT_POSE(2, 7, 3),
172 SCRIPT_POSE(2, 1, 3),
173 SCRIPT_WAIT(0x1E),
174 SCRIPT_TALK(0, 3, 0xC0, 2),
176 SCRIPT_WAIT(0x1E),
177 SCRIPT_TALK(0, 4, 2, 1),
178 SCRIPT_POSE(2, 7, 3),
180 SCRIPT_POSE(2, 1, 3),
181 SCRIPT_WAIT(0x1E),
182 SCRIPT_TALK(0, 5, 0xC0, 2),
184 SCRIPT_WAIT(0x1E),
185 SCRIPT_TALK(0, 6, 2, 1),
186 SCRIPT_POSE(2, 7, 3),
188 SCRIPT_POSE(2, 1, 3),
189 SCRIPT_WAIT(0x1E),
190 SCRIPT_WALK(2, 0xBF, 0xC1, 7),
192 SCRIPT_LEAVE(0x297, 0x250, 0x278, 7),
194};
196 { 0x200, 0x100, 0x21C, 0x1A6, 0x70, 0xA6, 0x230, 0x1FE },
197 { 0x200, 0x100, 0x200, 0x100, 0, 0, 0x220, 0x1FE },
198 { 0x200, 0x100, 0x216, 0x138, 0x58, 0x38, 0x200, 0x1FD },
199 { 0x200, 0x100, 0x208, 0x1BC, 0x20, 0xBC, 0x210, 0x1FD },
200 { 0x200, 0x100, 0x210, 0x1BC, 0x40, 0xBC, 0x220, 0x1FD },
201 { 0x200, 0x100, 0x200, 0x1BC, 0, 0xBC, 0x230, 0x1FD },
202 { 0x140, 0x100, 0x172, 0x1B3, 0xC8, 0xB3, 0x170, 0x1F8 },
203 { 0x180, 0x100, 0x1AC, 0x100, 0x1B0, 0, 0x140, 0x1F7 },
204 { 0x140, 0x100, 0x16A, 0x1C5, 0xA8, 0xC5, 0x150, 0x1F7 },
205 { 0x180, 0x100, 0x180, 0x178, 0x100, 0x78, 0x170, 0x1F7 },
206 { 0x180, 0x100, 0x188, 0x178, 0x120, 0x78, 0x140, 0x1F6 },
207 { 0x180, 0x100, 0x190, 0x178, 0x140, 0x78, 0x150, 0x1F6 },
208 { 0x180, 0x100, 0x198, 0x178, 0x160, 0x78, 0x170, 0x1F6 },
209 { 0x180, 0x100, 0x1A0, 0x178, 0x180, 0x78, 0x140, 0x1F5 },
210 { 0x180, 0x100, 0x1B6, 0x100, 0x1D8, 0, 0x150, 0x1F5 },
211 { 0x180, 0x100, 0x1A8, 0x178, 0x1A0, 0x78, 0x170, 0x1F5 },
212 { 0x180, 0x100, 0x1B0, 0x178, 0x1C0, 0x78, 0x140, 0x1F4 },
213 { 0x180, 0x100, 0x180, 0x1A0, 0x100, 0xA0, 0x150, 0x1F4 },
214 { 0x180, 0x100, 0x188, 0x1A0, 0x120, 0xA0, 0x170, 0x1F4 },
215 { 0x180, 0x100, 0x190, 0x1A0, 0x140, 0xA0, 0x140, 0x1F3 },
216 { 0x180, 0x100, 0x198, 0x1A0, 0x160, 0xA0, 0x150, 0x1F3 },
217 { 0x180, 0x100, 0x1A0, 0x1A0, 0x180, 0xA0, 0x160, 0x1F3 },
218 { 0x180, 0x100, 0x1A8, 0x1A0, 0x1A0, 0xA0, 0x170, 0x1F3 },
219};
239 ITEM(0, 0x14), 1,
242 FLAG(0x1A, 0x3F), 0,
243 FLAG(0x1A, 0x3E), 0,
244 FLAG(0x1A, 0x3D), 0,
245 FLAG(0x1A, 0x3C), 0,
246 START_EVENT(0x6C), 1,
247 CODES_END,
248};
282 FLAG(0x1A, 0x3F), 0,
283 ITEM(0, 0x18D), 0,
284 CODES_END,
285};
289 ITEM(0, 0x18D), 1,
290 FLAG(0x1A, 0x3F), 0,
292 CODES_END,
293};
301 ITEM(0, 0x18D), 1,
304 FLAG(0x1A, 0x3F), 0,
305 CODES_END,
306};
310 ITEM(0, 0x18D), 1,
313 FLAG(0x1A, 0x3F), 0,
314 CODES_END,
315};
319 ITEM(0, 0x18D), 1,
322 FLAG(0x1A, 0x3F), 0,
323 CODES_END,
324};
328 FLAG(0x1A, 0x3F), 1,
329 START_EVENT(0x59), 1,
330 CODES_END,
331};
338 FLAG(0x1A, 0x3F), 0,
339 CODES_END,
340};
345 FLAG(0x1A, 0x3F), 0,
346 CODES_END,
347};
351 START_EVENT(0x59), 1,
352 FLAG(0x1A, 0x3F), 1,
353 CODES_END,
354};
423 FLAG(0x1A, 0x3E), 0,
424 CODES_END,
425};
430 FLAG(0x1A, 0x3E), 0,
431 CODES_END,
432};
436 START_EVENT(0x58), 1,
437 FLAG(0x1A, 0x3E), 1,
438 CODES_END,
439};
446 FLAG(0x1A, 0x3E), 0,
447 CODES_END,
448};
453 FLAG(0x1A, 0x3E), 0,
454 CODES_END,
455};
459 START_EVENT(0x58), 1,
460 FLAG(0x1A, 0x3E), 1,
461 CODES_END,
462};
469 FLAG(0x1A, 0x3D), 0,
470 CODES_END,
471};
476 FLAG(0x1A, 0x3D), 0,
477 CODES_END,
478};
482 START_EVENT(0x57), 1,
483 FLAG(0x1A, 0x3D), 1,
484 CODES_END,
485};
492 FLAG(0x1A, 0x3D), 0,
493 CODES_END,
494};
499 FLAG(0x1A, 0x3D), 0,
500 CODES_END,
501};
505 START_EVENT(0x57), 1,
506 FLAG(0x1A, 0x3D), 1,
507 CODES_END,
508};
515 FLAG(0x1A, 0x3C), 0,
516 CODES_END,
517};
522 FLAG(0x1A, 0x3C), 0,
523 CODES_END,
524};
528 START_EVENT(0x56), 1,
529 FLAG(0x1A, 0x3C), 1,
530 CODES_END,
531};
538 FLAG(0x1A, 0x3C), 0,
539 CODES_END,
540};
545 FLAG(0x1A, 0x3C), 0,
546 CODES_END,
547};
551 START_EVENT(0x56), 1,
552 FLAG(0x1A, 0x3C), 1,
553 CODES_END,
554};
556 { NULL, NULL, 0x34B },
557 { NULL, NULL, 0 },
558};
560 { NULL, NULL, 0x330 },
561 { NULL, NULL, 0 },
562};
564 { NULL, NULL, 0x330 },
565 { NULL, NULL, 0 },
566};
568 { NULL, NULL, 0x330 },
569 { NULL, NULL, 0 },
570};
572 { NULL, NULL, 0x330 },
573 { NULL, NULL, 0 },
574};
576 { NULL, NULL, 0x349 },
577 { NULL, NULL, 0 },
578};
580 { NULL, NULL, 0x34A },
581 { NULL, NULL, 0 },
582};
598 { NULL, NULL, 0x341 },
599 { NULL, NULL, 0 },
600};
674 { NULL, NULL, 0x34C },
675 { NULL, NULL, 0 },
676};
678 { NULL, NULL, 0x34C },
679 { NULL, NULL, 0 },
680};
683u16 actor2Conditions[] = { FLAG(0x1A, 0x3F), 1, CODES_END };
684u16 actor3Conditions[] = { FLAG(0x1A, 0x3E), 1, CODES_END };
685u16 actor4Conditions[] = { FLAG(0x1A, 0x3D), 1, CODES_END };
686u16 actor5Conditions[] = { FLAG(0x1A, 0x3C), 1, CODES_END };
689u16 actor8Conditions[] = { ITEM(0, 0x14), 0, CODES_END };
690u16 actor9Conditions[] = { ITEM(0, 0x14), 1, CODES_END };
692u16 actor11Conditions[] = { FLAG(0x1A, 0x3F), 0, ITEM(0, 0x14), 0, CODES_END };
693u16 actor12Conditions[] = { FLAG(0x1A, 0x3F), 0, ITEM(0, 0x14), 1, CODES_END };
696u16 actor15Conditions[] = { FLAG(0x1A, 0x3E), 0, ITEM(0, 0x14), 0, CODES_END };
697u16 actor16Conditions[] = { ITEM(0, 0x14), 1, FLAG(0x1A, 0x3E), 0, CODES_END };
698u16 actor17Conditions[] = { FLAG(0x1A, 0x3D), 0, ITEM(0, 0x14), 0, CODES_END };
699u16 actor18Conditions[] = { FLAG(0x1A, 0x3D), 0, ITEM(0, 0x14), 1, CODES_END };
700u16 actor19Conditions[] = { FLAG(0x1A, 0x3C), 0, ITEM(0, 0x14), 0, CODES_END };
701u16 actor20Conditions[] = { FLAG(0x1A, 0x3C), 0, ITEM(0, 0x14), 1, CODES_END };
702u16 actor21Conditions[] = { ITEM(0, 0x192), 0, CODES_END };
703u16 actor22Conditions[] = { ITEM(0, 0x192), 0, CODES_END };
704FieldActorEntry actor0 = { actor0Conditions, NULL, 0x4B, 4, 588, 1083, 1 };
710FieldActorEntry actor6 = { actor6Conditions, actor6Talks, 0xBA, 0xA, 769, 209, 1 };
711FieldActorEntry actor7 = { actor7Conditions, actor7Talks, 0xBB, 0xB, 929, 417, 1 };
712FieldActorEntry actor8 = { actor8Conditions, actor8Talks, 0xC0, 0xC, 159, 177, 7 };
713FieldActorEntry actor9 = { actor9Conditions, actor9Talks, 0xC0, 0xC, 159, 177, 7 };
719FieldActorEntry actor15 = { actor15Conditions, actor15Talks, 0x143, 0x10, 272, 497, 7 };
720FieldActorEntry actor16 = { actor16Conditions, actor16Talks, 0x143, 0x10, 272, 497, 7 };
721FieldActorEntry actor17 = { actor17Conditions, actor17Talks, 0x144, 0x11, 375, 493, 7 };
722FieldActorEntry actor18 = { actor18Conditions, actor18Talks, 0x144, 0x11, 375, 493, 7 };
723FieldActorEntry actor19 = { actor19Conditions, actor19Talks, 0x145, 0x12, 480, 521, 7 };
724FieldActorEntry actor20 = { actor20Conditions, actor20Talks, 0x145, 0x12, 480, 521, 7 };
725FieldActorEntry actor21 = { actor21Conditions, actor21Talks, 0x16B, 0x13, 501, 549, 7 };
726FieldActorEntry actor22 = { actor22Conditions, actor22Talks, 0x16C, 0x14, 522, 538, 7 };
728 &actor0,
729 &actor1,
730 &actor2,
731 &actor3,
732 &actor4,
733 &actor5,
734 &actor6,
735 &actor7,
736 &actor8,
737 &actor9,
738 &actor10,
739 &actor11,
740 &actor12,
741 &actor13,
742 &actor14,
743 &actor15,
744 &actor16,
745 &actor17,
746 &actor18,
747 &actor19,
748 &actor20,
749 &actor21,
750 &actor22,
751 NULL,
752};
754 { 1, 0, 0x40, 2, 0x47, 2, 0, 5, 8, 0, 85, 81, 0, 0 },
755 { 1, 0, 0x40, 2, 0x48, 2, 0, 5, 8, 0, 83, 117, 0, 0 },
756 { 1, 0, 0x40, 2, 0x48, 2, 0, 5, 8, 0, 83, 135, 0, 0 },
757 { 1, 0, 0x40, 2, 0x48, 2, 0, 5, 8, 0, 91, 113, 0, 0 },
758 { 1, 0, 0x40, 2, 0x48, 2, 0, 5, 8, 0, 91, 131, 0, 0 },
759 { 1, 0, 0x40, 2, 0x48, 2, 0, 5, 8, 0, 99, 109, 0, 0 },
760 { 1, 0, 0x40, 2, 0x48, 2, 0, 5, 8, 0, 99, 127, 0, 0 },
761 { 1, 0, 0x40, 2, 0x48, 2, 0, 5, 8, 0, 107, 105, 0, 0 },
762 { 1, 0, 0x40, 2, 0x48, 2, 0, 5, 8, 0, 107, 123, 0, 0 },
763 { 1, 0, 0x40, 2, 0x48, 2, 0, 5, 8, 0, 115, 101, 0, 0 },
764 { 1, 0, 0x40, 2, 0x48, 2, 0, 5, 8, 0, 115, 119, 0, 0 },
765 { 1, 0, 0x40, 2, 0x48, 2, 0, 5, 8, 0, 123, 97, 0, 0 },
766 { 1, 0, 0x40, 2, 0x48, 2, 0, 5, 8, 0, 123, 115, 0, 0 },
767 { 1, 0, 0x40, 2, 0x48, 2, 0, 5, 8, 0, 131, 93, 0, 0 },
768 { 1, 0, 0x40, 2, 0x48, 2, 0, 5, 8, 0, 131, 111, 0, 0 },
769 { 1, 0, 0x40, 2, 0x48, 2, 0, 5, 8, 0, 139, 89, 0, 0 },
770 { 1, 0, 0x40, 2, 0x48, 2, 0, 5, 8, 0, 139, 107, 0, 0 },
771 { 1, 0, 0x40, 2, 0x48, 2, 0, 5, 8, 0, 147, 85, 0, 0 },
772 { 1, 0, 0x40, 2, 0x48, 2, 0, 5, 8, 0, 147, 103, 0, 0 },
773 { 1, 0, 0x40, 2, 0x48, 2, 0, 5, 8, 0, 155, 81, 0, 0 },
774 { 1, 0, 0x40, 2, 0x48, 2, 0, 5, 8, 0, 155, 99, 0, 0 },
775 { 1, 0, 0x40, 2, 0x48, 2, 0, 5, 8, 0, 163, 77, 0, 0 },
776 { 1, 0, 0x40, 2, 0x48, 2, 0, 5, 8, 0, 163, 95, 0, 0 },
777 { 1, 0, 0x40, 2, 0x49, 2, 0, 5, 8, 0, 87, 115, 0, 0 },
778 { 1, 0, 0x40, 2, 0x49, 2, 0, 5, 8, 0, 87, 133, 0, 0 },
779 { 1, 0, 0x40, 2, 0x49, 2, 0, 5, 8, 0, 95, 111, 0, 0 },
780 { 1, 0, 0x40, 2, 0x49, 2, 0, 5, 8, 0, 95, 129, 0, 0 },
781 { 1, 0, 0x40, 2, 0x49, 2, 0, 5, 8, 0, 103, 107, 0, 0 },
782 { 1, 0, 0x40, 2, 0x49, 2, 0, 5, 8, 0, 103, 125, 0, 0 },
783 { 1, 0, 0x40, 2, 0x49, 2, 0, 5, 8, 0, 111, 103, 0, 0 },
784 { 1, 0, 0x40, 2, 0x49, 2, 0, 5, 8, 0, 111, 121, 0, 0 },
785 { 1, 0, 0x40, 2, 0x49, 2, 0, 5, 8, 0, 119, 99, 0, 0 },
786 { 1, 0, 0x40, 2, 0x49, 2, 0, 5, 8, 0, 119, 117, 0, 0 },
787 { 1, 0, 0x40, 2, 0x49, 2, 0, 5, 8, 0, 127, 95, 0, 0 },
788 { 1, 0, 0x40, 2, 0x49, 2, 0, 5, 8, 0, 127, 113, 0, 0 },
789 { 1, 0, 0x40, 2, 0x49, 2, 0, 5, 8, 0, 135, 91, 0, 0 },
790 { 1, 0, 0x40, 2, 0x49, 2, 0, 5, 8, 0, 135, 109, 0, 0 },
791 { 1, 0, 0x40, 2, 0x49, 2, 0, 5, 8, 0, 143, 87, 0, 0 },
792 { 1, 0, 0x40, 2, 0x49, 2, 0, 5, 8, 0, 143, 105, 0, 0 },
793 { 1, 0, 0x40, 2, 0x49, 2, 0, 5, 8, 0, 151, 83, 0, 0 },
794 { 1, 0, 0x40, 2, 0x49, 2, 0, 5, 8, 0, 151, 101, 0, 0 },
795 { 1, 0, 0x40, 2, 0x49, 2, 0, 5, 8, 0, 159, 79, 0, 0 },
796 { 1, 0, 0x40, 2, 0x49, 2, 0, 5, 8, 0, 159, 97, 0, 0 },
797 { 1, 0, 0x40, 2, 0x49, 2, 0, 5, 8, 0, 167, 75, 0, 0 },
798 { 1, 0, 0x40, 2, 0x49, 2, 0, 5, 8, 0, 167, 93, 0, 0 },
799 { 1, 0, 0x40, 2, 0x4A, 2, 0, 7, 4, 0, 103, 201, 0, 0 },
800 { 1, 0, 0x40, 2, 0x4B, 2, 0, 7, 4, 0, 105, 205, 0, 0 },
801 { 1, 0, 0x80, 2, 1, 0, 0, 0, 0, 0, 768, 128, 0, 0 },
802 { 1, 0, 0x78, 2, 3, 0, 0, 0, 0, 0, 896, 256, 0, 0 },
803 { 1, 0, 0x55, 2, 4, 0, 0, 0, 0, 0, 984, 299, 0, 0 },
804 { 1, 0, 0x33, 2, 5, 0, 0, 0, 0, 0, 278, 813, 0, 0 },
805 { 1, 0, 0x1E, 2, 6, 0, 0, 0, 0, 0, 323, 829, 0, 0 },
806 { 1, 0, 0x45, 2, 2, 0, 0, 0, 0, 0, 880, 156, 0, 0 },
807 { 1, 0, 0x40, 6, 0x4A, 2, 0, 7, 4, 0, 220, 180, 0, 0 },
808 { 1, 0, 0x40, 6, 0x4A, 2, 0, 7, 4, 0, 232, 138, 0, 0 },
809 { 1, 0, 0x40, 6, 0x4A, 2, 0, 7, 4, 0, 297, 268, 0, 0 },
810 { 1, 0, 0x40, 6, 0x4A, 2, 0, 7, 4, 0, 300, 284, 0, 0 },
811 { 1, 0, 0x40, 6, 0x4B, 2, 0, 7, 4, 0, 168, 143, 0, 0 },
812 { 1, 0, 0x40, 6, 0x4B, 2, 0, 7, 4, 0, 220, 184, 0, 0 },
813 { 1, 0, 0x40, 6, 0x4B, 2, 0, 7, 4, 0, 234, 143, 0, 0 },
814 { 1, 0, 0x40, 6, 0x4B, 2, 0, 7, 4, 0, 235, 299, 0, 0 },
815 { 1, 0, 0x40, 6, 0x4B, 2, 0, 7, 4, 0, 280, 241, 0, 0 },
816 { 1, 0, 0x40, 6, 0x4B, 2, 0, 7, 4, 0, 300, 270, 0, 0 },
817 { 1, 0, 0x40, 6, 0x2C, 1, 0x2C, 0x3B, 0xA, 0, 318, 861, 0, 0 },
818 { 1, 0, 0x40, 6, 0x2C, 1, 0x2C, 0x3B, 0xA, 0, 427, 415, 0, 0 },
819 { 1, 0, 0x40, 6, 0x2C, 1, 0x2C, 0x3B, 0xA, 0, 543, 989, 0, 0 },
820 { 1, 0, 0x40, 6, 0x2C, 1, 0x2C, 0x3B, 0xA, 0, 766, 529, 0, 0 },
821 { 1, 0, 0x40, 6, 0x2C, 1, 0x2C, 0x3B, 0xA, 0, 903, 778, 0, 0 },
822 { 1, 0, 0x40, 6, 0x3C, 1, 0x3C, 0x46, 0xA, 0, 81, 1002, 0, 0 },
823 { 1, 0, 0x40, 6, 0x3C, 1, 0x3C, 0x46, 0xA, 0, 449, 833, 0, 0 },
824 { 1, 0, 0x40, 6, 0x3C, 1, 0x3C, 0x46, 0xA, 0, 518, 250, 0, 0 },
825 { 1, 0, 0x40, 6, 0x3C, 1, 0x3C, 0x46, 0xA, 0, 885, 1060, 0, 0 },
826 { 1, 0, 0x40, 6, 0x3C, 1, 0x3C, 0x46, 0xA, 0, 1056, 440, 0, 0 },
827 { 1, 0, 0x40, 6, 0x3C, 1, 0x3C, 0x46, 0xA, 0, 1108, 931, 0, 0 },
828 { 1, 0, 0x40, 4, 0, 0, 0, 0, 0, 0, 477, 577, 626, 0 },
829 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
830};
832 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_CLIMB_DOWN, 4, 0xC0, 0xC2, 0, 0, 0, 0 },
833 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_CLIMB_UP, 4, 0xCF, 0x106, 0, 0, 0, 0 },
834 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_CLIMB_DOWN, 4, 0x110, 0x12B, 0, 0, 0, 0 },
835 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_CLIMB_UP, 4, 0x11F, 0x16E, 0, 0, 0, 0 },
836 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_CLIMB_DOWN, 4, 0x100, 0x192, 0, 0, 0, 0 },
837 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_CLIMB_UP, 4, 0xF1, 0x1D6, 0, 0, 0, 0 },
838 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_CLIMB_DOWN, 4, 0x330, 0xEA, 0, 0, 0, 0 },
839 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_CLIMB_UP, 4, 0x33F, 0x12E, 0, 0, 0, 0 },
840 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_CLIMB_DOWN, 4, 0x2DE, 0x141, 0, 0, 0, 0 },
841 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_CLIMB_UP, 4, 0x2CE, 0x186, 0, 0, 0, 0 },
842 { { { SPECIAL_STORY_SINCE_DE_SINCERITY, 1 }, { CODES_END, 0 } }, SLOT_WARP0, 0x2E0, 0x240, 0xD8, 1, 0, 0x12, 1 },
843 { { { SPECIAL_STORY_SINCE_DE_SINCERITY, 1 }, { CODES_END, 0 } }, SLOT_WARP0, 0x2E0, 0x240, 0xD8, 1, 0, 0x12, 1 },
844 { { { CODES_END, 0 }, { CODES_END, 0 } }, 0, 0, 0, 0, 0, 0, 0, 0 },
845};
846void (*stageFuncs[])(void) = {
848};
850 { 1436, script1436, EVENT_TEXT(0x2C), NULL, NULL },
851 { 1438, script1438, EVENT_TEXT(0x2D), NULL, NULL },
852 { 1440, script1440, EVENT_TEXT(0x2E), NULL, NULL },
853 { 1442, script1442, EVENT_TEXT(0x2F), NULL, NULL },
854 { 1444, script1444, EVENT_TEXT(0x30), NULL, NULL },
855 { 1446, script1446, EVENT_TEXT(0x32), NULL, NULL },
856 { -1, NULL, 0, NULL, NULL },
857};
#define NULL
Definition common.h:17
signed short s16
Definition common.h:9
unsigned short u16
Definition common.h:10
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
#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 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 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 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 CARD_BATTLE(opponent, kind)
action: startCardBattle
Definition game_state.h:73
#define MUSIC_DUEL_ISLAND
BGM_0008: Duel Island.
Definition sound.h:84
#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_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 FLAG_DUEL_ISLAND_ETEMON_FOUGHT
wstag386 Duel Island: Etemon gets his mic back ("Let's battle!") and starts a card battle; set with i...
Definition story.h:1269
#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 SPECIAL_STORY_SINCE_KNIGHTMON_REPROGRAMMED
GAME.progress is STORY_KNIGHTMON_REPROGRAMMED or later (PROGRESS_RANGES[8], to 0x63)
Definition story.h:1887
#define FLAG_DUEL_ISLAND_METALETEMON_BEATEN
wstag386 Duel Island: MetalEtemon loses the card battle ("...I lost!"); cleared when KingEtemon loses
Definition story.h:1139
#define FLAG_KING_ETEMON_REMATCH_BEATEN
wstag386 Duel Island: KingEtemon loses the rematch ("Why did I lose?!"); afterwards he won't battle "...
Definition story.h:1287
#define SPECIAL_STORY_SINCE_DE_SINCERITY
GAME.progress is STORY_DE_SINCERITY or later (PROGRESS_RANGES[0xC], to 0x63)
Definition story.h:1899
#define FLAG_ETEMON_MIC_STOLEN_TALKED
wstag386 Duel Island: Etemon says Black Agumon took his mic; makes BK Agumon appear in the Circuit Bo...
Definition story.h:1254
#define FLAG_KING_ETEMON_BEATEN
wstag386 Duel Island: KingEtemon loses and gives the Sun Trophy (item 0x14); resets the Etemon duelis...
Definition story.h:1281
Where an actor's frames go in VRAM: one of the records after the FieldImage (Actor....
Definition field_map.h:114
A character of the field (FieldState.actors, a list of pointers up to NULL), which FIELDSTG_updateFie...
Definition field_map.h:194
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
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
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
What the player can trigger on a map (FIELDSTG_updateTriggers): a record of the table at FieldState....
Definition field_map.h:276
An object of a map, which FIELDSTG draws: a record of the table at FieldState.objects,...
Definition field_map.h:208
Definition gfx.h:352
u16 actor1Conditions[]
Definition wstag386.c:682
FieldActorEntry actor0
Definition wstag386.c:704
u16 actor19Talk3Actions[]
Definition wstag386.c:525
void(* stageFuncs[])(void)
The stage's functions (common/start_stage.inc.c calls the first): a StageFuncs in the stages with a t...
Definition wstag386.c:846
FieldActorEntry actor6
Definition wstag386.c:710
u16 actor9Talk1Actions[]
Definition wstag386.c:259
u16 actor11Conditions[]
Definition wstag386.c:692
u16 actor11Talk3Conditions[]
Definition wstag386.c:299
FieldTalk actor2Talks[]
Definition wstag386.c:559
u16 actor8Talk1Conditions[]
Definition wstag386.c:221
u16 actor19Talk1Actions[]
Definition wstag386.c:511
u16 actor13Talk3Actions[]
Definition wstag386.c:379
u16 actor16Talk1Actions[]
Definition wstag386.c:442
u16 actor17Talk3Actions[]
Definition wstag386.c:479
u16 actor8Talk3Conditions[]
Definition wstag386.c:230
u16 actor10Conditions[]
Definition wstag386.c:691
u16 actor18Conditions[]
Definition wstag386.c:699
u16 actor13Talk2Conditions[]
Definition wstag386.c:366
u16 actor8Talk3Actions[]
Definition wstag386.c:236
FieldActorEntry actor17
Definition wstag386.c:721
u16 actor20Talk1Conditions[]
Definition wstag386.c:533
u16 actor19Talk2Actions[]
Definition wstag386.c:518
u16 actor12Talk2Conditions[]
Definition wstag386.c:335
u16 actor18Talk2Actions[]
Definition wstag386.c:495
s16 script1440[]
Definition wstag386.c:95
s16 script1446[]
Definition wstag386.c:158
FieldTalk actor14Talks[]
Definition wstag386.c:624
FieldActorEntry actor18
Definition wstag386.c:722
FieldTalk actor5Talks[]
Definition wstag386.c:571
u16 actor16Talk2Conditions[]
Definition wstag386.c:443
u16 actor11Talk1Conditions[]
Definition wstag386.c:280
u16 actor11Talk2Actions[]
Definition wstag386.c:294
s16 script1436[]
Definition wstag386.c:41
u16 actor15Talk1Actions[]
Definition wstag386.c:419
FieldActorEntry actor5
Definition wstag386.c:709
u16 actor22Conditions[]
Definition wstag386.c:703
FieldActorEntry actor2
Definition wstag386.c:706
u16 actor8Talk2Conditions[]
Definition wstag386.c:223
u16 actor13Talk1Actions[]
Definition wstag386.c:365
u16 actor9Talk0Conditions[]
Definition wstag386.c:249
u16 actor19Talk2Conditions[]
Definition wstag386.c:512
u16 actor9Talk2Actions[]
Definition wstag386.c:266
u16 actor18Talk1Actions[]
Definition wstag386.c:488
u16 actor11Talk3Actions[]
Definition wstag386.c:307
u16 actor15Talk2Conditions[]
Definition wstag386.c:420
u16 actor15Talk3Conditions[]
Definition wstag386.c:427
FieldActorEntry actor19
Definition wstag386.c:723
u16 actor12Talk2Actions[]
Definition wstag386.c:341
u16 actor9Conditions[]
Definition wstag386.c:690
FieldActorEntry * stageActors[]
Definition wstag386.c:727
u16 actor19Talk0Conditions[]
Definition wstag386.c:509
u16 actor14Talk3Actions[]
Definition wstag386.c:410
u16 actor11Talk4Actions[]
Definition wstag386.c:316
u16 actor17Talk2Conditions[]
Definition wstag386.c:466
u16 actor17Talk1Conditions[]
Definition wstag386.c:464
u16 actor17Talk2Actions[]
Definition wstag386.c:472
u16 actor11Talk0Conditions[]
Definition wstag386.c:279
u16 actor14Talk3Conditions[]
Definition wstag386.c:404
u16 actor16Talk3Conditions[]
Definition wstag386.c:450
FieldActorEntry actor22
Definition wstag386.c:726
u16 actor18Talk1Conditions[]
Definition wstag386.c:487
FieldTalk actor1Talks[]
Definition wstag386.c:555
u16 actor13Conditions[]
Definition wstag386.c:694
u16 actor19Talk3Conditions[]
Definition wstag386.c:519
u16 actor17Talk0Conditions[]
Definition wstag386.c:463
u16 actor13Talk0Conditions[]
Definition wstag386.c:355
u16 actor14Talk1Actions[]
Definition wstag386.c:396
FieldTalk actor21Talks[]
Definition wstag386.c:673
FieldTalk actor20Talks[]
Definition wstag386.c:666
FieldActorEntry actor10
Definition wstag386.c:714
u16 actor20Talk2Actions[]
Definition wstag386.c:541
u16 actor19Conditions[]
Definition wstag386.c:700
FieldTalk actor4Talks[]
Definition wstag386.c:567
u16 actor4Conditions[]
Definition wstag386.c:685
FieldActorEntry actor4
Definition wstag386.c:708
u16 actor3Conditions[]
Definition wstag386.c:684
FieldTalk actor17Talks[]
Definition wstag386.c:645
FieldTalk actor11Talks[]
Definition wstag386.c:601
FieldActorEntry actor8
Definition wstag386.c:712
u16 actor15Talk1Conditions[]
Definition wstag386.c:418
ActorImage stageImages[]
Definition wstag386.c:195
u16 actor14Talk1Conditions[]
Definition wstag386.c:391
u16 actor11Talk4Conditions[]
Definition wstag386.c:308
FieldTalk actor6Talks[]
Definition wstag386.c:575
void setupStage(void)
Sets the stage up: its map, actors and events, playing BGM_0008.
Definition wstag386.c:22
u16 actor20Talk2Conditions[]
Definition wstag386.c:535
u16 actor12Talk0Conditions[]
Definition wstag386.c:332
FieldTalk actor19Talks[]
Definition wstag386.c:659
u16 actor17Talk3Conditions[]
Definition wstag386.c:473
u16 actor13Talk3Conditions[]
Definition wstag386.c:373
u16 actor8Talk1Actions[]
Definition wstag386.c:222
u16 actor16Conditions[]
Definition wstag386.c:697
StageTile stageObjects[]
The tables and color setupStage gives FIELDSTG_state (FieldState)
Definition wstag386.c:753
u16 actor16Talk1Conditions[]
Definition wstag386.c:441
FieldActorEntry actor9
Definition wstag386.c:713
u16 actor8Conditions[]
Definition wstag386.c:689
FieldActorEntry actor20
Definition wstag386.c:724
u16 actor12Talk3Conditions[]
Definition wstag386.c:342
u16 actor9Talk1Conditions[]
Definition wstag386.c:254
u16 actor5Conditions[]
Definition wstag386.c:686
FieldTalk actor10Talks[]
Definition wstag386.c:597
FieldTalk actor3Talks[]
Definition wstag386.c:563
s16 script1438[]
Definition wstag386.c:68
u16 actor11Talk1Actions[]
Definition wstag386.c:286
FieldTalk actor9Talks[]
Definition wstag386.c:590
u16 actor15Talk2Actions[]
Definition wstag386.c:426
u16 actor8Talk2Actions[]
Definition wstag386.c:229
FieldTalk actor15Talks[]
Definition wstag386.c:631
u16 actor15Talk3Actions[]
Definition wstag386.c:433
FieldActorEntry actor15
Definition wstag386.c:719
FieldActorEntry actor12
Definition wstag386.c:716
FieldActorEntry actor16
Definition wstag386.c:720
u16 actor15Conditions[]
Definition wstag386.c:696
u16 actor6Conditions[]
Definition wstag386.c:687
u16 actor12Talk1Conditions[]
Definition wstag386.c:333
u16 actor12Talk1Actions[]
Definition wstag386.c:334
u16 actor14Conditions[]
Definition wstag386.c:695
u16 actor9Talk3Actions[]
Definition wstag386.c:273
u16 actor18Talk3Conditions[]
Definition wstag386.c:496
FieldActorEntry actor7
Definition wstag386.c:711
u16 actor17Talk1Actions[]
Definition wstag386.c:465
s16 script1444[]
Definition wstag386.c:137
StageSlot stageSlots[]
Definition wstag386.c:831
FieldActorEntry actor13
Definition wstag386.c:717
u16 actor16Talk2Actions[]
Definition wstag386.c:449
u16 actor16Talk3Actions[]
Definition wstag386.c:456
u16 actor14Talk2Actions[]
Definition wstag386.c:403
FieldActorEntry actor11
Definition wstag386.c:715
u16 actor16Talk0Conditions[]
Definition wstag386.c:440
FieldActorEntry actor1
Definition wstag386.c:705
FieldActorEntry actor21
Definition wstag386.c:725
u16 actor18Talk3Actions[]
Definition wstag386.c:502
FieldTalk actor13Talks[]
Definition wstag386.c:617
#define STAGE_FILE
Definition wstag386.c:19
u16 actor19Talk1Conditions[]
Definition wstag386.c:510
u16 actor18Talk2Conditions[]
Definition wstag386.c:489
u16 actor20Talk3Actions[]
Definition wstag386.c:548
u16 actor7Conditions[]
Definition wstag386.c:688
u16 actor11Talk5Conditions[]
Definition wstag386.c:317
u16 actor2Conditions[]
Definition wstag386.c:683
u16 actor13Talk1Conditions[]
Definition wstag386.c:360
FieldTalk actor18Talks[]
Definition wstag386.c:652
u16 actor20Talk0Conditions[]
Definition wstag386.c:532
u16 actor12Talk3Actions[]
Definition wstag386.c:348
FieldTalk actor7Talks[]
Definition wstag386.c:579
u16 actor9Talk2Conditions[]
Definition wstag386.c:260
u16 actor20Conditions[]
Definition wstag386.c:701
u16 actor14Talk2Conditions[]
Definition wstag386.c:397
u16 actor9Talk3Conditions[]
Definition wstag386.c:267
u16 actor15Talk0Conditions[]
Definition wstag386.c:417
u16 actor20Talk1Actions[]
Definition wstag386.c:534
s16 script1442[]
Definition wstag386.c:116
#define STAGE_TEXT
Definition wstag386.c:17
FieldTalk actor8Talks[]
Definition wstag386.c:583
u16 actor18Talk0Conditions[]
Definition wstag386.c:486
u16 actor11Talk2Conditions[]
Definition wstag386.c:287
FieldTalk actor12Talks[]
Definition wstag386.c:610
u16 actor11Talk5Actions[]
Definition wstag386.c:325
u16 actor21Conditions[]
Definition wstag386.c:702
u16 actor8Talk0Conditions[]
Definition wstag386.c:220
u16 actor20Talk3Conditions[]
Definition wstag386.c:542
FieldTalk actor16Talks[]
Definition wstag386.c:638
u16 actor17Conditions[]
Definition wstag386.c:698
FieldActorEntry actor3
Definition wstag386.c:707
u16 actor13Talk2Actions[]
Definition wstag386.c:372
FieldActorEntry actor14
Definition wstag386.c:718
FieldEvent stageEvents[]
Definition wstag386.c:849
u16 actor12Conditions[]
Definition wstag386.c:693
FieldTalk actor22Talks[]
Definition wstag386.c:677
u16 actor14Talk0Conditions[]
Definition wstag386.c:386
u16 actor0Conditions[]
Definition wstag386.c:681