Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
wstag295.c
Go to the documentation of this file.
1/*
2 * WSTAG295: Prison Tower, Asuka City.
3 */
4
5#include "common.h"
6#include "field/stage.h"
7
8/* Creates the event object of progress 0x21, which depends on flags 0x1C39, 0x4057 and 0x4058 */
9void updateStage(StageTask *task, void **children) {
10 switch (task->state) {
11 case TASK_INIT:
12 default:
13 task->nextState(task);
16 children[0] = FIELDSTG_startEvent(0x37B);
18 children[0] = FIELDSTG_startEvent(0x37C);
19 }
20 }
21 break;
22 case TASK_RUN:
23 case TASK_DONE:
24 case TASK_KILL:
25 break;
26 }
27}
28
29#define STAGE_CHILDREN_SIZE 4
31
32/*
33 * After event 580, with Teddy, Dr. Kadomatsu, DO Operator and DO Guard: sets
34 * flag 0x1C1A (which decides whether actors 0, 2 and 20 appear) and keeps it
35 * from playing again
36 */
37void endEvent580(void) {
38 FLAGS_00.applyAction(FLAG(0x1C, 0x1A), 1);
39 FLAGS_00.applyAction(FLAG(0x40, 0x4D), 1);
40}
41
42/* After event 891, with Lisa, Game Master and Teddy: keeps it from playing again */
46
47/*
48 * After event 892, with Game Master, Lisa, Teddy and Nick: lets events 893
49 * and 894 of WSTAG305 start
50 */
51void endEvent892(void) {
52 FLAGS_00.applyAction(FLAG(0x40, 0x59), 1);
53}
54
55#if VERSION_US || VERSION_JP
56#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_05)
57#define EVENT_TEXT_FILE (TEXT_EVENTS_200 - 1)
58#define STAGE_FILE 0x5FF
59#elif VERSION_EU
60#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_05)
61#define EVENT_TEXT_FILE (TEXT_EVENTS_200 - 1)
62#define STAGE_FILE 0x60F
63#endif
64/* Sets the stage up: its map, actors and events, playing BGM_0029 */
83
85 SCRIPT_WALK(2, 0x100, 0xA8, 3),
86 SCRIPT_PLACE(0xC, 0x7B, 0x6E),
87 SCRIPT_POSE(0xC, 1, 7),
88 SCRIPT_PLACE(0x20, 0xB2, 0x4A),
89 SCRIPT_POSE(0x20, 1, 7),
90 SCRIPT_PLACE(0x25, 0xD2, 0x4A),
91 SCRIPT_POSE(0x25, 1, 7),
92 SCRIPT_PLACE(0x43, 0x92, 0x61),
93 SCRIPT_POSE(0x43, 1, 7),
96 SCRIPT_POSE(2, 1, 3),
97 SCRIPT_COMMAND(0x323, 0x325, 2),
98 SCRIPT_WAIT(0x3C),
99 SCRIPT_COMMAND(0x323, 0x326, 2),
100 SCRIPT_WAIT(0x1E),
101 SCRIPT_TALK(0, 0xF, 2, 3),
103 SCRIPT_FOLLOW(0, 0xC),
104 SCRIPT_COMMAND(0x323, 0x325, 0xC),
105 SCRIPT_WAIT(0x3C),
106 SCRIPT_COMMAND(0x323, 0x326, 0xC),
107 SCRIPT_WAIT(0x1E),
108 SCRIPT_TALK(0, 1, 0xC, 0),
110 SCRIPT_WAIT(0x1E),
111 SCRIPT_WALK(0xC, 0xBD, 0x8F, 7),
112 SCRIPT_WAIT_WALK(0xC),
113 SCRIPT_WALK(0xC, 0xC5, 0x8B, 5),
114 SCRIPT_WAIT_WALK(0xC),
115 SCRIPT_POSE(0xC, 1, 7),
116 SCRIPT_WAIT(0x1E),
117 SCRIPT_FOLLOW(0, 2),
118 SCRIPT_TALK(0, 2, 2, 3),
119 SCRIPT_POSE(2, 7, 3),
121 SCRIPT_POSE(2, 1, 3),
122 SCRIPT_WAIT(0x1E),
123 SCRIPT_FOLLOW(0, 0xC),
124 SCRIPT_TALK(0, 3, 0xC, 0),
126 SCRIPT_WAIT(0x1E),
127 SCRIPT_FOLLOW(0, 2),
128 SCRIPT_TALK(0, 4, 2, 3),
130 SCRIPT_POSE(0xC, 1, 3),
131 SCRIPT_POSE(0x20, 1, 0),
132 SCRIPT_POSE(0x25, 1, 0),
133 SCRIPT_WAIT(0x1E),
134 SCRIPT_FOLLOW(0, 0xC),
135 SCRIPT_TALK(0, 5, 0x43, 3),
137 SCRIPT_WAIT(0x1E),
138 SCRIPT_TALK(0, 6, 0x20, 3),
139 SCRIPT_POSE(2, 1, 4),
140 SCRIPT_POSE(0xC, 1, 4),
142 SCRIPT_WAIT(0x1E),
143 SCRIPT_TALK(0, 7, 0x25, 3),
145 SCRIPT_WAIT(0x1E),
146 SCRIPT_FOLLOW(0, 2),
147 SCRIPT_TALK(0, 8, 2, 3),
148 SCRIPT_POSE(2, 7, 3),
149 SCRIPT_POSE(0xC, 1, 7),
151 SCRIPT_FOLLOW(0, 0xC),
152 SCRIPT_COMMAND(0x323, 0x325, 0xC),
153 SCRIPT_COMMAND(0x324, 0x325, 0x43),
154 SCRIPT_COMMAND(0x325, 0x325, 0x20),
155 SCRIPT_COMMAND(0x326, 0x325, 0x25),
156 SCRIPT_WAIT(0x3C),
157 SCRIPT_COMMAND(0x323, 0x326, 0xC),
158 SCRIPT_COMMAND(0x324, 0x326, 0x43),
159 SCRIPT_COMMAND(0x325, 0x326, 0x20),
160 SCRIPT_COMMAND(0x326, 0x326, 0x25),
161 SCRIPT_WAIT(0x1E),
162 SCRIPT_TALK(0, 9, 0x20, 3),
163 SCRIPT_POSE(2, 1, 4),
164 SCRIPT_POSE(0xC, 1, 4),
166 SCRIPT_WAIT(0x1E),
167 SCRIPT_TALK(0, 0xA, 0x25, 3),
169 SCRIPT_WAIT(0x1E),
170 SCRIPT_TALK(0, 0xB, 0x43, 3),
171 SCRIPT_POSE(2, 1, 3),
172 SCRIPT_POSE(0xC, 1, 3),
174 SCRIPT_WAIT(0x1E),
175 SCRIPT_FOLLOW(0, 2),
176 SCRIPT_TALK(0, 0xC, 2, 3),
177 SCRIPT_POSE(2, 7, 3),
178 SCRIPT_POSE(0xC, 1, 7),
180 SCRIPT_POSE(2, 1, 3),
181 SCRIPT_WAIT(0x1E),
182 SCRIPT_FOLLOW(0, 0xC),
183 SCRIPT_TALK(0, 0xD, 0xC, 0),
185 SCRIPT_WAIT(0x1E),
186 SCRIPT_FOLLOW(0, 2),
187 SCRIPT_TALK(0, 0xE, 2, 3),
188 SCRIPT_POSE(2, 7, 3),
190 SCRIPT_POSE(2, 1, 3),
191 SCRIPT_WAIT(0x1E),
193};
195 SCRIPT_LOOK_AT(1, 0x100, 0xA8),
196 SCRIPT_PLACE(2, 0x1CE, 0x110),
197 SCRIPT_POSE(2, 1, 3),
198 SCRIPT_PLACE(0x45, 0xD2, 0x4A),
199 SCRIPT_POSE(0x45, 1, 1),
200 SCRIPT_PLACE(0x46, 0xB2, 0x4A),
201 SCRIPT_POSE(0x46, 1, 3),
202 SCRIPT_PLACE(0x65, 0x1AE, 0x100),
203 SCRIPT_POSE(0x65, 1, 3),
204 SCRIPT_PLACE(0x6C, 0x92, 0x61),
205 SCRIPT_POSE(0x6C, 1, 7),
206 SCRIPT_WAIT(0x1E),
207 SCRIPT_WALK(2, 0x120, 0xB8, 3),
208 SCRIPT_WALK(0x65, 0x100, 0xA8, 3),
210 SCRIPT_POSE(2, 1, 3),
211 SCRIPT_POSE(0x65, 1, 3),
212 SCRIPT_COMMAND(0x323, 0x325, 2),
213 SCRIPT_WAIT(0x3C),
214 SCRIPT_COMMAND(0x323, 0x326, 2),
215 SCRIPT_WAIT(0x1E),
216 SCRIPT_TALK(0, 1, 2, 1),
217 SCRIPT_POSE(2, 7, 3),
219 SCRIPT_POSE(2, 1, 3),
220 SCRIPT_WAIT(0x1E),
221 SCRIPT_TALK(0, 2, 0x65, 2),
222 SCRIPT_POSE(0x65, 1, 7),
224 SCRIPT_WAIT(0x1E),
225 SCRIPT_TALK(0, 3, 0x6C, 3),
226 SCRIPT_POSE(0x45, 1, 7),
227 SCRIPT_POSE(0x46, 1, 7),
229 SCRIPT_WAIT(0x1E),
230 SCRIPT_TALK(0, 4, 0x65, 2),
231 SCRIPT_POSE(0x65, 1, 3),
233 SCRIPT_WAIT(0x1E),
234 SCRIPT_TALK(0, 5, 2, 3),
235 SCRIPT_POSE(2, 7, 3),
237 SCRIPT_POSE(2, 1, 3),
238 SCRIPT_WAIT(0x1E),
239 SCRIPT_TALK(0, 6, 0x65, 2),
240 SCRIPT_POSE(0x65, 1, 7),
242 SCRIPT_WAIT(0x1E),
243 SCRIPT_TALK(0, 7, 2, 3),
244 SCRIPT_POSE(2, 7, 3),
246 SCRIPT_POSE(2, 1, 3),
247 SCRIPT_WAIT(0x1E),
248 SCRIPT_TALK(0, 8, 0x65, 2),
250 SCRIPT_COMMAND(0x323, 0x325, 0x6C),
251 SCRIPT_WAIT(0x3C),
252 SCRIPT_COMMAND(0x323, 0x326, 0x6C),
253 SCRIPT_WAIT(0x1E),
254 SCRIPT_TALK(0, 9, 0x6C, 3),
255 SCRIPT_POSE(0x65, 1, 3),
257 SCRIPT_WAIT(0x1E),
258 SCRIPT_WALK(0x6C, 0x80, 0x68, 1),
259 SCRIPT_WAIT_WALK(0x6C),
260 SCRIPT_WALK(0x6C, 0xC4, 0x8A, 7),
261 SCRIPT_WAIT_WALK(0x6C),
262 SCRIPT_TALK(0, 0xA, 0x6C, 2),
263 SCRIPT_POSE(0x6C, 1, 7),
265 SCRIPT_POSE(0x45, 1, 4),
266 SCRIPT_POSE(0x46, 1, 3),
267 SCRIPT_WAIT(0x1E),
268 SCRIPT_COMMAND(0x323, 0x325, 2),
269 SCRIPT_COMMAND(0x324, 0x325, 0x65),
270 SCRIPT_WAIT(0x3C),
271 SCRIPT_COMMAND(0x323, 0x326, 2),
272 SCRIPT_COMMAND(0x324, 0x326, 0x65),
273 SCRIPT_WAIT(0x1E),
274 SCRIPT_TALK(0, 0xB, 0x65, 2),
275 SCRIPT_POSE(0x65, 1, 7),
277 SCRIPT_WAIT(0x1E),
278 SCRIPT_TALK(0, 0xC, 2, 3),
279 SCRIPT_POSE(2, 7, 3),
281 SCRIPT_POSE(2, 1, 3),
282 SCRIPT_COMMAND(0x323, 0x325, 0x6C),
283 SCRIPT_WAIT(0x3C),
284 SCRIPT_COMMAND(0x323, 0x326, 0x6C),
285 SCRIPT_WAIT(0x1E),
286 SCRIPT_TALK(0, 0xD, 0x6C, 2),
288 SCRIPT_WAIT(0x1E),
289 SCRIPT_TALK(0, 0xE, 0x65, 2),
291 SCRIPT_WAIT(0x1E),
292 SCRIPT_PLACE(0xC, 0x1B0, 0x100),
293 SCRIPT_POSE(0xC, 1, 3),
294 SCRIPT_WAIT(0x1E),
295 SCRIPT_WALK(0xC, 0x170, 0xE0, 3),
296 SCRIPT_WAIT_WALK(0xC),
297 SCRIPT_TALK(0, 0xF, 0xC, 0),
298 SCRIPT_POSE(0xC, 0x42, 3),
300 SCRIPT_POSE(0xC, 1, 3),
301 SCRIPT_COMMAND(0x323, 0x325, 2),
302 SCRIPT_COMMAND(0x324, 0x325, 0x65),
303 SCRIPT_WAIT(0x3C),
304 SCRIPT_COMMAND(0x323, 0x326, 2),
305 SCRIPT_COMMAND(0x324, 0x326, 0x65),
306 SCRIPT_WAIT(0x1E),
307 SCRIPT_POSE(2, 1, 7),
308 SCRIPT_WALK(0xC, 0x150, 0xD0, 3),
309 SCRIPT_WAIT_WALK(0xC),
310 SCRIPT_TALK(0, 0x10, 0xC, 0),
311 SCRIPT_POSE(0xC, 0x34, 0),
313 SCRIPT_POSE(0xC, 1, 3),
314 SCRIPT_WAIT(0x1E),
315 SCRIPT_TALK(0, 0x12, 2, 1),
316 SCRIPT_POSE(2, 7, 7),
318 SCRIPT_POSE(2, 1, 7),
319 SCRIPT_WAIT(0x1E),
320 SCRIPT_TALK(0, 0x11, 0x65, 2),
322 SCRIPT_WAIT(0x1E),
323#if VERSION_US
324 SCRIPT_LEAVE(0xE04, 0x120, 0xB8, 3),
325#elif VERSION_EU || VERSION_JP
326 SCRIPT_LEAVE(0xE05, 0x120, 0xB8, 3),
327#endif
329};
331 SCRIPT_FOLLOW(1, 0x65),
332 SCRIPT_PLACE(2, 0x120, 0xB8),
333 SCRIPT_POSE(2, 1, 7),
334 SCRIPT_PLACE(0xC, 0x150, 0xD0),
335 SCRIPT_POSE(0xC, 1, 3),
336 SCRIPT_PLACE(0x45, 0xD2, 0x4A),
337 SCRIPT_POSE(0x45, 1, 1),
338 SCRIPT_PLACE(0x46, 0xB2, 0x4A),
339 SCRIPT_POSE(0x46, 1, 3),
340 SCRIPT_PLACE(0x65, 0x100, 0xA8),
341 SCRIPT_POSE(0x65, 1, 7),
342 SCRIPT_WAIT(0x78),
343 SCRIPT_TALK(0, 1, 0x6C, 3),
345 SCRIPT_COMMAND(0x323, 0x325, 2),
346 SCRIPT_COMMAND(0x324, 0x325, 0xC),
347 SCRIPT_COMMAND(0x325, 0x325, 0x65),
348 SCRIPT_WAIT(0x3C),
349 SCRIPT_COMMAND(0x323, 0x326, 2),
350 SCRIPT_COMMAND(0x324, 0x326, 0xC),
351 SCRIPT_COMMAND(0x325, 0x326, 0x65),
352 SCRIPT_WAIT(0x1E),
353 SCRIPT_TALK(0, 2, 2, 1),
354 SCRIPT_POSE(2, 7, 3),
355 SCRIPT_POSE(0x65, 1, 3),
357 SCRIPT_POSE(2, 1, 3),
358 SCRIPT_WAIT(0x1E),
359 SCRIPT_TALK(0, 3, 0x6C, 3),
361 SCRIPT_WAIT(0x1E),
362 SCRIPT_TALK(0, 4, 0x65, 2),
363 SCRIPT_POSE(0x65, 1, 7),
365 SCRIPT_WAIT(0x1E),
366 SCRIPT_FOLLOW(0, 2),
367 SCRIPT_TALK(1, 5, 2, 2),
368 SCRIPT_TALK(0, 6, 0xC, 1),
370 SCRIPT_LEAVE(0x218, 0x64, 0x64, 5),
372};
374 { 0x200, 0x100, 0x21C, 0x1A6, 0x70, 0xA6, 0x230, 0x1FE },
375 { 0x200, 0x100, 0x200, 0x100, 0, 0, 0x220, 0x1FE },
376 { 0x200, 0x100, 0x216, 0x138, 0x58, 0x38, 0x200, 0x1FD },
377 { 0x200, 0x100, 0x208, 0x1BC, 0x20, 0xBC, 0x210, 0x1FD },
378 { 0x200, 0x100, 0x210, 0x1BC, 0x40, 0xBC, 0x220, 0x1FD },
379 { 0x200, 0x100, 0x200, 0x1BC, 0, 0xBC, 0x230, 0x1FD },
380 { 0x140, 0x100, 0x170, 0x100, 0xC0, 0, 0x170, 0x1FF },
381 { 0x140, 0x100, 0x148, 0x100, 0x20, 0, 0x170, 0x1FE },
382 { 0x140, 0x100, 0x140, 0x100, 0, 0, 0x170, 0x1FD },
383 { 0x140, 0x100, 0x178, 0x100, 0xE0, 0, 0x170, 0x1FC },
384 { 0x140, 0x100, 0x150, 0x100, 0x40, 0, 0x140, 0x1FB },
385 { 0x140, 0x100, 0x158, 0x100, 0x60, 0, 0x150, 0x1FB },
386 { 0x140, 0x100, 0x160, 0x100, 0x80, 0, 0x160, 0x1FB },
387 { 0x140, 0x100, 0x168, 0x100, 0xA0, 0, 0x170, 0x1FB },
388 { 0x140, 0x100, 0x170, 0x120, 0xC0, 0x20, 0x140, 0x1FA },
389 { 0x140, 0x100, 0x148, 0x128, 0x20, 0x28, 0x150, 0x1FA },
390 { 0x140, 0x100, 0x150, 0x128, 0x40, 0x28, 0x160, 0x1FA },
391 { 0x140, 0x100, 0x158, 0x128, 0x60, 0x28, 0x170, 0x1FA },
392 { 0, 0, 0, 0, 0, 0, 0, 0 },
393};
395 { NULL, NULL, 0x59 },
396 { NULL, NULL, 0 },
397};
399 { NULL, NULL, 0x492 },
400 { NULL, NULL, 0 },
401};
439FieldActorEntry actor0 = { actor0Conditions, NULL, 0xC, 4, 123, 110, 7 };
442FieldActorEntry actor3 = { actor3Conditions, NULL, 0x20, 5, 178, 74, 6 };
443FieldActorEntry actor4 = { actor4Conditions, NULL, 0x25, 6, 210, 74, 2 };
444FieldActorEntry actor5 = { actor5Conditions, NULL, 0x43, 7, 146, 97, 7 };
445FieldActorEntry actor6 = { actor6Conditions, NULL, 0x45, 8, 210, 74, 1 };
446FieldActorEntry actor7 = { actor7Conditions, NULL, 0x45, 8, 210, 74, 1 };
447FieldActorEntry actor8 = { actor8Conditions, NULL, 0x46, 9, 178, 74, 3 };
448FieldActorEntry actor9 = { actor9Conditions, NULL, 0x46, 9, 178, 74, 3 };
452FieldActorEntry actor13 = { actor13Conditions, NULL, 0x6C, 0xC, 146, 97, 7 };
453FieldActorEntry actor14 = { actor14Conditions, NULL, 0x6C, 0xC, 146, 97, 7 };
454FieldActorEntry actor15 = { actor15Conditions, NULL, 0x6C, 0xC, 146, 97, 7 };
455FieldActorEntry actor16 = { actor16Conditions, NULL, 0x6C, 0xC, 196, 138, 7 };
456FieldActorEntry actor17 = { actor17Conditions, NULL, 0x9D, 0xD, 146, 97, 7 };
457FieldActorEntry actor18 = { actor18Conditions, NULL, 0x9E, 0xE, 210, 74, 1 };
458FieldActorEntry actor19 = { actor19Conditions, NULL, 0x9F, 0xF, 178, 74, 3 };
459FieldActorEntry actor20 = { actor20Conditions, NULL, 0x120, 0x10, 233, 156, 7 };
461 &actor0,
462 &actor1,
463 &actor2,
464 &actor3,
465 &actor4,
466 &actor5,
467 &actor6,
468 &actor7,
469 &actor8,
470 &actor9,
471 &actor10,
472 &actor11,
473 &actor12,
474 &actor13,
475 &actor14,
476 &actor15,
477 &actor16,
478 &actor17,
479 &actor18,
480 &actor19,
481 &actor20,
482 NULL,
483};
485 { 1, 0, 0x40, 2, 0x34, 2, 0, 3, 4, 0, 320, 53, 0, 0 },
486 { 1, 0, 0x40, 2, 0x34, 2, 0, 3, 4, 0, 384, 85, 0, 0 },
487 { 1, 0, 0x40, 2, 0x34, 2, 0, 3, 4, 0, 424, 104, 0, 0 },
488 { 1, 0, 0x40, 2, 0x34, 2, 0, 3, 4, 0, 455, 145, 0, 0 },
489 { 1, 0, 0x40, 2, 0x34, 2, 0, 3, 4, 0, 480, 180, 0, 0 },
490 { 1, 0, 0x40, 2, 0x34, 2, 0, 3, 4, 0, 528, 205, 0, 0 },
491 { 1, 0, 0x40, 2, 0x35, 2, 0, 3, 4, 0, 104, 68, 0, 0 },
492 { 1, 0, 0x40, 2, 0x35, 2, 0, 3, 4, 0, 140, 69, 0, 0 },
493 { 1, 0, 0x40, 2, 0x36, 2, 0, 3, 4, 0, 104, 131, 0, 0 },
494 { 1, 0, 0x40, 2, 0x36, 2, 0, 3, 4, 0, 198, 84, 0, 0 },
495 { 1, 0, 0x40, 6, 0x32, 2, 0, 3, 4, 0, 382, 161, 0, 0 },
496 { 1, 0, 0x40, 6, 0x33, 2, 0, 3, 6, 0, 403, 168, 0, 0 },
497 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
498};
500 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x205, 0x70, 0xE4, 7, 0, 0, 0 },
501 { { { PROGRESS(STORY_CONTROL_ROOM), 1 }, { FLAG(0x40, 0x4D), 0 } }, SLOT_EVENT, 0x244, 0, 0, 0, 0, 0, 0 },
502 { { { CODES_END, 0 }, { CODES_END, 0 } }, 0, 0, 0, 0, 0, 0, 0, 0 },
503};
504void (*stageFuncs[])(void) = {
506};
508 { 580, script580, EVENT_TEXT(0x21), NULL, endEvent580 },
509 { 891, script891, EVENT_TEXT(0x24), NULL, endEvent891 },
510 { 892, script892, EVENT_TEXT(0x25), NULL, endEvent892 },
511 { -1, NULL, 0, NULL, NULL },
512};
#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).
#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_LOOK_AT(snap, x, y)
FIELDSTG_pointCamera.
Definition field_map.h:172
#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 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 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 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_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(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_AMATERASU_PLAN_SEEN
wstag305 event 890: Lisa and Nick plan how to get into Amaterasu City past the Knightmon Guard System...
Definition story.h:1475
@ STORY_BULBMON_FOUND
WSTAG520 (Suzaku Hall), event 695: another earthquake; Bulbmon digs the holes.
Definition story.h:103
@ STORY_CONTROL_ROOM
WSTAG325 (Control Room, Asuka City), event 560: a Soldier guards the way.
Definition story.h:90
@ STORY_NETWORK_OFFLINE
WSTAG750, event 886: the news say the Optical Network is offline.
Definition story.h:123
#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_PRESIDENT_ARRESTED
GAME.progress is from STORY_JUNGLE_SOUND to STORY_PRESIDENT_ARRESTED (PROGRESS_RANGES[0x17])
Definition story.h:1932
#define SPECIAL_STORY_KNIGHTMON_REPROGRAMMED_TO_BULBMON_FOUND
GAME.progress is from STORY_KNIGHTMON_REPROGRAMMED to STORY_BULBMON_FOUND (PROGRESS_RANGES[0x11])
Definition story.h:1914
#define FLAG_LISA_RESISTANCE_REPORT_SEEN
wstag305 Master Room event 894: the player tells Lisa he met the Resistance; set at its end,...
Definition story.h:1242
#define FLAG_DESTROMON_REVEAL_SEEN
wstag295 event 891: the Game Master reveals Destromon, born from Vemmon and the Juggernaut; set at it...
Definition story.h:1478
Where an actor's frames go in VRAM: one of the records after the FieldImage (Actor....
Definition field_map.h:114
A character of the field (FieldState.actors, a list of pointers up to NULL), which FIELDSTG_updateFie...
Definition field_map.h:194
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
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
Definition gfx.h:352
u16 actor1Conditions[]
Definition wstag295.c:403
FieldActorEntry actor0
Definition wstag295.c:439
void(* stageFuncs[])(void)
The stage's functions (common/start_stage.inc.c calls the first): a StageFuncs in the stages with a t...
Definition wstag295.c:504
FieldActorEntry actor6
Definition wstag295.c:445
u16 actor11Conditions[]
Definition wstag295.c:413
FieldTalk actor2Talks[]
Definition wstag295.c:394
u16 actor10Conditions[]
Definition wstag295.c:412
void endEvent892(void)
After event 892, with Game Master, Lisa, Teddy and Nick: lets events 893 and 894 of WSTAG305 start.
Definition wstag295.c:51
u16 actor18Conditions[]
Definition wstag295.c:436
FieldActorEntry actor17
Definition wstag295.c:456
FieldActorEntry actor18
Definition wstag295.c:457
FieldActorEntry actor5
Definition wstag295.c:444
FieldActorEntry actor2
Definition wstag295.c:441
s16 script892[]
Definition wstag295.c:330
s16 script580[]
Definition wstag295.c:84
s16 script891[]
Definition wstag295.c:194
FieldActorEntry actor19
Definition wstag295.c:458
u16 actor9Conditions[]
Definition wstag295.c:411
FieldActorEntry * stageActors[]
Definition wstag295.c:460
void endEvent580(void)
After event 580, with Teddy, Dr.
Definition wstag295.c:37
u16 actor13Conditions[]
Definition wstag295.c:419
void endEvent891(void)
After event 891, with Lisa, Game Master and Teddy: keeps it from playing again.
Definition wstag295.c:43
FieldActorEntry actor10
Definition wstag295.c:449
u16 actor19Conditions[]
Definition wstag295.c:437
u16 actor4Conditions[]
Definition wstag295.c:406
FieldActorEntry actor4
Definition wstag295.c:443
u16 actor3Conditions[]
Definition wstag295.c:405
FieldTalk actor11Talks[]
Definition wstag295.c:398
FieldActorEntry actor8
Definition wstag295.c:447
ActorImage stageImages[]
Definition wstag295.c:373
void setupStage(void)
Sets the stage up: its map, actors and events, playing BGM_0029.
Definition wstag295.c:65
u16 actor16Conditions[]
Definition wstag295.c:430
StageTile stageObjects[]
The tables and color setupStage gives FIELDSTG_state (FieldState)
Definition wstag295.c:484
FieldActorEntry actor9
Definition wstag295.c:448
u16 actor8Conditions[]
Definition wstag295.c:410
FieldActorEntry actor20
Definition wstag295.c:459
u16 actor5Conditions[]
Definition wstag295.c:407
FieldActorEntry actor15
Definition wstag295.c:454
FieldActorEntry actor12
Definition wstag295.c:451
FieldActorEntry actor16
Definition wstag295.c:455
u16 actor15Conditions[]
Definition wstag295.c:425
u16 actor6Conditions[]
Definition wstag295.c:408
u16 actor14Conditions[]
Definition wstag295.c:420
FieldActorEntry actor7
Definition wstag295.c:446
StageSlot stageSlots[]
Definition wstag295.c:499
FieldActorEntry actor13
Definition wstag295.c:452
FieldActorEntry actor11
Definition wstag295.c:450
FieldActorEntry actor1
Definition wstag295.c:440
#define STAGE_FILE
Definition wstag295.c:62
u16 actor7Conditions[]
Definition wstag295.c:409
u16 actor2Conditions[]
Definition wstag295.c:404
u16 actor20Conditions[]
Definition wstag295.c:438
#define STAGE_TEXT
Definition wstag295.c:60
u16 actor17Conditions[]
Definition wstag295.c:435
FieldActorEntry actor3
Definition wstag295.c:442
FieldActorEntry actor14
Definition wstag295.c:453
FieldEvent stageEvents[]
Definition wstag295.c:507
u16 actor12Conditions[]
Definition wstag295.c:418
u16 actor0Conditions[]
Definition wstag295.c:402