Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
wstag810.c
Go to the documentation of this file.
1/*
2 * WSTAG810: Gunslinger 1F, Spy Satellite. Reached from Amaterasu's A.o.A
3 * Headquarters (WSTAG311); its blocks open from panels.
4 */
5
6#include "common.h"
7#include "field/stage.h"
8#if VERSION_US || VERSION_JP
9#define STAGE_FILE 0x6DD
10#elif VERSION_EU
11#define STAGE_FILE 0x6ED
12#endif
13
14/* Defined below, after the code that uses them */
19extern StageSlot stageSlots0[];
20extern StageSlot stageSlots1[];
21
23
24/* Shows the first map object animated while running; when done, both */
26 StageTile *tile;
27 StageTile *object;
28 s32 i;
29 s32 frame;
30
31 switch (task->state) {
32 case TASK_INIT:
33 default:
34 for (object = FIELDSTG_state.objects; object->margin != 0; object++) {
35 if (object->anim == task->anim) {
36 task->anims[0].anim.index = 0;
37 task->anims[0].anim.timer = (u8)updateTilePairNFrames0[0].duration;
38 task->anims[0].tile = object;
39 }
40 if (object->anim == task->anim + 1) {
41 task->anims[1].anim.index = 0;
42 task->anims[1].anim.timer = (u8)updateTilePairNFrames1[0].duration;
43 task->anims[1].tile = object;
44 }
45 }
46 task->playing = 0;
47 if (task->done == 1) {
48 task->playing = 1;
49 task->anims[0].anim.index = 0;
50 task->anims[0].anim.timer = (u8)updateTilePairNFrames2[0].duration;
51 task->setState(task, TASK_DONE);
52 } else {
53 task->nextState(task);
54 }
55 break;
56 case TASK_RUN:
57 for (i = 0; i < 2; i++) {
58 tile = task->anims[i].tile;
59 switch (i) {
60 case 0:
61 tile->visible = 1;
62 tile->frame = 0x55;
63 tile->clutRow = stepTileAnimation(&task->anims[0], updateTilePairNFrames0, 0, 0);
64 break;
65 case 1:
66 tile->visible = 0;
67 break;
68 }
69 }
70 break;
71 case TASK_DONE:
72 for (i = 0; i < 2; i++) {
73 tile = task->anims[i].tile;
74 switch (i) {
75 case 0:
76 tile->visible = 1;
77 if (task->playing) {
78 frame = stepTileAnimation(&task->anims[0], updateTilePairNFrames2, 1, 0);
79 if (frame == 0xFF) {
80 tile->frame = 0x54;
81 task->playing = 0;
82 } else {
83 tile->frame = frame;
84 }
85 } else {
86 tile->frame = 0x54;
87 }
88 tile->clutRow = 0;
89 break;
90 case 1:
91 tile->visible = 1;
92 tile->frame = 0x46;
93 tile->clutRow = stepTileAnimation(&task->anims[1], updateTilePairNFrames1, 0, 0);
94 break;
95 }
96 }
97 break;
98 case TASK_KILL:
99 break;
100 }
101}
102
103/* Plays the first map object's one-shot animation when the event of map object 0x35B happens */
105 if (id == 0x35B) {
106 task->playing = 1;
107 task->anims[0].anim.index = 0;
108 task->anims[0].anim.timer = (u8)updateTilePairNFrames2[0].duration;
109 task->setState(task, TASK_DONE);
110 }
111}
112
113/* Creates the tile pair object of animations ANIM and ANIM + 1 with the id ARG */
114static inline void *createTilePairN(s32 arg, s32 anim) {
115 StageTilePairN *task = createTaskWithId(updateTilePairN, 0x68, 0, arg);
116
117 task->anim = anim;
118 task->done = 0;
119 return task;
120}
121
122/* Creates the tile pair object of animations 1 and 2 */
124 return createTilePairN(arg, 1);
125}
126
127/* Creates the tile pair object of animations 3 and 4 */
129 return createTilePairN(arg, 3);
130}
131
132/* Creates the tile pair object of animations 5 and 6 */
134 return createTilePairN(arg, 5);
135}
136
137/* Creates the tile pair object of animations anim and anim + 1, started in TASK_DONE */
139 StageTilePairN *task = createTask(updateTilePairN, 0x68, 0);
140
141 task->anim = anim;
142 task->done = 1;
143 return task;
144}
145
146/* Creates the stage's 62 effects and its three tile pairs, started by flags 0x406E, 0x406F and 0x406D */
147void updateStage(StageTask *task, void **children) {
148 s32 i;
149
150 switch (task->state) {
151 case TASK_INIT:
152 default:
153 task->nextState(task);
154 for (i = 0; i < 62; i++) {
155 if (updateStageSpots[i].kind == 0) {
156 children[i] = createStageEffect(updateStageSpots[i].x, updateStageSpots[i].y, updateStageSpots[i].frame);
157 }
158 }
159 if (FLAGS_00.checkCondition(FLAG(0x40, 0x6E), 0)) {
160 children[62] = createTilePairN1(0x34C);
161 } else {
162 children[62] = createTilePairNDone(1);
163 }
165 children[63] = createTilePairN3(0x34B);
166 } else {
167 children[63] = createTilePairNDone(3);
168 }
169 if (FLAGS_00.checkCondition(FLAG(0x40, 0x6D), 0)) {
170 children[64] = createTilePairN5(0x34A);
171 } else {
172 children[64] = createTilePairNDone(5);
173 }
174 break;
175 case TASK_RUN:
176 case TASK_DONE:
177 case TASK_KILL:
178 break;
179 }
180}
181
182#define STAGE_CHILDREN_SIZE 0x104
189
190/* Puts back the first triggers map when GAME.altTriggers is set, and clears it */
191void *startEvent9000(void) {
192 if (GAME.altTriggers != 0) {
195 GAME.altTriggers = 0;
196 }
197 return NULL;
198}
199
200/* Switches to the second triggers map when GAME.altTriggers is clear, and sets it */
201void *startEvent9001(void) {
202 if (GAME.altTriggers == 0) {
205 GAME.altTriggers = 0x20;
206 }
207 return NULL;
208}
209
210/*
211 * After event 990, with the player: sets flag 0x1C3A (which decides whether
212 * actor 0 appears) and keeps it from playing again
213 */
214void endEvent990(void) {
215 FLAGS_00.applyAction(FLAG(0x40, 0x6D), 1);
216 FLAGS_00.applyAction(FLAG(0x1C, 0x3A), 1);
217}
218
219/*
220 * After event 1000, with the player: sets flag 0x1C3B (which decides whether
221 * actor 1 appears) and keeps it from playing again
222 */
223void endEvent1000(void) {
224 FLAGS_00.applyAction(FLAG(0x40, 0x6E), 1);
225 FLAGS_00.applyAction(FLAG(0x1C, 0x3B), 1);
226}
227
228/*
229 * After event 1010, with the player: sets flag 0x1C3C (which decides whether
230 * actor 2 appears) and keeps it from playing again
231 */
236
237/* After event 1035, with the player: moves the story on to STORY_GUNSLINGER */
241
242#if VERSION_US || VERSION_JP
243#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_07)
244#define EVENT_TEXT_FILE (TEXT_EVENTS_800 - 1)
245#elif VERSION_EU
246#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_07)
247#define EVENT_TEXT_FILE (TEXT_EVENTS_800 - 1)
248#endif
249/*
250 * Sets the stage up: its map, actors, battles and events, playing BGM_0026,
251 * with the first triggers map when the player comes in, and the second one
252 * kept when back from a battle or a menu that left it in use
253 */
279
281 SCRIPT_WALK(2, 0x530, 0x140, 5),
284 SCRIPT_WAIT(0x1E),
285 SCRIPT_POSE(2, 1, 5),
286 SCRIPT_WAIT(0x1E),
287 SCRIPT_POSE(2, 1, 4),
288 SCRIPT_WAIT(0x1E),
289 SCRIPT_POSE(2, 1, 5),
290 SCRIPT_WAIT(0x1E),
291 SCRIPT_POSE(2, 1, 6),
292 SCRIPT_WAIT(0x1E),
293 SCRIPT_POSE(2, 1, 5),
294 SCRIPT_WAIT(0x1E),
295 SCRIPT_COMMAND(0x323, 0x325, 2),
296 SCRIPT_WAIT(0x5A),
297 SCRIPT_COMMAND(0x323, 0x326, 2),
298 SCRIPT_WAIT(0x1E),
299 SCRIPT_TALK(0, 1, 2, 0),
300 SCRIPT_POSE(2, 7, 5),
302 SCRIPT_POSE(2, 1, 5),
303 SCRIPT_WAIT(0x1E),
305 SCRIPT_COMMAND(0x34A, 0x35B, 2),
306 SCRIPT_WAIT(0x5A),
307 SCRIPT_WAIT(0x1E),
308 SCRIPT_POSE(2, 1, 1),
309 SCRIPT_PLACE(0x180, 0, 0),
310 SCRIPT_POSE(0x180, 1, 1),
312 SCRIPT_WAIT(0x5A),
313 SCRIPT_POSE(2, 1, 1),
314 SCRIPT_WAIT(0x1E),
315 SCRIPT_POSE(2, 1, 2),
316 SCRIPT_WAIT(0x1E),
317 SCRIPT_POSE(2, 1, 1),
318 SCRIPT_WAIT(0x1E),
319 SCRIPT_POSE(2, 1, 0),
320 SCRIPT_WAIT(0x1E),
321 SCRIPT_POSE(2, 1, 1),
322 SCRIPT_WAIT(0x1E),
323 SCRIPT_TALK(0, 2, 2, 0),
324 SCRIPT_POSE(2, 7, 1),
326 SCRIPT_POSE(2, 1, 1),
327 SCRIPT_WAIT(0x1E),
328 SCRIPT_WALK(2, 0x510, 0x151, 1),
331};
333 SCRIPT_WALK(2, 0x390, 0x90, 5),
336 SCRIPT_WAIT(0x1E),
337 SCRIPT_POSE(2, 1, 5),
338 SCRIPT_WAIT(0x1E),
339 SCRIPT_POSE(2, 1, 4),
340 SCRIPT_WAIT(0x1E),
341 SCRIPT_POSE(2, 1, 5),
342 SCRIPT_WAIT(0x1E),
343 SCRIPT_POSE(2, 1, 6),
344 SCRIPT_WAIT(0x1E),
345 SCRIPT_POSE(2, 1, 5),
346 SCRIPT_WAIT(0x1E),
347 SCRIPT_COMMAND(0x323, 0x325, 2),
348 SCRIPT_WAIT(0x5A),
349 SCRIPT_COMMAND(0x323, 0x326, 2),
350 SCRIPT_WAIT(0x1E),
351 SCRIPT_TALK(0, 1, 2, 0),
352 SCRIPT_POSE(2, 7, 5),
354 SCRIPT_POSE(2, 1, 5),
355 SCRIPT_WAIT(0x1E),
357 SCRIPT_COMMAND(0x34C, 0x35B, 2),
358 SCRIPT_WAIT(0x5A),
359 SCRIPT_WAIT(0x1E),
360 SCRIPT_POSE(2, 1, 1),
361 SCRIPT_PLACE(0x181, 0, 0),
362 SCRIPT_POSE(0x181, 1, 1),
364 SCRIPT_WAIT(0x5A),
365 SCRIPT_POSE(2, 1, 1),
366 SCRIPT_WAIT(0x1E),
367 SCRIPT_POSE(2, 1, 2),
368 SCRIPT_WAIT(0x1E),
369 SCRIPT_POSE(2, 1, 1),
370 SCRIPT_WAIT(0x1E),
371 SCRIPT_POSE(2, 1, 0),
372 SCRIPT_WAIT(0x1E),
373 SCRIPT_POSE(2, 1, 1),
374 SCRIPT_WAIT(0x1E),
375 SCRIPT_TALK(0, 2, 2, 0),
376 SCRIPT_POSE(2, 7, 1),
378 SCRIPT_POSE(2, 1, 1),
379 SCRIPT_WAIT(0x1E),
380 SCRIPT_WALK(2, 0x370, 0xA0, 1),
383};
385 SCRIPT_WALK(2, 0x510, 0x90, 5),
388 SCRIPT_WAIT(0x1E),
389 SCRIPT_POSE(2, 1, 5),
390 SCRIPT_WAIT(0x1E),
391 SCRIPT_POSE(2, 1, 4),
392 SCRIPT_WAIT(0x1E),
393 SCRIPT_POSE(2, 1, 5),
394 SCRIPT_WAIT(0x1E),
395 SCRIPT_POSE(2, 1, 6),
396 SCRIPT_WAIT(0x1E),
397 SCRIPT_POSE(2, 1, 5),
398 SCRIPT_WAIT(0x1E),
399 SCRIPT_COMMAND(0x323, 0x325, 2),
400 SCRIPT_WAIT(0x5A),
401 SCRIPT_COMMAND(0x323, 0x326, 2),
402 SCRIPT_WAIT(0x1E),
403 SCRIPT_TALK(0, 1, 2, 0),
404 SCRIPT_POSE(2, 7, 5),
406 SCRIPT_POSE(2, 1, 5),
407 SCRIPT_WAIT(0x1E),
409 SCRIPT_COMMAND(0x34B, 0x35B, 2),
410 SCRIPT_WAIT(0x5A),
411 SCRIPT_WAIT(0x1E),
412 SCRIPT_POSE(2, 1, 1),
413 SCRIPT_PLACE(0x182, 0, 0),
414 SCRIPT_POSE(0x182, 1, 1),
416 SCRIPT_WAIT(0x5A),
417 SCRIPT_POSE(2, 1, 1),
418 SCRIPT_WAIT(0x1E),
419 SCRIPT_POSE(2, 1, 2),
420 SCRIPT_WAIT(0x1E),
421 SCRIPT_POSE(2, 1, 1),
422 SCRIPT_WAIT(0x1E),
423 SCRIPT_POSE(2, 1, 0),
424 SCRIPT_WAIT(0x1E),
425 SCRIPT_POSE(2, 1, 1),
426 SCRIPT_WAIT(0x1E),
427 SCRIPT_TALK(0, 2, 2, 0),
428 SCRIPT_POSE(2, 7, 1),
430 SCRIPT_POSE(2, 1, 1),
431 SCRIPT_WAIT(0x1E),
432 SCRIPT_WALK(2, 0x50F, 0x91, 1),
435};
437 SCRIPT_WALK(2, 0xA0, 0x2D9, 1),
440 SCRIPT_POSE(2, 1, 1),
441 SCRIPT_WAIT(0x1E),
442 SCRIPT_TALK(0, 1, 2, 4),
444 SCRIPT_WAIT(0x1E),
445 SCRIPT_COMMAND(0x323, 0x325, 2),
446 SCRIPT_WAIT(0x5A),
447 SCRIPT_COMMAND(0x323, 0x326, 2),
448 SCRIPT_WAIT(0x1E),
449 SCRIPT_POSE(2, 1, 7),
450 SCRIPT_WAIT(0x1E),
451 SCRIPT_POSE(2, 1, 7),
452 SCRIPT_WAIT(0x1E),
453 SCRIPT_POSE(2, 1, 1),
454 SCRIPT_WAIT(0x1E),
455 SCRIPT_POSE(2, 1, 7),
456 SCRIPT_WAIT(0x1E),
457 SCRIPT_POSE(2, 1, 5),
458 SCRIPT_WAIT(0x1E),
459 SCRIPT_POSE(2, 1, 7),
460 SCRIPT_WAIT(0x1E),
461 SCRIPT_TALK(0, 2, 2, 2),
462 SCRIPT_POSE(2, 1, 7),
464 SCRIPT_POSE(2, 1, 7),
465 SCRIPT_WAIT(0x1E),
466 SCRIPT_POSE(2, 1, 1),
467 SCRIPT_WAIT(0x1E),
469};
471 { 0, 6 }, { 1, 6 }, { 2, 6 }, { 255, 0 },
472};
474 { 71, 4 }, { 72, 4 }, { 73, 4 }, { 74, 4 },
475 { 75, 4 }, { 76, 4 }, { 77, 4 }, { 78, 4 },
476 { 79, 4 }, { 80, 4 }, { 81, 4 }, { 82, 4 },
477 { 83, 4 }, { 84, 4 }, { 255, 0 },
478};
480 { 0, 6 }, { 1, 6 }, { 2, 6 }, { 3, 6 },
481 { 4, 6 }, { 5, 6 }, { 255, 0 },
482};
484 { 60, 0, 92, 181 },
485 { 60, 0, 92, 245 },
486 { 60, 0, 92, 0x195 },
487 { 52, 0, 92, 0x1D5 },
488 { 60, 0, 156, 213 },
489 { 52, 0, 220, 245 },
490 { 60, 0, 220, 0x135 },
491 { 44, 0, 236, 0x2EC },
492 { 44, 0, 252, 0x395 },
493 { 60, 0, 0x11C, 149 },
494 { 60, 0, 0x11C, 0x1D5 },
495 { 44, 0, 0x11C, 0x324 },
496 { 60, 0, 0x12C, 0x2CC },
497 { 60, 0, 0x13C, 0x3B5 },
498 { 60, 0, 0x15C, 181 },
499 { 60, 0, 0x15C, 0x344 },
500 { 60, 0, 0x17C, 133 },
501 { 52, 0, 0x19C, 0x1D5 },
502 { 60, 0, 0x1BC, 0x1A5 },
503 { 60, 0, 0x1DC, 0x115 },
504 { 60, 0, 0x1FC, 0x225 },
505 { 52, 0, 0x21C, 0x1D5 },
506 { 60, 0, 0x23C, 133 },
507 { 60, 0, 0x23C, 0x245 },
508 { 60, 0, 0x27C, 0x265 },
509 { 60, 0, 0x29C, 0x195 },
510 { 60, 0, 0x2BC, 133 },
511 { 60, 0, 0x2BC, 0x285 },
512 { 60, 0, 0x2DC, 0x175 },
513 { 60, 0, 0x2EC, 0x41D },
514 { 60, 0, 0x2FC, 0x2A5 },
515 { 60, 0, 0x31C, 245 },
516 { 60, 0, 0x33C, 0x225 },
517 { 52, 0, 0x35C, 0x1B5 },
518 { 60, 0, 0x36C, 0x2BD },
519 { 52, 0, 0x36C, 0x2FD },
520 { 60, 0, 0x36C, 0x33D },
521 { 60, 0, 0x3AC, 0x35D },
522 { 60, 0, 0x3BC, 0x145 },
523 { 60, 0, 0x3BC, 0x1A5 },
524 { 60, 0, 0x3CC, 0x38D },
525 { 52, 0, 0x3EC, 0x33D },
526 { 60, 0, 0x3EC, 0x3BD },
527 { 60, 0, 0x3FC, 0x2A5 },
528 { 52, 0, 0x42C, 0x39D },
529 { 52, 0, 0x43C, 133 },
530 { 52, 0, 0x43C, 0x245 },
531 { 60, 0, 0x44C, 0x40D },
532 { 60, 0, 0x45C, 0x1F5 },
533 { 60, 0, 0x48C, 0x34D },
534 { 60, 0, 0x49C, 0x1B5 },
535 { 52, 0, 0x4DC, 245 },
536 { 52, 0, 0x4DC, 0x1F5 },
537 { 60, 0, 0x4DC, 0x295 },
538 { 60, 0, 0x4EC, 0x35D },
539 { 60, 0, 0x4EC, 0x41D },
540 { 52, 0, 0x51C, 0x1B5 },
541 { 60, 0, 0x51C, 0x235 },
542 { 60, 0, 0x51C, 0x2B5 },
543 { 60, 0, 0x51C, 0x2F5 },
544 { 52, 0, 108, 0x2DC },
545 { 44, 0, 204, 0x40D },
546};
548 { 0, 6 }, { 1, 6 }, { 2, 68 }, { 1, 4 },
549 { 0, 4 }, { 255, 0 },
550};
552 { 0x12C, 18 }, { 1, 6 }, { 2, 6 }, { 3, 6 },
553 { 4, 6 }, { 5, 4 }, { 6, 4 }, { 7, 4 },
554 { 5, 4 }, { 6, 4 }, { 7, 4 }, { 5, 4 },
555 { 6, 4 }, { 7, 4 }, { 5, 4 }, { 6, 4 },
556 { 7, 4 }, { 4, 4 }, { 3, 4 }, { 2, 4 },
557 { 1, 4 }, { 255, 0x3E7 },
558};
572AreaBattle area1Battle0 = { 0, 0, MUSIC(1, 0) };
573AreaBattle area1Battle1 = { 0, 0, MUSIC(1, 0) };
574AreaBattle area1Battle2 = { 0, 0, MUSIC(1, 0) };
575AreaBattle area1Battle3 = { 0, 0, MUSIC(1, 0) };
576AreaBattle area1Battle4 = { 0, 0, MUSIC(1, 0) };
577AreaBattle area1Battle5 = { 0, 0, MUSIC(1, 0) };
578AreaBattle area1Battle6 = { 0, 0, MUSIC(1, 0) };
579AreaBattle area1Battle7 = { 0, 0, MUSIC(1, 0) };
585AreaBattle area2Battle0 = { 0, 0, MUSIC(1, 0) };
586AreaBattle area2Battle1 = { 0, 0, MUSIC(1, 0) };
587AreaBattle area2Battle2 = { 0, 0, MUSIC(1, 0) };
588AreaBattle area2Battle3 = { 0, 0, MUSIC(1, 0) };
589AreaBattle area2Battle4 = { 0, 0, MUSIC(1, 0) };
590AreaBattle area2Battle5 = { 0, 0, MUSIC(1, 0) };
591AreaBattle area2Battle6 = { 0, 0, MUSIC(1, 0) };
592AreaBattle area2Battle7 = { 0, 0, MUSIC(1, 0) };
598AreaBattle area3Battle0 = { 0, 0, MUSIC(1, 0) };
599AreaBattle area3Battle1 = { 0, 0, MUSIC(1, 0) };
600AreaBattle area3Battle2 = { 0, 0, MUSIC(1, 0) };
601AreaBattle area3Battle3 = { 0, 0, MUSIC(1, 0) };
602AreaBattle area3Battle4 = { 0, 0, MUSIC(1, 0) };
603AreaBattle area3Battle5 = { 0, 0, MUSIC(1, 0) };
604AreaBattle area3Battle6 = { 0, 0, MUSIC(1, 0) };
605AreaBattle area3Battle7 = { 0, 0, MUSIC(1, 0) };
615 { 0x200, 0x100, 0x21C, 0x1A6, 0x70, 0xA6, 0x230, 0x1FE },
616 { 0x200, 0x100, 0x200, 0x100, 0, 0, 0x220, 0x1FE },
617 { 0x200, 0x100, 0x216, 0x138, 0x58, 0x38, 0x200, 0x1FD },
618 { 0x200, 0x100, 0x208, 0x1BC, 0x20, 0xBC, 0x210, 0x1FD },
619 { 0x200, 0x100, 0x210, 0x1BC, 0x40, 0xBC, 0x220, 0x1FD },
620 { 0x200, 0x100, 0x200, 0x1BC, 0, 0xBC, 0x230, 0x1FD },
621 { 0x140, 0x100, 0x152, 0x1B1, 0x48, 0xB1, 0x170, 0x1F8 },
622 { 0x140, 0x100, 0x162, 0x1B1, 0x88, 0xB1, 0x140, 0x1F7 },
623 { 0x180, 0x100, 0x180, 0x100, 0x100, 0, 0x150, 0x1F7 },
624};
626 { NULL, NULL, 0x348 },
627 { NULL, NULL, 0 },
628};
630 { NULL, NULL, 0x348 },
631 { NULL, NULL, 0 },
632};
634 { NULL, NULL, 0x348 },
635 { NULL, NULL, 0 },
636};
637u16 actor0Conditions[] = { FLAG(0x1C, 0x3A), 0, CODES_END };
638u16 actor1Conditions[] = { FLAG(0x1C, 0x3B), 0, CODES_END };
639u16 actor2Conditions[] = { FLAG(0x1C, 0x3C), 0, CODES_END };
644 &actor0,
645 &actor1,
646 &actor2,
647 NULL,
648};
650 { 1, 2, 0x64, 6, 0x46, 0, 0, 0, 0, 0, 910, 80, 0, 0 },
651 { 1, 4, 0x64, 6, 0x46, 0, 0, 0, 0, 0, 1295, 80, 0, 0 },
652 { 1, 6, 0x64, 6, 0x46, 0, 0, 0, 0, 0, 1327, 256, 0, 0 },
653 { 1, 1, 0x64, 6, 0x47, 0, 0, 0, 0, 0, 910, 80, 0, 0 },
654 { 1, 3, 0x64, 6, 0x47, 0, 0, 0, 0, 0, 1295, 80, 0, 0 },
655 { 1, 5, 0x64, 6, 0x47, 0, 0, 0, 0, 0, 1327, 256, 0, 0 },
656 { 1, 0, 0xC8, 0xA, 0, 0, 0, 0, 0, 0, 26, 975, 0, 0 },
657 { 1, 0, 0xC8, 0xA, 0, 0, 0, 0, 0, 0, 47, 138, 0, 0 },
658 { 1, 0, 0xC8, 0xA, 0, 0, 0, 0, 0, 0, 123, 576, 0, 0 },
659 { 1, 0, 0xC8, 0xA, 0, 0, 0, 0, 0, 0, 125, 877, 0, 0 },
660 { 1, 0, 0xC8, 0xA, 0, 0, 0, 0, 0, 0, 195, 656, 0, 0 },
661 { 1, 0, 0xC8, 0xA, 0, 0, 0, 0, 0, 0, 231, 32, 0, 0 },
662 { 1, 0, 0xC8, 0xA, 0, 0, 0, 0, 0, 0, 307, 580, 0, 0 },
663 { 1, 0, 0xC8, 0xA, 0, 0, 0, 0, 0, 0, 431, 874, 0, 0 },
664 { 1, 0, 0xC8, 0xA, 0, 0, 0, 0, 0, 0, 486, 102, 0, 0 },
665 { 1, 0, 0xC8, 0xA, 0, 0, 0, 0, 0, 0, 532, 732, 0, 0 },
666 { 1, 0, 0xC8, 0xA, 0, 0, 0, 0, 0, 0, 549, 1020, 0, 0 },
667 { 1, 0, 0xC8, 0xA, 0, 0, 0, 0, 0, 0, 595, 820, 0, 0 },
668 { 1, 0, 0xC8, 0xA, 0, 0, 0, 0, 0, 0, 615, 349, 0, 0 },
669 { 1, 0, 0xC8, 0xA, 0, 0, 0, 0, 0, 0, 668, 33, 0, 0 },
670 { 1, 0, 0xC8, 0xA, 0, 0, 0, 0, 0, 0, 713, 235, 0, 0 },
671 { 1, 0, 0xC8, 0xA, 0, 0, 0, 0, 0, 0, 738, 837, 0, 0 },
672 { 1, 0, 0xC8, 0xA, 0, 0, 0, 0, 0, 0, 890, 262, 0, 0 },
673 { 1, 0, 0xC8, 0xA, 0, 0, 0, 0, 0, 0, 1037, 46, 0, 0 },
674 { 1, 0, 0xC8, 0xA, 0, 0, 0, 0, 0, 0, 1054, 329, 0, 0 },
675 { 1, 0, 0xC8, 0xA, 0, 0, 0, 0, 0, 0, 1108, 403, 0, 0 },
676 { 1, 0, 0xC8, 0xA, 0, 0, 0, 0, 0, 0, 1354, 1060, 0, 0 },
677 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
678};
680 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH, 0x2DD, 0x314, 0x41E, 5, 0, 0, 0 },
681 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH, 0x2DD, 0x13C, 0x3B6, 3, 0, 0, 0 },
682 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH, 0x2DD, 0x84, 0x196, 5, 0, 0, 0 },
683 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH, 0x2DD, 0x44C, 0x40E, 3, 0, 0, 0 },
684 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH, 0x2DD, 0x4C4, 0x1B6, 5, 0, 0, 0 },
685 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH, 0x2DD, 0x84, 0x10A, 7, 0, 0, 0 },
686 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH, 0x2DD, 0x3CC, 0x3A2, 1, 0, 0, 0 },
687 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH, 0x2DD, 0x15C, 0x346, 3, 0, 0, 0 },
688 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH, 0x2DD, 0x33C, 0x23A, 1, 0, 0, 0 },
689 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH, 0x2DD, 0x3EC, 0x3D2, 1, 0, 0, 0 },
690 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH, 0x2DD, 0x224, 0x226, 5, 0, 0, 0 },
691 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH, 0x2DD, 0x3AC, 0x372, 1, 0, 0, 0 },
692 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH, 0x2DD, 0x2E4, 0x286, 5, 0, 0, 0 },
693 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH, 0x2DD, 0x264, 0x246, 5, 0, 0, 0 },
694 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH, 0x2DD, 0x11C, 0x1D6, 3, 0, 0, 0 },
695 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH, 0x2DD, 0x324, 0x2A6, 5, 0, 0, 0 },
696 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH, 0x2DD, 0x51C, 0x24A, 1, 0, 0, 0 },
697 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH, 0x2DD, 0x2A4, 0x266, 5, 0, 0, 0 },
698 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH_OUT, 0x2DE, 0x189, 0x2DF, 3, 0, 0, 0 },
699 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH_OUT, 0x2DE, 0xCE, 0x283, 7, 0, 0, 0 },
700 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH, 0x2DD, 0x394, 0x33E, 5, 0, 0, 0 },
701 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH, 0x2DD, 0x12C, 0x2E2, 1, 0, 0, 0 },
702 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH_OUT, 0x2DE, 0x3F8, 0x117, 3, 0, 0, 0 },
703 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH_OUT, 0x2DE, 0x33E, 0xBA, 7, 0, 0, 0 },
704 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH, 0x2DD, 0x110, 0x3A0, 7, 0, 0, 0 },
705 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH, 0x2DD, 0x130, 0x330, 7, 0, 0, 0 },
706 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH_OUT, 0x2DE, 0x40C, 0x2D2, 1, 0, 0, 0 },
707 { { { FLAG(0x40, 0x6D), 0 }, { CODES_END, 0 } }, SLOT_EVENT, 0x3DE, 0, 0, 0, 0, 0, 0 },
708 { { { FLAG(0x40, 0x6E), 0 }, { CODES_END, 0 } }, SLOT_EVENT, 0x3E8, 0, 0, 0, 0, 0, 0 },
709 { { { FLAG_GUNSLINGER_1F_SOLDIER_SEEN, 0 }, { CODES_END, 0 } }, SLOT_EVENT, 0x3F2, 0, 0, 0, 0, 0, 0 },
710 { { { PROGRESS(STORY_OPERATION_SIGMA), 1 }, { CODES_END, 0 } }, SLOT_EVENT, 0x40B, 0, 0, 0, 0, 0, 0 },
711 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EVENT, 0x2329, 0, 0, 0, 0, 0, 0 },
712};
714 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH, 0x2DD, 0x11C, 0xAA, 1, 0, 0, 0 },
715 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH, 0x2DD, 0x394, 0x2D2, 7, 0, 0, 0 },
716 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH, 0x2DD, 0x48C, 0x34E, 3, 0, 0, 0 },
717 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH, 0x2DD, 0x45C, 0x20A, 1, 0, 0, 0 },
718 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH, 0x2DD, 0x3FC, 0x2A6, 3, 0, 0, 0 },
719 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH, 0x2DD, 0x184, 0xCA, 7, 0, 0, 0 },
720 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH, 0x2DD, 0x204, 0x12A, 7, 0, 0, 0 },
721 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH, 0x2DD, 0x104, 0x14A, 7, 0, 0, 0 },
722 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH, 0x2DD, 0x51C, 0x2CA, 1, 0, 0, 0 },
723 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH, 0x2DD, 0x1BC, 0x1A6, 3, 0, 0, 0 },
724 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH, 0x2DD, 0x51C, 0x30A, 1, 0, 0, 0 },
725 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH, 0x2DD, 0x84, 0xB6, 5, 0, 0, 0 },
726 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH, 0x2DD, 0x23C, 0x9A, 1, 0, 0, 0 },
727 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH, 0x2DD, 0xC4, 0xD6, 5, 0, 0, 0 },
728 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH, 0x2DD, 0x3E4, 0x1BA, 7, 0, 0, 0 },
729 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH, 0x2DD, 0x2BC, 0x9A, 1, 0, 0, 0 },
730 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH, 0x2DD, 0x4EC, 0x372, 1, 0, 0, 0 },
731 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH, 0x2DD, 0x1A4, 0x9A, 7, 0, 0, 0 },
732 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH, 0x2DD, 0x4EC, 0x41E, 3, 0, 0, 0 },
733 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH, 0x2DD, 0x304, 0x18A, 7, 0, 0, 0 },
734 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH, 0x2DD, 0x100, 0x2F8, 5, 0, 0, 0 },
735 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EVENT, 0x2328, 0, 0, 0, 0, 0, 0 },
736 { { { CODES_END, 0 }, { CODES_END, 0 } }, 0, 0, 0, 0, 0, 0, 0, 0 },
737};
738void (*stageFuncs[])(void) = {
740};
742 { 990, script990, EVENT_TEXT(6), NULL, endEvent990 },
743 { 1000, script1000, EVENT_TEXT(7), NULL, endEvent1000 },
744 { 1010, script1010, EVENT_TEXT(8), NULL, endEvent1010 },
745 { 1035, script1035, EVENT_TEXT(0xB), NULL, endEvent1035 },
746 { 9000, NULL, 0, startEvent9000, NULL },
747 { 9001, NULL, 0, startEvent9001, NULL },
748 { -1, NULL, 0, NULL, NULL },
749};
#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
StageEffect * createStageEffect(s32 x, s32 y, s32 frame)
Creates a StageEffect at (x, y) with its sprites' frames from FRAME.
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 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 SLOT_LAUNCH
sends the player flying (FIELDSTG_launchActor)
Definition field_map.h:267
#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 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 FIELD_COMMAND_PLAY_SWITCH03
Definition field_map.h:67
#define FIELD_COMMAND_PLAY_TRAP_OFF
Definition field_map.h:64
#define SCRIPT_WAIT_BOX
until box 0 closes
Definition field_map.h:167
#define SLOT_LAUNCH_OUT
the same, then leaves for mode arg
Definition field_map.h:268
#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 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 PROGRESS(n)
GAME.progress is n.
Definition game_state.h:69
#define FLAG(group, id)
The codes of the (code, value) pairs that FLAGS_00 checks as conditions and applies as actions (event...
Definition game_state.h:68
#define MUSIC_BATTLE
BATL0000: the maps' random battles (AreaBattle, nearly all of them)
Definition sound.h:76
#define MUSIC(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_GUNSLINGER
BGM_0026: the Gunslinger (the Spy Satellite)
Definition sound.h:102
#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,...
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 ...
@ STORY_OPERATION_SIGMA
WSTAG311 (A.o.A Headquarters, Amaterasu City), event 982, after event 981, where the A....
Definition story.h:141
@ STORY_GUNSLINGER
WSTAG810 (Gunslinger 1F), event 1035.
Definition story.h:143
#define FLAG_GUNSLINGER_1F_SOLDIER_SEEN
wstag810 event 1010: a Metal Soldier sounds the intruder alert in Gunslinger 1F; set at its end,...
Definition story.h:1505
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 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 altTriggers
Definition game_state.h:576
s32 clearTempFlags
Definition game_state.h:573
A sprite effect a stage creates at (x, y) with the given frame, by kind.
Definition stage.h:290
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
StageTile * tile
Definition stage.h:109
AnimState anim
Definition stage.h:110
StageTilePair with byte flags, for the map objects of two given animations.
Definition stage.h:206
StageTileAnim anims[2]
Definition stage.h:211
s16 anim
the map objects' animations: anim and anim + 1
Definition stage.h:210
u8 done
1: start in TASK_DONE
Definition stage.h:209
void(* nextState)(struct StageTilePairN *task)
Definition stage.h:207
void(* setState)(struct StageTilePairN *task, s32 state)
Definition stage.h:207
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 * 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
u16 actor1Conditions[]
Definition wstag810.c:638
AreaBattle area2Battle7
Definition wstag810.c:592
FieldActorEntry actor0
Definition wstag810.c:640
void updateTilePairN(StageTilePairN *task)
Shows the first map object animated while running; when done, both.
Definition wstag810.c:25
void(* stageFuncs[])(void)
The stage's functions (common/start_stage.inc.c calls the first): a StageFuncs in the stages with a t...
Definition wstag810.c:738
StageSlot stageSlots1[]
Definition wstag810.c:713
void handleCommands842To844(StageTilePairN *task, s32 id)
Plays the first map object's one-shot animation when the event of map object 0x35B happens.
Definition wstag810.c:104
s16 script1010[]
Definition wstag810.c:384
FieldTalk actor2Talks[]
Definition wstag810.c:633
AreaBattle area2Battle6
Definition wstag810.c:591
AnimFrame updateTilePairNFrames0[]
Defined below, after the code that uses them.
Definition wstag810.c:470
void * startEvent9000(void)
Puts back the first triggers map when GAME.altTriggers is set, and clears it.
Definition wstag810.c:191
AnimFrame effectClutFrames[]
Definition wstag810.c:547
AreaBattle area1Battle6
Definition wstag810.c:578
AnimFrame updateTilePairNFrames1[]
Definition wstag810.c:479
void endEvent1010(void)
After event 1010, with the player: sets flag 0x1C3C (which decides whether actor 2 appears) and keeps...
Definition wstag810.c:232
s16 script1000[]
Definition wstag810.c:332
AreaBattle area0Battle7
Definition wstag810.c:566
FieldActorEntry actor2
Definition wstag810.c:642
void endEvent1035(void)
After event 1035, with the player: moves the story on to STORY_GUNSLINGER.
Definition wstag810.c:238
s16 script990[]
Definition wstag810.c:280
AreaBattle area3Battle4
Definition wstag810.c:602
AreaBattle area3Battle3
Definition wstag810.c:601
AreaBattle area0Battle1
Definition wstag810.c:560
AreaBattle area2Battle0
Definition wstag810.c:585
FieldActorEntry * stageActors[]
Definition wstag810.c:643
s16 script1035[]
Definition wstag810.c:436
AreaBattle area1Battle2
Definition wstag810.c:574
void * createTilePairN1(s32 arg)
Creates the tile pair object of animations 1 and 2.
Definition wstag810.c:123
AreaBattle area3Battle0
Definition wstag810.c:598
AreaBattle area0Battle6
Definition wstag810.c:565
FieldTalk actor1Talks[]
Definition wstag810.c:629
AreaBattle area3Battle2
Definition wstag810.c:600
FieldTalk actor0Talks[]
Definition wstag810.c:625
AreaBattle area3Battle1
Definition wstag810.c:599
AreaBattle area0Battle3
Definition wstag810.c:562
AreaBattle area3Battle6
Definition wstag810.c:604
void endEvent990(void)
After event 990, with the player: sets flag 0x1C3A (which decides whether actor 0 appears) and keeps ...
Definition wstag810.c:214
ActorImage stageImages[]
Definition wstag810.c:614
void setupStage(void)
Sets the stage up: its map, actors, battles and events, playing BGM_0026, with the first triggers map...
Definition wstag810.c:254
void * createTilePairNDone(s32 anim)
Creates the tile pair object of animations anim and anim + 1, started in TASK_DONE.
Definition wstag810.c:138
AnimFrame effectFrames[]
Definition wstag810.c:551
AreaBattle area2Battle4
Definition wstag810.c:589
StageEffectSpot updateStageSpots[]
Definition wstag810.c:483
StageTile stageObjects[]
The tables and color setupStage gives FIELDSTG_state (FieldState)
Definition wstag810.c:649
AnimFrame updateTilePairNFrames2[]
Definition wstag810.c:473
BattleList area3Battles
Definition wstag810.c:606
AreaBattle area3Battle5
Definition wstag810.c:603
AreaBattle area0Battle5
Definition wstag810.c:564
BattleList area1Battles
Definition wstag810.c:580
BattleList area2Battles
Definition wstag810.c:593
AreaBattle area1Battle4
Definition wstag810.c:576
AreaBattle area2Battle2
Definition wstag810.c:587
AreaBattle area1Battle5
Definition wstag810.c:577
StageSlot stageSlots0[]
Definition wstag810.c:679
AreaBattle area2Battle1
Definition wstag810.c:586
AreaBattle area1Battle3
Definition wstag810.c:575
void * createTilePairN3(s32 arg)
Creates the tile pair object of animations 3 and 4.
Definition wstag810.c:128
AreaBattle area1Battle0
Definition wstag810.c:572
FieldActorEntry actor1
Definition wstag810.c:641
AreaBattle area0Battle0
Definition wstag810.c:559
AreaBattle area0Battle2
Definition wstag810.c:561
#define STAGE_FILE
Definition wstag810.c:11
AreaBattle area2Battle5
Definition wstag810.c:590
static void * createTilePairN(s32 arg, s32 anim)
Creates the tile pair object of animations ANIM and ANIM + 1 with the id ARG.
Definition wstag810.c:114
AreaBattle area1Battle1
Definition wstag810.c:573
AreaBattle area2Battle3
Definition wstag810.c:588
void * startEvent9001(void)
Switches to the second triggers map when GAME.altTriggers is clear, and sets it.
Definition wstag810.c:201
u16 actor2Conditions[]
Definition wstag810.c:639
void endEvent1000(void)
After event 1000, with the player: sets flag 0x1C3B (which decides whether actor 1 appears) and keeps...
Definition wstag810.c:223
AreaBattle area0Battle4
Definition wstag810.c:563
#define STAGE_TEXT
Definition wstag810.c:246
AreaBattle area3Battle7
Definition wstag810.c:605
BattleList area0Battles
Definition wstag810.c:567
AreaBattle area1Battle7
Definition wstag810.c:579
void * createTilePairN5(s32 arg)
Creates the tile pair object of animations 5 and 6.
Definition wstag810.c:133
FieldBattles stageBattles[]
Definition wstag810.c:611
FieldEvent stageEvents[]
Definition wstag810.c:741
u16 actor0Conditions[]
Definition wstag810.c:637