Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
wstag967.c
Go to the documentation of this file.
1/*
2 * WSTAG967: Seabed, Underground: a dead end off WSTAG845 and 850, in the extra
3 * chapter. The European version's: in its extra chapter (STORY_EXTRA), mode
4 * 743 starts it instead of WSTAG860.
5 */
6
7#include "common.h"
8#include "field/stage.h"
9
13
14const CVECTOR stageColor = { 0x54, 0x67, 0x96, 0x01 };
15#if VERSION_EU
16#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_09)
17#define STAGE_FILE 0x93D
18#define STAGE_FILE_8 0x6F4
19#elif VERSION_JP
20#define STAGE_TEXT 0x89B
21#define STAGE_FILE 0x91B
22#define STAGE_FILE_8 0x6E4
23#endif
24/* Sets the stage up: its map, actors and battles, playing BGM_0027 */
45
46StagePoint placePoints3_1Point0 = { 0x2E6, 3, 1, 160, 0x150, 5, NULL };
48StagePoint placePoints4_1Point0 = { 0x2E4, 4, 1, 192, 0x180, 5, NULL };
50StagePoint placePoints5_1Point0 = { 0x2E4, 5, 3, 192, 0x180, 5, NULL };
56 { 0x200, 0x100, 0x21C, 0x1A6, 0x70, 0xA6, 0x230, 0x1FE },
57 { 0x200, 0x100, 0x200, 0x100, 0, 0, 0x220, 0x1FE },
58 { 0x200, 0x100, 0x216, 0x138, 0x58, 0x38, 0x200, 0x1FD },
59 { 0x200, 0x100, 0x208, 0x1BC, 0x20, 0xBC, 0x210, 0x1FD },
60 { 0x200, 0x100, 0x210, 0x1BC, 0x40, 0xBC, 0x220, 0x1FD },
61 { 0x200, 0x100, 0x200, 0x1BC, 0, 0xBC, 0x230, 0x1FD },
62 { 0x140, 0x100, 0x16E, 0x15F, 0xB8, 0x5F, 0x150, 0x1FF },
63 { 0x140, 0x100, 0x160, 0x160, 0x80, 0x60, 0x160, 0x1FF },
64};
70 { NULL, NULL, 0 },
71};
73 { NULL, actor1Talk0Actions, 0xA },
74 { NULL, NULL, 0 },
75};
78 { NULL, NULL, 0 },
79};
96FieldActorEntry actor3 = { NULL, NULL, 0x147, 5, 0, 0, 0 };
98 &actor0,
99 &actor1,
100 &actor2,
101 &actor3,
102 NULL,
103};
105 { 1, 0, 0x8F, 2, 0x37, 1, 0x37, 0x4B, 0xA, 0, 360, 185, 0, 0 },
106 { 1, 0, 0x8F, 2, 0x37, 1, 0x37, 0x4B, 0xA, 0, 589, 120, 0, 0 },
107 { 1, 0, 0xB6, 2, 0x4C, 1, 0x4C, 0x62, 0xA, 0, 268, 192, 0, 0 },
108 { 1, 0, 0xB6, 2, 0x4C, 1, 0x4C, 0x62, 0xA, 0, 512, 122, 0, 0 },
109 { 1, 0, 0x8F, 6, 0x37, 1, 0x37, 0x4B, 0xA, 0, 110, 120, 0, 0 },
110 { 1, 0, 0x68, 6, 0x34, 1, 0x34, 0x36, 0xA, 0, 412, 114, 0, 0 },
111 { 1, 0, 0x4A, 4, 0, 0, 0, 0, 0, 0, 416, 215, 288, 0 },
112 { 1, 0, 0x61, 4, 1, 0, 0, 0, 0, 0, 384, 198, 288, 0 },
113 { 1, 0, 0x5F, 4, 2, 0, 0, 0, 0, 0, 365, 191, 281, 0 },
114 { 1, 0, 0x4F, 4, 3, 0, 0, 0, 0, 0, 592, 173, 251, 0 },
115 { 1, 0, 0x63, 4, 4, 0, 0, 0, 0, 0, 560, 157, 247, 0 },
116 { 1, 0, 0x60, 4, 5, 0, 0, 0, 0, 0, 541, 150, 240, 0 },
117 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
118};
120 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x2E7, 0x250, 0xE8, 5, 0, 0, 0 },
121 { { { CODES_END, 0 }, { CODES_END, 0 } }, 0, 0, 0, 0, 0, 0, 0, 0 },
122};
123void (*stageFuncs[])(void) = {
125};
#define NULL
Definition common.h:17
unsigned short u16
Definition common.h:10
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 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 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_SEABED
BGM_0027: the Seabed tunnels.
Definition sound.h:103
#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_SEABED_SABER_FANG_FOUND
wstag967 (extra chapter): chest that gives the Saber Fang, "I got" text; its conditions test it 0
Definition story.h:485
#define FLAG_SEABED_ONIMARU_FOUND
wstag967 (extra chapter): chest that gives the Onimaru, "I got" text; its conditions test it 0
Definition story.h:494
#define FLAG_SEABED_KAISER_FIST_FOUND
wstag967 (extra chapter): chest that gives the Kaiser Fist, "I got" text; its conditions test it 0
Definition story.h:497
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
FieldBattles *(* findBattles)(FieldBattles *list, s32 id)
the place of the list with that id
Definition field_map.h:476
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
u16 place
where the last warp or trigger put the player (FieldBattles.id)
Definition game_state.h:506
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
AreaBattle place3Area3Battle1
Definition wstag967.c:166
u16 actor1Conditions[]
Definition wstag967.c:86
AreaBattle place3Area3Battle2
Definition wstag967.c:167
u16 actor0Talk0Actions[]
Definition wstag967.c:65
FieldActorEntry actor0
Definition wstag967.c:93
StagePoint placePoints4_1Point0
Definition wstag967.c:48
AreaBattle place3Area0Battle5
Definition wstag967.c:131
AreaBattle place5Area2Battle4
Definition wstag967.c:260
void(* stageFuncs[])(void)
The stage's functions (common/start_stage.inc.c calls the first): a StageFuncs in the stages with a t...
Definition wstag967.c:123
AreaBattle place5Area1Battle2
Definition wstag967.c:245
AreaBattle place3Area0Battle3
Definition wstag967.c:129
AreaBattle place5Area3Battle5
Definition wstag967.c:274
AreaBattle place4Area0Battle2
Definition wstag967.c:180
AreaBattle place5Area0Battle6
Definition wstag967.c:236
AreaBattle place4Area1Battle4
Definition wstag967.c:195
AreaBattle place4Area2Battle6
Definition wstag967.c:210
FieldTalk actor2Talks[]
Definition wstag967.c:76
AreaBattle place5Area0Battle4
Definition wstag967.c:234
BattleList place4Area2Battles
Definition wstag967.c:212
AreaBattle place4Area0Battle5
Definition wstag967.c:183
AreaBattle place3Area2Battle3
Definition wstag967.c:155
BattleList place3Area0Battles
Definition wstag967.c:134
AreaBattle place4Area1Battle1
Definition wstag967.c:192
BattleList place3Area1Battles
Definition wstag967.c:147
AreaBattle place3Area1Battle6
Definition wstag967.c:145
AreaBattle place3Area3Battle3
Definition wstag967.c:168
AreaBattle place5Area2Battle3
Definition wstag967.c:259
AreaBattle place4Area2Battle5
Definition wstag967.c:209
AreaBattle place3Area0Battle7
Definition wstag967.c:133
AreaBattle place3Area1Battle3
Definition wstag967.c:142
FieldActorEntry actor2
Definition wstag967.c:95
AreaBattle place4Area0Battle4
Definition wstag967.c:182
AreaBattle place3Area0Battle0
Definition wstag967.c:126
StagePoint placePoints3_1Point0
Definition wstag967.c:46
const CVECTOR stageColor
the color the setup copies to FIELDSTG_state.spriteColor
Definition wstag967.c:14
BattleList place5Area1Battles
Definition wstag967.c:251
#define STAGE_FILE_8
Definition wstag967.c:18
AreaBattle place5Area3Battle3
Definition wstag967.c:272
AreaBattle place5Area1Battle0
Definition wstag967.c:243
FieldActorEntry * stageActors[]
Definition wstag967.c:97
AreaBattle place5Area0Battle1
Definition wstag967.c:231
AreaBattle place4Area1Battle6
Definition wstag967.c:197
AreaBattle place4Area0Battle6
Definition wstag967.c:184
AreaBattle place5Area1Battle3
Definition wstag967.c:246
AreaBattle place5Area1Battle4
Definition wstag967.c:247
AreaBattle place4Area0Battle7
Definition wstag967.c:185
AreaBattle place5Area2Battle7
Definition wstag967.c:263
BattleList place3Area2Battles
Definition wstag967.c:160
AreaBattle place3Area2Battle5
Definition wstag967.c:157
AreaBattle place4Area3Battle7
Definition wstag967.c:224
AreaBattle place5Area0Battle3
Definition wstag967.c:233
AreaBattle place4Area0Battle1
Definition wstag967.c:179
AreaBattle place5Area0Battle0
Definition wstag967.c:230
FieldTalk actor1Talks[]
Definition wstag967.c:72
AreaBattle place5Area2Battle6
Definition wstag967.c:262
AreaBattle place4Area0Battle3
Definition wstag967.c:181
AreaBattle place4Area1Battle0
Definition wstag967.c:191
AreaBattle place3Area1Battle5
Definition wstag967.c:144
AreaBattle place3Area0Battle4
Definition wstag967.c:130
FieldTalk actor0Talks[]
Definition wstag967.c:68
AreaBattle place4Area2Battle4
Definition wstag967.c:208
AreaBattle place5Area1Battle6
Definition wstag967.c:249
AreaBattle place5Area0Battle2
Definition wstag967.c:232
AreaBattle place3Area2Battle0
Definition wstag967.c:152
AreaBattle place3Area2Battle2
Definition wstag967.c:154
AreaBattle place3Area2Battle7
Definition wstag967.c:159
u16 actor2Talk0Actions[]
Definition wstag967.c:67
AreaBattle place5Area3Battle4
Definition wstag967.c:273
BattleList place4Area3Battles
Definition wstag967.c:225
AreaBattle place4Area1Battle2
Definition wstag967.c:193
AreaBattle place5Area0Battle7
Definition wstag967.c:237
BattleList place4Area0Battles
Definition wstag967.c:186
ActorImage stageImages[]
Definition wstag967.c:55
AreaBattle place3Area1Battle1
Definition wstag967.c:140
void setupStage(void)
Sets the stage up: its map, actors and battles, playing BGM_0027.
Definition wstag967.c:25
AreaBattle place5Area1Battle7
Definition wstag967.c:250
StagePoints * placePoints[]
Names some stages define.
Definition wstag967.c:52
AreaBattle place3Area3Battle6
Definition wstag967.c:171
AreaBattle place3Area3Battle5
Definition wstag967.c:170
AreaBattle place3Area1Battle4
Definition wstag967.c:143
StageTile stageObjects[]
The tables and color setupStage gives FIELDSTG_state (FieldState)
Definition wstag967.c:104
AreaBattle place5Area3Battle7
Definition wstag967.c:276
AreaBattle place4Area0Battle0
Definition wstag967.c:178
AreaBattle place4Area1Battle7
Definition wstag967.c:198
AreaBattle place5Area2Battle2
Definition wstag967.c:258
AreaBattle place3Area3Battle0
Definition wstag967.c:165
AreaBattle place4Area2Battle2
Definition wstag967.c:206
AreaBattle place3Area3Battle4
Definition wstag967.c:169
AreaBattle place3Area2Battle1
Definition wstag967.c:153
AreaBattle place4Area2Battle3
Definition wstag967.c:207
AreaBattle place5Area0Battle5
Definition wstag967.c:235
AreaBattle place5Area3Battle6
Definition wstag967.c:275
AreaBattle place3Area0Battle1
Definition wstag967.c:127
AreaBattle place5Area2Battle5
Definition wstag967.c:261
BattleList place5Area2Battles
Definition wstag967.c:264
AreaBattle place5Area1Battle1
Definition wstag967.c:244
AreaBattle place4Area3Battle3
Definition wstag967.c:220
BattleList place4Area1Battles
Definition wstag967.c:199
StageSlot stageSlots[]
Definition wstag967.c:119
AreaBattle place5Area3Battle2
Definition wstag967.c:271
u16 actor1Talk0Actions[]
Definition wstag967.c:66
BattleList place3Area3Battles
Definition wstag967.c:173
AreaBattle place4Area3Battle0
Definition wstag967.c:217
AreaBattle place3Area2Battle6
Definition wstag967.c:158
AreaBattle place3Area1Battle0
Definition wstag967.c:139
AreaBattle place4Area2Battle1
Definition wstag967.c:205
AreaBattle place5Area2Battle1
Definition wstag967.c:257
AreaBattle place3Area2Battle4
Definition wstag967.c:156
StagePoint placePoints5_1Point0
Definition wstag967.c:50
FieldActorEntry actor1
Definition wstag967.c:94
BattleList place5Area3Battles
Definition wstag967.c:277
#define STAGE_FILE
Definition wstag967.c:17
AreaBattle place3Area1Battle2
Definition wstag967.c:141
AreaBattle place4Area2Battle0
Definition wstag967.c:204
AreaBattle place4Area1Battle3
Definition wstag967.c:194
AreaBattle place3Area1Battle7
Definition wstag967.c:146
u16 actor2Conditions[]
Definition wstag967.c:92
AreaBattle place4Area3Battle1
Definition wstag967.c:218
AreaBattle place3Area0Battle2
Definition wstag967.c:128
AreaBattle place3Area0Battle6
Definition wstag967.c:132
AreaBattle place4Area3Battle5
Definition wstag967.c:222
StagePoints placePoints3_1
Definition wstag967.c:47
StagePoints placePoints5_1
Definition wstag967.c:51
#define STAGE_TEXT
Definition wstag967.c:16
AreaBattle place4Area1Battle5
Definition wstag967.c:196
AreaBattle place5Area3Battle0
Definition wstag967.c:269
AreaBattle place3Area3Battle7
Definition wstag967.c:172
AreaBattle place5Area2Battle0
Definition wstag967.c:256
StagePoints placePoints4_1
Definition wstag967.c:49
AreaBattle place4Area2Battle7
Definition wstag967.c:211
AreaBattle place4Area3Battle4
Definition wstag967.c:221
FieldActorEntry actor3
Definition wstag967.c:96
FieldBattles stageBattles[]
Definition wstag967.c:282
AreaBattle place5Area3Battle1
Definition wstag967.c:270
AreaBattle place4Area3Battle2
Definition wstag967.c:219
BattleList place5Area0Battles
Definition wstag967.c:238
AreaBattle place5Area1Battle5
Definition wstag967.c:248
u16 actor0Conditions[]
Definition wstag967.c:80
AreaBattle place4Area3Battle6
Definition wstag967.c:223