Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
wstag630.c
Go to the documentation of this file.
1/*
2 * WSTAG630: S Noise Desert, West Sector.
3 */
4
5#include "common.h"
6#include "field/stage.h"
7/* Defined below, after the code that uses them */
11
13
15
17
19#define STAGE_CHILDREN_SIZE 4
21
22#if VERSION_US || VERSION_JP
23#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_02)
24#define STAGE_FILE 0x484
25#elif VERSION_EU
26#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_02)
27#define STAGE_FILE 0x494
28#endif
29/* Sets the stage up: its map, actors and battles, playing the ambience ENV_0016 */
49
51 { 50, 8 }, { 51, 8 }, { 52, 8 }, { 53, 8 },
52 { 54, 8 }, { 55, 8 }, { 56, 8 }, { 57, 8 },
53 { 58, 8 }, { 59, 8 }, { 60, 8 }, { 82, 160 },
54 { 255, 0 },
55};
57 { 61, 8 }, { 62, 8 }, { 63, 8 }, { 64, 8 },
58 { 65, 8 }, { 66, 8 }, { 67, 8 }, { 68, 8 },
59 { 69, 8 }, { 70, 8 }, { 71, 8 }, { 82, 160 },
60 { 255, 0 },
61};
63 { 72, 8 }, { 73, 8 }, { 74, 8 }, { 75, 8 },
64 { 76, 8 }, { 77, 8 }, { 78, 8 }, { 79, 8 },
65 { 80, 8 }, { 81, 8 }, { 82, 160 }, { 255, 0 },
66};
80AreaBattle area1Battle0 = { 0, 0, MUSIC(1, 0) };
81AreaBattle area1Battle1 = { 0, 0, MUSIC(1, 0) };
82AreaBattle area1Battle2 = { 0, 0, MUSIC(1, 0) };
83AreaBattle area1Battle3 = { 0, 0, MUSIC(1, 0) };
84AreaBattle area1Battle4 = { 0, 0, MUSIC(1, 0) };
85AreaBattle area1Battle5 = { 0, 0, MUSIC(1, 0) };
86AreaBattle area1Battle6 = { 0, 0, MUSIC(1, 0) };
87AreaBattle area1Battle7 = { 0, 0, MUSIC(1, 0) };
93AreaBattle area2Battle0 = { 0, 0, MUSIC(1, 0) };
94AreaBattle area2Battle1 = { 0, 0, MUSIC(1, 0) };
95AreaBattle area2Battle2 = { 0, 0, MUSIC(1, 0) };
96AreaBattle area2Battle3 = { 0, 0, MUSIC(1, 0) };
97AreaBattle area2Battle4 = { 0, 0, MUSIC(1, 0) };
98AreaBattle area2Battle5 = { 0, 0, MUSIC(1, 0) };
99AreaBattle area2Battle6 = { 0, 0, MUSIC(1, 0) };
100AreaBattle area2Battle7 = { 0, 0, MUSIC(1, 0) };
106AreaBattle area3Battle0 = { 0, 0, MUSIC(1, 0) };
107AreaBattle area3Battle1 = { 0, 0, MUSIC(1, 0) };
108AreaBattle area3Battle2 = { 0, 0, MUSIC(1, 0) };
109AreaBattle area3Battle3 = { 0, 0, MUSIC(1, 0) };
110AreaBattle area3Battle4 = { 0, 0, MUSIC(1, 0) };
111AreaBattle area3Battle5 = { 0, 0, MUSIC(1, 0) };
112AreaBattle area3Battle6 = { 0, 0, MUSIC(1, 0) };
113AreaBattle area3Battle7 = { 0, 0, MUSIC(1, 0) };
123 { 0x200, 0x100, 0x21C, 0x1A6, 0x70, 0xA6, 0x230, 0x1FE },
124 { 0x200, 0x100, 0x200, 0x100, 0, 0, 0x220, 0x1FE },
125 { 0x200, 0x100, 0x216, 0x138, 0x58, 0x38, 0x200, 0x1FD },
126 { 0x200, 0x100, 0x208, 0x1BC, 0x20, 0xBC, 0x210, 0x1FD },
127 { 0x200, 0x100, 0x210, 0x1BC, 0x40, 0xBC, 0x220, 0x1FD },
128 { 0x200, 0x100, 0x200, 0x1BC, 0, 0xBC, 0x230, 0x1FD },
129 { 0x180, 0x100, 0x188, 0x100, 0x120, 0, 0x170, 0x1FF },
130 { 0x180, 0x100, 0x190, 0x100, 0x140, 0, 0x140, 0x1FE },
131};
159 { NULL, NULL, 0x72 },
160 { NULL, NULL, 0 },
161};
163 { actor1Talk0Conditions, NULL, 0x1B9 },
164 { actor1Talk1Conditions, NULL, 0x4A },
165 { NULL, NULL, 0 },
166};
168 { NULL, NULL, 0x1BD },
169 { NULL, NULL, 0 },
170};
172 { NULL, NULL, 0x1BC },
173 { NULL, NULL, 0 },
174};
176 { NULL, NULL, 0x1BB },
177 { NULL, NULL, 0 },
178};
180 { NULL, NULL, 0x1BA },
181 { NULL, NULL, 0 },
182};
184 { NULL, NULL, 0x1B9 },
185 { NULL, NULL, 0 },
186};
188 { NULL, NULL, 0x73 },
189 { NULL, NULL, 0 },
190};
192 { NULL, NULL, 0x1AE },
193 { NULL, NULL, 0 },
194};
201 { NULL, NULL, 0x1C7 },
202 { NULL, NULL, 0 },
203};
290 &actor0,
291 &actor1,
292 &actor2,
293 &actor3,
294 &actor4,
295 &actor5,
296 &actor6,
297 &actor7,
298 &actor8,
299 &actor9,
300 &actor10,
301 &actor11,
302 &actor12,
303 &actor13,
304 &actor14,
305 &actor15,
306 &actor16,
307 &actor17,
308 NULL,
309};
311 { 1, 3, 0x40, 2, 0x48, 0, 0, 0, 0, 0, 302, 396, 0, 0 },
312 { 1, 2, 0x40, 6, 0x3D, 0, 0, 0, 0, 0, 120, 716, 0, 0 },
313 { 1, 2, 0x40, 6, 0x3D, 0, 0, 0, 0, 0, 277, 632, 0, 0 },
314 { 1, 1, 0x40, 6, 0x32, 0, 0, 0, 0, 0, 342, 321, 0, 0 },
315 { 1, 1, 0x40, 6, 0x32, 0, 0, 0, 0, 0, 604, 413, 0, 0 },
316 { 1, 2, 0x40, 6, 0x3D, 0, 0, 0, 0, 0, 726, 314, 0, 0 },
317 { 1, 2, 0x40, 6, 0x3D, 0, 0, 0, 0, 0, 752, 174, 0, 0 },
318 { 1, 2, 0x40, 6, 0x3D, 0, 0, 0, 0, 0, 772, 512, 0, 0 },
319 { 1, 2, 0x40, 6, 0x3D, 0, 0, 0, 0, 0, 949, 77, 0, 0 },
320 { 1, 0, 0x40, 4, 0, 0, 0, 0, 0, 0, 541, 275, 326, 0 },
321 { 1, 0, 0x40, 4, 1, 0, 0, 0, 0, 0, 364, 459, 509, 0 },
322 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
323};
325 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x248, 0x90, 0x540, 5, 0, 0, 0 },
326 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x258, 0x340, 0xF0, 1, 0, 1, 1 },
327 { { { CODES_END, 0 }, { CODES_END, 0 } }, 0, 0, 0, 0, 0, 0, 0, 0 },
328};
329void (*stageFuncs[])(void) = {
331};
#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 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_AREAS
a cell's value: its battle area (FieldBattles), or 0
Definition field_map.h:87
#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 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_BATTLE
BATL0000: the maps' random battles (AreaBattle, nearly all of them)
Definition sound.h:76
#define MUSIC_DESERT
ENV_0016: the West Sector's deserts and the Mirage Tower.
Definition sound.h:132
#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 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
@ STORY_PRESIDENT_ARRESTED
WSTAG226 (Login Room, Amaterasu City), event 935, after the President of MAGAMI gives himself up (WST...
Definition story.h:136
@ STORY_BYAKKO_LEADER_FOUGHT
WSTAG620 (the rebels' hideout), event 534: the Byakko Leader takes the player for the A....
Definition story.h:85
@ STORY_NUMEMON_FOUND
WSTAG685 (Underground Cave, Byakko City), event 413: the rock blocking the hole is Numemon.
Definition story.h:73
@ STORY_MOVIE_BATTLES
WSTAG820, event 1080, with Snatchmon: each encounter plays MODE_BATTLE_MOVIE first.
Definition story.h:146
@ STORY_DE_SINCERITY
WSTAG460 (Reliability Spot), event 370: the Qing Long Chief, asked for the Digi-Egg of Knowledge,...
Definition story.h:70
#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_KEITH_NICK_SEARCH_STARTED
wstag620 Secret Room: set after event 540; then Lisa says "Find Keith and Nick" and people in 10 stag...
Definition story.h:1188
#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 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_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
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
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
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
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 wstag630.c:240
AreaBattle area2Battle7
Definition wstag630.c:100
FieldActorEntry actor0
Definition wstag630.c:271
void(* stageFuncs[])(void)
The stage's functions (common/start_stage.inc.c calls the first): a StageFuncs in the stages with a t...
Definition wstag630.c:329
FieldActorEntry actor6
Definition wstag630.c:277
AnimFrame updateTileAnimsFrames2[]
Definition wstag630.c:62
u16 actor11Conditions[]
Definition wstag630.c:259
FieldTalk actor2Talks[]
Definition wstag630.c:167
AreaBattle area2Battle6
Definition wstag630.c:99
u16 actor10Conditions[]
Definition wstag630.c:258
FieldActorEntry actor17
Definition wstag630.c:288
FieldTalk actor14Talks[]
Definition wstag630.c:219
FieldTalk actor5Talks[]
Definition wstag630.c:179
AreaBattle area1Battle6
Definition wstag630.c:86
u16 actor11Talk1Conditions[]
Definition wstag630.c:139
FieldActorEntry actor5
Definition wstag630.c:276
u16 actor1Talk1Conditions[]
Definition wstag630.c:133
AreaBattle area0Battle7
Definition wstag630.c:74
FieldActorEntry actor2
Definition wstag630.c:273
u16 actor9Talk0Conditions[]
Definition wstag630.c:134
AreaBattle area3Battle4
Definition wstag630.c:110
AreaBattle area3Battle3
Definition wstag630.c:109
AreaBattle area0Battle1
Definition wstag630.c:68
AreaBattle area2Battle0
Definition wstag630.c:93
u16 actor9Conditions[]
Definition wstag630.c:257
FieldActorEntry * stageActors[]
Definition wstag630.c:289
AreaBattle area1Battle2
Definition wstag630.c:82
AreaBattle area3Battle0
Definition wstag630.c:106
u16 actor17Talk1Conditions[]
Definition wstag630.c:157
u16 actor11Talk0Conditions[]
Definition wstag630.c:137
u16 actor12Talk0Actions[]
Definition wstag630.c:141
AreaBattle area0Battle6
Definition wstag630.c:73
u16 actor16Talk0Actions[]
Definition wstag630.c:153
FieldTalk actor1Talks[]
Definition wstag630.c:162
u16 actor13Conditions[]
Definition wstag630.c:261
AreaBattle area3Battle2
Definition wstag630.c:108
u16 actor17Talk0Conditions[]
Definition wstag630.c:155
u16 actor13Talk0Conditions[]
Definition wstag630.c:143
u16 actor1Talk0Conditions[]
Definition wstag630.c:132
FieldTalk actor0Talks[]
Definition wstag630.c:158
AreaBattle area3Battle1
Definition wstag630.c:107
AreaBattle area0Battle3
Definition wstag630.c:70
FieldActorEntry actor10
Definition wstag630.c:281
FieldTalk actor4Talks[]
Definition wstag630.c:175
u16 actor4Conditions[]
Definition wstag630.c:243
FieldActorEntry actor4
Definition wstag630.c:275
u16 actor3Conditions[]
Definition wstag630.c:242
AreaBattle area3Battle6
Definition wstag630.c:112
AnimFrame updateTileAnimsFrames1[]
Definition wstag630.c:56
FieldTalk actor17Talks[]
Definition wstag630.c:234
FieldTalk actor11Talks[]
Definition wstag630.c:204
FieldActorEntry actor8
Definition wstag630.c:279
u16 actor15Talk1Conditions[]
Definition wstag630.c:151
ActorImage stageImages[]
Definition wstag630.c:122
u16 actor14Talk1Conditions[]
Definition wstag630.c:148
FieldTalk actor6Talks[]
Definition wstag630.c:183
void setupStage(void)
Sets the stage up: its map, actors and battles, playing the ambience ENV_0016.
Definition wstag630.c:30
u16 actor12Talk0Conditions[]
Definition wstag630.c:140
u16 actor13Talk0Actions[]
Definition wstag630.c:144
AreaBattle area2Battle4
Definition wstag630.c:97
u16 actor16Conditions[]
Definition wstag630.c:264
StageTile stageObjects[]
The tables and color setupStage gives FIELDSTG_state (FieldState)
Definition wstag630.c:310
u16 actor16Talk1Conditions[]
Definition wstag630.c:154
FieldActorEntry actor9
Definition wstag630.c:280
u16 actor8Conditions[]
Definition wstag630.c:251
u16 actor9Talk1Conditions[]
Definition wstag630.c:136
u16 actor5Conditions[]
Definition wstag630.c:244
FieldTalk actor10Talks[]
Definition wstag630.c:200
FieldTalk actor3Talks[]
Definition wstag630.c:171
FieldTalk actor9Talks[]
Definition wstag630.c:195
BattleList area3Battles
Definition wstag630.c:114
AreaBattle area3Battle5
Definition wstag630.c:111
AreaBattle area0Battle5
Definition wstag630.c:72
BattleList area1Battles
Definition wstag630.c:88
FieldTalk actor15Talks[]
Definition wstag630.c:224
BattleList area2Battles
Definition wstag630.c:101
FieldActorEntry actor15
Definition wstag630.c:286
FieldActorEntry actor12
Definition wstag630.c:283
FieldActorEntry actor16
Definition wstag630.c:287
u16 actor15Conditions[]
Definition wstag630.c:263
AreaBattle area1Battle4
Definition wstag630.c:84
u16 actor6Conditions[]
Definition wstag630.c:245
AreaBattle area2Battle2
Definition wstag630.c:95
u16 actor12Talk1Conditions[]
Definition wstag630.c:142
u16 actor14Talk0Actions[]
Definition wstag630.c:147
AreaBattle area1Battle5
Definition wstag630.c:85
u16 actor14Conditions[]
Definition wstag630.c:262
FieldActorEntry actor7
Definition wstag630.c:278
StageSlot stageSlots[]
Definition wstag630.c:324
AreaBattle area2Battle1
Definition wstag630.c:94
FieldActorEntry actor13
Definition wstag630.c:284
AreaBattle area1Battle3
Definition wstag630.c:83
AreaBattle area1Battle0
Definition wstag630.c:80
FieldActorEntry actor11
Definition wstag630.c:282
AnimFrame updateTileAnimsFrames0[]
Defined below, after the code that uses them.
Definition wstag630.c:50
u16 actor16Talk0Conditions[]
Definition wstag630.c:152
FieldActorEntry actor1
Definition wstag630.c:272
u16 actor17Talk0Actions[]
Definition wstag630.c:156
AreaBattle area0Battle0
Definition wstag630.c:67
u16 actor9Talk0Actions[]
Definition wstag630.c:135
AreaBattle area0Battle2
Definition wstag630.c:69
FieldTalk actor13Talks[]
Definition wstag630.c:214
#define STAGE_FILE
Definition wstag630.c:27
AreaBattle area2Battle5
Definition wstag630.c:98
AreaBattle area1Battle1
Definition wstag630.c:81
u16 actor11Talk0Actions[]
Definition wstag630.c:138
u16 actor7Conditions[]
Definition wstag630.c:250
AreaBattle area2Battle3
Definition wstag630.c:96
u16 actor2Conditions[]
Definition wstag630.c:241
u16 actor13Talk1Conditions[]
Definition wstag630.c:145
FieldTalk actor7Talks[]
Definition wstag630.c:187
AreaBattle area0Battle4
Definition wstag630.c:71
u16 actor15Talk0Conditions[]
Definition wstag630.c:149
#define STAGE_TEXT
Definition wstag630.c:26
FieldTalk actor8Talks[]
Definition wstag630.c:191
u16 actor15Talk0Actions[]
Definition wstag630.c:150
FieldTalk actor12Talks[]
Definition wstag630.c:209
AreaBattle area3Battle7
Definition wstag630.c:113
BattleList area0Battles
Definition wstag630.c:75
AreaBattle area1Battle7
Definition wstag630.c:87
FieldTalk actor16Talks[]
Definition wstag630.c:229
u16 actor17Conditions[]
Definition wstag630.c:270
FieldActorEntry actor3
Definition wstag630.c:274
FieldBattles stageBattles[]
Definition wstag630.c:119
FieldActorEntry actor14
Definition wstag630.c:285
u16 actor12Conditions[]
Definition wstag630.c:260
u16 actor14Talk0Conditions[]
Definition wstag630.c:146
u16 actor0Conditions[]
Definition wstag630.c:239