Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
wstag945.c
Go to the documentation of this file.
1/*
2 * WSTAG945: East Wire Forest, East Sector, in the extra chapter. The European
3 * version's: in its extra chapter (STORY_EXTRA), mode 657 starts it instead of
4 * WSTAG356.
5 */
6
7#include "common.h"
8#include "field/stage.h"
9
12
13#if VERSION_EU
14#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_09)
15#define STAGE_FILE 0x911
16#define STAGE_FILE_8 0x1BA
17#elif VERSION_JP
18#define STAGE_TEXT 0x89B
19#define STAGE_FILE 0x8E0
20#define STAGE_FILE_8 0x1AC
21#endif
22/* Sets the stage up: its map, actors and battles, playing the ambience ENV05_00 */
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, 0x170, 0x176, 0xC0, 0x76, 0x150, 0x1FF },
51 { 0x140, 0x100, 0x170, 0x19E, 0xC0, 0x9E, 0x160, 0x1FF },
52 { 0x140, 0x100, 0x170, 0x1C6, 0xC0, 0xC6, 0x170, 0x1FF },
53 { 0, 0, 0, 0, 0, 0, 0, 0 },
54 { 0x140, 0x100, 0x16C, 0x100, 0xB0, 0, 0x150, 0x1FE },
55};
83 { NULL, NULL, 0x31 },
84 { NULL, NULL, 0 },
85};
94 { NULL, NULL, 0x7E },
95 { NULL, NULL, 0 },
96};
98 { NULL, NULL, 0x2D },
99 { NULL, NULL, 0 },
100};
109 { NULL, NULL, 0x7F },
110 { NULL, NULL, 0 },
111};
113 { NULL, NULL, 0x80 },
114 { NULL, NULL, 0 },
115};
116u16 actor0Conditions[] = { ITEM(0, 0x192), 0, CODES_END };
117u16 actor1Conditions[] = { ITEM(0, 0x192), 1, CODES_END };
118u16 actor3Conditions[] = { ITEM(0, 0x192), 0, CODES_END };
119u16 actor4Conditions[] = { ITEM(0, 0x192), 1, CODES_END };
122FieldActorEntry actor2 = { NULL, actor2Talks, 0x33, 5, 768, 664, 3 };
125FieldActorEntry actor5 = { NULL, actor5Talks, 0x3F, 7, 319, 600, 1 };
126FieldActorEntry actor6 = { NULL, actor6Talks, 0x8B, 8, 731, 350, 7 };
128 &actor0,
129 &actor1,
130 &actor2,
131 &actor3,
132 &actor4,
133 &actor5,
134 &actor6,
135 NULL,
136};
138 { 1, 0, 0x40, 2, 0x32, 2, 0, 3, 6, 0, 68, 778, 0, 0 },
139 { 1, 0, 0x40, 2, 0x32, 2, 0, 3, 6, 0, 159, 733, 0, 0 },
140 { 1, 0, 0x80, 2, 4, 0, 0, 0, 0, 0, 13, 758, 0, 0 },
141 { 1, 0x64, 0x40, 6, 2, 0, 0, 0, 0, 0, 89, 730, 0, 0 },
142 { 1, 0, 0x72, 4, 0, 0, 0, 0, 0, 0, 0, 657, 795, 0 },
143 { 1, 0, 0x76, 4, 1, 0, 0, 0, 0, 0, 40, 677, 795, 0 },
144 { 1, 0, 0x60, 4, 3, 0, 0, 0, 0, 0, 290, 502, 595, 0 },
145 { 1, 0, 0x80, 4, 5, 0, 0, 0, 0, 0, 63, 783, 795, 0 },
146 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 103, 347, 347, 0 },
147 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 119, 387, 387, 0 },
148 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 156, 539, 539, 0 },
149 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 168, 339, 339, 0 },
150 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 169, 579, 579, 0 },
151 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 184, 298, 298, 0 },
152 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 185, 379, 379, 0 },
153 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 206, 603, 603, 0 },
154 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 232, 356, 356, 0 },
155 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 238, 215, 215, 0 },
156 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 249, 635, 635, 0 },
157 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 280, 667, 667, 0 },
158 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 296, 723, 723, 0 },
159 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 312, 219, 219, 0 },
160 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 360, 198, 198, 0 },
161 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 392, 323, 323, 0 },
162 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 400, 631, 631, 0 },
163 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 423, 219, 219, 0 },
164 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 424, 291, 291, 0 },
165 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 440, 603, 603, 0 },
166 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 472, 347, 347, 0 },
167 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 487, 307, 307, 0 },
168 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 552, 451, 451, 0 },
169 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 595, 479, 479, 0 },
170 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 597, 595, 595, 0 },
171 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 597, 691, 691, 0 },
172 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 600, 203, 203, 0 },
173 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 608, 823, 823, 0 },
174 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 623, 231, 231, 0 },
175 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 625, 723, 723, 0 },
176 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 642, 763, 763, 0 },
177 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 648, 803, 803, 0 },
178 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 680, 570, 570, 0 },
179 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 728, 603, 603, 0 },
180 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 760, 195, 195, 0 },
181 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 833, 659, 659, 0 },
182 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 840, 267, 267, 0 },
183 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 845, 571, 571, 0 },
184 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 871, 315, 315, 0 },
185 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
186};
188 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x290, 0x598, 0x260, 3, 0, 0, 0 },
189 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x296, 0x154, 0x6A, 7, 0, 0, 0 },
190 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x294, 0x80, 0x31C, 5, 0, 0, 0 },
191 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x292, 0x1B2, 0x156, 3, 0x64, 0, 0 },
192 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_DROP, 5, 0, 0, 0, 0, 0, 0 },
193 { { { CODES_END, 0 }, { CODES_END, 0 } }, 0, 0, 0, 0, 0, 0, 0, 0 },
194};
195void (*stageFuncs[])(void) = {
197};
211AreaBattle area1Battle0 = { 0, 0, MUSIC(1, 0) };
212AreaBattle area1Battle1 = { 0, 0, MUSIC(1, 0) };
213AreaBattle area1Battle2 = { 0, 0, MUSIC(1, 0) };
214AreaBattle area1Battle3 = { 0, 0, MUSIC(1, 0) };
215AreaBattle area1Battle4 = { 0, 0, MUSIC(1, 0) };
216AreaBattle area1Battle5 = { 0, 0, MUSIC(1, 0) };
217AreaBattle area1Battle6 = { 0, 0, MUSIC(1, 0) };
218AreaBattle area1Battle7 = { 0, 0, MUSIC(1, 0) };
224AreaBattle area2Battle0 = { 0, 0, MUSIC(1, 0) };
225AreaBattle area2Battle1 = { 0, 0, MUSIC(1, 0) };
226AreaBattle area2Battle2 = { 0, 0, MUSIC(1, 0) };
227AreaBattle area2Battle3 = { 0, 0, MUSIC(1, 0) };
228AreaBattle area2Battle4 = { 0, 0, MUSIC(1, 0) };
229AreaBattle area2Battle5 = { 0, 0, MUSIC(1, 0) };
230AreaBattle area2Battle6 = { 0, 0, MUSIC(1, 0) };
231AreaBattle area2Battle7 = { 0, 0, MUSIC(1, 0) };
237AreaBattle area3Battle0 = { 0, 0, MUSIC(1, 0) };
238AreaBattle area3Battle1 = { 0, 0, MUSIC(1, 0) };
239AreaBattle area3Battle2 = { 0, 0, MUSIC(1, 0) };
241AreaBattle area3Battle4 = { 0, 0, MUSIC(1, 0) };
242AreaBattle area3Battle5 = { 0, 0, MUSIC(1, 0) };
244AreaBattle 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 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
#define SLOT_DROP
Definition field_map.h:258
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 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_BATTLE
BATL0000: the maps' random battles (AreaBattle, nearly all of them)
Definition sound.h:76
#define MUSIC_WIRE_FOREST
ENV05_00: the Wire Forests and the Kicking Forest.
Definition sound.h:121
#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 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
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 wstag945.c:117
AreaBattle area2Battle7
Definition wstag945.c:231
FieldActorEntry actor0
Definition wstag945.c:120
void(* stageFuncs[])(void)
The stage's functions (common/start_stage.inc.c calls the first): a StageFuncs in the stages with a t...
Definition wstag945.c:195
FieldActorEntry actor6
Definition wstag945.c:126
FieldTalk actor2Talks[]
Definition wstag945.c:93
AreaBattle area2Battle6
Definition wstag945.c:230
u16 actor4Talk3Conditions[]
Definition wstag945.c:80
u16 actor4Talk1Actions[]
Definition wstag945.c:72
u16 actor4Talk2Actions[]
Definition wstag945.c:79
FieldTalk actor5Talks[]
Definition wstag945.c:108
AreaBattle area1Battle6
Definition wstag945.c:217
u16 actor1Talk3Actions[]
Definition wstag945.c:68
FieldActorEntry actor5
Definition wstag945.c:125
u16 actor1Talk2Actions[]
Definition wstag945.c:66
u16 actor1Talk1Conditions[]
Definition wstag945.c:58
AreaBattle area0Battle7
Definition wstag945.c:205
FieldActorEntry actor2
Definition wstag945.c:122
#define STAGE_FILE_8
Definition wstag945.c:16
AreaBattle area3Battle4
Definition wstag945.c:241
AreaBattle area3Battle3
Definition wstag945.c:240
AreaBattle area0Battle1
Definition wstag945.c:199
AreaBattle area2Battle0
Definition wstag945.c:224
FieldActorEntry * stageActors[]
Definition wstag945.c:127
AreaBattle area1Battle2
Definition wstag945.c:213
AreaBattle area3Battle0
Definition wstag945.c:237
u16 actor4Talk1Conditions[]
Definition wstag945.c:71
AreaBattle area0Battle6
Definition wstag945.c:204
FieldTalk actor1Talks[]
Definition wstag945.c:86
AreaBattle area3Battle2
Definition wstag945.c:239
u16 actor1Talk0Conditions[]
Definition wstag945.c:56
FieldTalk actor0Talks[]
Definition wstag945.c:82
AreaBattle area3Battle1
Definition wstag945.c:238
AreaBattle area0Battle3
Definition wstag945.c:201
FieldTalk actor4Talks[]
Definition wstag945.c:101
u16 actor4Conditions[]
Definition wstag945.c:119
FieldActorEntry actor4
Definition wstag945.c:124
u16 actor3Conditions[]
Definition wstag945.c:118
AreaBattle area3Battle6
Definition wstag945.c:243
ActorImage stageImages[]
Definition wstag945.c:43
u16 actor1Talk1Actions[]
Definition wstag945.c:59
FieldTalk actor6Talks[]
Definition wstag945.c:112
void setupStage(void)
Sets the stage up: its map, actors and battles, playing the ambience ENV05_00.
Definition wstag945.c:23
AreaBattle area2Battle4
Definition wstag945.c:228
u16 actor4Talk0Conditions[]
Definition wstag945.c:69
StageTile stageObjects[]
The tables and color setupStage gives FIELDSTG_state (FieldState)
Definition wstag945.c:137
FieldTalk actor3Talks[]
Definition wstag945.c:97
BattleList area3Battles
Definition wstag945.c:245
AreaBattle area3Battle5
Definition wstag945.c:242
AreaBattle area0Battle5
Definition wstag945.c:203
BattleList area1Battles
Definition wstag945.c:219
BattleList area2Battles
Definition wstag945.c:232
AreaBattle area1Battle4
Definition wstag945.c:215
AreaBattle area2Battle2
Definition wstag945.c:226
AreaBattle area1Battle5
Definition wstag945.c:216
StageSlot stageSlots[]
Definition wstag945.c:187
AreaBattle area2Battle1
Definition wstag945.c:225
u16 actor1Talk0Actions[]
Definition wstag945.c:57
AreaBattle area1Battle3
Definition wstag945.c:214
AreaBattle area1Battle0
Definition wstag945.c:211
u16 actor1Talk2Conditions[]
Definition wstag945.c:65
FieldActorEntry actor1
Definition wstag945.c:121
AreaBattle area0Battle0
Definition wstag945.c:198
AreaBattle area0Battle2
Definition wstag945.c:200
#define STAGE_FILE
Definition wstag945.c:15
AreaBattle area2Battle5
Definition wstag945.c:229
u16 actor4Talk0Actions[]
Definition wstag945.c:70
AreaBattle area1Battle1
Definition wstag945.c:212
AreaBattle area2Battle3
Definition wstag945.c:227
u16 actor4Talk3Actions[]
Definition wstag945.c:81
AreaBattle area0Battle4
Definition wstag945.c:202
#define STAGE_TEXT
Definition wstag945.c:14
AreaBattle area3Battle7
Definition wstag945.c:244
BattleList area0Battles
Definition wstag945.c:206
AreaBattle area1Battle7
Definition wstag945.c:218
u16 actor4Talk2Conditions[]
Definition wstag945.c:78
FieldActorEntry actor3
Definition wstag945.c:123
FieldBattles stageBattles[]
Definition wstag945.c:250
u16 actor1Talk3Conditions[]
Definition wstag945.c:67
u16 actor0Conditions[]
Definition wstag945.c:116