Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
wstag675.c
Go to the documentation of this file.
1/*
2 * WSTAG675: Byakko Dome, Byakko City.
3 */
4
5#include "common.h"
6#include "field/stage.h"
7
8/* Creates the event object of story progress 0xF */
9void updateStage(StageTask *task, void **children) {
10 switch (task->state) {
11 case TASK_INIT:
12 default:
14 children[0] = FIELDSTG_startEvent(0x19B);
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 390: keeps it from playing again */
32
33/* After event 400: keeps it from playing again */
34void endEvent400(void) {
35 FLAGS_00.applyAction(FLAG(0x40, 0x1A), 1);
36}
37
38/*
39 * After event 410, with Byakko Leader: lets event 415 of WSTAG660 start,
40 * starts the stage's event battle 0 and keeps it from playing again
41 */
47
48#if VERSION_US || VERSION_JP
49#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_01)
50#define EVENT_TEXT_FILE (TEXT_EVENTS_600 - 1)
51#define STAGE_FILE 0x4A0
52#elif VERSION_EU
53#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_01)
54#define EVENT_TEXT_FILE (TEXT_EVENTS_600 - 1)
55#define STAGE_FILE 0x4B0
56#endif
57/*
58 * Sets the stage up: its map, actors, battles and events, playing the
59 * ambience ENV_0021; BGM_0029 instead at story steps 0x27 to 0x28 and 0xF to
60 * 0x17
61 */
89
91 SCRIPT_WALK(2, 0x1E9, 0x16D, 5),
92 SCRIPT_PLACE(0x133, 0x1F9, 0x165),
93 SCRIPT_POSE(0x133, 1, 1),
96 SCRIPT_POSE(2, 1, 5),
97 SCRIPT_WAIT(0x1E),
98 SCRIPT_TALK(0, 1, 0x133, 2),
100 SCRIPT_WAIT(0x1E),
101 SCRIPT_WALK(0x133, 0x219, 0x175, 7),
102 SCRIPT_WAIT_WALK(0x133),
103 SCRIPT_POSE(0x133, 1, 3),
104 SCRIPT_WAIT(0x1E),
106 /* after the end, the original's padding up to a word, which isn't zeros */
107#if VERSION_US
108 0xA622,
109#elif VERSION_EU
110 0x1F9,
111#elif VERSION_JP
112 0x301,
113#endif
114};
116 SCRIPT_FOLLOW(0, 2),
117 SCRIPT_WALK(2, 0x27F, 0x141, 7),
118 SCRIPT_PLACE(0x4A, 0x29F, 0x151),
119 SCRIPT_POSE(0x4A, 1, 3),
122 SCRIPT_POSE(2, 1, 7),
123 SCRIPT_WAIT(0x1E),
124 SCRIPT_TALK(0, 1, 0x4A, 1),
126 SCRIPT_WAIT(0x1E),
127 SCRIPT_WALK(0x4A, 0x2BF, 0x161, 7),
128 SCRIPT_WAIT_WALK(0x4A),
129 SCRIPT_POSE(0x4A, 1, 3),
130 SCRIPT_WAIT(0x1E),
132};
134 SCRIPT_FOLLOW(1, 2),
135 SCRIPT_WALK(2, 0x181, 0xBA, 3),
136 SCRIPT_PLACE(0x98, 0x161, 0xAA),
137 SCRIPT_POSE(0x98, 1, 7),
140 SCRIPT_POSE(2, 1, 3),
141 SCRIPT_WAIT(6),
142 SCRIPT_WAIT(0x1E),
143 SCRIPT_TALK(0, 1, 0x98, 2),
145 SCRIPT_WAIT(0x1E),
146 SCRIPT_TALK(0, 2, 2, 3),
147 SCRIPT_POSE(2, 7, 3),
149 SCRIPT_POSE(2, 1, 3),
150 SCRIPT_WAIT(0x1E),
151 SCRIPT_TALK(0, 3, 0x98, 2),
153 SCRIPT_WAIT(0x1E),
154 SCRIPT_TALK(0, 4, 2, 3),
155 SCRIPT_POSE(2, 7, 3),
157 SCRIPT_POSE(2, 1, 3),
158 SCRIPT_WAIT(0x1E),
160};
162 SCRIPT_FOLLOW(1, 2),
163 SCRIPT_PLACE(2, 0x181, 0xBA),
164 SCRIPT_POSE(2, 1, 3),
165 SCRIPT_PLACE(0x98, 0x161, 0xAA),
166 SCRIPT_POSE(0x98, 1, 7),
167 SCRIPT_WAIT(0x78),
168 SCRIPT_TALK(0, 1, 0x98, 2),
170 SCRIPT_WAIT(0x1E),
171 SCRIPT_TALK(0, 2, 2, 3),
172 SCRIPT_POSE(2, 7, 3),
174 SCRIPT_POSE(2, 1, 3),
175 SCRIPT_WAIT(0x1E),
176 SCRIPT_TALK(0, 3, 0x98, 2),
178 SCRIPT_WAIT(0x1E),
179 SCRIPT_TALK(0, 4, 2, 3),
180 SCRIPT_POSE(2, 7, 3),
182 SCRIPT_WAIT(0x1E),
183 SCRIPT_WALK(0x98, 0x181, 0x9A, 1),
184 SCRIPT_WAIT_WALK(0x98),
185 SCRIPT_POSE(0x98, 1, 1),
186 SCRIPT_WAIT(0x1E),
187 SCRIPT_WALK(2, 0x141, 0x9A, 3),
189 SCRIPT_FOLLOW(1, 2),
190 SCRIPT_WALK(2, 0x101, 0x7A, 3),
191 SCRIPT_LEAVE(0x25F, 0x64, 0x64, 0),
193};
194AreaBattle area0Battle0 = { 0, 0, MUSIC(1, 0) };
195AreaBattle area0Battle1 = { 0, 0, MUSIC(1, 0) };
196AreaBattle area0Battle2 = { 0, 0, MUSIC(1, 0) };
197AreaBattle area0Battle3 = { 0, 0, MUSIC(1, 0) };
198AreaBattle area0Battle4 = { 0, 0, MUSIC(1, 0) };
199AreaBattle area0Battle5 = { 0, 0, MUSIC(1, 0) };
200AreaBattle area0Battle6 = { 0, 0, MUSIC(1, 0) };
201AreaBattle area0Battle7 = { 0, 0, MUSIC(1, 0) };
207AreaBattle area1Battle0 = { 0, 0, MUSIC(1, 0) };
208AreaBattle area1Battle1 = { 0, 0, MUSIC(1, 0) };
209AreaBattle area1Battle2 = { 0, 0, MUSIC(1, 0) };
210AreaBattle area1Battle3 = { 0, 0, MUSIC(1, 0) };
211AreaBattle area1Battle4 = { 0, 0, MUSIC(1, 0) };
212AreaBattle area1Battle5 = { 0, 0, MUSIC(1, 0) };
213AreaBattle area1Battle6 = { 0, 0, MUSIC(1, 0) };
214AreaBattle area1Battle7 = { 0, 0, MUSIC(1, 0) };
220AreaBattle area2Battle0 = { 0, 0, MUSIC(1, 0) };
221AreaBattle area2Battle1 = { 0, 0, MUSIC(1, 0) };
222AreaBattle area2Battle2 = { 0, 0, MUSIC(1, 0) };
223AreaBattle area2Battle3 = { 0, 0, MUSIC(1, 0) };
224AreaBattle area2Battle4 = { 0, 0, MUSIC(1, 0) };
225AreaBattle area2Battle5 = { 0, 0, MUSIC(1, 0) };
226AreaBattle area2Battle6 = { 0, 0, MUSIC(1, 0) };
227AreaBattle area2Battle7 = { 0, 0, MUSIC(1, 0) };
235AreaBattle area3Battle2 = { 0, 0, MUSIC(1, 0) };
236AreaBattle area3Battle3 = { 0, 0, MUSIC(1, 0) };
237AreaBattle area3Battle4 = { 0, 0, MUSIC(1, 0) };
238AreaBattle area3Battle5 = { 0, 0, MUSIC(1, 0) };
239AreaBattle area3Battle6 = { 0, 0, MUSIC(1, 0) };
240AreaBattle area3Battle7 = { 0, 0, MUSIC(1, 0) };
250 { 0x200, 0x100, 0x21C, 0x1A6, 0x70, 0xA6, 0x230, 0x1FE },
251 { 0x200, 0x100, 0x200, 0x100, 0, 0, 0x220, 0x1FE },
252 { 0x200, 0x100, 0x216, 0x138, 0x58, 0x38, 0x200, 0x1FD },
253 { 0x200, 0x100, 0x208, 0x1BC, 0x20, 0xBC, 0x210, 0x1FD },
254 { 0x200, 0x100, 0x210, 0x1BC, 0x40, 0xBC, 0x220, 0x1FD },
255 { 0x200, 0x100, 0x200, 0x1BC, 0, 0xBC, 0x230, 0x1FD },
256 { 0x180, 0x100, 0x19C, 0x128, 0x170, 0x28, 0x160, 0x1FE },
257 { 0x180, 0x100, 0x18A, 0x128, 0x128, 0x28, 0x170, 0x1FE },
258 { 0x180, 0x100, 0x1A4, 0x128, 0x190, 0x28, 0x140, 0x1FD },
259 { 0x180, 0x100, 0x1AC, 0x128, 0x1B0, 0x28, 0x150, 0x1FD },
260 { 0x180, 0x100, 0x1B4, 0x128, 0x1D0, 0x28, 0x160, 0x1FD },
261 { 0x180, 0x100, 0x192, 0x148, 0x148, 0x48, 0x170, 0x1FD },
262 { 0x180, 0x100, 0x180, 0x150, 0x100, 0x50, 0x140, 0x1FC },
263 { 0x180, 0x100, 0x19A, 0x150, 0x168, 0x50, 0x150, 0x1FC },
264 { 0x180, 0x100, 0x1AA, 0x150, 0x1A8, 0x50, 0x170, 0x1FC },
265 { 0x180, 0x100, 0x1B2, 0x150, 0x1C8, 0x50, 0x140, 0x1FB },
266 { 0x180, 0x100, 0x188, 0x158, 0x120, 0x58, 0x150, 0x1FB },
267 { 0x180, 0x100, 0x190, 0x170, 0x140, 0x70, 0x160, 0x1FB },
268 { 0x140, 0x100, 0x158, 0x186, 0x60, 0x86, 0x170, 0x1FB },
269 { 0x180, 0x100, 0x1A0, 0x178, 0x180, 0x78, 0x140, 0x1FA },
270 { 0x180, 0x100, 0x1A8, 0x178, 0x1A0, 0x78, 0x150, 0x1FA },
271 { 0x180, 0x100, 0x188, 0x180, 0x120, 0x80, 0x160, 0x1FA },
272 { 0x180, 0x100, 0x1B0, 0x180, 0x1C0, 0x80, 0x170, 0x1FA },
273 { 0x140, 0x100, 0x16E, 0x1A0, 0xB8, 0xA0, 0x140, 0x1F9 },
274 { 0x180, 0x100, 0x180, 0x178, 0x100, 0x78, 0x150, 0x1F9 },
275 { 0x180, 0x100, 0x198, 0x178, 0x160, 0x78, 0x160, 0x1F9 },
276};
322 { NULL, NULL, 0xBB },
323 { NULL, NULL, 0 },
324};
326 { NULL, NULL, 0xCF },
327 { NULL, NULL, 0 },
328};
330 { NULL, NULL, 0xC5 },
331 { NULL, NULL, 0 },
332};
334 { NULL, NULL, 0xC0 },
335 { NULL, NULL, 0 },
336};
338 { NULL, NULL, 0xBC },
339 { NULL, NULL, 0 },
340};
342 { NULL, NULL, 0xC1 },
343 { NULL, NULL, 0 },
344};
346 { NULL, NULL, 0xC6 },
347 { NULL, NULL, 0 },
348};
350 { NULL, NULL, 0xD0 },
351 { NULL, NULL, 0 },
352};
354 { NULL, NULL, 0xBD },
355 { NULL, NULL, 0 },
356};
358 { NULL, NULL, 0xD1 },
359 { NULL, NULL, 0 },
360};
362 { NULL, NULL, 0xC7 },
363 { NULL, NULL, 0 },
364};
366 { NULL, NULL, 0xC2 },
367 { NULL, NULL, 0 },
368};
370 { NULL, NULL, 0xBE },
371 { NULL, NULL, 0 },
372};
374 { NULL, NULL, 0xD2 },
375 { NULL, NULL, 0 },
376};
378 { NULL, NULL, 0xC3 },
379 { NULL, NULL, 0 },
380};
382 { NULL, NULL, 0xC8 },
383 { NULL, NULL, 0 },
384};
386 { NULL, NULL, 0x157 },
387 { NULL, NULL, 0 },
388};
390 { NULL, NULL, 0x158 },
391 { NULL, NULL, 0 },
392};
394 { NULL, NULL, 0xB7 },
395 { NULL, NULL, 0 },
396};
398 { NULL, NULL, 0x15A },
399 { NULL, NULL, 0 },
400};
402 { NULL, NULL, 0x156 },
403 { NULL, NULL, 0 },
404};
406 { NULL, NULL, 0x156 },
407 { NULL, NULL, 0 },
408};
410 { NULL, NULL, 0x16E },
411 { NULL, NULL, 0 },
412};
414 { NULL, NULL, 0x16E },
415 { NULL, NULL, 0 },
416};
418 { NULL, NULL, 0x16E },
419 { NULL, NULL, 0 },
420};
422 { NULL, NULL, 0x16E },
423 { NULL, NULL, 0 },
424};
426 { NULL, NULL, 0x16E },
427 { NULL, NULL, 0 },
428};
430 { NULL, NULL, 0x16E },
431 { NULL, NULL, 0 },
432};
434 { NULL, NULL, 0x16E },
435 { NULL, NULL, 0 },
436};
438 { NULL, NULL, 0xBA },
439 { NULL, NULL, 0 },
440};
442 { NULL, NULL, 0xCE },
443 { NULL, NULL, 0 },
444};
446 { NULL, NULL, 0xC4 },
447 { NULL, NULL, 0 },
448};
458 { NULL, NULL, 0xC9 },
459 { NULL, NULL, 0 },
460};
462 { NULL, NULL, 0xCB },
463 { NULL, NULL, 0 },
464};
466 { NULL, NULL, 0xCC },
467 { NULL, NULL, 0 },
468};
470 { NULL, NULL, 0xCD },
471 { NULL, NULL, 0 },
472};
474 { NULL, NULL, 0xCA },
475 { NULL, NULL, 0 },
476};
487 { NULL, NULL, 0x174 },
488 { NULL, NULL, 0 },
489};
491 { NULL, NULL, 0x15B },
492 { NULL, NULL, 0 },
493};
495 { NULL, NULL, 0x159 },
496 { NULL, NULL, 0 },
497};
499 { NULL, NULL, 0x159 },
500 { NULL, NULL, 0 },
501};
595FieldActorEntry actor33 = { actor33Conditions, NULL, 0x98, 0xF, 353, 170, 7 };
603FieldActorEntry actor41 = { actor41Conditions, actor41Talks, 0x132, 0x16, 544, 504, 1 };
604FieldActorEntry actor42 = { actor42Conditions, actor42Talks, 0x133, 0x17, 505, 357, 1 };
605FieldActorEntry actor43 = { actor43Conditions, actor43Talks, 0x133, 0x17, 537, 373, 3 };
607 &actor0,
608 &actor1,
609 &actor2,
610 &actor3,
611 &actor4,
612 &actor5,
613 &actor6,
614 &actor7,
615 &actor8,
616 &actor9,
617 &actor10,
618 &actor11,
619 &actor12,
620 &actor13,
621 &actor14,
622 &actor15,
623 &actor16,
624 &actor17,
625 &actor18,
626 &actor19,
627 &actor20,
628 &actor21,
629 &actor22,
630 &actor23,
631 &actor24,
632 &actor25,
633 &actor26,
634 &actor27,
635 &actor28,
636 &actor29,
637 &actor30,
638 &actor31,
639 &actor32,
640 &actor33,
641 &actor34,
642 &actor35,
643 &actor36,
644 &actor37,
645 &actor38,
646 &actor39,
647 &actor40,
648 &actor41,
649 &actor42,
650 &actor43,
651 NULL,
652};
654 { 1, 0, 0x50, 2, 0x2F, 0, 0, 0, 0, 0, 718, 505, 0, 0 },
655 { 1, 0, 0x50, 2, 0x2F, 0, 0, 0, 0, 0, 815, 456, 0, 0 },
656 { 1, 0, 0x40, 2, 0x30, 2, 0, 1, 0xA, 0, 625, 376, 0, 0 },
657 { 1, 0, 0x40, 2, 0x32, 1, 0x32, 0x35, 0xA, 0, 719, 451, 0, 0 },
658 { 1, 0, 0x40, 2, 0x32, 1, 0x32, 0x35, 0xA, 0, 815, 343, 0, 0 },
659 { 1, 0, 0x40, 2, 0x3E, 1, 0x3E, 0x47, 6, 0, 637, 147, 0, 0 },
660 { 1, 0, 0x40, 2, 0x48, 1, 0x48, 0x51, 6, 0, 769, 352, 0, 0 },
661 { 1, 0, 0x50, 6, 0x2E, 0, 0, 0, 0, 0, 182, 516, 0, 0 },
662 { 1, 0, 0x40, 6, 0x30, 2, 0, 1, 0xA, 0, 157, 372, 0, 0 },
663 { 1, 0, 0x40, 6, 0x30, 2, 0, 1, 0xA, 0, 213, 344, 0, 0 },
664 { 1, 0, 0x40, 6, 0x30, 2, 0, 1, 0xA, 0, 221, 194, 0, 0 },
665 { 1, 0, 0x40, 6, 0x30, 2, 0, 1, 0xA, 0, 549, 105, 0, 0 },
666 { 1, 0, 0x40, 6, 0x30, 2, 0, 1, 0xA, 0, 742, 201, 0, 0 },
667 { 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x35, 0xA, 0, 182, 460, 0, 0 },
668 { 1, 0, 0x40, 6, 0x36, 1, 0x36, 0x39, 8, 0, 91, 349, 0, 0 },
669 { 1, 0, 0x40, 6, 0x3A, 1, 0x3A, 0x3D, 8, 0, 447, 275, 0, 0 },
670 { 1, 0, 0x40, 6, 0x52, 1, 0x52, 0x5B, 6, 0, 487, 434, 0, 0 },
671 { 1, 0, 0x40, 6, 0x5C, 1, 0x5C, 0x5F, 0xA, 0, 661, 151, 0, 0 },
672 { 1, 0, 0x40, 6, 0x5C, 1, 0x5C, 0x5F, 0xA, 0, 780, 357, 0, 0 },
673 { 1, 0, 0x40, 6, 0x60, 1, 0x60, 0x63, 0xA, 0, 504, 449, 0, 0 },
674 { 1, 0, 0x40, 6, 3, 0, 0, 0, 0, 0, 285, 98, 0, 0 },
675 { 1, 0, 0x58, 4, 0, 0, 0, 0, 0, 0, 249, 99, 171, 0 },
676 { 1, 0, 0x40, 4, 1, 0, 0, 0, 0, 0, 287, 425, 455, 0 },
677 { 1, 0, 0x40, 4, 2, 0, 0, 0, 0, 0, 511, 525, 552, 0 },
678 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
679};
681 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_DROP, 5, 0, 0, 0, 0, 0, 0 },
682 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x25D, 0x46C, 0xAA, 1, 0, 0, 0 },
683 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x260, 0xA8, 0xA4, 5, 0, 0, 0 },
684 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_CLIMB_DOWN, 4, 0x2C0, 0x100, 0, 0, 0, 0 },
685 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_CLIMB_UP, 4, 0x2B0, 0x148, 0, 0, 0, 0 },
686 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_CLIMB_DOWN, 4, 0x210, 0x118, 0, 0, 0, 0 },
687 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_CLIMB_UP, 4, 0x200, 0x160, 0, 0, 0, 0 },
688 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_CLIMB_DOWN, 4, 0x1C0, 0x180, 0, 0, 0, 0 },
689 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_CLIMB_UP, 4, 0x1B0, 0x1C8, 0, 0, 0, 0 },
690 { { { PROGRESS(STORY_DE_SINCERITY), 1 }, { FLAG_BYAKKO_DOME_WELCOME_SEEN, 0 } }, SLOT_EVENT, 0x186, 0, 0, 0, 0, 0, 0 },
691 { { { PROGRESS(STORY_DE_SINCERITY), 1 }, { FLAG(0x40, 0x1A), 0 } }, SLOT_EVENT, 0x190, 0, 0, 0, 0, 0, 0 },
692 { { { PROGRESS(STORY_DE_SINCERITY), 1 }, { FLAG_BYAKKO_LEADER_WIN_SEEN, 0 } }, SLOT_EVENT, 0x19A, 0, 0, 0, 0, 0, 0 },
693 { { { CODES_END, 0 }, { CODES_END, 0 } }, 0, 0, 0, 0, 0, 0, 0, 0 },
694};
695void (*stageFuncs[])(void) = {
697};
699 { 390, script390, EVENT_TEXT(0xC), NULL, endEvent390 },
700 { 400, script400, EVENT_TEXT(0xD), NULL, endEvent400 },
701 { 410, script410, EVENT_TEXT(0), NULL, endEvent410 },
702 { 411, script411, EVENT_TEXT(1), NULL, NULL },
703 { -1, NULL, 0, NULL, NULL },
704};
#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 SLOT_CLIMB_UP
Definition field_map.h:256
#define SCRIPT_WAIT_WALK(id)
until the character gets to its goal
Definition field_map.h:168
#define FIELD_COMMAND_HALT_PARTNERS
The field commands, which an event script hands FIELD_TASK_COMMANDS as the first argument of a pose c...
Definition field_map.h:41
#define SCRIPT_END
The commands of an event script (FieldEvent.script), as FIELDSTG_runEvent reads them: a halfword kind...
Definition field_map.h:156
#define SCRIPT_LEAVE(mode, x, y, dir)
FIELDSTG_leaveField; ends the event.
Definition field_map.h:170
#define SCRIPT_COMMAND(id, command, arg)
the same word for a script command's id: FIELDSTG_setEventPose creates its task if none runs and hand...
Definition field_map.h:161
#define SCRIPT_FOLLOW(snap, id)
FIELDSTG_followWithCamera.
Definition field_map.h:171
#define FIELD_MAP_FLOOR0
Some of FieldMap's maps (files): those of the floors the player walks on come first,...
Definition field_map.h:85
#define SLOT_CLIMB_DOWN
Definition field_map.h:257
#define SLOT_EVENT
starts the event arg
Definition field_map.h:262
#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 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 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 MUSIC_CITY_CRISIS
BGM_0029: the cities and their streets instead of their music while the story is at a crisis (Knightm...
Definition sound.h:105
#define MUSIC(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_BOOT_MOUNTAIN
ENV_0021: Boot Mountain, and the Byakko Dome.
Definition sound.h:137
#define MUSIC_BANK(music)
The sound bank of a music, which a stage loads for it (FieldState.soundBank)
Definition sound.h:148
#define MUSIC_BOSS_1
BOSS_001: the Digimon Arena's, the cities', the dungeons' and the A.o.A's boss battles.
Definition sound.h:109
FIELDSTG's start of the stage (StageEntry.init in FIELDSTG_stages): the stage's task,...
#define SPECIAL_STORY_JUNGLE_SOUND_TO_AMATERASU_BRIDGE
GAME.progress is from STORY_JUNGLE_SOUND to STORY_AMATERASU_BRIDGE (PROGRESS_RANGES[0x12])
Definition story.h:1917
#define SPECIAL_STORY_JUNGLE_SOUND_TO_NETWORK_OFFLINE
GAME.progress is from STORY_JUNGLE_SOUND to STORY_NETWORK_OFFLINE (PROGRESS_RANGES[0x19])
Definition story.h:1938
@ STORY_PRESIDENT_ARRESTED
WSTAG226 (Login Room, Amaterasu City), event 935, after the President of MAGAMI gives himself up (WST...
Definition story.h:136
@ STORY_BLUE_ID_PASS
WSTAG421 (Qing Long City), event 743: with the Blue ID Pass a Trooper takes the player for the Qing L...
Definition story.h:109
@ STORY_GUNSLINGER
WSTAG810 (Gunslinger 1F), event 1035.
Definition story.h:143
@ STORY_BULBMON_BEATEN
WSTAG521 (Zhu Que Hall), event 751: Bulbmon is beaten (the Red ID Pass); its hole leads on to the Ama...
Definition story.h:112
@ STORY_KNIGHTMON_REPROGRAMMED
WSTAG210 (Main Lobby, Asuka City), event 685: the A.o.A have reprogrammed Knightmon,...
Definition story.h:97
@ STORY_JUNGLE_SOUND
WSTAG545 (Bug Maze Pit), event 711: Patamon heard a weird sound from the jungle, where its leader wen...
Definition story.h:106
@ STORY_DE_KNOWLEDGE
WSTAG526 (Zhu Que UG Lake), event 760: the fight with Zanbamon (the DE Knowledge)
Definition story.h:115
@ STORY_MOVIE_BATTLES
WSTAG820, event 1080, with Snatchmon: each encounter plays MODE_BATTLE_MOVIE first.
Definition story.h:146
@ STORY_GENBU_BADGE
WSTAG755 (Battle Gate), event 781: the Xuen Wu Chief, who holds the Black ID Pass,...
Definition story.h:118
@ STORY_ASUKA_HEADQUARTERS
WSTAG310 (A.o.A Headquarters, Asuka City), event 961.
Definition story.h:138
@ STORY_REAL_WORLD
WSTAG750 (the emergency Matrix Chamber), event 820: back in the real world, for 180 seconds.
Definition story.h:121
@ STORY_NETWORK_OFFLINE
WSTAG750, event 886: the news say the Optical Network is offline.
Definition story.h:123
@ STORY_DE_SINCERITY
WSTAG460 (Reliability Spot), event 370: the Qing Long Chief, asked for the Digi-Egg of Knowledge,...
Definition story.h:70
#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_KNIGHTMON_REPROGRAMMED
GAME.progress is STORY_KNIGHTMON_REPROGRAMMED or later (PROGRESS_RANGES[8], to 0x63)
Definition story.h:1887
#define FLAG_BYAKKO_LEADER_WIN_SEEN
wstag675 event 410: Byakko Leader loses and sends the player to the badge room; set at its end,...
Definition story.h:1351
#define FLAG_BYAKKO_DOME_WELCOME_SEEN
wstag675 event 390: Byakko citizens say they waited and send the player to their leader; set at its e...
Definition story.h:1342
#define SPECIAL_STORY_KNIGHTMON_REPROGRAMMED_TO_BULBMON_FOUND
GAME.progress is from STORY_KNIGHTMON_REPROGRAMMED to STORY_BULBMON_FOUND (PROGRESS_RANGES[0x11])
Definition story.h:1914
#define SPECIAL_STORY_WAY_TO_AMATERASU_TO_PRESIDENT_ARRESTED
GAME.progress is from STORY_WAY_TO_AMATERASU to STORY_PRESIDENT_ARRESTED (PROGRESS_RANGES[0x16])
Definition story.h:1929
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 wstag675.c:503
u16 actor26Conditions[]
Definition wstag675.c:528
AreaBattle area2Battle7
Definition wstag675.c:227
FieldActorEntry actor0
Definition wstag675.c:562
void(* stageFuncs[])(void)
The stage's functions (common/start_stage.inc.c calls the first): a StageFuncs in the stages with a t...
Definition wstag675.c:695
FieldActorEntry actor6
Definition wstag675.c:568
FieldTalk actor37Talks[]
Definition wstag675.c:469
u16 actor11Conditions[]
Definition wstag675.c:513
FieldTalk actor31Talks[]
Definition wstag675.c:445
u16 actor32Talk1Conditions[]
Definition wstag675.c:285
FieldTalk actor2Talks[]
Definition wstag675.c:329
AreaBattle area2Battle6
Definition wstag675.c:226
FieldTalk actor42Talks[]
Definition wstag675.c:494
void endEvent410(void)
After event 410, with Byakko Leader: lets event 415 of WSTAG660 start, starts the stage's event battl...
Definition wstag675.c:42
u16 actor39Talk0Actions[]
Definition wstag675.c:303
s16 script400[]
Definition wstag675.c:115
u16 actor10Conditions[]
Definition wstag675.c:512
FieldActorEntry actor25
Definition wstag675.c:587
FieldActorEntry actor24
Definition wstag675.c:586
u16 actor18Conditions[]
Definition wstag675.c:520
FieldActorEntry actor17
Definition wstag675.c:579
FieldActorEntry actor39
Definition wstag675.c:601
u16 actor34Conditions[]
Definition wstag675.c:536
FieldActorEntry actor33
Definition wstag675.c:595
FieldTalk actor38Talks[]
Definition wstag675.c:473
FieldTalk actor14Talks[]
Definition wstag675.c:377
u16 actor24Conditions[]
Definition wstag675.c:526
FieldActorEntry actor18
Definition wstag675.c:580
FieldTalk actor5Talks[]
Definition wstag675.c:341
AreaBattle area1Battle6
Definition wstag675.c:213
FieldActorEntry actor40
Definition wstag675.c:602
FieldTalk actor43Talks[]
Definition wstag675.c:498
u16 actor42Conditions[]
Definition wstag675.c:552
void endEvent390(void)
After event 390: keeps it from playing again.
Definition wstag675.c:29
FieldActorEntry actor5
Definition wstag675.c:567
FieldActorEntry actor37
Definition wstag675.c:599
u16 actor39Talk4Actions[]
Definition wstag675.c:318
FieldActorEntry actor36
Definition wstag675.c:598
u16 actor35Conditions[]
Definition wstag675.c:537
FieldTalk actor41Talks[]
Definition wstag675.c:490
u16 actor22Conditions[]
Definition wstag675.c:524
AreaBattle area0Battle7
Definition wstag675.c:201
FieldActorEntry actor2
Definition wstag675.c:564
FieldActorEntry actor31
Definition wstag675.c:593
AreaBattle area3Battle4
Definition wstag675.c:237
AreaBattle area3Battle3
Definition wstag675.c:236
AreaBattle area0Battle1
Definition wstag675.c:195
u16 actor38Conditions[]
Definition wstag675.c:540
FieldActorEntry actor23
Definition wstag675.c:585
FieldActorEntry actor19
Definition wstag675.c:581
AreaBattle area2Battle0
Definition wstag675.c:220
FieldTalk actor36Talks[]
Definition wstag675.c:465
u16 actor9Conditions[]
Definition wstag675.c:511
FieldActorEntry * stageActors[]
Definition wstag675.c:606
FieldActorEntry actor28
Definition wstag675.c:590
u16 actor39Talk2Conditions[]
Definition wstag675.c:306
AreaBattle area1Battle2
Definition wstag675.c:209
u16 actor23Conditions[]
Definition wstag675.c:525
u16 actor39Talk1Conditions[]
Definition wstag675.c:304
u16 actor32Conditions[]
Definition wstag675.c:534
AreaBattle area3Battle0
Definition wstag675.c:233
u16 actor29Conditions[]
Definition wstag675.c:531
u16 actor39Talk0Conditions[]
Definition wstag675.c:299
u16 actor30Conditions[]
Definition wstag675.c:532
FieldActorEntry actor22
Definition wstag675.c:584
u16 actor37Conditions[]
Definition wstag675.c:539
AreaBattle area0Battle6
Definition wstag675.c:200
FieldActorEntry actor41
Definition wstag675.c:603
u16 actor32Talk2Conditions[]
Definition wstag675.c:292
FieldTalk actor1Talks[]
Definition wstag675.c:325
u16 actor13Conditions[]
Definition wstag675.c:515
AreaBattle area3Battle2
Definition wstag675.c:235
FieldTalk actor35Talks[]
Definition wstag675.c:461
s16 script411[]
Definition wstag675.c:161
FieldActorEntry actor29
Definition wstag675.c:591
FieldTalk actor0Talks[]
Definition wstag675.c:321
AreaBattle area3Battle1
Definition wstag675.c:234
FieldTalk actor21Talks[]
Definition wstag675.c:405
AreaBattle area0Battle3
Definition wstag675.c:197
FieldActorEntry actor27
Definition wstag675.c:589
FieldTalk actor20Talks[]
Definition wstag675.c:401
FieldActorEntry actor10
Definition wstag675.c:572
u16 actor31Conditions[]
Definition wstag675.c:533
u16 actor19Conditions[]
Definition wstag675.c:521
FieldTalk actor4Talks[]
Definition wstag675.c:337
u16 actor4Conditions[]
Definition wstag675.c:506
FieldTalk actor27Talks[]
Definition wstag675.c:429
FieldActorEntry actor4
Definition wstag675.c:566
u16 actor3Conditions[]
Definition wstag675.c:505
AreaBattle area3Battle6
Definition wstag675.c:239
u16 actor39Talk2Actions[]
Definition wstag675.c:311
FieldTalk actor17Talks[]
Definition wstag675.c:389
FieldTalk actor39Talks[]
Definition wstag675.c:477
FieldActorEntry actor35
Definition wstag675.c:597
FieldTalk actor11Talks[]
Definition wstag675.c:365
FieldActorEntry actor32
Definition wstag675.c:594
FieldActorEntry actor8
Definition wstag675.c:570
ActorImage stageImages[]
Definition wstag675.c:249
u16 actor39Talk3Conditions[]
Definition wstag675.c:312
FieldTalk actor28Talks[]
Definition wstag675.c:433
FieldTalk actor6Talks[]
Definition wstag675.c:345
void setupStage(void)
Sets the stage up: its map, actors, battles and events, playing the ambience ENV_0021; BGM_0029 inste...
Definition wstag675.c:62
FieldActorEntry actor43
Definition wstag675.c:605
FieldTalk actor25Talks[]
Definition wstag675.c:421
FieldTalk actor19Talks[]
Definition wstag675.c:397
AreaBattle area2Battle4
Definition wstag675.c:224
u16 actor33Conditions[]
Definition wstag675.c:535
u16 actor39Talk5Actions[]
Definition wstag675.c:320
FieldTalk actor23Talks[]
Definition wstag675.c:413
u16 actor16Conditions[]
Definition wstag675.c:518
StageTile stageObjects[]
The tables and color setupStage gives FIELDSTG_state (FieldState)
Definition wstag675.c:653
u16 actor41Conditions[]
Definition wstag675.c:551
void endEvent400(void)
After event 400: keeps it from playing again.
Definition wstag675.c:34
FieldActorEntry actor9
Definition wstag675.c:571
u16 actor8Conditions[]
Definition wstag675.c:510
FieldActorEntry actor20
Definition wstag675.c:582
FieldTalk actor26Talks[]
Definition wstag675.c:425
u16 actor5Conditions[]
Definition wstag675.c:507
FieldTalk actor10Talks[]
Definition wstag675.c:361
FieldTalk actor3Talks[]
Definition wstag675.c:333
u16 actor39Talk1Actions[]
Definition wstag675.c:305
FieldTalk actor9Talks[]
Definition wstag675.c:357
BattleList area3Battles
Definition wstag675.c:241
AreaBattle area3Battle5
Definition wstag675.c:238
FieldTalk actor32Talks[]
Definition wstag675.c:449
AreaBattle area0Battle5
Definition wstag675.c:199
BattleList area1Battles
Definition wstag675.c:215
FieldTalk actor15Talks[]
Definition wstag675.c:381
u16 actor32Talk0Conditions[]
Definition wstag675.c:277
BattleList area2Battles
Definition wstag675.c:228
FieldTalk actor40Talks[]
Definition wstag675.c:486
FieldActorEntry actor15
Definition wstag675.c:577
FieldActorEntry actor12
Definition wstag675.c:574
u16 actor27Conditions[]
Definition wstag675.c:529
FieldActorEntry actor16
Definition wstag675.c:578
u16 actor15Conditions[]
Definition wstag675.c:517
AreaBattle area1Battle4
Definition wstag675.c:211
FieldActorEntry actor38
Definition wstag675.c:600
u16 actor6Conditions[]
Definition wstag675.c:508
AreaBattle area2Battle2
Definition wstag675.c:222
AreaBattle area1Battle5
Definition wstag675.c:212
u16 actor14Conditions[]
Definition wstag675.c:516
FieldActorEntry actor30
Definition wstag675.c:592
FieldActorEntry actor7
Definition wstag675.c:569
u16 actor43Conditions[]
Definition wstag675.c:557
StageSlot stageSlots[]
Definition wstag675.c:680
AreaBattle area2Battle1
Definition wstag675.c:221
FieldActorEntry actor13
Definition wstag675.c:575
FieldTalk actor24Talks[]
Definition wstag675.c:417
u16 actor32Talk0Actions[]
Definition wstag675.c:284
AreaBattle area1Battle3
Definition wstag675.c:210
AreaBattle area1Battle0
Definition wstag675.c:207
FieldActorEntry actor11
Definition wstag675.c:573
u16 actor25Conditions[]
Definition wstag675.c:527
FieldActorEntry actor1
Definition wstag675.c:563
u16 actor40Conditions[]
Definition wstag675.c:546
FieldActorEntry actor21
Definition wstag675.c:583
AreaBattle area0Battle0
Definition wstag675.c:194
FieldActorEntry actor42
Definition wstag675.c:604
AreaBattle area0Battle2
Definition wstag675.c:196
u16 actor39Talk4Conditions[]
Definition wstag675.c:314
FieldTalk actor13Talks[]
Definition wstag675.c:373
#define STAGE_FILE
Definition wstag675.c:55
AreaBattle area2Battle5
Definition wstag675.c:225
AreaBattle area1Battle1
Definition wstag675.c:208
u16 actor7Conditions[]
Definition wstag675.c:509
AreaBattle area2Battle3
Definition wstag675.c:223
u16 actor39Conditions[]
Definition wstag675.c:541
u16 actor32Talk3Conditions[]
Definition wstag675.c:293
u16 actor2Conditions[]
Definition wstag675.c:504
FieldTalk actor18Talks[]
Definition wstag675.c:393
FieldTalk actor7Talks[]
Definition wstag675.c:349
u16 actor20Conditions[]
Definition wstag675.c:522
u16 actor39Talk5Conditions[]
Definition wstag675.c:319
AreaBattle area0Battle4
Definition wstag675.c:198
FieldActorEntry actor34
Definition wstag675.c:596
#define STAGE_TEXT
Definition wstag675.c:53
FieldTalk actor8Talks[]
Definition wstag675.c:353
FieldTalk actor34Talks[]
Definition wstag675.c:457
FieldTalk actor30Talks[]
Definition wstag675.c:441
s16 script410[]
Definition wstag675.c:133
FieldTalk actor12Talks[]
Definition wstag675.c:369
AreaBattle area3Battle7
Definition wstag675.c:240
u16 actor21Conditions[]
Definition wstag675.c:523
BattleList area0Battles
Definition wstag675.c:202
AreaBattle area1Battle7
Definition wstag675.c:214
u16 actor28Conditions[]
Definition wstag675.c:530
FieldTalk actor16Talks[]
Definition wstag675.c:385
u16 actor17Conditions[]
Definition wstag675.c:519
FieldTalk actor29Talks[]
Definition wstag675.c:437
s16 script390[]
Definition wstag675.c:90
FieldActorEntry actor3
Definition wstag675.c:565
FieldActorEntry actor26
Definition wstag675.c:588
FieldBattles stageBattles[]
Definition wstag675.c:246
u16 actor36Conditions[]
Definition wstag675.c:538
FieldActorEntry actor14
Definition wstag675.c:576
FieldEvent stageEvents[]
Definition wstag675.c:698
u16 actor12Conditions[]
Definition wstag675.c:514
FieldTalk actor22Talks[]
Definition wstag675.c:409
u16 actor39Talk3Actions[]
Definition wstag675.c:313
u16 actor0Conditions[]
Definition wstag675.c:502
u16 actor32Talk4Conditions[]
Definition wstag675.c:294