Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
wstag206.c
Go to the documentation of this file.
1/*
2 * WSTAG206: Amaterasu Bridge, Central Sector. On the Amaterasu server; its
3 * Asuka server twin is WSTAG205.
4 */
5
6#include "common.h"
7#include "field/stage.h"
8
9/* Creates the event object of progress 0x24, which depends on flag 0x40CA */
10void updateStage(StageTask *task, void **children) {
11 switch (task->state) {
12 case TASK_INIT:
13 default:
14 do {
15 if (GAME.progress == STORY_BLACK_ID_PASS && FLAGS_00.checkCondition(FLAG(0x40, 0xCA), 0)) {
16 children[0] = FIELDSTG_startEvent(0x399);
17 break;
18 }
19 if (GAME.progress == STORY_BLACK_ID_PASS && FLAGS_00.checkCondition(FLAG(0x40, 0xCA), 1)) {
20 children[0] = FIELDSTG_startEvent(0x39A);
21 break;
22 }
23 } while (0);
24 task->nextState(task);
25 break;
26 case TASK_RUN:
27 case TASK_DONE:
28 case TASK_KILL:
29 break;
30 }
31}
32
33#define STAGE_CHILDREN_SIZE 4
35
36/* After event 730, with Knightmon: starts the stage's event battle 0 */
37void endEvent730(void) {
39}
40
41/*
42 * After event 921, with Lisa, Leader Chuck, Resistance's Wanda, Resistance's
43 * Dew, Resistance's Meech and Teddy: keeps it from playing again
44 */
45void endEvent921(void) {
46 FLAGS_00.applyAction(FLAG(0x40, 0xCA), 1);
47}
48
49/* After event 922, with Teddy and Nick: moves the story on to STORY_AMATERASU_BRIDGE */
53
54const CVECTOR stageColor = { 0x80, 0x80, 0x80, 0x00 };
55#if VERSION_US || VERSION_JP
56#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_03)
57#define EVENT_TEXT_FILE (TEXT_EVENTS_200 - 1)
58#define STAGE_FILE 0x49C
59#elif VERSION_EU
60#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_03)
61#define EVENT_TEXT_FILE (TEXT_EVENTS_200 - 1)
62#define STAGE_FILE 0x4AC
63#endif
64/*
65 * Sets the stage up: its map, actors, battles and events, playing ASKA_BGM;
66 * BGM_0029 instead except at STORY_PRESIDENT_ARRESTED once flag 0x1A0A is set
67 */
92
94 SCRIPT_WALK(2, 0x1D0, 0x180, 5),
95 SCRIPT_COMMAND(0x323, 0x325, 0xF3),
96 SCRIPT_COMMAND(0x324, 0x325, 0xF4),
97 SCRIPT_COMMAND(0x325, 0x325, 0xF5),
99 SCRIPT_WAIT(0x3C),
100 SCRIPT_POSE(2, 1, 5),
101 SCRIPT_COMMAND(0x323, 0x326, 0xF3),
102 SCRIPT_COMMAND(0x324, 0x326, 0xF4),
103 SCRIPT_COMMAND(0x325, 0x326, 0xF5),
104 SCRIPT_WAIT(0x1E),
105 SCRIPT_TALK(0, 1, 0xF3, 2),
107 SCRIPT_WAIT(0x1E),
108 SCRIPT_TALK(0, 2, 2, 1),
110 SCRIPT_WAIT(0x1E),
111 SCRIPT_TALK(0, 3, 0xF3, 0),
113 SCRIPT_WAIT(0x1E),
114 SCRIPT_TALK(0, 4, 2, 3),
116 SCRIPT_WAIT(0x1E),
118};
120 SCRIPT_LOOK_AT(1, 0x2DA, 0xEC),
121 SCRIPT_PLACE(2, 0x2F0, 0x10E),
122 SCRIPT_POSE(2, 1, 4),
123 SCRIPT_PLACE(0x25, 0x288, 0x124),
124 SCRIPT_POSE(0x25, 1, 5),
125 SCRIPT_PLACE(0x26, 0x250, 0x130),
126 SCRIPT_POSE(0x26, 1, 5),
127 SCRIPT_PLACE(0x27, 0x261, 0x141),
128 SCRIPT_POSE(0x27, 1, 5),
129 SCRIPT_PLACE(0x65, 0x2F0, 0xE8),
130 SCRIPT_POSE(0x65, 1, 1),
131 SCRIPT_PLACE(0x66, 0x2E0, 0xE0),
132 SCRIPT_POSE(0x66, 1, 1),
133 SCRIPT_PLACE(0x67, 0x300, 0xF0),
134 SCRIPT_POSE(0x67, 1, 1),
135 SCRIPT_PLACE(0x6F, 0x248, 0x154),
136 SCRIPT_POSE(0x6F, 1, 5),
137 SCRIPT_PLACE(0xB3, 0x340, 0x108),
138 SCRIPT_POSE(0xB3, 1, 3),
139 SCRIPT_PLACE(0xE6, 0x226, 0x144),
140 SCRIPT_POSE(0xE6, 1, 5),
141 SCRIPT_PLACE(0x186, 0x220, 0x168),
142 SCRIPT_POSE(0x186, 1, 5),
143 SCRIPT_PLACE(0x187, 0x200, 0x158),
144 SCRIPT_POSE(0x187, 1, 5),
146 SCRIPT_WAIT(0x78),
147 SCRIPT_TALK(0, 1, 0x65, 0),
149 SCRIPT_WAIT(0x1E),
150 SCRIPT_TALK(0, 2, 0x25, 2),
151 SCRIPT_POSE(0x25, 1, 1),
153 SCRIPT_WAIT(0x1E),
154 SCRIPT_POSE(0x25, 1, 5),
155 SCRIPT_POSE(0x65, 1, 5),
156 SCRIPT_POSE(0x66, 1, 5),
157 SCRIPT_POSE(0x67, 1, 5),
158 SCRIPT_WAIT(0x1E),
159 SCRIPT_WALK(0x25, 0x380, 0xA8, 5),
160 SCRIPT_WALK(0x26, 0x380, 0x98, 5),
161 SCRIPT_WALK(0x27, 0x371, 0xA5, 5),
162 SCRIPT_WALK(0x65, 0x3A0, 0x90, 5),
163 SCRIPT_WALK(0x66, 0x390, 0x88, 5),
164 SCRIPT_WALK(0x67, 0x3B0, 0x98, 5),
165 SCRIPT_WALK(0x6F, 0x380, 0xB8, 5),
166 SCRIPT_WALK(0xE6, 0x380, 0x98, 5),
167 SCRIPT_WALK(0x186, 0x380, 0xB8, 5),
168 SCRIPT_WALK(0x187, 0x380, 0x98, 5),
169 SCRIPT_WAIT(0x48),
170 SCRIPT_TALK(0, 4, 0x27, 3),
171 SCRIPT_WAIT(0x48),
172 SCRIPT_TALK(1, 3, 0x26, 2),
173 SCRIPT_WAIT(0x78),
174 SCRIPT_TALK(1, 5, 0x187, 1),
175 SCRIPT_TALK(0, 5, 0x187, 1),
176 SCRIPT_WAIT(0xCC),
177 SCRIPT_FOLLOW(0, 2),
178 SCRIPT_TALK(1, 6, 0xB3, 1),
179 SCRIPT_TALK(0, 6, 0xB3, 1),
180 SCRIPT_POSE(0xB3, 1, 2),
182 SCRIPT_WAIT(0x1E),
183 SCRIPT_TALK(0, 7, 2, 0),
184 SCRIPT_POSE(2, 7, 6),
186 SCRIPT_POSE(2, 1, 6),
187 SCRIPT_WAIT(0x1E),
188 SCRIPT_POSE(2, 1, 5),
189 SCRIPT_WALK(0xB3, 0x320, 0xF8, 4),
190 SCRIPT_WAIT_WALK(0xB3),
191 SCRIPT_POSE(0xB3, 1, 1),
192 SCRIPT_WAIT(0x1E),
193 SCRIPT_TALK(0, 8, 0xB3, 0),
195 SCRIPT_WAIT(0x1E),
196#if VERSION_US
197 SCRIPT_LEAVE(0xE05, 0x2F0, 0x10E, 5),
198#elif VERSION_EU || VERSION_JP
199 SCRIPT_LEAVE(0xE06, 0x2F0, 0x10E, 5),
200#endif
202};
204 SCRIPT_PLACE(2, 0x2F0, 0x10E),
205 SCRIPT_POSE(2, 1, 5),
206 SCRIPT_PLACE(0xB3, 0x320, 0xF8),
207 SCRIPT_POSE(0xB3, 1, 1),
209 SCRIPT_WAIT(0x78),
210 SCRIPT_TALK(0, 1, 2, 1),
211 SCRIPT_POSE(2, 7, 5),
213 SCRIPT_POSE(2, 1, 5),
214 SCRIPT_WAIT(0x1E),
215 SCRIPT_TALK(0, 2, 0xB3, 0),
217 SCRIPT_PLACE(0x67, 0x370, 0xB0),
218 SCRIPT_POSE(0x67, 1, 1),
219 SCRIPT_WAIT(0x1E),
220 SCRIPT_WALK(0x67, 0x316, 0xDC, 1),
221 SCRIPT_WAIT_WALK(0x67),
222 SCRIPT_FOLLOW(0, 0x67),
223 SCRIPT_POSE(0x67, 1, 1),
224 SCRIPT_COMMAND(0x323, 0x325, 0x67),
225 SCRIPT_WAIT(0x3C),
226 SCRIPT_COMMAND(0x323, 0x326, 2),
227 SCRIPT_WAIT(0x1E),
228 SCRIPT_TALK(0, 3, 0x67, 2),
230 SCRIPT_WAIT(0x1E),
231 SCRIPT_COMMAND(0x323, 0x325, 2),
232 SCRIPT_COMMAND(0x324, 0x325, 0xB3),
233 SCRIPT_WAIT(0x3C),
234 SCRIPT_COMMAND(0x323, 0x326, 2),
235 SCRIPT_COMMAND(0x324, 0x326, 0xB3),
236 SCRIPT_WAIT(0x1E),
237 SCRIPT_TALK(0, 4, 2, 0),
238 SCRIPT_POSE(2, 7, 4),
239 SCRIPT_POSE(0xB3, 1, 4),
241 SCRIPT_WALK(2, 0x2F0, 0xD8, 4),
243 SCRIPT_POSE(2, 1, 6),
244 SCRIPT_WAIT(0x1E),
245 SCRIPT_TALK(0, 5, 0xB3, 1),
247 SCRIPT_WAIT(0x1E),
248 SCRIPT_TALK(0, 6, 0x67, 2),
249 SCRIPT_POSE(0x67, 1, 0),
251 SCRIPT_WAIT(0x1E),
252 SCRIPT_TALK(0, 7, 2, 0),
253 SCRIPT_POSE(2, 7, 6),
255 SCRIPT_POSE(2, 1, 6),
256 SCRIPT_WAIT(0x1E),
257 SCRIPT_TALK(0, 8, 0x67, 2),
258 SCRIPT_POSE(0x67, 1, 2),
259 SCRIPT_POSE(0xB3, 1, 3),
261 SCRIPT_WAIT(0x1E),
262 SCRIPT_TALK(0, 9, 2, 0),
263 SCRIPT_POSE(2, 7, 6),
265 SCRIPT_POSE(2, 1, 6),
266 SCRIPT_WAIT(0x1E),
267 SCRIPT_TALK(0, 0xA, 0x67, 2),
269 SCRIPT_WAIT(0x1E),
270 SCRIPT_TALK(0, 0xB, 2, 0),
271 SCRIPT_POSE(2, 7, 6),
273 SCRIPT_POSE(2, 1, 6),
274 SCRIPT_WAIT(0x1E),
275 SCRIPT_TALK(0, 0xC, 2, 0),
276 SCRIPT_POSE(2, 7, 7),
278 SCRIPT_POSE(2, 1, 7),
279 SCRIPT_WAIT(0x1E),
280 SCRIPT_TALK(0, 0xD, 0xB3, 3),
282 SCRIPT_WAIT(0x1E),
283 SCRIPT_WALK(2, 0x308, 0xCC, 5),
284 SCRIPT_POSE(0x67, 1, 3),
285 SCRIPT_POSE(0xB3, 1, 4),
287 SCRIPT_WALK(2, 0x358, 0xA4, 5),
288 SCRIPT_POSE(0x67, 1, 4),
289 SCRIPT_WAIT(0x5A),
290 SCRIPT_LEAVE(0x270, 0x60, 0x31C, 5),
292};
293AreaBattle area0Battle0 = { 0, 0, MUSIC(1, 0) };
294AreaBattle area0Battle1 = { 0, 0, MUSIC(1, 0) };
295AreaBattle area0Battle2 = { 0, 0, MUSIC(1, 0) };
296AreaBattle area0Battle3 = { 0, 0, MUSIC(1, 0) };
297AreaBattle area0Battle4 = { 0, 0, MUSIC(1, 0) };
298AreaBattle area0Battle5 = { 0, 0, MUSIC(1, 0) };
299AreaBattle area0Battle6 = { 0, 0, MUSIC(1, 0) };
300AreaBattle area0Battle7 = { 0, 0, MUSIC(1, 0) };
306AreaBattle area1Battle0 = { 0, 0, MUSIC(1, 0) };
307AreaBattle area1Battle1 = { 0, 0, MUSIC(1, 0) };
308AreaBattle area1Battle2 = { 0, 0, MUSIC(1, 0) };
309AreaBattle area1Battle3 = { 0, 0, MUSIC(1, 0) };
310AreaBattle area1Battle4 = { 0, 0, MUSIC(1, 0) };
311AreaBattle area1Battle5 = { 0, 0, MUSIC(1, 0) };
312AreaBattle area1Battle6 = { 0, 0, MUSIC(1, 0) };
313AreaBattle area1Battle7 = { 0, 0, MUSIC(1, 0) };
319AreaBattle area2Battle0 = { 0, 0, MUSIC(1, 0) };
320AreaBattle area2Battle1 = { 0, 0, MUSIC(1, 0) };
321AreaBattle area2Battle2 = { 0, 0, MUSIC(1, 0) };
322AreaBattle area2Battle3 = { 0, 0, MUSIC(1, 0) };
323AreaBattle area2Battle4 = { 0, 0, MUSIC(1, 0) };
324AreaBattle area2Battle5 = { 0, 0, MUSIC(1, 0) };
325AreaBattle area2Battle6 = { 0, 0, MUSIC(1, 0) };
326AreaBattle area2Battle7 = { 0, 0, MUSIC(1, 0) };
333AreaBattle area3Battle1 = { 0, 0, MUSIC(1, 0) };
334AreaBattle area3Battle2 = { 0, 0, MUSIC(1, 0) };
335AreaBattle area3Battle3 = { 0, 0, MUSIC(1, 0) };
336AreaBattle area3Battle4 = { 0, 0, MUSIC(1, 0) };
337AreaBattle area3Battle5 = { 0, 0, MUSIC(1, 0) };
338AreaBattle area3Battle6 = { 0, 0, MUSIC(1, 0) };
339AreaBattle area3Battle7 = { 0, 0, MUSIC(1, 0) };
349 { 0x200, 0x100, 0x21C, 0x1A6, 0x70, 0xA6, 0x230, 0x1FE },
350 { 0x200, 0x100, 0x200, 0x100, 0, 0, 0x220, 0x1FE },
351 { 0x200, 0x100, 0x216, 0x138, 0x58, 0x38, 0x200, 0x1FD },
352 { 0x200, 0x100, 0x208, 0x1BC, 0x20, 0xBC, 0x210, 0x1FD },
353 { 0x200, 0x100, 0x210, 0x1BC, 0x40, 0xBC, 0x220, 0x1FD },
354 { 0x200, 0x100, 0x200, 0x1BC, 0, 0xBC, 0x230, 0x1FD },
355 { 0x180, 0x100, 0x1B8, 0x19C, 0x1E0, 0x9C, 0x160, 0x1FF },
356 { 0x180, 0x100, 0x198, 0x1C0, 0x160, 0xC0, 0x170, 0x1FF },
357 { 0x180, 0x100, 0x190, 0x1C0, 0x140, 0xC0, 0x140, 0x1FE },
358 { 0x180, 0x100, 0x1A0, 0x1C0, 0x180, 0xC0, 0x150, 0x1FE },
359 { 0x180, 0x100, 0x1A4, 0x180, 0x190, 0x80, 0x160, 0x1FE },
360 { 0x180, 0x100, 0x1B8, 0x16C, 0x1E0, 0x6C, 0x170, 0x1FE },
361 { 0x180, 0x100, 0x1B0, 0x194, 0x1C0, 0x94, 0x140, 0x1FD },
362 { 0x180, 0x100, 0x198, 0x100, 0x160, 0, 0x150, 0x1FD },
363 { 0x180, 0x100, 0x188, 0x1C0, 0x120, 0xC0, 0x160, 0x1FD },
364 { 0x180, 0x100, 0x180, 0x138, 0x100, 0x38, 0x170, 0x1FD },
365 { 0x180, 0x100, 0x198, 0x138, 0x160, 0x38, 0x140, 0x1FC },
366 { 0x180, 0x100, 0x1A4, 0x100, 0x190, 0, 0x150, 0x1FC },
367 { 0x180, 0x100, 0x180, 0x100, 0x100, 0, 0x160, 0x1FC },
368 { 0x180, 0x100, 0x18C, 0x100, 0x130, 0, 0x170, 0x1FC },
369 { 0x180, 0x100, 0x1A4, 0x138, 0x190, 0x38, 0x140, 0x1FB },
370 { 0x180, 0x100, 0x188, 0x138, 0x120, 0x38, 0x150, 0x1FB },
371 { 0x180, 0x100, 0x190, 0x138, 0x140, 0x38, 0x160, 0x1FB },
372};
384 { NULL, actor0Talk0Actions, 0x16C },
385 { NULL, NULL, 0 },
386};
388 { NULL, NULL, 0xED },
389 { NULL, NULL, 0 },
390};
392 { NULL, NULL, 0xEE },
393 { NULL, NULL, 0 },
394};
396 { NULL, NULL, 0x1B5 },
397 { NULL, NULL, 0 },
398};
400 { NULL, NULL, 0x1B4 },
401 { NULL, NULL, 0 },
402};
404 { actor14Talk0Conditions, NULL, 0xE7 },
405 { actor14Talk1Conditions, NULL, 0xE8 },
406 { NULL, NULL, 0 },
407};
409 { NULL, NULL, 0xE9 },
410 { NULL, NULL, 0 },
411};
413 { actor18Talk0Conditions, NULL, 0xEA },
414 { actor18Talk1Conditions, NULL, 0xEB },
415 { NULL, NULL, 0 },
416};
418 { NULL, NULL, 0xEC },
419 { NULL, NULL, 0 },
420};
476FieldActorEntry actor8 = { actor8Conditions, NULL, 0x67, 0xA, 0, 0, 1 };
477FieldActorEntry actor9 = { actor9Conditions, actor9Talks, 0x67, 0xA, 752, 216, 7 };
483FieldActorEntry actor15 = { actor15Conditions, NULL, 0xF3, 0xE, 488, 372, 1 };
485FieldActorEntry actor17 = { actor17Conditions, NULL, 0xF3, 0xE, 735, 192, 1 };
487FieldActorEntry actor19 = { actor19Conditions, NULL, 0xF4, 0xF, 512, 344, 1 };
489FieldActorEntry actor21 = { actor21Conditions, NULL, 0xF4, 0xF, 848, 240, 1 };
490FieldActorEntry actor22 = { actor22Conditions, NULL, 0xF5, 0x10, 544, 360, 1 };
491FieldActorEntry actor23 = { actor23Conditions, NULL, 0xF6, 0x11, 551, 325, 1 };
492FieldActorEntry actor24 = { actor24Conditions, NULL, 0xF7, 0x12, 584, 341, 1 };
493FieldActorEntry actor25 = { actor25Conditions, NULL, 0x186, 0x13, 0, 0, 1 };
494FieldActorEntry actor26 = { actor26Conditions, NULL, 0x187, 0x14, 0, 0, 1 };
496 &actor0,
497 &actor1,
498 &actor2,
499 &actor3,
500 &actor4,
501 &actor5,
502 &actor6,
503 &actor7,
504 &actor8,
505 &actor9,
506 &actor10,
507 &actor11,
508 &actor12,
509 &actor13,
510 &actor14,
511 &actor15,
512 &actor16,
513 &actor17,
514 &actor18,
515 &actor19,
516 &actor20,
517 &actor21,
518 &actor22,
519 &actor23,
520 &actor24,
521 &actor25,
522 &actor26,
523 NULL,
524};
526 { 1, 0, 0x80, 2, 0, 0, 0, 0, 0, 0, 384, 384, 0, 0 },
527 { 1, 0, 0x40, 2, 1, 0, 0, 0, 0, 0, 128, 475, 0, 0 },
528 { 1, 0, 0x40, 2, 2, 0, 0, 0, 0, 0, 240, 499, 0, 0 },
529 { 1, 0, 0x40, 2, 3, 0, 0, 0, 0, 0, 252, 384, 0, 0 },
530 { 1, 0, 0x80, 2, 4, 0, 0, 0, 0, 0, 512, 307, 0, 0 },
531 { 1, 0, 0x40, 2, 5, 0, 0, 0, 0, 0, 496, 371, 0, 0 },
532 { 1, 0, 0x40, 2, 6, 0, 0, 0, 0, 0, 248, 352, 0, 0 },
533 { 1, 0, 0x80, 2, 7, 0, 0, 0, 0, 0, 256, 384, 0, 0 },
534 { 1, 0, 0x80, 2, 8, 0, 0, 0, 0, 0, 896, 128, 0, 0 },
535 { 1, 0, 0x40, 2, 0x10, 0, 0, 0, 0, 0, 100, 512, 0, 0 },
536 { 1, 0, 0x40, 6, 0x2C, 1, 0x2C, 0x3B, 0xA, 0, 414, 80, 0, 0 },
537 { 1, 0, 0x40, 6, 0x2C, 1, 0x2C, 0x3B, 0xA, 0, 631, 406, 0, 0 },
538 { 1, 0, 0x40, 6, 0x2C, 1, 0x2C, 0x3B, 0xA, 0, 1257, 341, 0, 0 },
539 { 1, 0, 0x40, 6, 0x3C, 1, 0x3C, 0x46, 0xA, 0, 396, 323, 0, 0 },
540 { 1, 0, 0x40, 6, 0x3C, 1, 0x3C, 0x46, 0xA, 0, 805, 413, 0, 0 },
541 { 1, 0, 0x40, 6, 0x3C, 1, 0x3C, 0x46, 0xA, 0, 950, 554, 0, 0 },
542 { 1, 0, 0x40, 6, 0x3C, 1, 0x3C, 0x46, 0xA, 0, 1127, 489, 0, 0 },
543 { 1, 0, 0x40, 6, 0x50, 1, 0x50, 0x53, 4, 0, 30, 340, 0, 0 },
544 { 1, 0, 0x40, 6, 0x50, 1, 0x50, 0x53, 4, 0, 70, 360, 0, 0 },
545 { 1, 0, 0x40, 6, 0x50, 1, 0x50, 0x53, 4, 0, 110, 380, 0, 0 },
546 { 1, 0, 0x40, 6, 0x50, 1, 0x50, 0x53, 4, 0, 150, 400, 0, 0 },
547 { 1, 0, 0x40, 6, 0x50, 1, 0x50, 0x53, 4, 0, 190, 420, 0, 0 },
548 { 1, 0, 0x40, 6, 0x50, 1, 0x50, 0x53, 4, 0, 470, 560, 0, 0 },
549 { 1, 0, 0x40, 6, 0x50, 1, 0x50, 0x53, 4, 0, 510, 580, 0, 0 },
550 { 1, 0, 0x40, 6, 0x58, 1, 0x58, 0x5B, 4, 0, 585, 125, 0, 0 },
551 { 1, 0, 0x40, 6, 0x5C, 1, 0x5C, 0x5F, 4, 0, 363, 49, 0, 0 },
552 { 1, 0, 0x40, 6, 0x5C, 1, 0x5C, 0x5F, 4, 0, 433, 160, 0, 0 },
553 { 1, 0, 0x40, 6, 0x54, 1, 0x54, 0x57, 4, 0, 1009, 162, 0, 0 },
554 { 1, 0x64, 0x80, 6, 9, 0, 0, 0, 0, 0, 758, 96, 0, 0 },
555 { 1, 0, 0x40, 0xA, 0x48, 1, 0x48, 0x4B, 6, 0, 37, 267, 0, 0 },
556 { 1, 0, 0x40, 0xA, 0x48, 1, 0x48, 0x4B, 6, 0, 77, 287, 0, 0 },
557 { 1, 0, 0x40, 0xA, 0x48, 1, 0x48, 0x4B, 6, 0, 117, 307, 0, 0 },
558 { 1, 0, 0x40, 0xA, 0x48, 1, 0x48, 0x4B, 6, 0, 157, 327, 0, 0 },
559 { 1, 0, 0x40, 0xA, 0x48, 1, 0x48, 0x4B, 6, 0, 196, 347, 0, 0 },
560 { 1, 0, 0x40, 0xA, 0x48, 1, 0x48, 0x4B, 6, 0, 236, 367, 0, 0 },
561 { 1, 0, 0x40, 0xA, 0x48, 1, 0x48, 0x4B, 6, 0, 276, 387, 0, 0 },
562 { 1, 0, 0x40, 0xA, 0x48, 1, 0x48, 0x4B, 6, 0, 477, 487, 0, 0 },
563 { 1, 0, 0x40, 0xA, 0x48, 1, 0x48, 0x4B, 6, 0, 517, 507, 0, 0 },
564 { 1, 0, 0x40, 0xA, 0x50, 1, 0x50, 0x53, 4, 0, 230, 440, 0, 0 },
565 { 1, 0, 0x40, 0xA, 0x60, 1, 0x60, 0x63, 6, 0, 422, 110, 0, 0 },
566 { 1, 0, 0x40, 0xA, 0x4C, 1, 0x4C, 0x4F, 6, 0, 942, 205, 0, 0 },
567 { 1, 0, 0x40, 4, 0xA, 0, 0, 0, 0, 0, 224, 177, 200, 0 },
568 { 1, 0, 0x40, 4, 0xB, 0, 0, 0, 0, 0, 600, 214, 273, 0 },
569 { 1, 0, 0x40, 4, 0xC, 0, 0, 0, 0, 0, 1046, 371, 407, 0 },
570 { 1, 0, 0x40, 4, 0xD, 0, 0, 0, 0, 0, 1062, 315, 337, 0 },
571 { 1, 0, 0x40, 4, 0xE, 0, 0, 0, 0, 0, 902, 275, 295, 0 },
572 { 1, 0, 0x40, 4, 0xF, 0, 0, 0, 0, 0, 846, 177, 226, 0 },
573 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
574};
576 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x270, 0x60, 0x31C, 5, 0x64, 0, 0 },
577 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x28C, 0x5E2, 0xE0, 1, 0, 0, 0 },
578 { { { SPECIAL_STORY_SINCE_DE_SINCERITY, 1 }, { CODES_END, 0 } }, SLOT_WARP0, 0x2E1, 0x1D0, 0x154, 7, 0, 0xC, 1 },
579 { { { SPECIAL_STORY_SINCE_DE_SINCERITY, 1 }, { CODES_END, 0 } }, SLOT_WARP0, 0x2E1, 0xE0, 0x110, 7, 0, 0xC, 1 },
580 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_CLIMB_UP, 3, 0x110, 0x100, 0, 0, 0, 0 },
581 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_CLIMB_DOWN, 3, 0x120, 0xC8, 0, 0, 0, 0 },
582 { { { SPECIAL_STORY_JUNGLE_SOUND_TO_BLACK_ID_PASS, 1 }, { CODES_END, 0 } }, SLOT_EVENT, 0x2DA, 0, 0, 0, 0, 0, 0 },
583 { { { CODES_END, 0 }, { CODES_END, 0 } }, 0, 0, 0, 0, 0, 0, 0, 0 },
584};
585void (*stageFuncs[])(void) = {
587};
589 { 730, script730, EVENT_TEXT(0x23), NULL, endEvent730 },
590 { 921, script921, EVENT_TEXT(0x26), NULL, endEvent921 },
591 { 922, script922, EVENT_TEXT(0x27), NULL, endEvent922 },
592 { -1, NULL, 0, NULL, NULL },
593};
#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_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 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 FIELD_COMMAND_HIDE_OBJECTS(n)
hides the map objects of group n
Definition field_map.h:45
#define SLOT_WARP0
the same with effect and cutscene 0
Definition field_map.h:264
#define SCRIPT_PLACE(id, x, y)
puts a character at (x, y)
Definition field_map.h:157
#define SCRIPT_TALK(box, entry, id, kind)
box of the event's boxes shows the event text's entry: a talk box at the corner kind next to the char...
Definition field_map.h:165
FieldMap FIELDSTG_map
Definition fieldstg.c:3660
FieldState FIELDSTG_state
Definition fieldstg.c:2641
#define EVENT_BATTLE(id)
action: FIELDSTG_battleFuncs.startEventBattle
Definition game_state.h:72
#define CODES_END
Definition game_state.h:83
#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_ASUKA_CITY
ASKA_BGM: the Central Sector's streets and bridges, the Underground Path.
Definition sound.h:78
#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_BOSS
BOSS_000: the sectors' boss battles.
Definition sound.h:108
#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 SPECIAL_GAIN_100_BIT
an action: gives the player 100 BIT (MONEY_GAINS[0])
Definition story.h:1822
#define FLAG_AMATERASU_BRIDGE_100_BIT_FOUND
wstag206: chest that gives 100 BIT ("I got 100 BIT!"); its conditions test it 0
Definition story.h:442
#define FLAG_OINKMON_CITIZENS_RESTORED
wstag435 Gale Tower: Airdramon spins the windmill and turns everyone back from Oinkmon; tested in 62 ...
Definition story.h:1031
@ STORY_BLACK_ID_PASS
WSTAG756 (Battle Gate), event 911: the Black ID Pass.
Definition story.h:131
@ STORY_PRESIDENT_ARRESTED
WSTAG226 (Login Room, Amaterasu City), event 935, after the President of MAGAMI gives himself up (WST...
Definition story.h:136
@ STORY_AMATERASU_BRIDGE
WSTAG206 (Amaterasu Bridge), event 922: an Attacker holds the bridge.
Definition story.h:133
@ STORY_MOVIE_BATTLES
WSTAG820, event 1080, with Snatchmon: each encounter plays MODE_BATTLE_MOVIE first.
Definition story.h:146
#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_AMATERASU_BRIDGE_TO_PRESIDENT_ARRESTED
GAME.progress is from STORY_AMATERASU_BRIDGE to STORY_PRESIDENT_ARRESTED (PROGRESS_RANGES[0x14])
Definition story.h:1923
#define SPECIAL_STORY_JUNGLE_SOUND_TO_BLACK_ID_PASS
GAME.progress is from STORY_JUNGLE_SOUND to STORY_BLACK_ID_PASS (PROGRESS_RANGES[0x15])
Definition story.h:1926
#define SPECIAL_STORY_SINCE_DE_SINCERITY
GAME.progress is STORY_DE_SINCERITY or later (PROGRESS_RANGES[0xC], to 0x63)
Definition story.h:1899
#define SPECIAL_SHOW_ITEM_GET_ICON
an action: the player's icon plays its animation 3 with SOUND_ITEM_GET (FIELD_COMMAND_ICON3); the tal...
Definition story.h:1982
Where an actor's frames go in VRAM: one of the records after the FieldImage (Actor....
Definition field_map.h:114
A battle of an area's BattleList, which can start on the field (see FIELDSTG_startEncounter); FIGHTST...
Definition field_map.h:402
The battles of an area of the map (its cells' value at FieldMap.files[4]), one picked at random.
Definition field_map.h:411
A character of the field (FieldState.actors, a list of pointers up to NULL), which FIELDSTG_updateFie...
Definition field_map.h:194
The battles of a place (FieldState.battles), by area of the map: the fourth area's are also the ones ...
Definition field_map.h:422
An event of the table FieldState.events, up to the first id -1, which FIELDSTG_startEvent starts.
Definition field_map.h:141
void(* setFile)(s32 index, s32 file)
FIELDSTG_setMapFile.
Definition field_map.h:100
void(* setFirstMap)(s32 index)
FIELDSTG_setFirstMap: the map the player starts on (GAME.mapIndex), when the mode is new.
Definition field_map.h:104
s32 sheetEntry
the stage's sprite sheet, loaded before the field starts, or 0
Definition field_map.h:445
FieldEvent * events
up to the first id -1
Definition field_map.h:451
s32 soundBank
SOUND.loadBank's, or 0.
Definition field_map.h:459
StageTile * objects
the map objects, up to the first margin 0
Definition field_map.h:446
s32 imageFile
or an image archive file, or 0
Definition field_map.h:449
FieldBattles * battles
Definition field_map.h:450
Vec2 start
where the player starts
Definition field_map.h:456
StageSlot * slots
up to the first type 0
Definition field_map.h:447
ActorImage * actors
then the actors', from actors[2]
Definition field_map.h:454
s32 mapFile
the file of the map's tiles (FIELDSTG_createMapStreamer)
Definition field_map.h:444
s32 startDir
and its direction
Definition field_map.h:457
CVECTOR spriteColor
the field's sprites' color, unless cd is 0
Definition field_map.h:458
s32 textFile
the stage's text file, for the talks
Definition field_map.h:461
union FieldState::@12 images
s32 music
SOUND.playSound's, or 0.
Definition field_map.h:460
What a character says (FIELDSTG_runActorAction): the first whose conditions hold, or the last,...
Definition field_map.h:176
void(* applyAction)(s32 code, s32 value)
Definition game_state.h:52
s32(* checkCondition)(u16 code, u16 value)
Definition game_state.h:53
What the player can trigger on a map (FIELDSTG_updateTriggers): a record of the table at FieldState....
Definition field_map.h:276
The task a stage starts (startStage), updated by its updateStage.
Definition stage.h:26
void(* nextState)(struct StageTask *task)
Definition stage.h:27
s32 state
Definition stage.h:27
An object of a map, which FIELDSTG draws: a record of the table at FieldState.objects,...
Definition field_map.h:208
Definition gfx.h:352
void endEvent730(void)
After event 730, with Knightmon: starts the stage's event battle 0.
Definition wstag206.c:37
u16 actor1Conditions[]
Definition wstag206.c:422
u16 actor26Conditions[]
Definition wstag206.c:467
u16 actor0Talk0Actions[]
Definition wstag206.c:373
AreaBattle area2Battle7
Definition wstag206.c:326
FieldActorEntry actor0
Definition wstag206.c:468
void(* stageFuncs[])(void)
The stage's functions (common/start_stage.inc.c calls the first): a StageFuncs in the stages with a t...
Definition wstag206.c:585
FieldActorEntry actor6
Definition wstag206.c:474
void endEvent922(void)
After event 922, with Teddy and Nick: moves the story on to STORY_AMATERASU_BRIDGE.
Definition wstag206.c:50
u16 actor11Conditions[]
Definition wstag206.c:432
AreaBattle area2Battle6
Definition wstag206.c:325
void endEvent921(void)
After event 921, with Lisa, Leader Chuck, Resistance's Wanda, Resistance's Dew, Resistance's Meech an...
Definition wstag206.c:45
u16 actor10Conditions[]
Definition wstag206.c:431
FieldActorEntry actor25
Definition wstag206.c:493
FieldActorEntry actor24
Definition wstag206.c:492
u16 actor18Conditions[]
Definition wstag206.c:443
FieldActorEntry actor17
Definition wstag206.c:485
FieldTalk actor14Talks[]
Definition wstag206.c:403
u16 actor24Conditions[]
Definition wstag206.c:461
s16 script921[]
Definition wstag206.c:119
FieldActorEntry actor18
Definition wstag206.c:486
AreaBattle area1Battle6
Definition wstag206.c:312
FieldActorEntry actor5
Definition wstag206.c:473
u16 actor22Conditions[]
Definition wstag206.c:451
AreaBattle area0Battle7
Definition wstag206.c:300
FieldActorEntry actor2
Definition wstag206.c:470
const CVECTOR stageColor
the color the setup copies to FIELDSTG_state.spriteColor
Definition wstag206.c:54
AreaBattle area3Battle4
Definition wstag206.c:336
AreaBattle area3Battle3
Definition wstag206.c:335
AreaBattle area0Battle1
Definition wstag206.c:294
FieldActorEntry actor23
Definition wstag206.c:491
FieldActorEntry actor19
Definition wstag206.c:487
AreaBattle area2Battle0
Definition wstag206.c:319
u16 actor9Conditions[]
Definition wstag206.c:430
FieldActorEntry * stageActors[]
Definition wstag206.c:495
AreaBattle area1Battle2
Definition wstag206.c:308
u16 actor23Conditions[]
Definition wstag206.c:456
AreaBattle area3Battle0
Definition wstag206.c:332
FieldActorEntry actor22
Definition wstag206.c:490
AreaBattle area0Battle6
Definition wstag206.c:299
u16 actor18Talk1Conditions[]
Definition wstag206.c:382
FieldTalk actor1Talks[]
Definition wstag206.c:387
u16 actor13Conditions[]
Definition wstag206.c:434
AreaBattle area3Battle2
Definition wstag206.c:334
FieldTalk actor0Talks[]
Definition wstag206.c:383
AreaBattle area3Battle1
Definition wstag206.c:333
AreaBattle area0Battle3
Definition wstag206.c:296
FieldTalk actor20Talks[]
Definition wstag206.c:417
FieldActorEntry actor10
Definition wstag206.c:478
u16 actor19Conditions[]
Definition wstag206.c:444
u16 actor4Conditions[]
Definition wstag206.c:425
FieldActorEntry actor4
Definition wstag206.c:472
u16 actor3Conditions[]
Definition wstag206.c:424
AreaBattle area3Battle6
Definition wstag206.c:338
FieldActorEntry actor8
Definition wstag206.c:476
ActorImage stageImages[]
Definition wstag206.c:348
u16 actor14Talk1Conditions[]
Definition wstag206.c:380
void setupStage(void)
Sets the stage up: its map, actors, battles and events, playing ASKA_BGM; BGM_0029 instead except at ...
Definition wstag206.c:68
AreaBattle area2Battle4
Definition wstag206.c:323
u16 actor16Conditions[]
Definition wstag206.c:441
StageTile stageObjects[]
The tables and color setupStage gives FIELDSTG_state (FieldState)
Definition wstag206.c:525
FieldActorEntry actor9
Definition wstag206.c:477
u16 actor8Conditions[]
Definition wstag206.c:429
FieldActorEntry actor20
Definition wstag206.c:488
u16 actor5Conditions[]
Definition wstag206.c:426
FieldTalk actor3Talks[]
Definition wstag206.c:391
FieldTalk actor9Talks[]
Definition wstag206.c:395
BattleList area3Battles
Definition wstag206.c:340
AreaBattle area3Battle5
Definition wstag206.c:337
AreaBattle area0Battle5
Definition wstag206.c:298
BattleList area1Battles
Definition wstag206.c:314
BattleList area2Battles
Definition wstag206.c:327
FieldActorEntry actor15
Definition wstag206.c:483
FieldActorEntry actor12
Definition wstag206.c:480
FieldActorEntry actor16
Definition wstag206.c:484
u16 actor15Conditions[]
Definition wstag206.c:436
AreaBattle area1Battle4
Definition wstag206.c:310
u16 actor6Conditions[]
Definition wstag206.c:427
AreaBattle area2Battle2
Definition wstag206.c:321
AreaBattle area1Battle5
Definition wstag206.c:311
u16 actor14Conditions[]
Definition wstag206.c:435
FieldActorEntry actor7
Definition wstag206.c:475
StageSlot stageSlots[]
Definition wstag206.c:575
AreaBattle area2Battle1
Definition wstag206.c:320
FieldActorEntry actor13
Definition wstag206.c:481
AreaBattle area1Battle3
Definition wstag206.c:309
AreaBattle area1Battle0
Definition wstag206.c:306
FieldActorEntry actor11
Definition wstag206.c:479
u16 actor25Conditions[]
Definition wstag206.c:466
FieldActorEntry actor1
Definition wstag206.c:469
FieldActorEntry actor21
Definition wstag206.c:489
AreaBattle area0Battle0
Definition wstag206.c:293
AreaBattle area0Battle2
Definition wstag206.c:295
#define STAGE_FILE
Definition wstag206.c:62
AreaBattle area2Battle5
Definition wstag206.c:324
AreaBattle area1Battle1
Definition wstag206.c:307
u16 actor7Conditions[]
Definition wstag206.c:428
AreaBattle area2Battle3
Definition wstag206.c:322
u16 actor2Conditions[]
Definition wstag206.c:423
FieldTalk actor18Talks[]
Definition wstag206.c:412
u16 actor20Conditions[]
Definition wstag206.c:449
AreaBattle area0Battle4
Definition wstag206.c:297
#define STAGE_TEXT
Definition wstag206.c:60
u16 actor18Talk0Conditions[]
Definition wstag206.c:381
FieldTalk actor12Talks[]
Definition wstag206.c:399
s16 script730[]
Definition wstag206.c:93
AreaBattle area3Battle7
Definition wstag206.c:339
u16 actor21Conditions[]
Definition wstag206.c:450
BattleList area0Battles
Definition wstag206.c:301
AreaBattle area1Battle7
Definition wstag206.c:313
s16 script922[]
Definition wstag206.c:203
FieldTalk actor16Talks[]
Definition wstag206.c:408
u16 actor17Conditions[]
Definition wstag206.c:442
FieldActorEntry actor3
Definition wstag206.c:471
FieldActorEntry actor26
Definition wstag206.c:494
FieldBattles stageBattles[]
Definition wstag206.c:345
FieldActorEntry actor14
Definition wstag206.c:482
FieldEvent stageEvents[]
Definition wstag206.c:588
u16 actor12Conditions[]
Definition wstag206.c:433
u16 actor14Talk0Conditions[]
Definition wstag206.c:379
u16 actor0Conditions[]
Definition wstag206.c:421