Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
wstag625.c
Go to the documentation of this file.
1/*
2 * WSTAG625: Secret Room, West Sector: the hideout later on. A second copy off
3 * the Sewers (WSTAG615), where Lisa sends the player into Asuka City and the
4 * Bai Hu Chief is met.
5 */
6
7#include "common.h"
8#include "field/stage.h"
9/* Defined below, after the code that uses them */
11
12/*
13 * stepTileAnimation (common/step_tile_animation.inc.c) for a StageTileSeq:
14 * steps OBJ's animation through FRAMES and returns its frame, looping at the
15 * end or returning 0xFF if once
16 */
17s32 stepTileAnimation(StageTileSeq *obj, AnimFrame *frames, s32 once, s32 depth) {
18 AnimFrame *frame = &frames[obj->anim.index];
20
21 if (dt > 4) {
22 dt = 4;
23 }
24 if (depth == 0) {
25 obj->anim.timer -= dt;
26 }
27 if (obj->anim.timer <= 0) {
28 frame++;
29 obj->anim.index++;
30 obj->anim.timer += frame->duration;
31 if (once) {
32 if (frame->frame == 0xFF) {
33 return 0xFF;
34 }
35 } else if (frame->frame == 0xFF) {
36 frame = frames;
37 obj->anim.index = 0;
38 obj->anim.timer += frame->duration;
39 }
40 stepTileAnimation(obj, frames, once, depth + 1);
41 }
42 return frame->frame;
43}
44
45/*
46 * Plays the steps of updateTileSeqsSteps on the map objects with animations
47 * 1 to 4, which go on to their next step at the end
48 */
50 StageTile *object;
51 s32 n;
52 StageTile *tile;
53 s32 i;
54 s32 frame;
55
56 switch (task->state) {
57 case TASK_INIT:
58 default:
59 task->nextState(task);
60 n = 0;
61 for (object = FIELDSTG_state.objects; object->margin != 0; object++) {
62 if (object->anim >= 1 && object->anim <= 4) {
63 task->entries[n].tile = object;
64 n++;
65 }
66 }
67 task->entries[0].setFrame = 0;
68 task->entries[1].setFrame = 0;
69 task->entries[2].setFrame = 0;
70 task->entries[3].setFrame = 1;
71 task->entries[0].seq = 2;
72 task->entries[1].seq = 2;
73 task->entries[2].seq = 1;
74 task->entries[3].seq = 1;
75 task->entries[0].anim.index = 0;
77 task->entries[1].anim.index = 0;
79 task->entries[2].anim.index = 0;
81 task->entries[3].anim.index = 0;
83 break;
84 case TASK_RUN:
85 for (i = 0; i < 4; i++) {
86 tile = task->entries[i].tile;
87 if (task->entries[i].seq != 0) {
88 frame = stepTileAnimation(&task->entries[i], updateTileSeqsSteps[i][task->entries[i].seq].frames,
89 updateTileSeqsSteps[i][task->entries[i].seq].once, 0);
90 switch (frame) {
91 case 0xFF:
92 if (updateTileSeqsSteps[i][task->entries[i].seq].next == 0) {
93 task->entries[i].seq = 0;
94 tile->visible = 0;
95 } else {
96 task->entries[i].seq = updateTileSeqsSteps[i][task->entries[i].seq].next;
97 task->entries[i].anim.index = 0;
99 }
100 break;
101 case 0x12C:
102 tile->visible = 0;
103 break;
104 default:
105 tile->visible = 1;
106 if (task->entries[i].setFrame == 0) {
107 tile->clutRow = frame;
108 } else {
109 tile->frame = frame;
110 }
111 break;
112 }
113 } else {
114 tile->visible = 0;
115 }
116 }
117 break;
118 case TASK_DONE:
119 case TASK_KILL:
120 break;
121 }
122}
123
124/* Creates the map objects' steps (updateTileSeqs) with an id; nothing in the game calls it */
125void *createTileSeqs(s32 arg) {
126 return createTaskWithId(updateTileSeqs, sizeof(StageTileSeqs), 0, arg);
127}
128
129/* Creates the event object of story progress 0x15 */
130void updateStage(StageTask *task, void **children) {
131 switch (task->state) {
132 case TASK_INIT:
133 default:
134 task->nextState(task);
135 if (GAME.progress == STORY_STAFF_PASS && FLAGS_00.checkCondition(FLAG(0x40, 0x3D), 0)) {
136 children[1] = FIELDSTG_startEvent(0x228);
137 }
138 break;
139 case TASK_RUN:
140 case TASK_DONE:
141 case TASK_KILL:
142 break;
143 }
144}
145
146#define STAGE_CHILDREN_SIZE 0x8
148
149/*
150 * After event 552, with Keith, Nick, Lisa and Kail: gives the player the
151 * Staff Pass and keeps it from playing again
152 */
153void endEvent552(void) {
154 FLAGS_00.applyAction(FLAG(0x40, 0x3D), 1);
155 FLAGS_00.applyAction(ITEM(0, 0x191), 1);
156}
157
158#if VERSION_US || VERSION_JP
159#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_02)
160#define EVENT_TEXT_FILE (TEXT_EVENTS_600 - 1)
161#define STAGE_FILE 0x47C
162#elif VERSION_EU
163#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_02)
164#define EVENT_TEXT_FILE (TEXT_EVENTS_600 - 1)
165#define STAGE_FILE 0x48C
166#endif
167/* Sets the stage up: its map, actors and events, playing BGM_0019 */
186
188 SCRIPT_LOOK_AT(1, 0x1AE, 0x141),
189 SCRIPT_PLACE(2, 0x228, 0x18C),
190 SCRIPT_POSE(2, 1, 3),
191 SCRIPT_PLACE(0xB, 0x1D8, 0x17D),
192 SCRIPT_POSE(0xB, 1, 4),
193 SCRIPT_PLACE(0x65, 0x1B0, 0x104),
194 SCRIPT_POSE(0x65, 1, 7),
195 SCRIPT_PLACE(0x66, 0x1EE, 0xE8),
196 SCRIPT_POSE(0x66, 1, 5),
197 SCRIPT_PLACE(0x67, 0x182, 0x1A0),
198 SCRIPT_POSE(0x67, 1, 3),
199 SCRIPT_PLACE(0x13D, 0x1C1, 0x188),
200 SCRIPT_POSE(0x13D, 1, 4),
201 SCRIPT_WAIT(0x78),
202 SCRIPT_TALK(1, 1, 0x66, 1),
203 SCRIPT_TALK(0, 2, 0x67, 2),
204 SCRIPT_POSE(0x66, 1, 1),
205 SCRIPT_POSE(0x67, 1, 5),
207 SCRIPT_WAIT(0x1E),
208 SCRIPT_TALK(0, 3, 0x65, 3),
209 SCRIPT_POSE(0x65, 1, 1),
211 SCRIPT_WAIT(0x3C),
212 SCRIPT_TALK(0, 0x13, 0x65, 3),
213 SCRIPT_POSE(0x65, 1, 5),
215 SCRIPT_WAIT(0x5A),
216 SCRIPT_TALK(1, 0x12, 0x67, 2),
217 SCRIPT_TALK(0, 4, 0x66, 1),
219 SCRIPT_WAIT(0x1E),
220 SCRIPT_TALK(0, 5, 0x65, 1),
221 SCRIPT_POSE(0x65, 1, 1),
223 SCRIPT_WAIT(0x1E),
224 SCRIPT_TALK(0, 0x14, 0x65, 1),
225 SCRIPT_POSE(0x65, 1, 5),
227 SCRIPT_POSE(0x65, 1, 7),
228 SCRIPT_WAIT(0x1E),
229 SCRIPT_TALK(1, 7, 0x67, 2),
230 SCRIPT_TALK(0, 6, 0x66, 1),
232 SCRIPT_POSE(0x66, 1, 5),
233 SCRIPT_POSE(0x67, 1, 3),
234 SCRIPT_WAIT(0x1E),
235 SCRIPT_TALK(0, 8, 0x65, 1),
237 SCRIPT_WAIT(0x5A),
238 SCRIPT_COMMAND(0x323, 0x325, 0x67),
239 SCRIPT_WAIT(0x3C),
240 SCRIPT_COMMAND(0x323, 0x326, 0x67),
241 SCRIPT_WAIT(0x1E),
242 SCRIPT_TALK(0, 9, 0x67, 2),
244 SCRIPT_FOLLOW(0, 2),
245 SCRIPT_COMMAND(0x323, 0x325, 2),
246 SCRIPT_WAIT(0x5A),
247 SCRIPT_COMMAND(0x323, 0x326, 2),
248 SCRIPT_WAIT(0x1E),
249 SCRIPT_WALK(2, 0x1E0, 0x1B0, 1),
250 SCRIPT_POSE(0xB, 1, 0),
251 SCRIPT_POSE(0x13D, 1, 0),
253 SCRIPT_WALK(2, 0x1A0, 0x190, 3),
254 SCRIPT_POSE(0xB, 1, 1),
255 SCRIPT_POSE(0x13D, 1, 1),
257 SCRIPT_POSE(2, 1, 1),
258 SCRIPT_WAIT(0x1E),
259 SCRIPT_TALK(0, 0xA, 0x67, 1),
261 SCRIPT_COMMAND(0x323, 0x325, 0x67),
262 SCRIPT_WAIT(0x3C),
263 SCRIPT_COMMAND(0x323, 0x326, 0x67),
264 SCRIPT_WAIT(0x1E),
265 SCRIPT_TALK(0, 0xB, 0x67, 1),
266 SCRIPT_POSE(0x67, 1, 5),
269 SCRIPT_WAIT(0x1E),
270 SCRIPT_WAIT(0x1E),
271 SCRIPT_TALK(0, 0xC, 2, 2),
273 SCRIPT_LOOK_AT(0, 0x1AE, 0x141),
274 SCRIPT_WAIT(0x1E),
275 SCRIPT_TALK(0, 0xD, 0x65, 3),
276 SCRIPT_POSE(0x65, 1, 1),
277 SCRIPT_POSE(0x66, 1, 1),
279 SCRIPT_WAIT(0x1E),
280 SCRIPT_TALK(0, 0xE, 0x67, 0),
282 SCRIPT_WAIT(0x1E),
283 SCRIPT_TALK(0, 0xF, 2, 0),
284 SCRIPT_POSE(2, 1, 5),
285 SCRIPT_POSE(0x65, 1, 0),
287 SCRIPT_WAIT(0x1E),
288 SCRIPT_TALK(0, 0x10, 0x65, 1),
290 SCRIPT_WAIT(0x1E),
291 SCRIPT_TALK(0, 0x11, 0xB, 2),
293 SCRIPT_FOLLOW(0, 2),
294 SCRIPT_WALK(2, 0x1C8, 0x1A4, 6),
296 SCRIPT_WALK(2, 0x1F4, 0x1A4, 6),
297 SCRIPT_WAIT(6),
298 SCRIPT_LEAVE(0x254, 0x2D4, 0xC4, 7),
300};
302 { 0, 6 }, { 1, 6 }, { 2, 6 }, { 1, 6 },
303 { 0, 6 }, { 1, 6 }, { 2, 6 }, { 1, 6 },
304 { 255, 0 },
305};
307 { 0, 6 }, { 0, 6 }, { 0, 6 }, { 1, 6 },
308 { 2, 6 }, { 3, 6 }, { 4, 6 }, { 5, 6 },
309 { 6, 6 }, { 7, 6 }, { 6, 6 }, { 5, 6 },
310 { 4, 6 }, { 3, 6 }, { 2, 6 }, { 1, 6 },
311 { 0, 6 }, { 0, 6 }, { 255, 0x3E7 },
312};
314 { 0, 6 }, { 1, 6 }, { 2, 6 }, { 1, 6 },
315 { 0, 6 }, { 1, 6 }, { 2, 6 }, { 1, 6 },
316 { 255, 0 },
317};
319 { 0, 12 }, { 1, 12 }, { 2, 12 }, { 1, 12 },
320 { 255, 0 },
321};
323 { 2, 12 }, { 3, 12 }, { 4, 12 }, { 5, 12 },
324 { 6, 12 }, { 7, 12 }, { 8, 12 }, { 9, 12 },
325 { 10, 12 }, { 255, 0x3E7 },
326};
328 { 9, 12 }, { 10, 12 }, { 9, 12 }, { 8, 12 },
329 { 255, 0 },
330};
332 { 0x12C, 90 }, { 0, 6 }, { 1, 6 }, { 2, 6 },
333 { 3, 6 }, { 4, 6 }, { 3, 6 }, { 4, 6 },
334 { 3, 6 }, { 4, 6 }, { 3, 6 }, { 2, 6 },
335 { 1, 6 }, { 2, 6 }, { 1, 6 }, { 2, 6 },
336 { 1, 6 }, { 255, 0x3E7 },
337};
339 { 0x12C, 108 }, { 50, 6 }, { 51, 6 }, { 52, 6 },
340 { 53, 6 }, { 54, 6 }, { 56, 6 }, { 57, 6 },
341 { 58, 6 }, { 59, 6 }, { 255, 0x3E7 },
342};
344 { { NULL, 0, 0 }, { updateTileSeqsSteps_0_0, 0, 0 }, { updateTileSeqsSteps_0_1, 1, 3 }, { updateTileSeqsSteps_0_2, 0, 0 } },
345 { { NULL, 0, 0 }, { updateTileSeqsSteps_1_0, 0, 0 }, { updateTileSeqsSteps_1_1, 1, 3 }, { updateTileSeqsSteps_1_2, 0, 0 } },
346 { { NULL, 0, 0 }, { updateTileSeqsSteps_2, 1, 0 }, { NULL, 0, 0 }, { NULL, 0, 0 } },
347 { { NULL, 0, 0 }, { updateTileSeqsSteps_3, 1, 0 }, { NULL, 0, 0 }, { NULL, 0, 0 } },
348};
350 { 0x200, 0x100, 0x21C, 0x1A6, 0x70, 0xA6, 0x230, 0x1FE },
351 { 0x200, 0x100, 0x200, 0x100, 0, 0, 0x220, 0x1FE },
352 { 0x200, 0x100, 0x216, 0x138, 0x58, 0x38, 0x200, 0x1FD },
353 { 0x200, 0x100, 0x208, 0x1BC, 0x20, 0xBC, 0x210, 0x1FD },
354 { 0x200, 0x100, 0x210, 0x1BC, 0x40, 0xBC, 0x220, 0x1FD },
355 { 0x200, 0x100, 0x200, 0x1BC, 0, 0xBC, 0x230, 0x1FD },
356 { 0x140, 0x100, 0x162, 0x190, 0x88, 0x90, 0x160, 0x1F6 },
357 { 0x140, 0x100, 0x174, 0x150, 0xD0, 0x50, 0x160, 0x1F5 },
358 { 0x140, 0x100, 0x14C, 0x178, 0x30, 0x78, 0x170, 0x1F5 },
359 { 0x140, 0x100, 0x152, 0x178, 0x48, 0x78, 0x140, 0x1F4 },
360 { 0x140, 0x100, 0x16A, 0x190, 0xA8, 0x90, 0x160, 0x1F4 },
361 { 0x140, 0x100, 0x140, 0x198, 0, 0x98, 0x170, 0x1F4 },
362 { 0x140, 0x100, 0x15A, 0x198, 0x68, 0x98, 0x140, 0x1F3 },
363 { 0x140, 0x100, 0x152, 0x1A0, 0x48, 0xA0, 0x160, 0x1F3 },
364};
366 { NULL, NULL, 0x306 },
367 { NULL, NULL, 0 },
368};
370 { NULL, NULL, 0x307 },
371 { NULL, NULL, 0 },
372};
374 { NULL, NULL, 0x307 },
375 { NULL, NULL, 0 },
376};
378 { NULL, NULL, 0x304 },
379 { NULL, NULL, 0 },
380};
382 { NULL, NULL, 0x304 },
383 { NULL, NULL, 0 },
384};
386 { NULL, NULL, 0x305 },
387 { NULL, NULL, 0 },
388};
390 { NULL, NULL, 0x305 },
391 { NULL, NULL, 0 },
392};
394 { NULL, NULL, 0x303 },
395 { NULL, NULL, 0 },
396};
415FieldActorEntry actor7 = { NULL, NULL, 0x9A, 8, 641, 350, 0 };
416FieldActorEntry actor8 = { NULL, NULL, 0x9B, 9, 593, 325, 1 };
417FieldActorEntry actor9 = { NULL, NULL, 0x9C, 0xA, 545, 301, 2 };
420 &actor0,
421 &actor1,
422 &actor2,
423 &actor3,
424 &actor4,
425 &actor5,
426 &actor6,
427 &actor7,
428 &actor8,
429 &actor9,
430 &actor10,
431 NULL,
432};
434 { 0, 1, 0x40, 2, 0x3D, 0, 0, 0, 0, 0, 335, 351, 0, 0 },
435 { 0, 2, 0x40, 2, 0x3E, 0, 0, 0, 0, 0, 345, 372, 0, 0 },
436 { 0, 3, 0x40, 2, 0x3C, 0, 0, 0, 0, 0, 477, 356, 0, 0 },
437 { 0, 4, 0x40, 2, 0x32, 0, 0, 0, 0, 0, 489, 350, 0, 0 },
438 { 1, 0, 0x40, 2, 0x5F, 2, 0, 3, 6, 0, 521, 212, 0, 0 },
439 { 1, 0, 0x40, 2, 0x5F, 2, 0, 3, 6, 0, 569, 236, 0, 0 },
440 { 1, 0, 0x40, 2, 0x60, 2, 0, 3, 6, 0, 617, 260, 0, 0 },
441 { 1, 0, 0x40, 2, 0x62, 2, 0, 5, 6, 0, 392, 163, 0, 0 },
442 { 1, 0, 0x40, 2, 0x63, 2, 0, 5, 6, 0, 369, 205, 0, 0 },
443 { 1, 0, 0x40, 6, 0x5E, 2, 0, 3, 6, 0, 360, 389, 0, 0 },
444 { 1, 0, 0x40, 6, 0x61, 2, 0, 5, 6, 0, 361, 186, 0, 0 },
445 { 1, 0, 0x40, 4, 0, 0, 0, 0, 0, 0, 377, 371, 399, 0 },
446 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
447};
449 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x254, 0x2D4, 0xC4, 7, 0, 0, 0 },
450 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_CLIMB_DOWN, 5, 0x1D0, 0xF8, 0, 0, 0, 0 },
451 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_CLIMB_UP, 5, 0x1E0, 0x150, 0, 0, 0, 0 },
452 { { { CODES_END, 0 }, { CODES_END, 0 } }, 0, 0, 0, 0, 0, 0, 0, 0 },
453};
454void (*stageFuncs[])(void) = {
456};
458 { 552, script552, EVENT_TEXT(0x18), NULL, endEvent552 },
459 { -1, NULL, 0, NULL, NULL },
460};
#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
GfxState GFX
GFX: the graphics state and its methods.
Definition display.c:209
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 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 FIELD_COMMAND_ICON3
its substate 3, with ITEM_GET
Definition field_map.h:44
#define SLOT_CLIMB_DOWN
Definition field_map.h:257
#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 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_SECRET_ROOM
BGM_0019: the Secret Room, the rebels' hideout.
Definition sound.h:95
#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,...
@ STORY_CONTROL_ROOM
WSTAG325 (Control Room, Asuka City), event 560: a Soldier guards the way.
Definition story.h:90
@ STORY_STAFF_PASS
WSTAG620, event 551: Nick finds a Staff Pass for the player.
Definition story.h:87
#define SPECIAL_STORY_BYAKKO_LEADER_FOUGHT_TO_GAME_MASTER_CAUGHT
GAME.progress is from STORY_BYAKKO_LEADER_FOUGHT to STORY_GAME_MASTER_CAUGHT (PROGRESS_RANGES[3])
Definition story.h:1872
Where an actor's frames go in VRAM: one of the records after the FieldImage (Actor....
Definition field_map.h:114
One frame of a sprite animation; frame 0xFF ends it (or loops it)
Definition gfx.h:296
s16 frame
Definition gfx.h:297
s16 duration
Definition gfx.h:298
s16 index
Definition gfx.h:302
s16 timer
Definition gfx.h:303
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
s32(* getFrameTime)(void)
Definition gfx.h:32
GfxFuncs funcs
Definition gfx.h:77
A step of a StageTileSeq: its animation, and the step after it ends.
Definition stage.h:258
AnimFrame * frames
Definition stage.h:259
s16 next
0: hide the map object
Definition stage.h:261
s16 once
play once, then go to next
Definition stage.h:260
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
A map object played through a sequence of animations.
Definition stage.h:230
StageTile * tile
Definition stage.h:233
s16 seq
the step playing, 0 when finished
Definition stage.h:231
s16 setFrame
0: the animation sets clutRow, else frame
Definition stage.h:232
AnimState anim
Definition stage.h:234
The map objects with animations 1 to 4, sequenced.
Definition stage.h:238
void(* nextState)(struct StageTileSeqs *task)
Definition stage.h:239
StageTileSeq entries[4]
Definition stage.h:240
An object of a map, which FIELDSTG draws: a record of the table at FieldState.objects,...
Definition field_map.h:208
u8 anim
which of a stage's animations sets frame (1-3); FIELDSTG finds objects by it (its lift,...
Definition field_map.h:210
Definition gfx.h:352
void * createTaskWithId(void(*update)(), s32 size, s32 childrenSize, s32 id)
Allocates a zeroed task of size bytes (header included) with room for childrenSize / 4 child tasks.
Definition task.c:80
u16 actor1Conditions[]
Definition wstag625.c:398
FieldActorEntry actor0
Definition wstag625.c:408
void(* stageFuncs[])(void)
The stage's functions (common/start_stage.inc.c calls the first): a StageFuncs in the stages with a t...
Definition wstag625.c:454
FieldActorEntry actor6
Definition wstag625.c:414
AnimFrame updateTileSeqsSteps_2[]
Definition wstag625.c:331
FieldTalk actor2Talks[]
Definition wstag625.c:373
AnimFrame updateTileSeqsSteps_1_1[]
Definition wstag625.c:322
void * createTileSeqs(s32 arg)
Creates the map objects' steps (updateTileSeqs) with an id; nothing in the game calls it.
Definition wstag625.c:125
u16 actor10Conditions[]
Definition wstag625.c:404
s16 script552[]
Definition wstag625.c:187
StageSeqStep updateTileSeqsSteps[4][4]
Defined below, after the code that uses them.
Definition wstag625.c:343
FieldTalk actor5Talks[]
Definition wstag625.c:385
FieldActorEntry actor5
Definition wstag625.c:413
void endEvent552(void)
After event 552, with Keith, Nick, Lisa and Kail: gives the player the Staff Pass and keeps it from p...
Definition wstag625.c:153
FieldActorEntry actor2
Definition wstag625.c:410
void updateTileSeqs(StageTileSeqs *task)
Plays the steps of updateTileSeqsSteps on the map objects with animations 1 to 4, which go on to thei...
Definition wstag625.c:49
AnimFrame updateTileSeqsSteps_1_2[]
Definition wstag625.c:327
FieldActorEntry * stageActors[]
Definition wstag625.c:419
FieldTalk actor1Talks[]
Definition wstag625.c:369
FieldTalk actor0Talks[]
Definition wstag625.c:365
FieldActorEntry actor10
Definition wstag625.c:418
FieldTalk actor4Talks[]
Definition wstag625.c:381
u16 actor4Conditions[]
Definition wstag625.c:401
FieldActorEntry actor4
Definition wstag625.c:412
u16 actor3Conditions[]
Definition wstag625.c:400
AnimFrame updateTileSeqsSteps_0_1[]
Definition wstag625.c:306
AnimFrame updateTileSeqsSteps_1_0[]
Definition wstag625.c:318
FieldActorEntry actor8
Definition wstag625.c:416
ActorImage stageImages[]
Definition wstag625.c:349
FieldTalk actor6Talks[]
Definition wstag625.c:389
void setupStage(void)
Sets the stage up: its map, actors and events, playing BGM_0019.
Definition wstag625.c:168
StageTile stageObjects[]
The tables and color setupStage gives FIELDSTG_state (FieldState)
Definition wstag625.c:433
FieldActorEntry actor9
Definition wstag625.c:417
u16 actor5Conditions[]
Definition wstag625.c:402
FieldTalk actor10Talks[]
Definition wstag625.c:393
FieldTalk actor3Talks[]
Definition wstag625.c:377
AnimFrame updateTileSeqsSteps_3[]
Definition wstag625.c:338
AnimFrame updateTileSeqsSteps_0_0[]
Definition wstag625.c:301
u16 actor6Conditions[]
Definition wstag625.c:403
FieldActorEntry actor7
Definition wstag625.c:415
StageSlot stageSlots[]
Definition wstag625.c:448
FieldActorEntry actor1
Definition wstag625.c:409
#define STAGE_FILE
Definition wstag625.c:165
u16 actor2Conditions[]
Definition wstag625.c:399
#define STAGE_TEXT
Definition wstag625.c:163
AnimFrame updateTileSeqsSteps_0_2[]
Definition wstag625.c:313
FieldActorEntry actor3
Definition wstag625.c:411
s32 stepTileAnimation(StageTileSeq *obj, AnimFrame *frames, s32 once, s32 depth)
stepTileAnimation (common/step_tile_animation.inc.c) for a StageTileSeq: steps OBJ's animation throug...
Definition wstag625.c:17
FieldEvent stageEvents[]
Definition wstag625.c:457
u16 actor0Conditions[]
Definition wstag625.c:397