Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
wstag736.c
Go to the documentation of this file.
1/*
2 * WSTAG736: Ice Dungeon, North Sector. On the Amaterasu server; its Asuka
3 * server twin is WSTAG735.
4 */
5
6#include "common.h"
7#include "field/stage.h"
8/* Defined below, after the code that uses them */
10
11/* Creates the stage's ten effects and the event object of flags 0x4082/0x4083 */
12void updateStage(StageTask *task, void **children) {
13 s32 i;
14
15 switch (task->state) {
16 case TASK_INIT:
17 default:
18 for (i = 0; i < 10; i++) {
19 if (updateStageSpots[i].kind == 0) {
20 children[i] = createStageEffect(updateStageSpots[i].x, updateStageSpots[i].y, updateStageSpots[i].frame);
21 }
22 }
23 if (FLAGS_00.checkCondition(FLAG(0x40, 0x82), 1) && FLAGS_00.checkCondition(FLAG(0x40, 0x83), 0)) {
24 children[10] = FIELDSTG_startEvent(0x50E);
25 }
26 task->nextState(task);
27 break;
28 case TASK_RUN:
29 case TASK_DONE:
30 case TASK_KILL:
31 break;
32 }
33}
34
35#define STAGE_CHILDREN_SIZE 0x2C
42
43/*
44 * After event 1293, with Ice Master: starts the stage's event battle 0 and
45 * keeps it from playing again
46 */
47void endEvent1293(void) {
48 FLAGS_00.applyAction(FLAG(0x40, 0x82), 1);
50}
51
52/*
53 * After event 1294, with Ice Master: gives the player the MP Chip and keeps
54 * it from playing again
55 */
56void endEvent1294(void) {
57 FLAGS_00.applyAction(FLAG(0x40, 0x83), 1);
58 FLAGS_00.applyAction(ITEM(1, 0x30), 1);
59}
60
61#if VERSION_US || VERSION_JP
62#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_07)
63#define EVENT_TEXT_FILE (TEXT_EVENTS_700 - 1)
64#define STAGE_FILE 0x6BB
65#elif VERSION_EU
66#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_07)
67#define EVENT_TEXT_FILE (TEXT_EVENTS_700 - 1)
68#define STAGE_FILE 0x6CA
69#endif
70/* Sets the stage up: its map, actors, battles and events, playing BGM_0023 */
91
93 SCRIPT_FOLLOW(1, 2),
94 SCRIPT_WALK(2, 0x138, 0x25C, 3),
95 SCRIPT_PLACE(0xCB, 0x120, 0x251),
96 SCRIPT_POSE(0xCB, 1, 7),
99 SCRIPT_POSE(2, 1, 3),
100 SCRIPT_WAIT(0x1E),
101 SCRIPT_TALK(0, 1, 0xCB, 2),
103 SCRIPT_WAIT(0x1E),
104 SCRIPT_TALK(0, 2, 2, 1),
105 SCRIPT_POSE(2, 7, 3),
107 SCRIPT_POSE(2, 1, 3),
108 SCRIPT_WAIT(0x1E),
109 SCRIPT_TALK(0, 3, 0xCB, 2),
111 SCRIPT_WAIT(0x1E),
112 SCRIPT_TALK(0, 4, 2, 1),
113 SCRIPT_POSE(2, 7, 3),
115 SCRIPT_POSE(2, 1, 3),
116 SCRIPT_WAIT(0x1E),
118 /* after the end, the original's padding up to a word, which isn't zeros */
119#if VERSION_US
120 0x1,
121#elif VERSION_JP
122 0x800A,
123#endif
124};
126 SCRIPT_FOLLOW(1, 0xCB),
127 SCRIPT_PLACE(2, 0x138, 0x25C),
128 SCRIPT_POSE(2, 1, 3),
129 SCRIPT_PLACE(0xCB, 0x120, 0x251),
130 SCRIPT_POSE(0xCB, 1, 7),
131 SCRIPT_WAIT(0x78),
132 SCRIPT_TALK(0, 1, 0xCB, 0),
135 SCRIPT_WAIT(0x3C),
136 SCRIPT_TALK(0, 2, 2, 3),
137 SCRIPT_POSE(2, 7, 3),
139 SCRIPT_POSE(2, 1, 3),
140 SCRIPT_POSE(0xCB, 1, 5),
141 SCRIPT_WAIT(0x1E),
142 SCRIPT_WALK(0xCB, 0x150, 0x239, 5),
143 SCRIPT_WAIT_WALK(0xCB),
144 SCRIPT_POSE(0xCB, 1, 1),
145 SCRIPT_WAIT(0x1E),
146 SCRIPT_WALK(2, 0x120, 0x251, 3),
148 SCRIPT_POSE(2, 1, 5),
149 SCRIPT_WAIT(0x1E),
150 SCRIPT_TALK(0, 3, 0xCB, 0),
152 SCRIPT_FOLLOW(1, 2),
153 SCRIPT_WAIT(0x1E),
155};
157 { 36, 0, 0x14C, 0x264 },
158 { 28, 0, 236, 0x1B4 },
159 { 28, 0, 0x17C, 0x1CC },
160 { 28, 0, 0x1BC, 0x28C },
161 { 28, 0, 0x21C, 0x2BC },
162 { 28, 0, 0x2AC, 0x2D4 },
163 { 28, 0, 0x32C, 0x2F4 },
164 { 28, 0, 0x38C, 0x2F4 },
165 { 28, 0, 0x3FC, 0x2BC },
166 { 20, 0, 0x3AC, 68 },
167};
169 { 0, 6 }, { 1, 6 }, { 2, 68 }, { 1, 4 },
170 { 0, 4 }, { 255, 0 },
171};
173 { 0x12C, 18 }, { 1, 6 }, { 2, 6 }, { 3, 6 },
174 { 4, 6 }, { 5, 4 }, { 6, 4 }, { 7, 4 },
175 { 5, 4 }, { 6, 4 }, { 7, 4 }, { 5, 4 },
176 { 6, 4 }, { 7, 4 }, { 5, 4 }, { 6, 4 },
177 { 7, 4 }, { 4, 4 }, { 3, 4 }, { 2, 4 },
178 { 1, 4 }, { 255, 0x3E7 },
179};
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) };
220AreaBattle area3Battle1 = { 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 { 0x140, 0x100, 0x146, 0x1B0, 0x18, 0xB0, 0x150, 0x1F6 },
243 { 0x140, 0x100, 0x15E, 0x1A8, 0x78, 0xA8, 0x160, 0x1F6 },
244 { 0x140, 0x100, 0x166, 0x1A8, 0x98, 0xA8, 0x170, 0x1F6 },
245 { 0x140, 0x100, 0x16E, 0x1A8, 0xB8, 0xA8, 0x140, 0x1F5 },
246 { 0x140, 0x100, 0x140, 0x1B0, 0, 0xB0, 0x160, 0x1F5 },
247};
263 { actor0Talk0Conditions, NULL, 0x207 },
264 { actor0Talk1Conditions, NULL, 0x208 },
265 { actor0Talk2Conditions, NULL, 0x209 },
266 { NULL, NULL, 0 },
267};
269 { NULL, NULL, 0x20B },
270 { NULL, NULL, 0 },
271};
273 { actor2Talk0Conditions, NULL, 0x20C },
274 { actor2Talk1Conditions, NULL, 0x20D },
275 { actor2Talk2Conditions, NULL, 0x20E },
276 { NULL, NULL, 0 },
277};
279 { NULL, NULL, 0x210 },
280 { NULL, NULL, 0 },
281};
283 { NULL, NULL, 0x20F },
284 { NULL, NULL, 0 },
285};
287 { NULL, NULL, 0x205 },
288 { NULL, NULL, 0 },
289};
291 { NULL, NULL, 0x205 },
292 { NULL, NULL, 0 },
293};
295 { NULL, NULL, 0x20A },
296 { NULL, NULL, 0 },
297};
299 { actor8Talk0Conditions, NULL, 0x202 },
300 { actor8Talk1Conditions, NULL, 0x203 },
301 { actor8Talk2Conditions, NULL, 0x204 },
302 { actor8Talk3Conditions, NULL, 0x206 },
303 { NULL, NULL, 0 },
304};
306 { actor9Talk0Conditions, NULL, 0x202 },
307 { actor9Talk1Conditions, NULL, 0x203 },
308 { actor9Talk2Conditions, NULL, 0x204 },
309 { actor9Talk3Conditions, NULL, 0x206 },
310 { NULL, NULL, 0 },
311};
355 &actor0,
356 &actor1,
357 &actor2,
358 &actor3,
359 &actor4,
360 &actor5,
361 &actor6,
362 &actor7,
363 &actor8,
364 &actor9,
365 NULL,
366};
368 { 1, 0, 0x40, 6, 0x32, 2, 0, 7, 4, 0, 430, 326, 0, 0 },
369 { 1, 0, 0x40, 6, 0x32, 2, 0, 7, 4, 0, 443, 315, 0, 0 },
370 { 1, 0, 0x40, 6, 0x32, 2, 0, 7, 4, 0, 456, 288, 0, 0 },
371 { 1, 0, 0x40, 6, 0x32, 2, 0, 7, 4, 0, 458, 346, 0, 0 },
372 { 1, 0, 0x40, 6, 0x32, 2, 0, 7, 4, 0, 464, 275, 0, 0 },
373 { 1, 0, 0x40, 6, 0x32, 2, 0, 7, 4, 0, 494, 375, 0, 0 },
374 { 1, 0, 0x40, 6, 0x32, 2, 0, 7, 4, 0, 500, 402, 0, 0 },
375 { 1, 0, 0x40, 6, 0x32, 2, 0, 7, 4, 0, 555, 192, 0, 0 },
376 { 1, 0, 0x40, 6, 0x32, 2, 0, 7, 4, 0, 574, 190, 0, 0 },
377 { 1, 0, 0x40, 6, 0x32, 2, 0, 7, 4, 0, 698, 393, 0, 0 },
378 { 1, 0, 0x40, 6, 0x32, 2, 0, 7, 4, 0, 727, 379, 0, 0 },
379 { 1, 0, 0x40, 6, 0x32, 2, 0, 7, 4, 0, 778, 446, 0, 0 },
380 { 1, 0, 0x40, 6, 0x32, 2, 0, 7, 4, 0, 814, 430, 0, 0 },
381 { 1, 0, 0x40, 6, 0x32, 2, 0, 7, 4, 0, 872, 226, 0, 0 },
382 { 1, 0, 0x40, 6, 0x32, 2, 0, 7, 4, 0, 886, 236, 0, 0 },
383 { 1, 0, 0x40, 6, 0x32, 2, 0, 7, 4, 0, 909, 415, 0, 0 },
384 { 1, 0, 0x40, 6, 0x32, 2, 0, 7, 4, 0, 971, 387, 0, 0 },
385 { 1, 0, 0x40, 6, 0x32, 2, 0, 7, 4, 0, 996, 373, 0, 0 },
386 { 1, 0, 0x40, 6, 0x32, 2, 0, 7, 4, 0, 1022, 295, 0, 0 },
387 { 1, 0, 0x40, 6, 0x32, 2, 0, 7, 4, 0, 1036, 293, 0, 0 },
388 { 1, 0, 0x40, 6, 0x33, 2, 0, 7, 4, 0, 435, 329, 0, 0 },
389 { 1, 0, 0x40, 6, 0x33, 2, 0, 7, 4, 0, 446, 320, 0, 0 },
390 { 1, 0, 0x40, 6, 0x33, 2, 0, 7, 4, 0, 452, 282, 0, 0 },
391 { 1, 0, 0x40, 6, 0x33, 2, 0, 7, 4, 0, 462, 280, 0, 0 },
392 { 1, 0, 0x40, 6, 0x33, 2, 0, 7, 4, 0, 464, 350, 0, 0 },
393 { 1, 0, 0x40, 6, 0x33, 2, 0, 7, 4, 0, 497, 381, 0, 0 },
394 { 1, 0, 0x40, 6, 0x33, 2, 0, 7, 4, 0, 501, 395, 0, 0 },
395 { 1, 0, 0x40, 6, 0x33, 2, 0, 7, 4, 0, 548, 194, 0, 0 },
396 { 1, 0, 0x40, 6, 0x33, 2, 0, 7, 4, 0, 567, 186, 0, 0 },
397 { 1, 0, 0x40, 6, 0x33, 2, 0, 7, 4, 0, 573, 196, 0, 0 },
398 { 1, 0, 0x40, 6, 0x33, 2, 0, 7, 4, 0, 584, 253, 0, 0 },
399 { 1, 0, 0x40, 6, 0x33, 2, 0, 7, 4, 0, 691, 394, 0, 0 },
400 { 1, 0, 0x40, 6, 0x33, 2, 0, 7, 4, 0, 694, 361, 0, 0 },
401 { 1, 0, 0x40, 6, 0x33, 2, 0, 7, 4, 0, 699, 371, 0, 0 },
402 { 1, 0, 0x40, 6, 0x33, 2, 0, 7, 4, 0, 724, 384, 0, 0 },
403 { 1, 0, 0x40, 6, 0x33, 2, 0, 7, 4, 0, 785, 443, 0, 0 },
404 { 1, 0, 0x40, 6, 0x33, 2, 0, 7, 4, 0, 817, 425, 0, 0 },
405 { 1, 0, 0x40, 6, 0x33, 2, 0, 7, 4, 0, 841, 435, 0, 0 },
406 { 1, 0, 0x40, 6, 0x33, 2, 0, 7, 4, 0, 848, 267, 0, 0 },
407 { 1, 0, 0x40, 6, 0x33, 2, 0, 7, 4, 0, 852, 465, 0, 0 },
408 { 1, 0, 0x40, 6, 0x33, 2, 0, 7, 4, 0, 875, 232, 0, 0 },
409 { 1, 0, 0x40, 6, 0x33, 2, 0, 7, 4, 0, 890, 242, 0, 0 },
410 { 1, 0, 0x40, 6, 0x33, 2, 0, 7, 4, 0, 915, 412, 0, 0 },
411 { 1, 0, 0x40, 6, 0x33, 2, 0, 7, 4, 0, 976, 389, 0, 0 },
412 { 1, 0, 0x40, 6, 0x33, 2, 0, 7, 4, 0, 988, 346, 0, 0 },
413 { 1, 0, 0x40, 6, 0x33, 2, 0, 7, 4, 0, 991, 377, 0, 0 },
414 { 1, 0, 0x40, 6, 0x33, 2, 0, 7, 4, 0, 1014, 291, 0, 0 },
415 { 1, 0, 0x40, 6, 0x33, 2, 0, 7, 4, 0, 1034, 300, 0, 0 },
416 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
417};
419 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x2D0, 0x78, 0x144, 7, 0, 0, 0 },
420 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x2D3, 0x40C, 0x6E, 1, 0, 0, 0 },
421 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_CLIMB_DOWN, 5, 0x400, 0x80, 0, 0, 0, 0 },
422 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_CLIMB_UP, 5, 0x3F0, 0xD8, 0, 0, 0, 0 },
423 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_DROP, 6, 0, 0, 0, 0, 0, 0 },
424 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_DROP, 9, 0, 0, 0, 0, 0, 0 },
425 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_DROP, 0xB, 0, 0, 0, 0, 0, 0 },
426 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_DROP, 7, 0, 0, 0, 0, 0, 0 },
427 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH, 0x2D2, 0x140, 0x260, 3, 0, 0, 0 },
428 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH, 0x2D2, 0x3C0, 0x50, 7, 0, 0, 0 },
429 { { { FLAG(0x40, 0x82), 0 }, { SPECIAL_STORY_ASUKA_HEADQUARTERS_TO_OPERATION_SIGMA, 0 } }, SLOT_EVENT, 0x50D, 0, 0, 0, 0, 0, 0 },
430 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_SLIDE, 0, 0, 0, 0, 0, 0, 0 },
431 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_STOP_SLIDE, 0, 0, 0, 0, 0, 0, 0 },
432 { { { CODES_END, 0 }, { CODES_END, 0 } }, 0, 0, 0, 0, 0, 0, 0, 0 },
433};
434void (*stageFuncs[])(void) = {
436};
438 { 1293, script1293, EVENT_TEXT(9), NULL, endEvent1293 },
439 { 1294, script1294, EVENT_TEXT(0x14), NULL, endEvent1294 },
440 { -1, NULL, 0, NULL, NULL },
441};
#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
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
#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 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 SCRIPT_FOLLOW(snap, id)
FIELDSTG_followWithCamera.
Definition field_map.h:171
#define FIELD_MAP_FLOOR0
Some of FieldMap's maps (files): those of the floors the player walks on come first,...
Definition field_map.h:85
#define 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_STOP_SLIDE
Definition field_map.h:266
#define SLOT_SLIDE
Definition field_map.h:265
#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 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 SLOT_DROP
Definition field_map.h:258
#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_BATTLE
BATL0000: the maps' random battles (AreaBattle, nearly all of them)
Definition sound.h:76
#define MUSIC_DUNGEON
BGM_0023: the Ice, Fire and Dark Dungeons.
Definition sound.h:99
#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,...
@ STORY_PRESIDENT_ARRESTED
WSTAG226 (Login Room, Amaterasu City), event 935, after the President of MAGAMI gives himself up (WST...
Definition story.h:136
@ STORY_AMATERASU_BRIDGE
WSTAG206 (Amaterasu Bridge), event 922: an Attacker holds the bridge.
Definition story.h:133
@ 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 SPECIAL_STORY_JUNGLE_SOUND_TO_BLACK_ID_PASS
GAME.progress is from STORY_JUNGLE_SOUND to STORY_BLACK_ID_PASS (PROGRESS_RANGES[0x15])
Definition story.h:1926
#define SPECIAL_STORY_SINCE_KNIGHTMON_REPROGRAMMED
GAME.progress is STORY_KNIGHTMON_REPROGRAMMED or later (PROGRESS_RANGES[8], to 0x63)
Definition story.h:1887
#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
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
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
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
An object of a map, which FIELDSTG draws: a record of the table at FieldState.objects,...
Definition field_map.h:208
Definition gfx.h:352
u16 actor1Conditions[]
Definition wstag736.c:317
AreaBattle area2Battle7
Definition wstag736.c:213
FieldActorEntry actor0
Definition wstag736.c:344
void(* stageFuncs[])(void)
The stage's functions (common/start_stage.inc.c calls the first): a StageFuncs in the stages with a t...
Definition wstag736.c:434
FieldActorEntry actor6
Definition wstag736.c:350
u16 actor0Talk0Conditions[]
Definition wstag736.c:248
FieldTalk actor2Talks[]
Definition wstag736.c:272
AreaBattle area2Battle6
Definition wstag736.c:212
u16 actor8Talk1Conditions[]
Definition wstag736.c:255
u16 actor0Talk1Conditions[]
Definition wstag736.c:249
u16 actor2Talk1Conditions[]
Definition wstag736.c:252
u16 actor8Talk3Conditions[]
Definition wstag736.c:257
AnimFrame effectClutFrames[]
Definition wstag736.c:168
FieldTalk actor5Talks[]
Definition wstag736.c:286
AreaBattle area1Battle6
Definition wstag736.c:199
FieldActorEntry actor5
Definition wstag736.c:349
AreaBattle area0Battle7
Definition wstag736.c:187
FieldActorEntry actor2
Definition wstag736.c:346
u16 actor8Talk2Conditions[]
Definition wstag736.c:256
u16 actor9Talk0Conditions[]
Definition wstag736.c:258
AreaBattle area3Battle4
Definition wstag736.c:223
AreaBattle area3Battle3
Definition wstag736.c:222
AreaBattle area0Battle1
Definition wstag736.c:181
AreaBattle area2Battle0
Definition wstag736.c:206
u16 actor9Conditions[]
Definition wstag736.c:338
FieldActorEntry * stageActors[]
Definition wstag736.c:354
AreaBattle area1Battle2
Definition wstag736.c:195
AreaBattle area3Battle0
Definition wstag736.c:219
AreaBattle area0Battle6
Definition wstag736.c:186
FieldTalk actor1Talks[]
Definition wstag736.c:268
AreaBattle area3Battle2
Definition wstag736.c:221
FieldTalk actor0Talks[]
Definition wstag736.c:262
AreaBattle area3Battle1
Definition wstag736.c:220
AreaBattle area0Battle3
Definition wstag736.c:183
FieldTalk actor4Talks[]
Definition wstag736.c:282
u16 actor4Conditions[]
Definition wstag736.c:320
FieldActorEntry actor4
Definition wstag736.c:348
u16 actor3Conditions[]
Definition wstag736.c:319
u16 actor2Talk2Conditions[]
Definition wstag736.c:253
AreaBattle area3Battle6
Definition wstag736.c:225
FieldActorEntry actor8
Definition wstag736.c:352
ActorImage stageImages[]
Definition wstag736.c:235
FieldTalk actor6Talks[]
Definition wstag736.c:290
void setupStage(void)
Sets the stage up: its map, actors, battles and events, playing BGM_0023.
Definition wstag736.c:71
AnimFrame effectFrames[]
Definition wstag736.c:172
AreaBattle area2Battle4
Definition wstag736.c:210
StageEffectSpot updateStageSpots[]
Defined below, after the code that uses them.
Definition wstag736.c:156
StageTile stageObjects[]
The tables and color setupStage gives FIELDSTG_state (FieldState)
Definition wstag736.c:367
FieldActorEntry actor9
Definition wstag736.c:353
u16 actor8Conditions[]
Definition wstag736.c:332
u16 actor9Talk1Conditions[]
Definition wstag736.c:259
u16 actor5Conditions[]
Definition wstag736.c:321
FieldTalk actor3Talks[]
Definition wstag736.c:278
FieldTalk actor9Talks[]
Definition wstag736.c:305
BattleList area3Battles
Definition wstag736.c:227
AreaBattle area3Battle5
Definition wstag736.c:224
AreaBattle area0Battle5
Definition wstag736.c:185
BattleList area1Battles
Definition wstag736.c:201
BattleList area2Battles
Definition wstag736.c:214
u16 actor2Talk0Conditions[]
Definition wstag736.c:251
AreaBattle area1Battle4
Definition wstag736.c:197
u16 actor6Conditions[]
Definition wstag736.c:326
AreaBattle area2Battle2
Definition wstag736.c:208
u16 actor0Talk2Conditions[]
Definition wstag736.c:250
AreaBattle area1Battle5
Definition wstag736.c:198
FieldActorEntry actor7
Definition wstag736.c:351
StageSlot stageSlots[]
Definition wstag736.c:418
AreaBattle area2Battle1
Definition wstag736.c:207
s16 script1293[]
Definition wstag736.c:92
AreaBattle area1Battle3
Definition wstag736.c:196
AreaBattle area1Battle0
Definition wstag736.c:193
void endEvent1293(void)
After event 1293, with Ice Master: starts the stage's event battle 0 and keeps it from playing again.
Definition wstag736.c:47
FieldActorEntry actor1
Definition wstag736.c:345
AreaBattle area0Battle0
Definition wstag736.c:180
AreaBattle area0Battle2
Definition wstag736.c:182
#define STAGE_FILE
Definition wstag736.c:68
AreaBattle area2Battle5
Definition wstag736.c:211
AreaBattle area1Battle1
Definition wstag736.c:194
u16 actor7Conditions[]
Definition wstag736.c:331
AreaBattle area2Battle3
Definition wstag736.c:209
u16 actor2Conditions[]
Definition wstag736.c:318
FieldTalk actor7Talks[]
Definition wstag736.c:294
void endEvent1294(void)
After event 1294, with Ice Master: gives the player the MP Chip and keeps it from playing again.
Definition wstag736.c:56
u16 actor9Talk2Conditions[]
Definition wstag736.c:260
AreaBattle area0Battle4
Definition wstag736.c:184
u16 actor9Talk3Conditions[]
Definition wstag736.c:261
#define STAGE_TEXT
Definition wstag736.c:66
FieldTalk actor8Talks[]
Definition wstag736.c:298
AreaBattle area3Battle7
Definition wstag736.c:226
s16 script1294[]
Definition wstag736.c:125
BattleList area0Battles
Definition wstag736.c:188
u16 actor8Talk0Conditions[]
Definition wstag736.c:254
AreaBattle area1Battle7
Definition wstag736.c:200
FieldActorEntry actor3
Definition wstag736.c:347
FieldBattles stageBattles[]
Definition wstag736.c:232
FieldEvent stageEvents[]
Definition wstag736.c:437
u16 actor0Conditions[]
Definition wstag736.c:312