Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
wstag421.c
Go to the documentation of this file.
1/*
2 * WSTAG421: Qing Long City, East Sector. On the Amaterasu server; its Asuka
3 * server twin is WSTAG420.
4 */
5
6#include "common.h"
7#include "field/stage.h"
8
9/*
10 * Cycles the frames of the map objects with animation 1 if flag
11 * 0x1A0A, and creates the event object of story progress 0x1B
12 */
13void updateStage(StageTask *task, void **children) {
14 StageTile *tile;
15 s32 set;
16
17 switch (task->state) {
18 case TASK_INIT:
19 default:
21 for (tile = FIELDSTG_state.objects; tile->margin != 0; tile++) {
22 if (tile->anim == 1) {
23 tile->cycle = set;
24 }
25 }
28 children[0] = FIELDSTG_startEvent(0x2E5);
29 } else if (FLAGS_00.checkCondition(FLAG(0x40, 0xA7), 1)) {
30 children[0] = FIELDSTG_startEvent(0x2E7);
31 }
32 }
33 task->nextState(task);
34 break;
35 case TASK_RUN:
36 case TASK_DONE:
37 case TASK_KILL:
38 break;
39 }
40}
41
42#define STAGE_CHILDREN_SIZE 4
44
45/*
46 * After event 740, with Qing Long Chief: starts the stage's event battle 0
47 * and keeps it from playing again
48 */
53
54/*
55 * After event 741, with the player: gives the player the Blue ID Pass and
56 * keeps it from playing again
57 */
58void endEvent741(void) {
59 FLAGS_00.applyAction(ITEM(0, 0x16), 1);
60 FLAGS_00.applyAction(FLAG(0x40, 0xA7), 1);
61}
62
63/* After event 743, with the player: moves the story on to STORY_BLUE_ID_PASS */
67
68#if VERSION_US || VERSION_JP
69#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_03)
70#define EVENT_TEXT_FILE (TEXT_EVENTS_400 - 1)
71#define STAGE_FILE 0x778
72#elif VERSION_EU
73#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_03)
74#define EVENT_TEXT_FILE (TEXT_EVENTS_400 - 1)
75#define STAGE_FILE 0x787
76#endif
77/*
78 * Sets the stage up: its map, actors, battles and events, playing SEIR_BGM;
79 * BGM_0029 instead except at STORY_PRESIDENT_ARRESTED once flag 0x1A0A is set
80 */
104
106 SCRIPT_WALK(2, 0x180, 0xDA, 1),
107 SCRIPT_PLACE(0xD2, 0x160, 0xEA),
108 SCRIPT_POSE(0xD2, 1, 5),
111 SCRIPT_POSE(2, 1, 1),
112 SCRIPT_WAIT(0x1E),
113 SCRIPT_TALK(0, 1, 0xD2, 1),
115 SCRIPT_WAIT(0x1E),
116 SCRIPT_TALK(0, 2, 2, 0),
117 SCRIPT_POSE(2, 7, 1),
119 SCRIPT_POSE(2, 1, 1),
120 SCRIPT_WAIT(0x1E),
121 SCRIPT_TALK(0, 3, 0xD2, 1),
123 SCRIPT_WAIT(0x1E),
124 SCRIPT_TALK(0, 4, 2, 0),
125 SCRIPT_POSE(2, 7, 1),
127 SCRIPT_POSE(2, 1, 1),
128 SCRIPT_WAIT(0x1E),
129 SCRIPT_TALK(0, 5, 0xD2, 1),
131 SCRIPT_WAIT(0x1E),
133};
135 SCRIPT_PLACE(2, 0x180, 0xDA),
136 SCRIPT_POSE(2, 1, 1),
137 SCRIPT_PLACE(0x13C, 0x160, 0xEA),
138 SCRIPT_POSE(0x13C, 1, 7),
139 SCRIPT_WAIT(0x78),
140 SCRIPT_TALK(0, 1, 2, 0),
142 SCRIPT_WAIT(0x1E),
143 SCRIPT_WAIT(0x3C),
144 SCRIPT_COMMAND(0x323, 0x325, 2),
145 SCRIPT_WAIT(0x3C),
146 SCRIPT_COMMAND(0x323, 0x326, 2),
147 SCRIPT_WAIT(0x1E),
148 SCRIPT_TALK(0, 2, 2, 0),
150 SCRIPT_WAIT(0x1E),
151 SCRIPT_WALK(2, 0x168, 0xE6, 1),
153 SCRIPT_WAIT(0x1E),
154 SCRIPT_PLACE(0x13C, 0, 0),
155 SCRIPT_POSE(0x13C, 1, 5),
156 SCRIPT_WAIT(0x1E),
157 SCRIPT_TALK(0, 4, 2, 0),
160 SCRIPT_WAIT(0x1E),
161 SCRIPT_TALK(0, 3, 2, 0),
163 SCRIPT_WAIT(0x1E),
164 SCRIPT_LEAVE(0x2D7, 1, 1, 0),
166};
168 SCRIPT_PLACE(2, 0x180, 0xDA),
169 SCRIPT_POSE(2, 1, 1),
170 SCRIPT_WAIT(0x78),
171 SCRIPT_TALK(0, 1, 2, 0),
173 SCRIPT_POSE(2, 1, 5),
174 SCRIPT_WAIT(0x1E),
175 SCRIPT_WALK(2, 0x1E8, 0xA4, 5),
176 SCRIPT_WAIT(0x3C),
177 SCRIPT_LEAVE(0x29E, 0xC8, 0x1A4, 5),
179};
180AreaBattle area0Battle0 = { 0, 0, MUSIC(1, 0) };
181AreaBattle area0Battle1 = { 0, 0, MUSIC(1, 0) };
182AreaBattle area0Battle2 = { 0, 0, MUSIC(1, 0) };
183AreaBattle area0Battle3 = { 0, 0, MUSIC(1, 0) };
184AreaBattle area0Battle4 = { 0, 0, MUSIC(1, 0) };
185AreaBattle area0Battle5 = { 0, 0, MUSIC(1, 0) };
186AreaBattle area0Battle6 = { 0, 0, MUSIC(1, 0) };
187AreaBattle area0Battle7 = { 0, 0, MUSIC(1, 0) };
193AreaBattle area1Battle0 = { 0, 0, MUSIC(1, 0) };
194AreaBattle area1Battle1 = { 0, 0, MUSIC(1, 0) };
195AreaBattle area1Battle2 = { 0, 0, MUSIC(1, 0) };
196AreaBattle area1Battle3 = { 0, 0, MUSIC(1, 0) };
197AreaBattle area1Battle4 = { 0, 0, MUSIC(1, 0) };
198AreaBattle area1Battle5 = { 0, 0, MUSIC(1, 0) };
199AreaBattle area1Battle6 = { 0, 0, MUSIC(1, 0) };
200AreaBattle area1Battle7 = { 0, 0, MUSIC(1, 0) };
206AreaBattle area2Battle0 = { 0, 0, MUSIC(1, 0) };
207AreaBattle area2Battle1 = { 0, 0, MUSIC(1, 0) };
208AreaBattle area2Battle2 = { 0, 0, MUSIC(1, 0) };
209AreaBattle area2Battle3 = { 0, 0, MUSIC(1, 0) };
210AreaBattle area2Battle4 = { 0, 0, MUSIC(1, 0) };
211AreaBattle area2Battle5 = { 0, 0, MUSIC(1, 0) };
212AreaBattle area2Battle6 = { 0, 0, MUSIC(1, 0) };
213AreaBattle area2Battle7 = { 0, 0, MUSIC(1, 0) };
221AreaBattle area3Battle2 = { 0, 0, MUSIC(1, 0) };
222AreaBattle area3Battle3 = { 0, 0, MUSIC(1, 0) };
223AreaBattle area3Battle4 = { 0, 0, MUSIC(1, 0) };
224AreaBattle area3Battle5 = { 0, 0, MUSIC(1, 0) };
225AreaBattle area3Battle6 = { 0, 0, MUSIC(1, 0) };
226AreaBattle area3Battle7 = { 0, 0, MUSIC(1, 0) };
236 { 0x200, 0x100, 0x21C, 0x1A6, 0x70, 0xA6, 0x230, 0x1FE },
237 { 0x200, 0x100, 0x200, 0x100, 0, 0, 0x220, 0x1FE },
238 { 0x200, 0x100, 0x216, 0x138, 0x58, 0x38, 0x200, 0x1FD },
239 { 0x200, 0x100, 0x208, 0x1BC, 0x20, 0xBC, 0x210, 0x1FD },
240 { 0x200, 0x100, 0x210, 0x1BC, 0x40, 0xBC, 0x220, 0x1FD },
241 { 0x200, 0x100, 0x200, 0x1BC, 0, 0xBC, 0x230, 0x1FD },
242 { 0x180, 0x100, 0x180, 0x1BB, 0x100, 0xBB, 0x140, 0x1FF },
243 { 0x180, 0x100, 0x188, 0x1BB, 0x120, 0xBB, 0x150, 0x1FF },
244 { 0x1C0, 0x100, 0x1DE, 0x100, 0x278, 0, 0x160, 0x1FF },
245 { 0x180, 0x100, 0x1AA, 0x1BB, 0x1A8, 0xBB, 0x170, 0x1FF },
246 { 0x180, 0x100, 0x1B2, 0x1BB, 0x1C8, 0xBB, 0x140, 0x1FE },
247 { 0x180, 0x100, 0x190, 0x1CF, 0x140, 0xCF, 0x150, 0x1FE },
248 { 0x180, 0x100, 0x198, 0x1CF, 0x160, 0xCF, 0x160, 0x1FE },
249 { 0x1C0, 0x100, 0x1E6, 0x100, 0x298, 0, 0x170, 0x1FE },
250 { 0x1C0, 0x100, 0x1EE, 0x100, 0x2B8, 0, 0x140, 0x1FD },
251 { 0x1C0, 0x100, 0x1C0, 0x100, 0x200, 0, 0x150, 0x1FD },
252 { 0x1C0, 0x100, 0x1C6, 0x100, 0x218, 0, 0x160, 0x1FD },
253 { 0x1C0, 0x100, 0x1CE, 0x100, 0x238, 0, 0x170, 0x1FD },
254 { 0x1C0, 0x100, 0x1D6, 0x100, 0x258, 0, 0x140, 0x1FC },
255 { 0x1C0, 0x100, 0x1F6, 0x100, 0x2D8, 0, 0x150, 0x1FC },
256 { 0x1C0, 0x100, 0x1DE, 0x120, 0x278, 0x20, 0x160, 0x1FC },
257 { 0x1C0, 0x100, 0x1E6, 0x120, 0x298, 0x20, 0x170, 0x1FC },
258 { 0x1C0, 0x100, 0x1EE, 0x120, 0x2B8, 0x20, 0x140, 0x1FB },
259 { 0x1C0, 0x100, 0x1F6, 0x120, 0x2D8, 0x20, 0x150, 0x1FB },
260 { 0x180, 0x100, 0x1A0, 0x1AC, 0x180, 0xAC, 0x160, 0x1FB },
261 { 0x180, 0x100, 0x1B0, 0x12E, 0x1C0, 0x2E, 0x170, 0x1FB },
262};
266 { NULL, NULL, 0x10D },
267 { NULL, NULL, 0 },
268};
270 { NULL, NULL, 0x10F },
271 { NULL, NULL, 0 },
272};
274 { NULL, NULL, 0x10B },
275 { NULL, NULL, 0 },
276};
278 { NULL, NULL, 0x108 },
279 { NULL, NULL, 0 },
280};
282 { NULL, NULL, 0x115 },
283 { NULL, NULL, 0 },
284};
286 { NULL, NULL, 0x111 },
287 { NULL, NULL, 0 },
288};
290 { NULL, NULL, 0x114 },
291 { NULL, NULL, 0 },
292};
294 { NULL, NULL, 0x105 },
295 { NULL, NULL, 0 },
296};
298 { NULL, NULL, 0x113 },
299 { NULL, NULL, 0 },
300};
302 { NULL, NULL, 0x116 },
303 { NULL, NULL, 0 },
304};
306 { NULL, NULL, 0x1CF },
307 { NULL, NULL, 0 },
308};
310 { actor11Talk0Conditions, NULL, 0x1D0 },
311 { actor11Talk1Conditions, NULL, 0x1D1 },
312 { NULL, NULL, 0 },
313};
315 { NULL, NULL, 0x112 },
316 { NULL, NULL, 0 },
317};
319 { NULL, NULL, 0x104 },
320 { NULL, NULL, 0 },
321};
323 { NULL, NULL, 0x10E },
324 { NULL, NULL, 0 },
325};
327 { NULL, NULL, 0x110 },
328 { NULL, NULL, 0 },
329};
331 { NULL, NULL, 0x10A },
332 { NULL, NULL, 0 },
333};
335 { NULL, NULL, 0x107 },
336 { NULL, NULL, 0 },
337};
339 { NULL, NULL, 0x106 },
340 { NULL, NULL, 0 },
341};
343 { NULL, NULL, 0x10C },
344 { NULL, NULL, 0 },
345};
347 { NULL, NULL, 0x109 },
348 { NULL, NULL, 0 },
349};
351 { NULL, NULL, 0x103 },
352 { NULL, NULL, 0 },
353};
411FieldActorEntry actor6 = { actor6Conditions, actor6Talks, 0x38, 0xA, 882, 585, 3 };
412FieldActorEntry actor7 = { actor7Conditions, actor7Talks, 0x39, 0xB, 882, 585, 3 };
413FieldActorEntry actor8 = { actor8Conditions, actor8Talks, 0x3A, 0xC, 914, 344, 1 };
414FieldActorEntry actor9 = { actor9Conditions, actor9Talks, 0x66, 0xD, 553, 461, 1 };
427FieldActorEntry actor22 = { actor22Conditions, NULL, 0x13C, 0x17, 0, 0, 1 };
429 &actor0,
430 &actor1,
431 &actor2,
432 &actor3,
433 &actor4,
434 &actor5,
435 &actor6,
436 &actor7,
437 &actor8,
438 &actor9,
439 &actor10,
440 &actor11,
441 &actor12,
442 &actor13,
443 &actor14,
444 &actor15,
445 &actor16,
446 &actor17,
447 &actor18,
448 &actor19,
449 &actor20,
450 &actor21,
451 &actor22,
452 NULL,
453};
455 { 1, 1, 0x4A, 2, 0, 1, 0, 3, 6, 0, 441, 290, 0, 0 },
456 { 1, 1, 0x4A, 2, 0, 1, 0, 3, 6, 0, 817, 114, 0, 0 },
457 { 1, 1, 0x4A, 2, 0, 1, 0, 3, 6, 0, 949, 528, 0, 0 },
458 { 1, 1, 0x40, 2, 4, 1, 4, 7, 4, 0, 366, 274, 0, 0 },
459 { 1, 1, 0x40, 2, 4, 1, 4, 7, 4, 0, 446, 241, 0, 0 },
460 { 1, 1, 0x40, 2, 4, 1, 4, 7, 4, 0, 1129, 333, 0, 0 },
461 { 1, 0, 0x80, 2, 0x24, 0, 0, 0, 0, 0, 469, 191, 0, 0 },
462 { 1, 0, 0x80, 2, 0x25, 0, 0, 0, 0, 0, 256, 161, 0, 0 },
463 { 1, 1, 0x40, 6, 8, 1, 8, 0xB, 4, 0, 411, 424, 0, 0 },
464 { 1, 1, 0x40, 6, 8, 1, 8, 0xB, 4, 0, 538, 379, 0, 0 },
465 { 1, 1, 0x40, 6, 8, 1, 8, 0xB, 4, 0, 568, 341, 0, 0 },
466 { 1, 1, 0x40, 6, 8, 1, 8, 0xB, 4, 0, 607, 347, 0, 0 },
467 { 1, 1, 0x40, 6, 8, 1, 8, 0xB, 4, 0, 976, 215, 0, 0 },
468 { 1, 1, 0x40, 6, 0xC, 1, 0xC, 0xF, 4, 0, 544, 363, 0, 0 },
469 { 1, 1, 0x40, 6, 0xC, 1, 0xC, 0xF, 4, 0, 579, 380, 0, 0 },
470 { 1, 1, 0x40, 6, 0xC, 1, 0xC, 0xF, 4, 0, 884, 243, 0, 0 },
471 { 1, 1, 0x40, 6, 0xC, 1, 0xC, 0xF, 4, 0, 913, 244, 0, 0 },
472 { 1, 1, 0x40, 6, 0xC, 1, 0xC, 0xF, 4, 0, 1020, 218, 0, 0 },
473 { 1, 0x65, 0x40, 6, 0x1B, 0, 0, 0, 0, 0, 721, 200, 0, 0 },
474 { 1, 0x64, 0x40, 6, 0x1C, 0, 0, 0, 0, 0, 451, 367, 0, 0 },
475 { 1, 0, 0x78, 6, 0x26, 0, 0, 0, 0, 0, 721, 200, 0, 0 },
476 { 1, 0, 0x80, 6, 0x27, 0, 0, 0, 0, 0, 451, 367, 0, 0 },
477 { 1, 1, 0x40, 4, 8, 1, 8, 0xB, 4, 0, 448, 405, 445, 0 },
478 { 1, 1, 0x40, 4, 0xC, 1, 0xC, 0xF, 4, 0, 465, 438, 464, 0 },
479 { 1, 1, 0x40, 4, 0xC, 1, 0xC, 0xF, 4, 0, 737, 256, 281, 0 },
480 { 1, 0, 0x64, 4, 0x1D, 0, 0, 0, 0, 0, 784, 496, 560, 0 },
481 { 1, 0, 0x64, 4, 0x1E, 0, 0, 0, 0, 0, 768, 488, 552, 0 },
482 { 1, 0, 0x64, 4, 0x1F, 0, 0, 0, 0, 0, 752, 480, 544, 0 },
483 { 1, 0, 0x64, 4, 0x20, 0, 0, 0, 0, 0, 736, 472, 536, 0 },
484 { 1, 0, 0x64, 4, 0x21, 0, 0, 0, 0, 0, 720, 464, 528, 0 },
485 { 1, 0, 0x64, 4, 0x22, 0, 0, 0, 0, 0, 704, 456, 520, 0 },
486 { 1, 0, 0x64, 4, 0x23, 0, 0, 0, 0, 0, 672, 456, 496, 0 },
487 { 1, 0, 0x40, 4, 0x18, 0, 0, 0, 0, 0, 898, 552, 576, 0 },
488 { 1, 0, 0x40, 4, 0x19, 0, 0, 0, 0, 0, 727, 258, 280, 0 },
489 { 1, 0, 0x40, 4, 0x1A, 0, 0, 0, 0, 0, 447, 408, 444, 0 },
490 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
491};
493 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x298, 0x448, 0xF8, 1, 0, 0, 0 },
494 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x29E, 0xC8, 0x1A4, 5, 0, 0, 0 },
495 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x29E, 0x1B8, 0x204, 3, 0x65, 0, 0 },
496 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x29D, 0x208, 0x1AC, 3, 0x64, 0, 0 },
497 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x29F, 0x1A7, 0x254, 3, 0, 0, 0 },
498 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_CLIMB_DOWN, 6, 0x400, 0x120, 0, 0, 0, 0 },
499 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_CLIMB_UP, 6, 0x410, 0x188, 0, 0, 0, 0 },
500 { { { FLAG_QING_LONG_CHIEF_WIN_SEEN, 0 }, { CODES_END, 0 } }, SLOT_EVENT, 0x2E4, 0, 0, 0, 0, 0, 0 },
501 { { { CODES_END, 0 }, { CODES_END, 0 } }, 0, 0, 0, 0, 0, 0, 0, 0 },
502};
503void (*stageFuncs[])(void) = {
505};
507 { 740, script740, EVENT_TEXT(0x29), NULL, endEvent740 },
508 { 741, script741, EVENT_TEXT(0x2A), NULL, endEvent741 },
509 { 743, script743, EVENT_TEXT(0x2B), NULL, endEvent743 },
510 { -1, NULL, 0, NULL, NULL },
511};
#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
GameFlags FLAGS_00
The flag bitset FLAGS_00 and the event functions.
Definition events.c:701
GameState GAME
The save data, the game mode and the methods.
Definition state.c:64
#define TASK_RUN
Definition task.h:35
#define TASK_KILL
Definition task.h:37
#define TASK_INIT
Tasks: every game object is a task, a heap block that starts with this header and is updated once per...
Definition task.h:34
#define TASK_DONE
Definition task.h:36
EventTask * FIELDSTG_startEvent(s32 id)
Starts the event id of FieldState.events: its script, start and end, and its text; the player stands ...
Definition event.c:250
The stage overlays (AAA/PRO/WSTAG###.PRO), loaded at 0x800A4CA4 on top of FIELDSTG.
#define EVENT_TEXT(n)
An entry of the stage's events' text file, for FieldEvent.text.
Definition stage.h:732
void updateStage()
The names every stage defines, each its own (config/<version>/stages/<stage>.txt).
#define SLOT_CLIMB_UP
Definition field_map.h:256
#define SCRIPT_WAIT_WALK(id)
until the character gets to its goal
Definition field_map.h:168
#define FIELD_COMMAND_HALT_PARTNERS
The field commands, which an event script hands FIELD_TASK_COMMANDS as the first argument of a pose c...
Definition field_map.h:41
#define SCRIPT_END
The commands of an event script (FieldEvent.script), as FIELDSTG_runEvent reads them: a halfword kind...
Definition field_map.h:156
#define SCRIPT_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 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 SCRIPT_PLACE(id, x, y)
puts a character at (x, y)
Definition field_map.h:157
#define SCRIPT_TALK(box, entry, id, kind)
box of the event's boxes shows the event text's entry: a talk box at the corner kind next to the char...
Definition field_map.h:165
FieldMap FIELDSTG_map
Definition fieldstg.c:3660
FieldState FIELDSTG_state
Definition fieldstg.c:2641
#define EVENT_BATTLE(id)
action: FIELDSTG_battleFuncs.startEventBattle
Definition game_state.h:72
#define CODES_END
Definition game_state.h:83
#define 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
#define MUSIC_SEIRYU_CITY
SEIR_BGM: Seiryu City.
Definition sound.h:86
#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
FIELDSTG's start of the stage (StageEntry.init in FIELDSTG_stages): the stage's task,...
#define FLAG_OINKMON_CITIZENS_RESTORED
wstag435 Gale Tower: Airdramon spins the windmill and turns everyone back from Oinkmon; tested in 62 ...
Definition story.h:1031
#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_BLUE_ID_PASS
WSTAG421 (Qing Long City), event 743: with the Blue ID Pass a Trooper takes the player for the Qing L...
Definition story.h:109
@ STORY_JUNGLE_SOUND
WSTAG545 (Bug Maze Pit), event 711: Patamon heard a weird sound from the jungle, where its leader wen...
Definition story.h:106
@ STORY_MOVIE_BATTLES
WSTAG820, event 1080, with Snatchmon: each encounter plays MODE_BATTLE_MOVIE first.
Definition story.h:146
#define SPECIAL_STORY_ASUKA_HEADQUARTERS_TO_OPERATION_SIGMA
GAME.progress is from STORY_ASUKA_HEADQUARTERS to STORY_OPERATION_SIGMA (PROGRESS_RANGES[0x13])
Definition story.h:1920
#define FLAG_QING_LONG_CHIEF_WIN_SEEN
wstag421 event 740: "Yeah, I beat Qing Long Chief!"; set at its end, tested 0 to show Qing Long Chief...
Definition story.h:1559
#define SPECIAL_STORY_JUNGLE_SOUND_TO_PRESIDENT_ARRESTED
GAME.progress is from STORY_JUNGLE_SOUND to STORY_PRESIDENT_ARRESTED (PROGRESS_RANGES[0x17])
Definition story.h:1932
#define SPECIAL_STORY_BLUE_ID_PASS_TO_AMATERASU_BRIDGE
GAME.progress is from STORY_BLUE_ID_PASS to STORY_AMATERASU_BRIDGE (PROGRESS_RANGES[0x18])
Definition story.h:1935
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
s32 textFile
the stage's text file, for the talks
Definition field_map.h:461
union FieldState::@12 images
s32 music
SOUND.playSound's, or 0.
Definition field_map.h:460
What a character says (FIELDSTG_runActorAction): the first whose conditions hold, or the last,...
Definition field_map.h:176
void(* applyAction)(s32 code, s32 value)
Definition game_state.h:52
s32(* checkCondition)(u16 code, u16 value)
Definition game_state.h:53
What the player can trigger on a map (FIELDSTG_updateTriggers): a record of the table at FieldState....
Definition field_map.h:276
The task a stage starts (startStage), updated by its updateStage.
Definition stage.h:26
void(* nextState)(struct StageTask *task)
Definition stage.h:27
s32 state
Definition stage.h:27
An object of a map, which FIELDSTG draws: a record of the table at FieldState.objects,...
Definition field_map.h:208
u8 margin
how far off the view it is still drawn; 0 ends the table
Definition field_map.h:214
u8 anim
which of a stage's animations sets frame (1-3); FIELDSTG finds objects by it (its lift,...
Definition field_map.h:210
u8 cycle
1 cycles the frame, 2 the CLUT row, 3 the row back and forth
Definition field_map.h:217
Definition gfx.h:352
u16 actor1Conditions[]
Definition wstag421.c:355
AreaBattle area2Battle7
Definition wstag421.c:213
FieldActorEntry actor0
Definition wstag421.c:405
void endEvent741(void)
After event 741, with the player: gives the player the Blue ID Pass and keeps it from playing again.
Definition wstag421.c:58
void(* stageFuncs[])(void)
The stage's functions (common/start_stage.inc.c calls the first): a StageFuncs in the stages with a t...
Definition wstag421.c:503
FieldActorEntry actor6
Definition wstag421.c:411
u16 actor11Conditions[]
Definition wstag421.c:381
FieldTalk actor2Talks[]
Definition wstag421.c:273
AreaBattle area2Battle6
Definition wstag421.c:212
u16 actor10Conditions[]
Definition wstag421.c:380
u16 actor18Conditions[]
Definition wstag421.c:400
FieldActorEntry actor17
Definition wstag421.c:422
FieldTalk actor14Talks[]
Definition wstag421.c:322
FieldActorEntry actor18
Definition wstag421.c:423
FieldTalk actor5Talks[]
Definition wstag421.c:285
AreaBattle area1Battle6
Definition wstag421.c:199
u16 actor11Talk1Conditions[]
Definition wstag421.c:264
void endEvent743(void)
After event 743, with the player: moves the story on to STORY_BLUE_ID_PASS.
Definition wstag421.c:64
FieldActorEntry actor5
Definition wstag421.c:410
u16 actor22Conditions[]
Definition wstag421.c:404
AreaBattle area0Battle7
Definition wstag421.c:187
FieldActorEntry actor2
Definition wstag421.c:407
AreaBattle area3Battle4
Definition wstag421.c:223
AreaBattle area3Battle3
Definition wstag421.c:222
AreaBattle area0Battle1
Definition wstag421.c:181
FieldActorEntry actor19
Definition wstag421.c:424
AreaBattle area2Battle0
Definition wstag421.c:206
s16 script741[]
Definition wstag421.c:134
u16 actor9Conditions[]
Definition wstag421.c:375
FieldActorEntry * stageActors[]
Definition wstag421.c:428
AreaBattle area1Battle2
Definition wstag421.c:195
AreaBattle area3Battle0
Definition wstag421.c:219
u16 actor11Talk0Conditions[]
Definition wstag421.c:263
FieldActorEntry actor22
Definition wstag421.c:427
AreaBattle area0Battle6
Definition wstag421.c:186
FieldTalk actor1Talks[]
Definition wstag421.c:269
u16 actor13Conditions[]
Definition wstag421.c:383
AreaBattle area3Battle2
Definition wstag421.c:221
FieldTalk actor0Talks[]
Definition wstag421.c:265
AreaBattle area3Battle1
Definition wstag421.c:220
FieldTalk actor21Talks[]
Definition wstag421.c:350
AreaBattle area0Battle3
Definition wstag421.c:183
FieldTalk actor20Talks[]
Definition wstag421.c:346
FieldActorEntry actor10
Definition wstag421.c:415
u16 actor19Conditions[]
Definition wstag421.c:401
FieldTalk actor4Talks[]
Definition wstag421.c:281
u16 actor4Conditions[]
Definition wstag421.c:366
FieldActorEntry actor4
Definition wstag421.c:409
u16 actor3Conditions[]
Definition wstag421.c:361
AreaBattle area3Battle6
Definition wstag421.c:225
FieldTalk actor17Talks[]
Definition wstag421.c:334
FieldTalk actor11Talks[]
Definition wstag421.c:309
FieldActorEntry actor8
Definition wstag421.c:413
ActorImage stageImages[]
Definition wstag421.c:235
FieldTalk actor6Talks[]
Definition wstag421.c:289
void setupStage(void)
Sets the stage up: its map, actors, battles and events, playing SEIR_BGM; BGM_0029 instead except at ...
Definition wstag421.c:81
FieldTalk actor19Talks[]
Definition wstag421.c:342
AreaBattle area2Battle4
Definition wstag421.c:210
u16 actor16Conditions[]
Definition wstag421.c:390
StageTile stageObjects[]
The tables and color setupStage gives FIELDSTG_state (FieldState)
Definition wstag421.c:454
FieldActorEntry actor9
Definition wstag421.c:414
u16 actor8Conditions[]
Definition wstag421.c:374
FieldActorEntry actor20
Definition wstag421.c:425
u16 actor5Conditions[]
Definition wstag421.c:367
FieldTalk actor10Talks[]
Definition wstag421.c:305
FieldTalk actor3Talks[]
Definition wstag421.c:277
FieldTalk actor9Talks[]
Definition wstag421.c:301
BattleList area3Battles
Definition wstag421.c:227
AreaBattle area3Battle5
Definition wstag421.c:224
AreaBattle area0Battle5
Definition wstag421.c:185
BattleList area1Battles
Definition wstag421.c:201
FieldTalk actor15Talks[]
Definition wstag421.c:326
BattleList area2Battles
Definition wstag421.c:214
FieldActorEntry actor15
Definition wstag421.c:420
FieldActorEntry actor12
Definition wstag421.c:417
FieldActorEntry actor16
Definition wstag421.c:421
s16 script743[]
Definition wstag421.c:167
u16 actor15Conditions[]
Definition wstag421.c:389
AreaBattle area1Battle4
Definition wstag421.c:197
void endEvent740(void)
After event 740, with Qing Long Chief: starts the stage's event battle 0 and keeps it from playing ag...
Definition wstag421.c:49
u16 actor6Conditions[]
Definition wstag421.c:368
AreaBattle area2Battle2
Definition wstag421.c:208
AreaBattle area1Battle5
Definition wstag421.c:198
u16 actor14Conditions[]
Definition wstag421.c:388
FieldActorEntry actor7
Definition wstag421.c:412
StageSlot stageSlots[]
Definition wstag421.c:492
AreaBattle area2Battle1
Definition wstag421.c:207
s16 script740[]
Definition wstag421.c:105
FieldActorEntry actor13
Definition wstag421.c:418
AreaBattle area1Battle3
Definition wstag421.c:196
AreaBattle area1Battle0
Definition wstag421.c:193
FieldActorEntry actor11
Definition wstag421.c:416
FieldActorEntry actor1
Definition wstag421.c:406
FieldActorEntry actor21
Definition wstag421.c:426
AreaBattle area0Battle0
Definition wstag421.c:180
AreaBattle area0Battle2
Definition wstag421.c:182
FieldTalk actor13Talks[]
Definition wstag421.c:318
#define STAGE_FILE
Definition wstag421.c:75
AreaBattle area2Battle5
Definition wstag421.c:211
AreaBattle area1Battle1
Definition wstag421.c:194
u16 actor7Conditions[]
Definition wstag421.c:369
AreaBattle area2Battle3
Definition wstag421.c:209
u16 actor2Conditions[]
Definition wstag421.c:356
FieldTalk actor18Talks[]
Definition wstag421.c:338
FieldTalk actor7Talks[]
Definition wstag421.c:293
u16 actor20Conditions[]
Definition wstag421.c:402
AreaBattle area0Battle4
Definition wstag421.c:184
#define STAGE_TEXT
Definition wstag421.c:73
FieldTalk actor8Talks[]
Definition wstag421.c:297
FieldTalk actor12Talks[]
Definition wstag421.c:314
AreaBattle area3Battle7
Definition wstag421.c:226
u16 actor21Conditions[]
Definition wstag421.c:403
BattleList area0Battles
Definition wstag421.c:188
AreaBattle area1Battle7
Definition wstag421.c:200
FieldTalk actor16Talks[]
Definition wstag421.c:330
u16 actor17Conditions[]
Definition wstag421.c:395
FieldActorEntry actor3
Definition wstag421.c:408
FieldBattles stageBattles[]
Definition wstag421.c:232
FieldActorEntry actor14
Definition wstag421.c:419
FieldEvent stageEvents[]
Definition wstag421.c:506
u16 actor12Conditions[]
Definition wstag421.c:382
u16 actor0Conditions[]
Definition wstag421.c:354