Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
wstag526.c
Go to the documentation of this file.
1/*
2 * WSTAG526: Zhu Que UG Lake, South Sector. On the Amaterasu server; its Asuka
3 * server twin is WSTAG525.
4 */
5
6#include "common.h"
7#include "field/stage.h"
8/* Defined below, after the code that uses them */
9extern u16 angleTangents[];
12extern u16 wanderPairSpeeds[];
13void *createClutTileTask(void);
14void *createTileDuoTask(void);
15void *createStillTileTask(void);
16StageWanderPair *createWanderPairTask(s32 tileAnim, s32 speedIndex, s32 start);
26
27/* Creates the stage's objects (three map objects and nine wandering pairs); in TASK_DONE tells them all to go away */
28void updateCommand829(StageTask *task, void **children) {
29 switch (task->state) {
30 case TASK_INIT:
31 default:
32 children[0] = createClutTileTask();
33 children[1] = createTileDuoTask();
34 children[2] = createStillTileTask();
35 children[3] = createWanderPairTask(1, 0, 0);
36 children[4] = createWanderPairTask(2, 0, 5);
37 children[5] = createWanderPairTask(3, 1, 0);
38 children[6] = createWanderPairTask(4, 1, 5);
39 children[7] = createWanderPairTask(5, 1, 0);
40 children[8] = createWanderPairTask(6, 2, 0);
41 children[9] = createWanderPairTask(7, 2, 2);
42 children[10] = createWanderPairTask(8, 3, 5);
43 children[11] = createWanderPairTask(9, 3, 3);
44 task->nextState(task);
45 break;
46 case TASK_RUN:
47 break;
48 case TASK_DONE:
49 fadeOutClutTile(children[0], 0, 0);
50 fadeOutTileDuo(children[1], 0, 0);
51 fadeOutStillTile(children[2], 0, 0);
52 fadeOutWanderPair(children[3], 0, 0);
53 fadeOutWanderPair(children[4], 0, 0);
54 fadeOutWanderPair(children[5], 0, 0);
55 fadeOutWanderPair(children[6], 0, 0);
56 fadeOutWanderPair(children[7], 0, 0);
57 fadeOutWanderPair(children[8], 0, 0);
58 fadeOutWanderPair(children[9], 0, 0);
59 fadeOutWanderPair(children[10], 0, 0);
60 fadeOutWanderPair(children[11], 0, 0);
61 task->setState(task, TASK_RUN);
62 break;
63 case TASK_KILL:
64 break;
65 }
66}
67
68/* Ends the task when map object 0x34B is triggered */
70 if (task != NULL && id == 0x34B) {
71 task->setState(task, TASK_DONE);
72 }
73}
74
75/* Creates the task of updateCommand829 with an id */
77 return createTaskWithId(updateCommand829, 0x50, 0x30, arg);
78}
79
81
82/* Animates the map object of animation 0x15 (frame 2) while mode isn't 0; fades it out wait frames after mode 2 */
84 StageTile *object;
85 StageTile *tile;
86 StageTile *fading;
87 s32 frame;
88
89 switch (task->state) {
90 case TASK_INIT:
91 default:
92 task->tile.anim.index = 0;
94 task->mode = 1;
95 for (object = FIELDSTG_state.objects; object->margin != 0; object++) {
96 if (object->anim == 0x15) {
97 task->tile.tile = object;
98 }
99 }
100 task->nextState(task);
101 break;
102 case TASK_RUN:
103 tile = task->tile.tile;
104 if (task->mode != 0) {
105 tile->visible = 1;
106 tile->frame = 2;
108 } else {
109 tile->visible = 0;
110 }
111 if (task->mode == 2) {
112 if (--task->wait <= 0) {
113 task->setState(task, TASK_DONE);
114 }
115 }
116 break;
117 case TASK_DONE:
118 if (task->substate == 0) {
119 task->tile.anim.index = 0;
121 task->setSubstate(task, 1);
122 }
123 fading = task->tile.tile;
124 frame = stepTileAnimation(&task->tile, updateClutTileFrames1, 1, 0);
125 switch (frame) {
126 case 0x12C:
127 fading->visible = 0;
128 break;
129 case 0xFF:
130 fading->visible = 0;
131 task->mode = 0;
132 task->setState(task, TASK_RUN);
133 break;
134 default:
135 fading->visible = 1;
136 fading->frame = 2;
137 fading->clutRow = frame;
138 break;
139 }
140 break;
141 case TASK_KILL:
142 break;
143 }
144}
145
146/*
147 * Makes the color-cycling map object by the Digi-Egg of Knowledge fade out
148 * in 150 frames, once the player takes the egg (event 760); command and arg,
149 * a script command handler's (ScriptCommand.handle), are 0 and unread
150 */
151void fadeOutClutTile(StageTileDuo *task, s32 command, s32 arg) {
152 if (task != NULL) {
153 task->mode = 2;
154 task->wait = 0x96;
155 }
156}
157
158/*
159 * Creates the color-cycling map object by the Digi-Egg of Knowledge
160 * (updateClutTile) with an id; nothing in the game calls it
161 */
162void *createClutTile(s32 arg) {
163 return createTaskWithId(updateClutTile, sizeof(StageTileSolo), 0, arg);
164}
165
166/*
167 * Creates the color-cycling map object by the Digi-Egg of Knowledge
168 * (updateClutTile), the one with animation 0x15
169 */
171 return createTask(updateClutTile, sizeof(StageTileSolo), 0);
172}
173
175
176/* Animates the map objects of animations 0x13 and 0x14 while mode isn't 0; fades them out wait frames after mode 2 */
178 StageTile *object;
179 StageTile *tile;
180 StageTile *fading;
181 s32 i;
182 s32 j;
183 s32 frame;
184
185 switch (task->state) {
186 case TASK_INIT:
187 default:
188 task->tiles[0].anim.index = 0;
190 task->tiles[1].anim.index = 0;
192 task->mode = 1;
193 for (object = FIELDSTG_state.objects; object->margin != 0; object++) {
194 switch (object->anim) {
195 case 0x13:
196 task->tiles[0].tile = object;
197 break;
198 case 0x14:
199 task->tiles[1].tile = object;
200 break;
201 }
202 }
203 task->nextState(task);
204 break;
205 case TASK_RUN:
206 for (i = 0; i < 2; i++) {
207 tile = task->tiles[i].tile;
208 if (task->mode != 0) {
209 tile->visible = 1;
210 tile->frame = stepTileAnimation2(&task->tiles[i], updateTileDuoFrames0[i], 0, 0);
211 tile->clutRow = 0;
212 } else {
213 tile->visible = 0;
214 }
215 }
216 if (task->mode == 2) {
217 if (--task->wait <= 0) {
218 task->setState(task, TASK_DONE);
219 }
220 }
221 break;
222 case TASK_DONE:
223 if (task->substate == 0) {
224 task->tiles[0].anim.index = 0;
226 task->tiles[1].anim.index = 0;
228 task->setSubstate(task, 1);
229 }
230 for (j = 0; j < 2; j++) {
231 fading = task->tiles[j].tile;
232 frame = stepTileAnimation2(&task->tiles[j], updateTileDuoFrames1[j], 1, 0);
233 switch (frame) {
234 case 0x12C:
235 fading->visible = 0;
236 break;
237 case 0xFF:
238 fading->visible = 0;
239 task->mode = 0;
240 task->setState(task, TASK_RUN);
241 break;
242 default:
243 fading->visible = 1;
244 fading->frame = frame;
245 fading->clutRow = 0;
246 break;
247 }
248 }
249 break;
250 case TASK_KILL:
251 break;
252 }
253}
254
255/* Tells the task to go away after 90 frames (mode 2) */
257 if (task != NULL) {
258 task->mode = 2;
259 task->wait = 0x5A;
260 }
261}
262
264
266
268
269/* Shows the map object of animation 0x16 (frame 0x21) while mode isn't 0; fades it out wait frames after mode 2 */
271 StageTile *object;
272 StageTile *tile;
273 StageTile *fading;
274 s32 frame;
275
276 switch (task->state) {
277 case TASK_INIT:
278 default:
279 task->mode = 1;
280 for (object = FIELDSTG_state.objects; object->margin != 0; object++) {
281 if (object->anim == 0x16) {
282 task->tile.tile = object;
283 }
284 }
285 task->nextState(task);
286 break;
287 case TASK_RUN:
288 tile = task->tile.tile;
289 if (task->mode != 0) {
290 tile->visible = 1;
291 tile->frame = 0x21;
292 } else {
293 tile->visible = 0;
294 }
295 if (task->mode == 2) {
296 if (--task->wait <= 0) {
297 task->setState(task, TASK_DONE);
298 }
299 }
300 break;
301 case TASK_DONE:
302 if (task->substate == 0) {
303 task->tile.anim.index = 0;
305 task->setSubstate(task, 1);
306 }
307 fading = task->tile.tile;
308 frame = stepTileAnimation3(&task->tile, updateStillTileFrames, 1, 0);
309 switch (frame) {
310 case 0x12C:
311 fading->visible = 0;
312 break;
313 case 0xFF:
314 fading->visible = 0;
315 task->mode = 0;
316 task->setState(task, TASK_RUN);
317 break;
318 default:
319 fading->visible = 1;
320 fading->frame = frame;
321 fading->clutRow = 0;
322 break;
323 }
324 break;
325 case TASK_KILL:
326 break;
327 }
328}
329
330/* Tells the task to go away after 40 frames (mode 2) */
332 if (task != NULL) {
333 task->mode = 2;
334 task->wait = 0x28;
335 }
336}
337
338/*
339 * Creates the still map object by the Digi-Egg of Knowledge
340 * (updateStillTile) with an id; nothing in the game calls it
341 */
343 return createTaskWithId(updateStillTile, sizeof(StageTileSolo), 0, arg);
344}
345
346/*
347 * Creates the still map object by the Digi-Egg of Knowledge
348 * (updateStillTile), the one with animation 0x16
349 */
351 return createTask(updateStillTile, sizeof(StageTileSolo), 0);
352}
353
354/*
355 * stepTileAnimation (common/step_tile_animation.inc.c) under a fourth name,
356 * for the wandering pairs: steps OBJ's animation through FRAMES and returns
357 * its frame, looping at the end or returning 0xFF if once
358 */
360 AnimFrame *frame = &frames[obj->anim.index];
361 s32 dt = GFX.funcs.getFrameTime();
362
363 if (dt > 4) {
364 dt = 4;
365 }
366 if (depth == 0) {
367 obj->anim.timer -= dt;
368 }
369 if (obj->anim.timer <= 0) {
370 frame++;
371 obj->anim.index++;
372 obj->anim.timer += frame->duration;
373 if (once) {
374 if (frame->frame == 0xFF) {
375 return 0xFF;
376 }
377 } else if (frame->frame == 0xFF) {
378 frame = frames;
379 obj->anim.index = 0;
380 obj->anim.timer += frame->duration;
381 }
382 stepTileAnimation4(obj, frames, once, depth + 1);
383 }
384 return frame->frame;
385}
386
387/* Whether the wandering pair is more than dist from home (in x + y) */
389 s32 dx = task->posX - task->homeX;
390 s32 dy = task->posY - task->homeY;
391
392 if (dx < 0) {
393 dx = -dx;
394 }
395 if (dy < 0) {
396 dy = -dy;
397 }
398 return dist < dx + dy;
399}
400
401#include "common/get_angle.inc.c"
402
403/*
404 * Moves the wandering pair, turning it every period frames: back home when
405 * it is more than 30 away, otherwise anywhere
406 */
408 s32 dx;
409 s32 dy;
410
411 task->timer += GFX.funcs.getFrameTime();
412 if (task->period < task->timer) {
413 if (isFarFromHome(task, 0x1E)) {
414 task->angle = ((getAngle(task->homeX - task->posX, task->homeY - task->posY) - 0x40) << 4) & 0xFFF;
415 } else {
416 task->angle = (RANDOM.next() & 0xFF) << 4;
417 }
418 task->timer -= task->period;
419 task->timer += (RANDOM.next() & 0xF) - 7;
420 }
421 dx = rsin(task->angle) * task->speed / 4096;
422 dy = rcos(task->angle) * task->speed / 4096;
423 task->x += dx;
424 task->y += dy;
425 task->posX = task->x >> 8;
426 task->posY = task->y >> 8;
427}
428
429/*
430 * One of the nine pairs of map objects that wander by the Digi-Egg of
431 * Knowledge: tileAnim and tileAnim + 9 move together, their colors cycling;
432 * when done they fade out
433 */
435 StageTile *tile;
436 StageTile *object;
437 StageTile *fading;
438 s32 i;
439 s32 j;
440 s32 frame;
441
442 switch (task->state) {
443 case TASK_INIT:
444 default:
445 task->tiles[0].anim.index = task->start;
447 task->tiles[1].anim.index = task->start;
449 task->mode = 1;
450 for (object = FIELDSTG_state.objects; object->margin != 0; object++) {
451 if (object->anim == task->tileAnim) {
452 task->tiles[0].tile = object;
453 task->homeX = object->x;
454 task->homeY = object->y;
455 task->x = object->x << 8;
456 task->y = object->y << 8;
457 }
458 if (object->anim == task->tileAnim + 9) {
459 task->tiles[1].tile = object;
460 }
461 }
462 task->period = 0x28;
463 task->timer = task->start;
464 task->speed = wanderPairSpeeds[task->speedIndex];
465 task->angle = (RANDOM.next() & 0xFF) << 4;
466 task->nextState(task);
467 break;
468 case TASK_RUN:
469 if (task->mode != 0) {
470 moveWanderPair(task);
471 }
472 for (i = 0; i < 2; i++) {
473 tile = task->tiles[i].tile;
474 if (task->mode != 0) {
475 tile->visible = 1;
476 tile->clutRow = stepTileAnimation4(&task->tiles[i], updateWanderPairFrames0[i], 0, 0);
477 tile->x = task->posX;
478 tile->y = task->posY;
479 } else {
480 tile->visible = 0;
481 }
482 }
483 if (task->mode == 3) {
484 task->speed -= 4;
485 if (task->speed <= 0x10) {
486 task->setState(task, TASK_DONE);
487 }
488 }
489 if (task->mode == 2) {
490 if (--task->wait <= 0) {
491 task->mode = 3;
492 }
493 }
494 break;
495 case TASK_DONE:
496 if (task->substate == 0) {
497 task->tiles[0].anim.index = 0;
499 task->tiles[1].anim.index = 0;
501 task->setSubstate(task, 1);
502 }
503 moveWanderPair(task);
504 for (j = 0; j < 2; j++) {
505 fading = task->tiles[j].tile;
506 frame = stepTileAnimation4(&task->tiles[j], updateWanderPairFrames1[j], 1, 0);
507 switch (frame) {
508 case 0x12C:
509 fading->visible = 0;
510 break;
511 case 0xFF:
512 fading->visible = 0;
513 task->mode = 0;
514 task->setState(task, TASK_RUN);
515 break;
516 default:
517 fading->visible = 1;
518 fading->clutRow = frame;
519 fading->x = task->posX;
520 fading->y = task->posY;
521 break;
522 }
523 }
524 break;
525 case TASK_KILL:
526 break;
527 }
528}
529
530/*
531 * Makes the wandering pair fade out in 60 frames, once the player takes the
532 * Digi-Egg of Knowledge (event 760)
533 */
535 if (task != NULL) {
536 task->mode = 2;
537 task->wait = 0x3C;
538 }
539}
540
541/* Creates a wandering pair (updateWanderPair) with an id; nothing in the game calls it */
543 return createTaskWithId(updateWanderPair, sizeof(StageWanderPair), 0, arg);
544}
545
546/* Creates a pair of wandering map objects: tileAnim and tileAnim + 9 */
549
550 task->start = start;
551 task->speedIndex = speedIndex;
552 task->tileAnim = tileAnim;
553 return task;
554}
555
556/* The stage task: creates the object of map object 0x33D before progress 0x1E */
557void updateStage(StageTask *task, void **children) {
558 switch (task->state) {
559 case TASK_INIT:
560 default:
561 task->nextState(task);
563 children[0] = createCommand829(0x33D);
564 }
565 break;
566 case TASK_RUN:
567 case TASK_DONE:
568 case TASK_KILL:
569 break;
570 }
571}
572
573#define STAGE_CHILDREN_SIZE 4
575
576/*
577 * After event 760, with the player: moves the story on to STORY_DE_KNOWLEDGE and
578 * gives the player the DE Knowledge
579 */
580void endEvent760(void) {
582 FLAGS_00.applyAction(ITEM(0, 0x11), 1);
583}
584
585#if VERSION_US || VERSION_JP
586#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_07)
587#define EVENT_TEXT_FILE (TEXT_EVENTS_500 - 1)
588#define STAGE_FILE 0x6A8
589#elif VERSION_EU
590#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_07)
591#define EVENT_TEXT_FILE (TEXT_EVENTS_500 - 1)
592#define STAGE_FILE 0x6B8
593#endif
594/* Sets the stage up: its map, actors, battles and events, playing the ambience ENV_0015 */
615
617 SCRIPT_WALK(2, 0x98, 0xBE, 3),
618 SCRIPT_PLACE(0x83, 0x80, 0xB2),
619 SCRIPT_POSE(0x83, 1, 1),
622 SCRIPT_WALK(2, 0x90, 0xBA, 3),
624 SCRIPT_POSE(2, 1, 3),
625 SCRIPT_WAIT(0x1E),
626 SCRIPT_COMMAND(0x323, 0x325, 2),
627 SCRIPT_WAIT(0x3C),
628 SCRIPT_COMMAND(0x323, 0x326, 2),
629 SCRIPT_WAIT(0x1E),
630 SCRIPT_TALK(0, 1, 2, 3),
632 SCRIPT_WAIT(0x1E),
633 SCRIPT_PLACE(0x83, 0, 0),
634 SCRIPT_POSE(0x83, 1, 7),
636 SCRIPT_WAIT(0x1E),
637 SCRIPT_WAIT(0x1E),
638 SCRIPT_COMMAND(0x33D, 0x34B, 2),
639 SCRIPT_WAIT(0xD2),
640 SCRIPT_TALK(0, 2, 2, 3),
642 SCRIPT_WAIT(0x1E),
643 SCRIPT_TALK(0, 3, 2, 3),
645 SCRIPT_WAIT(0x1E),
646 SCRIPT_WALK(2, 0x98, 0xBE, 7),
648 SCRIPT_WALK(2, 0xD0, 0x100, 7),
649 SCRIPT_LEAVE(0x2AB, 0x41E, 0x1E8, 5),
651};
653 { 0, 12 }, { 1, 12 }, { 2, 12 }, { 1, 12 },
654 { 255, 0 },
655};
657 { 0, 12 }, { 1, 12 }, { 2, 12 }, { 3, 12 },
658 { 4, 12 }, { 5, 12 }, { 255, 0x3E7 },
659};
661 { 37, 12 }, { 38, 12 }, { 39, 12 }, { 40, 12 },
662 { 41, 12 }, { 42, 12 }, { 255, 0 },
663};
665 { 3, 4 }, { 4, 4 }, { 5, 4 }, { 6, 4 },
666 { 7, 4 }, { 255, 0x3E7 },
667};
669 { 91, 12 }, { 92, 12 }, { 93, 12 }, { 94, 12 },
670 { 95, 12 }, { 96, 12 }, { 255, 0 },
671};
673 { 8, 4 }, { 9, 4 }, { 10, 4 }, { 11, 4 },
674 { 12, 4 }, { 255, 0x3E7 },
675};
683 { 33, 4 }, { 34, 4 }, { 35, 4 }, { 36, 4 },
684 { 255, 0x3E7 },
685};
687 { 0, 4 }, { 1, 4 }, { 2, 4 }, { 3, 4 },
688 { 4, 4 }, { 5, 4 }, { 4, 4 }, { 3, 4 },
689 { 2, 4 }, { 1, 4 }, { 255, 0 },
690};
692 { 0, 4 }, { 1, 4 }, { 2, 4 }, { 3, 4 },
693 { 4, 4 }, { 5, 4 }, { 6, 8 }, { 7, 8 },
694 { 8, 8 }, { 9, 8 }, { 10, 8 }, { 255, 0x3E7 },
695};
697 { 0, 4 }, { 1, 4 }, { 2, 4 }, { 3, 4 },
698 { 4, 4 }, { 5, 4 }, { 4, 4 }, { 3, 4 },
699 { 2, 4 }, { 1, 4 }, { 255, 0 },
700};
702 { 0, 4 }, { 1, 4 }, { 2, 4 }, { 3, 4 },
703 { 4, 4 }, { 5, 4 }, { 6, 8 }, { 7, 8 },
704 { 8, 8 }, { 9, 8 }, { 10, 8 }, { 255, 0x3E7 },
705};
713 96, 80, 72, 64,
714};
716 0, 0x648, 0xC93, 0x12E2, 0x1936, 0x1F92, 0x259F, 0x2C6B,
717 0x32EB, 0x39C7, 0x401F, 0x46D7, 0x4DA7, 0x5491, 0x5B98, 0x62BF,
718 0x6A09, 0x7179, 0x7913, 0x80DB, 0x88B5, 0x9105, 0x9970, 0xA21B,
719 0xAB0D, 0xB44A, 0xBDDC, 0xC7C8, 0xD217, 0xDCD2, 0xE805, 0xF3BA,
720 0xFFFE, 0xFFFF,
721};
735AreaBattle area1Battle0 = { 0, 0, MUSIC(1, 0) };
736AreaBattle area1Battle1 = { 0, 0, MUSIC(1, 0) };
737AreaBattle area1Battle2 = { 0, 0, MUSIC(1, 0) };
738AreaBattle area1Battle3 = { 0, 0, MUSIC(1, 0) };
739AreaBattle area1Battle4 = { 0, 0, MUSIC(1, 0) };
740AreaBattle area1Battle5 = { 0, 0, MUSIC(1, 0) };
741AreaBattle area1Battle6 = { 0, 0, MUSIC(1, 0) };
742AreaBattle area1Battle7 = { 0, 0, MUSIC(1, 0) };
748AreaBattle area2Battle0 = { 0, 0, MUSIC(1, 0) };
749AreaBattle area2Battle1 = { 0, 0, MUSIC(1, 0) };
750AreaBattle area2Battle2 = { 0, 0, MUSIC(1, 0) };
751AreaBattle area2Battle3 = { 0, 0, MUSIC(1, 0) };
752AreaBattle area2Battle4 = { 0, 0, MUSIC(1, 0) };
753AreaBattle area2Battle5 = { 0, 0, MUSIC(1, 0) };
754AreaBattle area2Battle6 = { 0, 0, MUSIC(1, 0) };
755AreaBattle area2Battle7 = { 0, 0, MUSIC(1, 0) };
761AreaBattle area3Battle0 = { 0, 0, MUSIC(1, 0) };
762AreaBattle area3Battle1 = { 0, 0, MUSIC(1, 0) };
763AreaBattle area3Battle2 = { 0, 0, MUSIC(1, 0) };
764AreaBattle area3Battle3 = { 0, 0, MUSIC(1, 0) };
765AreaBattle area3Battle4 = { 0, 0, MUSIC(1, 0) };
766AreaBattle area3Battle5 = { 0, 0, MUSIC(1, 0) };
767AreaBattle area3Battle6 = { 0, 0, MUSIC(1, 0) };
768AreaBattle area3Battle7 = { 0, 0, MUSIC(1, 0) };
778 { 0x200, 0x100, 0x21C, 0x1A6, 0x70, 0xA6, 0x230, 0x1FE },
779 { 0x200, 0x100, 0x200, 0x100, 0, 0, 0x220, 0x1FE },
780 { 0x200, 0x100, 0x216, 0x138, 0x58, 0x38, 0x200, 0x1FD },
781 { 0x200, 0x100, 0x208, 0x1BC, 0x20, 0xBC, 0x210, 0x1FD },
782 { 0x200, 0x100, 0x210, 0x1BC, 0x40, 0xBC, 0x220, 0x1FD },
783 { 0x200, 0x100, 0x200, 0x1BC, 0, 0xBC, 0x230, 0x1FD },
784 { 0x180, 0x100, 0x1AE, 0x118, 0x1B8, 0x18, 0x170, 0x1F5 },
785 { 0x180, 0x100, 0x180, 0x138, 0x100, 0x38, 0x140, 0x1F4 },
786 { 0x140, 0x100, 0x175, 0x120, 0xD4, 0x20, 0x150, 0x1F4 },
787};
795u16 actor2Talk1Conditions[] = { ITEM(3, 0x81), 0, FLAG(0, 0), 0, CODES_END };
797u16 actor2Talk2Conditions[] = { ITEM(3, 0x81), 0, FLAG(0, 0), 1, ITEM(2, 0x7D), 0, CODES_END };
798u16 actor2Talk3Conditions[] = { ITEM(3, 0x81), 0, FLAG(0, 0), 1, ITEM(2, 0x7D), 1, CODES_END };
800 ITEM(3, 0x81), 1,
801 ITEM(3, 0x80), 0,
802 ITEM(2, 0x7D), 0,
804 CODES_END,
805};
807 { NULL, actor0Talk0Actions, 0x17F },
808 { NULL, NULL, 0 },
809};
822 ITEM(3, 0x80), 1,
823 ITEM(3, 0x81), 0,
824 CODES_END,
825};
827FieldActorEntry actor1 = { actor1Conditions, NULL, 0x83, 5, 128, 178, 1 };
830 &actor0,
831 &actor1,
832 &actor2,
833 NULL,
834};
836 { 0, 0x15, 0xFF, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
837 { 0, 0x13, 0xFF, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
838 { 0, 0x14, 0xFF, 2, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
839 { 0, 1, 0xFF, 2, 0xD, 0, 0, 0, 0, 0, 80, 128, 0, 0 },
840 { 0, 2, 0xFF, 2, 0xD, 0, 0, 0, 0, 0, 88, 48, 0, 0 },
841 { 0, 3, 0xFF, 2, 0xD, 0, 0, 0, 0, 0, 176, 72, 0, 0 },
842 { 0, 6, 0xFF, 2, 0xE, 0, 0, 0, 0, 0, 32, 104, 0, 0 },
843 { 0, 4, 0xFF, 2, 0xE, 0, 0, 0, 0, 0, 152, 128, 0, 0 },
844 { 0, 5, 0xFF, 2, 0xE, 0, 0, 0, 0, 0, 168, 48, 0, 0 },
845 { 0, 7, 0xFF, 2, 0xF, 0, 0, 0, 0, 0, 56, 112, 0, 0 },
846 { 0, 9, 0xFF, 2, 0xF, 0, 0, 0, 0, 0, 112, 144, 0, 0 },
847 { 0, 8, 0xFF, 2, 0xF, 0, 0, 0, 0, 0, 208, 88, 0, 0 },
848 { 0, 0xA, 0xFF, 2, 0x10, 0, 0, 0, 0, 0, 80, 128, 0, 0 },
849 { 0, 0xC, 0xFF, 2, 0x10, 0, 0, 0, 0, 0, 88, 48, 0, 0 },
850 { 0, 0xB, 0xFF, 2, 0x10, 0, 0, 0, 0, 0, 176, 72, 0, 0 },
851 { 0, 0xF, 0xFF, 2, 0x11, 0, 0, 0, 0, 0, 32, 104, 0, 0 },
852 { 0, 0xE, 0xFF, 2, 0x11, 0, 0, 0, 0, 0, 152, 128, 0, 0 },
853 { 0, 0xD, 0xFF, 2, 0x11, 0, 0, 0, 0, 0, 168, 48, 0, 0 },
854 { 0, 0x10, 0xFF, 2, 0x12, 0, 0, 0, 0, 0, 56, 112, 0, 0 },
855 { 0, 0x11, 0xFF, 2, 0x12, 0, 0, 0, 0, 0, 112, 144, 0, 0 },
856 { 0, 0x12, 0xFF, 2, 0x12, 0, 0, 0, 0, 0, 208, 88, 0, 0 },
857 { 0, 0x16, 0xFF, 6, 0x21, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
858 { 1, 0, 0x40, 6, 0x2C, 1, 0x2C, 0x3B, 0xA, 0, 128, 607, 0, 0 },
859 { 1, 0, 0x40, 6, 0x2C, 1, 0x2C, 0x3B, 0xA, 0, 128, 907, 0, 0 },
860 { 1, 0, 0x40, 6, 0x2C, 1, 0x2C, 0x3B, 0xA, 0, 675, 970, 0, 0 },
861 { 1, 0, 0x40, 6, 0x3C, 1, 0x3C, 0x46, 0xA, 0, 284, 1043, 0, 0 },
862 { 1, 0, 0x40, 6, 0x3C, 1, 0x3C, 0x46, 0xA, 0, 711, 813, 0, 0 },
863 { 1, 0, 0x40, 4, 0, 0, 0, 0, 0, 0, 339, 392, 409, 0 },
864 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
865};
867 { { { SPECIAL_STORY_SINCE_DE_SINCERITY, 1 }, { CODES_END, 0 } }, SLOT_WARP0, 0x2E0, 0x240, 0xD8, 1, 0, 0x11, 1 },
868 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_CLIMB_UP, 5, 0x22F, 0x3C8, 0, 0, 0, 0 },
869 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_CLIMB_DOWN, 5, 0x220, 0x372, 0, 0, 0, 0 },
870 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_CLIMB_UP, 5, 0x251, 0x2F7, 0, 0, 0, 0 },
871 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_CLIMB_DOWN, 5, 0x260, 0x2A1, 0, 0, 0, 0 },
872 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_CLIMB_UP, 0xA, 0x1C0, 0x181, 0, 0, 0, 0 },
873 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_CLIMB_DOWN, 0xA, 0x1D0, 0xDA, 0, 0, 0, 0 },
874 { { { PROGRESS(STORY_BULBMON_BEATEN), 1 }, { CODES_END, 0 } }, SLOT_EVENT, 0x2F8, 0, 0, 0, 0, 0, 0 },
875 { { { SPECIAL_STORY_SINCE_DE_SINCERITY, 1 }, { CODES_END, 0 } }, SLOT_WARP0, 0x2E0, 0x240, 0xD8, 1, 0, 0x11, 1 },
876 { { { CODES_END, 0 }, { CODES_END, 0 } }, 0, 0, 0, 0, 0, 0, 0, 0 },
877};
878void (*stageFuncs[])(void) = {
880};
882 { 760, script760, EVENT_TEXT(0x23), NULL, endEvent760 },
883 { -1, NULL, 0, NULL, NULL },
884};
#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
The stage overlays (AAA/PRO/WSTAG###.PRO), loaded at 0x800A4CA4 on top of FIELDSTG.
#define EVENT_TEXT(n)
An entry of the stage's events' text file, for FieldEvent.text.
Definition stage.h:732
void updateStage()
The names every stage defines, each its own (config/<version>/stages/<stage>.txt).
#define SLOT_CLIMB_UP
Definition field_map.h:256
#define SCRIPT_WAIT_WALK(id)
until the character gets to its goal
Definition field_map.h:168
#define FIELD_COMMAND_HALT_PARTNERS
The field commands, which an event script hands FIELD_TASK_COMMANDS as the first argument of a pose c...
Definition field_map.h:41
#define SCRIPT_END
The commands of an event script (FieldEvent.script), as FIELDSTG_runEvent reads them: a halfword kind...
Definition field_map.h:156
#define SCRIPT_LEAVE(mode, x, y, dir)
FIELDSTG_leaveField; ends the event.
Definition field_map.h:170
#define SCRIPT_COMMAND(id, command, arg)
the same word for a script command's id: FIELDSTG_setEventPose creates its task if none runs and hand...
Definition field_map.h:161
#define 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 FIELD_COMMAND_ICON3
its substate 3, with ITEM_GET
Definition field_map.h:44
#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 FIELD_MAP_AREAS
a cell's value: its battle area (FieldBattles), or 0
Definition field_map.h:87
#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
#define CODES_END
Definition game_state.h:83
#define ITEM(kind, id)
an item, in the bag or equipped; kind (bits 9-11) isn't read, and the scripts set it after the item's...
Definition game_state.h:80
#define PROGRESS(n)
GAME.progress is n.
Definition game_state.h:69
#define FLAG(group, id)
The codes of the (code, value) pairs that FLAGS_00 checks as conditions and applies as actions (event...
Definition game_state.h:68
s32 getAngle(s32 x, s32 y)
The angle of (x, y), 0x100 a turn, from the stage's table of tangents angleTangents.
Random RANDOM
Definition random.c:533
#define MUSIC_BATTLE
BATL0000: the maps' random battles (AreaBattle, nearly all of them)
Definition sound.h:76
#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_UG_LAKE
ENV_0015: the UG Lake.
Definition sound.h:131
#define MUSIC_BANK(music)
The sound bank of a music, which a stage loads for it (FieldState.soundBank)
Definition sound.h:148
Task * start(void)
The mode's entry point (MODE_ENTRY_POINTS): starts its root task (update_scene.inc....
Definition start.inc.c:3
FIELDSTG's start of the stage (StageEntry.init in FIELDSTG_stages): the stage's task,...
s32 stepTileAnimation3(StageTileAnim *obj, AnimFrame *frames, s32 once, s32 depth)
stepTileAnimation under a third name: steps OBJ's animation through FRAMES by the frame time (at most...
s32 stepTileAnimation(StageTileAnim *obj, AnimFrame *frames, s32 once, s32 depth)
Steps OBJ's animation through FRAMES by the frame time (at most 4) and returns its frame: at the end ...
#define FLAG_ZHU_QUE_LAKE_EVIL_FANG_FOUND
wstag526: chest that gives the Evil Fang, "I got" text; its conditions test it 0
Definition story.h:269
@ STORY_BULBMON_BEATEN
WSTAG521 (Zhu Que Hall), event 751: Bulbmon is beaten (the Red ID Pass); its hole leads on to the Ama...
Definition story.h:112
@ STORY_DE_KNOWLEDGE
WSTAG526 (Zhu Que UG Lake), event 760: the fight with Zanbamon (the DE Knowledge)
Definition story.h:115
#define SPECIAL_MONMON_LEVEL_45
PARTNER_MONMON is unlocked and at level 45 or more.
Definition story.h:1753
#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_MONMON_IN_PARTY
PARTNER_MONMON is in the party.
Definition story.h:1713
#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
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(* getFrameTime)(void)
Definition gfx.h:32
GfxFuncs funcs
Definition gfx.h:77
s32(* next)(void)
0 to RANDOM_COUNT - 1
Definition random.h:15
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
void(* setState)(struct StageTask *task, s32 state)
Definition stage.h:27
A map object with the animation that sets its frame.
Definition stage.h:108
StageTile * tile
Definition stage.h:109
AnimState anim
Definition stage.h:110
Two map objects (animations 8 and 9) shown while mode isn't 0, and hidden by a one-shot animation wai...
Definition stage.h:179
void(* nextState)(struct StageTileDuo *task)
Definition stage.h:180
s32 state
Definition stage.h:180
StageTileAnim tiles[2]
Definition stage.h:183
s32 substate
Definition stage.h:180
void(* setSubstate)(struct StageTileDuo *task, s32 substate)
Definition stage.h:180
void(* setState)(struct StageTileDuo *task, s32 state)
Definition stage.h:180
StageTileDuo with one map object.
Definition stage.h:359
void(* setState)(struct StageTileSolo *task, s32 state)
Definition stage.h:360
StageTileAnim tile
Definition stage.h:363
void(* setSubstate)(struct StageTileSolo *task, s32 substate)
Definition stage.h:360
s32 substate
Definition stage.h:360
void(* nextState)(struct StageTileSolo *task)
Definition stage.h:360
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
StageWanderer moving two map objects: tileAnim and tileAnim + 9.
Definition stage.h:155
StageTileAnim tiles[2]
Definition stage.h:172
void(* setSubstate)(struct StageWanderPair *task, s32 substate)
Definition stage.h:156
void(* setState)(struct StageWanderPair *task, s32 state)
Definition stage.h:156
void(* nextState)(struct StageWanderPair *task)
Definition stage.h:156
A map object that wanders around where it starts, animated, turning every period frames: towards home...
Definition stage.h:134
s16 mode
0: hidden, 1: wandering, 2: waiting, 3: slowing down
Definition stage.h:136
Definition gfx.h:352
void * createTask(void(*update)(), s32 size, s32 childrenSize)
createTaskWithId for a task nothing needs to find
Definition task.c:105
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
s32 stepTileAnimation2(StageTileAnimFlag *obj, AnimFrame *frames, s32 once, s32 depth)
stepTileAnimation (common/step_tile_animation.inc.c) for a StageTileAnimFlag: steps OBJ's animation t...
Definition wstag310.c:171
AnimFrame updateTileDuoFrames1_0[]
Definition wstag526.c:664
u16 actor1Conditions[]
Definition wstag526.c:818
u16 actor0Talk0Actions[]
Definition wstag526.c:788
AreaBattle area2Battle7
Definition wstag526.c:755
FieldActorEntry actor0
Definition wstag526.c:826
void(* stageFuncs[])(void)
The stage's functions (common/start_stage.inc.c calls the first): a StageFuncs in the stages with a t...
Definition wstag526.c:878
s32 stepTileAnimation4(StageTileAnim *obj, AnimFrame *frames, s32 once, s32 depth)
stepTileAnimation (common/step_tile_animation.inc.c) under a fourth name, for the wandering pairs: st...
Definition wstag526.c:359
void moveWanderPair(StageWanderPair *task)
Moves the wandering pair, turning it every period frames: back home when it is more than 30 away,...
Definition wstag526.c:407
AnimFrame updateWanderPairFrames1_1[]
Definition wstag526.c:701
FieldTalk actor2Talks[]
Definition wstag526.c:810
AreaBattle area2Battle6
Definition wstag526.c:754
void * createCommand829(s32 arg)
Creates the task of updateCommand829 with an id.
Definition wstag526.c:76
u16 actor2Talk1Conditions[]
Definition wstag526.c:795
AnimFrame * updateTileDuoFrames1[]
Definition wstag526.c:679
u16 angleTangents[]
Defined below, after the code that uses them.
Definition wstag526.c:715
AreaBattle area1Battle6
Definition wstag526.c:741
void updateTileDuo(StageTileDuo *task)
Animates the map objects of animations 0x13 and 0x14 while mode isn't 0; fades them out wait frames a...
Definition wstag526.c:177
AreaBattle area0Battle7
Definition wstag526.c:729
FieldActorEntry actor2
Definition wstag526.c:828
void updateCommand829(StageTask *task, void **children)
Creates the stage's objects (three map objects and nine wandering pairs); in TASK_DONE tells them all...
Definition wstag526.c:28
AreaBattle area3Battle4
Definition wstag526.c:765
AnimFrame updateClutTileFrames0[]
Definition wstag526.c:652
AreaBattle area3Battle3
Definition wstag526.c:764
AreaBattle area0Battle1
Definition wstag526.c:723
AreaBattle area2Battle0
Definition wstag526.c:748
AnimFrame updateClutTileFrames1[]
Definition wstag526.c:656
FieldActorEntry * stageActors[]
Definition wstag526.c:829
u16 actor2Talk3Conditions[]
Definition wstag526.c:798
AreaBattle area1Battle2
Definition wstag526.c:737
void * createTileDuoTask(void)
Creates the updateTileDuo task.
AreaBattle area3Battle0
Definition wstag526.c:761
void fadeOutStillTile()
AreaBattle area0Battle6
Definition wstag526.c:728
AnimFrame updateTileDuoFrames0_1[]
Definition wstag526.c:668
AreaBattle area3Battle2
Definition wstag526.c:763
void * createStillTile(s32 arg)
Creates the still map object by the Digi-Egg of Knowledge (updateStillTile) with an id; nothing in th...
Definition wstag526.c:342
u16 actor2Talk1Actions[]
Definition wstag526.c:796
FieldTalk actor0Talks[]
Definition wstag526.c:806
AnimFrame updateStillTileFrames[]
Definition wstag526.c:682
AreaBattle area3Battle1
Definition wstag526.c:762
void endEvent760(void)
After event 760, with the player: moves the story on to STORY_DE_KNOWLEDGE and gives the player the D...
Definition wstag526.c:580
AnimFrame * updateWanderPairFrames1[]
Definition wstag526.c:709
AreaBattle area0Battle3
Definition wstag526.c:725
u16 actor2Talk2Conditions[]
Definition wstag526.c:797
AreaBattle area3Battle6
Definition wstag526.c:767
void updateWanderPair(StageWanderPair *task)
One of the nine pairs of map objects that wander by the Digi-Egg of Knowledge: tileAnim and tileAnim ...
Definition wstag526.c:434
AnimFrame updateTileDuoFrames0_0[]
Definition wstag526.c:660
void updateClutTile(StageTileSolo *task)
Animates the map object of animation 0x15 (frame 2) while mode isn't 0; fades it out wait frames afte...
Definition wstag526.c:83
u16 actor2Talk3Actions[]
Definition wstag526.c:799
ActorImage stageImages[]
Definition wstag526.c:777
AnimFrame updateWanderPairFrames1_0[]
Definition wstag526.c:691
void setupStage(void)
Sets the stage up: its map, actors, battles and events, playing the ambience ENV_0015.
Definition wstag526.c:595
AnimFrame * updateTileDuoFrames0[]
Definition wstag526.c:676
void updateStillTile(StageTileSolo *task)
Shows the map object of animation 0x16 (frame 0x21) while mode isn't 0; fades it out wait frames afte...
Definition wstag526.c:270
AreaBattle area2Battle4
Definition wstag526.c:752
StageTile stageObjects[]
The tables and color setupStage gives FIELDSTG_state (FieldState)
Definition wstag526.c:835
BattleList area3Battles
Definition wstag526.c:769
void fadeOutWanderPair()
AreaBattle area3Battle5
Definition wstag526.c:766
AreaBattle area0Battle5
Definition wstag526.c:727
BattleList area1Battles
Definition wstag526.c:743
AnimFrame updateTileDuoFrames1_1[]
Definition wstag526.c:672
BattleList area2Battles
Definition wstag526.c:756
u16 actor2Talk0Conditions[]
Definition wstag526.c:794
AreaBattle area1Battle4
Definition wstag526.c:739
u16 wanderPairSpeeds[]
Definition wstag526.c:712
s16 script760[]
Definition wstag526.c:616
AreaBattle area2Battle2
Definition wstag526.c:750
AreaBattle area1Battle5
Definition wstag526.c:740
void * createClutTile(s32 arg)
Creates the color-cycling map object by the Digi-Egg of Knowledge (updateClutTile) with an id; nothin...
Definition wstag526.c:162
StageSlot stageSlots[]
Definition wstag526.c:866
AreaBattle area2Battle1
Definition wstag526.c:749
AreaBattle area1Battle3
Definition wstag526.c:738
AnimFrame updateWanderPairFrames0_1[]
Definition wstag526.c:696
AnimFrame * updateWanderPairFrames0[]
Definition wstag526.c:706
AreaBattle area1Battle0
Definition wstag526.c:735
s32 isFarFromHome(StageWanderPair *task, s32 dist)
Whether the wandering pair is more than dist from home (in x + y)
Definition wstag526.c:388
FieldActorEntry actor1
Definition wstag526.c:827
AreaBattle area0Battle0
Definition wstag526.c:722
void fadeOutTileDuo()
AreaBattle area0Battle2
Definition wstag526.c:724
#define STAGE_FILE
Definition wstag526.c:592
AreaBattle area2Battle5
Definition wstag526.c:753
AreaBattle area1Battle1
Definition wstag526.c:736
void * createClutTileTask(void)
Creates the color-cycling map object by the Digi-Egg of Knowledge (updateClutTile),...
Definition wstag526.c:170
AreaBattle area2Battle3
Definition wstag526.c:751
void * createWanderPair(s32 arg)
Creates a wandering pair (updateWanderPair) with an id; nothing in the game calls it.
Definition wstag526.c:542
void fadeOutClutTile()
AnimFrame updateWanderPairFrames0_0[]
Definition wstag526.c:686
u16 actor2Conditions[]
Definition wstag526.c:819
void * createStillTileTask(void)
Creates the still map object by the Digi-Egg of Knowledge (updateStillTile), the one with animation 0...
Definition wstag526.c:350
AreaBattle area0Battle4
Definition wstag526.c:726
void handleCommand829(StageTask *task, s32 id)
Ends the task when map object 0x34B is triggered.
Definition wstag526.c:69
#define STAGE_TEXT
Definition wstag526.c:590
StageWanderPair * createWanderPairTask(s32 tileAnim, s32 speedIndex, s32 start)
Creates a pair of wandering map objects: tileAnim and tileAnim + 9.
Definition wstag526.c:547
AreaBattle area3Battle7
Definition wstag526.c:768
BattleList area0Battles
Definition wstag526.c:730
AreaBattle area1Battle7
Definition wstag526.c:742
FieldBattles stageBattles[]
Definition wstag526.c:774
FieldEvent stageEvents[]
Definition wstag526.c:881
u16 actor0Conditions[]
Definition wstag526.c:817