Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
wstag745.c
Go to the documentation of this file.
1/*
2 * WSTAG745: Dark Dungeon, North Sector.
3 */
4
5#include "common.h"
6#include "field/stage.h"
7/* Defined below, after the code that uses them */
9
11
12/* Creates the darkness task (id 0x18) */
13void *createDarkness(void) {
14 return createTaskWithId(updateDarkness, sizeof(StageTask), 0, 0x18);
15}
16
17/* Lifts the darkness (TASK_RUN) */
18void *startEvent8000(void) {
19 StageTask *task = TASK_REGISTRY.funcs.find(0x18, -1, -1);
20
21 if (task != NULL) {
22 if (task->state != TASK_RUN) {
24 }
25 task->setState(task, TASK_RUN);
26 task->key1 = 0;
27 }
28 return NULL;
29}
30
31/* Brings the darkness back (TASK_DONE) */
32void *startEvent8001(void) {
33 StageTask *task = TASK_REGISTRY.funcs.find(0x18, -1, -1);
34
35 if (task != NULL) {
36 if (task->state != TASK_DONE) {
38 }
39 task->setState(task, TASK_DONE);
40 task->key1 = 0;
41 }
42 return NULL;
43}
44
45/* Lifts the darkness and starts its countdown back (TASK_RUN, key1 = 1) */
46void *startEvent8002(void) {
47 StageTask *task = TASK_REGISTRY.funcs.find(0x18, -1, -1);
48
49 if (task != NULL) {
50 if (task->state != TASK_RUN) {
52 }
53 task->setState(task, TASK_RUN);
54 task->key1 = 1;
55 }
56 return NULL;
57}
58
59/* Creates the stage's twenty effects, another object and the event object of flags 0x4041/0x4042 */
60void updateStage(StageTask *task, void **children) {
61 s32 i;
62
63 switch (task->state) {
64 case TASK_INIT:
65 default:
66 children[20] = createDarkness();
67 for (i = 0; i < 20; i++) {
68 if (updateStageSpots[i].kind == 0) {
69 children[i] = createStageEffect(updateStageSpots[i].x, updateStageSpots[i].y, updateStageSpots[i].frame);
70 }
71 }
73 children[21] = FIELDSTG_startEvent(0x32B);
74 }
75 task->nextState(task);
76 break;
77 case TASK_RUN:
78 case TASK_DONE:
79 case TASK_KILL:
80 break;
81 }
82}
83
84#define STAGE_CHILDREN_SIZE 0x58
91
92/*
93 * After event 810, with Dark Knight: starts the stage's event battle 0 and
94 * keeps it from playing again
95 */
100
101/*
102 * After event 811, with Dark Knight: gives the player the Brave Sword and
103 * keeps it from playing again
104 */
109
110#if VERSION_US || VERSION_JP
111#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_02)
112#define EVENT_TEXT_FILE (TEXT_EVENTS_700 - 1)
113#define STAGE_FILE 0x6DE
114#define STAGE_FILE_8 0x700
115#elif VERSION_EU
116#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_02)
117#define EVENT_TEXT_FILE (TEXT_EVENTS_700 - 1)
118#define STAGE_FILE 0x6EE
119#define STAGE_FILE_8 0x710
120#endif
121/*
122 * Sets the stage up: its map, actors, battles and events, playing BGM_0023,
123 * with the Dark Dungeon's darkness off when the player comes in
124 */
148
150 SCRIPT_FOLLOW(1, 2),
151 SCRIPT_WALK(2, 0x103, 0xDA, 3),
152 SCRIPT_PLACE(0xCA, 0xF0, 0xD1),
153 SCRIPT_POSE(0xCA, 1, 7),
156 SCRIPT_POSE(2, 1, 3),
157 SCRIPT_WAIT(0x1E),
158 SCRIPT_TALK(0, 1, 0xCA, 2),
160 SCRIPT_WAIT(0x1E),
161 SCRIPT_TALK(0, 2, 2, 1),
162 SCRIPT_POSE(2, 7, 3),
164 SCRIPT_POSE(2, 1, 3),
165 SCRIPT_WAIT(0x1E),
166 SCRIPT_TALK(0, 3, 0xCA, 2),
168 SCRIPT_TALK(0, 4, 2, 1),
169 SCRIPT_POSE(2, 7, 3),
171 SCRIPT_POSE(2, 1, 3),
172 SCRIPT_WAIT(0x1E),
174 /* after the end, the original's padding up to a word, which isn't zeros */
175#if VERSION_EU
176 0x4,
177#elif VERSION_JP
178 0x3E7,
179#endif
180};
182 SCRIPT_FOLLOW(1, 0xCA),
183 SCRIPT_PLACE(2, 0x103, 0xDA),
184 SCRIPT_POSE(2, 1, 3),
185 SCRIPT_PLACE(0xCA, 0xF0, 0xD1),
186 SCRIPT_POSE(0xCA, 1, 7),
187 SCRIPT_WAIT(0x78),
188 SCRIPT_TALK(0, 1, 0xCA, 2),
190 SCRIPT_WAIT(0x1E),
191 SCRIPT_POSE(0xCA, 1, 5),
192 SCRIPT_WAIT(0x1E),
193 SCRIPT_WALK(0xCA, 0x10F, 0xC1, 5),
194 SCRIPT_WAIT_WALK(0xCA),
195 SCRIPT_POSE(0xCA, 1, 1),
196 SCRIPT_WAIT(0x1E),
197 SCRIPT_WALK(2, 0xF0, 0xD1, 3),
199 SCRIPT_POSE(2, 1, 5),
200 SCRIPT_WAIT(0x1E),
201 SCRIPT_TALK(0, 2, 0xCA, 2),
203 SCRIPT_WAIT(0x1E),
204 SCRIPT_TALK(0, 3, 2, 0),
205 SCRIPT_POSE(2, 7, 5),
207 SCRIPT_POSE(2, 1, 5),
208 SCRIPT_WAIT(0x1E),
209 SCRIPT_FOLLOW(1, 2),
210 SCRIPT_WAIT(0x1E),
212};
214 { 68, 0, 188, 0x1C4 },
215 { 68, 0, 0x11C, 0x154 },
216 { 68, 0, 0x11C, 0x254 },
217 { 68, 0, 0x15C, 0x1F4 },
218 { 68, 0, 0x1BC, 0x184 },
219 { 68, 0, 0x1BC, 0x244 },
220 { 68, 0, 0x1DC, 0x1B4 },
221 { 68, 0, 0x1DC, 0x2B4 },
222 { 68, 0, 0x1FC, 0x124 },
223 { 68, 0, 0x1FC, 0x224 },
224 { 68, 0, 0x25C, 0x174 },
225 { 68, 0, 0x27C, 0x1E4 },
226 { 68, 0, 0x27C, 0x224 },
227 { 68, 0, 0x27C, 0x2E4 },
228 { 68, 0, 0x29C, 0x254 },
229 { 68, 0, 0x2DC, 0x174 },
230 { 68, 0, 0x2FC, 0x2A4 },
231 { 68, 0, 0x31C, 0x214 },
232 { 20, 0, 0x3AC, 0x2A4 },
233};
235 { 0, 6 }, { 1, 6 }, { 2, 68 }, { 1, 4 },
236 { 0, 4 }, { 255, 0 },
237};
239 { 0x12C, 18 }, { 1, 6 }, { 2, 6 }, { 3, 6 },
240 { 4, 6 }, { 5, 4 }, { 6, 4 }, { 7, 4 },
241 { 5, 4 }, { 6, 4 }, { 7, 4 }, { 5, 4 },
242 { 6, 4 }, { 7, 4 }, { 5, 4 }, { 6, 4 },
243 { 7, 4 }, { 4, 4 }, { 3, 4 }, { 2, 4 },
244 { 1, 4 }, { 255, 0x3E7 },
245};
259AreaBattle area1Battle0 = { 0, 0, MUSIC(1, 0) };
260AreaBattle area1Battle1 = { 0, 0, MUSIC(1, 0) };
261AreaBattle area1Battle2 = { 0, 0, MUSIC(1, 0) };
262AreaBattle area1Battle3 = { 0, 0, MUSIC(1, 0) };
263AreaBattle area1Battle4 = { 0, 0, MUSIC(1, 0) };
264AreaBattle area1Battle5 = { 0, 0, MUSIC(1, 0) };
265AreaBattle area1Battle6 = { 0, 0, MUSIC(1, 0) };
266AreaBattle area1Battle7 = { 0, 0, MUSIC(1, 0) };
272AreaBattle area2Battle0 = { 0, 0, MUSIC(1, 0) };
273AreaBattle area2Battle1 = { 0, 0, MUSIC(1, 0) };
274AreaBattle area2Battle2 = { 0, 0, MUSIC(1, 0) };
275AreaBattle area2Battle3 = { 0, 0, MUSIC(1, 0) };
276AreaBattle area2Battle4 = { 0, 0, MUSIC(1, 0) };
277AreaBattle area2Battle5 = { 0, 0, MUSIC(1, 0) };
278AreaBattle area2Battle6 = { 0, 0, MUSIC(1, 0) };
279AreaBattle area2Battle7 = { 0, 0, MUSIC(1, 0) };
286AreaBattle area3Battle1 = { 0, 0, MUSIC(1, 0) };
287AreaBattle area3Battle2 = { 0, 0, MUSIC(1, 0) };
288AreaBattle area3Battle3 = { 0, 0, MUSIC(1, 0) };
289AreaBattle area3Battle4 = { 0, 0, MUSIC(1, 0) };
290AreaBattle area3Battle5 = { 0, 0, MUSIC(1, 0) };
291AreaBattle area3Battle6 = { 0, 0, MUSIC(1, 0) };
292AreaBattle area3Battle7 = { 0, 0, MUSIC(1, 0) };
302 { 0x200, 0x100, 0x21C, 0x1A6, 0x70, 0xA6, 0x230, 0x1FE },
303 { 0x200, 0x100, 0x200, 0x100, 0, 0, 0x220, 0x1FE },
304 { 0x200, 0x100, 0x216, 0x138, 0x58, 0x38, 0x200, 0x1FD },
305 { 0x200, 0x100, 0x208, 0x1BC, 0x20, 0xBC, 0x210, 0x1FD },
306 { 0x200, 0x100, 0x210, 0x1BC, 0x40, 0xBC, 0x220, 0x1FD },
307 { 0x200, 0x100, 0x200, 0x1BC, 0, 0xBC, 0x230, 0x1FD },
308 { 0x140, 0x100, 0x178, 0x100, 0xE0, 0, 0x170, 0x1FB },
309 { 0x140, 0x100, 0x170, 0x180, 0xC0, 0x80, 0x150, 0x1FA },
310 { 0x140, 0x100, 0x140, 0x160, 0, 0x60, 0x160, 0x1FA },
311};
319 { NULL, actor0Talk0Actions, 0x26F },
320 { NULL, NULL, 0 },
321};
323 { NULL, NULL, 0x20C },
324 { NULL, NULL, 0 },
325};
327 { NULL, NULL, 0x20D },
328 { NULL, NULL, 0 },
329};
331 { NULL, NULL, 0x20B },
332 { NULL, NULL, 0 },
333};
335 { NULL, NULL, 0x20A },
336 { NULL, NULL, 0 },
337};
339 { NULL, NULL, 0x20A },
340 { NULL, NULL, 0 },
341};
363 &actor0,
364 &actor1,
365 &actor2,
366 &actor3,
367 &actor4,
368 &actor5,
369 NULL,
370};
372 { 1, 0, 0x40, 6, 0x32, 2, 0, 0xF, 4, 0, 208, 361, 0, 0 },
373 { 1, 0, 0x40, 6, 0x32, 2, 0, 0xF, 4, 0, 240, 473, 0, 0 },
374 { 1, 0, 0x40, 6, 0x32, 2, 0, 0xF, 4, 0, 368, 409, 0, 0 },
375 { 1, 0, 0x40, 6, 0x32, 2, 0, 0xF, 4, 0, 400, 521, 0, 0 },
376 { 1, 0, 0x40, 6, 0x32, 2, 0, 0xF, 4, 0, 432, 633, 0, 0 },
377 { 1, 0, 0x40, 6, 0x32, 2, 0, 0xF, 4, 0, 496, 345, 0, 0 },
378 { 1, 0, 0x40, 6, 0x32, 2, 0, 0xF, 4, 0, 528, 457, 0, 0 },
379 { 1, 0, 0x40, 6, 0x32, 2, 0, 0xF, 4, 0, 560, 569, 0, 0 },
380 { 1, 0, 0x40, 6, 0x32, 2, 0, 0xF, 4, 0, 592, 681, 0, 0 },
381 { 1, 0, 0x40, 6, 0x32, 2, 0, 0xF, 4, 0, 656, 393, 0, 0 },
382 { 1, 0, 0x40, 6, 0x32, 2, 0, 0xF, 4, 0, 688, 505, 0, 0 },
383 { 1, 0, 0x40, 6, 0x32, 2, 0, 0xF, 4, 0, 720, 617, 0, 0 },
384 { 1, 0, 0x40, 6, 0x32, 2, 0, 0xF, 4, 0, 752, 729, 0, 0 },
385 { 1, 0, 0x40, 6, 0x32, 2, 0, 0xF, 4, 0, 848, 553, 0, 0 },
386 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
387};
389 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x26B, 0xD0, 0x33C, 5, 0, 0, 0 },
390 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x26D, 0x1E8, 0x254, 3, 0, 0, 0 },
391 { { { ITEM(0, 0x11), 1 }, { FLAG_DARK_KNIGHT_WIN_SEEN, 0 } }, SLOT_EVENT, 0x32A, 0, 0, 0, 0, 0, 0 },
392 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EVENT, 0x1F40, 0, 0, 0, 0, 0, 0 },
393 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EVENT, 0x1F41, 0, 0, 0, 0, 0, 0 },
394 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EVENT, 0x1F42, 0, 0, 0, 0, 0, 0 },
395 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH, 0x26C, 0x3C0, 0x2B0, 7, 0, 0, 0 },
396 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH, 0x26C, 0x3C0, 0x2B0, 7, 0, 0, 0 },
397 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH, 0x26C, 0x3C0, 0x2B0, 7, 0, 0, 0 },
398 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH, 0x26C, 0x3C0, 0x2B0, 7, 0, 0, 0 },
399 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH, 0x26C, 0x3C0, 0x2B0, 7, 0, 0, 0 },
400 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH, 0x26C, 0x3C0, 0x2B0, 7, 0, 0, 0 },
401 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH, 0x26C, 0x3C0, 0x2B0, 7, 0, 0, 0 },
402 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH, 0x26C, 0x3C0, 0x2B0, 7, 0, 0, 0 },
403 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH, 0x26C, 0x3C0, 0x2B0, 7, 0, 0, 0 },
404 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH, 0x26C, 0x3C0, 0x2B0, 7, 0, 0, 0 },
405 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH, 0x26C, 0x3C0, 0x2B0, 7, 0, 0, 0 },
406 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH, 0x26C, 0x3C0, 0x2B0, 7, 0, 0, 0 },
407 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH, 0x26C, 0x3C0, 0x2B0, 7, 0, 0, 0 },
408 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH, 0x26C, 0x3C0, 0x2B0, 7, 0, 0, 0 },
409 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH, 0x26C, 0x3C0, 0x2B0, 7, 0, 0, 0 },
410 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH, 0x26C, 0x3C0, 0x2B0, 7, 0, 0, 0 },
411 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH, 0x26C, 0x3C0, 0x2B0, 7, 0, 0, 0 },
412 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_LAUNCH, 0x26C, 0x3C0, 0x2B0, 7, 0, 0, 0 },
413 { { { CODES_END, 0 }, { CODES_END, 0 } }, 0, 0, 0, 0, 0, 0, 0, 0 },
414};
415void (*stageFuncs[])(void) = {
417};
419 { 810, script810, EVENT_TEXT(0xE), NULL, endEvent810 },
420 { 811, script811, EVENT_TEXT(0xF), NULL, endEvent811 },
421 { 8000, NULL, 0, startEvent8000, NULL },
422 { 8001, NULL, 0, startEvent8001, NULL },
423 { 8002, NULL, 0, startEvent8002, NULL },
424 { -1, NULL, 0, NULL, NULL },
425};
#define NULL
Definition common.h:17
signed int s32
Definition common.h:11
signed short s16
Definition common.h:9
unsigned short u16
Definition common.h:10
StageEffect * createStageEffect(s32 x, s32 y, s32 frame)
Creates a StageEffect at (x, y) with its sprites' frames from FRAME.
GameFlags FLAGS_00
The flag bitset FLAGS_00 and the event functions.
Definition events.c:701
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 SLOT_LAUNCH
sends the player flying (FIELDSTG_launchActor)
Definition field_map.h:267
#define SCRIPT_COMMAND(id, command, arg)
the same word for a script command's id: FIELDSTG_setEventPose creates its task if none runs and hand...
Definition field_map.h:161
#define SCRIPT_FOLLOW(snap, id)
FIELDSTG_followWithCamera.
Definition field_map.h:171
#define FIELD_MAP_FLOOR0
Some of FieldMap's maps (files): those of the floors the player walks on come first,...
Definition field_map.h:85
#define SLOT_EVENT
starts the event arg
Definition field_map.h:262
#define SCRIPT_WALK(id, x, y, dir)
Actor.setGoal: walks to (x, y), then faces dir.
Definition field_map.h:162
#define SCRIPT_WAIT_BOX
until box 0 closes
Definition field_map.h:167
#define SLOT_EXIT
The kinds of StageSlot (type).
Definition field_map.h:255
#define FIELD_MAP_AREAS
a cell's value: its battle area (FieldBattles), or 0
Definition field_map.h:87
#define SCRIPT_POSE(id, set, dir)
Actor.setPose: its animation set, facing dir.
Definition field_map.h:158
#define FIELD_MAP_TRIGGERS
a cell's value: a direction (3 bits) and a StageSlot (5)
Definition field_map.h:88
#define SCRIPT_WAIT(frames)
Definition field_map.h:166
#define FIELD_TASK_COMMANDS
script command 813 (FIELDSTG_startCommandTask): the field commands
Definition field_map.h:33
#define SCRIPT_PLACE(id, x, y)
puts a character at (x, y)
Definition field_map.h:157
#define SCRIPT_TALK(box, entry, id, kind)
box of the event's boxes shows the event text's entry: a talk box at the corner kind next to the char...
Definition field_map.h:165
FieldMap FIELDSTG_map
Definition fieldstg.c:3660
FieldState FIELDSTG_state
Definition fieldstg.c:2641
#define EVENT_BATTLE(id)
action: FIELDSTG_battleFuncs.startEventBattle
Definition game_state.h:72
#define CODES_END
Definition game_state.h:83
#define ITEM(kind, id)
an item, in the bag or equipped; kind (bits 9-11) isn't read, and the scripts set it after the item's...
Definition game_state.h:80
#define PROGRESS(n)
GAME.progress is n.
Definition game_state.h:69
TaskRegistry TASK_REGISTRY
Definition registry.c:122
SoundState SOUND
rsin and rcos (libgte) read rsin_tbl[a - 0x800] and the like: their addresses before the table fall i...
Definition sound.c:180
#define MUSIC_BATTLE
BATL0000: the maps' random battles (AreaBattle, nearly all of them)
Definition sound.h:76
#define MUSIC_DUNGEON
BGM_0023: the Ice, Fire and Dark Dungeons.
Definition sound.h:99
#define MUSIC(bank, n)
A field's or a battle's music (FieldState.music, Battle.music): track (SEP) n of the first sequence o...
Definition sound.h:70
#define SOUND_SWITCH02
Definition sound.h:51
#define MUSIC_BANK(music)
The sound bank of a music, which a stage loads for it (FieldState.soundBank)
Definition sound.h:148
#define MUSIC_BOSS_1
BOSS_001: the Digimon Arena's, the cities', the dungeons' and the A.o.A's boss battles.
Definition sound.h:109
FIELDSTG's start of the stage (StageEntry.init in FIELDSTG_stages): the stage's task,...
#define SPECIAL_STORY_JUNGLE_SOUND_TO_AMATERASU_BRIDGE
GAME.progress is from STORY_JUNGLE_SOUND to STORY_AMATERASU_BRIDGE (PROGRESS_RANGES[0x12])
Definition story.h:1917
@ STORY_PRESIDENT_ARRESTED
WSTAG226 (Login Room, Amaterasu City), event 935, after the President of MAGAMI gives himself up (WST...
Definition story.h:136
@ STORY_MOVIE_BATTLES
WSTAG820, event 1080, with Snatchmon: each encounter plays MODE_BATTLE_MOVIE first.
Definition story.h:146
#define SPECIAL_STORY_ASUKA_HEADQUARTERS_TO_OPERATION_SIGMA
GAME.progress is from STORY_ASUKA_HEADQUARTERS to STORY_OPERATION_SIGMA (PROGRESS_RANGES[0x13])
Definition story.h:1920
#define SPECIAL_GAIN_5000_BIT
an action: gives the player 5000 BIT (MONEY_GAINS[6])
Definition story.h:1834
#define FLAG_DARK_KNIGHT_WIN_SEEN
wstag745 event 810: Dark Knight, beaten, says the player will make a great tamer; set at its end,...
Definition story.h:1424
#define FLAG_GENBU_LEADER_CHALLENGE_SEEN
wstag745 event 811: the player asks Genbu Leader for his badge and he won't give it for free; set at ...
Definition story.h:1427
#define SPECIAL_SHOW_ITEM_GET_ICON
an action: the player's icon plays its animation 3 with SOUND_ITEM_GET (FIELD_COMMAND_ICON3); the tal...
Definition story.h:1982
#define FLAG_DARK_DUNGEON_5000_BIT_FOUND
wstag745: chest that gives 5000 BIT ("I got 5000 BIT!"); its conditions test it 0
Definition story.h:344
Where an actor's frames go in VRAM: one of the records after the FieldImage (Actor....
Definition field_map.h:114
One frame of a sprite animation; frame 0xFF ends it (or loops it)
Definition gfx.h:296
A battle of an area's BattleList, which can start on the field (see FIELDSTG_startEncounter); FIGHTST...
Definition field_map.h:402
The battles of an area of the map (its cells' value at FieldMap.files[4]), one picked at random.
Definition field_map.h:411
A character of the field (FieldState.actors, a list of pointers up to NULL), which FIELDSTG_updateFie...
Definition field_map.h:194
The battles of a place (FieldState.battles), by area of the map: the fourth area's are also the ones ...
Definition field_map.h:422
An event of the table FieldState.events, up to the first id -1, which FIELDSTG_startEvent starts.
Definition field_map.h:141
void(* setFile)(s32 index, s32 file)
FIELDSTG_setMapFile.
Definition field_map.h:100
void(* setFirstMap)(s32 index)
FIELDSTG_setFirstMap: the map the player starts on (GAME.mapIndex), when the mode is new.
Definition field_map.h:104
s32 sheetEntry
the stage's sprite sheet, loaded before the field starts, or 0
Definition field_map.h:445
FieldEvent * events
up to the first id -1
Definition field_map.h:451
s32 soundBank
SOUND.loadBank's, or 0.
Definition field_map.h:459
StageTile * objects
the map objects, up to the first margin 0
Definition field_map.h:446
s32 imageFile
or an image archive file, or 0
Definition field_map.h:449
FieldBattles * battles
Definition field_map.h:450
Vec2 start
where the player starts
Definition field_map.h:456
StageSlot * slots
up to the first type 0
Definition field_map.h:447
ActorImage * actors
then the actors', from actors[2]
Definition field_map.h:454
s32 mapFile
the file of the map's tiles (FIELDSTG_createMapStreamer)
Definition field_map.h:444
s32 startDir
and its direction
Definition field_map.h:457
s32 textFile
the stage's text file, for the talks
Definition field_map.h:461
union FieldState::@12 images
s32 music
SOUND.playSound's, or 0.
Definition field_map.h:460
What a character says (FIELDSTG_runActorAction): the first whose conditions hold, or the last,...
Definition field_map.h:176
void(* applyAction)(s32 code, s32 value)
Definition game_state.h:52
s32(* checkCondition)(u16 code, u16 value)
Definition game_state.h:53
s32 clearTempFlags
Definition game_state.h:573
short(* playSound)(s32 id)
returns the voice of a key-on
Definition sound.h:187
A sprite effect a stage creates at (x, y) with the given frame, by kind.
Definition stage.h:290
What the player can trigger on a map (FIELDSTG_updateTriggers): a record of the table at FieldState....
Definition field_map.h:276
The task a stage starts (startStage), updated by its updateStage.
Definition stage.h:26
void(* nextState)(struct StageTask *task)
Definition stage.h:27
s32 state
Definition stage.h:27
s32 key1
Definition stage.h:27
void(* setState)(struct StageTask *task, 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
void *(* find)(s32 id, s32 key1, s32 key2)
Definition task.h:18
TaskFuncs funcs
Definition task.h:76
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
void updateDarkness(StageTask *task)
The darkness: the screen drawn black (a white quad subtracted from it, blend mode 2) while in TASK_DO...
u16 actor1Conditions[]
Definition wstag745.c:343
u16 actor0Talk0Actions[]
Definition wstag745.c:312
AreaBattle area2Battle7
Definition wstag745.c:279
FieldActorEntry actor0
Definition wstag745.c:356
void(* stageFuncs[])(void)
The stage's functions (common/start_stage.inc.c calls the first): a StageFuncs in the stages with a t...
Definition wstag745.c:415
void endEvent810(void)
After event 810, with Dark Knight: starts the stage's event battle 0 and keeps it from playing again.
Definition wstag745.c:96
FieldTalk actor2Talks[]
Definition wstag745.c:326
AreaBattle area2Battle6
Definition wstag745.c:278
void * startEvent8001(void)
Brings the darkness back (TASK_DONE)
Definition wstag745.c:32
AnimFrame effectClutFrames[]
Definition wstag745.c:234
FieldTalk actor5Talks[]
Definition wstag745.c:338
AreaBattle area1Battle6
Definition wstag745.c:265
FieldActorEntry actor5
Definition wstag745.c:361
AreaBattle area0Battle7
Definition wstag745.c:253
FieldActorEntry actor2
Definition wstag745.c:358
#define STAGE_FILE_8
Definition wstag745.c:119
AreaBattle area3Battle4
Definition wstag745.c:289
AreaBattle area3Battle3
Definition wstag745.c:288
AreaBattle area0Battle1
Definition wstag745.c:247
AreaBattle area2Battle0
Definition wstag745.c:272
FieldActorEntry * stageActors[]
Definition wstag745.c:362
AreaBattle area1Battle2
Definition wstag745.c:261
void * startEvent8002(void)
Lifts the darkness and starts its countdown back (TASK_RUN, key1 = 1)
Definition wstag745.c:46
AreaBattle area3Battle0
Definition wstag745.c:285
AreaBattle area0Battle6
Definition wstag745.c:252
FieldTalk actor1Talks[]
Definition wstag745.c:322
AreaBattle area3Battle2
Definition wstag745.c:287
void endEvent811(void)
After event 811, with Dark Knight: gives the player the Brave Sword and keeps it from playing again.
Definition wstag745.c:105
FieldTalk actor0Talks[]
Definition wstag745.c:318
AreaBattle area3Battle1
Definition wstag745.c:286
AreaBattle area0Battle3
Definition wstag745.c:249
FieldTalk actor4Talks[]
Definition wstag745.c:334
s16 script810[]
Definition wstag745.c:149
u16 actor4Conditions[]
Definition wstag745.c:346
FieldActorEntry actor4
Definition wstag745.c:360
u16 actor3Conditions[]
Definition wstag745.c:345
AreaBattle area3Battle6
Definition wstag745.c:291
ActorImage stageImages[]
Definition wstag745.c:301
void setupStage(void)
Sets the stage up: its map, actors, battles and events, playing BGM_0023, with the Dark Dungeon's dar...
Definition wstag745.c:125
AnimFrame effectFrames[]
Definition wstag745.c:238
AreaBattle area2Battle4
Definition wstag745.c:276
s16 script811[]
Definition wstag745.c:181
StageEffectSpot updateStageSpots[]
Defined below, after the code that uses them.
Definition wstag745.c:213
StageTile stageObjects[]
The tables and color setupStage gives FIELDSTG_state (FieldState)
Definition wstag745.c:371
u16 actor5Conditions[]
Definition wstag745.c:351
FieldTalk actor3Talks[]
Definition wstag745.c:330
BattleList area3Battles
Definition wstag745.c:293
AreaBattle area3Battle5
Definition wstag745.c:290
AreaBattle area0Battle5
Definition wstag745.c:251
BattleList area1Battles
Definition wstag745.c:267
BattleList area2Battles
Definition wstag745.c:280
AreaBattle area1Battle4
Definition wstag745.c:263
AreaBattle area2Battle2
Definition wstag745.c:274
AreaBattle area1Battle5
Definition wstag745.c:264
StageSlot stageSlots[]
Definition wstag745.c:388
AreaBattle area2Battle1
Definition wstag745.c:273
void * createDarkness(void)
Creates the darkness task (id 0x18)
Definition wstag745.c:13
AreaBattle area1Battle3
Definition wstag745.c:262
AreaBattle area1Battle0
Definition wstag745.c:259
FieldActorEntry actor1
Definition wstag745.c:357
void * startEvent8000(void)
Lifts the darkness (TASK_RUN)
Definition wstag745.c:18
AreaBattle area0Battle0
Definition wstag745.c:246
AreaBattle area0Battle2
Definition wstag745.c:248
#define STAGE_FILE
Definition wstag745.c:118
AreaBattle area2Battle5
Definition wstag745.c:277
AreaBattle area1Battle1
Definition wstag745.c:260
AreaBattle area2Battle3
Definition wstag745.c:275
u16 actor2Conditions[]
Definition wstag745.c:344
AreaBattle area0Battle4
Definition wstag745.c:250
#define STAGE_TEXT
Definition wstag745.c:116
AreaBattle area3Battle7
Definition wstag745.c:292
BattleList area0Battles
Definition wstag745.c:254
AreaBattle area1Battle7
Definition wstag745.c:266
FieldActorEntry actor3
Definition wstag745.c:359
FieldBattles stageBattles[]
Definition wstag745.c:298
FieldEvent stageEvents[]
Definition wstag745.c:418
u16 actor0Conditions[]
Definition wstag745.c:342