Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
wstag221.c
Go to the documentation of this file.
1/*
2 * WSTAG221: Digimon Lab, Amaterasu City. On the Amaterasu server; its Asuka
3 * server twin is WSTAG220.
4 */
5
6#include "common.h"
7#include "field/stage.h"
8
11
12const CVECTOR stageColor = { 0x80, 0x80, 0x80, 0x00 };
13#if VERSION_US || VERSION_JP
14#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_03)
15#define STAGE_FILE 0x4D0
16#elif VERSION_EU
17#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_03)
18#define STAGE_FILE 0x4E0
19#endif
20/*
21 * Sets the stage up: its map and actors, playing KANRIBGM; BGM_0029 instead
22 * except at STORY_PRESIDENT_ARRESTED once flag 0x1A0A is set
23 */
46
48 { 0x200, 0x100, 0x21C, 0x1A6, 0x70, 0xA6, 0x230, 0x1FE },
49 { 0x200, 0x100, 0x200, 0x100, 0, 0, 0x220, 0x1FE },
50 { 0x200, 0x100, 0x216, 0x138, 0x58, 0x38, 0x200, 0x1FD },
51 { 0x200, 0x100, 0x208, 0x1BC, 0x20, 0xBC, 0x210, 0x1FD },
52 { 0x200, 0x100, 0x210, 0x1BC, 0x40, 0xBC, 0x220, 0x1FD },
53 { 0x200, 0x100, 0x200, 0x1BC, 0, 0xBC, 0x230, 0x1FD },
54 { 0x140, 0x100, 0x158, 0x180, 0x60, 0x80, 0x150, 0x1F7 },
55 { 0x140, 0x100, 0x160, 0x190, 0x80, 0x90, 0x160, 0x1F7 },
56 { 0x140, 0x100, 0x168, 0x190, 0xA0, 0x90, 0x170, 0x1F7 },
57 { 0x140, 0x100, 0x170, 0x190, 0xC0, 0x90, 0x150, 0x1F6 },
58 { 0, 0, 0, 0, 0, 0, 0, 0 },
59 { 0, 0, 0, 0, 0, 0, 0, 0 },
60 { 0x140, 0x100, 0x154, 0x1A8, 0x50, 0xA8, 0x160, 0x1F6 },
61 { 0x140, 0x100, 0x140, 0x1AE, 0, 0xAE, 0x170, 0x1F6 },
62 { 0x140, 0x100, 0x148, 0x1AE, 0x20, 0xAE, 0x140, 0x1F5 },
63 { 0x140, 0x100, 0x15C, 0x1B8, 0x70, 0xB8, 0x150, 0x1F5 },
64 { 0x140, 0x100, 0x178, 0x190, 0xE0, 0x90, 0x160, 0x1F5 },
65 { 0, 0, 0, 0, 0, 0, 0, 0 },
66 { 0, 0, 0, 0, 0, 0, 0, 0 },
67};
82 { NULL, NULL, 0x51 },
83 { NULL, NULL, 0 },
84};
86 { NULL, NULL, 0x56 },
87 { NULL, NULL, 0 },
88};
90 { NULL, NULL, 0x52 },
91 { NULL, NULL, 0 },
92};
94 { NULL, NULL, 0x57 },
95 { NULL, NULL, 0 },
96};
98 { NULL, NULL, 0x59 },
99 { NULL, NULL, 0 },
100};
102 { NULL, NULL, 0x4D },
103 { NULL, NULL, 0 },
104};
106 { NULL, NULL, 0x53 },
107 { NULL, NULL, 0 },
108};
110 { NULL, NULL, 0x4E },
111 { NULL, NULL, 0 },
112};
114 { NULL, NULL, 0x54 },
115 { NULL, NULL, 0 },
116};
118 { NULL, actor15Talk0Actions, 0x55 },
119 { NULL, NULL, 0 },
120};
127 { NULL, NULL, 0x58 },
128 { NULL, NULL, 0 },
129};
205FieldActorEntry actor5 = { actor5Conditions, NULL, 0x59, 7, 300, 217, 5 };
206FieldActorEntry actor6 = { actor6Conditions, NULL, 0x59, 7, 300, 217, 5 };
207FieldActorEntry actor7 = { actor7Conditions, NULL, 0x70, 8, 169, 224, 1 };
208FieldActorEntry actor8 = { actor8Conditions, NULL, 0x71, 9, 202, 241, 1 };
209FieldActorEntry actor9 = { actor9Conditions, actor9Talks, 0x9D, 0xA, 187, 215, 1 };
213FieldActorEntry actor13 = { actor13Conditions, NULL, 0x9F, 0xC, 300, 217, 5 };
214FieldActorEntry actor14 = { actor14Conditions, NULL, 0x9F, 0xC, 300, 217, 5 };
218FieldActorEntry actor18 = { actor18Conditions, NULL, 0x10E, 0xF, 169, 224, 1 };
219FieldActorEntry actor19 = { actor19Conditions, NULL, 0x10E, 0xF, 169, 224, 1 };
220FieldActorEntry actor20 = { actor20Conditions, NULL, 0x10F, 0x10, 202, 241, 1 };
221FieldActorEntry actor21 = { actor21Conditions, NULL, 0x10F, 0x10, 202, 241, 1 };
223 &actor0,
224 &actor1,
225 &actor2,
226 &actor3,
227 &actor4,
228 &actor5,
229 &actor6,
230 &actor7,
231 &actor8,
232 &actor9,
233 &actor10,
234 &actor11,
235 &actor12,
236 &actor13,
237 &actor14,
238 &actor15,
239 &actor16,
240 &actor17,
241 &actor18,
242 &actor19,
243 &actor20,
244 &actor21,
245 NULL,
246};
248 { 1, 0, 0x40, 2, 0x45, 2, 0, 2, 0xA, 0, 376, 237, 0, 0 },
249 { 1, 0, 0x40, 2, 5, 0, 0, 0, 0, 0, 368, 277, 0, 0 },
250 { 1, 0, 0x40, 2, 6, 0, 0, 0, 0, 0, 0, 204, 0, 0 },
251 { 1, 0, 0x40, 2, 0x46, 2, 0, 1, 4, 0, 38, 197, 0, 0 },
252 { 1, 0, 0x40, 6, 0x1F, 1, 0x1F, 0x24, 8, 0, 110, 341, 0, 0 },
253 { 1, 0, 0x40, 6, 0x1F, 1, 0x1F, 0x24, 8, 0, 198, 149, 0, 0 },
254 { 1, 0, 0x40, 6, 0x1F, 1, 0x1F, 0x24, 8, 0, 221, 148, 0, 0 },
255 { 1, 0, 0x40, 6, 0x1F, 1, 0x1F, 0x24, 8, 0, 235, 149, 0, 0 },
256 { 1, 0, 0x40, 6, 0x1F, 1, 0x1F, 0x24, 8, 0, 249, 297, 0, 0 },
257 { 1, 0, 0x40, 6, 0x1F, 1, 0x1F, 0x24, 8, 0, 271, 168, 0, 0 },
258 { 1, 0, 0x40, 6, 0x1F, 1, 0x1F, 0x24, 8, 0, 398, 350, 0, 0 },
259 { 1, 0, 0x40, 6, 0x25, 1, 0x25, 0x2A, 8, 0, 102, 333, 0, 0 },
260 { 1, 0, 0x40, 6, 0x25, 1, 0x25, 0x2A, 8, 0, 200, 134, 0, 0 },
261 { 1, 0, 0x40, 6, 0x25, 1, 0x25, 0x2A, 8, 0, 213, 145, 0, 0 },
262 { 1, 0, 0x40, 6, 0x25, 1, 0x25, 0x2A, 8, 0, 242, 167, 0, 0 },
263 { 1, 0, 0x40, 6, 0x25, 1, 0x25, 0x2A, 8, 0, 248, 230, 0, 0 },
264 { 1, 0, 0x40, 6, 0x25, 1, 0x25, 0x2A, 8, 0, 254, 280, 0, 0 },
265 { 1, 0, 0x40, 6, 0x25, 1, 0x25, 0x2A, 8, 0, 265, 153, 0, 0 },
266 { 1, 0, 0x40, 6, 0x25, 1, 0x25, 0x2A, 8, 0, 391, 343, 0, 0 },
267 { 1, 0, 0x40, 6, 0x4A, 1, 0x4A, 0x59, 0xA, 0, 124, 331, 0, 0 },
268 { 1, 0, 0x40, 6, 0x14, 1, 0x14, 0x1E, 0xA, 0, 349, 336, 0, 0 },
269 { 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x39, 0xE, 0, 318, 172, 0, 0 },
270 { 1, 0, 0x40, 6, 0x2F, 1, 0x2F, 0x31, 4, 0, 305, 193, 0, 0 },
271 { 1, 0, 0x40, 6, 0x3B, 1, 0x3B, 0x3F, 8, 0, 354, 209, 0, 0 },
272 { 1, 0, 0x40, 6, 0x40, 2, 0, 9, 8, 0, 336, 217, 0, 0 },
273 { 1, 0, 0x40, 6, 0x41, 2, 0, 2, 0x10, 0, 328, 232, 0, 0 },
274 { 1, 0x64, 0x40, 6, 4, 0, 0, 0, 0, 0, 79, 186, 0, 0 },
275 { 1, 0, 0x40, 6, 0x42, 2, 0, 2, 6, 0, 136, 185, 0, 0 },
276 { 1, 0, 0x40, 6, 0x43, 2, 0, 2, 0x10, 0, 306, 231, 0, 0 },
277 { 1, 0, 0x40, 6, 0x44, 2, 0, 2, 0xA, 0, 321, 223, 0, 0 },
278 { 1, 0, 0x40, 6, 0x47, 2, 0, 1, 4, 0, 140, 123, 0, 0 },
279 { 1, 0, 0x40, 6, 0x48, 2, 0, 1, 4, 0, 307, 122, 0, 0 },
280 { 1, 0, 0x40, 6, 0x49, 2, 0, 1, 4, 0, 346, 144, 0, 0 },
281 { 1, 0, 0x40, 4, 0, 0, 0, 0, 0, 0, 143, 287, 340, 0 },
282 { 1, 0, 0x40, 4, 1, 0, 0, 0, 0, 0, 326, 288, 340, 0 },
283 { 1, 0, 0x40, 4, 2, 0, 0, 0, 0, 0, 398, 240, 263, 0 },
284 { 1, 0, 0x40, 4, 3, 0, 0, 0, 0, 0, 33, 201, 239, 0 },
285 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
286};
288 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x273, 0x2C8, 0x24C, 3, 0x64, 0, 0 },
289 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x270, 0x410, 0x200, 1, 0, 0, 0 },
290 { { { CODES_END, 0 }, { CODES_END, 0 } }, 0, 0, 0, 0, 0, 0, 0, 0 },
291};
292void (*stageFuncs[])(void) = {
294};
#define NULL
Definition common.h:17
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
The stage overlays (AAA/PRO/WSTAG###.PRO), loaded at 0x800A4CA4 on top of FIELDSTG.
#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_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 PROGRESS(n)
GAME.progress is n.
Definition game_state.h:69
#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,...
#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_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_SINCE_DE_KNOWLEDGE
GAME.progress is STORY_DE_KNOWLEDGE or later (PROGRESS_RANGES[0xD], to 0x63)
Definition story.h:1902
#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
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
CVECTOR spriteColor
the field's sprites' color, unless cd is 0
Definition field_map.h:458
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
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 wstag221.c:135
FieldActorEntry actor0
Definition wstag221.c:200
void(* stageFuncs[])(void)
The stage's functions (common/start_stage.inc.c calls the first): a StageFuncs in the stages with a t...
Definition wstag221.c:292
FieldActorEntry actor6
Definition wstag221.c:206
u16 actor11Conditions[]
Definition wstag221.c:165
FieldTalk actor2Talks[]
Definition wstag221.c:89
u16 actor16Talk1Actions[]
Definition wstag221.c:80
u16 actor10Conditions[]
Definition wstag221.c:164
u16 actor18Conditions[]
Definition wstag221.c:180
FieldActorEntry actor17
Definition wstag221.c:217
FieldActorEntry actor18
Definition wstag221.c:218
FieldActorEntry actor5
Definition wstag221.c:205
FieldActorEntry actor2
Definition wstag221.c:202
const CVECTOR stageColor
Definition wstag221.c:12
FieldActorEntry actor19
Definition wstag221.c:219
u16 actor9Conditions[]
Definition wstag221.c:159
FieldActorEntry * stageActors[]
Definition wstag221.c:222
u16 actor16Talk0Actions[]
Definition wstag221.c:74
FieldTalk actor1Talks[]
Definition wstag221.c:85
u16 actor13Conditions[]
Definition wstag221.c:171
FieldTalk actor0Talks[]
Definition wstag221.c:81
FieldActorEntry actor10
Definition wstag221.c:210
u16 actor19Conditions[]
Definition wstag221.c:185
FieldTalk actor4Talks[]
Definition wstag221.c:97
u16 actor4Conditions[]
Definition wstag221.c:142
FieldActorEntry actor4
Definition wstag221.c:204
u16 actor3Conditions[]
Definition wstag221.c:141
FieldTalk actor17Talks[]
Definition wstag221.c:126
FieldTalk actor11Talks[]
Definition wstag221.c:109
FieldActorEntry actor8
Definition wstag221.c:208
ActorImage stageImages[]
Definition wstag221.c:47
void setupStage(void)
Sets the stage up: its map and actors, playing KANRIBGM; BGM_0029 instead except at STORY_PRESIDENT_A...
Definition wstag221.c:24
u16 actor16Conditions[]
Definition wstag221.c:178
StageTile stageObjects[]
The tables and color setupStage gives FIELDSTG_state (FieldState)
Definition wstag221.c:247
u16 actor16Talk1Conditions[]
Definition wstag221.c:75
FieldActorEntry actor9
Definition wstag221.c:209
u16 actor8Conditions[]
Definition wstag221.c:154
FieldActorEntry actor20
Definition wstag221.c:220
u16 actor5Conditions[]
Definition wstag221.c:143
FieldTalk actor10Talks[]
Definition wstag221.c:105
FieldTalk actor3Talks[]
Definition wstag221.c:93
FieldTalk actor9Talks[]
Definition wstag221.c:101
FieldTalk actor15Talks[]
Definition wstag221.c:117
FieldActorEntry actor15
Definition wstag221.c:215
FieldActorEntry actor12
Definition wstag221.c:212
FieldActorEntry actor16
Definition wstag221.c:216
u16 actor15Conditions[]
Definition wstag221.c:177
u16 actor6Conditions[]
Definition wstag221.c:144
u16 actor14Conditions[]
Definition wstag221.c:176
FieldActorEntry actor7
Definition wstag221.c:207
StageSlot stageSlots[]
Definition wstag221.c:287
FieldActorEntry actor13
Definition wstag221.c:213
FieldActorEntry actor11
Definition wstag221.c:211
u16 actor16Talk0Conditions[]
Definition wstag221.c:69
FieldActorEntry actor1
Definition wstag221.c:201
FieldActorEntry actor21
Definition wstag221.c:221
#define STAGE_FILE
Definition wstag221.c:18
u16 actor7Conditions[]
Definition wstag221.c:149
u16 actor2Conditions[]
Definition wstag221.c:136
u16 actor20Conditions[]
Definition wstag221.c:190
#define STAGE_TEXT
Definition wstag221.c:17
u16 actor15Talk0Actions[]
Definition wstag221.c:68
FieldTalk actor12Talks[]
Definition wstag221.c:113
u16 actor21Conditions[]
Definition wstag221.c:195
FieldTalk actor16Talks[]
Definition wstag221.c:121
u16 actor17Conditions[]
Definition wstag221.c:179
FieldActorEntry actor3
Definition wstag221.c:203
FieldActorEntry actor14
Definition wstag221.c:214
u16 actor12Conditions[]
Definition wstag221.c:170
u16 actor0Conditions[]
Definition wstag221.c:130