Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
wstag561.c
Go to the documentation of this file.
1/*
2 * WSTAG561: Pelche Oasis, West Sector. On the Amaterasu server; its Asuka
3 * server twin is WSTAG560.
4 */
5
6#include "common.h"
7#include "field/stage.h"
8
11
12/*
13 * After event 1463, with Guardromon: applies 0x7C1A, an action that does
14 * nothing (applyAction's mode changes 0x7C are only 0 and 1)
15 */
16void endEvent1463(void) {
17 FLAGS_00.applyAction(0x7C1A, 1);
18}
19
20#if VERSION_US || VERSION_JP
21#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_07)
22#define EVENT_TEXT_FILE (TEXT_EVENTS_500 - 1)
23#define STAGE_FILE 0x5C6
24#elif VERSION_EU
25#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_07)
26#define EVENT_TEXT_FILE (TEXT_EVENTS_500 - 1)
27#define STAGE_FILE 0x5D6
28#endif
29/* Sets the stage up: its map, actors, battles and events, playing the ambience ENV_0025 */
50
52 SCRIPT_WALK(2, 0x117, 0x133, 3),
53 SCRIPT_PLACE(0x15, 0xF7, 0x123),
54 SCRIPT_POSE(0x15, 1, 7),
57 SCRIPT_POSE(2, 1, 3),
58 SCRIPT_WAIT(0x24),
59 SCRIPT_TALK(0, 1, 0x15, 0),
61 SCRIPT_WAIT(0x1E),
62 SCRIPT_POSE(0x15, 0x36, 7),
64 SCRIPT_WAIT_ANIM(0x15),
65 SCRIPT_POSE(0x15, 0x37, 7),
66 SCRIPT_WAIT(0x5A),
67 SCRIPT_LEAVE(0xC18, 0, 0, 0),
69};
96AreaBattle area2Battle0 = { 0, 0, MUSIC(1, 0) };
97AreaBattle area2Battle1 = { 0, 0, MUSIC(1, 0) };
98AreaBattle area2Battle2 = { 0, 0, MUSIC(1, 0) };
99AreaBattle area2Battle3 = { 0, 0, MUSIC(1, 0) };
100AreaBattle area2Battle4 = { 0, 0, MUSIC(1, 0) };
101AreaBattle area2Battle5 = { 0, 0, MUSIC(1, 0) };
102AreaBattle area2Battle6 = { 0, 0, MUSIC(1, 0) };
103AreaBattle area2Battle7 = { 0, 0, MUSIC(1, 0) };
109AreaBattle area3Battle0 = { 0, 0, MUSIC(1, 0) };
110AreaBattle area3Battle1 = { 0, 0, MUSIC(1, 0) };
111AreaBattle area3Battle2 = { 0, 0, MUSIC(1, 0) };
112AreaBattle area3Battle3 = { 0, 0, MUSIC(1, 0) };
114AreaBattle area3Battle5 = { 0, 0, MUSIC(1, 0) };
115AreaBattle area3Battle6 = { 0, 0, MUSIC(1, 0) };
126 { 0x200, 0x100, 0x21C, 0x1A6, 0x70, 0xA6, 0x230, 0x1FE },
127 { 0x200, 0x100, 0x200, 0x100, 0, 0, 0x220, 0x1FE },
128 { 0x200, 0x100, 0x216, 0x138, 0x58, 0x38, 0x200, 0x1FD },
129 { 0x200, 0x100, 0x208, 0x1BC, 0x20, 0xBC, 0x210, 0x1FD },
130 { 0x200, 0x100, 0x210, 0x1BC, 0x40, 0xBC, 0x220, 0x1FD },
131 { 0x200, 0x100, 0x200, 0x1BC, 0, 0xBC, 0x230, 0x1FD },
132 { 0x140, 0x100, 0x176, 0x175, 0xD8, 0x75, 0x160, 0x1FF },
133 { 0x180, 0x100, 0x1A0, 0x1BA, 0x180, 0xBA, 0x170, 0x1FF },
134 { 0x140, 0x100, 0x176, 0x195, 0xD8, 0x95, 0x150, 0x1FE },
135};
145 { NULL, actor0Talk0Actions, 0x2D7 },
146 { NULL, NULL, 0 },
147};
149 { NULL, actor1Talk0Actions, 0x2CF },
150 { NULL, NULL, 0 },
151};
153 { NULL, actor2Talk0Actions, 0x187 },
154 { NULL, NULL, 0 },
155};
157FieldActorEntry actor0 = { NULL, actor0Talks, 0x14, 4, 450, 368, 1 };
158FieldActorEntry actor1 = { NULL, actor1Talks, 0x15, 5, 247, 291, 7 };
161 &actor0,
162 &actor1,
163 &actor2,
164 NULL,
165};
167 { 1, 0, 0x40, 2, 1, 0, 0, 0, 0, 0, 407, 226, 0, 0 },
168 { 1, 0, 0x64, 2, 1, 0, 0, 0, 0, 0, 551, 516, 0, 0 },
169 { 1, 0, 0x40, 2, 6, 0, 0, 0, 0, 0, 211, 335, 0, 0 },
170 { 1, 0, 0x80, 2, 2, 0, 0, 0, 0, 0, 0, 384, 0, 0 },
171 { 1, 0, 0x80, 2, 3, 0, 0, 0, 0, 0, 384, 384, 0, 0 },
172 { 1, 0, 0x70, 2, 4, 0, 0, 0, 0, 0, 20, 512, 0, 0 },
173 { 1, 0, 0x78, 2, 5, 0, 0, 0, 0, 0, 264, 523, 0, 0 },
174 { 1, 0, 0x40, 6, 0x47, 1, 0x47, 0x49, 6, 0, 204, 396, 0, 0 },
175 { 1, 0, 0x40, 6, 0x4A, 1, 0x4A, 0x4D, 6, 0, 213, 360, 0, 0 },
176 { 1, 0, 0x68, 6, 0x4E, 2, 0, 2, 6, 0, 181, 376, 0, 0 },
177 { 1, 0, 0x40, 6, 0x2C, 1, 0x2C, 0x3B, 0xA, 0, 153, 444, 0, 0 },
178 { 1, 0, 0x40, 6, 0x3C, 1, 0x3C, 0x46, 0xA, 0, 277, 512, 0, 0 },
179 { 1, 0, 0x40, 6, 0x3C, 1, 0x3C, 0x46, 0xA, 0, 322, 397, 0, 0 },
180 { 1, 0, 0x40, 4, 0, 0, 0, 0, 0, 0, 584, 137, 169, 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, 0x2B2, 0x610, 0x240, 1, 0, 0, 0 },
185 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x2B4, 0x80, 0x178, 7, 0, 0, 0 },
186 { { { SPECIAL_STORY_SINCE_DE_SINCERITY, 1 }, { CODES_END, 0 } }, SLOT_WARP0, 0x2E2, 0xB0, 0x148, 7, 0, 0xF, 1 },
187 { { { ITEM(0, 5), 1 }, { CODES_END, 0 } }, SLOT_GAUGE, 0xFFC8, 0x3C, 0, 0, 0, 0, 0 },
188 { { { ITEM(0, 5), 1 }, { CODES_END, 0 } }, SLOT_GAUGE, 0xFFD0, 0xFFF8, 0, 0, 0, 0, 0 },
189 { { { ITEM(0, 5), 1 }, { CODES_END, 0 } }, SLOT_GAUGE, 0x40, 0xFFF0, 0, 0, 0, 0, 0 },
190 { { { SPECIAL_STORY_SINCE_DE_SINCERITY, 1 }, { CODES_END, 0 } }, SLOT_WARP0, 0x2E2, 0xB0, 0x148, 7, 0, 0xF, 1 },
191 { { { CODES_END, 0 }, { CODES_END, 0 } }, 0, 0, 0, 0, 0, 0, 0, 0 },
192};
193void (*stageFuncs[])(void) = {
195};
197 { 1463, script1463, EVENT_TEXT(0x27), NULL, endEvent1463 },
198 { -1, NULL, 0, NULL, NULL },
199};
#define NULL
Definition common.h:17
signed short s16
Definition common.h:9
unsigned short u16
Definition common.h:10
GameFlags FLAGS_00
The flag bitset FLAGS_00 and the event functions.
Definition events.c:701
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 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_LEAVE(mode, x, y, dir)
FIELDSTG_leaveField; ends the event.
Definition field_map.h:170
#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_COMMAND_PLAY_SAVEDEMO
Definition field_map.h:65
#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_GAUGE
the gauge game
Definition field_map.h:261
#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 FIELD_MAP_AREAS
a cell's value: its battle area (FieldBattles), or 0
Definition field_map.h:87
#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 SCRIPT_WAIT_ANIM(id)
until its animation ends
Definition field_map.h:169
#define FIELD_TASK_COMMANDS
script command 813 (FIELDSTG_startCommandTask): the field commands
Definition field_map.h:33
#define SLOT_WARP0
the same with effect and cutscene 0
Definition field_map.h:264
#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 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_PELCHE_OASIS
ENV_0025: the Pelche Oasis.
Definition sound.h:141
#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_AMATERASU_PELCHE_OASIS_CHARISMA_CHIP_FOUND
wstag561: chest that gives the Charisma Chip, "I got" text; its conditions test it 0
Definition story.h:412
#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
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
void(* applyAction)(s32 code, s32 value)
Definition game_state.h:52
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 wstag561.c:136
AreaBattle area2Battle7
Definition wstag561.c:103
FieldActorEntry actor0
Definition wstag561.c:157
void(* stageFuncs[])(void)
The stage's functions (common/start_stage.inc.c calls the first): a StageFuncs in the stages with a t...
Definition wstag561.c:193
FieldTalk actor2Talks[]
Definition wstag561.c:152
AreaBattle area2Battle6
Definition wstag561.c:102
AreaBattle area1Battle6
Definition wstag561.c:89
AreaBattle area0Battle7
Definition wstag561.c:77
FieldActorEntry actor2
Definition wstag561.c:159
void endEvent1463(void)
After event 1463, with Guardromon: applies 0x7C1A, an action that does nothing (applyAction's mode ch...
Definition wstag561.c:16
AreaBattle area3Battle4
Definition wstag561.c:113
AreaBattle area3Battle3
Definition wstag561.c:112
AreaBattle area0Battle1
Definition wstag561.c:71
s16 script1463[]
Definition wstag561.c:51
AreaBattle area2Battle0
Definition wstag561.c:96
FieldActorEntry * stageActors[]
Definition wstag561.c:160
AreaBattle area1Battle2
Definition wstag561.c:85
AreaBattle area3Battle0
Definition wstag561.c:109
AreaBattle area0Battle6
Definition wstag561.c:76
FieldTalk actor1Talks[]
Definition wstag561.c:148
AreaBattle area3Battle2
Definition wstag561.c:111
FieldTalk actor0Talks[]
Definition wstag561.c:144
AreaBattle area3Battle1
Definition wstag561.c:110
AreaBattle area0Battle3
Definition wstag561.c:73
u16 actor2Talk0Actions[]
Definition wstag561.c:138
AreaBattle area3Battle6
Definition wstag561.c:115
ActorImage stageImages[]
Definition wstag561.c:125
void setupStage(void)
Sets the stage up: its map, actors, battles and events, playing the ambience ENV_0025.
Definition wstag561.c:30
AreaBattle area2Battle4
Definition wstag561.c:100
StageTile stageObjects[]
The tables and color setupStage gives FIELDSTG_state (FieldState)
Definition wstag561.c:166
BattleList area3Battles
Definition wstag561.c:117
AreaBattle area3Battle5
Definition wstag561.c:114
AreaBattle area0Battle5
Definition wstag561.c:75
BattleList area1Battles
Definition wstag561.c:91
BattleList area2Battles
Definition wstag561.c:104
AreaBattle area1Battle4
Definition wstag561.c:87
AreaBattle area2Battle2
Definition wstag561.c:98
AreaBattle area1Battle5
Definition wstag561.c:88
StageSlot stageSlots[]
Definition wstag561.c:183
AreaBattle area2Battle1
Definition wstag561.c:97
u16 actor1Talk0Actions[]
Definition wstag561.c:137
AreaBattle area1Battle3
Definition wstag561.c:86
AreaBattle area1Battle0
Definition wstag561.c:83
FieldActorEntry actor1
Definition wstag561.c:158
AreaBattle area0Battle0
Definition wstag561.c:70
AreaBattle area0Battle2
Definition wstag561.c:72
#define STAGE_FILE
Definition wstag561.c:27
AreaBattle area2Battle5
Definition wstag561.c:101
AreaBattle area1Battle1
Definition wstag561.c:84
AreaBattle area2Battle3
Definition wstag561.c:99
u16 actor2Conditions[]
Definition wstag561.c:156
AreaBattle area0Battle4
Definition wstag561.c:74
#define STAGE_TEXT
Definition wstag561.c:25
AreaBattle area3Battle7
Definition wstag561.c:116
BattleList area0Battles
Definition wstag561.c:78
AreaBattle area1Battle7
Definition wstag561.c:90
FieldBattles stageBattles[]
Definition wstag561.c:122
FieldEvent stageEvents[]
Definition wstag561.c:196