Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
wstag381.c
Go to the documentation of this file.
1/*
2 * WSTAG381: Divermon's Lake, East Sector. On the Amaterasu server; its Asuka
3 * server twin is WSTAG380.
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_04)
15#define STAGE_FILE 0x571
16#elif VERSION_EU
17#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_04)
18#define STAGE_FILE 0x581
19#endif
20/*
21 * Sets the stage up: its map, actors and battles, playing FIELDBGM; BGM_0029
22 * instead except at STORY_PRESIDENT_ARRESTED once flag 0x1A0A is set
23 */
48
62AreaBattle area1Battle0 = { 0, 0, MUSIC(1, 0) };
63AreaBattle area1Battle1 = { 0, 0, MUSIC(1, 0) };
64AreaBattle area1Battle2 = { 0, 0, MUSIC(1, 0) };
65AreaBattle area1Battle3 = { 0, 0, MUSIC(1, 0) };
66AreaBattle area1Battle4 = { 0, 0, MUSIC(1, 0) };
67AreaBattle area1Battle5 = { 0, 0, MUSIC(1, 0) };
68AreaBattle area1Battle6 = { 0, 0, MUSIC(1, 0) };
69AreaBattle area1Battle7 = { 0, 0, MUSIC(1, 0) };
75AreaBattle area2Battle0 = { 0, 0, MUSIC(1, 0) };
76AreaBattle area2Battle1 = { 0, 0, MUSIC(1, 0) };
77AreaBattle area2Battle2 = { 0, 0, MUSIC(1, 0) };
78AreaBattle area2Battle3 = { 0, 0, MUSIC(1, 0) };
79AreaBattle area2Battle4 = { 0, 0, MUSIC(1, 0) };
80AreaBattle area2Battle5 = { 0, 0, MUSIC(1, 0) };
81AreaBattle area2Battle6 = { 0, 0, MUSIC(1, 0) };
82AreaBattle area2Battle7 = { 0, 0, MUSIC(1, 0) };
88AreaBattle area3Battle0 = { 0, 0, MUSIC(1, 0) };
89AreaBattle area3Battle1 = { 0, 0, MUSIC(1, 0) };
90AreaBattle area3Battle2 = { 0, 0, MUSIC(1, 0) };
93AreaBattle area3Battle5 = { 0, 0, MUSIC(1, 0) };
105 { 0x200, 0x100, 0x21C, 0x1A6, 0x70, 0xA6, 0x230, 0x1FE },
106 { 0x200, 0x100, 0x200, 0x100, 0, 0, 0x220, 0x1FE },
107 { 0x200, 0x100, 0x216, 0x138, 0x58, 0x38, 0x200, 0x1FD },
108 { 0x200, 0x100, 0x208, 0x1BC, 0x20, 0xBC, 0x210, 0x1FD },
109 { 0x200, 0x100, 0x210, 0x1BC, 0x40, 0xBC, 0x220, 0x1FD },
110 { 0x200, 0x100, 0x200, 0x1BC, 0, 0xBC, 0x230, 0x1FD },
111 { 0x180, 0x100, 0x180, 0x100, 0x100, 0, 0x150, 0x1FF },
112 { 0x140, 0x100, 0x172, 0x19C, 0xC8, 0x9C, 0x160, 0x1FF },
113 { 0x140, 0x100, 0x140, 0x1C2, 0, 0xC2, 0x170, 0x1FF },
114};
122 { NULL, actor0Talk0Actions, 0x17C },
123 { NULL, NULL, 0 },
124};
127FieldActorEntry actor1 = { NULL, NULL, 0x4B, 5, 760, 357, 7 };
128FieldActorEntry actor2 = { NULL, NULL, 0x4C, 6, 670, 280, 1 };
130 &actor0,
131 &actor1,
132 &actor2,
133 NULL,
134};
136 { 1, 0, 0x40, 2, 4, 0, 4, 9, 8, 0, 39, 524, 0, 0 },
137 { 1, 0, 0x40, 2, 4, 0, 4, 9, 8, 0, 423, -13, 0, 0 },
138 { 1, 0, 0x40, 2, 4, 0, 4, 9, 8, 0, 759, 748, 0, 0 },
139 { 1, 0, 0x40, 2, 0, 0, 0, 0, 0, 0, 337, 409, 0, 0 },
140 { 1, 0, 0x74, 2, 2, 0, 0, 0, 0, 0, 655, 662, 0, 0 },
141 { 1, 0, 0x40, 6, 0x2C, 1, 0x2C, 0x3B, 0xA, 0, 420, 521, 0, 0 },
142 { 1, 0, 0x40, 6, 0x2C, 1, 0x2C, 0x3B, 0xA, 0, 646, 239, 0, 0 },
143 { 1, 0, 0x40, 6, 0x2C, 1, 0x2C, 0x3B, 0xA, 0, 727, 501, 0, 0 },
144 { 1, 0, 0x40, 6, 0x3C, 1, 0x3C, 0x46, 0xA, 0, 42, 777, 0, 0 },
145 { 1, 0, 0x40, 6, 0x3C, 1, 0x3C, 0x46, 0xA, 0, 351, 449, 0, 0 },
146 { 1, 0, 0x40, 6, 0x3C, 1, 0x3C, 0x46, 0xA, 0, 549, 447, 0, 0 },
147 { 1, 0, 0x40, 6, 0x3C, 1, 0x3C, 0x46, 0xA, 0, 631, 642, 0, 0 },
148 { 1, 0, 0x40, 6, 0x3C, 1, 0x3C, 0x46, 0xA, 0, 852, 433, 0, 0 },
149 { 1, 0, 0x40, 6, 0x3C, 1, 0x3C, 0x46, 0xA, 0, 1012, 373, 0, 0 },
150 { 1, 0, 0x74, 6, 3, 0, 0, 0, 0, 0, 768, 640, 0, 0 },
151 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 96, 687, 687, 0 },
152 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 103, 923, 923, 0 },
153 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 144, 663, 663, 0 },
154 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 160, 703, 703, 0 },
155 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 160, 943, 943, 0 },
156 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 192, 639, 639, 0 },
157 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 192, 911, 911, 0 },
158 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 208, 679, 679, 0 },
159 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 224, 952, 952, 0 },
160 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 256, 559, 559, 0 },
161 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 256, 655, 655, 0 },
162 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 272, 197, 197, 0 },
163 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 274, 262, 262, 0 },
164 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 288, 623, 623, 0 },
165 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 288, 937, 937, 0 },
166 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 304, 535, 535, 0 },
167 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 305, 230, 230, 0 },
168 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 320, 175, 175, 0 },
169 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 336, 599, 599, 0 },
170 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 352, 207, 207, 0 },
171 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 400, 583, 583, 0 },
172 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 480, 591, 591, 0 },
173 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 576, 127, 127, 0 },
174 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 624, 110, 110, 0 },
175 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 656, 135, 135, 0 },
176 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 720, 110, 110, 0 },
177 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 896, 831, 831, 0 },
178 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 944, 807, 807, 0 },
179 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 992, 783, 783, 0 },
180 { 1, 0xFF, 0x64, 4, 0x38, 0, 0, 0, 0, 0, 1115, 428, 428, 0 },
181 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
182};
184 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x291, 0x32A, 0x334, 3, 0, 0, 0 },
185 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x298, 0x9A, 0x74, 7, 0, 0, 0 },
186 { { { SPECIAL_STORY_SINCE_DE_SINCERITY, 1 }, { CODES_END, 0 } }, SLOT_WARP0, 0x2E2, 0xB0, 0x148, 7, 0, 0x12, 1 },
187 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_CLIMB_DOWN, 3, 0x1A1, 0x140, 0, 0, 0, 0 },
188 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_CLIMB_UP, 3, 0x1B0, 0x176, 0, 0, 0, 0 },
189 { { { ITEM(0, 5), 1 }, { CODES_END, 0 } }, SLOT_GAUGE, 0x38, 0x58, 0, 0, 0, 0, 0 },
190 { { { ITEM(0, 5), 1 }, { CODES_END, 0 } }, SLOT_GAUGE, 0x40, 0x40, 0, 0, 0, 0, 0 },
191 { { { ITEM(0, 5), 1 }, { CODES_END, 0 } }, SLOT_GAUGE, 0, 0xFFC0, 0, 0, 0, 0, 0 },
192 { { { ITEM(0, 5), 1 }, { CODES_END, 0 } }, SLOT_GAUGE, 0xFFB8, 0x28, 0, 0, 0, 0, 0 },
193 { { { ITEM(0, 5), 1 }, { CODES_END, 0 } }, SLOT_GAUGE, 0xFFC0, 0x38, 0, 0, 0, 0, 0 },
194 { { { ITEM(0, 5), 1 }, { CODES_END, 0 } }, SLOT_GAUGE, 0xFF90, 0xFFF8, 0, 0, 0, 0, 0 },
195 { { { ITEM(0, 5), 1 }, { CODES_END, 0 } }, SLOT_GAUGE, 0xFFB0, 0xFFF8, 0, 0, 0, 0, 0 },
196 { { { ITEM(0, 5), 1 }, { CODES_END, 0 } }, SLOT_GAUGE, 0x40, 0xFFE8, 0, 0, 0, 0, 0 },
197 { { { ITEM(0, 5), 1 }, { CODES_END, 0 } }, SLOT_GAUGE, 0xFFE0, 0x18, 0, 0, 0, 0, 0 },
198 { { { ITEM(0, 5), 1 }, { CODES_END, 0 } }, SLOT_GAUGE, 0xFFF0, 0x10, 0, 0, 0, 0, 0 },
199 { { { CODES_END, 0 }, { CODES_END, 0 } }, 0, 0, 0, 0, 0, 0, 0, 0 },
200};
201void (*stageFuncs[])(void) = {
203};
#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 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_GAUGE
the gauge game
Definition field_map.h:261
#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_WARP0
the same with effect and cutscene 0
Definition field_map.h:264
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 MUSIC_BATTLE
BATL0000: the maps' random battles (AreaBattle, nearly all of them)
Definition sound.h:76
#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_FIELD
FIELDBGM: Central Park, the Wire Forest Entrance, Shell Beach, Plug Cape.
Definition sound.h:83
#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_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 FLAG_DIVERMON_LAKE_KNIGHT_SHIELD_FOUND
wstag381: chest that gives the Knight Shield, "I got" text; its conditions test it 0
Definition story.h:260
#define SPECIAL_STORY_SINCE_DE_SINCERITY
GAME.progress is STORY_DE_SINCERITY or later (PROGRESS_RANGES[0xC], to 0x63)
Definition story.h:1899
#define SPECIAL_SHOW_ITEM_GET_ICON
an action: the player's icon plays its animation 3 with SOUND_ITEM_GET (FIELD_COMMAND_ICON3); the tal...
Definition story.h:1982
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
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 actor0Talk0Actions[]
Definition wstag381.c:115
AreaBattle area2Battle7
Definition wstag381.c:82
FieldActorEntry actor0
Definition wstag381.c:126
void(* stageFuncs[])(void)
The stage's functions (common/start_stage.inc.c calls the first): a StageFuncs in the stages with a t...
Definition wstag381.c:201
AreaBattle area2Battle6
Definition wstag381.c:81
AreaBattle area1Battle6
Definition wstag381.c:68
AreaBattle area0Battle7
Definition wstag381.c:56
FieldActorEntry actor2
Definition wstag381.c:128
const CVECTOR stageColor
the color the setup copies to FIELDSTG_state.spriteColor
Definition wstag381.c:12
AreaBattle area3Battle4
Definition wstag381.c:92
AreaBattle area3Battle3
Definition wstag381.c:91
AreaBattle area0Battle1
Definition wstag381.c:50
AreaBattle area2Battle0
Definition wstag381.c:75
FieldActorEntry * stageActors[]
Definition wstag381.c:129
AreaBattle area1Battle2
Definition wstag381.c:64
AreaBattle area3Battle0
Definition wstag381.c:88
AreaBattle area0Battle6
Definition wstag381.c:55
AreaBattle area3Battle2
Definition wstag381.c:90
FieldTalk actor0Talks[]
Definition wstag381.c:121
AreaBattle area3Battle1
Definition wstag381.c:89
AreaBattle area0Battle3
Definition wstag381.c:52
AreaBattle area3Battle6
Definition wstag381.c:94
ActorImage stageImages[]
Definition wstag381.c:104
void setupStage(void)
Sets the stage up: its map, actors and battles, playing FIELDBGM; BGM_0029 instead except at STORY_PR...
Definition wstag381.c:24
AreaBattle area2Battle4
Definition wstag381.c:79
StageTile stageObjects[]
The tables and color setupStage gives FIELDSTG_state (FieldState)
Definition wstag381.c:135
BattleList area3Battles
Definition wstag381.c:96
AreaBattle area3Battle5
Definition wstag381.c:93
AreaBattle area0Battle5
Definition wstag381.c:54
BattleList area1Battles
Definition wstag381.c:70
BattleList area2Battles
Definition wstag381.c:83
AreaBattle area1Battle4
Definition wstag381.c:66
AreaBattle area2Battle2
Definition wstag381.c:77
AreaBattle area1Battle5
Definition wstag381.c:67
StageSlot stageSlots[]
Definition wstag381.c:183
AreaBattle area2Battle1
Definition wstag381.c:76
AreaBattle area1Battle3
Definition wstag381.c:65
AreaBattle area1Battle0
Definition wstag381.c:62
FieldActorEntry actor1
Definition wstag381.c:127
AreaBattle area0Battle0
Definition wstag381.c:49
AreaBattle area0Battle2
Definition wstag381.c:51
#define STAGE_FILE
Definition wstag381.c:18
AreaBattle area2Battle5
Definition wstag381.c:80
AreaBattle area1Battle1
Definition wstag381.c:63
AreaBattle area2Battle3
Definition wstag381.c:78
AreaBattle area0Battle4
Definition wstag381.c:53
#define STAGE_TEXT
Definition wstag381.c:17
AreaBattle area3Battle7
Definition wstag381.c:95
BattleList area0Battles
Definition wstag381.c:57
AreaBattle area1Battle7
Definition wstag381.c:69
FieldBattles stageBattles[]
Definition wstag381.c:101
u16 actor0Conditions[]
Definition wstag381.c:125