Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
wstag431.c
Go to the documentation of this file.
1/*
2 * WSTAG431: Qing Long Tower, Qing Long City. On the Amaterasu server; its
3 * Asuka server twin is WSTAG430.
4 */
5
6#include "common.h"
7#include "field/stage.h"
8
11
12#if VERSION_US || VERSION_JP
13#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_03)
14#define EVENT_TEXT_FILE (TEXT_EVENTS_400 - 1)
15#define STAGE_FILE 0x58E
16#elif VERSION_EU
17#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_03)
18#define EVENT_TEXT_FILE (TEXT_EVENTS_400 - 1)
19#define STAGE_FILE 0x59E
20#endif
21/* Sets the stage up: its map, actors and events, playing SHOP1BGM */
40
42 SCRIPT_WALK(2, 0x178, 0x1AC, 5),
43 SCRIPT_PLACE(0x15, 0x198, 0x19E),
44 SCRIPT_POSE(0x15, 1, 1),
47 SCRIPT_POSE(2, 1, 5),
48 SCRIPT_WAIT(6),
49 SCRIPT_WAIT(0x1E),
50 SCRIPT_TALK(0, 1, 0x15, 0),
52 SCRIPT_WAIT(0x1E),
53 SCRIPT_POSE(0x15, 0x36, 1),
55 SCRIPT_WAIT_ANIM(0x15),
56 SCRIPT_POSE(0x15, 0x37, 1),
57 SCRIPT_WAIT(0x5A),
58 SCRIPT_LEAVE(0xC0C, 0, 0, 0),
60};
62 { 0x200, 0x100, 0x21C, 0x1A6, 0x70, 0xA6, 0x230, 0x1FE },
63 { 0x200, 0x100, 0x200, 0x100, 0, 0, 0x220, 0x1FE },
64 { 0x200, 0x100, 0x216, 0x138, 0x58, 0x38, 0x200, 0x1FD },
65 { 0x200, 0x100, 0x208, 0x1BC, 0x20, 0xBC, 0x210, 0x1FD },
66 { 0x200, 0x100, 0x210, 0x1BC, 0x40, 0xBC, 0x220, 0x1FD },
67 { 0x200, 0x100, 0x200, 0x1BC, 0, 0xBC, 0x230, 0x1FD },
68 { 0x140, 0x100, 0x150, 0x100, 0x40, 0, 0x160, 0x1FD },
69 { 0x140, 0x100, 0x15C, 0x100, 0x70, 0, 0x170, 0x1FD },
70 { 0x140, 0x100, 0x148, 0x126, 0x20, 0x26, 0x150, 0x1FC },
71 { 0x140, 0x100, 0x15C, 0x128, 0x70, 0x28, 0x160, 0x1FC },
72 { 0x140, 0x100, 0x176, 0x100, 0xD8, 0, 0x170, 0x1FC },
73 { 0x140, 0x100, 0x140, 0x126, 0, 0x26, 0x140, 0x1FB },
74 { 0x140, 0x100, 0x140, 0x156, 0, 0x56, 0x150, 0x1FB },
75 { 0x140, 0x100, 0x150, 0x130, 0x40, 0x30, 0x160, 0x1FB },
76 { 0x140, 0x100, 0x172, 0x130, 0xC8, 0x30, 0x170, 0x1FB },
77 { 0x140, 0x100, 0x164, 0x142, 0x90, 0x42, 0x140, 0x1FA },
78 { 0x140, 0x100, 0x16C, 0x142, 0xB0, 0x42, 0x150, 0x1FA },
79 { 0x140, 0x100, 0x148, 0x14E, 0x20, 0x4E, 0x160, 0x1FA },
80 { 0x140, 0x100, 0x158, 0x150, 0x60, 0x50, 0x170, 0x1FA },
81 { 0x140, 0x100, 0x150, 0x158, 0x40, 0x58, 0x140, 0x1F9 },
82 { 0x140, 0x100, 0x172, 0x158, 0xC8, 0x58, 0x150, 0x1F9 },
83 { 0x140, 0x100, 0x160, 0x16A, 0x80, 0x6A, 0x160, 0x1F9 },
84 { 0x140, 0x100, 0x168, 0x172, 0xA0, 0x72, 0x170, 0x1F9 },
85 { 0x140, 0x100, 0x140, 0x176, 0, 0x76, 0x140, 0x1F8 },
86 { 0x140, 0x100, 0x148, 0x176, 0x20, 0x76, 0x150, 0x1F8 },
87};
89u16 actor1Talk0Actions[] = { 0x7C00, 1, CODES_END };
90u16 actor2Talk0Actions[] = { 0x7C00, 1, CODES_END };
91u16 actor3Talk0Actions[] = { 0x7C00, 1, CODES_END };
92u16 actor4Talk0Actions[] = { 0x7C00, 1, CODES_END };
93u16 actor5Talk0Actions[] = { 0x7C00, 1, CODES_END };
96 { NULL, actor0Talk0Actions, 0x1A2 },
97 { NULL, NULL, 0 },
98};
100 { NULL, actor1Talk0Actions, 0x1A5 },
101 { NULL, NULL, 0 },
102};
104 { NULL, actor2Talk0Actions, 0x1A5 },
105 { NULL, NULL, 0 },
106};
108 { NULL, actor3Talk0Actions, 0x1A5 },
109 { NULL, NULL, 0 },
110};
112 { NULL, actor4Talk0Actions, 0x1A5 },
113 { NULL, NULL, 0 },
114};
116 { NULL, actor5Talk0Actions, 0x1A5 },
117 { NULL, NULL, 0 },
118};
120 { NULL, NULL, 0xF7 },
121 { NULL, NULL, 0 },
122};
124 { NULL, NULL, 0xFD },
125 { NULL, NULL, 0 },
126};
128 { NULL, NULL, 0xF3 },
129 { NULL, NULL, 0 },
130};
132 { NULL, NULL, 0xF5 },
133 { NULL, NULL, 0 },
134};
136 { NULL, NULL, 0xF0 },
137 { NULL, NULL, 0 },
138};
140 { NULL, NULL, 0xF2 },
141 { NULL, NULL, 0 },
142};
144 { NULL, NULL, 0x100 },
145 { NULL, NULL, 0 },
146};
148 { NULL, NULL, 0xFB },
149 { NULL, NULL, 0 },
150};
152 { NULL, NULL, 0xFF },
153 { NULL, NULL, 0 },
154};
156 { NULL, actor15Talk0Actions, 0xFA },
157 { NULL, NULL, 0 },
158};
160 { NULL, NULL, 0x1D2 },
161 { NULL, NULL, 0 },
162};
164 { NULL, NULL, 0x1D3 },
165 { NULL, NULL, 0 },
166};
168 { NULL, NULL, 0xEF },
169 { NULL, NULL, 0 },
170};
172 { NULL, NULL, 0xF4 },
173 { NULL, NULL, 0 },
174};
176 { NULL, NULL, 0xF6 },
177 { NULL, NULL, 0 },
178};
180 { NULL, NULL, 0xF9 },
181 { NULL, NULL, 0 },
182};
184 { NULL, NULL, 0xF1 },
185 { NULL, NULL, 0 },
186};
188 { NULL, NULL, 0xFC },
189 { NULL, NULL, 0 },
190};
192 { NULL, NULL, 0xF8 },
193 { NULL, NULL, 0 },
194};
196 { NULL, NULL, 0xFE },
197 { NULL, NULL, 0 },
198};
252FieldActorEntry actor0 = { NULL, actor0Talks, 0x15, 4, 408, 414, 1 };
279 &actor0,
280 &actor1,
281 &actor2,
282 &actor3,
283 &actor4,
284 &actor5,
285 &actor6,
286 &actor7,
287 &actor8,
288 &actor9,
289 &actor10,
290 &actor11,
291 &actor12,
292 &actor13,
293 &actor14,
294 &actor15,
295 &actor16,
296 &actor17,
297 &actor18,
298 &actor19,
299 &actor20,
300 &actor21,
301 &actor22,
302 &actor23,
303 &actor24,
304 &actor25,
305 NULL,
306};
308 { 1, 0, 0x40, 6, 0x32, 2, 0, 1, 0xA, 0, 283, 466, 0, 0 },
309 { 1, 0, 0x40, 6, 0x33, 2, 0, 1, 0xA, 0, 428, 134, 0, 0 },
310 { 1, 0, 0x40, 6, 0x34, 2, 0, 1, 0xA, 0, 307, 484, 0, 0 },
311 { 1, 0, 0x40, 6, 0x36, 2, 0, 1, 0xA, 0, 287, 459, 0, 0 },
312 { 1, 0, 0x40, 6, 0x36, 2, 0, 1, 0xA, 0, 297, 464, 0, 0 },
313 { 1, 0, 0x40, 4, 0x35, 2, 0, 1, 0xA, 0, 333, 483, 503, 0 },
314 { 1, 0, 0x40, 4, 0, 0, 0, 0, 0, 0, 501, 393, 406, 0 },
315 { 1, 0, 0x40, 4, 1, 0, 0, 0, 0, 0, 451, 436, 456, 0 },
316 { 1, 0, 0x40, 4, 2, 0, 0, 0, 0, 0, 436, 464, 482, 0 },
317 { 1, 0, 0x40, 4, 3, 0, 0, 0, 0, 0, 320, 474, 503, 0 },
318 { 1, 0, 0x40, 4, 0x16, 0, 0, 0, 0, 0, 438, 274, 292, 0 },
319 { 1, 0, 0x40, 4, 0x17, 0, 0, 0, 0, 0, 464, 277, 302, 0 },
320 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
321};
323 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x29C, 0x2F8, 0x104, 7, 0, 0, 0 },
324 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x29C, 0x1E8, 0xA4, 1, 0, 0, 0 },
325 { { { CODES_END, 0 }, { CODES_END, 0 } }, 0, 0, 0, 0, 0, 0, 0, 0 },
326};
327void (*stageFuncs[])(void) = {
329};
331 { 1211, script1211, EVENT_TEXT(0x11), NULL, NULL },
332 { -1, NULL, 0, NULL, NULL },
333};
#define NULL
Definition common.h:17
signed short s16
Definition common.h:9
unsigned short u16
Definition common.h:10
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
#define SCRIPT_WAIT_WALK(id)
until the character gets to its goal
Definition field_map.h:168
#define FIELD_COMMAND_HALT_PARTNERS
The field commands, which an event script hands FIELD_TASK_COMMANDS as the first argument of a pose c...
Definition field_map.h:41
#define SCRIPT_END
The commands of an event script (FieldEvent.script), as FIELDSTG_runEvent reads them: a halfword kind...
Definition field_map.h:156
#define SCRIPT_LEAVE(mode, x, y, dir)
FIELDSTG_leaveField; ends the event.
Definition field_map.h:170
#define SCRIPT_COMMAND(id, command, arg)
the same word for a script command's id: FIELDSTG_setEventPose creates its task if none runs and hand...
Definition field_map.h:161
#define FIELD_COMMAND_PLAY_SAVEDEMO
Definition field_map.h:65
#define 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_WAIT_ANIM(id)
until its animation ends
Definition field_map.h:169
#define FIELD_TASK_COMMANDS
script command 813 (FIELDSTG_startCommandTask): the field commands
Definition field_map.h:33
#define 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 START_EVENT(index)
action: FIELDSTG_startListedEvent
Definition game_state.h:81
#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_SHOP_1
SHOP1BGM: the inns, shops and towers.
Definition sound.h:81
#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_OINKMON_CITIZENS_RESTORED
wstag435 Gale Tower: Airdramon spins the windmill and turns everyone back from Oinkmon; tested in 62 ...
Definition story.h:1031
#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_STORY_JUNGLE_SOUND_TO_PRESIDENT_ARRESTED
GAME.progress is from STORY_JUNGLE_SOUND to STORY_PRESIDENT_ARRESTED (PROGRESS_RANGES[0x17])
Definition story.h:1932
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
What the player can trigger on a map (FIELDSTG_updateTriggers): a record of the table at FieldState....
Definition field_map.h:276
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 wstag431.c:199
u16 actor0Talk0Actions[]
Definition wstag431.c:88
FieldActorEntry actor0
Definition wstag431.c:252
void(* stageFuncs[])(void)
The stage's functions (common/start_stage.inc.c calls the first): a StageFuncs in the stages with a t...
Definition wstag431.c:327
FieldActorEntry actor6
Definition wstag431.c:258
u16 actor11Conditions[]
Definition wstag431.c:225
FieldTalk actor2Talks[]
Definition wstag431.c:103
u16 actor10Conditions[]
Definition wstag431.c:220
FieldActorEntry actor25
Definition wstag431.c:277
FieldActorEntry actor24
Definition wstag431.c:276
u16 actor18Conditions[]
Definition wstag431.c:236
FieldActorEntry actor17
Definition wstag431.c:269
FieldTalk actor14Talks[]
Definition wstag431.c:151
u16 actor24Conditions[]
Definition wstag431.c:250
FieldActorEntry actor18
Definition wstag431.c:270
FieldTalk actor5Talks[]
Definition wstag431.c:115
FieldActorEntry actor5
Definition wstag431.c:257
u16 actor22Conditions[]
Definition wstag431.c:248
FieldActorEntry actor2
Definition wstag431.c:254
FieldActorEntry actor23
Definition wstag431.c:275
FieldActorEntry actor19
Definition wstag431.c:271
u16 actor9Conditions[]
Definition wstag431.c:219
FieldActorEntry * stageActors[]
Definition wstag431.c:278
u16 actor23Conditions[]
Definition wstag431.c:249
FieldActorEntry actor22
Definition wstag431.c:274
FieldTalk actor1Talks[]
Definition wstag431.c:99
u16 actor13Conditions[]
Definition wstag431.c:227
FieldTalk actor0Talks[]
Definition wstag431.c:95
FieldTalk actor21Talks[]
Definition wstag431.c:179
FieldTalk actor20Talks[]
Definition wstag431.c:175
FieldActorEntry actor10
Definition wstag431.c:262
u16 actor2Talk0Actions[]
Definition wstag431.c:90
u16 actor19Conditions[]
Definition wstag431.c:241
FieldTalk actor4Talks[]
Definition wstag431.c:111
u16 actor4Conditions[]
Definition wstag431.c:210
FieldActorEntry actor4
Definition wstag431.c:256
u16 actor3Conditions[]
Definition wstag431.c:205
FieldTalk actor17Talks[]
Definition wstag431.c:163
FieldTalk actor11Talks[]
Definition wstag431.c:139
FieldActorEntry actor8
Definition wstag431.c:260
ActorImage stageImages[]
Definition wstag431.c:61
FieldTalk actor6Talks[]
Definition wstag431.c:119
void setupStage(void)
Sets the stage up: its map, actors and events, playing SHOP1BGM.
Definition wstag431.c:22
FieldTalk actor25Talks[]
Definition wstag431.c:195
FieldTalk actor19Talks[]
Definition wstag431.c:171
FieldTalk actor23Talks[]
Definition wstag431.c:187
u16 actor16Conditions[]
Definition wstag431.c:234
StageTile stageObjects[]
The tables and color setupStage gives FIELDSTG_state (FieldState)
Definition wstag431.c:307
FieldActorEntry actor9
Definition wstag431.c:261
u16 actor8Conditions[]
Definition wstag431.c:218
FieldActorEntry actor20
Definition wstag431.c:272
u16 actor5Conditions[]
Definition wstag431.c:211
FieldTalk actor10Talks[]
Definition wstag431.c:135
FieldTalk actor3Talks[]
Definition wstag431.c:107
FieldTalk actor9Talks[]
Definition wstag431.c:131
FieldTalk actor15Talks[]
Definition wstag431.c:155
u16 actor5Talk0Actions[]
Definition wstag431.c:93
FieldActorEntry actor15
Definition wstag431.c:267
FieldActorEntry actor12
Definition wstag431.c:264
FieldActorEntry actor16
Definition wstag431.c:268
u16 actor15Conditions[]
Definition wstag431.c:229
u16 actor6Conditions[]
Definition wstag431.c:212
u16 actor14Conditions[]
Definition wstag431.c:228
FieldActorEntry actor7
Definition wstag431.c:259
StageSlot stageSlots[]
Definition wstag431.c:322
u16 actor1Talk0Actions[]
Definition wstag431.c:89
FieldActorEntry actor13
Definition wstag431.c:265
FieldTalk actor24Talks[]
Definition wstag431.c:191
FieldActorEntry actor11
Definition wstag431.c:263
u16 actor25Conditions[]
Definition wstag431.c:251
FieldActorEntry actor1
Definition wstag431.c:253
FieldActorEntry actor21
Definition wstag431.c:273
FieldTalk actor13Talks[]
Definition wstag431.c:147
#define STAGE_FILE
Definition wstag431.c:19
u16 actor4Talk0Actions[]
Definition wstag431.c:92
u16 actor7Conditions[]
Definition wstag431.c:217
u16 actor2Conditions[]
Definition wstag431.c:200
FieldTalk actor18Talks[]
Definition wstag431.c:167
FieldTalk actor7Talks[]
Definition wstag431.c:123
u16 actor20Conditions[]
Definition wstag431.c:242
#define STAGE_TEXT
Definition wstag431.c:17
u16 actor3Talk0Actions[]
Definition wstag431.c:91
FieldTalk actor8Talks[]
Definition wstag431.c:127
u16 actor15Talk0Actions[]
Definition wstag431.c:94
s16 script1211[]
Definition wstag431.c:41
FieldTalk actor12Talks[]
Definition wstag431.c:143
u16 actor21Conditions[]
Definition wstag431.c:247
FieldTalk actor16Talks[]
Definition wstag431.c:159
u16 actor17Conditions[]
Definition wstag431.c:235
FieldActorEntry actor3
Definition wstag431.c:255
FieldActorEntry actor14
Definition wstag431.c:266
FieldEvent stageEvents[]
Definition wstag431.c:330
u16 actor12Conditions[]
Definition wstag431.c:226
FieldTalk actor22Talks[]
Definition wstag431.c:183