Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
wstag656.c
Go to the documentation of this file.
1/*
2 * WSTAG656: Mirage Room, West Sector. On the Amaterasu server; its Asuka
3 * server twin is WSTAG655.
4 */
5
6#include "common.h"
7#include "field/stage.h"
8
11
12#if VERSION_US || VERSION_JP
13#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_07)
14#define EVENT_TEXT_FILE (TEXT_EVENTS_600 - 1)
15#define STAGE_FILE 0x617
16#elif VERSION_EU
17#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_07)
18#define EVENT_TEXT_FILE (TEXT_EVENTS_600 - 1)
19#define STAGE_FILE 0x627
20#endif
21/* Sets the stage up: its map, actors, battles and events, playing BGM_0020 */
41
43 SCRIPT_WALK(2, 0x184, 0x74, 5),
44 SCRIPT_PLACE(0x25, 0x1A4, 0x67),
45 SCRIPT_POSE(0x25, 1, 1),
48 SCRIPT_WAIT(0x1E),
49 SCRIPT_TALK(0, 1, 0x25, 2),
51 SCRIPT_WAIT(0x1E),
52 SCRIPT_TALK(0, 2, 2, 1),
53 SCRIPT_POSE(2, 7, 5),
55 SCRIPT_POSE(2, 1, 5),
56 SCRIPT_WAIT(0x1E),
57 SCRIPT_TALK(0, 3, 0x25, 2),
59 SCRIPT_WAIT(0x1E),
60 SCRIPT_TALK(0, 4, 2, 1),
61 SCRIPT_POSE(2, 7, 5),
63 SCRIPT_POSE(2, 1, 5),
64 SCRIPT_WAIT(0x1E),
65 SCRIPT_TALK(0, 5, 0x25, 2),
67 SCRIPT_WAIT(0x1E),
68 SCRIPT_TALK(0, 6, 2, 1),
69 SCRIPT_POSE(2, 7, 5),
71 SCRIPT_POSE(2, 1, 5),
72 SCRIPT_WAIT(0x1E),
73 SCRIPT_TALK(0, 7, 0x25, 2),
75 SCRIPT_WAIT(0x1E),
76 SCRIPT_TALK(0, 8, 2, 1),
77 SCRIPT_POSE(2, 7, 5),
79 SCRIPT_POSE(2, 1, 5),
80 SCRIPT_WAIT(0x1E),
81 SCRIPT_TALK(0, 9, 0x25, 2),
83 SCRIPT_WAIT(0x1E),
84 SCRIPT_TALK(0, 0xA, 2, 1),
86 SCRIPT_WAIT(0x1E),
88};
89AreaBattle area0Battle0 = { 0, 0, MUSIC(1, 0) };
90AreaBattle area0Battle1 = { 0, 0, MUSIC(1, 0) };
91AreaBattle area0Battle2 = { 0, 0, MUSIC(1, 0) };
92AreaBattle area0Battle3 = { 0, 0, MUSIC(1, 0) };
93AreaBattle area0Battle4 = { 0, 0, MUSIC(1, 0) };
94AreaBattle area0Battle5 = { 0, 0, MUSIC(1, 0) };
95AreaBattle area0Battle6 = { 0, 0, MUSIC(1, 0) };
96AreaBattle area0Battle7 = { 0, 0, MUSIC(1, 0) };
102AreaBattle area1Battle0 = { 0, 0, MUSIC(1, 0) };
103AreaBattle area1Battle1 = { 0, 0, MUSIC(1, 0) };
104AreaBattle area1Battle2 = { 0, 0, MUSIC(1, 0) };
105AreaBattle area1Battle3 = { 0, 0, MUSIC(1, 0) };
106AreaBattle area1Battle4 = { 0, 0, MUSIC(1, 0) };
107AreaBattle area1Battle5 = { 0, 0, MUSIC(1, 0) };
108AreaBattle area1Battle6 = { 0, 0, MUSIC(1, 0) };
109AreaBattle area1Battle7 = { 0, 0, MUSIC(1, 0) };
115AreaBattle area2Battle0 = { 0, 0, MUSIC(1, 0) };
116AreaBattle area2Battle1 = { 0, 0, MUSIC(1, 0) };
117AreaBattle area2Battle2 = { 0, 0, MUSIC(1, 0) };
118AreaBattle area2Battle3 = { 0, 0, MUSIC(1, 0) };
119AreaBattle area2Battle4 = { 0, 0, MUSIC(1, 0) };
120AreaBattle area2Battle5 = { 0, 0, MUSIC(1, 0) };
121AreaBattle area2Battle6 = { 0, 0, MUSIC(1, 0) };
122AreaBattle area2Battle7 = { 0, 0, MUSIC(1, 0) };
130AreaBattle area3Battle2 = { 0, 0, MUSIC(1, 0) };
131AreaBattle area3Battle3 = { 0, 0, MUSIC(1, 0) };
132AreaBattle area3Battle4 = { 0, 0, MUSIC(1, 0) };
133AreaBattle area3Battle5 = { 0, 0, MUSIC(1, 0) };
134AreaBattle area3Battle6 = { 0, 0, MUSIC(1, 0) };
135AreaBattle area3Battle7 = { 0, 0, MUSIC(1, 0) };
145 { 0x200, 0x100, 0x21C, 0x1A6, 0x70, 0xA6, 0x230, 0x1FE },
146 { 0x200, 0x100, 0x200, 0x100, 0, 0, 0x220, 0x1FE },
147 { 0x200, 0x100, 0x216, 0x138, 0x58, 0x38, 0x200, 0x1FD },
148 { 0x200, 0x100, 0x208, 0x1BC, 0x20, 0xBC, 0x210, 0x1FD },
149 { 0x200, 0x100, 0x210, 0x1BC, 0x40, 0xBC, 0x220, 0x1FD },
150 { 0x200, 0x100, 0x200, 0x1BC, 0, 0xBC, 0x230, 0x1FD },
151 { 0x140, 0x100, 0x174, 0x100, 0xD0, 0, 0x150, 0x1FF },
152 { 0x140, 0x100, 0x16C, 0x100, 0xB0, 0, 0x160, 0x1FF },
153 { 0x140, 0x100, 0x174, 0x168, 0xD0, 0x68, 0x170, 0x1FF },
154 { 0x140, 0x100, 0x174, 0x128, 0xD0, 0x28, 0x150, 0x1FE },
155 { 0x140, 0x100, 0x16C, 0x130, 0xB0, 0x30, 0x160, 0x1FE },
156 { 0x140, 0x100, 0x174, 0x148, 0xD0, 0x48, 0x170, 0x1FE },
157 { 0x140, 0x100, 0x16C, 0x150, 0xB0, 0x50, 0x150, 0x1FD },
158};
163 { NULL, NULL, 0x157 },
164 { NULL, NULL, 0 },
165};
168 { actor1Talk1Conditions, NULL, 0x323 },
169 { NULL, NULL, 0 },
170};
172 { NULL, NULL, 0x154 },
173 { NULL, NULL, 0 },
174};
176 { NULL, NULL, 0x153 },
177 { NULL, NULL, 0 },
178};
180 { NULL, NULL, 0x159 },
181 { NULL, NULL, 0 },
182};
184 { NULL, NULL, 0x158 },
185 { NULL, NULL, 0 },
186};
188 { NULL, NULL, 0x158 },
189 { NULL, NULL, 0 },
190};
192 { NULL, NULL, 0x158 },
193 { NULL, NULL, 0 },
194};
196 { NULL, NULL, 0x15B },
197 { NULL, NULL, 0 },
198};
200 { NULL, NULL, 0x156 },
201 { NULL, NULL, 0 },
202};
230FieldActorEntry actor9 = { actor9Conditions, actor9Talks, 0x9F, 0xA, 305, 283, 1 };
232 &actor0,
233 &actor1,
234 &actor2,
235 &actor3,
236 &actor4,
237 &actor5,
238 &actor6,
239 &actor7,
240 &actor8,
241 &actor9,
242 NULL,
243};
245 { 1, 0, 0xFF, 6, 0x32, 2, 0, 2, 0xC, 0, 318, 266, 0, 0 },
246 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
247};
249 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x2C4, 0x126, 0x96, 1, 0, 0, 0 },
250 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_CLIMB_DOWN, 6, 0xEE, 0x138, 0, 0, 0, 0 },
251 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_CLIMB_UP, 6, 0xDC, 0x1A0, 0, 0, 0, 0 },
252 { { { CODES_END, 0 }, { CODES_END, 0 } }, 0, 0, 0, 0, 0, 0, 0, 0 },
253};
254void (*stageFuncs[])(void) = {
256};
258 { 736, script736, EVENT_TEXT(0x1C), NULL, NULL },
259 { -1, NULL, 0, NULL, NULL },
260};
#define NULL
Definition common.h:17
signed short s16
Definition common.h:9
unsigned short u16
Definition common.h:10
The stage overlays (AAA/PRO/WSTAG###.PRO), loaded at 0x800A4CA4 on top of FIELDSTG.
#define EVENT_TEXT(n)
An entry of the stage's events' text file, for FieldEvent.text.
Definition stage.h:732
#define SLOT_CLIMB_UP
Definition field_map.h:256
#define SCRIPT_WAIT_WALK(id)
until the character gets to its goal
Definition field_map.h:168
#define FIELD_COMMAND_HALT_PARTNERS
The field commands, which an event script hands FIELD_TASK_COMMANDS as the first argument of a pose c...
Definition field_map.h:41
#define SCRIPT_END
The commands of an event script (FieldEvent.script), as FIELDSTG_runEvent reads them: a halfword kind...
Definition field_map.h:156
#define SCRIPT_COMMAND(id, command, arg)
the same word for a script command's id: FIELDSTG_setEventPose creates its task if none runs and hand...
Definition field_map.h:161
#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 SCRIPT_WALK(id, x, y, dir)
Actor.setGoal: walks to (x, y), then faces dir.
Definition field_map.h:162
#define SCRIPT_WAIT_BOX
until box 0 closes
Definition field_map.h:167
#define SLOT_EXIT
The kinds of StageSlot (type).
Definition field_map.h:255
#define SCRIPT_POSE(id, set, dir)
Actor.setPose: its animation set, facing dir.
Definition field_map.h:158
#define FIELD_MAP_TRIGGERS
a cell's value: a direction (3 bits) and a StageSlot (5)
Definition field_map.h:88
#define SCRIPT_WAIT(frames)
Definition field_map.h:166
#define FIELD_TASK_COMMANDS
script command 813 (FIELDSTG_startCommandTask): the field commands
Definition field_map.h:33
#define SCRIPT_PLACE(id, x, y)
puts a character at (x, y)
Definition field_map.h:157
#define SCRIPT_TALK(box, entry, id, kind)
box of the event's boxes shows the event text's entry: a talk box at the corner kind next to the char...
Definition field_map.h:165
FieldMap FIELDSTG_map
Definition fieldstg.c:3660
FieldState FIELDSTG_state
Definition fieldstg.c:2641
#define START_EVENT(index)
action: FIELDSTG_startListedEvent
Definition game_state.h:81
#define CODES_END
Definition game_state.h:83
#define PROGRESS(n)
GAME.progress is n.
Definition game_state.h:69
#define MUSIC_MIRAGE_HALL
BGM_0020: the Mirage Hall and Mirage Room.
Definition sound.h:96
#define MUSIC_BATTLE
BATL0000: the maps' random battles (AreaBattle, nearly all of them)
Definition sound.h:76
#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_BATTLE_1
BATL1000: the Digimon Arena's battles and some event battles (AreaBattle)
Definition sound.h:77
#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
#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_AMATERASU_BRIDGE_TO_PRESIDENT_ARRESTED
GAME.progress is from STORY_AMATERASU_BRIDGE to STORY_PRESIDENT_ARRESTED (PROGRESS_RANGES[0x14])
Definition story.h:1923
#define FLAG_RESISTANCE_CHUCK_MET
wstag656 Mirage Room: Leader Chuck recognises the player and an event starts; Lisa (Master Room) then...
Definition story.h:1133
#define SPECIAL_STORY_JUNGLE_SOUND_TO_BLACK_ID_PASS
GAME.progress is from STORY_JUNGLE_SOUND to STORY_BLACK_ID_PASS (PROGRESS_RANGES[0x15])
Definition story.h:1926
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
An event of the table FieldState.events, up to the first id -1, which FIELDSTG_startEvent starts.
Definition field_map.h:141
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
FieldEvent * events
up to the first id -1
Definition field_map.h:451
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 wstag656.c:208
AreaBattle area2Battle7
Definition wstag656.c:122
FieldActorEntry actor0
Definition wstag656.c:221
void(* stageFuncs[])(void)
The stage's functions (common/start_stage.inc.c calls the first): a StageFuncs in the stages with a t...
Definition wstag656.c:254
FieldActorEntry actor6
Definition wstag656.c:227
FieldTalk actor2Talks[]
Definition wstag656.c:171
AreaBattle area2Battle6
Definition wstag656.c:121
s16 script736[]
Definition wstag656.c:42
FieldTalk actor5Talks[]
Definition wstag656.c:183
AreaBattle area1Battle6
Definition wstag656.c:108
FieldActorEntry actor5
Definition wstag656.c:226
u16 actor1Talk1Conditions[]
Definition wstag656.c:161
AreaBattle area0Battle7
Definition wstag656.c:96
FieldActorEntry actor2
Definition wstag656.c:223
AreaBattle area3Battle4
Definition wstag656.c:132
AreaBattle area3Battle3
Definition wstag656.c:131
AreaBattle area0Battle1
Definition wstag656.c:90
AreaBattle area2Battle0
Definition wstag656.c:115
u16 actor9Conditions[]
Definition wstag656.c:220
FieldActorEntry * stageActors[]
Definition wstag656.c:231
AreaBattle area1Battle2
Definition wstag656.c:104
AreaBattle area3Battle0
Definition wstag656.c:128
AreaBattle area0Battle6
Definition wstag656.c:95
FieldTalk actor1Talks[]
Definition wstag656.c:166
AreaBattle area3Battle2
Definition wstag656.c:130
u16 actor1Talk0Conditions[]
Definition wstag656.c:159
FieldTalk actor0Talks[]
Definition wstag656.c:162
AreaBattle area3Battle1
Definition wstag656.c:129
AreaBattle area0Battle3
Definition wstag656.c:92
FieldTalk actor4Talks[]
Definition wstag656.c:179
u16 actor4Conditions[]
Definition wstag656.c:211
FieldActorEntry actor4
Definition wstag656.c:225
u16 actor3Conditions[]
Definition wstag656.c:210
AreaBattle area3Battle6
Definition wstag656.c:134
FieldActorEntry actor8
Definition wstag656.c:229
ActorImage stageImages[]
Definition wstag656.c:144
FieldTalk actor6Talks[]
Definition wstag656.c:187
void setupStage(void)
Sets the stage up: its map, actors, battles and events, playing BGM_0020.
Definition wstag656.c:22
AreaBattle area2Battle4
Definition wstag656.c:119
StageTile stageObjects[]
The tables and color setupStage gives FIELDSTG_state (FieldState)
Definition wstag656.c:244
FieldActorEntry actor9
Definition wstag656.c:230
u16 actor8Conditions[]
Definition wstag656.c:219
u16 actor5Conditions[]
Definition wstag656.c:212
FieldTalk actor3Talks[]
Definition wstag656.c:175
FieldTalk actor9Talks[]
Definition wstag656.c:199
BattleList area3Battles
Definition wstag656.c:136
AreaBattle area3Battle5
Definition wstag656.c:133
AreaBattle area0Battle5
Definition wstag656.c:94
BattleList area1Battles
Definition wstag656.c:110
BattleList area2Battles
Definition wstag656.c:123
AreaBattle area1Battle4
Definition wstag656.c:106
u16 actor6Conditions[]
Definition wstag656.c:217
AreaBattle area2Battle2
Definition wstag656.c:117
AreaBattle area1Battle5
Definition wstag656.c:107
FieldActorEntry actor7
Definition wstag656.c:228
StageSlot stageSlots[]
Definition wstag656.c:248
AreaBattle area2Battle1
Definition wstag656.c:116
u16 actor1Talk0Actions[]
Definition wstag656.c:160
AreaBattle area1Battle3
Definition wstag656.c:105
AreaBattle area1Battle0
Definition wstag656.c:102
FieldActorEntry actor1
Definition wstag656.c:222
AreaBattle area0Battle0
Definition wstag656.c:89
AreaBattle area0Battle2
Definition wstag656.c:91
#define STAGE_FILE
Definition wstag656.c:19
AreaBattle area2Battle5
Definition wstag656.c:120
AreaBattle area1Battle1
Definition wstag656.c:103
u16 actor7Conditions[]
Definition wstag656.c:218
AreaBattle area2Battle3
Definition wstag656.c:118
u16 actor2Conditions[]
Definition wstag656.c:209
FieldTalk actor7Talks[]
Definition wstag656.c:191
AreaBattle area0Battle4
Definition wstag656.c:93
#define STAGE_TEXT
Definition wstag656.c:17
FieldTalk actor8Talks[]
Definition wstag656.c:195
AreaBattle area3Battle7
Definition wstag656.c:135
BattleList area0Battles
Definition wstag656.c:97
AreaBattle area1Battle7
Definition wstag656.c:109
FieldActorEntry actor3
Definition wstag656.c:224
FieldBattles stageBattles[]
Definition wstag656.c:141
FieldEvent stageEvents[]
Definition wstag656.c:257
u16 actor0Conditions[]
Definition wstag656.c:203