Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
wstag300.c
Go to the documentation of this file.
1/*
2 * WSTAG300: Admin Center 2F, Asuka City.
3 */
4
5#include "common.h"
6#include "field/stage.h"
7
8/* Creates the event object of progress 0x16, which depends on flags 0x404A to 0x404C */
9void updateStage(StageTask *task, void **children) {
10 switch (task->state) {
11 case TASK_INIT:
12 default:
13 task->nextState(task);
15 children[0] = FIELDSTG_startEvent(0x23B);
17 children[0] = FIELDSTG_startEvent(0x23C);
18 }
19 break;
20 case TASK_RUN:
21 case TASK_DONE:
22 case TASK_KILL:
23 break;
24 }
25}
26
27#define STAGE_CHILDREN_SIZE 4
29
30/*
31 * After event 570, with Soldier: starts the stage's event battle 1, sets
32 * flag 0x0C11 (which decides whether actor 15 appears) and keeps it from
33 * playing again
34 */
40
41/*
42 * After event 571, with the player: starts the stage's event battle 2 and
43 * keeps it from playing again
44 */
45void endEvent571(void) {
46 FLAGS_00.applyAction(FLAG(0x40, 0x4B), 1);
48}
49
50/* After event 572, with the player: keeps it from playing again */
54
55#if VERSION_US || VERSION_JP
56#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_05)
57#define EVENT_TEXT_FILE (TEXT_EVENTS_300 - 1)
58#define STAGE_FILE 0x340
59#elif VERSION_EU
60#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_05)
61#define EVENT_TEXT_FILE (TEXT_EVENTS_300 - 1)
62#define STAGE_FILE 0x34F
63#endif
64/*
65 * Sets the stage up: its map, actors, battles and events, playing KANRIBGM;
66 * BGM_0029 instead at story steps 0x14 to 0x17 and 0x27 to 0x28
67 */
95
97 SCRIPT_FOLLOW(0, 0x6A),
98 SCRIPT_POSE(0x6A, 1, 3),
99 SCRIPT_PLACE(0x14A, 0x370, 0xE1),
100 SCRIPT_POSE(0x14A, 1, 5),
101 SCRIPT_COMMAND(0x323, 0x325, 0x14A),
102 SCRIPT_WAIT(0x1E),
103 SCRIPT_WALK(0x6A, 0x390, 0xF1, 3),
104 SCRIPT_POSE(0x14A, 1, 7),
105 SCRIPT_COMMAND(0x323, 0x326, 0x14A),
106 SCRIPT_WAIT_WALK(0x6A),
107 SCRIPT_POSE(0x6A, 1, 3),
108 SCRIPT_WAIT(0x1E),
109 SCRIPT_TALK(0, 1, 0x14A, 0),
111 SCRIPT_WAIT(0x1E),
112 SCRIPT_TALK(0, 2, 0x6A, 3),
114 SCRIPT_WAIT(0x1E),
115 SCRIPT_TALK(0, 3, 0x14A, 0),
117 SCRIPT_WAIT(0x1E),
118 SCRIPT_TALK(0, 4, 0x6A, 3),
120 SCRIPT_WAIT(0x1E),
121 SCRIPT_TALK(0, 5, 0x14A, 0),
123 SCRIPT_WAIT(0x1E),
124 SCRIPT_TALK(0, 6, 0x6A, 3),
126 SCRIPT_POSE(0x14A, 1, 5),
127 SCRIPT_WAIT(0x1E),
128 SCRIPT_TALK(0, 7, 0x14A, 0),
130 SCRIPT_POSE(0x6A, 1, 5),
131 SCRIPT_WAIT(0x3C),
132 SCRIPT_TALK(0, 8, 0x14A, 0),
134 SCRIPT_POSE(0x6A, 1, 3),
135 SCRIPT_POSE(0x14A, 1, 7),
136 SCRIPT_WAIT(0x1E),
137 SCRIPT_TALK(0, 9, 0x6A, 3),
139 SCRIPT_WAIT(0x1E),
140 SCRIPT_TALK(0, 0xA, 0x14A, 0),
142 SCRIPT_POSE(0x6A, 1, 4),
143 SCRIPT_POSE(0x14A, 1, 5),
144 SCRIPT_WAIT(0x1E),
145 SCRIPT_WALK(0x6A, 0x390, 0xD0, 4),
146 SCRIPT_WAIT_WALK(0x6A),
147 SCRIPT_WALK(0x6A, 0x3A8, 0xC4, 5),
148 SCRIPT_WALK(0x14A, 0x3A8, 0xC4, 5),
149 SCRIPT_WAIT(0x1E),
151 SCRIPT_LEAVE(0x218, 0x58, 0x18C, 5),
153};
155 SCRIPT_WALK(2, 0x370, 0xE0, 3),
156 SCRIPT_PLACE(0x130, 0x3A1, 0xC9),
157 SCRIPT_POSE(0x130, 1, 1),
160 SCRIPT_POSE(2, 1, 5),
161 SCRIPT_COMMAND(0x323, 0x325, 0x130),
162 SCRIPT_WAIT(0x3C),
163 SCRIPT_COMMAND(0x323, 0x326, 2),
164 SCRIPT_WAIT(0x1E),
165 SCRIPT_WALK(0x130, 0x389, 0xD5, 1),
166 SCRIPT_WAIT_WALK(0x130),
167 SCRIPT_TALK(0, 1, 0x130, 2),
168 SCRIPT_POSE(0x130, 1, 1),
170 SCRIPT_WAIT(0x1E),
171 SCRIPT_TALK(0, 2, 2, 3),
173 SCRIPT_WAIT(0x1E),
175};
177 SCRIPT_PLACE(2, 0x370, 0xE0),
178 SCRIPT_POSE(2, 1, 5),
179 SCRIPT_WAIT(0x5A),
181 SCRIPT_WAIT(0x1E),
182 SCRIPT_PLACE(0x76, 0x3B9, 0xBD),
183 SCRIPT_POSE(0x76, 1, 1),
184 SCRIPT_WAIT(0x1E),
185 SCRIPT_WALK(0x76, 0x389, 0xD5, 1),
186 SCRIPT_WAIT_WALK(0x76),
187 SCRIPT_TALK(0, 1, 0x76, 2),
189 SCRIPT_COMMAND(0x323, 0x325, 2),
190 SCRIPT_WAIT(0x3C),
191 SCRIPT_COMMAND(0x323, 0x326, 2),
192 SCRIPT_WAIT(0x1E),
193 SCRIPT_TALK(0, 2, 2, 1),
195 SCRIPT_WAIT(0x1E),
196 SCRIPT_POSE(0x76, 1, 2),
197 SCRIPT_WAIT(0x1E),
198 SCRIPT_POSE(0x76, 1, 0),
199 SCRIPT_WAIT(0x1E),
200 SCRIPT_POSE(0x76, 1, 1),
201 SCRIPT_WAIT(0x1E),
202 SCRIPT_TALK(0, 3, 0x76, 2),
204 SCRIPT_POSE(0x76, 1, 0),
205 SCRIPT_WAIT(0x1E),
206 SCRIPT_TALK(0, 4, 2, 1),
207 SCRIPT_POSE(0x76, 1, 2),
209 SCRIPT_POSE(0x76, 1, 1),
210 SCRIPT_WAIT(0x1E),
211 SCRIPT_POSE(0x76, 1, 0),
212 SCRIPT_WAIT(0x1E),
213 SCRIPT_POSE(0x76, 1, 1),
214 SCRIPT_WAIT(0x1E),
215 SCRIPT_TALK(0, 5, 2, 1),
216 SCRIPT_POSE(2, 7, 5),
218 SCRIPT_POSE(2, 1, 5),
219 SCRIPT_WAIT(0x1E),
220 SCRIPT_TALK(0, 6, 0x76, 2),
222 SCRIPT_WAIT(0x1E),
223 SCRIPT_TALK(0, 7, 2, 1),
224 SCRIPT_POSE(2, 7, 5),
226 SCRIPT_POSE(2, 1, 5),
227 SCRIPT_COMMAND(0x323, 0x327, 2),
228 SCRIPT_WAIT(0x78),
229 SCRIPT_COMMAND(0x323, 0x326, 2),
230 SCRIPT_WAIT(0x1E),
231 SCRIPT_TALK(0, 8, 0x76, 2),
233 SCRIPT_WAIT(0x1E),
235};
237 SCRIPT_PLACE(2, 0x370, 0xE0),
238 SCRIPT_POSE(2, 1, 5),
239 SCRIPT_PLACE(0x76, 0x389, 0xD5),
240 SCRIPT_POSE(0x76, 1, 1),
242 SCRIPT_WAIT(0x78),
243 SCRIPT_TALK(0, 2, 0x76, 2),
245 SCRIPT_WALK(0x76, 0x3C9, 0xB5, 5),
246 SCRIPT_WAIT_WALK(0x76),
247 SCRIPT_TALK(0, 4, 2, 1),
249 SCRIPT_PLACE(0x76, 0, 0),
250 SCRIPT_POSE(0x76, 1, 0),
252 SCRIPT_WAIT(0x5A),
253 SCRIPT_TALK(0, 1, 2, 3),
255 SCRIPT_COMMAND(0x323, 0x327, 2),
256 SCRIPT_WAIT(0x3C),
257 SCRIPT_COMMAND(0x323, 0x326, 2),
258 SCRIPT_WAIT(0x1E),
259 SCRIPT_TALK(0, 3, 2, 3),
261 SCRIPT_WAIT(0x1E),
263};
264AreaBattle area0Battle0 = { 0, 0, MUSIC(1, 0) };
265AreaBattle area0Battle1 = { 0, 0, MUSIC(1, 0) };
266AreaBattle area0Battle2 = { 0, 0, MUSIC(1, 0) };
267AreaBattle area0Battle3 = { 0, 0, MUSIC(1, 0) };
268AreaBattle area0Battle4 = { 0, 0, MUSIC(1, 0) };
269AreaBattle area0Battle5 = { 0, 0, MUSIC(1, 0) };
270AreaBattle area0Battle6 = { 0, 0, MUSIC(1, 0) };
271AreaBattle area0Battle7 = { 0, 0, MUSIC(1, 0) };
277AreaBattle area1Battle0 = { 0, 0, MUSIC(1, 0) };
278AreaBattle area1Battle1 = { 0, 0, MUSIC(1, 0) };
279AreaBattle area1Battle2 = { 0, 0, MUSIC(1, 0) };
280AreaBattle area1Battle3 = { 0, 0, MUSIC(1, 0) };
281AreaBattle area1Battle4 = { 0, 0, MUSIC(1, 0) };
282AreaBattle area1Battle5 = { 0, 0, MUSIC(1, 0) };
283AreaBattle area1Battle6 = { 0, 0, MUSIC(1, 0) };
284AreaBattle area1Battle7 = { 0, 0, MUSIC(1, 0) };
290AreaBattle area2Battle0 = { 0, 0, MUSIC(1, 0) };
291AreaBattle area2Battle1 = { 0, 0, MUSIC(1, 0) };
292AreaBattle area2Battle2 = { 0, 0, MUSIC(1, 0) };
293AreaBattle area2Battle3 = { 0, 0, MUSIC(1, 0) };
294AreaBattle area2Battle4 = { 0, 0, MUSIC(1, 0) };
295AreaBattle area2Battle5 = { 0, 0, MUSIC(1, 0) };
296AreaBattle area2Battle6 = { 0, 0, MUSIC(1, 0) };
297AreaBattle area2Battle7 = { 0, 0, MUSIC(1, 0) };
306AreaBattle area3Battle3 = { 0, 0, MUSIC(1, 0) };
307AreaBattle area3Battle4 = { 0, 0, MUSIC(1, 0) };
308AreaBattle area3Battle5 = { 0, 0, MUSIC(1, 0) };
309AreaBattle area3Battle6 = { 0, 0, MUSIC(1, 0) };
310AreaBattle area3Battle7 = { 0, 0, MUSIC(1, 0) };
320 { 0x200, 0x100, 0x21C, 0x1A6, 0x70, 0xA6, 0x230, 0x1FE },
321 { 0x200, 0x100, 0x200, 0x100, 0, 0, 0x220, 0x1FE },
322 { 0x200, 0x100, 0x216, 0x138, 0x58, 0x38, 0x200, 0x1FD },
323 { 0x200, 0x100, 0x208, 0x1BC, 0x20, 0xBC, 0x210, 0x1FD },
324 { 0x200, 0x100, 0x210, 0x1BC, 0x40, 0xBC, 0x220, 0x1FD },
325 { 0x200, 0x100, 0x200, 0x1BC, 0, 0xBC, 0x230, 0x1FD },
326 { 0x180, 0x100, 0x1B8, 0x100, 0x1E0, 0, 0x170, 0x1F9 },
327 { 0x140, 0x100, 0x172, 0x1B1, 0xC8, 0xB1, 0x170, 0x1F8 },
328 { 0x180, 0x100, 0x1B0, 0x100, 0x1C0, 0, 0x170, 0x1F7 },
329 { 0x180, 0x100, 0x1B0, 0x130, 0x1C0, 0x30, 0x170, 0x1F6 },
330 { 0x180, 0x100, 0x1A0, 0x197, 0x180, 0x97, 0x150, 0x1F5 },
331 { 0x180, 0x100, 0x190, 0x19C, 0x140, 0x9C, 0x160, 0x1F5 },
332 { 0x180, 0x100, 0x1A8, 0x167, 0x1A0, 0x67, 0x170, 0x1F5 },
333 { 0x180, 0x100, 0x190, 0x174, 0x140, 0x74, 0x150, 0x1F4 },
334 { 0x180, 0x100, 0x198, 0x174, 0x160, 0x74, 0x160, 0x1F4 },
335 { 0x180, 0x100, 0x180, 0x17F, 0x100, 0x7F, 0x170, 0x1F4 },
336 { 0x180, 0x100, 0x188, 0x17F, 0x120, 0x7F, 0x150, 0x1F3 },
337 { 0x180, 0x100, 0x1A8, 0x18F, 0x1A0, 0x8F, 0x160, 0x1F3 },
338 { 0x180, 0x100, 0x1B0, 0x190, 0x1C0, 0x90, 0x170, 0x1F3 },
339 { 0x180, 0x100, 0x198, 0x19C, 0x160, 0x9C, 0x150, 0x1F2 },
340 { 0x180, 0x100, 0x1B0, 0x160, 0x1C0, 0x60, 0x160, 0x1F2 },
341 { 0x180, 0x100, 0x1A0, 0x167, 0x180, 0x67, 0x170, 0x1F2 },
342};
385 { NULL, actor0Talk0Actions, 0x2B6 },
386 { NULL, NULL, 0 },
387};
389 { NULL, NULL, 0xAC },
390 { NULL, NULL, 0 },
391};
393 { NULL, NULL, 0xAB },
394 { NULL, NULL, 0 },
395};
397 { NULL, NULL, 0xAA },
398 { NULL, NULL, 0 },
399};
401 { NULL, NULL, 0xAB },
402 { NULL, NULL, 0 },
403};
405 { NULL, NULL, 0xAC },
406 { NULL, NULL, 0 },
407};
409 { NULL, NULL, 0xAB },
410 { NULL, NULL, 0 },
411};
413 { NULL, NULL, 0xAA },
414 { NULL, NULL, 0 },
415};
417 { NULL, NULL, 0xAB },
418 { NULL, NULL, 0 },
419};
421 { NULL, NULL, 0xAC },
422 { NULL, NULL, 0 },
423};
425 { NULL, NULL, 0xAB },
426 { NULL, NULL, 0 },
427};
429 { NULL, actor13Talk0Actions, 0x417 },
430 { NULL, NULL, 0 },
431};
433 { NULL, actor14Talk0Actions, 0x417 },
434 { NULL, NULL, 0 },
435};
437 { NULL, actor15Talk0Actions, 0x1ED },
438 { NULL, NULL, 0 },
439};
441 { NULL, actor16Talk0Actions, 0xA9 },
442 { NULL, NULL, 0 },
443};
445 { NULL, actor17Talk0Actions, 0xA9 },
446 { NULL, NULL, 0 },
447};
449 { NULL, actor18Talk0Actions, 0xA9 },
450 { NULL, NULL, 0 },
451};
453 { NULL, actor19Talk0Actions, 0xA9 },
454 { NULL, NULL, 0 },
455};
457 { NULL, NULL, 0x1E6 },
458 { NULL, NULL, 0 },
459};
461 { NULL, NULL, 0xAA },
462 { NULL, NULL, 0 },
463};
465 { NULL, NULL, 0xAB },
466 { NULL, NULL, 0 },
467};
469 { NULL, NULL, 0xA7 },
470 { NULL, NULL, 0 },
471};
566FieldActorEntry actor17 = { actor17Conditions, actor17Talks, 0x133, 0xE, 1225, 429, 3 };
568FieldActorEntry actor19 = { actor19Conditions, actor19Talks, 0x135, 0x10, 1120, 281, 1 };
569FieldActorEntry actor20 = { actor20Conditions, NULL, 0x14A, 0x11, 880, 225, 5 };
570FieldActorEntry actor21 = { actor21Conditions, actor21Talks, 0x17D, 0x12, 1225, 429, 3 };
571FieldActorEntry actor22 = { actor22Conditions, actor22Talks, 0x17D, 0x12, 929, 201, 1 };
572FieldActorEntry actor23 = { actor23Conditions, actor23Talks, 0x17D, 0x12, 929, 201, 1 };
573FieldActorEntry actor24 = { actor24Conditions, actor24Talks, 0x17E, 0x13, 318, 199, 7 };
575 &actor0,
576 &actor1,
577 &actor2,
578 &actor3,
579 &actor4,
580 &actor5,
581 &actor6,
582 &actor7,
583 &actor8,
584 &actor9,
585 &actor10,
586 &actor11,
587 &actor12,
588 &actor13,
589 &actor14,
590 &actor15,
591 &actor16,
592 &actor17,
593 &actor18,
594 &actor19,
595 &actor20,
596 &actor21,
597 &actor22,
598 &actor23,
599 &actor24,
600 NULL,
601};
603 { 1, 0, 0x40, 2, 0x36, 2, 0, 9, 8, 0, 918, 96, 0, 0 },
604 { 1, 0, 0x40, 2, 0x37, 2, 0, 9, 0xA, 0, 918, 96, 0, 0 },
605 { 1, 0, 0xFF, 2, 0xB, 0, 0, 0, 0, 0, 992, 126, 0, 0 },
606 { 1, 0, 0x40, 6, 0x32, 2, 0, 5, 8, 0, 166, 118, 0, 0 },
607 { 1, 0, 0x40, 6, 0x32, 2, 0, 5, 8, 0, 541, 90, 0, 0 },
608 { 1, 0, 0x40, 6, 0x32, 2, 0, 5, 8, 0, 1115, 172, 0, 0 },
609 { 1, 0, 0x40, 6, 0x33, 2, 0, 5, 8, 0, 332, 103, 0, 0 },
610 { 1, 0, 0x40, 6, 0x33, 2, 0, 5, 8, 0, 1009, 185, 0, 0 },
611 { 1, 0, 0x40, 6, 0x33, 2, 0, 5, 8, 0, 1211, 143, 0, 0 },
612 { 1, 0, 0x40, 6, 0x33, 2, 0, 5, 8, 0, 1294, 168, 0, 0 },
613 { 1, 0, 0x40, 6, 0x34, 2, 0, 5, 8, 0, 860, 89, 0, 0 },
614 { 1, 0, 0x80, 6, 0x35, 3, 0, 0xF, 0xE, 0, 660, 434, 0, 0 },
615 { 1, 0x64, 0x40, 6, 0, 0, 0, 0, 0, 0, 929, 148, 0, 0 },
616 { 1, 0, 0x40, 4, 1, 0, 0, 0, 0, 0, 768, 107, 151, 0 },
617 { 1, 0, 0x40, 4, 2, 0, 0, 0, 0, 0, 992, 218, 264, 0 },
618 { 1, 0, 0x40, 4, 3, 0, 0, 0, 0, 0, 1088, 218, 264, 0 },
619 { 1, 0, 0x40, 4, 4, 0, 0, 0, 0, 0, 1152, 186, 230, 0 },
620 { 1, 0, 0x60, 4, 5, 0, 0, 0, 0, 0, 816, 333, 432, 0 },
621 { 1, 0, 0x40, 4, 6, 0, 0, 0, 0, 0, 945, 441, 462, 0 },
622 { 1, 0, 0x40, 4, 7, 0, 0, 0, 0, 0, 960, 190, 231, 0 },
623 { 1, 0, 0x40, 4, 8, 0, 0, 0, 0, 0, 480, 321, 342, 0 },
624 { 1, 0, 0x40, 4, 9, 0, 0, 0, 0, 0, 497, 256, 272, 0 },
625 { 1, 0, 0x40, 4, 0xA, 0, 0, 0, 0, 0, 953, 144, 200, 0 },
626 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
627};
629 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x205, 0x158, 0xA4, 1, 0, 0, 0 },
630 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x218, 0x56, 0x18A, 5, 0x64, 0, 0 },
631 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x203, 0xC8, 0x9C, 7, 0, 0, 0 },
632 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x214, 0x177, 0xBD, 1, 0, 0, 0 },
633 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x205, 0x372, 0x132, 7, 0, 0, 0 },
634 { { { PROGRESS(STORY_CONTROL_ROOM), 1 }, { FLAG_STRANGE_DIGIMON_SEEN, 0 } }, SLOT_EVENT, 0x23A, 0, 0, 0, 0, 0, 0 },
635 { { { PROGRESS(STORY_AGUMON_DISGUISE), 1 }, { CODES_END, 0 } }, SLOT_EVENT, 0x15D, 0, 0, 0, 0, 0, 0 },
636 { { { CODES_END, 0 }, { CODES_END, 0 } }, 0, 0, 0, 0, 0, 0, 0, 0 },
637};
638void (*stageFuncs[])(void) = {
640};
642 { 349, script349, EVENT_TEXT(3), NULL, NULL },
643 { 570, script570, EVENT_TEXT(7), NULL, endEvent570 },
644 { 571, script571, EVENT_TEXT(8), NULL, endEvent571 },
645 { 572, script572, EVENT_TEXT(9), NULL, endEvent572 },
646 { -1, NULL, 0, NULL, NULL },
647};
#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_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_EVENT
starts the event arg
Definition field_map.h:262
#define FIELD_COMMAND_SHOW_OBJECTS(n)
shows them
Definition field_map.h:46
#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 FIELD_COMMAND_HIDE_OBJECTS(n)
hides the map objects of group n
Definition field_map.h:45
#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 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_BATTLE
BATL0000: the maps' random battles (AreaBattle, nearly all of them)
Definition sound.h:76
#define MUSIC_ADMIN_CENTER
KANRIBGM: the cities' Main Lobby, Admin Center, Digimon Arena, Master Room.
Definition sound.h:79
#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_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_ASUKA_ADMIN_2F_SOLDIER_C_FOUGHT
wstag300 Asuka Admin Center 2F: the Soldier "not letting you pass" (char 0x130); set with his battle,...
Definition story.h:723
#define FLAG_ASUKA_ADMIN_2F_TROOPER_B_FOUGHT
wstag300 Asuka Admin Center 2F (from progress 0x16): an A.o.A Trooper (char 0x133) starts a battle; s...
Definition story.h:708
#define FLAG_ASUKA_ADMIN_2F_TROOPER_A_FOUGHT
wstag300 Asuka Admin Center 2F (from progress 0x16): an A.o.A Trooper (char 0x132) starts a battle; s...
Definition story.h:705
#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_BYAKKO_LEADER_FOUGHT
WSTAG620 (the rebels' hideout), event 534: the Byakko Leader takes the player for the A....
Definition story.h:85
@ STORY_CONTROL_ROOM
WSTAG325 (Control Room, Asuka City), event 560: a Soldier guards the way.
Definition story.h:90
@ STORY_GUNSLINGER
WSTAG810 (Gunslinger 1F), event 1035.
Definition story.h:143
@ STORY_KNIGHTMON_REPROGRAMMED
WSTAG210 (Main Lobby, Asuka City), event 685: the A.o.A have reprogrammed Knightmon,...
Definition story.h:97
@ STORY_ASUKA_HEADQUARTERS
WSTAG310 (A.o.A Headquarters, Asuka City), event 961.
Definition story.h:138
@ STORY_AGUMON_DISGUISE
WSTAG237 (Underground Path), event 300: in the Agumon Suit; Kail goes on ahead alone.
Definition story.h:64
@ STORY_NETWORK_OFFLINE
WSTAG750, event 886: the news say the Optical Network is offline.
Definition story.h:123
#define FLAG_GAME_MASTER_GUARDS_SEEN
wstag300 event 572: the player spots the Game Master and three guards block the way; set at its end,...
Definition story.h:1451
#define FLAG_ASUKA_ADMIN_2F_SOLDIER_A_FOUGHT
wstag300 Asuka Admin Center 2F (from progress 0x16): an A.o.A Soldier (char 0x12B) starts a battle; s...
Definition story.h:717
#define FLAG_STRANGE_DIGIMON_SEEN
wstag300 event 570: "GUBIIIII!", a Digimon the player has never seen appears in Admin Center 2F; set ...
Definition story.h:1448
#define FLAG_ASUKA_ADMIN_2F_SOLDIER_B_FOUGHT
wstag300 Asuka Admin Center 2F (from progress 0x16): an A.o.A Soldier (char 0x12F) starts a battle; s...
Definition story.h:720
#define FLAG_ASUKA_ADMIN_2F_POWER_CHARGE_FOUND
wstag300: chest that gives the Power Charge, "I got" text; its conditions test it 0
Definition story.h:236
#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_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
#define FLAG_ASUKA_ADMIN_2F_TROOPER_C_FOUGHT
wstag300 Asuka Admin Center 2F (from progress 0x16): an A.o.A Trooper (char 0x134) starts a battle; s...
Definition story.h:711
#define FLAG_ASUKA_ADMIN_2F_TROOPER_D_FOUGHT
wstag300 Asuka Admin Center 2F (from progress 0x16): an A.o.A Trooper (char 0x135) starts a battle; s...
Definition story.h:714
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 wstag300.c:473
u16 actor0Talk0Actions[]
Definition wstag300.c:343
AreaBattle area2Battle7
Definition wstag300.c:297
FieldActorEntry actor0
Definition wstag300.c:549
void(* stageFuncs[])(void)
The stage's functions (common/start_stage.inc.c calls the first): a StageFuncs in the stages with a t...
Definition wstag300.c:638
FieldActorEntry actor6
Definition wstag300.c:555
u16 actor11Conditions[]
Definition wstag300.c:503
FieldTalk actor2Talks[]
Definition wstag300.c:392
AreaBattle area2Battle6
Definition wstag300.c:296
u16 actor10Conditions[]
Definition wstag300.c:498
FieldActorEntry actor24
Definition wstag300.c:573
u16 actor18Conditions[]
Definition wstag300.c:530
FieldActorEntry actor17
Definition wstag300.c:566
FieldTalk actor14Talks[]
Definition wstag300.c:432
u16 actor24Conditions[]
Definition wstag300.c:548
FieldActorEntry actor18
Definition wstag300.c:567
FieldTalk actor5Talks[]
Definition wstag300.c:404
AreaBattle area1Battle6
Definition wstag300.c:283
u16 actor19Talk0Actions[]
Definition wstag300.c:379
FieldActorEntry actor5
Definition wstag300.c:554
u16 actor22Conditions[]
Definition wstag300.c:542
void endEvent571(void)
After event 571, with the player: starts the stage's event battle 2 and keeps it from playing again.
Definition wstag300.c:45
AreaBattle area0Battle7
Definition wstag300.c:271
FieldActorEntry actor2
Definition wstag300.c:551
s16 script572[]
Definition wstag300.c:236
AreaBattle area3Battle4
Definition wstag300.c:307
AreaBattle area3Battle3
Definition wstag300.c:306
AreaBattle area0Battle1
Definition wstag300.c:265
FieldActorEntry actor23
Definition wstag300.c:572
FieldActorEntry actor19
Definition wstag300.c:568
AreaBattle area2Battle0
Definition wstag300.c:290
u16 actor9Conditions[]
Definition wstag300.c:497
FieldActorEntry * stageActors[]
Definition wstag300.c:574
AreaBattle area1Battle2
Definition wstag300.c:279
u16 actor23Conditions[]
Definition wstag300.c:543
AreaBattle area3Battle0
Definition wstag300.c:303
FieldActorEntry actor22
Definition wstag300.c:571
AreaBattle area0Battle6
Definition wstag300.c:270
u16 actor16Talk0Actions[]
Definition wstag300.c:364
FieldTalk actor1Talks[]
Definition wstag300.c:388
u16 actor13Conditions[]
Definition wstag300.c:505
AreaBattle area3Battle2
Definition wstag300.c:305
FieldTalk actor0Talks[]
Definition wstag300.c:384
AreaBattle area3Battle1
Definition wstag300.c:304
FieldTalk actor21Talks[]
Definition wstag300.c:456
AreaBattle area0Battle3
Definition wstag300.c:267
FieldActorEntry actor10
Definition wstag300.c:559
s16 script349[]
Definition wstag300.c:96
u16 actor19Conditions[]
Definition wstag300.c:535
FieldTalk actor4Talks[]
Definition wstag300.c:400
u16 actor4Conditions[]
Definition wstag300.c:480
FieldActorEntry actor4
Definition wstag300.c:553
u16 actor3Conditions[]
Definition wstag300.c:479
AreaBattle area3Battle6
Definition wstag300.c:309
FieldTalk actor17Talks[]
Definition wstag300.c:444
FieldActorEntry actor8
Definition wstag300.c:557
ActorImage stageImages[]
Definition wstag300.c:319
FieldTalk actor6Talks[]
Definition wstag300.c:408
void setupStage(void)
Sets the stage up: its map, actors, battles and events, playing KANRIBGM; BGM_0029 instead at story s...
Definition wstag300.c:68
u16 actor13Talk0Actions[]
Definition wstag300.c:349
FieldTalk actor19Talks[]
Definition wstag300.c:452
AreaBattle area2Battle4
Definition wstag300.c:294
FieldTalk actor23Talks[]
Definition wstag300.c:464
u16 actor16Conditions[]
Definition wstag300.c:520
StageTile stageObjects[]
The tables and color setupStage gives FIELDSTG_state (FieldState)
Definition wstag300.c:602
FieldActorEntry actor9
Definition wstag300.c:558
s16 script570[]
Definition wstag300.c:154
u16 actor8Conditions[]
Definition wstag300.c:492
FieldActorEntry actor20
Definition wstag300.c:569
u16 actor5Conditions[]
Definition wstag300.c:485
FieldTalk actor10Talks[]
Definition wstag300.c:424
FieldTalk actor3Talks[]
Definition wstag300.c:396
FieldTalk actor9Talks[]
Definition wstag300.c:420
BattleList area3Battles
Definition wstag300.c:311
AreaBattle area3Battle5
Definition wstag300.c:308
AreaBattle area0Battle5
Definition wstag300.c:269
BattleList area1Battles
Definition wstag300.c:285
FieldTalk actor15Talks[]
Definition wstag300.c:436
void endEvent570(void)
After event 570, with Soldier: starts the stage's event battle 1, sets flag 0x0C11 (which decides whe...
Definition wstag300.c:35
BattleList area2Battles
Definition wstag300.c:298
FieldActorEntry actor15
Definition wstag300.c:564
FieldActorEntry actor12
Definition wstag300.c:561
FieldActorEntry actor16
Definition wstag300.c:565
u16 actor15Conditions[]
Definition wstag300.c:515
AreaBattle area1Battle4
Definition wstag300.c:281
u16 actor6Conditions[]
Definition wstag300.c:486
AreaBattle area2Battle2
Definition wstag300.c:292
u16 actor14Talk0Actions[]
Definition wstag300.c:354
AreaBattle area1Battle5
Definition wstag300.c:282
void endEvent572(void)
After event 572, with the player: keeps it from playing again.
Definition wstag300.c:51
u16 actor14Conditions[]
Definition wstag300.c:510
FieldActorEntry actor7
Definition wstag300.c:556
StageSlot stageSlots[]
Definition wstag300.c:628
AreaBattle area2Battle1
Definition wstag300.c:291
FieldActorEntry actor13
Definition wstag300.c:562
FieldTalk actor24Talks[]
Definition wstag300.c:468
AreaBattle area1Battle3
Definition wstag300.c:280
AreaBattle area1Battle0
Definition wstag300.c:277
FieldActorEntry actor11
Definition wstag300.c:560
FieldActorEntry actor1
Definition wstag300.c:550
FieldActorEntry actor21
Definition wstag300.c:570
u16 actor17Talk0Actions[]
Definition wstag300.c:369
AreaBattle area0Battle0
Definition wstag300.c:264
AreaBattle area0Battle2
Definition wstag300.c:266
FieldTalk actor13Talks[]
Definition wstag300.c:428
#define STAGE_FILE
Definition wstag300.c:62
AreaBattle area2Battle5
Definition wstag300.c:295
AreaBattle area1Battle1
Definition wstag300.c:278
u16 actor7Conditions[]
Definition wstag300.c:491
AreaBattle area2Battle3
Definition wstag300.c:293
u16 actor2Conditions[]
Definition wstag300.c:474
FieldTalk actor18Talks[]
Definition wstag300.c:448
FieldTalk actor7Talks[]
Definition wstag300.c:412
u16 actor20Conditions[]
Definition wstag300.c:540
AreaBattle area0Battle4
Definition wstag300.c:268
#define STAGE_TEXT
Definition wstag300.c:60
FieldTalk actor8Talks[]
Definition wstag300.c:416
u16 actor15Talk0Actions[]
Definition wstag300.c:359
AreaBattle area3Battle7
Definition wstag300.c:310
u16 actor21Conditions[]
Definition wstag300.c:541
u16 actor18Talk0Actions[]
Definition wstag300.c:374
BattleList area0Battles
Definition wstag300.c:272
AreaBattle area1Battle7
Definition wstag300.c:284
FieldTalk actor16Talks[]
Definition wstag300.c:440
s16 script571[]
Definition wstag300.c:176
u16 actor17Conditions[]
Definition wstag300.c:525
FieldActorEntry actor3
Definition wstag300.c:552
FieldBattles stageBattles[]
Definition wstag300.c:316
FieldActorEntry actor14
Definition wstag300.c:563
FieldEvent stageEvents[]
Definition wstag300.c:641
u16 actor12Conditions[]
Definition wstag300.c:504
FieldTalk actor22Talks[]
Definition wstag300.c:460
u16 actor0Conditions[]
Definition wstag300.c:472