Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
wstag395.c
Go to the documentation of this file.
1/*
2 * WSTAG395: Wind Prairie, East Sector.
3 */
4
5#include "common.h"
6#include "field/stage.h"
7
8/* Creates the event object of progress 5 while flag 0x4011 is clear, or else the one of flags 0x1A27 and 0x1A28 */
9void updateStage(StageTask *task, void **children) {
10 switch (task->state) {
11 case TASK_INIT:
12 default:
13 do {
15 children[0] = FIELDSTG_startEvent(0x50);
16 break;
17 }
19 children[0] = FIELDSTG_startEvent(0x519);
20 break;
21 }
22 } while (0);
23 task->nextState(task);
24 break;
25 case TASK_RUN:
26 case TASK_DONE:
27 case TASK_KILL:
28 break;
29 }
30}
31
32#define STAGE_CHILDREN_SIZE 4
34
35/* After event 80, with Teddy: keeps it from playing again */
39
40/*
41 * After event 1305, with Veemon: gives the player the Tree Boots, clears
42 * flag 0x1C08 (which decides whether actors 11 to 22 in WSTAG255 appear) and
43 * keeps it from playing again
44 */
50
51#if VERSION_US || VERSION_JP
52#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_06)
53#define EVENT_TEXT_FILE (TEXT_EVENTS_300 - 1)
54#define STAGE_FILE 0x20C
55#define STAGE_ARCHIVE 0x310
56#elif VERSION_EU
57#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_06)
58#define EVENT_TEXT_FILE (TEXT_EVENTS_300 - 1)
59#define STAGE_FILE 0x21B
60#define STAGE_ARCHIVE 0x31F
61#endif
62/* Sets the stage up: its map, actors, battles and events, playing the ambience ENV_0006 */
83
85 SCRIPT_LOOK_AT(1, 0x439, 0x103),
86 SCRIPT_PLACE(1, 0x45E, 0xE9),
87 SCRIPT_POSE(1, 1, 1),
88 SCRIPT_PLACE(2, 0x458, 0xF5),
89 SCRIPT_POSE(2, 1, 1),
91 SCRIPT_WAIT(0x1E),
92 SCRIPT_WALK(1, 0x430, 0x101, 1),
93 SCRIPT_WALK(2, 0x439, 0x103, 1),
94 SCRIPT_PLACE(0xC, 0x393, 0x1A9),
95 SCRIPT_POSE(0xC, 1, 5),
97 SCRIPT_POSE(1, 1, 1),
98 SCRIPT_POSE(2, 1, 1),
99 SCRIPT_WALK(0xC, 0x3D4, 0x152, 5),
100 SCRIPT_WAIT_WALK(0xC),
101 SCRIPT_POSE(0xC, 1, 5),
102 SCRIPT_WAIT(0x1E),
103 SCRIPT_FOLLOW(0, 0xC),
104 SCRIPT_WAIT(0x5A),
105 SCRIPT_COMMAND(0x323, 0x325, 0xC),
106 SCRIPT_WAIT(0x3C),
107 SCRIPT_COMMAND(0x323, 0x326, 0xC),
108 SCRIPT_WAIT(0x1E),
109 SCRIPT_TALK(0, 1, 0xC, 1),
110 SCRIPT_POSE(0xC, 7, 5),
112 SCRIPT_POSE(0xC, 1, 5),
113 SCRIPT_WAIT(0x1E),
114 SCRIPT_FOLLOW(0, 2),
115 SCRIPT_WALK(0xC, 0x3F7, 0x124, 5),
116 SCRIPT_WAIT_WALK(0xC),
117 SCRIPT_WALK(0xC, 0x420, 0x10F, 5),
118 SCRIPT_WAIT_WALK(0xC),
119 SCRIPT_POSE(0xC, 1, 5),
120 SCRIPT_WAIT(0x1E),
121 SCRIPT_TALK(0, 2, 2, 2),
122 SCRIPT_POSE(1, 7, 1),
123 SCRIPT_POSE(2, 7, 1),
125 SCRIPT_POSE(1, 1, 1),
126 SCRIPT_POSE(2, 1, 1),
127 SCRIPT_WAIT(0x1E),
128 SCRIPT_TALK(0, 3, 0xC, 1),
129 SCRIPT_POSE(0xC, 7, 5),
131 SCRIPT_POSE(0xC, 1, 5),
132 SCRIPT_WAIT(0x1E),
133 SCRIPT_TALK(0, 4, 2, 2),
134 SCRIPT_POSE(1, 7, 1),
135 SCRIPT_POSE(2, 7, 1),
137 SCRIPT_POSE(1, 1, 1),
138 SCRIPT_POSE(2, 1, 1),
139 SCRIPT_WAIT(0x1E),
140 SCRIPT_TALK(0, 5, 0xC, 1),
141 SCRIPT_POSE(0xC, 7, 5),
143 SCRIPT_POSE(0xC, 1, 5),
144 SCRIPT_WAIT(0x1E),
145 SCRIPT_TALK(0, 6, 2, 2),
146 SCRIPT_POSE(1, 7, 1),
147 SCRIPT_POSE(2, 7, 1),
149 SCRIPT_POSE(1, 1, 1),
150 SCRIPT_POSE(2, 1, 1),
151 SCRIPT_WAIT(0x1E),
152 SCRIPT_POSE(0xC, 1, 7),
153 SCRIPT_WAIT(0x1E),
154 SCRIPT_TALK(0, 7, 0xC, 1),
155 SCRIPT_POSE(0xC, 7, 7),
157 SCRIPT_POSE(0xC, 1, 7),
158 SCRIPT_WAIT(0x1E),
159 SCRIPT_WAIT(0x5A),
160 SCRIPT_COMMAND(0x323, 0x325, 2),
161 SCRIPT_COMMAND(0x324, 0x325, 0xC),
163 SCRIPT_WAIT(0x3C),
164 SCRIPT_COMMAND(0x323, 0x326, 2),
165 SCRIPT_COMMAND(0x324, 0x326, 0xC),
166 SCRIPT_WAIT(0x1E),
167 SCRIPT_TALK(0, 8, 2, 4),
169 SCRIPT_POSE(0xC, 1, 5),
170 SCRIPT_WAIT(0x1E),
171 SCRIPT_TALK(0, 9, 0xC, 1),
172 SCRIPT_POSE(0xC, 7, 5),
174 SCRIPT_POSE(0xC, 1, 1),
175 SCRIPT_WAIT(0x1E),
176 SCRIPT_WALK(0xC, 0x3F7, 0x124, 1),
177 SCRIPT_WAIT_WALK(0xC),
178 SCRIPT_TALK(0, 0xA, 2, 2),
179 SCRIPT_POSE(1, 7, 1),
180 SCRIPT_POSE(2, 7, 1),
182 SCRIPT_POSE(1, 1, 1),
183 SCRIPT_POSE(2, 1, 1),
184 SCRIPT_WAIT(0x1E),
185 SCRIPT_WALK(0xC, 0x394, 0x1A9, 1),
186 SCRIPT_WAIT_WALK(0xC),
187 SCRIPT_TALK(0, 0xB, 2, 2),
188 SCRIPT_POSE(1, 7, 1),
189 SCRIPT_POSE(2, 7, 1),
191 SCRIPT_POSE(1, 1, 1),
192 SCRIPT_POSE(2, 1, 1),
193 SCRIPT_PLACE(0xC, 0, 0),
194 SCRIPT_POSE(0xC, 1, 0),
195 SCRIPT_WAIT(0x3C),
197};
199 SCRIPT_WALK(2, 0x5D0, 0x3E8, 5),
200 SCRIPT_POSE(0x23, 1, 1),
203 SCRIPT_POSE(2, 1, 5),
204 SCRIPT_WAIT(0x1E),
205 SCRIPT_TALK(0, 1, 0x23, 2),
207 SCRIPT_WAIT(0x1E),
208 SCRIPT_TALK(0, 2, 2, 1),
209 SCRIPT_POSE(2, 7, 5),
211 SCRIPT_POSE(2, 1, 5),
212 SCRIPT_WAIT(0x1E),
213 SCRIPT_TALK(0, 3, 0x23, 2),
215 SCRIPT_WAIT(0x1E),
216 SCRIPT_TALK(0, 4, 2, 0),
217 SCRIPT_POSE(2, 7, 5),
219 SCRIPT_POSE(2, 1, 5),
220 SCRIPT_COMMAND(0x323, 0x325, 0x23),
221 SCRIPT_WAIT(0x5A),
222 SCRIPT_COMMAND(0x323, 0x326, 0x23),
223 SCRIPT_WAIT(0x1E),
224 SCRIPT_TALK(0, 5, 0x23, 2),
226 SCRIPT_COMMAND(0x323, 0x325, 2),
227 SCRIPT_WAIT(0x5A),
228 SCRIPT_COMMAND(0x323, 0x326, 2),
229 SCRIPT_WAIT(0x5A),
230 SCRIPT_TALK(0, 6, 2, 1),
231 SCRIPT_POSE(2, 7, 5),
233 SCRIPT_POSE(2, 1, 5),
234 SCRIPT_WAIT(0x1E),
235 SCRIPT_TALK(0, 7, 0x23, 2),
237 SCRIPT_WAIT(0x1E),
238 SCRIPT_POSE(0x23, 1, 1),
239 SCRIPT_WAIT(0x1E),
240 SCRIPT_WALK(0x23, 0x610, 0x3E9, 7),
241 SCRIPT_WAIT_WALK(0x23),
242 SCRIPT_POSE(2, 1, 7),
243 SCRIPT_WALK(0x23, 0x5EF, 0x3F8, 0),
244 SCRIPT_WAIT_WALK(0x23),
245 SCRIPT_WALK(0x23, 0x670, 0x438, 7),
246 SCRIPT_WAIT_WALK(0x23),
247 SCRIPT_POSE(2, 1, 3),
248 SCRIPT_PLACE(0x23, 0, 0),
249 SCRIPT_POSE(0x23, 1, 0),
250 SCRIPT_WAIT(0x1E),
251 SCRIPT_TALK(0, 8, 2, 2),
252 SCRIPT_POSE(2, 7, 3),
254 SCRIPT_POSE(2, 1, 3),
255 SCRIPT_WAIT(0x1E),
256 SCRIPT_POSE(2, 1, 7),
257 SCRIPT_WAIT(0x1E),
258 SCRIPT_COMMAND(0x323, 0x327, 2),
259 SCRIPT_WAIT(0x78),
260 SCRIPT_COMMAND(0x323, 0x326, 2),
261 SCRIPT_WAIT(0x1E),
262 SCRIPT_TALK(0, 9, 2, 2),
263 SCRIPT_POSE(2, 7, 7),
265 SCRIPT_POSE(2, 1, 7),
266 SCRIPT_WAIT(0x1E),
267 SCRIPT_WALK(2, 0x670, 0x438, 7),
268 SCRIPT_WAIT(0x3C),
269 SCRIPT_LEAVE(0x22A, 0xEF, 0xE1, 7),
271};
273 SCRIPT_PLACE(2, 0x5CF, 0x3E8),
274 SCRIPT_POSE(2, 1, 7),
275 SCRIPT_PLACE(0x23, 0x5EF, 0x3F8),
276 SCRIPT_POSE(0x23, 1, 3),
277 SCRIPT_WAIT(0x3C),
278 SCRIPT_TALK(0, 1, 0x23, 2),
281 SCRIPT_WAIT(0x1E),
282 SCRIPT_TALK(0, 2, 2, 0),
283 SCRIPT_POSE(2, 7, 7),
285 SCRIPT_POSE(2, 1, 7),
286 SCRIPT_WAIT(0x1E),
287 SCRIPT_TALK(0, 3, 0x23, 2),
289 SCRIPT_WAIT(0x1E),
290 SCRIPT_POSE(0x23, 1, 7),
291 SCRIPT_WAIT(0x1E),
292 SCRIPT_WALK(0x23, 0x670, 0x438, 7),
293 SCRIPT_WAIT_WALK(0x23),
294 SCRIPT_PLACE(0x23, 0, 0),
295 SCRIPT_POSE(0x23, 1, 7),
296 SCRIPT_WAIT(0x1E),
298};
339AreaBattle area3Battle1 = { 0, 0, MUSIC(1, 0) };
340AreaBattle area3Battle2 = { 0, 0, MUSIC(1, 0) };
342AreaBattle area3Battle4 = { 0, 0, MUSIC(1, 0) };
343AreaBattle area3Battle5 = { 0, 0, MUSIC(1, 0) };
345AreaBattle area3Battle7 = { 0, 0, MUSIC(1, 0) };
355 { 0x200, 0x100, 0x21C, 0x1A6, 0x70, 0xA6, 0x230, 0x1FE },
356 { 0x200, 0x100, 0x200, 0x100, 0, 0, 0x220, 0x1FE },
357 { 0x200, 0x100, 0x216, 0x138, 0x58, 0x38, 0x200, 0x1FD },
358 { 0x200, 0x100, 0x208, 0x1BC, 0x20, 0xBC, 0x210, 0x1FD },
359 { 0x200, 0x100, 0x210, 0x1BC, 0x40, 0xBC, 0x220, 0x1FD },
360 { 0x200, 0x100, 0x200, 0x1BC, 0, 0xBC, 0x230, 0x1FD },
361 { 0x180, 0x100, 0x18A, 0x15A, 0x128, 0x5A, 0x140, 0x1FF },
362 { 0x180, 0x100, 0x1B8, 0x14C, 0x1E0, 0x4C, 0x150, 0x1FF },
363 { 0x180, 0x100, 0x192, 0x15A, 0x148, 0x5A, 0x160, 0x1FF },
364 { 0x180, 0x100, 0x1A8, 0x13C, 0x1A0, 0x3C, 0x170, 0x1FF },
365 { 0x180, 0x100, 0x19A, 0x164, 0x168, 0x64, 0x140, 0x1FE },
366};
388 FLAG(0, 0), 1,
389 PARTY_STAT(3), 1,
390 PARTY_STAT(1), 1,
392 CODES_END,
393};
396 FLAG(0, 0), 1,
397 PARTY_STAT(1), 1,
398 PARTY_STAT(3), 1,
400 ITEM(0, 0x12), 0,
401 CODES_END,
402};
404 FLAG(0, 0), 1,
405 PARTY_STAT(1), 1,
406 PARTY_STAT(3), 1,
408 ITEM(0, 0x12), 1,
409 PARTY_STAT(5), 0,
410 CODES_END,
411};
413 FLAG(0, 0), 1,
414 PARTY_STAT(1), 1,
415 PARTY_STAT(3), 1,
417 ITEM(0, 0x12), 1,
418 PARTY_STAT(5), 1,
419 CODES_END,
420};
428 FLAG(0, 0), 1,
429 PARTY_STAT(1), 1,
430 PARTY_STAT(3), 1,
432 CODES_END,
433};
437 FLAG(0, 0), 1,
438 PARTY_STAT(1), 1,
439 PARTY_STAT(3), 1,
440 ITEM(0, 0x12), 0,
441 CODES_END,
442};
444 FLAG(0, 0), 1,
445 PARTY_STAT(1), 1,
446 PARTY_STAT(3), 1,
448 ITEM(0, 0x12), 1,
449 PARTY_STAT(5), 0,
450 CODES_END,
451};
453 FLAG(0, 0), 1,
454 PARTY_STAT(1), 1,
455 PARTY_STAT(3), 1,
457 ITEM(0, 0x12), 1,
458 PARTY_STAT(5), 1,
459 CODES_END,
460};
468 FLAG(0, 0), 1,
469 PARTY_STAT(1), 1,
470 PARTY_STAT(3), 1,
472 CODES_END,
473};
476 FLAG(0, 0), 1,
477 PARTY_STAT(1), 1,
478 PARTY_STAT(3), 1,
480 ITEM(0, 0x12), 0,
481 CODES_END,
482};
484 PARTY_STAT(1), 1,
486 PARTY_STAT(5), 0,
487 FLAG(0, 0), 1,
488 PARTY_STAT(3), 1,
489 ITEM(0, 0x12), 1,
490 CODES_END,
491};
493 FLAG(0, 0), 1,
494 PARTY_STAT(1), 1,
495 PARTY_STAT(3), 1,
497 ITEM(0, 0x12), 1,
498 PARTY_STAT(5), 1,
499 CODES_END,
500};
512 FLAG(0, 0), 1,
513 PARTY_STAT(1), 1,
514 PARTY_STAT(3), 1,
516 CODES_END,
517};
520 FLAG(0, 0), 1,
521 PARTY_STAT(1), 1,
522 PARTY_STAT(3), 1,
524 ITEM(0, 0x12), 0,
525 CODES_END,
526};
528 FLAG(0, 0), 1,
529 PARTY_STAT(1), 1,
530 PARTY_STAT(3), 1,
532 ITEM(0, 0x12), 1,
533 PARTY_STAT(5), 0,
534 CODES_END,
535};
537 FLAG(0, 0), 1,
538 PARTY_STAT(1), 1,
539 PARTY_STAT(3), 1,
541 ITEM(0, 0x12), 1,
542 PARTY_STAT(5), 1,
543 CODES_END,
544};
547 { NULL, actor1Talk0Actions, 0x26C },
548 { NULL, NULL, 0 },
549};
556 { NULL, NULL, 0x2E1 },
557 { NULL, NULL, 0 },
558};
596 { NULL, NULL, 0x275 },
597 { NULL, NULL, 0 },
598};
610#if VERSION_US
612#elif VERSION_EU || VERSION_JP
614#endif
615};
661 &actor0,
662 &actor1,
663 &actor2,
664 &actor3,
665 &actor4,
666 &actor5,
667 &actor6,
668 &actor7,
669 &actor8,
670 &actor9,
671 NULL,
672};
674 { 1, 0, 0x40, 2, 0xC, 1, 0xC, 0x11, 8, 0, 1559, 780, 0, 0 },
675 { 1, 0, 0x78, 2, 0x12, 0, 0, 0, 0, 0, 1216, 594, 0, 0 },
676 { 1, 0, 0x78, 2, 0x14, 0, 0, 0, 0, 0, 1172, 388, 0, 0 },
677 { 1, 0, 0x78, 2, 0x16, 0, 0, 0, 0, 0, 998, 303, 0, 0 },
678 { 1, 0, 0x78, 2, 0x17, 0, 0, 0, 0, 0, 953, 355, 0, 0 },
679 { 1, 0, 0x40, 2, 0xC, 1, 0xC, 0x11, 8, 0, 86, 107, 0, 0 },
680 { 1, 0, 0x40, 2, 0xC, 1, 0xC, 0x11, 8, 0, 621, 642, 0, 0 },
681 { 1, 0, 0x40, 2, 0xC, 1, 0xC, 0x11, 8, 0, 1201, 300, 0, 0 },
682 { 1, 0, 0x40, 4, 0, 0, 0, 0, 0, 0, 1115, 218, 262, 0 },
683 { 1, 0, 0x48, 4, 1, 0, 0, 0, 0, 0, 828, 359, 400, 0 },
684 { 1, 0, 0x60, 4, 2, 0, 0, 0, 0, 0, 476, 268, 321, 0 },
685 { 1, 0, 0x40, 4, 3, 0, 0, 0, 0, 0, 1216, 649, 682, 0 },
686 { 1, 0, 0x40, 4, 4, 0, 0, 0, 0, 0, 1169, 434, 465, 0 },
687 { 1, 0, 0x40, 4, 5, 0, 0, 0, 0, 0, 545, 557, 583, 0 },
688 { 1, 0, 0x44, 4, 6, 0, 0, 0, 0, 0, 925, 722, 766, 0 },
689 { 1, 0, 0x73, 4, 7, 0, 0, 0, 0, 0, 634, 661, 767, 0 },
690 { 1, 0, 0x78, 4, 0x13, 0, 0, 0, 0, 0, 1264, 489, 562, 0 },
691 { 1, 0, 0x78, 4, 0x15, 0, 0, 0, 0, 0, 905, 338, 355, 0 },
692 { 1, 0, 0x78, 4, 0x18, 0, 0, 0, 0, 0, 914, 450, 464, 0 },
693 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 288, 133, 133, 0 },
694 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 384, 135, 135, 0 },
695 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 425, 155, 155, 0 },
696 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 432, 311, 311, 0 },
697 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 472, 179, 179, 0 },
698 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 521, 203, 203, 0 },
699 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 528, 263, 263, 0 },
700 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 528, 391, 391, 0 },
701 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 574, 368, 368, 0 },
702 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 607, 214, 214, 0 },
703 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 617, 347, 347, 0 },
704 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 648, 235, 235, 0 },
705 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 695, 259, 259, 0 },
706 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 744, 283, 283, 0 },
707 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 792, 307, 307, 0 },
708 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 840, 331, 331, 0 },
709 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 928, 799, 799, 0 },
710 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 1008, 791, 791, 0 },
711 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 1376, 751, 751, 0 },
712 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 1424, 775, 775, 0 },
713 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 1472, 799, 799, 0 },
714 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
715};
717 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x227, 0x4A2, 0x36A, 3, 0, 0, 0 },
718 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x22A, 0xAA, 0xC3, 7, 0, 0, 0 },
719 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x22E, 0x150, 0x268, 5, 0, 0, 0 },
720 { { { SPECIAL_STORY_SINCE_DE_KNOWLEDGE, 1 }, { CODES_END, 0 } }, SLOT_WARP1, 0x2E9, 0xB0, 0xF8, 7, 0, 1, 1 },
721 { { { SPECIAL_STORY_SINCE_DE_KNOWLEDGE, 1 }, { CODES_END, 0 } }, SLOT_WARP1, 0x2E9, 0xB0, 0xF8, 7, 0, 5, 4 },
722 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_DROP, 5, 0, 0, 0, 0, 0, 0 },
723 { { { CODES_END, 0 }, { CODES_END, 0 } }, 0, 0, 0, 0, 0, 0, 0, 0 },
724};
725void (*stageFuncs[])(void) = {
727};
729 { 80, script80, EVENT_TEXT(0), NULL, endEvent80 },
730 { 1299, script1299, EVENT_TEXT(0x24), NULL, NULL },
731 { 1305, script1305, EVENT_TEXT(0x25), NULL, endEvent1305 },
732 { -1, NULL, 0, NULL, NULL },
733};
#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_LOOK_AT(snap, x, y)
FIELDSTG_pointCamera.
Definition field_map.h:172
#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 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 FIELD_COMMAND_PLAY_INFO_SIG
Definition field_map.h:49
#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 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 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_WIND_PRAIRIE
ENV_0006: the Wind Prairie.
Definition sound.h:122
#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_VEEMON_TREE_BOOTS_SEEN
wstag395 Wind Prairie event 1305: Veemon gives the player the Tree Boots; set at its end,...
Definition story.h:1100
@ STORY_PRESIDENT_ARRESTED
WSTAG226 (Login Room, Amaterasu City), event 935, after the President of MAGAMI gives himself up (WST...
Definition story.h:136
@ STORY_SEIRYU_BADGE
WSTAG420, event 71: the Seiryu Leader is beaten (the Silver ID and the Seiryu Badge),...
Definition story.h:39
#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_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_AKIBA_FOUGHT
wstag395 (Wind Prairie): Tamer Akiba says "All I need is to Digimon Battle now!" and starts a Digimon...
Definition story.h:835
#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_NICK_FIRST_MEETING_SEEN
wstag395 event 80: the player meets Nick ("I'm only 21!") in Wind Prairie; set at its end,...
Definition story.h:1333
#define FLAG_WIND_PRAIRIE_KULON_ARMOR_FOUND
wstag395: chest that gives the Kulon Armor, "I got" text; its conditions test it 0
Definition story.h:293
#define FLAG_DEBBIE_VEEMON_TALKED
wstag255 Lamb Chop: Waitress Debbie saw Veemon looking for something at Wind Prairie; makes Veemon ap...
Definition story.h:1094
#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_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
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 wstag395.c:616
AreaBattle area2Battle7
Definition wstag395.c:332
u16 actor6Talk0Actions[]
Definition wstag395.c:463
FieldActorEntry actor0
Definition wstag395.c:650
void(* stageFuncs[])(void)
The stage's functions (common/start_stage.inc.c calls the first): a StageFuncs in the stages with a t...
Definition wstag395.c:725
FieldActorEntry actor6
Definition wstag395.c:656
u16 actor7Talk1Conditions[]
Definition wstag395.c:503
u16 actor5Talk3Conditions[]
Definition wstag395.c:427
FieldTalk actor2Talks[]
Definition wstag395.c:550
AreaBattle area2Battle6
Definition wstag395.c:331
u16 actor5Talk2Actions[]
Definition wstag395.c:426
u16 actor5Talk6Actions[]
Definition wstag395.c:461
u16 actor2Talk1Conditions[]
Definition wstag395.c:380
u16 actor4Talk3Conditions[]
Definition wstag395.c:387
u16 actor4Talk6Actions[]
Definition wstag395.c:421
u16 actor4Talk6Conditions[]
Definition wstag395.c:412
u16 actor4Talk2Actions[]
Definition wstag395.c:386
u16 actor7Talk2Conditions[]
Definition wstag395.c:505
u16 actor5Talk0Conditions[]
Definition wstag395.c:422
u16 actor5Talk5Conditions[]
Definition wstag395.c:443
FieldTalk actor5Talks[]
Definition wstag395.c:569
AreaBattle area1Battle6
Definition wstag395.c:318
u16 actor6Talk5Conditions[]
Definition wstag395.c:483
FieldActorEntry actor5
Definition wstag395.c:655
u16 actor4Talk4Conditions[]
Definition wstag395.c:395
AreaBattle area0Battle7
Definition wstag395.c:306
FieldActorEntry actor2
Definition wstag395.c:652
u16 actor9Talk0Conditions[]
Definition wstag395.c:507
u16 actor6Talk1Conditions[]
Definition wstag395.c:464
u16 actor9Talk2Actions[]
Definition wstag395.c:510
AreaBattle area3Battle4
Definition wstag395.c:342
AreaBattle area3Battle3
Definition wstag395.c:341
AreaBattle area0Battle1
Definition wstag395.c:300
void endEvent80(void)
After event 80, with Teddy: keeps it from playing again.
Definition wstag395.c:36
AreaBattle area2Battle0
Definition wstag395.c:325
void endEvent1305(void)
After event 1305, with Veemon: gives the player the Tree Boots, clears flag 0x1C08 (which decides whe...
Definition wstag395.c:45
u16 actor9Conditions[]
Definition wstag395.c:649
u16 actor7Talk0Conditions[]
Definition wstag395.c:502
u16 actor5Talk3Actions[]
Definition wstag395.c:434
FieldActorEntry * stageActors[]
Definition wstag395.c:660
AreaBattle area1Battle2
Definition wstag395.c:314
u16 actor9Talk5Conditions[]
Definition wstag395.c:527
AreaBattle area3Battle0
Definition wstag395.c:338
u16 actor4Talk1Conditions[]
Definition wstag395.c:384
u16 actor6Talk2Conditions[]
Definition wstag395.c:465
u16 actor7Talk1Actions[]
Definition wstag395.c:504
AreaBattle area0Battle6
Definition wstag395.c:305
FieldTalk actor1Talks[]
Definition wstag395.c:546
u16 actor4Talk5Conditions[]
Definition wstag395.c:403
AreaBattle area3Battle2
Definition wstag395.c:340
s16 script80[]
Definition wstag395.c:84
u16 actor2Talk1Actions[]
Definition wstag395.c:381
u16 actor6Talk2Actions[]
Definition wstag395.c:466
AreaBattle area3Battle1
Definition wstag395.c:339
#define STAGE_ARCHIVE
Definition wstag395.c:60
AreaBattle area0Battle3
Definition wstag395.c:302
u16 actor2Talk0Actions[]
Definition wstag395.c:374
u16 actor9Talk6Conditions[]
Definition wstag395.c:536
FieldTalk actor4Talks[]
Definition wstag395.c:559
u16 actor4Conditions[]
Definition wstag395.c:619
FieldActorEntry actor4
Definition wstag395.c:654
u16 actor3Conditions[]
Definition wstag395.c:618
AreaBattle area3Battle6
Definition wstag395.c:344
u16 actor5Talk6Conditions[]
Definition wstag395.c:452
FieldActorEntry actor8
Definition wstag395.c:658
u16 actor6Talk3Actions[]
Definition wstag395.c:474
ActorImage stageImages[]
Definition wstag395.c:354
FieldTalk actor6Talks[]
Definition wstag395.c:579
void setupStage(void)
Sets the stage up: its map, actors, battles and events, playing the ambience ENV_0006.
Definition wstag395.c:63
u16 actor6Talk6Conditions[]
Definition wstag395.c:492
AreaBattle area2Battle4
Definition wstag395.c:329
u16 actor4Talk0Conditions[]
Definition wstag395.c:382
StageTile stageObjects[]
The tables and color setupStage gives FIELDSTG_state (FieldState)
Definition wstag395.c:673
FieldActorEntry actor9
Definition wstag395.c:659
u16 actor8Conditions[]
Definition wstag395.c:643
u16 actor9Talk1Conditions[]
Definition wstag395.c:508
u16 actor5Conditions[]
Definition wstag395.c:625
FieldTalk actor3Talks[]
Definition wstag395.c:555
FieldTalk actor9Talks[]
Definition wstag395.c:599
BattleList area3Battles
Definition wstag395.c:346
u16 actor6Talk3Conditions[]
Definition wstag395.c:467
AreaBattle area3Battle5
Definition wstag395.c:343
AreaBattle area0Battle5
Definition wstag395.c:304
BattleList area1Battles
Definition wstag395.c:320
s16 script1299[]
Definition wstag395.c:198
u16 actor9Talk6Actions[]
Definition wstag395.c:545
u16 actor5Talk0Actions[]
Definition wstag395.c:423
BattleList area2Battles
Definition wstag395.c:333
u16 actor2Talk0Conditions[]
Definition wstag395.c:373
AreaBattle area1Battle4
Definition wstag395.c:316
u16 actor6Talk0Conditions[]
Definition wstag395.c:462
u16 actor6Conditions[]
Definition wstag395.c:631
AreaBattle area2Battle2
Definition wstag395.c:327
AreaBattle area1Battle5
Definition wstag395.c:317
u16 actor9Talk3Actions[]
Definition wstag395.c:518
FieldActorEntry actor7
Definition wstag395.c:657
StageSlot stageSlots[]
Definition wstag395.c:716
AreaBattle area2Battle1
Definition wstag395.c:326
u16 actor1Talk0Actions[]
Definition wstag395.c:367
u16 actor5Talk1Conditions[]
Definition wstag395.c:424
AreaBattle area1Battle3
Definition wstag395.c:315
AreaBattle area1Battle0
Definition wstag395.c:312
u16 actor5Talk2Conditions[]
Definition wstag395.c:425
FieldActorEntry actor1
Definition wstag395.c:651
AreaBattle area0Battle0
Definition wstag395.c:299
AreaBattle area0Battle2
Definition wstag395.c:301
#define STAGE_FILE
Definition wstag395.c:59
AreaBattle area2Battle5
Definition wstag395.c:330
u16 actor6Talk6Actions[]
Definition wstag395.c:501
u16 actor4Talk0Actions[]
Definition wstag395.c:383
AreaBattle area1Battle1
Definition wstag395.c:313
u16 actor9Talk4Conditions[]
Definition wstag395.c:519
u16 actor7Conditions[]
Definition wstag395.c:637
AreaBattle area2Battle3
Definition wstag395.c:328
u16 actor2Conditions[]
Definition wstag395.c:617
FieldTalk actor7Talks[]
Definition wstag395.c:589
s16 script1305[]
Definition wstag395.c:272
u16 actor9Talk2Conditions[]
Definition wstag395.c:509
u16 actor4Talk3Actions[]
Definition wstag395.c:394
AreaBattle area0Battle4
Definition wstag395.c:303
u16 actor9Talk3Conditions[]
Definition wstag395.c:511
#define STAGE_TEXT
Definition wstag395.c:57
FieldTalk actor8Talks[]
Definition wstag395.c:595
AreaBattle area3Battle7
Definition wstag395.c:345
BattleList area0Battles
Definition wstag395.c:307
AreaBattle area1Battle7
Definition wstag395.c:319
u16 actor4Talk2Conditions[]
Definition wstag395.c:385
u16 actor5Talk4Conditions[]
Definition wstag395.c:435
FieldActorEntry actor3
Definition wstag395.c:653
FieldBattles stageBattles[]
Definition wstag395.c:351
u16 actor6Talk4Conditions[]
Definition wstag395.c:475
FieldEvent stageEvents[]
Definition wstag395.c:728
u16 actor0Conditions[]
Definition wstag395.c:609
u16 actor7Talk2Actions[]
Definition wstag395.c:506