Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
wstag425.c
Go to the documentation of this file.
1/*
2 * WSTAG425: Zephyr Tower, Seiryu City.
3 */
4
5#include "common.h"
6#include "field/stage.h"
7
10
11#if VERSION_US || VERSION_JP
12#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_01)
13#define STAGE_FILE 0x245
14#define STAGE_FILE_8 0x23D
15#define STAGE_ARCHIVE 0x321
16#elif VERSION_EU
17#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_01)
18#define STAGE_FILE 0x254
19#define STAGE_FILE_8 0x24C
20#define STAGE_ARCHIVE 0x330
21#endif
22/* Sets the stage up: its map and actors, playing SHOP1BGM */
40
42 { 0x200, 0x100, 0x21C, 0x1A6, 0x70, 0xA6, 0x230, 0x1FE },
43 { 0x200, 0x100, 0x200, 0x100, 0, 0, 0x220, 0x1FE },
44 { 0x200, 0x100, 0x216, 0x138, 0x58, 0x38, 0x200, 0x1FD },
45 { 0x200, 0x100, 0x208, 0x1BC, 0x20, 0xBC, 0x210, 0x1FD },
46 { 0x200, 0x100, 0x210, 0x1BC, 0x40, 0xBC, 0x220, 0x1FD },
47 { 0x200, 0x100, 0x200, 0x1BC, 0, 0xBC, 0x230, 0x1FD },
48 { 0x140, 0x100, 0x15C, 0x1A7, 0x70, 0xA7, 0x170, 0x1FF },
49 { 0x140, 0x100, 0x176, 0x173, 0xD8, 0x73, 0x170, 0x1FE },
50 { 0x140, 0x100, 0x160, 0x147, 0x80, 0x47, 0x170, 0x1FD },
51 { 0x180, 0x100, 0x190, 0x11A, 0x140, 0x1A, 0x170, 0x1FC },
52 { 0x180, 0x100, 0x198, 0x11A, 0x160, 0x1A, 0x170, 0x1FB },
53 { 0x180, 0x100, 0x180, 0x11B, 0x100, 0x1B, 0x170, 0x1FA },
54 { 0x180, 0x100, 0x1A0, 0x100, 0x180, 0, 0x170, 0x1F9 },
55 { 0, 0, 0, 0, 0, 0, 0, 0 },
56};
60u16 actor0Talk1Actions[] = { 0x7A20, 1, CODES_END };
64u16 actor1Talk1Actions[] = { 0x7A06, 1, CODES_END };
68u16 actor2Talk1Actions[] = { 0x7A05, 1, CODES_END };
126 { NULL, NULL, 0x41 },
127 { NULL, NULL, 0 },
128};
130 { NULL, NULL, 0x43 },
131 { NULL, NULL, 0 },
132};
134 { NULL, NULL, 0x49 },
135 { NULL, NULL, 0 },
136};
138 { NULL, NULL, 0x48 },
139 { NULL, NULL, 0 },
140};
142 { NULL, NULL, 0x47 },
143 { NULL, NULL, 0 },
144};
146 { NULL, NULL, 0x46 },
147 { NULL, NULL, 0 },
148};
150 { NULL, NULL, 0x45 },
151 { NULL, NULL, 0 },
152};
154 { NULL, NULL, 0x44 },
155 { NULL, NULL, 0 },
156};
158 { NULL, NULL, 0x42 },
159 { NULL, NULL, 0 },
160};
162 { NULL, NULL, 0x4B },
163 { NULL, NULL, 0 },
164};
167 { actor13Talk1Conditions, NULL, 0x16C },
168 { NULL, NULL, 0 },
169};
171 { NULL, NULL, 0x4A },
172 { NULL, NULL, 0 },
173};
188 { NULL, NULL, 0x174 },
189 { NULL, NULL, 0 },
190};
208u16 actor15Conditions[] = { ITEM(0, 0x192), 1, CODES_END };
209u16 actor16Conditions[] = { ITEM(0, 0x192), 0, CODES_END };
210FieldActorEntry actor0 = { NULL, actor0Talks, 0x14, 4, 345, 197, 7 };
211FieldActorEntry actor1 = { NULL, actor1Talks, 0x16, 5, 408, 341, 7 };
212FieldActorEntry actor2 = { NULL, actor2Talks, 0x17, 6, 330, 380, 7 };
227FieldActorEntry actor17 = { NULL, NULL, 0xDB, 0xB, 345, 213, 7 };
229 &actor0,
230 &actor1,
231 &actor2,
232 &actor3,
233 &actor4,
234 &actor5,
235 &actor6,
236 &actor7,
237 &actor8,
238 &actor9,
239 &actor10,
240 &actor11,
241 &actor12,
242 &actor13,
243 &actor14,
244 &actor15,
245 &actor16,
246 &actor17,
247 NULL,
248};
250 { 1, 0, 0x40, 4, 0, 0, 0, 0, 0, 0, 304, 189, 222, 0 },
251 { 1, 0, 0x40, 4, 1, 0, 0, 0, 0, 0, 290, 166, 222, 0 },
252 { 1, 0, 0x40, 4, 2, 0, 0, 0, 0, 0, 328, 195, 215, 0 },
253 { 1, 0, 0x40, 4, 3, 0, 0, 0, 0, 0, 336, 187, 207, 0 },
254 { 1, 0, 0x40, 4, 4, 0, 0, 0, 0, 0, 352, 180, 199, 0 },
255 { 1, 0, 0x40, 4, 5, 0, 0, 0, 0, 0, 367, 164, 199, 0 },
256 { 1, 0, 0x40, 4, 6, 0, 0, 0, 0, 0, 472, 281, 331, 0 },
257 { 1, 0, 0x40, 4, 7, 0, 0, 0, 0, 0, 496, 352, 399, 0 },
258 { 1, 0, 0x40, 4, 8, 0, 0, 0, 0, 0, 271, 382, 399, 0 },
259 { 1, 0, 0x40, 4, 9, 0, 0, 0, 0, 0, 289, 374, 391, 0 },
260 { 1, 0, 0x40, 4, 0xA, 0, 0, 0, 0, 0, 336, 350, 367, 0 },
261 { 1, 0, 0x40, 4, 0xB, 0, 0, 0, 0, 0, 353, 343, 358, 0 },
262 { 1, 0, 0x40, 4, 0xC, 0, 0, 0, 0, 0, 366, 323, 351, 0 },
263 { 1, 0, 0x40, 4, 0xD, 0, 0, 0, 0, 0, 416, 309, 326, 0 },
264 { 1, 0, 0x40, 4, 0xE, 0, 0, 0, 0, 0, 435, 292, 319, 0 },
265 { 1, 0, 0x40, 4, 0xF, 0, 0, 0, 0, 0, 176, 155, 211, 0 },
266 { 1, 0, 0x40, 4, 0x10, 0, 0, 0, 0, 0, 160, 148, 199, 0 },
267 { 1, 0, 0x40, 4, 0x11, 0, 0, 0, 0, 0, 144, 140, 191, 0 },
268 { 1, 0, 0x40, 4, 0x12, 0, 0, 0, 0, 0, 128, 132, 184, 0 },
269 { 1, 0, 0x40, 4, 0x13, 0, 0, 0, 0, 0, 118, 127, 179, 0 },
270 { 1, 0, 0x64, 4, 0x14, 0, 0, 0, 0, 0, 448, 251, 310, 0 },
271 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
272};
274 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x22E, 0x1E8, 0x1AC, 7, 0, 0, 0 },
275 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_CLIMB_DOWN, 4, 0x100, 0xB0, 0, 0, 0, 0 },
276 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_CLIMB_UP, 4, 0x10F, 0xF6, 0, 0, 0, 0 },
277 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_CLIMB_DOWN, 4, 0xB0, 0xD8, 0, 0, 0, 0 },
278 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_CLIMB_UP, 4, 0xBF, 0x11E, 0, 0, 0, 0 },
279 { { { CODES_END, 0 }, { CODES_END, 0 } }, 0, 0, 0, 0, 0, 0, 0, 0 },
280};
281void (*stageFuncs[])(void) = {
283};
#define NULL
Definition common.h:17
unsigned short u16
Definition common.h:10
The stage overlays (AAA/PRO/WSTAG###.PRO), loaded at 0x800A4CA4 on top of FIELDSTG.
#define SLOT_CLIMB_UP
Definition field_map.h:256
#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_CLIMB_DOWN
Definition field_map.h:257
#define SLOT_EXIT
The kinds of StageSlot (type).
Definition field_map.h:255
#define FIELD_MAP_TRIGGERS
a cell's value: a direction (3 bits) and a StageSlot (5)
Definition field_map.h:88
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_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 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
#define SPECIAL_STORY_JUNGLE_SOUND_TO_NETWORK_OFFLINE
GAME.progress is from STORY_JUNGLE_SOUND to STORY_NETWORK_OFFLINE (PROGRESS_RANGES[0x19])
Definition story.h:1938
@ STORY_PRESIDENT_ARRESTED
WSTAG226 (Login Room, Amaterasu City), event 935, after the President of MAGAMI gives himself up (WST...
Definition story.h:136
@ STORY_GENJI_BEATEN
WSTAG200, event 52: after the first battle, won against Tamer Genji (event 50), the Digimon Navi give...
Definition story.h:36
@ STORY_TEDDY_FOUND
WSTAG212, event 352: Teddy is found; MAGAMI is part of the A.o.A, and the player sets off to beat the...
Definition story.h:67
@ STORY_LOOKING_FOR_TEDDY
WSTAG212, event 273: Kail and the player will put on the Agumon Suits to look for Teddy.
Definition story.h:61
@ STORY_MOVIE_BATTLES
WSTAG820, event 1080, with Snatchmon: each encounter plays MODE_BATTLE_MOVIE first.
Definition story.h:146
@ STORY_FAKE_BLUE_CARD
WSTAG410 (East Station), event 90: the Blue Card the player was given turns out to be a fake.
Definition story.h:42
#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_LOOKING_FOR_TEDDY_TO_CONTROL_ROOM
GAME.progress is from STORY_LOOKING_FOR_TEDDY to STORY_CONTROL_ROOM (PROGRESS_RANGES[0x20])
Definition story.h:1959
#define SPECIAL_STORY_DE_SINCERITY_TO_LISA_SAVED
GAME.progress is from STORY_DE_SINCERITY to STORY_LISA_SAVED (PROGRESS_RANGES[0xF])
Definition story.h:1908
#define FLAG_INN_GATOMON_TALKED
Inns (wstag235/360/425/470): Gatomon says they manage the Inn once; set there, later talks differ.
Definition story.h:1025
#define SPECIAL_STORY_SEIRYU_BADGE_TO_ZANBAMON_DRIVEN_OFF
GAME.progress is from STORY_SEIRYU_BADGE to STORY_ZANBAMON_DRIVEN_OFF (PROGRESS_RANGES[0xE])
Definition story.h:1905
#define FLAG_ITEM_SHOP_WIZARDMON_TALKED
wstag245/425: Wizardmon says they run the Item Shop once; set there, later talks differ
Definition story.h:1040
#define FLAG_BOOSTER_DIVERMON_TALKED
wstag270/425: Divermon says they handle Booster Packs once (also set after event 1415 with the Folder...
Definition story.h:1076
#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 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 SPECIAL_STORY_WAY_TO_AMATERASU_TO_PRESIDENT_ARRESTED
GAME.progress is from STORY_WAY_TO_AMATERASU to STORY_PRESIDENT_ARRESTED (PROGRESS_RANGES[0x16])
Definition story.h:1929
#define FLAG_ARMORY_GARGOMON_TALKED
wstag245/425: Gargomon says the Armory is run by them once; set there, later talks differ
Definition story.h:1037
#define FLAG_FOREST_INN_GUILMON_TALKED
wstag360 Forest Inn: Guilmon says another Guilmon has the Blue Card and went to Seiryu City; Tricky G...
Definition story.h:1263
#define SPECIAL_STORY_BYAKKO_LEADER_FOUGHT_TO_CONTROL_ROOM
GAME.progress is from STORY_BYAKKO_LEADER_FOUGHT to STORY_CONTROL_ROOM (PROGRESS_RANGES[0x10])
Definition story.h:1911
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
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
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 actor0Talk0Actions[]
Definition wstag425.c:58
FieldActorEntry actor0
Definition wstag425.c:210
void(* stageFuncs[])(void)
The stage's functions (common/start_stage.inc.c calls the first): a StageFuncs in the stages with a t...
Definition wstag425.c:281
FieldActorEntry actor6
Definition wstag425.c:216
u16 actor11Conditions[]
Definition wstag425.c:199
u16 actor0Talk0Conditions[]
Definition wstag425.c:57
FieldTalk actor2Talks[]
Definition wstag425.c:120
u16 actor0Talk1Conditions[]
Definition wstag425.c:59
u16 actor15Talk7Conditions[]
Definition wstag425.c:101
u16 actor2Talk1Conditions[]
Definition wstag425.c:67
u16 actor15Talk7Actions[]
Definition wstag425.c:102
u16 actor10Conditions[]
Definition wstag425.c:198
u16 actor15Talk6Actions[]
Definition wstag425.c:100
FieldActorEntry actor17
Definition wstag425.c:227
FieldTalk actor14Talks[]
Definition wstag425.c:170
FieldTalk actor5Talks[]
Definition wstag425.c:133
u16 actor15Talk1Actions[]
Definition wstag425.c:83
FieldActorEntry actor5
Definition wstag425.c:215
u16 actor15Talk4Actions[]
Definition wstag425.c:92
u16 actor1Talk1Conditions[]
Definition wstag425.c:63
FieldActorEntry actor2
Definition wstag425.c:212
#define STAGE_FILE_8
Definition wstag425.c:19
u16 actor15Talk2Conditions[]
Definition wstag425.c:84
u16 actor15Talk9Actions[]
Definition wstag425.c:109
u16 actor15Talk3Conditions[]
Definition wstag425.c:86
u16 actor9Conditions[]
Definition wstag425.c:197
FieldActorEntry * stageActors[]
Definition wstag425.c:228
u16 actor0Talk1Actions[]
Definition wstag425.c:60
u16 actor15Talk6Conditions[]
Definition wstag425.c:95
FieldTalk actor1Talks[]
Definition wstag425.c:115
u16 actor13Conditions[]
Definition wstag425.c:201
u16 actor13Talk0Conditions[]
Definition wstag425.c:69
u16 actor2Talk1Actions[]
Definition wstag425.c:68
u16 actor1Talk0Conditions[]
Definition wstag425.c:61
FieldTalk actor0Talks[]
Definition wstag425.c:110
#define STAGE_ARCHIVE
Definition wstag425.c:20
FieldActorEntry actor10
Definition wstag425.c:220
u16 actor2Talk0Actions[]
Definition wstag425.c:66
u16 actor15Talk5Conditions[]
Definition wstag425.c:93
FieldTalk actor4Talks[]
Definition wstag425.c:129
u16 actor4Conditions[]
Definition wstag425.c:192
FieldActorEntry actor4
Definition wstag425.c:214
u16 actor3Conditions[]
Definition wstag425.c:191
u16 actor15Talk5Actions[]
Definition wstag425.c:94
FieldTalk actor11Talks[]
Definition wstag425.c:157
u16 actor15Talk8Conditions[]
Definition wstag425.c:103
FieldActorEntry actor8
Definition wstag425.c:218
u16 actor15Talk8Actions[]
Definition wstag425.c:107
u16 actor15Talk1Conditions[]
Definition wstag425.c:78
ActorImage stageImages[]
Definition wstag425.c:41
u16 actor1Talk1Actions[]
Definition wstag425.c:64
FieldTalk actor6Talks[]
Definition wstag425.c:137
void setupStage(void)
Sets the stage up: its map and actors, playing SHOP1BGM.
Definition wstag425.c:23
u16 actor13Talk0Actions[]
Definition wstag425.c:70
u16 actor16Conditions[]
Definition wstag425.c:209
StageTile stageObjects[]
The tables and color setupStage gives FIELDSTG_state (FieldState)
Definition wstag425.c:249
FieldActorEntry actor9
Definition wstag425.c:219
u16 actor8Conditions[]
Definition wstag425.c:196
u16 actor5Conditions[]
Definition wstag425.c:193
FieldTalk actor10Talks[]
Definition wstag425.c:153
FieldTalk actor3Talks[]
Definition wstag425.c:125
FieldTalk actor9Talks[]
Definition wstag425.c:149
u16 actor15Talk2Actions[]
Definition wstag425.c:85
FieldTalk actor15Talks[]
Definition wstag425.c:174
u16 actor2Talk0Conditions[]
Definition wstag425.c:65
u16 actor15Talk3Actions[]
Definition wstag425.c:87
FieldActorEntry actor15
Definition wstag425.c:225
FieldActorEntry actor12
Definition wstag425.c:222
FieldActorEntry actor16
Definition wstag425.c:226
u16 actor15Conditions[]
Definition wstag425.c:208
u16 actor6Conditions[]
Definition wstag425.c:194
u16 actor14Conditions[]
Definition wstag425.c:207
FieldActorEntry actor7
Definition wstag425.c:217
StageSlot stageSlots[]
Definition wstag425.c:273
u16 actor1Talk0Actions[]
Definition wstag425.c:62
FieldActorEntry actor13
Definition wstag425.c:223
FieldActorEntry actor11
Definition wstag425.c:221
FieldActorEntry actor1
Definition wstag425.c:211
u16 actor15Talk9Conditions[]
Definition wstag425.c:108
FieldTalk actor13Talks[]
Definition wstag425.c:165
#define STAGE_FILE
Definition wstag425.c:18
u16 actor7Conditions[]
Definition wstag425.c:195
u16 actor13Talk1Conditions[]
Definition wstag425.c:71
FieldTalk actor7Talks[]
Definition wstag425.c:141
u16 actor15Talk0Conditions[]
Definition wstag425.c:72
#define STAGE_TEXT
Definition wstag425.c:17
FieldTalk actor8Talks[]
Definition wstag425.c:145
u16 actor15Talk0Actions[]
Definition wstag425.c:77
u16 actor15Talk4Conditions[]
Definition wstag425.c:88
FieldTalk actor12Talks[]
Definition wstag425.c:161
FieldTalk actor16Talks[]
Definition wstag425.c:187
FieldActorEntry actor3
Definition wstag425.c:213
FieldActorEntry actor14
Definition wstag425.c:224
u16 actor12Conditions[]
Definition wstag425.c:200