Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
wstag226.c
Go to the documentation of this file.
1/*
2 * WSTAG226: Login Room, Amaterasu City. On the Amaterasu server; its Asuka
3 * server twin is WSTAG225.
4 */
5
6#include "common.h"
7#include "field/stage.h"
8/* Defined below, after the code that uses them */
10extern s8 tileEffectSortY[];
11extern s8 tileEffectY[];
12extern s16 tileEffectPlaces[][2];
13
15
17
18/* Moves its map objects to (x, y) and animates them when the substate is set to 1 */
20 StageTile *tile;
21 StageTile *t;
22 s32 i;
23 s32 n;
24 s32 j;
25 s32 frame;
26 s32 done;
27
28 switch (task->state) {
29 case TASK_INIT:
30 default:
31 resetTileEffect(task);
32 task->nextState(task);
33 break;
34 case TASK_RUN:
35 switch (task->substate) {
36 case 0:
37 break;
38 case 1:
39 switch (task->step) {
40 case 0:
41 n = 0;
42 for (t = FIELDSTG_state.objects; t->margin != 0; t++) {
43 if (t->anim >= 1 && t->anim <= 3) {
44 task->anims[n].tile = t;
45 t->x = task->x;
46 t->y = task->y + tileEffectY[n];
47 t->sortY = task->y + tileEffectSortY[n];
48 n++;
49 }
50 }
51 resetTileEffect(task);
52 task->nextStep(task);
53 /* fallthrough */
54 case 1:
55 done = 0;
56 for (i = 0; i < 3; i++) {
57 tile = task->anims[i].tile;
58 frame = stepAnimationOnce(&task->anims[i], updateTileEffectFrames[i], 0);
59 switch (frame) {
60 case 0xFF:
61 done++;
62 tile->visible = 0;
63 tile->frame = 0;
64 break;
65 case 0x12C:
66 tile->visible = 0;
67 tile->frame = 0;
68 break;
69 default:
70 tile->visible = 1;
71 tile->frame = frame;
72 break;
73 }
74 }
75 if (done < 3) {
76 break;
77 }
78 task->nextStep(task);
79 /* fallthrough */
80 case 2:
81 for (j = 0; j < 3; j++) {
82 task->anims[j].tile->visible = 0;
83 }
84 resetTileEffect(task);
85 task->setSubstate(task, 0);
86 break;
87 }
88 break;
89 }
90 break;
91 case TASK_DONE:
92 case TASK_KILL:
93 break;
94 }
95}
96
97/* Starts the effect at the place of map 0 or 1 */
99 s32 i;
100
101 if (task != NULL) {
102 i = 0;
103 switch (id) {
104 case 1:
105 i = 1;
106 /* fallthrough */
107 case 0:
108 task->x = tileEffectPlaces[i][0];
109 task->y = tileEffectPlaces[i][1];
110 task->setSubstate(task, 1);
111 break;
112 }
113 }
114}
115
117
118/* Creates the effect of map objects that startTileEffect sets off (updateTileEffect) */
120 return createTask(updateTileEffect, sizeof(StageTileEffect), 0);
121}
122
123/* Creates the stage helper task and the event object of progress 0x25 when flag 0x4060 is set */
124void updateStage(StageTask *task, void **children) {
125 switch (task->state) {
126 case TASK_INIT:
127 default:
128 children[1] = createTileEffectTask();
129 do {
131 children[0] = FIELDSTG_startEvent(0x3A7);
132 break;
133 }
134 } while (0);
135 task->nextState(task);
136 break;
137 case TASK_RUN:
138 case TASK_DONE:
139 case TASK_KILL:
140 break;
141 }
142}
143
144#define STAGE_CHILDREN_SIZE 0x8
146
147/* After event 935, with Teddy, Kail and Kurt: moves the story on to STORY_PRESIDENT_ARRESTED */
151
152#if VERSION_US || VERSION_JP
153#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_03)
154#define EVENT_TEXT_FILE (TEXT_EVENTS_200 - 1)
155#define STAGE_FILE 0x4A8
156#elif VERSION_EU
157#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_03)
158#define EVENT_TEXT_FILE (TEXT_EVENTS_200 - 1)
159#define STAGE_FILE 0x4B8
160#endif
161/*
162 * Sets the stage up: its map, actors and events, playing KANRIBGM; BGM_0029
163 * instead except at STORY_PRESIDENT_ARRESTED once flag 0x1A0A is set
164 */
187
189 SCRIPT_PLACE(1, 0x58, 0x1CC),
190 SCRIPT_POSE(1, 1, 5),
191 SCRIPT_PLACE(0x9D, 0x109, 0x18D),
192 SCRIPT_POSE(0x9D, 1, 3),
193 SCRIPT_WAIT(0x1E),
194 SCRIPT_WALK(1, 0x78, 0x1BC, 5),
195 SCRIPT_PLACE(0xC, 0x58, 0x1CC),
196 SCRIPT_POSE(0xC, 1, 5),
198 SCRIPT_WALK(1, 0xA0, 0x1A8, 5),
199 SCRIPT_WALK(0xC, 0x80, 0x1B8, 5),
201 SCRIPT_POSE(1, 1, 5),
202 SCRIPT_POSE(0xC, 1, 5),
203 SCRIPT_COMMAND(0x323, 0x325, 1),
204 SCRIPT_COMMAND(0x324, 0x325, 0xC),
205 SCRIPT_WAIT(0x3C),
206 SCRIPT_COMMAND(0x323, 0x326, 1),
207 SCRIPT_COMMAND(0x324, 0x326, 0xC),
208 SCRIPT_WAIT(0x1E),
209 SCRIPT_WALK(1, 0xF0, 0x180, 5),
210 SCRIPT_WALK(0xC, 0xD0, 0x190, 5),
211 SCRIPT_WAIT_WALK(0xC),
212 SCRIPT_POSE(1, 0x3A, 7),
213 SCRIPT_WALK(0xC, 0xD0, 0x178, 4),
214 SCRIPT_WAIT_WALK(0xC),
215 SCRIPT_POSE(1, 0x2F, 7),
216 SCRIPT_WALK(0xC, 0xFE, 0x161, 5),
217 SCRIPT_COMMAND(0x323, 0x327, 1),
218 SCRIPT_WAIT(0x5A),
219 SCRIPT_POSE(0xC, 0x3A, 3),
220 SCRIPT_COMMAND(0x323, 0x326, 1),
221 SCRIPT_WAIT(0x3C),
222 SCRIPT_TALK(0, 1, 1, 3),
223 SCRIPT_POSE(0xC, 0x3A, 5),
225 SCRIPT_WAIT(0x1E),
226 SCRIPT_FOLLOW(0, 0xC),
227 SCRIPT_TALK(0, 2, 0xC, 0),
228 SCRIPT_POSE(1, 1, 4),
229 SCRIPT_POSE(0xC, 7, 0),
230 SCRIPT_POSE(0x9D, 1, 4),
232 SCRIPT_PLACE(0xB, 0x58, 0x1CC),
233 SCRIPT_POSE(0xB, 1, 5),
234 SCRIPT_POSE(0xC, 1, 0),
235 SCRIPT_WAIT(0x1E),
236 SCRIPT_WALK(0xB, 0x78, 0x1BC, 5),
237 SCRIPT_PLACE(0x13D, 0x58, 0x1CC),
238 SCRIPT_POSE(0x13D, 1, 5),
239 SCRIPT_WAIT_WALK(0xB),
240 SCRIPT_WALK(0xB, 0xD0, 0x190, 5),
241 SCRIPT_POSE(0x9D, 1, 2),
242 SCRIPT_WALK(0x13D, 0xB0, 0x1A0, 5),
243 SCRIPT_WAIT_WALK(0xB),
244 SCRIPT_POSE(0xB, 1, 5),
245 SCRIPT_POSE(0x13D, 1, 5),
246 SCRIPT_WAIT(0x1E),
247 SCRIPT_FOLLOW(0, 0xB),
248 SCRIPT_TALK(0, 0xB, 0xB, 1),
249 SCRIPT_POSE(0xB, 7, 5),
251 SCRIPT_POSE(0xC, 1, 5),
252 SCRIPT_COMMAND(0x323, 0x325, 1),
253 SCRIPT_COMMAND(0x324, 0x325, 0xC),
254 SCRIPT_WAIT(0x3C),
255 SCRIPT_POSE(1, 1, 1),
256 SCRIPT_POSE(0xC, 1, 1),
257 SCRIPT_POSE(0x9D, 1, 1),
258 SCRIPT_COMMAND(0x323, 0x326, 1),
259 SCRIPT_COMMAND(0x324, 0x326, 0xC),
260 SCRIPT_WAIT(0x1E),
261 SCRIPT_LOOK_AT(0, 0xEA, 0x175),
262 SCRIPT_TALK(1, 3, 1, 3),
263 SCRIPT_TALK(0, 4, 0xC, 2),
265 SCRIPT_WAIT(0x1E),
266 SCRIPT_POSE(1, 1, 3),
267 SCRIPT_WALK(0xB, 0xD0, 0x162, 4),
268 SCRIPT_POSE(0x9D, 1, 3),
269 SCRIPT_WALK(0x13D, 0xD0, 0x190, 5),
270 SCRIPT_WAIT_WALK(0x13D),
271 SCRIPT_POSE(0xB, 1, 7),
272 SCRIPT_WALK(0x13D, 0xD0, 0x180, 6),
273 SCRIPT_WAIT_WALK(0x13D),
274 SCRIPT_TALK(0, 5, 0xB, 0),
275 SCRIPT_POSE(0xB, 7, 7),
277 SCRIPT_POSE(0xB, 1, 7),
278 SCRIPT_WAIT(0x1E),
279 SCRIPT_TALK(0, 0xC, 0xB, 0),
280 SCRIPT_POSE(0xB, 7, 6),
281 SCRIPT_POSE(0x9D, 1, 5),
283 SCRIPT_POSE(0xB, 1, 6),
284 SCRIPT_WAIT(0x1E),
285 SCRIPT_TALK(0, 7, 0xB, 0),
286 SCRIPT_POSE(1, 1, 2),
287 SCRIPT_POSE(0xB, 1, 0),
289 SCRIPT_WAIT(0x1E),
290 SCRIPT_TALK(0, 6, 0x13D, 3),
291 SCRIPT_POSE(0x13D, 1, 4),
293 SCRIPT_WAIT(0x1E),
294 SCRIPT_TALK(0, 8, 0xC, 2),
295 SCRIPT_POSE(1, 1, 4),
296 SCRIPT_POSE(0xC, 7, 1),
297 SCRIPT_POSE(0x9D, 1, 4),
299 SCRIPT_POSE(0xC, 1, 1),
300 SCRIPT_WAIT(0x1E),
301 SCRIPT_TALK(0, 9, 0xC, 2),
302 SCRIPT_POSE(0xC, 7, 0),
304 SCRIPT_POSE(0xC, 1, 0),
305 SCRIPT_WAIT(0x1E),
306 SCRIPT_TALK(0, 0xA, 1, 3),
307 SCRIPT_POSE(1, 7, 3),
308 SCRIPT_POSE(0xB, 1, 7),
309 SCRIPT_POSE(0x9D, 1, 3),
310 SCRIPT_POSE(0x13D, 1, 6),
312 SCRIPT_POSE(1, 1, 3),
313 SCRIPT_WAIT(0x1E),
314 SCRIPT_WALK(1, 0x58, 0x1CC, 1),
315 SCRIPT_POSE(0xB, 1, 1),
316 SCRIPT_POSE(0xC, 1, 1),
317 SCRIPT_POSE(0x9D, 1, 1),
318 SCRIPT_POSE(0x13D, 1, 1),
319 SCRIPT_WAIT(0x78),
320 SCRIPT_LEAVE(0x270, 0x3E8, 0xEC, 1),
322};
324 { 70, 4 }, { 71, 4 }, { 70, 4 }, { 71, 4 },
325 { 255, 0x3E7 },
326};
328 { 0x12C, 56 }, { 85, 6 }, { 86, 6 }, { 87, 4 },
329 { 88, 4 }, { 89, 4 }, { 90, 4 }, { 88, 4 },
330 { 89, 4 }, { 90, 4 }, { 88, 4 }, { 89, 4 },
331 { 90, 4 }, { 88, 4 }, { 89, 4 }, { 90, 4 },
332 { 88, 4 }, { 89, 4 }, { 90, 4 }, { 255, 0x3E7 },
333};
335 { 0x12C, 16 }, { 72, 4 }, { 73, 4 }, { 74, 4 },
336 { 73, 4 }, { 75, 6 }, { 76, 6 }, { 77, 14 },
337 { 78, 114 }, { 79, 6 }, { 80, 6 }, { 81, 6 },
338 { 82, 6 }, { 83, 6 }, { 84, 8 }, { 255, 0x3E7 },
339};
344 30, 30, 30, 0,
345};
347 0, -0x2F, -0x2F, 0,
348};
350 { 0x150, 0x112 }, { 112, 0x112 },
351};
353 { 0x200, 0x100, 0x21C, 0x1A6, 0x70, 0xA6, 0x230, 0x1FE },
354 { 0x200, 0x100, 0x200, 0x100, 0, 0, 0x220, 0x1FE },
355 { 0x200, 0x100, 0x216, 0x138, 0x58, 0x38, 0x200, 0x1FD },
356 { 0x200, 0x100, 0x208, 0x1BC, 0x20, 0xBC, 0x210, 0x1FD },
357 { 0x200, 0x100, 0x210, 0x1BC, 0x40, 0xBC, 0x220, 0x1FD },
358 { 0x200, 0x100, 0x200, 0x1BC, 0, 0xBC, 0x230, 0x1FD },
359 { 0x140, 0x100, 0x160, 0x180, 0x80, 0x80, 0x170, 0x1FE },
360 { 0x140, 0x100, 0x168, 0x180, 0xA0, 0x80, 0x160, 0x1FD },
361 { 0x140, 0x100, 0x160, 0x160, 0x80, 0x60, 0x170, 0x1FD },
362 { 0x140, 0x100, 0x152, 0x198, 0x48, 0x98, 0x150, 0x1FC },
363 { 0x140, 0x100, 0x15A, 0x198, 0x68, 0x98, 0x160, 0x1FC },
364 { 0x140, 0x100, 0x168, 0x160, 0xA0, 0x60, 0x170, 0x1FC },
365 { 0x140, 0x100, 0x14A, 0x190, 0x28, 0x90, 0x160, 0x1FB },
366 { 0x140, 0x100, 0x14A, 0x170, 0x28, 0x70, 0x170, 0x1FB },
367};
376 { actor3Talk0Conditions, NULL, 0x1B4 },
377 { actor3Talk1Conditions, NULL, 0x209 },
378 { NULL, NULL, 0 },
379};
381 { NULL, NULL, 0x5B },
382 { NULL, NULL, 0 },
383};
385 { NULL, NULL, 0x5D },
386 { NULL, NULL, 0 },
387};
390 { actor6Talk1Conditions, NULL, 0x202 },
391 { NULL, NULL, 0 },
392};
394 { NULL, NULL, 0x5A },
395 { NULL, NULL, 0 },
396};
398 { NULL, NULL, 0x5C },
399 { NULL, NULL, 0 },
400};
402 { actor9Talk0Conditions, NULL, 0x1FA },
403 { actor9Talk1Conditions, NULL, 0x208 },
404 { NULL, NULL, 0 },
405};
407 { NULL, NULL, 0x1FB },
408 { NULL, NULL, 0 },
409};
463FieldActorEntry actor9 = { actor9Conditions, actor9Talks, 0xB2, 0xA, 277, 363, 3 };
465FieldActorEntry actor11 = { actor11Conditions, NULL, 0x13D, 0xB, 0, 0, 1 };
467 &actor0,
468 &actor1,
469 &actor2,
470 &actor3,
471 &actor4,
472 &actor5,
473 &actor6,
474 &actor7,
475 &actor8,
476 &actor9,
477 &actor10,
478 &actor11,
479 NULL,
480};
482 { 0, 1, 0x50, 6, 0x46, 0, 0, 0, 0, 0, 336, 274, 0, 0 },
483 { 1, 0, 0x40, 6, 0x3F, 1, 0x3F, 0x42, 6, 0, 116, 258, 0, 0 },
484 { 1, 0, 0x40, 6, 0x3F, 1, 0x3F, 0x42, 6, 0, 228, 282, 0, 0 },
485 { 1, 0, 0x40, 6, 0x3F, 1, 0x3F, 0x42, 6, 0, 340, 258, 0, 0 },
486 { 1, 0, 0x40, 6, 0x3F, 1, 0x3F, 0x42, 6, 0, 355, 346, 0, 0 },
487 { 0, 2, 0x50, 4, 0x48, 0, 2, 0, 0, 0, 336, 227, 301, 0 },
488 { 0, 3, 0x50, 4, 0x55, 0, 0, 0, 0, 0, 336, 227, 294, 0 },
489 { 1, 0, 0x40, 4, 0x3B, 1, 0x3B, 0x3E, 6, 0, 116, 274, 300, 0 },
490 { 1, 0, 0x40, 4, 0x3B, 1, 0x3B, 0x3E, 6, 0, 228, 298, 324, 0 },
491 { 1, 0, 0x40, 4, 0x3B, 1, 0x3B, 0x3E, 6, 0, 340, 274, 300, 0 },
492 { 1, 0, 0x40, 4, 0x3B, 1, 0x3B, 0x3E, 6, 0, 355, 362, 388, 0 },
493 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
494};
496 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x273, 0x2DA, 0x17E, 1, 0, 0, 0 },
497 { { { CODES_END, 0 }, { CODES_END, 0 } }, 0, 0, 0, 0, 0, 0, 0, 0 },
498};
499void (*stageFuncs[])(void) = {
501};
503 { 935, script935, EVENT_TEXT(0x29), NULL, endEvent935 },
504 { -1, NULL, 0, NULL, NULL },
505};
#define NULL
Definition common.h:17
signed int s32
Definition common.h:11
signed char s8
Definition common.h:7
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 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 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 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
void resetTileEffect(StageTileEffect *task)
Restarts the three animations of a StageTileEffect, from the stage's updateTileEffectFrames.
#define MUSIC_ADMIN_CENTER
KANRIBGM: the cities' Main Lobby, Admin Center, Digimon Arena, Master Room.
Definition sound.h:79
#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,...
s32 stepAnimationOnce(StageTileAnim *obj, AnimFrame *frames, s32 depth)
Steps OBJ's animation through FRAMES by the frame time (at most 4) and returns its frame,...
#define FLAG_OINKMON_CITIZENS_RESTORED
wstag435 Gale Tower: Airdramon spins the windmill and turns everyone back from Oinkmon; tested in 62 ...
Definition story.h:1031
@ 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 FLAG_VEMMON_AT_HQ_SEEN
wstag311 event 934: looking for the Matrix System, the player finds Vemmon there; set at its end,...
Definition story.h:1493
#define SPECIAL_STORY_AMATERASU_BRIDGE_TO_PRESIDENT_ARRESTED
GAME.progress is from STORY_AMATERASU_BRIDGE to STORY_PRESIDENT_ARRESTED (PROGRESS_RANGES[0x14])
Definition story.h:1923
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 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
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
StageTile * tile
Definition stage.h:109
Three map objects (animations 1 to 3) moved to (x, y) and animated once when the substate is set to 1...
Definition stage.h:117
StageTileAnim anims[3]
Definition stage.h:121
void(* setSubstate)(struct StageTileEffect *task, s32 substate)
Definition stage.h:118
void(* nextState)(struct StageTileEffect *task)
Definition stage.h:118
void(* nextStep)(struct StageTileEffect *task)
Definition stage.h:118
An object of a map, which FIELDSTG draws: a record of the table at FieldState.objects,...
Definition field_map.h:208
u8 margin
how far off the view it is still drawn; 0 ends the table
Definition field_map.h:214
u8 anim
which of a stage's animations sets frame (1-3); FIELDSTG finds objects by it (its lift,...
Definition field_map.h:210
s16 sortY
drawn sorted at this y, or 0
Definition field_map.h:224
Definition gfx.h:352
void * createTask(void(*update)(), s32 size, s32 childrenSize)
createTaskWithId for a task nothing needs to find
Definition task.c:105
u16 actor1Conditions[]
Definition wstag226.c:415
u16 actor6Talk0Actions[]
Definition wstag226.c:371
FieldActorEntry actor0
Definition wstag226.c:454
void(* stageFuncs[])(void)
The stage's functions (common/start_stage.inc.c calls the first): a StageFuncs in the stages with a t...
Definition wstag226.c:499
FieldActorEntry actor6
Definition wstag226.c:460
u16 actor11Conditions[]
Definition wstag226.c:449
void endEvent935(void)
After event 935, with Teddy, Kail and Kurt: moves the story on to STORY_PRESIDENT_ARRESTED.
Definition wstag226.c:148
u16 actor10Conditions[]
Definition wstag226.c:444
void updateTileEffect(StageTileEffect *task)
Moves its map objects to (x, y) and animates them when the substate is set to 1.
Definition wstag226.c:19
s16 tileEffectPlaces[][2]
Definition wstag226.c:349
s8 tileEffectSortY[]
Definition wstag226.c:343
FieldTalk actor5Talks[]
Definition wstag226.c:384
FieldActorEntry actor5
Definition wstag226.c:459
FieldActorEntry actor2
Definition wstag226.c:456
u16 actor9Talk0Conditions[]
Definition wstag226.c:373
u16 actor6Talk1Conditions[]
Definition wstag226.c:372
u16 actor3Talk0Conditions[]
Definition wstag226.c:368
AnimFrame * updateTileEffectFrames[]
Defined below, after the code that uses them.
Definition wstag226.c:340
u16 actor9Conditions[]
Definition wstag226.c:443
FieldActorEntry * stageActors[]
Definition wstag226.c:466
s16 script935[]
Definition wstag226.c:188
s8 tileEffectY[]
Definition wstag226.c:346
void * createTileEffectTask(void)
Creates the effect of map objects that startTileEffect sets off (updateTileEffect)
Definition wstag226.c:119
FieldActorEntry actor10
Definition wstag226.c:464
u16 actor3Talk1Conditions[]
Definition wstag226.c:369
AnimFrame updateTileEffectFrames_0[]
Definition wstag226.c:323
FieldTalk actor4Talks[]
Definition wstag226.c:380
u16 actor4Conditions[]
Definition wstag226.c:426
FieldActorEntry actor4
Definition wstag226.c:458
u16 actor3Conditions[]
Definition wstag226.c:425
FieldActorEntry actor8
Definition wstag226.c:462
ActorImage stageImages[]
Definition wstag226.c:352
FieldTalk actor6Talks[]
Definition wstag226.c:388
void setupStage(void)
Sets the stage up: its map, actors and events, playing KANRIBGM; BGM_0029 instead except at STORY_PRE...
Definition wstag226.c:165
StageTile stageObjects[]
The tables and color setupStage gives FIELDSTG_state (FieldState)
Definition wstag226.c:481
FieldActorEntry actor9
Definition wstag226.c:463
u16 actor8Conditions[]
Definition wstag226.c:442
u16 actor9Talk1Conditions[]
Definition wstag226.c:374
u16 actor5Conditions[]
Definition wstag226.c:431
FieldTalk actor10Talks[]
Definition wstag226.c:406
FieldTalk actor3Talks[]
Definition wstag226.c:375
FieldTalk actor9Talks[]
Definition wstag226.c:401
void startTileEffect(StageTileEffect *task, s32 id)
Starts the effect at the place of map 0 or 1.
Definition wstag226.c:98
u16 actor6Talk0Conditions[]
Definition wstag226.c:370
u16 actor6Conditions[]
Definition wstag226.c:432
AnimFrame updateTileEffectFrames_2[]
Definition wstag226.c:327
FieldActorEntry actor7
Definition wstag226.c:461
StageSlot stageSlots[]
Definition wstag226.c:495
AnimFrame updateTileEffectFrames_1[]
Definition wstag226.c:334
FieldActorEntry actor11
Definition wstag226.c:465
FieldActorEntry actor1
Definition wstag226.c:455
#define STAGE_FILE
Definition wstag226.c:159
u16 actor7Conditions[]
Definition wstag226.c:437
u16 actor2Conditions[]
Definition wstag226.c:420
FieldTalk actor7Talks[]
Definition wstag226.c:393
#define STAGE_TEXT
Definition wstag226.c:157
FieldTalk actor8Talks[]
Definition wstag226.c:397
FieldActorEntry actor3
Definition wstag226.c:457
FieldEvent stageEvents[]
Definition wstag226.c:502
u16 actor0Conditions[]
Definition wstag226.c:410