Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
wstag205.c
Go to the documentation of this file.
1/*
2 * WSTAG205: Asuka Bridge, Central Sector.
3 */
4
5#include "common.h"
6#include "field/stage.h"
7/* Defined below, after the code that uses them */
8extern u8 *spriteFieldAnims[];
10
11/* The sprites, which the versions number differently */
12#if VERSION_US || VERSION_JP
13#define SPRITES 0x18B
14#elif VERSION_EU
15#define SPRITES 0x199
16#endif
17
18/* Plays the nine animations and draws the sprites of the table that are on screen */
20 SpriteDrawer drawer;
21 RECT rect;
22 Layer *layer;
23 s32 i;
24
25 switch (task->state) {
26 case TASK_INIT:
27 default:
28 task->nextState(task);
29 break;
30 case TASK_RUN:
31 initSpriteDrawer(&drawer);
32 drawer.setLayerId(FIELD_LAYER_MAP, 0xA);
33 drawer.setTexture(0x140, 0x100);
34 drawer.setAltClut(0, 0x1F0);
35 for (i = 0; i < 9; i++) {
36 task->anims[i].timer += GFX.funcs.getFrameTime();
37 for (;;) {
38 if (spriteFieldAnims[i][task->anims[i].index * 2] == 0) {
39 task->anims[i].index = 0;
40 }
41 if (spriteFieldAnims[i][task->anims[i].index * 2 + 1] >= task->anims[i].timer) {
42 break;
43 }
44 task->anims[i].timer -= spriteFieldAnims[i][task->anims[i].index * 2 + 1];
45 task->anims[i].index++;
46 }
47 task->anims[i].frame = spriteFieldAnims[i][task->anims[i].index * 2];
48 }
50 layer->getViewRect(layer, &rect);
51 rect.w += rect.x;
52 rect.h += rect.y;
53 for (i = 0;; i++) {
54 s32 x, y;
55
56 if (updateSpriteFieldSpots[i].x == 0) {
57 break;
58 }
61 if (x < rect.x - 0x40 || rect.w + 0x40 < x || y < rect.y - 0x40 || rect.h + 0x40 < y) {
62 continue;
63 }
64 if (!updateSpriteFieldSpots[i].flip) {
65 drawer.setScale(0x1000, 0x1000, 0x1000);
66 } else {
67 drawer.setPivot(x, y);
68 drawer.setScale(-0x1000, 0x1000, 0x1000);
69 }
70 drawer.draw(FILE_CACHE.getEntry(SPRITES << 16), task->anims[updateSpriteFieldSpots[i].anim].frame, x, y);
71 }
72 break;
73 case TASK_DONE:
74 case TASK_KILL:
75 break;
76 }
77}
78
79/* Creates the field of animated sprites (updateSpriteField); nothing in the game calls it */
80void *createSpriteField(void) {
82}
83
84/* Creates the event object of progress 6 when flag 0x4006 is set and 0x4016 is not */
85void updateStage(StageTask *task, void **children) {
86 switch (task->state) {
87 case TASK_INIT:
88 default:
90 children[0] = FIELDSTG_startEvent(0x65);
91 }
92 task->nextState(task);
93 break;
94 case TASK_RUN:
95 case TASK_DONE:
96 case TASK_KILL:
97 break;
98 }
99}
100
101#define STAGE_CHILDREN_SIZE 4
103
104/*
105 * After event 100, with Mystery Player and Keith: starts the stage's event
106 * battle 0 and keeps it from playing again
107 */
112
113/* After event 101, with Keith: keeps it from playing again */
117
118const CVECTOR stageColor = { 0x54, 0x67, 0x96, 0x00 };
119#if VERSION_US || VERSION_JP
120#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_05)
121#define EVENT_TEXT_FILE (TEXT_EVENTS_200 - 1)
122#define STAGE_FILE 0x18B
123#define STAGE_ARCHIVE 0x2B4
124#elif VERSION_EU
125#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_05)
126#define EVENT_TEXT_FILE (TEXT_EVENTS_200 - 1)
127#define STAGE_FILE 0x199
128#define STAGE_ARCHIVE 0x2C3
129#endif
130/*
131 * Sets the stage up: its map, actors, battles and events, playing ASKA_BGM;
132 * BGM_0029 instead at story steps 0x14 to 0x17 and 0x27 to 0x28
133 */
162
164 SCRIPT_FOLLOW(1, 2),
165 SCRIPT_WALK(2, 0x28F, 0x11F, 5),
166 SCRIPT_PLACE(0x66, 0x317, 0xDC),
167 SCRIPT_POSE(0x66, 1, 1),
170 SCRIPT_POSE(2, 1, 5),
171 SCRIPT_WAIT(6),
172 SCRIPT_WAIT(0x1E),
173 SCRIPT_WALK(2, 0x2CF, 0x101, 5),
175 SCRIPT_COMMAND(0x323, 0x325, 0x66),
176 SCRIPT_WAIT(0x3C),
177 SCRIPT_COMMAND(0x323, 0x326, 0x66),
178 SCRIPT_WAIT(0x1E),
179 SCRIPT_FOLLOW(0, 0x66),
180 SCRIPT_TALK(0, 1, 0x66, 2),
181 SCRIPT_POSE(0x66, 1, 1),
183 SCRIPT_WALK(0x66, 0x2EF, 0xF0, 1),
184 SCRIPT_WAIT_WALK(0x66),
185 SCRIPT_POSE(0x66, 1, 1),
186 SCRIPT_WAIT(0x1E),
187 SCRIPT_FOLLOW(0, 2),
188 SCRIPT_TALK(0, 2, 2, 1),
189 SCRIPT_POSE(2, 7, 5),
191 SCRIPT_POSE(2, 1, 5),
192 SCRIPT_WAIT(0x1E),
193 SCRIPT_TALK(0, 3, 0x66, 2),
195 SCRIPT_WAIT(0x1E),
196 SCRIPT_TALK(0, 4, 2, 1),
197 SCRIPT_POSE(2, 7, 5),
199 SCRIPT_POSE(2, 1, 5),
200 SCRIPT_WAIT(0x1E),
201 SCRIPT_TALK(0, 5, 0x66, 2),
203 SCRIPT_WAIT(0x1E),
204 SCRIPT_TALK(0, 6, 2, 1),
205 SCRIPT_POSE(2, 7, 5),
207 SCRIPT_POSE(2, 1, 5),
208 SCRIPT_WAIT(0x1E),
209 SCRIPT_TALK(0, 7, 0x66, 2),
211 SCRIPT_WAIT(0x1E),
212 SCRIPT_TALK(0, 8, 2, 1),
213 SCRIPT_POSE(2, 7, 5),
215 SCRIPT_WAIT(0x1E),
216 SCRIPT_TALK(0, 9, 0x66, 2),
218 SCRIPT_WAIT(0x1E),
220};
222 SCRIPT_PLACE(2, 0x2CF, 0x101),
223 SCRIPT_POSE(2, 1, 5),
224 SCRIPT_PLACE(0x66, 0x2EF, 0xF0),
225 SCRIPT_POSE(0x66, 1, 1),
226 SCRIPT_WAIT(0x78),
227 SCRIPT_TALK(0, 1, 2, 1),
228 SCRIPT_POSE(2, 7, 5),
230 SCRIPT_POSE(2, 1, 5),
231 SCRIPT_WAIT(0x1E),
232 SCRIPT_TALK(0, 2, 0x66, 2),
234 SCRIPT_WAIT(0x1E),
235 SCRIPT_TALK(0, 3, 2, 1),
236 SCRIPT_POSE(2, 7, 5),
238 SCRIPT_POSE(2, 1, 5),
239 SCRIPT_WAIT(0x1E),
240 SCRIPT_TALK(0, 4, 0x66, 2),
242 SCRIPT_WAIT(0x1E),
243 SCRIPT_WALK(0x66, 0x2CF, 0xF0, 2),
244 SCRIPT_WAIT_WALK(0x66),
245 SCRIPT_POSE(2, 1, 3),
246 SCRIPT_WALK(0x66, 0x2BF, 0xF8, 1),
247 SCRIPT_WAIT_WALK(0x66),
248 SCRIPT_POSE(2, 1, 1),
249 SCRIPT_WALK(0x66, 0x22E, 0x13F, 1),
250 SCRIPT_WAIT_WALK(0x66),
251 SCRIPT_TALK(0, 5, 2, 1),
252 SCRIPT_PLACE(0x66, 0, 0),
253 SCRIPT_POSE(0x66, 1, 0),
255 SCRIPT_WAIT(0x1E),
257};
259 0x32, 0x0A, 0x33, 0x0A, 0x34, 0x0A, 0x00, 0x00,
260};
262 0x35, 0x0A, 0x36, 0x0A, 0x37, 0x0A, 0x00, 0x00,
263};
265 0x38, 0x0A, 0x39, 0x0A, 0x3A, 0x0A, 0x00, 0x00,
266};
268 72, 6, 73, 6, 74, 6, 75, 6,
269 0, 0, 0, 0,
270};
272 62, 6, 63, 6, 64, 6, 0, 0,
273};
275 80, 4, 81, 4, 82, 4, 83, 4,
276 0, 0, 0, 0,
277};
279 76, 6, 77, 6, 78, 6, 79, 6,
280 0, 0, 0, 0,
281};
283 65, 6, 66, 6, 67, 6, 0, 0,
284};
286 84, 4, 85, 4, 86, 4, 87, 4,
287 0, 0, 0, 0,
288};
301 { 40, 0x1A5, 0, 0 },
302 { 56, 0x173, 0, 0 },
303 { 143, 0x106, 0, 0 },
304 { 0x126, 0x157, 0, 0 },
305 { 0x17D, 98, 0, 0 },
306 { 0x27C, 0x1AA, 0, 0 },
307 { 0x29F, 0x19B, 0, 0 },
308 { 0x2E7, 0x18A, 0, 0 },
309 { 0x36E, 0x1A8, 0, 0 },
310 { 0x4C2, 0x123, 0, 0 },
311 { 0x50D, 0x110, 0, 0 },
312 { 0x4AA, 0x12F, 0, 0 },
313 { 0x4C0, 0x166, 0, 0 },
314 { 0x46C, 0x177, 0, 0 },
315 { 0x4FE, 0x15E, 0, 0 },
316 { 0x50C, 0x163, 0, 0 },
317 { 0x4B3, 0x1E9, 0, 0 },
318 { 0x455, 0x1F5, 0, 0 },
319 { 0x462, 0x1CA, 0, 0 },
320 { 0x3D1, 0x1C7, 0, 0 },
321 { 0x347, 0x18F, 0, 0 },
322 { 0x31F, 0x191, 0, 0 },
323 { 0x22B, 229, 0, 0 },
324 { 0x1E8, 0x105, 0, 0 },
325 { 0x255, 0x1AB, 0, 0 },
326 { 0x20F, 0x1CF, 0, 0 },
327 { 0x1AE, 0x12A, 0, 0 },
328 { 0x177, 0x145, 0, 0 },
329 { 0x533, 0x18E, 0, 0 },
330 { 0x4E5, 0x1A5, 0, 0 },
331 { 8, 0x17D, 1, 0 },
332 { 31, 0x17B, 1, 0 },
333 { 64, 0x19E, 1, 0 },
334 { 87, 0x19C, 1, 0 },
335 { 125, 0x107, 1, 0 },
336 { 0x114, 0x158, 1, 0 },
337 { 0x120, 0x161, 1, 0 },
338 { 0x1A9, 62, 1, 0 },
339 { 0x1C9, 0x124, 1, 0 },
340 { 0x269, 0x1A9, 1, 0 },
341 { 0x277, 141, 1, 0 },
342 { 0x2B7, 0x194, 1, 0 },
343 { 0x2CE, 0x192, 1, 0 },
344 { 0x35C, 0x1A9, 1, 0 },
345 { 0x364, 0x1D2, 1, 0 },
346 { 0x3E3, 192, 1, 0 },
347 { 0x4D7, 0x11A, 1, 0 },
348 { 0x48E, 0x13D, 1, 0 },
349 { 0x4F0, 0x116, 1, 0 },
350 { 0x475, 0x14B, 1, 0 },
351 { 0x4A5, 0x171, 1, 0 },
352 { 0x48E, 0x170, 1, 0 },
353 { 0x52F, 0x156, 1, 0 },
354 { 0x516, 0x155, 1, 0 },
355 { 0x47F, 0x1E7, 1, 0 },
356 { 0x470, 0x1E4, 1, 0 },
357 { 0x3EB, 0x1BC, 1, 0 },
358 { 0x3CC, 0x1D5, 1, 0 },
359 { 0x315, 0x186, 1, 0 },
360 { 0x32F, 0x192, 1, 0 },
361 { 0x20A, 252, 1, 0 },
362 { 0x1F9, 0x105, 1, 0 },
363 { 0x222, 0x1D0, 1, 0 },
364 { 0x227, 0x1C5, 1, 0 },
365 { 0x196, 0x12F, 1, 0 },
366 { 0x180, 0x13E, 1, 0 },
367 { 0x51A, 0x19E, 1, 0 },
368 { 0x503, 0x198, 1, 0 },
369 { 34, 0x16F, 2, 0 },
370 { 50, 0x19D, 2, 0 },
371 { 90, 0x190, 2, 0 },
372 { 137, 0x110, 2, 0 },
373 { 0x179, 107, 2, 0 },
374 { 0x19A, 59, 2, 0 },
375 { 0x1BC, 0x122, 2, 0 },
376 { 0x230, 0x1C4, 2, 0 },
377 { 0x26A, 139, 2, 0 },
378 { 0x2A9, 0x193, 2, 0 },
379 { 0x2D1, 0x186, 2, 0 },
380 { 0x357, 0x1D0, 2, 0 },
381 { 0x368, 0x1B2, 2, 0 },
382 { 0x3D6, 190, 2, 0 },
383 { 0x4F7, 0x11D, 2, 0 },
384 { 0x45B, 0x151, 2, 0 },
385 { 0x4AF, 0x162, 2, 0 },
386 { 0x478, 0x169, 2, 0 },
387 { 0x528, 0x145, 2, 0 },
388 { 0x521, 0x164, 2, 0 },
389 { 0x494, 0x1E7, 2, 0 },
390 { 0x466, 0x1F5, 2, 0 },
391 { 0x3F3, 0x1C3, 2, 0 },
392 { 0x3E1, 0x1D0, 2, 0 },
393 { 0x330, 0x186, 2, 0 },
394 { 0x304, 0x191, 2, 0 },
395 { 0x21A, 252, 2, 0 },
396 { 0x21F, 243, 2, 0 },
397 { 0x246, 0x1B5, 2, 0 },
398 { 0x240, 0x1C4, 2, 0 },
399 { 0x182, 0x135, 2, 0 },
400 { 0x17A, 0x14C, 2, 0 },
401 { 0x517, 0x194, 2, 0 },
402 { 0x4F5, 0x195, 2, 0 },
403 { 37, 0x109, 3, 0 },
404 { 77, 0x11D, 3, 0 },
405 { 117, 0x132, 3, 0 },
406 { 157, 0x146, 3, 0 },
407 { 197, 0x159, 3, 0 },
408 { 237, 0x16C, 3, 0 },
409 { 0x115, 0x181, 3, 0 },
410 { 0x1DF, 0x1E6, 3, 0 },
411 { 0x206, 0x1F9, 3, 0 },
412 { 36, 0x124, 4, 0 },
413 { 76, 0x138, 4, 0 },
414 { 116, 0x14D, 4, 0 },
415 { 156, 0x161, 4, 0 },
416 { 196, 0x174, 4, 0 },
417 { 236, 0x187, 4, 0 },
418 { 0x1DE, 0x203, 4, 0 },
419 { 0x205, 0x214, 4, 0 },
420 { 0x266, 92, 4, 1 },
421 { 28, 0x153, 5, 0 },
422 { 68, 0x167, 5, 0 },
423 { 108, 0x17C, 5, 0 },
424 { 148, 0x190, 5, 0 },
425 { 188, 0x1A3, 5, 0 },
426 { 228, 0x1B6, 5, 0 },
427 { 0x1D5, 0x232, 5, 0 },
428 { 0x1FD, 0x244, 5, 0 },
429 { 0x26D, 124, 5, 1 },
430 { 0x3AE, 206, 6, 0 },
431 { 0x1D5, 110, 6, 1 },
432 { 0x3AF, 255, 7, 0 },
433 { 0x1D5, 137, 7, 1 },
434 { 0x3EC, 164, 8, 0 },
435 { 0x196, 48, 8, 1 },
436 { 0x1DC, 160, 8, 1 },
437 { 0, 0, 0, 0 },
438};
439AreaBattle area0Battle0 = { 0, 0, MUSIC(1, 0) };
440AreaBattle area0Battle1 = { 0, 0, MUSIC(1, 0) };
441AreaBattle area0Battle2 = { 0, 0, MUSIC(1, 0) };
442AreaBattle area0Battle3 = { 0, 0, MUSIC(1, 0) };
443AreaBattle area0Battle4 = { 0, 0, MUSIC(1, 0) };
444AreaBattle area0Battle5 = { 0, 0, MUSIC(1, 0) };
445AreaBattle area0Battle6 = { 0, 0, MUSIC(1, 0) };
446AreaBattle area0Battle7 = { 0, 0, MUSIC(1, 0) };
452AreaBattle area1Battle0 = { 0, 0, MUSIC(1, 0) };
453AreaBattle area1Battle1 = { 0, 0, MUSIC(1, 0) };
454AreaBattle area1Battle2 = { 0, 0, MUSIC(1, 0) };
455AreaBattle area1Battle3 = { 0, 0, MUSIC(1, 0) };
456AreaBattle area1Battle4 = { 0, 0, MUSIC(1, 0) };
457AreaBattle area1Battle5 = { 0, 0, MUSIC(1, 0) };
458AreaBattle area1Battle6 = { 0, 0, MUSIC(1, 0) };
459AreaBattle area1Battle7 = { 0, 0, MUSIC(1, 0) };
465AreaBattle area2Battle0 = { 0, 0, MUSIC(1, 0) };
466AreaBattle area2Battle1 = { 0, 0, MUSIC(1, 0) };
467AreaBattle area2Battle2 = { 0, 0, MUSIC(1, 0) };
468AreaBattle area2Battle3 = { 0, 0, MUSIC(1, 0) };
469AreaBattle area2Battle4 = { 0, 0, MUSIC(1, 0) };
470AreaBattle area2Battle5 = { 0, 0, MUSIC(1, 0) };
471AreaBattle area2Battle6 = { 0, 0, MUSIC(1, 0) };
472AreaBattle area2Battle7 = { 0, 0, MUSIC(1, 0) };
479AreaBattle area3Battle1 = { 0, 0, MUSIC(1, 0) };
480AreaBattle area3Battle2 = { 0, 0, MUSIC(1, 0) };
481AreaBattle area3Battle3 = { 0, 0, MUSIC(1, 0) };
482AreaBattle area3Battle4 = { 0, 0, MUSIC(1, 0) };
483AreaBattle area3Battle5 = { 0, 0, MUSIC(1, 0) };
484AreaBattle area3Battle6 = { 0, 0, MUSIC(1, 0) };
485AreaBattle area3Battle7 = { 0, 0, MUSIC(1, 0) };
495 { 0x200, 0x100, 0x21C, 0x1A6, 0x70, 0xA6, 0x230, 0x1FE },
496 { 0x200, 0x100, 0x200, 0x100, 0, 0, 0x220, 0x1FE },
497 { 0x200, 0x100, 0x216, 0x138, 0x58, 0x38, 0x200, 0x1FD },
498 { 0x200, 0x100, 0x208, 0x1BC, 0x20, 0xBC, 0x210, 0x1FD },
499 { 0x200, 0x100, 0x210, 0x1BC, 0x40, 0xBC, 0x220, 0x1FD },
500 { 0x200, 0x100, 0x200, 0x1BC, 0, 0xBC, 0x230, 0x1FD },
501 { 0x140, 0x100, 0x168, 0x184, 0xA0, 0x84, 0x150, 0x1FF },
502 { 0x180, 0x100, 0x180, 0x144, 0x100, 0x44, 0x160, 0x1FF },
503 { 0x180, 0x100, 0x188, 0x144, 0x120, 0x44, 0x170, 0x1FF },
504 { 0x180, 0x100, 0x1B2, 0x1CA, 0x1C8, 0xCA, 0x140, 0x1FE },
505 { 0x180, 0x100, 0x190, 0x148, 0x140, 0x48, 0x150, 0x1FE },
506 { 0x1C0, 0x100, 0x1EA, 0x118, 0x2A8, 0x18, 0x160, 0x1FE },
507 { 0x1C0, 0x100, 0x1F2, 0x118, 0x2C8, 0x18, 0x170, 0x1FE },
508};
517 { NULL, actor0Talk0Actions, 0x44C },
518 { NULL, NULL, 0 },
519};
521 { NULL, NULL, 0x2DB },
522 { NULL, NULL, 0 },
523};
525 { NULL, NULL, 0x2DC },
526 { NULL, NULL, 0 },
527};
529 { NULL, NULL, 0x2DD },
530 { NULL, NULL, 0 },
531};
533 { NULL, NULL, 0x2DE },
534 { NULL, NULL, 0 },
535};
537 { NULL, NULL, 0x2E4 },
538 { NULL, NULL, 0 },
539};
541 { NULL, NULL, 0x2E0 },
542 { NULL, NULL, 0 },
543};
545 { NULL, NULL, 0x2E1 },
546 { NULL, NULL, 0 },
547};
549 { NULL, NULL, 0x2E2 },
550 { NULL, NULL, 0 },
551};
553 { NULL, NULL, 0x1A },
554 { NULL, NULL, 0 },
555};
557 { NULL, NULL, 0x1B },
558 { NULL, NULL, 0 },
559};
561 { NULL, NULL, 0x2E5 },
562 { NULL, NULL, 0 },
563};
565 { NULL, NULL, 0x2E7 },
566 { NULL, NULL, 0 },
567};
569 { NULL, NULL, 0x2E6 },
570 { NULL, NULL, 0 },
571};
573 { NULL, NULL, 0x2E8 },
574 { NULL, NULL, 0 },
575};
577 { NULL, NULL, 0x2EE },
578 { NULL, NULL, 0 },
579};
581 { NULL, NULL, 0x2EA },
582 { NULL, NULL, 0 },
583};
585 { NULL, NULL, 0x2EB },
586 { NULL, NULL, 0 },
587};
589 { NULL, NULL, 0x2EC },
590 { NULL, NULL, 0 },
591};
593 { NULL, actor20Talk0Actions, 0x50 },
594 { NULL, NULL, 0 },
595};
597 { NULL, NULL, 0x2E3 },
598 { NULL, NULL, 0 },
599};
601 { NULL, NULL, 0x2ED },
602 { NULL, NULL, 0 },
603};
655FieldActorEntry actor19 = { actor19Conditions, NULL, 0x66, 7, 792, 221, 1 };
660 &actor0,
661 &actor1,
662 &actor2,
663 &actor3,
664 &actor4,
665 &actor5,
666 &actor6,
667 &actor7,
668 &actor8,
669 &actor9,
670 &actor10,
671 &actor11,
672 &actor12,
673 &actor13,
674 &actor14,
675 &actor15,
676 &actor16,
677 &actor17,
678 &actor18,
679 &actor19,
680 &actor20,
681 &actor21,
682 &actor22,
683 NULL,
684};
686 { 1, 0, 0x80, 2, 0, 0, 0, 0, 0, 0, 384, 384, 0, 0 },
687 { 1, 0, 0x40, 2, 1, 0, 0, 0, 0, 0, 128, 475, 0, 0 },
688 { 1, 0, 0x40, 2, 2, 0, 0, 0, 0, 0, 240, 499, 0, 0 },
689 { 1, 0, 0x40, 2, 3, 0, 0, 0, 0, 0, 252, 384, 0, 0 },
690 { 1, 0, 0x80, 2, 4, 0, 0, 0, 0, 0, 512, 307, 0, 0 },
691 { 1, 0, 0x40, 2, 5, 0, 0, 0, 0, 0, 496, 371, 0, 0 },
692 { 1, 0, 0x40, 2, 6, 0, 0, 0, 0, 0, 248, 352, 0, 0 },
693 { 1, 0, 0x40, 2, 0x10, 0, 0, 0, 0, 0, 104, 512, 0, 0 },
694 { 1, 0, 0x80, 2, 7, 0, 0, 0, 0, 0, 896, 128, 0, 0 },
695 { 1, 0, 0x80, 2, 8, 0, 0, 0, 0, 0, 256, 384, 0, 0 },
696 { 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x34, 0xA, 0, 8, 460, 0, 0 },
697 { 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x34, 0xA, 0, 11, 459, 0, 0 },
698 { 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x34, 0xA, 0, 22, 447, 0, 0 },
699 { 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x34, 0xA, 0, 142, 254, 0, 0 },
700 { 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x34, 0xA, 0, 344, 345, 0, 0 },
701 { 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x34, 0xA, 0, 410, 192, 0, 0 },
702 { 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x34, 0xA, 0, 417, 596, 0, 0 },
703 { 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x34, 0xA, 0, 507, 261, 0, 0 },
704 { 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x34, 0xA, 0, 606, 427, 0, 0 },
705 { 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x34, 0xA, 0, 680, 401, 0, 0 },
706 { 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x34, 0xA, 0, 712, 393, 0, 0 },
707 { 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x34, 0xA, 0, 985, 188, 0, 0 },
708 { 1, 0, 0x40, 6, 0x35, 1, 0x35, 0x37, 0xA, 0, 37, 451, 0, 0 },
709 { 1, 0, 0x40, 6, 0x35, 1, 0x35, 0x37, 0xA, 0, 357, 335, 0, 0 },
710 { 1, 0, 0x40, 6, 0x35, 1, 0x35, 0x37, 0xA, 0, 444, 299, 0, 0 },
711 { 1, 0, 0x40, 6, 0x35, 1, 0x35, 0x37, 0xA, 0, 457, 287, 0, 0 },
712 { 1, 0, 0x40, 6, 0x35, 1, 0x35, 0x37, 0xA, 0, 540, 244, 0, 0 },
713 { 1, 0, 0x40, 6, 0x35, 1, 0x35, 0x37, 0xA, 0, 554, 453, 0, 0 },
714 { 1, 0, 0x40, 6, 0x35, 1, 0x35, 0x37, 0xA, 0, 782, 396, 0, 0 },
715 { 1, 0, 0x40, 6, 0x35, 1, 0x35, 0x37, 0xA, 0, 817, 391, 0, 0 },
716 { 1, 0, 0x40, 6, 0x35, 1, 0x35, 0x37, 0xA, 0, 942, 475, 0, 0 },
717 { 1, 0, 0x40, 6, 0x35, 1, 0x35, 0x37, 0xA, 0, 990, 449, 0, 0 },
718 { 1, 0, 0x40, 6, 0x35, 1, 0x35, 0x37, 0xA, 0, 1109, 334, 0, 0 },
719 { 1, 0, 0x40, 6, 0x35, 1, 0x35, 0x37, 0xA, 0, 1122, 488, 0, 0 },
720 { 1, 0, 0x40, 6, 0x35, 1, 0x35, 0x37, 0xA, 0, 1250, 276, 0, 0 },
721 { 1, 0, 0x40, 6, 0x38, 1, 0x38, 0x3A, 0xA, 0, 102, 206, 0, 0 },
722 { 1, 0, 0x40, 6, 0x38, 1, 0x38, 0x3A, 0xA, 0, 113, 248, 0, 0 },
723 { 1, 0, 0x40, 6, 0x38, 1, 0x38, 0x3A, 0xA, 0, 416, 303, 0, 0 },
724 { 1, 0, 0x40, 6, 0x38, 1, 0x38, 0x3A, 0xA, 0, 422, 57, 0, 0 },
725 { 1, 0, 0x40, 6, 0x38, 1, 0x38, 0x3A, 0xA, 0, 574, 418, 0, 0 },
726 { 1, 0, 0x40, 6, 0x38, 1, 0x38, 0x3A, 0xA, 0, 633, 141, 0, 0 },
727 { 1, 0, 0x40, 6, 0x38, 1, 0x38, 0x3A, 0xA, 0, 654, 397, 0, 0 },
728 { 1, 0, 0x40, 6, 0x38, 1, 0x38, 0x3A, 0xA, 0, 887, 427, 0, 0 },
729 { 1, 0, 0x40, 6, 0x38, 1, 0x38, 0x3A, 0xA, 0, 928, 444, 0, 0 },
730 { 1, 0, 0x40, 6, 0x38, 1, 0x38, 0x3A, 0xA, 0, 1034, 516, 0, 0 },
731 { 1, 0, 0x40, 6, 0x38, 1, 0x38, 0x3A, 0xA, 0, 1181, 488, 0, 0 },
732 { 1, 0, 0x40, 6, 0x3B, 1, 0x3B, 0x3D, 0xA, 0, 168, 451, 0, 0 },
733 { 1, 0, 0x40, 6, 0x3B, 1, 0x3B, 0x3D, 0xA, 0, 392, 601, 0, 0 },
734 { 1, 0, 0x40, 6, 0x3B, 1, 0x3B, 0x3D, 0xA, 0, 440, 70, 0, 0 },
735 { 1, 0, 0x40, 6, 0x3B, 1, 0x3B, 0x3D, 0xA, 0, 440, 555, 0, 0 },
736 { 1, 0, 0x40, 6, 0x3B, 1, 0x3B, 0x3D, 0xA, 0, 510, 455, 0, 0 },
737 { 1, 0, 0x40, 6, 0x3B, 1, 0x3B, 0x3D, 0xA, 0, 1085, 507, 0, 0 },
738 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 44, 434, 0, 0 },
739 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 381, 116, 0, 0 },
740 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 397, 206, 0, 0 },
741 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 415, 603, 0, 0 },
742 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 479, 284, 0, 0 },
743 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 541, 258, 0, 0 },
744 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 545, 250, 0, 0 },
745 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 555, 460, 0, 0 },
746 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 711, 403, 0, 0 },
747 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 781, 404, 0, 0 },
748 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 843, 392, 0, 0 },
749 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 977, 194, 0, 0 },
750 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 985, 457, 0, 0 },
751 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 1114, 365, 0, 0 },
752 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 1144, 486, 0, 0 },
753 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 1218, 456, 0, 0 },
754 { 1, 0, 0x40, 6, 0x50, 1, 0x50, 0x53, 4, 0, 30, 340, 0, 0 },
755 { 1, 0, 0x40, 6, 0x50, 1, 0x50, 0x53, 4, 0, 70, 360, 0, 0 },
756 { 1, 0, 0x40, 6, 0x50, 1, 0x50, 0x53, 4, 0, 110, 380, 0, 0 },
757 { 1, 0, 0x40, 6, 0x50, 1, 0x50, 0x53, 4, 0, 150, 400, 0, 0 },
758 { 1, 0, 0x40, 6, 0x50, 1, 0x50, 0x53, 4, 0, 190, 420, 0, 0 },
759 { 1, 0, 0x40, 6, 0x50, 1, 0x50, 0x53, 4, 0, 470, 560, 0, 0 },
760 { 1, 0, 0x40, 6, 0x50, 1, 0x50, 0x53, 4, 0, 510, 580, 0, 0 },
761 { 1, 0, 0x40, 6, 0x58, 1, 0x58, 0x5B, 4, 0, 585, 125, 0, 0 },
762 { 1, 0, 0x40, 6, 0x5C, 1, 0x5C, 0x5F, 4, 0, 363, 49, 0, 0 },
763 { 1, 0, 0x40, 6, 0x5C, 1, 0x5C, 0x5F, 4, 0, 435, 161, 0, 0 },
764 { 1, 0, 0x40, 6, 0x54, 1, 0x54, 0x57, 4, 0, 1009, 162, 0, 0 },
765 { 1, 0x64, 0x80, 6, 9, 0, 0, 0, 0, 0, 758, 96, 0, 0 },
766 { 1, 0, 0x40, 0xA, 0x2F, 1, 0x2F, 0x31, 6, 0, 943, 296, 0, 0 },
767 { 1, 0, 0x40, 0xA, 0x2F, 1, 0x2F, 0x31, 6, 0, 1019, 140, 0, 0 },
768 { 1, 0, 0x40, 0xA, 0x42, 1, 0x42, 0x44, 6, 0, 582, 78, 0, 0 },
769 { 1, 0, 0x40, 0xA, 0x45, 1, 0x45, 0x47, 6, 0, 358, 18, 0, 0 },
770 { 1, 0, 0x40, 0xA, 0x48, 1, 0x48, 0x4B, 6, 0, 37, 267, 0, 0 },
771 { 1, 0, 0x40, 0xA, 0x48, 1, 0x48, 0x4B, 6, 0, 77, 287, 0, 0 },
772 { 1, 0, 0x40, 0xA, 0x48, 1, 0x48, 0x4B, 6, 0, 117, 307, 0, 0 },
773 { 1, 0, 0x40, 0xA, 0x48, 1, 0x48, 0x4B, 6, 0, 157, 327, 0, 0 },
774 { 1, 0, 0x40, 0xA, 0x48, 1, 0x48, 0x4B, 6, 0, 196, 347, 0, 0 },
775 { 1, 0, 0x40, 0xA, 0x48, 1, 0x48, 0x4B, 6, 0, 236, 367, 0, 0 },
776 { 1, 0, 0x40, 0xA, 0x48, 1, 0x48, 0x4B, 6, 0, 276, 387, 0, 0 },
777 { 1, 0, 0x40, 0xA, 0x48, 1, 0x48, 0x4B, 6, 0, 477, 487, 0, 0 },
778 { 1, 0, 0x40, 0xA, 0x48, 1, 0x48, 0x4B, 6, 0, 517, 507, 0, 0 },
779 { 1, 0, 0x40, 0xA, 0x50, 1, 0x50, 0x53, 4, 0, 230, 440, 0, 0 },
780 { 1, 0, 0x40, 0xA, 0x60, 1, 0x60, 0x63, 6, 0, 422, 110, 0, 0 },
781 { 1, 0, 0x40, 0xA, 0x4C, 1, 0x4C, 0x4F, 6, 0, 942, 205, 0, 0 },
782 { 1, 0, 0x40, 4, 0xA, 0, 0, 0, 0, 0, 224, 177, 200, 0 },
783 { 1, 0, 0x40, 4, 0xB, 0, 0, 0, 0, 0, 600, 214, 273, 0 },
784 { 1, 0, 0x40, 4, 0xC, 0, 0, 0, 0, 0, 1046, 371, 407, 0 },
785 { 1, 0, 0x40, 4, 0xD, 0, 0, 0, 0, 0, 1062, 315, 337, 0 },
786 { 1, 0, 0x40, 4, 0xE, 0, 0, 0, 0, 0, 902, 275, 295, 0 },
787 { 1, 0, 0x40, 4, 0xF, 0, 0, 0, 0, 0, 846, 177, 226, 0 },
788 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
789};
791 { { { SPECIAL_STORY_BYAKKO_LEADER_FOUGHT_TO_GAME_MASTER_CAUGHT, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x200, 0x60, 0x31C, 5, 0x64, 0, 0 },
792 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x21D, 0x5E2, 0xE0, 1, 0, 0, 0 },
793 { { { SPECIAL_STORY_SINCE_DE_SINCERITY, 1 }, { CODES_END, 0 } }, SLOT_WARP0, 0x2E1, 0x1D0, 0x154, 7, 0, 2, 1 },
794 { { { SPECIAL_STORY_SINCE_DE_SINCERITY, 1 }, { CODES_END, 0 } }, SLOT_WARP0, 0x2E1, 0xE0, 0x110, 7, 0, 2, 1 },
795 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_CLIMB_UP, 3, 0x110, 0x100, 0, 0, 0, 0 },
796 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_CLIMB_DOWN, 3, 0x120, 0xC8, 0, 0, 0, 0 },
797 { { { PROGRESS(STORY_FAKE_BLUE_CARD), 1 }, { FLAG_KEITH_BRIDGE_WIN_SEEN, 0 } }, SLOT_EVENT, 0x64, 0, 0, 0, 0, 0, 0 },
798 { { { CODES_END, 0 }, { CODES_END, 0 } }, 0, 0, 0, 0, 0, 0, 0, 0 },
799};
800void (*stageFuncs[])(void) = {
802};
804 { 100, script100, EVENT_TEXT(0x15), NULL, endEvent100 },
805 { 101, script101, EVENT_TEXT(0x16), NULL, endEvent101 },
806 { -1, NULL, 0, NULL, NULL },
807};
#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
unsigned char u8
Definition common.h:8
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 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 FIELD_LAYER_MAP
the map, its objects and characters, and the menus
Definition field_map.h:20
#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 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
FileCache FILE_CACHE
The file cache.
Definition file_cache.c:7
#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 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(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
#define MUSIC_BOSS_1
BOSS_001: the Digimon Arena's, the cities', the dungeons' and the A.o.A's boss battles.
Definition sound.h:109
void initSpriteDrawer(SpriteDrawer *obj)
Clears a sprite drawer to neutral (no scale, gray tint, follows the scroll), gives it its methods and...
FIELDSTG's start of the stage (StageEntry.init in FIELDSTG_stages): the stage's task,...
#define SPECIAL_STORY_JUNGLE_SOUND_TO_AMATERASU_BRIDGE
GAME.progress is from STORY_JUNGLE_SOUND to STORY_AMATERASU_BRIDGE (PROGRESS_RANGES[0x12])
Definition story.h:1917
@ 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_SEPIKMON_MASK_LOST
WSTAG480 (Jungle Grave), event 171: Sepikmon will say how to beat Zanbamon once the player finds his ...
Definition story.h:49
@ STORY_GUNSLINGER
WSTAG810 (Gunslinger 1F), event 1035.
Definition story.h:143
@ STORY_GENJI_BEATEN
WSTAG200, event 52: after the first battle, won against Tamer Genji (event 50), the Digimon Navi give...
Definition story.h:36
@ STORY_KNIGHTMON_REPROGRAMMED
WSTAG210 (Main Lobby, Asuka City), event 685: the A.o.A have reprogrammed Knightmon,...
Definition story.h:97
@ STORY_TEDDY_FOUND
WSTAG212, event 352: Teddy is found; MAGAMI is part of the A.o.A, and the player sets off to beat the...
Definition story.h:67
@ STORY_LOOKING_FOR_TEDDY
WSTAG212, event 273: Kail and the player will put on the Agumon Suits to look for Teddy.
Definition story.h:61
@ STORY_MOVIE_BATTLES
WSTAG820, event 1080, with Snatchmon: each encounter plays MODE_BATTLE_MOVIE first.
Definition story.h:146
@ STORY_ASUKA_HEADQUARTERS
WSTAG310 (A.o.A Headquarters, Asuka City), event 961.
Definition story.h:138
@ STORY_FAKE_BLUE_CARD
WSTAG410 (East Station), event 90: the Blue Card the player was given turns out to be a fake.
Definition story.h:42
#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_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_BARONMON_SEPIKMON_TALKED
wstag375 Protocol Ruins: Baronmon says Sepikmon had his mask and was last seen in Asuka City; Asuka t...
Definition story.h:1067
#define FLAG_ASUKA_BRIDGE_IRON_GLOVE_FOUND
wstag205: chest that gives the Iron Glove, "I got" text; its conditions test it 0
Definition story.h:194
#define SPECIAL_STORY_DE_SINCERITY_TO_LISA_SAVED
GAME.progress is from STORY_DE_SINCERITY to STORY_LISA_SAVED (PROGRESS_RANGES[0xF])
Definition story.h:1908
#define SPECIAL_STORY_SEIRYU_BADGE_TO_ZANBAMON_DRIVEN_OFF
GAME.progress is from STORY_SEIRYU_BADGE to STORY_ZANBAMON_DRIVEN_OFF (PROGRESS_RANGES[0xE])
Definition story.h:1905
#define SPECIAL_STORY_ASUKA_HEADQUARTERS_TO_GUNSLINGER
GAME.progress is from STORY_ASUKA_HEADQUARTERS to 0x2A (PROGRESS_RANGES[5]); nothing sets 0x2A,...
Definition story.h:1878
#define FLAG_KEITH_BRIDGE_WIN_SEEN
wstag205 event 100: the player beats Keith on Asuka Bridge; set at its end, tested 0 to start it and ...
Definition story.h:1306
#define FLAG_BRIDGE_SEPIKMON_TALKED
wstag205 Asuka Bridge: a "Sepikmon" boasts he found his mask and won't help; then Etemon says Sepikmo...
Definition story.h:1070
#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
#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 FLAG_ETEMON_MASK_QUESTION_SEEN
wstag205 event 101: the player asks Etemon about Sepikmon's mask and he runs; set at its end,...
Definition story.h:1339
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 *(* getEntry)(u32 fileAndIndex)
Definition file.h:96
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
struct Layer *(* getLayer)(s32 id)
Definition gfx.h:28
GfxFuncs funcs
Definition gfx.h:77
A drawing layer (GFX.funcs.createLayer): a DRAWENV with a pair of ordering tables,...
Definition gfx.h:128
void(* getViewRect)()
Definition gfx.h:151
Draws sprites from a sprite sheet (such as file 0x277, the menu graphics): a sheet has a table of fra...
Definition gfx.h:223
void(* setAltClut)()
(x, y)
Definition gfx.h:243
void(* setPivot)()
(x, y)
Definition gfx.h:250
void(* setScale)()
(x, y, z), ONE = 1.0
Definition gfx.h:248
void(* setLayerId)()
(id, depth)
Definition gfx.h:244
void(* draw)()
(sheet, frame, x, y)
Definition gfx.h:246
void(* setTexture)()
(x, y)
Definition gfx.h:242
s32 timer
counts up
Definition stage.h:648
What the player can trigger on a map (FIELDSTG_updateTriggers): a record of the table at FieldState....
Definition field_map.h:276
The animations of sprites drawn all over the stage.
Definition stage.h:652
void(* nextState)(struct StageSpriteField *task)
Definition stage.h:653
StageBytePlay anims[10]
nine used
Definition stage.h:654
A sprite of the stage: where, which animation, and flipped.
Definition stage.h:658
s16 x
0 ends the table
Definition stage.h:659
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 * createTask(void(*update)(), s32 size, s32 childrenSize)
createTaskWithId for a task nothing needs to find
Definition task.c:105
u16 actor1Conditions[]
Definition wstag205.c:605
u16 actor0Talk0Actions[]
Definition wstag205.c:509
AreaBattle area2Battle7
Definition wstag205.c:472
FieldActorEntry actor0
Definition wstag205.c:636
void(* stageFuncs[])(void)
The stage's functions (common/start_stage.inc.c calls the first): a StageFuncs in the stages with a t...
Definition wstag205.c:800
FieldActorEntry actor6
Definition wstag205.c:642
u16 actor11Conditions[]
Definition wstag205.c:615
FieldTalk actor2Talks[]
Definition wstag205.c:524
AreaBattle area2Battle6
Definition wstag205.c:471
u8 spriteFieldAnims_1[]
Definition wstag205.c:261
u8 * spriteFieldAnims[]
Defined below, after the code that uses them.
Definition wstag205.c:289
u16 actor10Conditions[]
Definition wstag205.c:614
u16 actor18Conditions[]
Definition wstag205.c:622
FieldActorEntry actor17
Definition wstag205.c:653
s16 script100[]
Definition wstag205.c:163
FieldTalk actor14Talks[]
Definition wstag205.c:572
FieldActorEntry actor18
Definition wstag205.c:654
FieldTalk actor5Talks[]
Definition wstag205.c:536
AreaBattle area1Battle6
Definition wstag205.c:458
FieldActorEntry actor5
Definition wstag205.c:641
u8 spriteFieldAnims_0[]
Definition wstag205.c:258
u16 actor22Conditions[]
Definition wstag205.c:635
AreaBattle area0Battle7
Definition wstag205.c:446
FieldActorEntry actor2
Definition wstag205.c:638
#define SPRITES
The sprites, which the versions number differently.
Definition wstag205.c:15
const CVECTOR stageColor
the color the setup copies to FIELDSTG_state.spriteColor
Definition wstag205.c:118
AreaBattle area3Battle4
Definition wstag205.c:482
AreaBattle area3Battle3
Definition wstag205.c:481
AreaBattle area0Battle1
Definition wstag205.c:440
FieldActorEntry actor19
Definition wstag205.c:655
AreaBattle area2Battle0
Definition wstag205.c:465
u16 actor9Conditions[]
Definition wstag205.c:613
FieldActorEntry * stageActors[]
Definition wstag205.c:659
AreaBattle area1Battle2
Definition wstag205.c:454
u8 spriteFieldAnims_6[]
Definition wstag205.c:278
u8 spriteFieldAnims_4[]
Definition wstag205.c:271
AreaBattle area3Battle0
Definition wstag205.c:478
void * createSpriteField(void)
Creates the field of animated sprites (updateSpriteField); nothing in the game calls it.
Definition wstag205.c:80
void updateSpriteField(StageSpriteField *task)
Plays the nine animations and draws the sprites of the table that are on screen.
Definition wstag205.c:19
FieldActorEntry actor22
Definition wstag205.c:658
AreaBattle area0Battle6
Definition wstag205.c:445
FieldTalk actor1Talks[]
Definition wstag205.c:520
u16 actor13Conditions[]
Definition wstag205.c:617
AreaBattle area3Battle2
Definition wstag205.c:480
FieldTalk actor0Talks[]
Definition wstag205.c:516
AreaBattle area3Battle1
Definition wstag205.c:479
#define STAGE_ARCHIVE
Definition wstag205.c:128
FieldTalk actor21Talks[]
Definition wstag205.c:596
AreaBattle area0Battle3
Definition wstag205.c:442
FieldTalk actor20Talks[]
Definition wstag205.c:592
FieldActorEntry actor10
Definition wstag205.c:646
u16 actor19Conditions[]
Definition wstag205.c:623
FieldTalk actor4Talks[]
Definition wstag205.c:532
u16 actor4Conditions[]
Definition wstag205.c:608
u16 actor20Talk0Actions[]
Definition wstag205.c:515
FieldActorEntry actor4
Definition wstag205.c:640
u16 actor3Conditions[]
Definition wstag205.c:607
AreaBattle area3Battle6
Definition wstag205.c:484
FieldTalk actor17Talks[]
Definition wstag205.c:584
FieldTalk actor11Talks[]
Definition wstag205.c:560
FieldActorEntry actor8
Definition wstag205.c:644
ActorImage stageImages[]
Definition wstag205.c:494
s16 script101[]
Definition wstag205.c:221
FieldTalk actor6Talks[]
Definition wstag205.c:540
void setupStage(void)
Sets the stage up: its map, actors, battles and events, playing ASKA_BGM; BGM_0029 instead at story s...
Definition wstag205.c:134
StageSpriteSpot updateSpriteFieldSpots[]
Definition wstag205.c:300
void endEvent101(void)
After event 101, with Keith: keeps it from playing again.
Definition wstag205.c:114
AreaBattle area2Battle4
Definition wstag205.c:469
u8 spriteFieldAnims_5[]
Definition wstag205.c:274
u16 actor16Conditions[]
Definition wstag205.c:620
StageTile stageObjects[]
The tables and color setupStage gives FIELDSTG_state (FieldState)
Definition wstag205.c:685
FieldActorEntry actor9
Definition wstag205.c:645
u16 actor8Conditions[]
Definition wstag205.c:612
FieldActorEntry actor20
Definition wstag205.c:656
u16 actor5Conditions[]
Definition wstag205.c:609
FieldTalk actor10Talks[]
Definition wstag205.c:556
FieldTalk actor3Talks[]
Definition wstag205.c:528
FieldTalk actor9Talks[]
Definition wstag205.c:552
u8 spriteFieldAnims_8[]
Definition wstag205.c:285
BattleList area3Battles
Definition wstag205.c:486
AreaBattle area3Battle5
Definition wstag205.c:483
AreaBattle area0Battle5
Definition wstag205.c:444
BattleList area1Battles
Definition wstag205.c:460
FieldTalk actor15Talks[]
Definition wstag205.c:576
BattleList area2Battles
Definition wstag205.c:473
FieldActorEntry actor15
Definition wstag205.c:651
FieldActorEntry actor12
Definition wstag205.c:648
FieldActorEntry actor16
Definition wstag205.c:652
u8 spriteFieldAnims_7[]
Definition wstag205.c:282
u16 actor15Conditions[]
Definition wstag205.c:619
AreaBattle area1Battle4
Definition wstag205.c:456
u8 spriteFieldAnims_2[]
Definition wstag205.c:264
u16 actor6Conditions[]
Definition wstag205.c:610
AreaBattle area2Battle2
Definition wstag205.c:467
AreaBattle area1Battle5
Definition wstag205.c:457
u8 spriteFieldAnims_3[]
Definition wstag205.c:267
u16 actor14Conditions[]
Definition wstag205.c:618
FieldActorEntry actor7
Definition wstag205.c:643
StageSlot stageSlots[]
Definition wstag205.c:790
AreaBattle area2Battle1
Definition wstag205.c:466
FieldActorEntry actor13
Definition wstag205.c:649
AreaBattle area1Battle3
Definition wstag205.c:455
AreaBattle area1Battle0
Definition wstag205.c:452
FieldActorEntry actor11
Definition wstag205.c:647
FieldActorEntry actor1
Definition wstag205.c:637
FieldActorEntry actor21
Definition wstag205.c:657
AreaBattle area0Battle0
Definition wstag205.c:439
AreaBattle area0Battle2
Definition wstag205.c:441
FieldTalk actor13Talks[]
Definition wstag205.c:568
#define STAGE_FILE
Definition wstag205.c:127
AreaBattle area2Battle5
Definition wstag205.c:470
AreaBattle area1Battle1
Definition wstag205.c:453
u16 actor7Conditions[]
Definition wstag205.c:611
AreaBattle area2Battle3
Definition wstag205.c:468
u16 actor2Conditions[]
Definition wstag205.c:606
FieldTalk actor18Talks[]
Definition wstag205.c:588
void endEvent100(void)
After event 100, with Mystery Player and Keith: starts the stage's event battle 0 and keeps it from p...
Definition wstag205.c:108
FieldTalk actor7Talks[]
Definition wstag205.c:544
u16 actor20Conditions[]
Definition wstag205.c:628
AreaBattle area0Battle4
Definition wstag205.c:443
#define STAGE_TEXT
Definition wstag205.c:125
FieldTalk actor8Talks[]
Definition wstag205.c:548
FieldTalk actor12Talks[]
Definition wstag205.c:564
AreaBattle area3Battle7
Definition wstag205.c:485
u16 actor21Conditions[]
Definition wstag205.c:634
BattleList area0Battles
Definition wstag205.c:447
AreaBattle area1Battle7
Definition wstag205.c:459
FieldTalk actor16Talks[]
Definition wstag205.c:580
u16 actor17Conditions[]
Definition wstag205.c:621
FieldActorEntry actor3
Definition wstag205.c:639
FieldBattles stageBattles[]
Definition wstag205.c:491
FieldActorEntry actor14
Definition wstag205.c:650
FieldEvent stageEvents[]
Definition wstag205.c:803
u16 actor12Conditions[]
Definition wstag205.c:616
FieldTalk actor22Talks[]
Definition wstag205.c:600
u16 actor0Conditions[]
Definition wstag205.c:604