Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
wstag956.c
Go to the documentation of this file.
1/*
2 * WSTAG956: Qing Long City, East Sector, in the extra chapter. The European
3 * version's: in its extra chapter (STORY_EXTRA), mode 668 starts it instead of
4 * WSTAG421.
5 */
6
7#include "common.h"
8#include "field/stage.h"
9
11#define STAGE_CHILDREN_SIZE 4
13
14#if VERSION_EU
15#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_08)
16#define STAGE_FILE 0x927
17#define STAGE_FILE_8 0x783
18#elif VERSION_JP
19#define STAGE_TEXT 0x89A
20#define STAGE_FILE 0x901
21#define STAGE_FILE_8 0x774
22#endif
23/* Sets the stage up: its map, actors and battles, playing SEIR_BGM */
42
44 { 0x200, 0x100, 0x21C, 0x1A6, 0x70, 0xA6, 0x230, 0x1FE },
45 { 0x200, 0x100, 0x200, 0x100, 0, 0, 0x220, 0x1FE },
46 { 0x200, 0x100, 0x216, 0x138, 0x58, 0x38, 0x200, 0x1FD },
47 { 0x200, 0x100, 0x208, 0x1BC, 0x20, 0xBC, 0x210, 0x1FD },
48 { 0x200, 0x100, 0x210, 0x1BC, 0x40, 0xBC, 0x220, 0x1FD },
49 { 0x200, 0x100, 0x200, 0x1BC, 0, 0xBC, 0x230, 0x1FD },
50 { 0x140, 0x100, 0x179, 0x1CE, 0xE4, 0xCE, 0x140, 0x1FF },
51 { 0x140, 0x100, 0x14E, 0x1DC, 0x38, 0xDC, 0x150, 0x1FF },
52 { 0x1C0, 0x100, 0x1D0, 0x100, 0x240, 0, 0x160, 0x1FF },
53 { 0x180, 0x100, 0x1B0, 0x1AE, 0x1C0, 0xAE, 0x170, 0x1FF },
54 { 0x1C0, 0x100, 0x1D8, 0x100, 0x260, 0, 0x140, 0x1FE },
55 { 0x180, 0x100, 0x1A4, 0x140, 0x190, 0x40, 0x150, 0x1FE },
56 { 0x1C0, 0x100, 0x1F4, 0x100, 0x2D0, 0, 0x160, 0x1FE },
57};
97 { NULL, NULL, 0x5E },
98 { NULL, NULL, 0 },
99};
108 { NULL, NULL, 0x76 },
109 { NULL, NULL, 0 },
110};
112 { NULL, NULL, 0x75 },
113 { NULL, NULL, 0 },
114};
116 { NULL, NULL, 0x79 },
117 { NULL, NULL, 0 },
118};
120 { actor5Talk0Conditions, NULL, 0x72 },
122 { actor5Talk2Conditions, NULL, 0x74 },
123 { NULL, NULL, 0 },
124};
126 { NULL, NULL, 0x5A },
127 { NULL, NULL, 0 },
128};
137 { NULL, NULL, 0x78 },
138 { NULL, NULL, 0 },
139};
140u16 actor0Conditions[] = { ITEM(0, 0x192), 0, CODES_END };
141u16 actor1Conditions[] = { ITEM(0, 0x192), 1, CODES_END };
142u16 actor6Conditions[] = { ITEM(0, 0x192), 0, CODES_END };
143u16 actor7Conditions[] = { ITEM(0, 0x192), 1, CODES_END };
146FieldActorEntry actor2 = { NULL, actor2Talks, 0x2E, 5, 592, 424, 5 };
147FieldActorEntry actor3 = { NULL, actor3Talks, 0x31, 6, 449, 481, 1 };
148FieldActorEntry actor4 = { NULL, actor4Talks, 0x86, 7, 1088, 400, 7 };
149FieldActorEntry actor5 = { NULL, actor5Talks, 0x8F, 8, 352, 234, 1 };
152FieldActorEntry actor8 = { NULL, actor8Talks, 0x175, 0xA, 833, 257, 5 };
154 &actor0,
155 &actor1,
156 &actor2,
157 &actor3,
158 &actor4,
159 &actor5,
160 &actor6,
161 &actor7,
162 &actor8,
163 NULL,
164};
166 { 1, 0, 0x4A, 2, 0, 1, 0, 3, 6, 0, 441, 290, 0, 0 },
167 { 1, 0, 0x4A, 2, 0, 1, 0, 3, 6, 0, 817, 114, 0, 0 },
168 { 1, 0, 0x4A, 2, 0, 1, 0, 3, 6, 0, 949, 528, 0, 0 },
169 { 1, 0, 0x40, 2, 4, 1, 4, 7, 4, 0, 366, 274, 0, 0 },
170 { 1, 0, 0x40, 2, 4, 1, 4, 7, 4, 0, 446, 241, 0, 0 },
171 { 1, 0, 0x40, 2, 4, 1, 4, 7, 4, 0, 1129, 333, 0, 0 },
172 { 1, 0, 0x80, 2, 0x24, 0, 0, 0, 0, 0, 469, 191, 0, 0 },
173 { 1, 0, 0x80, 2, 0x25, 0, 0, 0, 0, 0, 256, 161, 0, 0 },
174 { 1, 0, 0x40, 6, 8, 1, 8, 0xB, 4, 0, 411, 424, 0, 0 },
175 { 1, 0, 0x40, 6, 8, 1, 8, 0xB, 4, 0, 538, 379, 0, 0 },
176 { 1, 0, 0x40, 6, 8, 1, 8, 0xB, 4, 0, 568, 341, 0, 0 },
177 { 1, 0, 0x40, 6, 8, 1, 8, 0xB, 4, 0, 607, 347, 0, 0 },
178 { 1, 0, 0x40, 6, 8, 1, 8, 0xB, 4, 0, 976, 215, 0, 0 },
179 { 1, 0, 0x40, 6, 0xC, 1, 0xC, 0xF, 4, 0, 544, 363, 0, 0 },
180 { 1, 0, 0x40, 6, 0xC, 1, 0xC, 0xF, 4, 0, 579, 380, 0, 0 },
181 { 1, 0, 0x40, 6, 0xC, 1, 0xC, 0xF, 4, 0, 884, 243, 0, 0 },
182 { 1, 0, 0x40, 6, 0xC, 1, 0xC, 0xF, 4, 0, 913, 244, 0, 0 },
183 { 1, 0, 0x40, 6, 0xC, 1, 0xC, 0xF, 4, 0, 1020, 218, 0, 0 },
184 { 1, 0, 0x40, 6, 0x10, 1, 0x10, 0x12, 4, 0, 906, 526, 0, 0 },
185 { 1, 0x64, 0x40, 6, 0x1B, 0, 0, 0, 0, 0, 721, 200, 0, 0 },
186 { 1, 0x65, 0x40, 6, 0x1C, 0, 0, 0, 0, 0, 451, 367, 0, 0 },
187 { 1, 0, 0x40, 4, 8, 1, 8, 0xB, 4, 0, 448, 405, 445, 0 },
188 { 1, 0, 0x40, 4, 0xC, 1, 0xC, 0xF, 4, 0, 465, 438, 464, 0 },
189 { 1, 0, 0x40, 4, 0xC, 1, 0xC, 0xF, 4, 0, 737, 256, 281, 0 },
190 { 1, 0, 0x40, 4, 0x18, 0, 0, 0, 0, 0, 898, 552, 576, 0 },
191 { 1, 0, 0x40, 4, 0x19, 0, 0, 0, 0, 0, 727, 260, 280, 0 },
192 { 1, 0, 0x40, 4, 0x1A, 0, 0, 0, 0, 0, 447, 417, 444, 0 },
193 { 1, 0, 0x64, 4, 0x1D, 0, 0, 0, 0, 0, 784, 496, 560, 0 },
194 { 1, 0, 0x64, 4, 0x1E, 0, 0, 0, 0, 0, 768, 488, 552, 0 },
195 { 1, 0, 0x64, 4, 0x1F, 0, 0, 0, 0, 0, 752, 480, 544, 0 },
196 { 1, 0, 0x64, 4, 0x20, 0, 0, 0, 0, 0, 736, 472, 536, 0 },
197 { 1, 0, 0x64, 4, 0x21, 0, 0, 0, 0, 0, 720, 464, 528, 0 },
198 { 1, 0, 0x64, 4, 0x22, 0, 0, 0, 0, 0, 704, 456, 520, 0 },
199 { 1, 0, 0x64, 4, 0x23, 0, 0, 0, 0, 0, 672, 456, 496, 0 },
200 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
201};
203 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x298, 0x448, 0xF8, 1, 0, 0, 0 },
204 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x29E, 0xC8, 0x1A4, 5, 0, 0, 0 },
205 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x29E, 0x1B8, 0x204, 3, 0x64, 0, 0 },
206 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x29D, 0x208, 0x1AC, 3, 0x65, 0, 0 },
207 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x29F, 0x1A7, 0x254, 3, 0, 0, 0 },
208 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_CLIMB_DOWN, 6, 0x400, 0x120, 0, 0, 0, 0 },
209 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_CLIMB_UP, 6, 0x410, 0x188, 0, 0, 0, 0 },
210 { { { CODES_END, 0 }, { CODES_END, 0 } }, 0, 0, 0, 0, 0, 0, 0, 0 },
211};
212void (*stageFuncs[])(void) = {
214};
215AreaBattle area0Battle0 = { 0, 0, MUSIC(1, 0) };
216AreaBattle area0Battle1 = { 0, 0, MUSIC(1, 0) };
217AreaBattle area0Battle2 = { 0, 0, MUSIC(1, 0) };
218AreaBattle area0Battle3 = { 0, 0, MUSIC(1, 0) };
219AreaBattle area0Battle4 = { 0, 0, MUSIC(1, 0) };
220AreaBattle area0Battle5 = { 0, 0, MUSIC(1, 0) };
221AreaBattle area0Battle6 = { 0, 0, MUSIC(1, 0) };
222AreaBattle area0Battle7 = { 0, 0, MUSIC(1, 0) };
228AreaBattle area1Battle0 = { 0, 0, MUSIC(1, 0) };
229AreaBattle area1Battle1 = { 0, 0, MUSIC(1, 0) };
230AreaBattle area1Battle2 = { 0, 0, MUSIC(1, 0) };
231AreaBattle area1Battle3 = { 0, 0, MUSIC(1, 0) };
232AreaBattle area1Battle4 = { 0, 0, MUSIC(1, 0) };
233AreaBattle area1Battle5 = { 0, 0, MUSIC(1, 0) };
234AreaBattle area1Battle6 = { 0, 0, MUSIC(1, 0) };
235AreaBattle area1Battle7 = { 0, 0, MUSIC(1, 0) };
241AreaBattle area2Battle0 = { 0, 0, MUSIC(1, 0) };
242AreaBattle area2Battle1 = { 0, 0, MUSIC(1, 0) };
243AreaBattle area2Battle2 = { 0, 0, MUSIC(1, 0) };
244AreaBattle area2Battle3 = { 0, 0, MUSIC(1, 0) };
245AreaBattle area2Battle4 = { 0, 0, MUSIC(1, 0) };
246AreaBattle area2Battle5 = { 0, 0, MUSIC(1, 0) };
247AreaBattle area2Battle6 = { 0, 0, MUSIC(1, 0) };
248AreaBattle area2Battle7 = { 0, 0, MUSIC(1, 0) };
255AreaBattle area3Battle1 = { 0, 0, MUSIC(1, 0) };
256AreaBattle area3Battle2 = { 0, 0, MUSIC(1, 0) };
257AreaBattle area3Battle3 = { 0, 0, MUSIC(1, 0) };
258AreaBattle area3Battle4 = { 0, 0, MUSIC(1, 0) };
259AreaBattle area3Battle5 = { 0, 0, MUSIC(1, 0) };
260AreaBattle area3Battle6 = { 0, 0, MUSIC(1, 0) };
261AreaBattle area3Battle7 = { 0, 0, MUSIC(1, 0) };
#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 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 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 CARD_BATTLE(opponent, kind)
action: startCardBattle
Definition game_state.h:73
#define MUSIC_SEIRYU_CITY
SEIR_BGM: Seiryu City.
Definition sound.h:86
#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
#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_HAS_FIVE_EPIC_ITEMS
the European and Japanese versions: the player has the Muramasa, Super Nova, Punishment,...
Definition story.h:1678
#define FLAG_CARD_BATTLE_WON
set by updateModeFlags on the way back from a card battle: 1 if the player won it (FLAGS_00....
Definition story.h:166
#define FLAG_CARD_BATTLE_ENDED
set by updateModeFlags on the way back from a card battle; the talks that follow one test it and clea...
Definition story.h:169
#define FLAG_CHINRON_LEADER_FOUGHT
wstag956 (extra chapter): the Chinron Leader sees the 5 strongest Epic Items and starts a battle; set...
Definition story.h:965
Where an actor's frames go in VRAM: one of the records after the FieldImage (Actor....
Definition field_map.h:114
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 wstag956.c:141
AreaBattle area2Battle7
Definition wstag956.c:248
FieldActorEntry actor0
Definition wstag956.c:144
void(* stageFuncs[])(void)
The stage's functions (common/start_stage.inc.c calls the first): a StageFuncs in the stages with a t...
Definition wstag956.c:212
FieldActorEntry actor6
Definition wstag956.c:150
u16 actor7Talk1Conditions[]
Definition wstag956.c:85
FieldTalk actor2Talks[]
Definition wstag956.c:107
AreaBattle area2Battle6
Definition wstag956.c:247
u16 actor7Talk2Conditions[]
Definition wstag956.c:92
u16 actor5Talk0Conditions[]
Definition wstag956.c:71
FieldTalk actor5Talks[]
Definition wstag956.c:119
AreaBattle area1Battle6
Definition wstag956.c:234
u16 actor1Talk3Actions[]
Definition wstag956.c:70
FieldActorEntry actor5
Definition wstag956.c:149
u16 actor1Talk2Actions[]
Definition wstag956.c:68
u16 actor1Talk1Conditions[]
Definition wstag956.c:60
AreaBattle area0Battle7
Definition wstag956.c:222
FieldActorEntry actor2
Definition wstag956.c:146
#define STAGE_FILE_8
Definition wstag956.c:17
AreaBattle area3Battle4
Definition wstag956.c:258
AreaBattle area3Battle3
Definition wstag956.c:257
AreaBattle area0Battle1
Definition wstag956.c:216
AreaBattle area2Battle0
Definition wstag956.c:241
u16 actor7Talk0Conditions[]
Definition wstag956.c:83
FieldActorEntry * stageActors[]
Definition wstag956.c:153
u16 actor7Talk0Actions[]
Definition wstag956.c:84
AreaBattle area1Battle2
Definition wstag956.c:230
AreaBattle area3Battle0
Definition wstag956.c:254
u16 actor7Talk1Actions[]
Definition wstag956.c:86
AreaBattle area0Battle6
Definition wstag956.c:221
FieldTalk actor1Talks[]
Definition wstag956.c:100
AreaBattle area3Battle2
Definition wstag956.c:256
u16 actor1Talk0Conditions[]
Definition wstag956.c:58
FieldTalk actor0Talks[]
Definition wstag956.c:96
AreaBattle area3Battle1
Definition wstag956.c:255
AreaBattle area0Battle3
Definition wstag956.c:218
FieldTalk actor4Talks[]
Definition wstag956.c:115
FieldActorEntry actor4
Definition wstag956.c:148
AreaBattle area3Battle6
Definition wstag956.c:260
FieldActorEntry actor8
Definition wstag956.c:152
ActorImage stageImages[]
Definition wstag956.c:43
u16 actor1Talk1Actions[]
Definition wstag956.c:61
FieldTalk actor6Talks[]
Definition wstag956.c:125
void setupStage(void)
Sets the stage up: its map, actors and battles, playing SEIR_BGM.
Definition wstag956.c:24
AreaBattle area2Battle4
Definition wstag956.c:245
StageTile stageObjects[]
The tables and color setupStage gives FIELDSTG_state (FieldState)
Definition wstag956.c:165
FieldTalk actor3Talks[]
Definition wstag956.c:111
BattleList area3Battles
Definition wstag956.c:262
AreaBattle area3Battle5
Definition wstag956.c:259
AreaBattle area0Battle5
Definition wstag956.c:220
BattleList area1Battles
Definition wstag956.c:236
BattleList area2Battles
Definition wstag956.c:249
AreaBattle area1Battle4
Definition wstag956.c:232
u16 actor6Conditions[]
Definition wstag956.c:142
AreaBattle area2Battle2
Definition wstag956.c:243
AreaBattle area1Battle5
Definition wstag956.c:233
FieldActorEntry actor7
Definition wstag956.c:151
StageSlot stageSlots[]
Definition wstag956.c:202
AreaBattle area2Battle1
Definition wstag956.c:242
u16 actor1Talk0Actions[]
Definition wstag956.c:59
u16 actor5Talk1Conditions[]
Definition wstag956.c:72
AreaBattle area1Battle3
Definition wstag956.c:231
AreaBattle area1Battle0
Definition wstag956.c:228
u16 actor5Talk2Conditions[]
Definition wstag956.c:78
u16 actor1Talk2Conditions[]
Definition wstag956.c:67
FieldActorEntry actor1
Definition wstag956.c:145
AreaBattle area0Battle0
Definition wstag956.c:215
AreaBattle area0Battle2
Definition wstag956.c:217
#define STAGE_FILE
Definition wstag956.c:16
AreaBattle area2Battle5
Definition wstag956.c:246
AreaBattle area1Battle1
Definition wstag956.c:229
u16 actor7Conditions[]
Definition wstag956.c:143
AreaBattle area2Battle3
Definition wstag956.c:244
u16 actor7Talk3Conditions[]
Definition wstag956.c:94
FieldTalk actor7Talks[]
Definition wstag956.c:129
AreaBattle area0Battle4
Definition wstag956.c:219
#define STAGE_TEXT
Definition wstag956.c:15
FieldTalk actor8Talks[]
Definition wstag956.c:136
u16 actor7Talk3Actions[]
Definition wstag956.c:95
u16 actor5Talk1Actions[]
Definition wstag956.c:77
AreaBattle area3Battle7
Definition wstag956.c:261
BattleList area0Battles
Definition wstag956.c:223
AreaBattle area1Battle7
Definition wstag956.c:235
FieldActorEntry actor3
Definition wstag956.c:147
FieldBattles stageBattles[]
Definition wstag956.c:267
u16 actor1Talk3Conditions[]
Definition wstag956.c:69
u16 actor0Conditions[]
Definition wstag956.c:140
u16 actor7Talk2Actions[]
Definition wstag956.c:93