Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
wstag620.c
Go to the documentation of this file.
1/*
2 * WSTAG620: Secret Room, West Sector: the rebels' hideout. Off the Sewers
3 * (WSTAG615): Lisa, Kail, Keith and Nick, who looks for the pass code, and the
4 * Byakko Leader.
5 */
6
7#include "common.h"
8#include "field/stage.h"
9/* Defined below, after the code that uses them */
11
12/*
13 * stepTileAnimation (common/step_tile_animation.inc.c) for a StageTileSeq8:
14 * steps OBJ's animation through FRAMES and returns its frame, looping at the
15 * end or returning 0xFF if once
16 */
17s32 stepTileAnimation(StageTileSeq8 *obj, AnimFrame *frames, s32 once, s32 depth) {
18 AnimFrame *frame = &frames[obj->anim.index];
20
21 if (dt > 4) {
22 dt = 4;
23 }
24 if (depth == 0) {
25 obj->anim.timer -= dt;
26 }
27 if (obj->anim.timer <= 0) {
28 frame++;
29 obj->anim.index++;
30 obj->anim.timer += frame->duration;
31 if (once) {
32 if (frame->frame == 0xFF) {
33 return 0xFF;
34 }
35 } else if (frame->frame == 0xFF) {
36 frame = frames;
37 obj->anim.index = 0;
38 obj->anim.timer += frame->duration;
39 }
40 stepTileAnimation(obj, frames, once, depth + 1);
41 }
42 return frame->frame;
43}
44
45/*
46 * Plays the steps of updateTileSeqs8Steps on the map objects with animations
47 * 1 to 4, which go on to their next step at the end, the last with a sound
48 */
50 StageTile *object;
51 s32 n;
52 StageTile *tile;
53 s32 i;
54 s32 frame;
55
56 switch (task->state) {
57 case TASK_INIT:
58 default:
59 task->nextState(task);
60 n = 0;
61 for (object = FIELDSTG_state.objects; object->margin != 0; object++) {
62 if (object->anim >= 1 && object->anim <= 4) {
63 task->entries[n].tile = object;
64 n++;
65 }
66 }
67 task->entries[3].setFrame = 1;
68 task->entries[3].sound = 1;
69 task->entries[0].seq = 2;
70 task->entries[1].seq = 2;
71 task->entries[0].setFrame = 0;
72 task->entries[1].setFrame = 0;
73 task->entries[2].setFrame = 0;
74 task->entries[2].seq = 1;
75 task->entries[3].seq = 1;
76 task->entries[0].anim.index = 0;
78 task->entries[1].anim.index = 0;
80 task->entries[2].anim.index = 0;
82 task->entries[3].anim.index = 0;
84 break;
85 case TASK_RUN:
86 for (i = 0; i < 4; i++) {
87 tile = task->entries[i].tile;
88 if (task->entries[i].seq != 0) {
89 frame = stepTileAnimation(&task->entries[i], updateTileSeqs8Steps[i][task->entries[i].seq].frames,
90 updateTileSeqs8Steps[i][task->entries[i].seq].once, 0);
91 switch (frame) {
92 case 0xFF:
93 if (updateTileSeqs8Steps[i][task->entries[i].seq].next == 0) {
94 task->entries[i].seq = 0;
95 tile->visible = 0;
96 } else {
97 task->entries[i].seq = updateTileSeqs8Steps[i][task->entries[i].seq].next;
98 task->entries[i].anim.index = 0;
100 }
101 break;
102 case 0x12C:
103 tile->visible = 0;
104 break;
105 default:
106 tile->visible = 1;
107 if (task->entries[i].setFrame == 0) {
108 tile->clutRow = frame;
109 } else {
110 if (frame == 0x34 && task->entries[i].sound == 1) {
112 task->entries[i].sound = 0;
113 }
114 tile->frame = frame;
115 }
116 break;
117 }
118 } else {
119 tile->visible = 0;
120 }
121 }
122 break;
123 case TASK_DONE:
124 case TASK_KILL:
125 break;
126 }
127}
128
129/*
130 * Command 849 of the event scripts: the map objects of event 532, at Lucky
131 * Mouse's hideout (updateTileSeqs8)
132 */
134 return createTaskWithId(updateTileSeqs8, sizeof(StageTileSeqs8), 0, arg);
135}
136
137/* Creates the event object of the story so far, the first that applies */
138void updateStage(StageTask *task, void **children) {
139 switch (task->state) {
140 case TASK_INIT:
141 default:
142 if (GAME.progress == STORY_LUCKY_MOUSE && FLAGS_00.checkCondition(FLAG(0x40, 0x3B), 0)) {
143 children[0] = FIELDSTG_startEvent(0x214);
144 } else if (GAME.progress == STORY_LUCKY_MOUSE && FLAGS_00.checkCondition(FLAG(0x40, 0x3B), 1)) {
145 children[0] = FIELDSTG_startEvent(0x216);
147 children[0] = FIELDSTG_startEvent(0x21C);
149 children[0] = FIELDSTG_startEvent(0x227);
150 }
151 task->nextState(task);
152 break;
153 case TASK_RUN:
154 case TASK_DONE:
155 case TASK_KILL:
156 break;
157 }
158}
159
160#define STAGE_CHILDREN_SIZE 0x8
162
163/*
164 * After event 532, with Lucky Mouse, Lisa, Kail, General and Attacker:
165 * starts the stage's event battle 0 and keeps it from playing again
166 */
167void endEvent532(void) {
168 FLAGS_00.applyAction(FLAG(0x40, 0x3B), 1);
170}
171
172/* After event 534, with Attacker, Lisa, Kail and Kurt: moves the story on to STORY_BYAKKO_LEADER_FOUGHT */
176
177/*
178 * After event 540, with Kail, Kurt and Lisa: lets event 550 of WSTAG525
179 * start and keeps it from playing again
180 */
185
186/* After event 551, with Lisa, Keith, Nick and Kail: moves the story on to STORY_STAFF_PASS */
187void endEvent551(void) {
189}
190
191#if VERSION_US || VERSION_JP
192#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_02)
193#define EVENT_TEXT_FILE (TEXT_EVENTS_600 - 1)
194#define STAGE_FILE 0x479
195#elif VERSION_EU
196#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_02)
197#define EVENT_TEXT_FILE (TEXT_EVENTS_600 - 1)
198#define STAGE_FILE 0x489
199#endif
200/* Sets the stage up: its map, actors, battles and events, playing BGM_0019 */
220
222 SCRIPT_FOLLOW(1, 1),
223 SCRIPT_PLACE(1, 0x1C0, 0x189),
224 SCRIPT_POSE(1, 1, 1),
225 SCRIPT_PLACE(0x65, 0x1C1, 0x168),
226 SCRIPT_POSE(0x65, 1, 0),
227 SCRIPT_PLACE(0x68, 0x190, 0x178),
228 SCRIPT_POSE(0x68, 1, 7),
229 SCRIPT_WAIT(0x78),
230 SCRIPT_POSE(1, 0x3A, 1),
231 SCRIPT_WAIT(0x5A),
232 SCRIPT_TALK(0, 1, 1, 3),
233 SCRIPT_POSE(1, 1, 1),
235 SCRIPT_POSE(1, 1, 1),
236 SCRIPT_WAIT(0x1E),
237 SCRIPT_COMMAND(0x323, 0x325, 1),
238 SCRIPT_WAIT(0x3C),
239 SCRIPT_COMMAND(0x323, 0x326, 1),
240 SCRIPT_WAIT(0x1E),
241 SCRIPT_POSE(1, 1, 3),
242 SCRIPT_WAIT(0x1E),
243 SCRIPT_TALK(0, 2, 1, 3),
244 SCRIPT_POSE(1, 7, 3),
245 SCRIPT_POSE(0x65, 1, 1),
247 SCRIPT_POSE(1, 1, 3),
248 SCRIPT_WAIT(0x1E),
249 SCRIPT_LOOK_AT(0, 0x1A4, 0x178),
250 SCRIPT_TALK(0, 3, 0x68, 0),
252 SCRIPT_WAIT(0x1E),
253 SCRIPT_TALK(0, 4, 1, 3),
254 SCRIPT_POSE(1, 7, 3),
255 SCRIPT_POSE(0x65, 1, 0),
257 SCRIPT_POSE(1, 1, 3),
258 SCRIPT_WAIT(0x1E),
259 SCRIPT_TALK(0, 5, 0x68, 0),
260 SCRIPT_POSE(0x65, 1, 1),
262 SCRIPT_WAIT(0x1E),
263 SCRIPT_TALK(0, 6, 1, 3),
264 SCRIPT_POSE(1, 7, 3),
265 SCRIPT_POSE(0x65, 1, 0),
267 SCRIPT_POSE(1, 1, 3),
268 SCRIPT_WAIT(0x1E),
269 SCRIPT_TALK(0, 0x21, 0x68, 0),
270 SCRIPT_POSE(0x65, 1, 1),
272 SCRIPT_WAIT(0x1E),
273 SCRIPT_TALK(0, 7, 0x65, 2),
274 SCRIPT_POSE(1, 1, 4),
276 SCRIPT_WAIT(0x1E),
277 SCRIPT_TALK(0, 8, 0x68, 0),
278 SCRIPT_POSE(1, 1, 3),
279 SCRIPT_POSE(0x68, 1, 6),
281 SCRIPT_WAIT(0x1E),
282 SCRIPT_TALK(0, 9, 0x65, 2),
283 SCRIPT_POSE(1, 1, 4),
285 SCRIPT_WAIT(0x1E),
286 SCRIPT_TALK(0, 0xA, 0x68, 0),
287 SCRIPT_POSE(1, 1, 3),
289 SCRIPT_WAIT(0x1E),
290 SCRIPT_TALK(0, 0xB, 0x65, 2),
291 SCRIPT_POSE(1, 1, 4),
293 SCRIPT_WAIT(0x1E),
294 SCRIPT_TALK(0, 0xC, 1, 4),
297 SCRIPT_COMMAND(0x323, 0x325, 1),
298 SCRIPT_COMMAND(0x324, 0x325, 0x65),
299 SCRIPT_COMMAND(0x325, 0x325, 0x68),
300 SCRIPT_WAIT(0x3C),
301 SCRIPT_COMMAND(0x323, 0x326, 1),
302 SCRIPT_COMMAND(0x324, 0x326, 0x65),
303 SCRIPT_COMMAND(0x325, 0x326, 0x68),
304 SCRIPT_WAIT(0x1E),
305 SCRIPT_LOOK_AT(0, 0x1C0, 0x193),
306 SCRIPT_POSE(1, 1, 7),
307 SCRIPT_POSE(0x65, 1, 7),
308 SCRIPT_POSE(0x68, 1, 7),
309 SCRIPT_PLACE(0x98, 0x288, 0x1BC),
310 SCRIPT_POSE(0x98, 1, 3),
311 SCRIPT_WAIT(0x3C),
312 SCRIPT_PLACE(0xB, 0x288, 0x1BC),
313 SCRIPT_POSE(0xB, 1, 3),
314 SCRIPT_WALK(0x98, 0x268, 0x1AC, 3),
315 SCRIPT_WAIT_WALK(0x98),
316 SCRIPT_WALK(0xB, 0x268, 0x1AC, 3),
317 SCRIPT_WALK(0x98, 0x248, 0x19C, 3),
318 SCRIPT_PLACE(0xC2, 0x288, 0x1BC),
319 SCRIPT_POSE(0xC2, 1, 3),
320 SCRIPT_WAIT_WALK(0x98),
321 SCRIPT_WALK(0xB, 0x248, 0x19C, 3),
322 SCRIPT_PLACE(0x45, 0x288, 0x1BC),
323 SCRIPT_POSE(0x45, 1, 3),
324 SCRIPT_WALK(0x98, 0x228, 0x18C, 3),
325 SCRIPT_WALK(0xC2, 0x268, 0x1AC, 3),
326 SCRIPT_WAIT_WALK(0x98),
327 SCRIPT_WALK(0xB, 0x228, 0x18C, 3),
328 SCRIPT_WALK(0x45, 0x268, 0x1AC, 3),
329 SCRIPT_WALK(0x98, 0x208, 0x19C, 1),
330 SCRIPT_WALK(0xC2, 0x248, 0x19C, 3),
331 SCRIPT_WAIT_WALK(0x45),
332 SCRIPT_WALK(0xB, 0x208, 0x19C, 1),
333 SCRIPT_WALK(0x45, 0x248, 0x19C, 3),
334 SCRIPT_WALK(0x98, 0x1F0, 0x1A7, 3),
335 SCRIPT_WALK(0xC2, 0x228, 0x18C, 1),
336 SCRIPT_WAIT_WALK(0x45),
337 SCRIPT_WALK(0xB, 0x202, 0x19E, 3),
338 SCRIPT_WALK(0x45, 0x228, 0x18C, 3),
339 SCRIPT_POSE(0x98, 1, 3),
340 SCRIPT_WALK(0xC2, 0x215, 0x195, 3),
341 SCRIPT_WAIT_WALK(0x45),
342 SCRIPT_TALK(1, 0xD, 0x68, 2),
343 SCRIPT_TALK(0, 0xE, 1, 1),
344 SCRIPT_POSE(1, 7, 7),
345 SCRIPT_POSE(0xB, 1, 3),
346 SCRIPT_POSE(0x45, 1, 3),
347 SCRIPT_POSE(0x98, 1, 3),
348 SCRIPT_POSE(0xC2, 1, 3),
350 SCRIPT_POSE(1, 1, 7),
351 SCRIPT_WAIT(0x1E),
352 SCRIPT_TALK(0, 0xF, 0xB, 1),
353 SCRIPT_POSE(0xB, 7, 3),
355 SCRIPT_POSE(0xB, 1, 3),
356 SCRIPT_COMMAND(0x323, 0x325, 1),
357 SCRIPT_WAIT(0x3C),
358 SCRIPT_COMMAND(0x323, 0x326, 1),
359 SCRIPT_WAIT(0x1E),
360 SCRIPT_TALK(0, 0x10, 1, 2),
361 SCRIPT_POSE(1, 7, 7),
363 SCRIPT_POSE(1, 1, 3),
364 SCRIPT_WAIT(0x1E),
365 SCRIPT_POSE(0x65, 1, 1),
366 SCRIPT_WAIT(0x1E),
367 SCRIPT_TALK(0, 0x11, 0x68, 2),
369 SCRIPT_WAIT(0x1E),
370 SCRIPT_TALK(0, 0x12, 0x98, 1),
371 SCRIPT_POSE(1, 1, 7),
372 SCRIPT_POSE(0x65, 1, 7),
374 SCRIPT_WAIT(0x1E),
375 SCRIPT_TALK(0, 0x13, 0x68, 2),
377 SCRIPT_WAIT(0x1E),
378 SCRIPT_TALK(0, 0x14, 0x98, 1),
380 SCRIPT_COMMAND(0x323, 0x325, 1),
381 SCRIPT_COMMAND(0x324, 0x325, 0xB),
382 SCRIPT_COMMAND(0x325, 0x325, 0x65),
383 SCRIPT_WAIT(0x3C),
384 SCRIPT_COMMAND(0x323, 0x326, 1),
385 SCRIPT_COMMAND(0x324, 0x326, 0xB),
386 SCRIPT_COMMAND(0x325, 0x326, 0x65),
387 SCRIPT_WAIT(0x1E),
388 SCRIPT_POSE(1, 1, 3),
389 SCRIPT_POSE(0x65, 1, 1),
390 SCRIPT_WAIT(0x1E),
391 SCRIPT_POSE(0x68, 0x48, 7),
392 SCRIPT_COMMAND(0x323, 0x327, 0x68),
393 SCRIPT_WAIT(0x5A),
394 SCRIPT_COMMAND(0x323, 0x326, 0x68),
395 SCRIPT_WAIT(0x5A),
396 SCRIPT_TALK(0, 0x15, 0x68, 2),
398 SCRIPT_WAIT(0x1E),
399 SCRIPT_WALK(0x68, 0x1B0, 0x188, 7),
400 SCRIPT_WAIT_WALK(0x68),
401 SCRIPT_POSE(1, 1, 1),
402 SCRIPT_POSE(0xB, 1, 2),
403 SCRIPT_POSE(0x45, 1, 2),
404 SCRIPT_POSE(0x65, 1, 1),
405 SCRIPT_WALK(0x68, 0x180, 0x1A0, 1),
406 SCRIPT_POSE(0x98, 1, 2),
407 SCRIPT_POSE(0xC2, 1, 2),
408 SCRIPT_WAIT_WALK(0x68),
409 SCRIPT_POSE(0x68, 1, 3),
410 SCRIPT_WAIT(0x1E),
411 SCRIPT_POSE(0x68, 0x49, 3),
412 SCRIPT_WAIT(0x3C),
413 SCRIPT_COMMAND(0x351, 0x335, 1),
414 SCRIPT_WAIT(0x8A),
415 SCRIPT_POSE(1, 1, 6),
416 SCRIPT_POSE(0xB, 1, 4),
417 SCRIPT_POSE(0x45, 1, 3),
418 SCRIPT_POSE(0x65, 1, 7),
419 SCRIPT_POSE(0x68, 1, 6),
420 SCRIPT_POSE(0x98, 1, 4),
421 SCRIPT_PLACE(0x99, 0x201, 0x176),
422 SCRIPT_POSE(0x99, 1, 0),
423 SCRIPT_POSE(0xC2, 1, 3),
424 SCRIPT_WAIT(0x5A),
425 SCRIPT_COMMAND(0x323, 0x325, 0x65),
426 SCRIPT_WAIT(0x3C),
427 SCRIPT_COMMAND(0x323, 0x326, 0x65),
428 SCRIPT_WAIT(0x1E),
429 SCRIPT_FOLLOW(0, 0x98),
430 SCRIPT_TALK(0, 0x16, 0x98, 1),
432 SCRIPT_FOLLOW(0, 1),
433 SCRIPT_WAIT(0x1E),
434 SCRIPT_PLACE(0x99, 0, 0),
435 SCRIPT_POSE(0x99, 1, 0),
436 SCRIPT_WAIT(0x1E),
437 SCRIPT_POSE(0xB, 1, 3),
438 SCRIPT_POSE(0x45, 1, 7),
439 SCRIPT_POSE(0x98, 1, 7),
440 SCRIPT_WAIT(0x1E),
441 SCRIPT_WALK(0x98, 0x208, 0x1B4, 7),
442 SCRIPT_WAIT_WALK(0x98),
443 SCRIPT_WALK(0x98, 0x240, 0x198, 5),
444 SCRIPT_WAIT_WALK(0x98),
445 SCRIPT_WALK(0x45, 0x281, 0x1B9, 7),
446 SCRIPT_WALK(0x98, 0x290, 0x1C0, 7),
447 SCRIPT_POSE(0xC2, 1, 2),
448 SCRIPT_WAIT_WALK(0x45),
449 SCRIPT_TALK(0, 0x17, 0xC2, 0),
450 SCRIPT_PLACE(0x45, 0, 0),
451 SCRIPT_POSE(0x45, 1, 0),
452 SCRIPT_PLACE(0x98, 0, 0),
453 SCRIPT_POSE(0x98, 1, 0),
455 SCRIPT_COMMAND(0x323, 0x325, 0xB),
456 SCRIPT_WAIT(0x3C),
457 SCRIPT_COMMAND(0x323, 0x326, 0xB),
458 SCRIPT_WAIT(0x1E),
459 SCRIPT_WALK(1, 0x1B0, 0x190, 5),
460 SCRIPT_WALK(0xB, 0x1C8, 0x184, 1),
461 SCRIPT_POSE(0x65, 1, 0),
462 SCRIPT_WALK(0x68, 0x198, 0x194, 5),
463 SCRIPT_WAIT_WALK(0xB),
464 SCRIPT_TALK(0, 0x18, 0xB, 2),
465 SCRIPT_POSE(0xB, 7, 1),
467 SCRIPT_LOOK_AT(0, 0x1B0, 0x190),
468 SCRIPT_WAIT(0x1E),
469 SCRIPT_WALK(1, 0x190, 0x181, 3),
470 SCRIPT_WALK(0xB, 0x1A8, 0x174, 3),
471 SCRIPT_POSE(0x65, 1, 1),
472 SCRIPT_POSE(0x68, 1, 4),
473 SCRIPT_WALK(0xC2, 0x202, 0x19E, 3),
474 SCRIPT_WAIT_WALK(0xB),
475 SCRIPT_WALK(1, 0x1A0, 0x178, 7),
476 SCRIPT_WALK(0xB, 0x1B0, 0x170, 7),
477 SCRIPT_POSE(0xC2, 1, 3),
479 SCRIPT_TALK(0, 0x19, 0xC2, 1),
480 SCRIPT_POSE(1, 1, 7),
481 SCRIPT_POSE(0xB, 1, 7),
482 SCRIPT_POSE(0x65, 1, 7),
483 SCRIPT_POSE(0x68, 1, 6),
485 SCRIPT_WAIT(0x1E),
486 SCRIPT_COMMAND(0x323, 0x325, 0x68),
487 SCRIPT_WAIT(0x3C),
488 SCRIPT_COMMAND(0x323, 0x326, 0x68),
489 SCRIPT_WAIT(0x1E),
490 SCRIPT_TALK(0, 0x1A, 0x68, 1),
492 SCRIPT_WALK(0x68, 0x1C0, 0x180, 5),
493 SCRIPT_WAIT_WALK(0x68),
494 SCRIPT_WALK(0x68, 0x1D0, 0x188, 7),
495 SCRIPT_POSE(0xC2, 0x4A, 3),
496 SCRIPT_WAIT_WALK(0x68),
497 SCRIPT_PLACE(0x14B, 0x202, 0x19E),
498 SCRIPT_POSE(0x14B, 1, 3),
500 SCRIPT_WAIT(0x1E),
501 SCRIPT_PLACE(0x14B, 0, 0),
502 SCRIPT_POSE(0x14B, 1, 0),
503 SCRIPT_PLACE(0x14C, 0x1D0, 0x188),
504 SCRIPT_POSE(0x14C, 1, 7),
506 SCRIPT_WAIT(0x30),
507 SCRIPT_TALK(1, 0x1C, 0xB, 0),
508 SCRIPT_TALK(0, 0x1B, 0x68, 3),
510 SCRIPT_WAIT(0x3C),
511 SCRIPT_PLACE(0x68, 0, 0),
512 SCRIPT_POSE(0x68, 1, 0),
513 SCRIPT_PLACE(0x13D, 0x1D0, 0x187),
514 SCRIPT_POSE(0x13D, 1, 7),
515 SCRIPT_WAIT(0x96),
516 SCRIPT_PLACE(0x14C, 0, 0),
517 SCRIPT_POSE(0x14C, 1, 3),
519 SCRIPT_WAIT(0x1E),
520 SCRIPT_TALK(0, 0x1D, 1, 0),
522 SCRIPT_WAIT(0x1E),
523 SCRIPT_TALK(0, 0x1E, 0xC2, 1),
525 SCRIPT_POSE(0xC2, 0x4A, 3),
526 SCRIPT_WAIT(0x24),
528 SCRIPT_WAIT(0x30),
529 SCRIPT_POSE(0xC2, 0x4A, 3),
530 SCRIPT_WAIT(0x18),
532 SCRIPT_WAIT(0xC),
534 SCRIPT_WAIT(0x30),
535 SCRIPT_TALK(0, 0x1F, 0xC2, 1),
537 SCRIPT_COMMAND(0x323, 0x325, 1),
538 SCRIPT_WAIT(0x3C),
539 SCRIPT_COMMAND(0x323, 0x326, 1),
540 SCRIPT_WAIT(0x1E),
541 SCRIPT_WALK(1, 0x1B8, 0x184, 7),
543 SCRIPT_TALK(0, 0x20, 1, 1),
544 SCRIPT_POSE(1, 0xC, 7),
546 SCRIPT_POSE(1, 1, 7),
547 SCRIPT_WAIT(0x3C),
549};
551 SCRIPT_PLACE(1, 0x1C0, 0x188),
552 SCRIPT_POSE(1, 1, 7),
553 SCRIPT_PLACE(0xB, 0x1B0, 0x170),
554 SCRIPT_POSE(0xB, 1, 7),
555 SCRIPT_PLACE(0x65, 0x1C0, 0x168),
556 SCRIPT_POSE(0x65, 1, 7),
557 SCRIPT_PLACE(0x9D, 0x1A0, 0x178),
558 SCRIPT_POSE(0x9D, 1, 7),
559 SCRIPT_PLACE(0xC2, 0x202, 0x19E),
560 SCRIPT_POSE(0xC2, 1, 3),
561 SCRIPT_PLACE(0x13D, 0x1A0, 0x178),
562 SCRIPT_POSE(0x13D, 1, 7),
563 SCRIPT_WAIT(0x78),
564 SCRIPT_TALK(0, 1, 0xC2, 1),
567 SCRIPT_WALK(0xC2, 0x228, 0x18C, 5),
568 SCRIPT_WAIT_WALK(0xC2),
569 SCRIPT_WALK(0xC2, 0x280, 0x1B8, 7),
570 SCRIPT_WAIT_WALK(0xC2),
571 SCRIPT_LOOK_AT(0, 0x1C0, 0x172),
572 SCRIPT_PLACE(0xC2, 0, 0),
573 SCRIPT_POSE(0xC2, 1, 0),
574 SCRIPT_WAIT(0x1E),
575 SCRIPT_POSE(0x65, 1, 0),
576 SCRIPT_WAIT(0x1E),
577 SCRIPT_TALK(0, 2, 0x65, 2),
578 SCRIPT_POSE(1, 1, 4),
580 SCRIPT_WAIT(0x1E),
581 SCRIPT_TALK(0, 3, 0xB, 0),
582 SCRIPT_POSE(1, 1, 3),
583 SCRIPT_POSE(0xB, 7, 1),
584 SCRIPT_POSE(0x65, 1, 1),
586 SCRIPT_POSE(0xB, 1, 1),
587 SCRIPT_WAIT(0x1E),
588 SCRIPT_TALK(0, 4, 0x13D, 1),
589 SCRIPT_POSE(0x9D, 1, 5),
590 SCRIPT_POSE(0x13D, 1, 5),
592 SCRIPT_WAIT(0x1E),
593 SCRIPT_TALK(0, 5, 1, 3),
594 SCRIPT_POSE(1, 0xC, 3),
595 SCRIPT_POSE(0xB, 1, 7),
596 SCRIPT_POSE(0x65, 1, 0),
597 SCRIPT_POSE(0x9D, 1, 7),
598 SCRIPT_POSE(0x13D, 1, 7),
600 SCRIPT_POSE(1, 1, 3),
601 SCRIPT_WAIT(0x1E),
602 SCRIPT_TALK(0, 6, 0xB, 0),
603 SCRIPT_POSE(0xB, 7, 7),
605 SCRIPT_POSE(0xB, 1, 7),
606 SCRIPT_WAIT(0x1E),
607 SCRIPT_TALK(0, 7, 0x65, 2),
608 SCRIPT_POSE(1, 1, 4),
610 SCRIPT_WAIT(0x1E),
611 SCRIPT_TALK(0, 8, 1, 1),
612 SCRIPT_POSE(1, 7, 3),
614 SCRIPT_POSE(1, 1, 3),
615 SCRIPT_WAIT(0x1E),
616 SCRIPT_TALK(0, 9, 1, 1),
617 SCRIPT_POSE(1, 7, 3),
619 SCRIPT_POSE(1, 1, 3),
620 SCRIPT_WAIT(0x1E),
621 SCRIPT_TALK(0, 0xA, 0xB, 0),
622 SCRIPT_POSE(0xB, 7, 7),
624 SCRIPT_POSE(0xB, 1, 7),
625 SCRIPT_WAIT(0x1E),
626 SCRIPT_TALK(0, 0xB, 0x65, 2),
627 SCRIPT_POSE(1, 1, 4),
629 SCRIPT_POSE(1, 1, 7),
630 SCRIPT_WAIT(0x1E),
631 SCRIPT_WALK(1, 0x210, 0x1B0, 7),
633 SCRIPT_WALK(1, 0x240, 0x198, 7),
635 SCRIPT_WALK(1, 0x280, 0x1B8, 7),
636 SCRIPT_WAIT(6),
637 SCRIPT_LEAVE(0x254, 0x2D4, 0xC4, 7),
639};
641 SCRIPT_FOLLOW(1, 2),
642 SCRIPT_PLACE(2, 0x268, 0x1AC),
643 SCRIPT_POSE(2, 1, 3),
644 SCRIPT_PLACE(0xB, 0x1D8, 0x17D),
645 SCRIPT_POSE(0xB, 1, 1),
646 SCRIPT_PLACE(0x65, 0x1B0, 0x104),
647 SCRIPT_POSE(0x65, 1, 3),
648 SCRIPT_PLACE(0x13D, 0x1C1, 0x188),
649 SCRIPT_POSE(0x13D, 1, 5),
650 SCRIPT_WAIT(0x1E),
651 SCRIPT_WALK(2, 0x228, 0x18C, 3),
653 SCRIPT_POSE(2, 1, 3),
654 SCRIPT_COMMAND(0x323, 0x325, 0xB),
655 SCRIPT_WAIT(0x3C),
656 SCRIPT_POSE(2, 1, 2),
657 SCRIPT_POSE(0xB, 1, 6),
658 SCRIPT_POSE(0x13D, 1, 6),
659 SCRIPT_COMMAND(0x323, 0x326, 0xB),
660 SCRIPT_WAIT(0x1E),
661 SCRIPT_TALK(0, 1, 0xB, 2),
663 SCRIPT_WAIT(0x1E),
664 SCRIPT_TALK(0, 2, 2, 2),
666 SCRIPT_WAIT(0x1E),
667 SCRIPT_TALK(0, 3, 0xB, 2),
669 SCRIPT_WAIT(0x1E),
670 SCRIPT_COMMAND(0x323, 0x325, 0x13D),
671 SCRIPT_WAIT(0x3C),
672 SCRIPT_COMMAND(0x323, 0x326, 0x13D),
673 SCRIPT_WAIT(0x1E),
674 SCRIPT_TALK(0, 4, 0x13D, 3),
675 SCRIPT_POSE(0x13D, 1, 5),
677 SCRIPT_WAIT(0x1E),
678 SCRIPT_TALK(0, 5, 0xB, 2),
679 SCRIPT_POSE(0xB, 1, 1),
681 SCRIPT_WAIT(0x1E),
682 SCRIPT_TALK(0, 6, 2, 2),
684 SCRIPT_WAIT(0x1E),
685 SCRIPT_COMMAND(0x323, 0x325, 0xB),
686 SCRIPT_WAIT(0x3C),
687 SCRIPT_COMMAND(0x323, 0x326, 0xB),
688 SCRIPT_WAIT(0x1E),
689 SCRIPT_TALK(0, 7, 0xB, 2),
690 SCRIPT_POSE(0xB, 1, 6),
692 SCRIPT_WAIT(0x1E),
693 SCRIPT_LOOK_AT(0, 0x1F2, 0x140),
694 SCRIPT_TALK(0, 0x14, 0x65, 3),
695 SCRIPT_POSE(0x65, 1, 7),
697 SCRIPT_WAIT(0x1E),
698 SCRIPT_TALK(0, 8, 2, 2),
699 SCRIPT_POSE(2, 1, 3),
701 SCRIPT_WAIT(0x1E),
702 SCRIPT_TALK(0, 9, 0x65, 3),
704 SCRIPT_WAIT(0x1E),
705 SCRIPT_TALK(0, 0xA, 0xB, 2),
706 SCRIPT_POSE(0xB, 7, 4),
708 SCRIPT_POSE(0xB, 1, 0),
709 SCRIPT_WAIT(0x1E),
710 SCRIPT_TALK(0, 0xB, 0x65, 3),
712 SCRIPT_WAIT(0x1E),
713 SCRIPT_TALK(0, 0xC, 0x13D, 2),
714 SCRIPT_POSE(0x13D, 1, 4),
716 SCRIPT_WAIT(0x1E),
717 SCRIPT_TALK(0, 0xD, 0xB, 2),
718 SCRIPT_POSE(2, 1, 2),
719 SCRIPT_POSE(0xB, 1, 6),
720 SCRIPT_POSE(0x13D, 1, 6),
722 SCRIPT_WAIT(0x1E),
723 SCRIPT_TALK(0, 0xE, 0x65, 3),
725 SCRIPT_WAIT(0x1E),
726 SCRIPT_TALK(0, 0xF, 2, 2),
727 SCRIPT_POSE(2, 1, 3),
728 SCRIPT_POSE(0xB, 1, 4),
729 SCRIPT_POSE(0x13D, 1, 4),
731 SCRIPT_WAIT(0x1E),
732 SCRIPT_TALK(0, 0x10, 0x65, 3),
734 SCRIPT_WAIT(0x1E),
735 SCRIPT_COMMAND(0x323, 0x325, 2),
736 SCRIPT_WAIT(0x3C),
737 SCRIPT_COMMAND(0x323, 0x326, 2),
738 SCRIPT_WAIT(0x1E),
739 SCRIPT_TALK(0, 0x11, 2, 2),
740 SCRIPT_POSE(0xB, 1, 6),
741 SCRIPT_POSE(0x13D, 1, 6),
743 SCRIPT_WAIT(0x1E),
744 SCRIPT_TALK(0, 0x12, 0x65, 3),
745 SCRIPT_POSE(0xB, 1, 4),
746 SCRIPT_POSE(0x13D, 1, 4),
748 SCRIPT_WAIT(0x1E),
749 SCRIPT_TALK(0, 0x13, 2, 2),
750 SCRIPT_POSE(0xB, 1, 6),
751 SCRIPT_POSE(0x13D, 1, 6),
753 SCRIPT_WAIT(0x1E),
754 SCRIPT_POSE(2, 1, 7),
755 SCRIPT_POSE(0xB, 1, 7),
756 SCRIPT_POSE(0x13D, 1, 7),
757 SCRIPT_WAIT(0x1E),
758 SCRIPT_WALK(2, 0x268, 0x1AC, 7),
759 SCRIPT_WAIT(6),
760 SCRIPT_LEAVE(0x254, 0x2D4, 0xC4, 7),
762};
764 SCRIPT_LOOK_AT(1, 0x1AE, 0x131),
765 SCRIPT_PLACE(2, 0x228, 0x18C),
766 SCRIPT_POSE(2, 1, 3),
767 SCRIPT_PLACE(0xB, 0x1D8, 0x17D),
768 SCRIPT_POSE(0xB, 1, 4),
769 SCRIPT_PLACE(0x65, 0x1B0, 0x104),
770 SCRIPT_POSE(0x65, 1, 7),
771 SCRIPT_PLACE(0x66, 0x1EE, 0xE8),
772 SCRIPT_POSE(0x66, 1, 5),
773 SCRIPT_PLACE(0x67, 0x182, 0x1A0),
774 SCRIPT_POSE(0x67, 1, 3),
775 SCRIPT_PLACE(0x13D, 0x1C1, 0x188),
776 SCRIPT_POSE(0x13D, 1, 4),
777 SCRIPT_WAIT(0x78),
778 SCRIPT_TALK(0, 1, 0x65, 1),
779 SCRIPT_POSE(2, 1, 2),
780 SCRIPT_POSE(0xB, 1, 1),
781 SCRIPT_POSE(0x65, 1, 1),
782 SCRIPT_POSE(0x13D, 1, 1),
784 SCRIPT_WAIT(0x1E),
785 SCRIPT_TALK(0, 2, 0x65, 1),
786 SCRIPT_POSE(2, 1, 3),
787 SCRIPT_POSE(0xB, 1, 4),
788 SCRIPT_POSE(0x65, 1, 5),
789 SCRIPT_POSE(0x13D, 1, 4),
791 SCRIPT_POSE(0x65, 1, 7),
792 SCRIPT_WAIT(0x1E),
793 SCRIPT_TALK(1, 3, 0x66, 3),
794 SCRIPT_TALK(0, 4, 0x67, 2),
795 SCRIPT_POSE(0x66, 1, 1),
796 SCRIPT_POSE(0x67, 1, 5),
798 SCRIPT_POSE(0x66, 1, 5),
799 SCRIPT_POSE(0x67, 1, 3),
800 SCRIPT_WAIT(0x1E),
801 SCRIPT_TALK(0, 5, 0x65, 3),
802 SCRIPT_POSE(0x65, 1, 7),
804 SCRIPT_WAIT(0x1E),
805 SCRIPT_TALK(0, 6, 0xB, 2),
806 SCRIPT_POSE(0xB, 7, 4),
808 SCRIPT_POSE(0xB, 1, 4),
809 SCRIPT_WAIT(0x1E),
810 SCRIPT_TALK(0, 7, 0x65, 3),
812 SCRIPT_POSE(2, 1, 2),
813 SCRIPT_POSE(0xB, 1, 6),
814 SCRIPT_POSE(0x65, 1, 5),
815 SCRIPT_POSE(0x13D, 1, 6),
816 SCRIPT_WAIT(0x1E),
817 SCRIPT_FOLLOW(0, 0xB),
818 SCRIPT_TALK(0, 9, 0xB, 0),
819 SCRIPT_POSE(0xB, 7, 6),
821 SCRIPT_POSE(0xB, 1, 6),
822 SCRIPT_WAIT(0x1E),
823 SCRIPT_TALK(0, 0xA, 2, 1),
824 SCRIPT_POSE(2, 7, 2),
826 SCRIPT_POSE(2, 1, 2),
827 SCRIPT_WAIT(0x1E),
828 SCRIPT_LEAVE(0x256, 0x228, 0x18C, 3),
830};
832 { 0, 6 }, { 1, 6 }, { 2, 6 }, { 1, 6 },
833 { 0, 6 }, { 1, 6 }, { 2, 6 }, { 1, 6 },
834 { 255, 0 },
835};
837 { 0, 6 }, { 0, 6 }, { 0, 6 }, { 1, 6 },
838 { 2, 6 }, { 3, 6 }, { 4, 6 }, { 5, 6 },
839 { 6, 6 }, { 7, 6 }, { 6, 6 }, { 5, 6 },
840 { 4, 6 }, { 3, 6 }, { 2, 6 }, { 1, 6 },
841 { 0, 6 }, { 0, 6 }, { 255, 0x3E7 },
842};
844 { 0, 6 }, { 1, 6 }, { 2, 6 }, { 1, 6 },
845 { 0, 6 }, { 1, 6 }, { 2, 6 }, { 1, 6 },
846 { 255, 0 },
847};
849 { 0, 12 }, { 1, 12 }, { 2, 12 }, { 1, 12 },
850 { 255, 0 },
851};
853 { 2, 12 }, { 3, 12 }, { 4, 12 }, { 5, 12 },
854 { 6, 12 }, { 7, 12 }, { 8, 12 }, { 9, 12 },
855 { 10, 12 }, { 255, 0x3E7 },
856};
858 { 9, 12 }, { 10, 12 }, { 9, 12 }, { 8, 12 },
859 { 255, 0 },
860};
862 { 0x12C, 90 }, { 0, 6 }, { 1, 6 }, { 2, 6 },
863 { 3, 6 }, { 4, 6 }, { 3, 6 }, { 4, 6 },
864 { 3, 6 }, { 4, 6 }, { 3, 6 }, { 2, 6 },
865 { 1, 6 }, { 2, 6 }, { 1, 6 }, { 2, 6 },
866 { 1, 6 }, { 255, 0x3E7 },
867};
869 { 0x12C, 108 }, { 50, 6 }, { 51, 6 }, { 52, 6 },
870 { 53, 6 }, { 54, 6 }, { 56, 6 }, { 57, 6 },
871 { 58, 6 }, { 59, 6 }, { 255, 0x3E7 },
872};
874 { { NULL, 0, 0 }, { updateTileSeqs8Steps_0_0, 0, 0 }, { updateTileSeqs8Steps_0_1, 1, 3 }, { updateTileSeqs8Steps_0_2, 0, 0 } },
875 { { NULL, 0, 0 }, { updateTileSeqs8Steps_1_0, 0, 0 }, { updateTileSeqs8Steps_1_1, 1, 3 }, { updateTileSeqs8Steps_1_2, 0, 0 } },
876 { { NULL, 0, 0 }, { updateTileSeqs8Steps_2, 1, 0 }, { NULL, 0, 0 }, { NULL, 0, 0 } },
877 { { NULL, 0, 0 }, { updateTileSeqs8Steps_3, 1, 0 }, { NULL, 0, 0 }, { NULL, 0, 0 } },
878};
879AreaBattle area0Battle0 = { 0, 0, MUSIC(1, 0) };
880AreaBattle area0Battle1 = { 0, 0, MUSIC(1, 0) };
881AreaBattle area0Battle2 = { 0, 0, MUSIC(1, 0) };
882AreaBattle area0Battle3 = { 0, 0, MUSIC(1, 0) };
883AreaBattle area0Battle4 = { 0, 0, MUSIC(1, 0) };
884AreaBattle area0Battle5 = { 0, 0, MUSIC(1, 0) };
885AreaBattle area0Battle6 = { 0, 0, MUSIC(1, 0) };
886AreaBattle area0Battle7 = { 0, 0, MUSIC(1, 0) };
892AreaBattle area1Battle0 = { 0, 0, MUSIC(1, 0) };
893AreaBattle area1Battle1 = { 0, 0, MUSIC(1, 0) };
894AreaBattle area1Battle2 = { 0, 0, MUSIC(1, 0) };
895AreaBattle area1Battle3 = { 0, 0, MUSIC(1, 0) };
896AreaBattle area1Battle4 = { 0, 0, MUSIC(1, 0) };
897AreaBattle area1Battle5 = { 0, 0, MUSIC(1, 0) };
898AreaBattle area1Battle6 = { 0, 0, MUSIC(1, 0) };
899AreaBattle area1Battle7 = { 0, 0, MUSIC(1, 0) };
905AreaBattle area2Battle0 = { 0, 0, MUSIC(1, 0) };
906AreaBattle area2Battle1 = { 0, 0, MUSIC(1, 0) };
907AreaBattle area2Battle2 = { 0, 0, MUSIC(1, 0) };
908AreaBattle area2Battle3 = { 0, 0, MUSIC(1, 0) };
909AreaBattle area2Battle4 = { 0, 0, MUSIC(1, 0) };
910AreaBattle area2Battle5 = { 0, 0, MUSIC(1, 0) };
911AreaBattle area2Battle6 = { 0, 0, MUSIC(1, 0) };
912AreaBattle area2Battle7 = { 0, 0, MUSIC(1, 0) };
919AreaBattle area3Battle1 = { 0, 0, MUSIC(1, 0) };
920AreaBattle area3Battle2 = { 0, 0, MUSIC(1, 0) };
921AreaBattle area3Battle3 = { 0, 0, MUSIC(1, 0) };
922AreaBattle area3Battle4 = { 0, 0, MUSIC(1, 0) };
923AreaBattle area3Battle5 = { 0, 0, MUSIC(1, 0) };
924AreaBattle area3Battle6 = { 0, 0, MUSIC(1, 0) };
925AreaBattle area3Battle7 = { 0, 0, MUSIC(1, 0) };
935 { 0x200, 0x100, 0x21C, 0x1A6, 0x70, 0xA6, 0x230, 0x1FE },
936 { 0x200, 0x100, 0x200, 0x100, 0, 0, 0x220, 0x1FE },
937 { 0x200, 0x100, 0x216, 0x138, 0x58, 0x38, 0x200, 0x1FD },
938 { 0x200, 0x100, 0x208, 0x1BC, 0x20, 0xBC, 0x210, 0x1FD },
939 { 0x200, 0x100, 0x210, 0x1BC, 0x40, 0xBC, 0x220, 0x1FD },
940 { 0x200, 0x100, 0x200, 0x1BC, 0, 0xBC, 0x230, 0x1FD },
941 { 0x140, 0x100, 0x176, 0x1A0, 0xD8, 0xA0, 0x160, 0x1F6 },
942 { 0x140, 0x100, 0x158, 0x1A8, 0x60, 0xA8, 0x160, 0x1F5 },
943 { 0x140, 0x100, 0x174, 0x150, 0xD0, 0x50, 0x170, 0x1F5 },
944 { 0x140, 0x100, 0x158, 0x180, 0x60, 0x80, 0x160, 0x1F4 },
945 { 0x140, 0x100, 0x160, 0x180, 0x80, 0x80, 0x170, 0x1F4 },
946 { 0x140, 0x100, 0x140, 0x198, 0, 0x98, 0x140, 0x1F3 },
947 { 0x140, 0x100, 0x178, 0x128, 0xE0, 0x28, 0x150, 0x1F3 },
948 { 0x140, 0x100, 0x148, 0x198, 0x20, 0x98, 0x160, 0x1F3 },
949 { 0x140, 0x100, 0x160, 0x1B8, 0x80, 0xB8, 0x170, 0x1F3 },
950 { 0x140, 0x100, 0x140, 0x1C0, 0, 0xC0, 0x140, 0x1F2 },
951 { 0x140, 0x100, 0x148, 0x1C0, 0x20, 0xC0, 0x150, 0x1F2 },
952 { 0x140, 0x100, 0x150, 0x1C0, 0x40, 0xC0, 0x160, 0x1F2 },
953 { 0x140, 0x100, 0x150, 0x198, 0x40, 0x98, 0x140, 0x1F1 },
954 { 0x140, 0x100, 0x170, 0x1C0, 0xC0, 0xC0, 0x150, 0x1F1 },
955 { 0x140, 0x100, 0x146, 0x1E0, 0x18, 0xE0, 0x160, 0x1F1 },
956 { 0x140, 0x100, 0x15C, 0x150, 0x70, 0x50, 0x170, 0x1F1 },
957};
965 { actor2Talk0Conditions, NULL, 0x2FE },
966 { actor2Talk1Conditions, NULL, 0x301 },
967 { NULL, NULL, 0 },
968};
970 { actor5Talk0Conditions, NULL, 0x2FD },
971 { actor5Talk1Conditions, NULL, 0x300 },
972 { NULL, NULL, 0 },
973};
975 { NULL, NULL, 0x337 },
976 { NULL, NULL, 0 },
977};
979 { NULL, NULL, 0x304 },
980 { NULL, NULL, 0 },
981};
983 { NULL, NULL, 0x339 },
984 { NULL, NULL, 0 },
985};
987 { actor19Talk0Conditions, NULL, 0x2FF },
988 { actor19Talk1Conditions, NULL, 0x302 },
989 { NULL, NULL, 0 },
990};
1027FieldActorEntry actor14 = { NULL, NULL, 0x9A, 0xD, 641, 350, 0 };
1028FieldActorEntry actor15 = { NULL, NULL, 0x9B, 0xE, 593, 325, 1 };
1029FieldActorEntry actor16 = { NULL, NULL, 0x9C, 0xF, 545, 301, 2 };
1030FieldActorEntry actor17 = { actor17Conditions, NULL, 0xC2, 0x10, 0, 0, 1 };
1031FieldActorEntry actor18 = { actor18Conditions, NULL, 0x13D, 0x11, 0, 0, 0 };
1033FieldActorEntry actor20 = { actor20Conditions, NULL, 0x14B, 0x12, 0, 0, 1 };
1034FieldActorEntry actor21 = { actor21Conditions, NULL, 0x14C, 0x13, 0, 0, 1 };
1036 &actor0,
1037 &actor1,
1038 &actor2,
1039 &actor3,
1040 &actor4,
1041 &actor5,
1042 &actor6,
1043 &actor7,
1044 &actor8,
1045 &actor9,
1046 &actor10,
1047 &actor11,
1048 &actor12,
1049 &actor13,
1050 &actor14,
1051 &actor15,
1052 &actor16,
1053 &actor17,
1054 &actor18,
1055 &actor19,
1056 &actor20,
1057 &actor21,
1058 NULL,
1059};
1061 { 0, 1, 0x40, 2, 0x3D, 0, 0, 0, 0, 0, 335, 351, 0, 0 },
1062 { 0, 2, 0x40, 2, 0x3E, 0, 0, 0, 0, 0, 345, 372, 0, 0 },
1063 { 0, 3, 0x40, 2, 0x3C, 0, 0, 0, 0, 0, 477, 356, 0, 0 },
1064 { 0, 4, 0x40, 2, 0x32, 0, 0, 0, 0, 0, 489, 350, 0, 0 },
1065 { 1, 0, 0x40, 2, 0x40, 2, 0, 3, 6, 0, 521, 212, 0, 0 },
1066 { 1, 0, 0x40, 2, 0x40, 2, 0, 3, 6, 0, 569, 236, 0, 0 },
1067 { 1, 0, 0x40, 2, 0x41, 2, 0, 3, 6, 0, 617, 260, 0, 0 },
1068 { 1, 0, 0x40, 2, 0x43, 2, 0, 5, 6, 0, 392, 163, 0, 0 },
1069 { 1, 0, 0x40, 2, 0x44, 2, 0, 5, 6, 0, 369, 205, 0, 0 },
1070 { 1, 0, 0x40, 6, 0x3F, 2, 0, 3, 6, 0, 360, 389, 0, 0 },
1071 { 1, 0, 0x40, 6, 0x42, 2, 0, 5, 6, 0, 361, 186, 0, 0 },
1072 { 1, 0, 0x40, 4, 0, 0, 0, 0, 0, 0, 377, 371, 399, 0 },
1073 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1074};
1076 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x254, 0x2D4, 0xC4, 7, 0, 0, 0 },
1077 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_CLIMB_DOWN, 5, 0x1D0, 0xF8, 0, 0, 0, 0 },
1078 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_CLIMB_UP, 5, 0x1E0, 0x150, 0, 0, 0, 0 },
1079 { { { CODES_END, 0 }, { CODES_END, 0 } }, 0, 0, 0, 0, 0, 0, 0, 0 },
1080};
1081void (*stageFuncs[])(void) = {
1082 setupStage,
1083};
1085 { 532, script532, EVENT_TEXT(0xF), NULL, endEvent532 },
1086 { 534, script534, EVENT_TEXT(0x10), NULL, endEvent534 },
1087 { 540, script540, EVENT_TEXT(0x16), NULL, endEvent540 },
1088 { 551, script551, EVENT_TEXT(0x17), NULL, endEvent551 },
1089 { -1, NULL, 0, NULL, NULL },
1090};
#define NULL
Definition common.h:17
signed int s32
Definition common.h:11
signed short s16
Definition common.h:9
unsigned short u16
Definition common.h:10
GfxState GFX
GFX: the graphics state and its methods.
Definition display.c:209
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 SOUND_DIGITAMA
Definition stage.h:747
#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 FIELD_COMMAND_PLAY_DEMO_BGM
Definition field_map.h:53
#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 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 FIELD_COMMAND_STOP_BEAM_HIT
Definition field_map.h:81
#define FIELD_COMMAND_PLAY_BEAM_HIT
Definition field_map.h:77
#define FIELD_COMMAND_PLAY_SWITCH02
Definition field_map.h:56
#define SCRIPT_WALK(id, x, y, dir)
Actor.setGoal: walks to (x, y), then faces dir.
Definition field_map.h:162
#define SCRIPT_WAIT_BOX
until box 0 closes
Definition field_map.h:167
#define SLOT_EXIT
The kinds of StageSlot (type).
Definition field_map.h:255
#define FIELD_COMMAND_PLAY_BEAM_SHT
Definition field_map.h:55
#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 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
SoundState SOUND
rsin and rcos (libgte) read rsin_tbl[a - 0x800] and the like: their addresses before the table fall i...
Definition sound.c:180
#define MUSIC_BATTLE
BATL0000: the maps' random battles (AreaBattle, nearly all of them)
Definition sound.h:76
#define MUSIC_SECRET_ROOM
BGM_0019: the Secret Room, the rebels' hideout.
Definition sound.h:95
#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,...
@ STORY_LUCKY_MOUSE
WSTAG615 (Sewers), event 531: Lucky Mouse appears (DM0531, "Lucky Mouse appears")
Definition story.h:82
@ STORY_BYAKKO_LEADER_FOUGHT
WSTAG620 (the rebels' hideout), event 534: the Byakko Leader takes the player for the A....
Definition story.h:85
@ STORY_STAFF_PASS
WSTAG620, event 551: Nick finds a Staff Pass for the player.
Definition story.h:87
#define FLAG_SECURITY_HOLE_SEEN
wstag525 event 550: Suzaku Leader shows the security hole behind the earthquake; set at its end,...
Definition story.h:1300
#define FLAG_KEITH_NICK_SEARCH_STARTED
wstag620 Secret Room: set after event 540; then Lisa says "Find Keith and Nick" and people in 10 stag...
Definition story.h:1188
#define SPECIAL_STORY_BYAKKO_LEADER_FOUGHT_TO_GAME_MASTER_CAUGHT
GAME.progress is from STORY_BYAKKO_LEADER_FOUGHT to STORY_GAME_MASTER_CAUGHT (PROGRESS_RANGES[3])
Definition story.h:1872
#define FLAG_PASS_CODE_SEARCH_SEEN
wstag620 event 540: Lisa sets Nick and Keith to look for a pass code in the computer; set at its end,...
Definition story.h:1408
#define FLAG_DATAMON_STAFF_PASS_TALKED
wstag325 Control Room: Datamon will open the basement gate only for a DO Staff Pass holder; set by th...
Definition story.h:1185
Where an actor's frames go in VRAM: one of the records after the FieldImage (Actor....
Definition field_map.h:114
One frame of a sprite animation; frame 0xFF ends it (or loops it)
Definition gfx.h:296
s16 frame
Definition gfx.h:297
s16 duration
Definition gfx.h:298
s16 index
Definition gfx.h:302
s16 timer
Definition gfx.h:303
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
s32(* getFrameTime)(void)
Definition gfx.h:32
GfxFuncs funcs
Definition gfx.h:77
short(* playSound)(s32 id)
returns the voice of a key-on
Definition sound.h:187
A step of a StageTileSeq: its animation, and the step after it ends.
Definition stage.h:258
AnimFrame * frames
Definition stage.h:259
s16 next
0: hide the map object
Definition stage.h:261
s16 once
play once, then go to next
Definition stage.h:260
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
StageTileSeq with a byte setFrame and a sound to play at frame 0x34.
Definition stage.h:244
StageTile * tile
Definition stage.h:248
u8 sound
1: play it, once
Definition stage.h:246
AnimState anim
Definition stage.h:249
StageTileSeq8 entries[4]
Definition stage.h:254
void(* nextState)(struct StageTileSeqs8 *task)
Definition stage.h:253
An object of a map, which FIELDSTG draws: a record of the table at FieldState.objects,...
Definition field_map.h:208
u8 anim
which of a stage's animations sets frame (1-3); FIELDSTG finds objects by it (its lift,...
Definition field_map.h:210
Definition gfx.h:352
void * createTaskWithId(void(*update)(), s32 size, s32 childrenSize, s32 id)
Allocates a zeroed task of size bytes (header included) with room for childrenSize / 4 child tasks.
Definition task.c:80
u16 actor1Conditions[]
Definition wstag620.c:992
AreaBattle area2Battle7
Definition wstag620.c:912
FieldActorEntry actor0
Definition wstag620.c:1013
void(* stageFuncs[])(void)
The stage's functions (common/start_stage.inc.c calls the first): a StageFuncs in the stages with a t...
Definition wstag620.c:1081
FieldActorEntry actor6
Definition wstag620.c:1019
u16 actor11Conditions[]
Definition wstag620.c:1002
FieldTalk actor2Talks[]
Definition wstag620.c:964
AreaBattle area2Battle6
Definition wstag620.c:911
AnimFrame updateTileSeqs8Steps_1_0[]
Definition wstag620.c:848
u16 actor2Talk1Conditions[]
Definition wstag620.c:959
s16 script532[]
Definition wstag620.c:221
void * createCommand849(s32 arg)
Command 849 of the event scripts: the map objects of event 532, at Lucky Mouse's hideout (updateTileS...
Definition wstag620.c:133
s32 stepTileAnimation(StageTileSeq8 *obj, AnimFrame *frames, s32 once, s32 depth)
stepTileAnimation (common/step_tile_animation.inc.c) for a StageTileSeq8: steps OBJ's animation throu...
Definition wstag620.c:17
AnimFrame updateTileSeqs8Steps_3[]
Definition wstag620.c:868
u16 actor10Conditions[]
Definition wstag620.c:1001
u16 actor18Conditions[]
Definition wstag620.c:1006
AnimFrame updateTileSeqs8Steps_0_2[]
Definition wstag620.c:843
FieldActorEntry actor17
Definition wstag620.c:1030
u16 actor5Talk0Conditions[]
Definition wstag620.c:960
void endEvent532(void)
After event 532, with Lucky Mouse, Lisa, Kail, General and Attacker: starts the stage's event battle ...
Definition wstag620.c:167
FieldActorEntry actor18
Definition wstag620.c:1031
FieldTalk actor5Talks[]
Definition wstag620.c:969
AreaBattle area1Battle6
Definition wstag620.c:898
FieldActorEntry actor5
Definition wstag620.c:1018
s16 script551[]
Definition wstag620.c:763
AreaBattle area0Battle7
Definition wstag620.c:886
FieldActorEntry actor2
Definition wstag620.c:1015
AreaBattle area3Battle4
Definition wstag620.c:922
AreaBattle area3Battle3
Definition wstag620.c:921
AreaBattle area0Battle1
Definition wstag620.c:880
FieldActorEntry actor19
Definition wstag620.c:1032
AreaBattle area2Battle0
Definition wstag620.c:905
u16 actor9Conditions[]
Definition wstag620.c:1000
FieldActorEntry * stageActors[]
Definition wstag620.c:1035
u16 actor19Talk0Conditions[]
Definition wstag620.c:962
AreaBattle area1Battle2
Definition wstag620.c:894
AreaBattle area3Battle0
Definition wstag620.c:918
AreaBattle area0Battle6
Definition wstag620.c:885
u16 actor13Conditions[]
Definition wstag620.c:1004
AreaBattle area3Battle2
Definition wstag620.c:920
AnimFrame updateTileSeqs8Steps_0_1[]
Definition wstag620.c:836
s16 script540[]
Definition wstag620.c:640
void updateTileSeqs8(StageTileSeqs8 *task)
Plays the steps of updateTileSeqs8Steps on the map objects with animations 1 to 4,...
Definition wstag620.c:49
AreaBattle area3Battle1
Definition wstag620.c:919
AreaBattle area0Battle3
Definition wstag620.c:882
FieldActorEntry actor10
Definition wstag620.c:1023
u16 actor19Conditions[]
Definition wstag620.c:1007
AnimFrame updateTileSeqs8Steps_2[]
Definition wstag620.c:861
u16 actor4Conditions[]
Definition wstag620.c:995
FieldActorEntry actor4
Definition wstag620.c:1017
u16 actor3Conditions[]
Definition wstag620.c:994
AreaBattle area3Battle6
Definition wstag620.c:924
void endEvent540(void)
After event 540, with Kail, Kurt and Lisa: lets event 550 of WSTAG525 start and keeps it from playing...
Definition wstag620.c:181
FieldActorEntry actor8
Definition wstag620.c:1021
StageSeqStep updateTileSeqs8Steps[4][4]
Defined below, after the code that uses them.
Definition wstag620.c:873
ActorImage stageImages[]
Definition wstag620.c:934
FieldTalk actor6Talks[]
Definition wstag620.c:974
AnimFrame updateTileSeqs8Steps_1_1[]
Definition wstag620.c:852
void setupStage(void)
Sets the stage up: its map, actors, battles and events, playing BGM_0019.
Definition wstag620.c:201
FieldTalk actor19Talks[]
Definition wstag620.c:986
AreaBattle area2Battle4
Definition wstag620.c:909
StageTile stageObjects[]
The tables and color setupStage gives FIELDSTG_state (FieldState)
Definition wstag620.c:1060
FieldActorEntry actor9
Definition wstag620.c:1022
u16 actor8Conditions[]
Definition wstag620.c:999
FieldActorEntry actor20
Definition wstag620.c:1033
u16 actor5Conditions[]
Definition wstag620.c:996
FieldTalk actor9Talks[]
Definition wstag620.c:982
BattleList area3Battles
Definition wstag620.c:926
AreaBattle area3Battle5
Definition wstag620.c:923
AreaBattle area0Battle5
Definition wstag620.c:884
BattleList area1Battles
Definition wstag620.c:900
AnimFrame updateTileSeqs8Steps_1_2[]
Definition wstag620.c:857
BattleList area2Battles
Definition wstag620.c:913
u16 actor2Talk0Conditions[]
Definition wstag620.c:958
FieldActorEntry actor15
Definition wstag620.c:1028
FieldActorEntry actor12
Definition wstag620.c:1025
FieldActorEntry actor16
Definition wstag620.c:1029
AreaBattle area1Battle4
Definition wstag620.c:896
AnimFrame updateTileSeqs8Steps_0_0[]
Definition wstag620.c:831
u16 actor6Conditions[]
Definition wstag620.c:997
AreaBattle area2Battle2
Definition wstag620.c:907
AreaBattle area1Battle5
Definition wstag620.c:897
FieldActorEntry actor7
Definition wstag620.c:1020
StageSlot stageSlots[]
Definition wstag620.c:1075
AreaBattle area2Battle1
Definition wstag620.c:906
u16 actor5Talk1Conditions[]
Definition wstag620.c:961
FieldActorEntry actor13
Definition wstag620.c:1026
AreaBattle area1Battle3
Definition wstag620.c:895
AreaBattle area1Battle0
Definition wstag620.c:892
FieldActorEntry actor11
Definition wstag620.c:1024
FieldActorEntry actor1
Definition wstag620.c:1014
FieldActorEntry actor21
Definition wstag620.c:1034
AreaBattle area0Battle0
Definition wstag620.c:879
void endEvent551(void)
After event 551, with Lisa, Keith, Nick and Kail: moves the story on to STORY_STAFF_PASS.
Definition wstag620.c:187
AreaBattle area0Battle2
Definition wstag620.c:881
#define STAGE_FILE
Definition wstag620.c:198
AreaBattle area2Battle5
Definition wstag620.c:910
u16 actor19Talk1Conditions[]
Definition wstag620.c:963
AreaBattle area1Battle1
Definition wstag620.c:893
u16 actor7Conditions[]
Definition wstag620.c:998
AreaBattle area2Battle3
Definition wstag620.c:908
u16 actor2Conditions[]
Definition wstag620.c:993
FieldTalk actor7Talks[]
Definition wstag620.c:978
u16 actor20Conditions[]
Definition wstag620.c:1011
AreaBattle area0Battle4
Definition wstag620.c:883
#define STAGE_TEXT
Definition wstag620.c:196
s16 script534[]
Definition wstag620.c:550
AreaBattle area3Battle7
Definition wstag620.c:925
u16 actor21Conditions[]
Definition wstag620.c:1012
BattleList area0Battles
Definition wstag620.c:887
AreaBattle area1Battle7
Definition wstag620.c:899
u16 actor17Conditions[]
Definition wstag620.c:1005
FieldActorEntry actor3
Definition wstag620.c:1016
FieldBattles stageBattles[]
Definition wstag620.c:931
void endEvent534(void)
After event 534, with Attacker, Lisa, Kail and Kurt: moves the story on to STORY_BYAKKO_LEADER_FOUGHT...
Definition wstag620.c:173
FieldActorEntry actor14
Definition wstag620.c:1027
FieldEvent stageEvents[]
Definition wstag620.c:1084
u16 actor12Conditions[]
Definition wstag620.c:1003
u16 actor0Conditions[]
Definition wstag620.c:991