Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
wstag550.c
Go to the documentation of this file.
1/*
2 * WSTAG550: South Badland, West Sector.
3 */
4
5#include "common.h"
6#include "field/stage.h"
7
8/*
9 * Back from the battle after event 1269, starts event 1270, with
10 * MagnaAngemon, unless it has played
11 */
12void updateStage(StageTask *task, void **children) {
13 switch (task->state) {
14 case TASK_INIT:
15 default:
16 task->nextState(task);
18 children[0] = FIELDSTG_startEvent(0x4F6);
19 }
20 break;
21 case TASK_RUN:
22 case TASK_DONE:
23 case TASK_KILL:
24 break;
25 }
26}
27
28#define STAGE_CHILDREN_SIZE 4
30
31/*
32 * After event 1269, with MagnaAngemon: lets event 1270 start and starts the
33 * stage's event battle 0
34 */
39
40/*
41 * After event 1270, with MagnaAngemon: gives the player the Patamon DDNA and
42 * keeps it from playing again
43 */
48
49const CVECTOR stageColor = { 0x54, 0x67, 0x96, 0x00 };
50#if VERSION_US || VERSION_JP
51#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_06)
52#define EVENT_TEXT_FILE (TEXT_EVENTS_500 - 1)
53#define STAGE_FILE 0x45E
54#elif VERSION_EU
55#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_06)
56#define EVENT_TEXT_FILE (TEXT_EVENTS_500 - 1)
57#define STAGE_FILE 0x46E
58#endif
59/*
60 * Sets the stage up: its map, actors, battles and events, playing BGM_0018;
61 * BGM_0029 instead at story steps 0x27 to 0x28
62 */
88
90 SCRIPT_WALK(2, 0x190, 0xE0, 3),
91 SCRIPT_PLACE(0x15, 0x171, 0xD1),
92 SCRIPT_POSE(0x15, 1, 7),
95 SCRIPT_POSE(2, 1, 3),
96 SCRIPT_WAIT(6),
97 SCRIPT_WAIT(0x1E),
98 SCRIPT_TALK(0, 1, 0x15, 0),
100 SCRIPT_WAIT(0x1E),
101 SCRIPT_POSE(0x15, 0x36, 7),
103 SCRIPT_WAIT_ANIM(0x15),
104 SCRIPT_POSE(0x15, 0x37, 7),
105 SCRIPT_WAIT(0x5A),
106 SCRIPT_LEAVE(0xC05, 0, 0, 0),
108 /* after the end, the original's padding up to a word, which isn't zeros */
109#if VERSION_US
110 0x9462,
111#elif VERSION_EU
112 0x1062,
113#endif
114};
116 SCRIPT_FOLLOW(1, 2),
117 SCRIPT_WALK(2, 0x45B, 0x345, 7),
118 SCRIPT_PLACE(0x7C, 0x481, 0x35A),
119 SCRIPT_POSE(0x7C, 1, 3),
122 SCRIPT_POSE(2, 1, 7),
123 SCRIPT_WAIT(6),
124 SCRIPT_WAIT(0x1E),
125 SCRIPT_TALK(0, 1, 2, 0),
126 SCRIPT_POSE(2, 7, 7),
128 SCRIPT_POSE(2, 1, 7),
129 SCRIPT_WAIT(0x1E),
130 SCRIPT_TALK(0, 2, 0x7C, 2),
132 SCRIPT_WAIT(0x1E),
134 /* after the end, the original's padding up to a word, which isn't zeros */
135#if VERSION_US
136 0x3C02,
137#elif VERSION_EU
138 0x8E02,
139#endif
140};
142 SCRIPT_FOLLOW(1, 2),
143 SCRIPT_PLACE(2, 0x45B, 0x345),
144 SCRIPT_POSE(2, 1, 7),
145 SCRIPT_PLACE(0x7C, 0x481, 0x35A),
146 SCRIPT_POSE(0x7C, 1, 3),
147 SCRIPT_WAIT(0x78),
148 SCRIPT_TALK(0, 1, 2, 0),
149 SCRIPT_POSE(2, 7, 7),
151 SCRIPT_POSE(2, 1, 7),
152 SCRIPT_WAIT(0x1E),
153 SCRIPT_TALK(0, 2, 0x7C, 2),
156 SCRIPT_WAIT(0x1E),
157 SCRIPT_TALK(0, 3, 2, 0),
158 SCRIPT_POSE(2, 7, 7),
160 SCRIPT_POSE(2, 1, 7),
161 SCRIPT_WAIT(0x3C),
163};
190AreaBattle area2Battle0 = { 0, 0, MUSIC(1, 0) };
191AreaBattle area2Battle1 = { 0, 0, MUSIC(1, 0) };
192AreaBattle area2Battle2 = { 0, 0, MUSIC(1, 0) };
193AreaBattle area2Battle3 = { 0, 0, MUSIC(1, 0) };
194AreaBattle area2Battle4 = { 0, 0, MUSIC(1, 0) };
195AreaBattle area2Battle5 = { 0, 0, MUSIC(1, 0) };
196AreaBattle area2Battle6 = { 0, 0, MUSIC(1, 0) };
197AreaBattle area2Battle7 = { 0, 0, MUSIC(1, 0) };
204AreaBattle area3Battle1 = { 0, 0, MUSIC(1, 0) };
205AreaBattle area3Battle2 = { 0, 0, MUSIC(1, 0) };
206AreaBattle area3Battle3 = { 0, 0, MUSIC(1, 0) };
209AreaBattle area3Battle6 = { 0, 0, MUSIC(1, 0) };
220 { 0x200, 0x100, 0x21C, 0x1A6, 0x70, 0xA6, 0x230, 0x1FE },
221 { 0x200, 0x100, 0x200, 0x100, 0, 0, 0x220, 0x1FE },
222 { 0x200, 0x100, 0x216, 0x138, 0x58, 0x38, 0x200, 0x1FD },
223 { 0x200, 0x100, 0x208, 0x1BC, 0x20, 0xBC, 0x210, 0x1FD },
224 { 0x200, 0x100, 0x210, 0x1BC, 0x40, 0xBC, 0x220, 0x1FD },
225 { 0x200, 0x100, 0x200, 0x1BC, 0, 0xBC, 0x230, 0x1FD },
226 { 0x140, 0x100, 0x170, 0x100, 0xC0, 0, 0x140, 0x1FE },
227 { 0x180, 0x100, 0x1B0, 0x100, 0x1C0, 0, 0x150, 0x1FE },
228 { 0x1C0, 0x100, 0x1C0, 0x100, 0x200, 0, 0x160, 0x1FE },
229};
235 { NULL, actor0Talk0Actions, 0x168 },
236 { NULL, NULL, 0 },
237};
239 { NULL, NULL, 0x336 },
240 { NULL, NULL, 0 },
241};
244 { actor2Talk1Conditions, NULL, 0x2C2 },
245 { NULL, NULL, 0 },
246};
254 &actor0,
255 &actor1,
256 &actor2,
257 NULL,
258};
260 { 1, 0, 0x40, 2, 0xD, 1, 0xD, 0x12, 4, 0, 43, 511, 0, 0 },
261 { 1, 0, 0x40, 2, 0xD, 1, 0xD, 0x12, 4, 0, 475, 159, 0, 0 },
262 { 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x34, 0xA, 0, 132, 946, 0, 0 },
263 { 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x34, 0xA, 0, 229, 982, 0, 0 },
264 { 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x34, 0xA, 0, 271, 926, 0, 0 },
265 { 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x34, 0xA, 0, 483, 887, 0, 0 },
266 { 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x34, 0xA, 0, 501, 1006, 0, 0 },
267 { 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x34, 0xA, 0, 624, 930, 0, 0 },
268 { 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x34, 0xA, 0, 697, 934, 0, 0 },
269 { 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x34, 0xA, 0, 716, 988, 0, 0 },
270 { 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x34, 0xA, 0, 809, 964, 0, 0 },
271 { 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x34, 0xA, 0, 828, 1055, 0, 0 },
272 { 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x34, 0xA, 0, 956, 1005, 0, 0 },
273 { 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x34, 0xA, 0, 1007, 760, 0, 0 },
274 { 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x34, 0xA, 0, 1011, 659, 0, 0 },
275 { 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x34, 0xA, 0, 1022, 1016, 0, 0 },
276 { 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x34, 0xA, 0, 1053, 571, 0, 0 },
277 { 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x34, 0xA, 0, 1101, 200, 0, 0 },
278 { 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x34, 0xA, 0, 1163, 904, 0, 0 },
279 { 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x34, 0xA, 0, 1176, 1033, 0, 0 },
280 { 1, 0, 0x40, 6, 0x35, 1, 0x35, 0x37, 0xA, 0, 164, 932, 0, 0 },
281 { 1, 0, 0x40, 6, 0x35, 1, 0x35, 0x37, 0xA, 0, 266, 1023, 0, 0 },
282 { 1, 0, 0x40, 6, 0x35, 1, 0x35, 0x37, 0xA, 0, 326, 956, 0, 0 },
283 { 1, 0, 0x40, 6, 0x35, 1, 0x35, 0x37, 0xA, 0, 543, 983, 0, 0 },
284 { 1, 0, 0x40, 6, 0x35, 1, 0x35, 0x37, 0xA, 0, 701, 999, 0, 0 },
285 { 1, 0, 0x40, 6, 0x35, 1, 0x35, 0x37, 0xA, 0, 726, 926, 0, 0 },
286 { 1, 0, 0x40, 6, 0x35, 1, 0x35, 0x37, 0xA, 0, 869, 1029, 0, 0 },
287 { 1, 0, 0x40, 6, 0x35, 1, 0x35, 0x37, 0xA, 0, 936, 771, 0, 0 },
288 { 1, 0, 0x40, 6, 0x35, 1, 0x35, 0x37, 0xA, 0, 979, 860, 0, 0 },
289 { 1, 0, 0x40, 6, 0x35, 1, 0x35, 0x37, 0xA, 0, 986, 606, 0, 0 },
290 { 1, 0, 0x40, 6, 0x35, 1, 0x35, 0x37, 0xA, 0, 989, 153, 0, 0 },
291 { 1, 0, 0x40, 6, 0x35, 1, 0x35, 0x37, 0xA, 0, 990, 1001, 0, 0 },
292 { 1, 0, 0x40, 6, 0x35, 1, 0x35, 0x37, 0xA, 0, 1032, 926, 0, 0 },
293 { 1, 0, 0x40, 6, 0x35, 1, 0x35, 0x37, 0xA, 0, 1078, 204, 0, 0 },
294 { 1, 0, 0x40, 6, 0x35, 1, 0x35, 0x37, 0xA, 0, 1102, 935, 0, 0 },
295 { 1, 0, 0x40, 6, 0x35, 1, 0x35, 0x37, 0xA, 0, 1135, 1056, 0, 0 },
296 { 1, 0, 0x40, 6, 0x35, 1, 0x35, 0x37, 0xA, 0, 1146, 277, 0, 0 },
297 { 1, 0, 0x40, 6, 0x35, 1, 0x35, 0x37, 0xA, 0, 1199, 921, 0, 0 },
298 { 1, 0, 0x40, 6, 0x35, 1, 0x35, 0x37, 0xA, 0, 1236, 1001, 0, 0 },
299 { 1, 0, 0x40, 6, 0x35, 1, 0x35, 0x37, 0xA, 0, 1246, 618, 0, 0 },
300 { 1, 0, 0x40, 6, 0x35, 1, 0x35, 0x37, 0xA, 0, 1252, 366, 0, 0 },
301 { 1, 0, 0x40, 6, 0x38, 1, 0x38, 0x3A, 0xA, 0, 233, 916, 0, 0 },
302 { 1, 0, 0x40, 6, 0x38, 1, 0x38, 0x3A, 0xA, 0, 283, 1011, 0, 0 },
303 { 1, 0, 0x40, 6, 0x38, 1, 0x38, 0x3A, 0xA, 0, 347, 954, 0, 0 },
304 { 1, 0, 0x40, 6, 0x38, 1, 0x38, 0x3A, 0xA, 0, 575, 977, 0, 0 },
305 { 1, 0, 0x40, 6, 0x38, 1, 0x38, 0x3A, 0xA, 0, 657, 913, 0, 0 },
306 { 1, 0, 0x40, 6, 0x38, 1, 0x38, 0x3A, 0xA, 0, 841, 947, 0, 0 },
307 { 1, 0, 0x40, 6, 0x38, 1, 0x38, 0x3A, 0xA, 0, 984, 906, 0, 0 },
308 { 1, 0, 0x40, 6, 0x38, 1, 0x38, 0x3A, 0xA, 0, 1014, 853, 0, 0 },
309 { 1, 0, 0x40, 6, 0x38, 1, 0x38, 0x3A, 0xA, 0, 1150, 945, 0, 0 },
310 { 1, 0, 0x40, 6, 0x3B, 1, 0x3B, 0x3D, 0xA, 0, 249, 927, 0, 0 },
311 { 1, 0, 0x40, 6, 0x3B, 1, 0x3B, 0x3D, 0xA, 0, 303, 954, 0, 0 },
312 { 1, 0, 0x40, 6, 0x3B, 1, 0x3B, 0x3D, 0xA, 0, 414, 994, 0, 0 },
313 { 1, 0, 0x40, 6, 0x3B, 1, 0x3B, 0x3D, 0xA, 0, 475, 1008, 0, 0 },
314 { 1, 0, 0x40, 6, 0x3B, 1, 0x3B, 0x3D, 0xA, 0, 535, 894, 0, 0 },
315 { 1, 0, 0x40, 6, 0x3B, 1, 0x3B, 0x3D, 0xA, 0, 775, 951, 0, 0 },
316 { 1, 0, 0x40, 6, 0x3B, 1, 0x3B, 0x3D, 0xA, 0, 797, 1040, 0, 0 },
317 { 1, 0, 0x40, 6, 0x3B, 1, 0x3B, 0x3D, 0xA, 0, 929, 998, 0, 0 },
318 { 1, 0, 0x40, 6, 0x3B, 1, 0x3B, 0x3D, 0xA, 0, 1009, 600, 0, 0 },
319 { 1, 0, 0x40, 6, 0x3B, 1, 0x3B, 0x3D, 0xA, 0, 1045, 910, 0, 0 },
320 { 1, 0, 0x40, 6, 0x3B, 1, 0x3B, 0x3D, 0xA, 0, 1076, 1052, 0, 0 },
321 { 1, 0, 0x40, 6, 0x3B, 1, 0x3B, 0x3D, 0xA, 0, 1097, 1125, 0, 0 },
322 { 1, 0, 0x40, 6, 0x3B, 1, 0x3B, 0x3D, 0xA, 0, 1120, 273, 0, 0 },
323 { 1, 0, 0x40, 6, 0x3B, 1, 0x3B, 0x3D, 0xA, 0, 1243, 674, 0, 0 },
324 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 203, 911, 0, 0 },
325 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 205, 988, 0, 0 },
326 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 360, 968, 0, 0 },
327 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 452, 884, 0, 0 },
328 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 567, 911, 0, 0 },
329 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 672, 934, 0, 0 },
330 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 769, 1028, 0, 0 },
331 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 863, 948, 0, 0 },
332 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 958, 167, 0, 0 },
333 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 961, 765, 0, 0 },
334 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 992, 654, 0, 0 },
335 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 1034, 800, 0, 0 },
336 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 1045, 1040, 0, 0 },
337 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 1063, 937, 0, 0 },
338 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 1103, 1051, 0, 0 },
339 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 1114, 1125, 0, 0 },
340 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 1212, 995, 0, 0 },
341 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 1229, 360, 0, 0 },
342 { 1, 0, 0x40, 6, 0x41, 1, 0x41, 0x43, 0xA, 0, 375, 979, 0, 0 },
343 { 1, 0, 0x40, 6, 0x41, 1, 0x41, 0x43, 0xA, 0, 435, 1003, 0, 0 },
344 { 1, 0, 0x40, 6, 0x41, 1, 0x41, 0x43, 0xA, 0, 511, 882, 0, 0 },
345 { 1, 0, 0x40, 6, 0x41, 1, 0x41, 0x43, 0xA, 0, 566, 983, 0, 0 },
346 { 1, 0, 0x40, 6, 0x41, 1, 0x41, 0x43, 0xA, 0, 600, 927, 0, 0 },
347 { 1, 0, 0x40, 6, 0x41, 1, 0x41, 0x43, 0xA, 0, 756, 919, 0, 0 },
348 { 1, 0, 0x40, 6, 0x41, 1, 0x41, 0x43, 0xA, 0, 999, 1016, 0, 0 },
349 { 1, 0, 0x40, 6, 0x41, 1, 0x41, 0x43, 0xA, 0, 1090, 943, 0, 0 },
350 { 1, 0, 0x40, 6, 0x41, 1, 0x41, 0x43, 0xA, 0, 1092, 1114, 0, 0 },
351 { 1, 0, 0x40, 6, 0x41, 1, 0x41, 0x43, 0xA, 0, 1254, 668, 0, 0 },
352 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 215, 919, 0, 0 },
353 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 227, 990, 0, 0 },
354 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 255, 932, 0, 0 },
355 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 270, 933, 0, 0 },
356 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 289, 1020, 0, 0 },
357 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 385, 986, 0, 0 },
358 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 477, 894, 0, 0 },
359 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 487, 1014, 0, 0 },
360 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 502, 886, 0, 0 },
361 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 504, 1012, 0, 0 },
362 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 609, 935, 0, 0 },
363 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 624, 938, 0, 0 },
364 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 684, 941, 0, 0 },
365 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 703, 940, 0, 0 },
366 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 739, 986, 0, 0 },
367 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 766, 927, 0, 0 },
368 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 842, 945, 0, 0 },
369 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 849, 1036, 0, 0 },
370 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 860, 1038, 0, 0 },
371 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 979, 161, 0, 0 },
372 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 994, 740, 0, 0 },
373 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 1024, 759, 0, 0 },
374 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 1033, 596, 0, 0 },
375 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 1038, 575, 0, 0 },
376 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 1140, 941, 0, 0 },
377 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 1196, 1032, 0, 0 },
378 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 1197, 1021, 0, 0 },
379 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 1209, 1023, 0, 0 },
380 { 1, 0, 0x40, 6, 0, 0, 0, 0, 0, 0, 678, 464, 478, 0 },
381 { 1, 0, 0x4A, 6, 7, 1, 7, 0xC, 4, 0, 1178, 782, 0, 0 },
382 { 1, 0, 0x4B, 4, 1, 1, 1, 6, 4, 0, 160, 219, 243, 0 },
383 { 1, 0, 0x40, 4, 0x13, 0, 0, 0, 0, 0, 697, 464, 478, 0 },
384 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
385};
387 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x248, 0x610, 0x540, 3, 0, 0, 0 },
388 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_DROP, 7, 0, 0, 0, 0, 0, 0 },
389 { { { SPECIAL_STORY_SINCE_DE_KNOWLEDGE, 1 }, { CODES_END, 0 } }, SLOT_WARP1, 0x2E9, 0xB0, 0xF8, 7, 0, 3, 1 },
390 { { { SPECIAL_STORY_SINCE_DE_KNOWLEDGE, 1 }, { CODES_END, 0 } }, SLOT_WARP1, 0x2E8, 0x240, 0xD0, 1, 0, 6, 1 },
391 { { { SPECIAL_STORY_SINCE_DE_KNOWLEDGE, 1 }, { CODES_END, 0 } }, SLOT_WARP1, 0x2E9, 0xB0, 0xF8, 7, 0, 0xA, 1 },
392 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_CLIMB_DOWN, 6, 0x479, 0x2B0, 0, 0, 0, 0 },
393 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_CLIMB_UP, 6, 0x469, 0x318, 0, 0, 0, 0 },
394 { { { SPECIAL_STORY_SINCE_DE_SINCERITY, 1 }, { CODES_END, 0 } }, SLOT_WARP0, 0x2E2, 0xB0, 0x148, 7, 0, 9, 1 },
395 { { { ITEM(0, 5), 1 }, { CODES_END, 0 } }, SLOT_GAUGE, 0xFFE0, 0x2C, 0, 0, 0, 0, 0 },
396 { { { ITEM(0, 5), 1 }, { CODES_END, 0 } }, SLOT_GAUGE, 0x20, 0x30, 0, 0, 0, 0, 0 },
397 { { { ITEM(0, 5), 1 }, { CODES_END, 0 } }, SLOT_GAUGE, 0xC, 0x30, 0, 0, 0, 0, 0 },
398 { { { ITEM(0, 5), 1 }, { CODES_END, 0 } }, SLOT_GAUGE, 0xFFEC, 0x30, 0, 0, 0, 0, 0 },
399 { { { ITEM(0, 5), 1 }, { CODES_END, 0 } }, SLOT_GAUGE, 0x30, 0xFFE8, 0, 0, 0, 0, 0 },
400 { { { ITEM(0, 5), 1 }, { CODES_END, 0 } }, SLOT_GAUGE, 0, 0xFFE0, 0, 0, 0, 0, 0 },
401 { { { SPECIAL_STORY_SINCE_DE_SINCERITY, 1 }, { CODES_END, 0 } }, SLOT_WARP0, 0x2E2, 0xB0, 0x148, 7, 0, 9, 1 },
402 { { { FLAG(0, FIELD_FLAG_ENCOUNTERED), 0 }, { CODES_END, 0 } }, SLOT_EVENT, 0x2328, 0, 0, 0, 0, 0, 0 },
403 { { { CODES_END, 0 }, { CODES_END, 0 } }, 0, 0, 0, 0, 0, 0, 0, 0 },
404};
405void (*stageFuncs[])(void) = {
407};
409 { 1225, script1225, EVENT_TEXT(0xA), NULL, NULL },
410 { 1269, script1269, EVENT_TEXT(0xE), NULL, endEvent1269 },
411 { 1270, script1270, EVENT_TEXT(0xF), NULL, endEvent1270 },
412 { 9000, NULL, 0, FIELDSTG_startEventBattle5, NULL },
413 { -1, NULL, 0, NULL, NULL },
414};
#define NULL
Definition common.h:17
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).
void * FIELDSTG_startEventBattle5(void)
Starts battle 5 of the fourth area: the end of the stages' events 9000.
Definition field.c:1010
#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 SLOT_WARP1
a warp (FieldWarp at arg) with effect and cutscene 1
Definition field_map.h:263
#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_COMMAND_PLAY_SAVEDEMO
Definition field_map.h:65
#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_EVENT
starts the event arg
Definition field_map.h:262
#define FIELD_FLAG_ENCOUNTERED
The FLAGS_00 flag that every encounter sets (FIELDSTG_startEncounter); until it is set,...
Definition field_map.h:190
#define SLOT_GAUGE
the gauge game
Definition field_map.h:261
#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 SCRIPT_WAIT_ANIM(id)
until its animation ends
Definition field_map.h:169
#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 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 START_EVENT(index)
action: FIELDSTG_startListedEvent
Definition game_state.h:81
#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_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_BADLAND
BGM_0018: the Badlands.
Definition sound.h:94
#define MUSIC_BOSS
BOSS_000: the sectors' boss battles.
Definition sound.h:108
#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
FIELDSTG's start of the stage (StageEntry.init in FIELDSTG_stages): the stage's task,...
#define FLAG_TAOMON_DDNA_REQUEST_SEEN
wstag550 event 1270: the player asks Taomon for the Renamon DDNA and she wants a battle; set at its e...
Definition story.h:1372
@ STORY_GUNSLINGER
WSTAG810 (Gunslinger 1F), event 1035.
Definition story.h:143
@ STORY_MOVIE_BATTLES
WSTAG820, event 1080, with Snatchmon: each encounter plays MODE_BATTLE_MOVIE first.
Definition story.h:146
@ STORY_ASUKA_HEADQUARTERS
WSTAG310 (A.o.A Headquarters, Asuka City), event 961.
Definition story.h:138
#define SPECIAL_STORY_SINCE_DE_KNOWLEDGE
GAME.progress is STORY_DE_KNOWLEDGE or later (PROGRESS_RANGES[0xD], to 0x63)
Definition story.h:1902
#define FLAG_MAGNAANGEMON_DDNA_FOUGHT
wstag550 South Badland: set when talking to MagnaAngemon starts his Patamon DDNA challenge event; lat...
Definition story.h:1167
#define SPECIAL_STORY_DE_SINCERITY_TO_LISA_SAVED
GAME.progress is from STORY_DE_SINCERITY to STORY_LISA_SAVED (PROGRESS_RANGES[0xF])
Definition story.h:1908
#define FLAG_PATAMON_DDNA_REQUESTED
wstag330: DRI Kazuki asks for Patamon's DDNA; tested at MagnaAngemon in wstag550 with the DDNA not ye...
Definition story.h:591
#define SPECIAL_STORY_SINCE_DE_SINCERITY
GAME.progress is STORY_DE_SINCERITY or later (PROGRESS_RANGES[0xC], to 0x63)
Definition story.h:1899
#define FLAG_MAGNAANGEMON_WIN_SEEN
wstag550 event 1269: MagnaAngemon loses and gives the Patamon DDNA; set at its end,...
Definition story.h:1369
Where an actor's frames go in VRAM: one of the records after the FieldImage (Actor....
Definition field_map.h:114
A battle of an area's BattleList, which can start on the field (see FIELDSTG_startEncounter); FIGHTST...
Definition field_map.h:402
The battles of an area of the map (its cells' value at FieldMap.files[4]), one picked at random.
Definition field_map.h:411
A character of the field (FieldState.actors, a list of pointers up to NULL), which FIELDSTG_updateFie...
Definition field_map.h:194
The battles of a place (FieldState.battles), by area of the map: the fourth area's are also the ones ...
Definition field_map.h:422
An event of the table FieldState.events, up to the first id -1, which FIELDSTG_startEvent starts.
Definition field_map.h:141
void(* setFile)(s32 index, s32 file)
FIELDSTG_setMapFile.
Definition field_map.h:100
void(* setFirstMap)(s32 index)
FIELDSTG_setFirstMap: the map the player starts on (GAME.mapIndex), when the mode is new.
Definition field_map.h:104
s32 sheetEntry
the stage's sprite sheet, loaded before the field starts, or 0
Definition field_map.h:445
FieldEvent * events
up to the first id -1
Definition field_map.h:451
s32 soundBank
SOUND.loadBank's, or 0.
Definition field_map.h:459
StageTile * objects
the map objects, up to the first margin 0
Definition field_map.h:446
s32 imageFile
or an image archive file, or 0
Definition field_map.h:449
FieldBattles * battles
Definition field_map.h:450
Vec2 start
where the player starts
Definition field_map.h:456
StageSlot * slots
up to the first type 0
Definition field_map.h:447
ActorImage * actors
then the actors', from actors[2]
Definition field_map.h:454
s32 mapFile
the file of the map's tiles (FIELDSTG_createMapStreamer)
Definition field_map.h:444
s32 startDir
and its direction
Definition field_map.h:457
CVECTOR spriteColor
the field's sprites' color, unless cd is 0
Definition field_map.h:458
s32 textFile
the stage's text file, for the talks
Definition field_map.h:461
union FieldState::@12 images
s32 music
SOUND.playSound's, or 0.
Definition field_map.h:460
What a character says (FIELDSTG_runActorAction): the first whose conditions hold, or the last,...
Definition field_map.h:176
void(* 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
Definition gfx.h:352
u16 actor1Conditions[]
Definition wstag550.c:248
u16 actor0Talk0Actions[]
Definition wstag550.c:230
AreaBattle area2Battle7
Definition wstag550.c:197
FieldActorEntry actor0
Definition wstag550.c:250
void(* stageFuncs[])(void)
The stage's functions (common/start_stage.inc.c calls the first): a StageFuncs in the stages with a t...
Definition wstag550.c:405
void endEvent1269(void)
After event 1269, with MagnaAngemon: lets event 1270 start and starts the stage's event battle 0.
Definition wstag550.c:35
FieldTalk actor2Talks[]
Definition wstag550.c:242
AreaBattle area2Battle6
Definition wstag550.c:196
u16 actor2Talk1Conditions[]
Definition wstag550.c:233
AreaBattle area1Battle6
Definition wstag550.c:183
AreaBattle area0Battle7
Definition wstag550.c:171
FieldActorEntry actor2
Definition wstag550.c:252
const CVECTOR stageColor
the color the setup copies to FIELDSTG_state.spriteColor
Definition wstag550.c:49
AreaBattle area3Battle4
Definition wstag550.c:207
AreaBattle area3Battle3
Definition wstag550.c:206
AreaBattle area0Battle1
Definition wstag550.c:165
AreaBattle area2Battle0
Definition wstag550.c:190
FieldActorEntry * stageActors[]
Definition wstag550.c:253
AreaBattle area1Battle2
Definition wstag550.c:179
s16 script1225[]
Definition wstag550.c:89
AreaBattle area3Battle0
Definition wstag550.c:203
s16 script1270[]
Definition wstag550.c:141
AreaBattle area0Battle6
Definition wstag550.c:170
FieldTalk actor1Talks[]
Definition wstag550.c:238
AreaBattle area3Battle2
Definition wstag550.c:205
FieldTalk actor0Talks[]
Definition wstag550.c:234
AreaBattle area3Battle1
Definition wstag550.c:204
AreaBattle area0Battle3
Definition wstag550.c:167
u16 actor2Talk0Actions[]
Definition wstag550.c:232
AreaBattle area3Battle6
Definition wstag550.c:209
void endEvent1270(void)
After event 1270, with MagnaAngemon: gives the player the Patamon DDNA and keeps it from playing agai...
Definition wstag550.c:44
ActorImage stageImages[]
Definition wstag550.c:219
void setupStage(void)
Sets the stage up: its map, actors, battles and events, playing BGM_0018; BGM_0029 instead at story s...
Definition wstag550.c:63
AreaBattle area2Battle4
Definition wstag550.c:194
StageTile stageObjects[]
The tables and color setupStage gives FIELDSTG_state (FieldState)
Definition wstag550.c:259
BattleList area3Battles
Definition wstag550.c:211
AreaBattle area3Battle5
Definition wstag550.c:208
AreaBattle area0Battle5
Definition wstag550.c:169
BattleList area1Battles
Definition wstag550.c:185
BattleList area2Battles
Definition wstag550.c:198
u16 actor2Talk0Conditions[]
Definition wstag550.c:231
AreaBattle area1Battle4
Definition wstag550.c:181
AreaBattle area2Battle2
Definition wstag550.c:192
AreaBattle area1Battle5
Definition wstag550.c:182
StageSlot stageSlots[]
Definition wstag550.c:386
AreaBattle area2Battle1
Definition wstag550.c:191
AreaBattle area1Battle3
Definition wstag550.c:180
AreaBattle area1Battle0
Definition wstag550.c:177
FieldActorEntry actor1
Definition wstag550.c:251
AreaBattle area0Battle0
Definition wstag550.c:164
AreaBattle area0Battle2
Definition wstag550.c:166
#define STAGE_FILE
Definition wstag550.c:57
AreaBattle area2Battle5
Definition wstag550.c:195
AreaBattle area1Battle1
Definition wstag550.c:178
AreaBattle area2Battle3
Definition wstag550.c:193
u16 actor2Conditions[]
Definition wstag550.c:249
AreaBattle area0Battle4
Definition wstag550.c:168
#define STAGE_TEXT
Definition wstag550.c:55
AreaBattle area3Battle7
Definition wstag550.c:210
BattleList area0Battles
Definition wstag550.c:172
AreaBattle area1Battle7
Definition wstag550.c:184
s16 script1269[]
Definition wstag550.c:115
FieldBattles stageBattles[]
Definition wstag550.c:216
FieldEvent stageEvents[]
Definition wstag550.c:408
u16 actor0Conditions[]
Definition wstag550.c:247