Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
wstag636.c
Go to the documentation of this file.
1/*
2 * WSTAG636: Mobius Desert, West Sector: the way in, on the Amaterasu server.
3 * On the Amaterasu server; its Asuka server twin is WSTAG635.
4 */
5
6#include "common.h"
7#include "field/stage.h"
8
12
13#if VERSION_US || VERSION_JP
14#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_07)
15#define STAGE_FILE 0x627
16#elif VERSION_EU
17#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_07)
18#define STAGE_FILE 0x637
19#endif
20/* Sets the stage up: its map, actors and battles, playing the ambience ENV_0016 */
40
41StagePoint placePoints1_1Point3 = { 0x2C2, 1, 2, 0x350, 0x2F8, 3, NULL };
42StagePoint placePoints1_1Point2 = { 0x2C2, 1, 3, 0x358, 252, 1, &placePoints1_1Point3 };
43StagePoint placePoints1_1Point1 = { 0x2C2, 1, 1, 0x120, 0x100, 7, &placePoints1_1Point2 };
44StagePoint placePoints1_1Point0 = { 0x2C0, 0, 0, 0x100, 0x278, 5, &placePoints1_1Point1 };
46StagePoint placePoints1_2Point3 = { 0x2C2, 1, 1, 0x350, 0x2F8, 3, NULL };
47StagePoint placePoints1_2Point2 = { 0x2C2, 1, 4, 0x358, 252, 1, &placePoints1_2Point3 };
48StagePoint placePoints1_2Point1 = { 0x2C2, 1, 2, 0x120, 0x100, 7, &placePoints1_2Point2 };
49StagePoint placePoints1_2Point0 = { 0x2C0, 0, 0, 0x100, 0x278, 5, &placePoints1_2Point1 };
51StagePoint placePoints1_3Point3 = { 0x2C2, 1, 3, 0x350, 0x2F8, 3, NULL };
52StagePoint placePoints1_3Point2 = { 0x2C2, 1, 5, 0x358, 252, 1, &placePoints1_3Point3 };
53StagePoint placePoints1_3Point1 = { 0x2C2, 1, 4, 0x120, 0x100, 7, &placePoints1_3Point2 };
54StagePoint placePoints1_3Point0 = { 0x2C2, 1, 1, 0x118, 0x2EC, 5, &placePoints1_3Point1 };
56StagePoint placePoints1_4Point3 = { 0x2C2, 1, 4, 0x350, 0x2F8, 3, NULL };
57StagePoint placePoints1_4Point2 = { 0x2C2, 1, 6, 0x358, 252, 1, &placePoints1_4Point3 };
58StagePoint placePoints1_4Point1 = { 0x2C2, 1, 3, 0x120, 0x100, 7, &placePoints1_4Point2 };
59StagePoint placePoints1_4Point0 = { 0x2C2, 1, 2, 0x118, 0x2EC, 5, &placePoints1_4Point1 };
61StagePoint placePoints1_5Point3 = { 0x2C2, 1, 6, 0x350, 0x2F8, 3, NULL };
62StagePoint placePoints1_5Point2 = { 0x2C2, 1, 7, 0x358, 252, 1, &placePoints1_5Point3 };
63StagePoint placePoints1_5Point1 = { 0x2C2, 1, 5, 0x120, 0x100, 7, &placePoints1_5Point2 };
64StagePoint placePoints1_5Point0 = { 0x2C2, 1, 3, 0x118, 0x2EC, 5, &placePoints1_5Point1 };
66StagePoint placePoints1_6Point3 = { 0x2C3, 0, 0, 0x2F8, 0x244, 3, NULL };
67StagePoint placePoints1_6Point2 = { 0x2C2, 1, 8, 0x358, 252, 1, &placePoints1_6Point3 };
68StagePoint placePoints1_6Point1 = { 0x2C2, 1, 6, 0x120, 0x100, 7, &placePoints1_6Point2 };
69StagePoint placePoints1_6Point0 = { 0x2C2, 1, 4, 0x118, 0x2EC, 5, &placePoints1_6Point1 };
71StagePoint placePoints1_7Point3 = { 0x2C2, 1, 7, 0x350, 0x2F8, 3, NULL };
72StagePoint placePoints1_7Point2 = { 0x2C2, 1, 1, 0x358, 252, 1, &placePoints1_7Point3 };
73StagePoint placePoints1_7Point1 = { 0x2C2, 1, 8, 0x120, 0x100, 7, &placePoints1_7Point2 };
74StagePoint placePoints1_7Point0 = { 0x2C2, 1, 5, 0x118, 0x2EC, 5, &placePoints1_7Point1 };
76StagePoint placePoints1_8Point3 = { 0x2C2, 1, 8, 0x350, 0x2F8, 3, NULL };
77StagePoint placePoints1_8Point2 = { 0x2C2, 1, 2, 0x358, 252, 1, &placePoints1_8Point3 };
78StagePoint placePoints1_8Point1 = { 0x2C2, 1, 7, 0x120, 0x100, 7, &placePoints1_8Point2 };
79StagePoint placePoints1_8Point0 = { 0x2C2, 1, 6, 0x118, 0x2EC, 5, &placePoints1_8Point1 };
100AreaBattle area1Battle0 = { 0, 0, MUSIC(1, 0) };
101AreaBattle area1Battle1 = { 0, 0, MUSIC(1, 0) };
102AreaBattle area1Battle2 = { 0, 0, MUSIC(1, 0) };
103AreaBattle area1Battle3 = { 0, 0, MUSIC(1, 0) };
104AreaBattle area1Battle4 = { 0, 0, MUSIC(1, 0) };
105AreaBattle area1Battle5 = { 0, 0, MUSIC(1, 0) };
106AreaBattle area1Battle6 = { 0, 0, MUSIC(1, 0) };
107AreaBattle area1Battle7 = { 0, 0, MUSIC(1, 0) };
113AreaBattle area2Battle0 = { 0, 0, MUSIC(1, 0) };
114AreaBattle area2Battle1 = { 0, 0, MUSIC(1, 0) };
115AreaBattle area2Battle2 = { 0, 0, MUSIC(1, 0) };
116AreaBattle area2Battle3 = { 0, 0, MUSIC(1, 0) };
117AreaBattle area2Battle4 = { 0, 0, MUSIC(1, 0) };
118AreaBattle area2Battle5 = { 0, 0, MUSIC(1, 0) };
119AreaBattle area2Battle6 = { 0, 0, MUSIC(1, 0) };
120AreaBattle area2Battle7 = { 0, 0, MUSIC(1, 0) };
126AreaBattle area3Battle0 = { 0, 0, MUSIC(1, 0) };
127AreaBattle area3Battle1 = { 0, 0, MUSIC(1, 0) };
128AreaBattle area3Battle2 = { 0, 0, MUSIC(1, 0) };
129AreaBattle area3Battle3 = { 0, 0, MUSIC(1, 0) };
130AreaBattle area3Battle4 = { 0, 0, MUSIC(1, 0) };
131AreaBattle area3Battle5 = { 0, 0, MUSIC(1, 0) };
132AreaBattle area3Battle6 = { 0, 0, MUSIC(1, 0) };
133AreaBattle area3Battle7 = { 0, 0, MUSIC(1, 0) };
143 { 0x200, 0x100, 0x21C, 0x1A6, 0x70, 0xA6, 0x230, 0x1FE },
144 { 0x200, 0x100, 0x200, 0x100, 0, 0, 0x220, 0x1FE },
145 { 0x200, 0x100, 0x216, 0x138, 0x58, 0x38, 0x200, 0x1FD },
146 { 0x200, 0x100, 0x208, 0x1BC, 0x20, 0xBC, 0x210, 0x1FD },
147 { 0x200, 0x100, 0x210, 0x1BC, 0x40, 0xBC, 0x220, 0x1FD },
148 { 0x200, 0x100, 0x200, 0x1BC, 0, 0xBC, 0x230, 0x1FD },
149 { 0x140, 0x100, 0x162, 0x1A0, 0x88, 0xA0, 0x140, 0x1FF },
150 { 0x140, 0x100, 0x158, 0x1A0, 0x60, 0xA0, 0x150, 0x1FF },
151 { 0x140, 0x100, 0x162, 0x1C0, 0x88, 0xC0, 0x160, 0x1FF },
152};
154u16 actor1Talk1Conditions[] = { ITEM(3, 0x82), 0, FLAG(0, 0), 0, CODES_END };
156u16 actor1Talk2Conditions[] = { ITEM(3, 0x82), 0, FLAG(0, 0), 1, ITEM(2, 0x7E), 0, CODES_END };
157u16 actor1Talk3Conditions[] = { FLAG(0, 0), 1, ITEM(2, 0x7E), 1, ITEM(3, 0x82), 0, CODES_END };
159 ITEM(3, 0x82), 1,
160 ITEM(3, 0x81), 0,
161 ITEM(2, 0x7E), 0,
163 CODES_END,
164};
166 { NULL, NULL, 0x3C9 },
167 { NULL, NULL, 0 },
168};
177 { NULL, NULL, 0x3CA },
178 { NULL, NULL, 0 },
179};
184 ITEM(3, 0x81), 1,
185 ITEM(3, 0x82), 0,
186 PLACE(1), 1,
187 PLACE_ARG(2), 1,
188 CODES_END,
189};
195 &actor0,
196 &actor1,
197 &actor2,
198 NULL,
199};
201 { 1, 0, 0x40, 2, 7, 0, 0, 0, 0, 0, 568, 143, 0, 0 },
202 { 1, 0, 0x40, 2, 7, 0, 0, 0, 0, 0, 904, 503, 0, 0 },
203 { 1, 0, 0x40, 4, 0, 0, 0, 0, 0, 0, 417, 278, 329, 0 },
204 { 1, 0, 0x48, 4, 1, 0, 0, 0, 0, 0, 348, 278, 342, 0 },
205 { 1, 0, 0x4A, 4, 2, 0, 0, 0, 0, 0, 529, 611, 680, 0 },
206 { 1, 0, 0x5A, 4, 3, 0, 0, 0, 0, 0, 422, 570, 656, 0 },
207 { 1, 0, 0x58, 4, 4, 0, 0, 0, 0, 0, 384, 635, 719, 0 },
208 { 1, 0, 0x64, 4, 5, 0, 0, 0, 0, 0, 918, 517, 608, 0 },
209 { 1, 0, 0x64, 4, 6, 0, 0, 0, 0, 0, 582, 156, 248, 0 },
210 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
211};
213 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x2C1, 0x340, 0xF0, 5, 0, 0, 0 },
214 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x2C1, 0x368, 0x2EC, 7, 0, 0, 0 },
215 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x2C1, 0x128, 0x2F4, 1, 0, 0, 0 },
216 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x2C1, 0x110, 0x108, 3, 0, 0, 0 },
217 { { { CODES_END, 0 }, { CODES_END, 0 } }, 0, 0, 0, 0, 0, 0, 0, 0 },
218};
219void (*stageFuncs[])(void) = {
221};
#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
FieldMap FIELDSTG_map
Definition fieldstg.c:3660
FieldState FIELDSTG_state
Definition fieldstg.c:2641
#define PLACE(n)
the place and its argument the last exit or warp set (checkWarpArg): the numbers of the stage's Stage...
Definition game_state.h:76
#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 PLACE_ARG(n)
GAME.placeArg is n.
Definition game_state.h:77
#define MUSIC_BATTLE
BATL0000: the maps' random battles (AreaBattle, nearly all of them)
Definition sound.h:76
#define MUSIC_DESERT
ENV_0016: the West Sector's deserts and the Mirage Tower.
Definition sound.h:132
#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 SPECIAL_MONMON_LEVEL_45
PARTNER_MONMON is unlocked and at level 45 or more.
Definition story.h:1753
#define SPECIAL_MONMON_IN_PARTY
PARTNER_MONMON is in the party.
Definition story.h:1713
#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
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
Where an exit (StageSlot) leads: copyPlacePoints copies a place's points to the stage's first slots,...
Definition stage.h:50
The points of a place (GAME.place and GAME.placeArg, which the exit the player came through set)
Definition stage.h:62
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 wstag636.c:181
AreaBattle area2Battle7
Definition wstag636.c:120
FieldActorEntry actor0
Definition wstag636.c:191
StagePoints placePoints1_5
Definition wstag636.c:65
StagePoint placePoints1_7Point3
Definition wstag636.c:71
void(* stageFuncs[])(void)
The stage's functions (common/start_stage.inc.c calls the first): a StageFuncs in the stages with a t...
Definition wstag636.c:219
StagePoint placePoints1_3Point3
Definition wstag636.c:51
StagePoints placePoints1_7
Definition wstag636.c:75
StagePoint placePoints1_1Point0
Definition wstag636.c:44
StagePoint placePoints1_5Point3
Definition wstag636.c:61
FieldTalk actor2Talks[]
Definition wstag636.c:176
AreaBattle area2Battle6
Definition wstag636.c:119
StagePoint placePoints1_5Point2
Definition wstag636.c:62
StagePoint placePoints1_7Point0
Definition wstag636.c:74
StagePoints placePoints1_2
Definition wstag636.c:50
StagePoint placePoints1_8Point1
Definition wstag636.c:78
AreaBattle area1Battle6
Definition wstag636.c:106
StagePoint placePoints1_6Point2
Definition wstag636.c:67
u16 actor1Talk3Actions[]
Definition wstag636.c:158
StagePoint placePoints1_5Point0
Definition wstag636.c:64
u16 actor1Talk1Conditions[]
Definition wstag636.c:154
AreaBattle area0Battle7
Definition wstag636.c:94
FieldActorEntry actor2
Definition wstag636.c:193
AreaBattle area3Battle4
Definition wstag636.c:130
AreaBattle area3Battle3
Definition wstag636.c:129
StagePoint placePoints1_3Point0
Definition wstag636.c:54
AreaBattle area0Battle1
Definition wstag636.c:88
StagePoint placePoints1_2Point0
Definition wstag636.c:49
AreaBattle area2Battle0
Definition wstag636.c:113
FieldActorEntry * stageActors[]
Definition wstag636.c:194
StagePoints placePoints1_8
Definition wstag636.c:80
AreaBattle area1Battle2
Definition wstag636.c:102
StagePoint placePoints1_2Point2
Definition wstag636.c:47
AreaBattle area3Battle0
Definition wstag636.c:126
AreaBattle area0Battle6
Definition wstag636.c:93
FieldTalk actor1Talks[]
Definition wstag636.c:169
AreaBattle area3Battle2
Definition wstag636.c:128
StagePoint placePoints1_4Point1
Definition wstag636.c:58
StagePoint placePoints1_4Point3
Definition wstag636.c:56
u16 actor1Talk0Conditions[]
Definition wstag636.c:153
StagePoint placePoints1_6Point3
Definition wstag636.c:66
FieldTalk actor0Talks[]
Definition wstag636.c:165
StagePoint placePoints1_2Point3
Definition wstag636.c:46
AreaBattle area3Battle1
Definition wstag636.c:127
StagePoint placePoints1_1Point2
Definition wstag636.c:42
AreaBattle area0Battle3
Definition wstag636.c:90
AreaBattle area3Battle6
Definition wstag636.c:132
StagePoint placePoints1_6Point1
Definition wstag636.c:68
StagePoints placePoints1_1
Definition wstag636.c:45
StagePoint placePoints1_1Point1
Definition wstag636.c:43
ActorImage stageImages[]
Definition wstag636.c:142
u16 actor1Talk1Actions[]
Definition wstag636.c:155
void setupStage(void)
Sets the stage up: its map, actors and battles, playing the ambience ENV_0016.
Definition wstag636.c:21
StagePoints * placePoints[]
Names some stages define.
Definition wstag636.c:82
AreaBattle area2Battle4
Definition wstag636.c:117
StagePoint placePoints1_8Point3
Definition wstag636.c:76
StageTile stageObjects[]
The tables and color setupStage gives FIELDSTG_state (FieldState)
Definition wstag636.c:200
StagePoint placePoints1_5Point1
Definition wstag636.c:63
StagePoint placePoints1_4Point2
Definition wstag636.c:57
BattleList area3Battles
Definition wstag636.c:134
AreaBattle area3Battle5
Definition wstag636.c:131
AreaBattle area0Battle5
Definition wstag636.c:92
BattleList area1Battles
Definition wstag636.c:108
StagePoints placePoints0_0
Definition wstag636.c:81
StagePoint placePoints1_7Point1
Definition wstag636.c:73
StagePoint placePoints1_2Point1
Definition wstag636.c:48
BattleList area2Battles
Definition wstag636.c:121
StagePoint placePoints1_4Point0
Definition wstag636.c:59
AreaBattle area1Battle4
Definition wstag636.c:104
AreaBattle area2Battle2
Definition wstag636.c:115
AreaBattle area1Battle5
Definition wstag636.c:105
StagePoint placePoints1_3Point1
Definition wstag636.c:53
StageSlot stageSlots[]
Definition wstag636.c:212
AreaBattle area2Battle1
Definition wstag636.c:114
StagePoints placePoints1_4
Definition wstag636.c:60
AreaBattle area1Battle3
Definition wstag636.c:103
AreaBattle area1Battle0
Definition wstag636.c:100
StagePoint placePoints1_1Point3
Definition wstag636.c:41
StagePoint placePoints1_8Point0
Definition wstag636.c:79
u16 actor1Talk2Conditions[]
Definition wstag636.c:156
FieldActorEntry actor1
Definition wstag636.c:192
AreaBattle area0Battle0
Definition wstag636.c:87
AreaBattle area0Battle2
Definition wstag636.c:89
#define STAGE_FILE
Definition wstag636.c:18
AreaBattle area2Battle5
Definition wstag636.c:118
AreaBattle area1Battle1
Definition wstag636.c:101
StagePoint placePoints1_6Point0
Definition wstag636.c:69
AreaBattle area2Battle3
Definition wstag636.c:116
u16 actor2Conditions[]
Definition wstag636.c:190
StagePoint placePoints1_8Point2
Definition wstag636.c:77
StagePoint placePoints1_7Point2
Definition wstag636.c:72
AreaBattle area0Battle4
Definition wstag636.c:91
#define STAGE_TEXT
Definition wstag636.c:17
StagePoint placePoints1_3Point2
Definition wstag636.c:52
StagePoints placePoints1_6
Definition wstag636.c:70
AreaBattle area3Battle7
Definition wstag636.c:133
BattleList area0Battles
Definition wstag636.c:95
AreaBattle area1Battle7
Definition wstag636.c:107
StagePoints placePoints1_3
Definition wstag636.c:55
FieldBattles stageBattles[]
Definition wstag636.c:139
u16 actor1Talk3Conditions[]
Definition wstag636.c:157
u16 actor0Conditions[]
Definition wstag636.c:180