Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
wstag960.c
Go to the documentation of this file.
1/*
2 * WSTAG960: Seabed, Underground: below the Sewers, Duel Island, Kicking Forest
3 * and the UG Lake, in the extra chapter. The European version's: in its extra
4 * chapter (STORY_EXTRA), mode 736 starts it instead of WSTAG825.
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 0x92F
18#define STAGE_FILE_8 0x69F
19#define STAGE_ARCHIVE 0x92E
20#elif VERSION_JP
21#define STAGE_TEXT 0x89B
22#define STAGE_FILE 0x90D
23#define STAGE_FILE_8 0x68F
24#define STAGE_ARCHIVE 0x90B
25#endif
26/* Sets the stage up: its map, actors and battles, playing BGM_0027 */
47
48StagePoint placePoints2_1Point1 = { 0x2E6, 2, 1, 0x450, 0x248, 1, NULL };
49StagePoint placePoints2_1Point0 = { 0x299, 0, 0, 0x32C, 0x232, 0, &placePoints2_1Point1 };
51StagePoint placePoints3_1Point1 = { 0x2E4, 3, 1, 0x340, 160, 1, NULL };
52StagePoint placePoints3_1Point0 = { 0x297, 0, 0, 0x210, 0x370, 0, &placePoints3_1Point1 };
54StagePoint placePoints5_1Point1 = { 0x2E4, 5, 1, 0x340, 160, 1, NULL };
55StagePoint placePoints5_1Point0 = { 0x28F, 0, 0, 112, 184, 0, &placePoints5_1Point1 };
61 { 0x200, 0x100, 0x21C, 0x1A6, 0x70, 0xA6, 0x230, 0x1FE },
62 { 0x200, 0x100, 0x200, 0x100, 0, 0, 0x220, 0x1FE },
63 { 0x200, 0x100, 0x216, 0x138, 0x58, 0x38, 0x200, 0x1FD },
64 { 0x200, 0x100, 0x208, 0x1BC, 0x20, 0xBC, 0x210, 0x1FD },
65 { 0x200, 0x100, 0x210, 0x1BC, 0x40, 0xBC, 0x220, 0x1FD },
66 { 0x200, 0x100, 0x200, 0x1BC, 0, 0xBC, 0x230, 0x1FD },
67 { 0x180, 0x100, 0x1B0, 0x15D, 0x1C0, 0x5D, 0x160, 0x1FF },
68};
69FieldActorEntry actor0 = { NULL, NULL, 0x147, 4, 0, 0, 0 };
75 { 1, 0, 0x8F, 2, 0x37, 1, 0x37, 0x4B, 0xA, 0, 346, 191, 0, 0 },
76 { 1, 0, 0x8F, 2, 0x37, 1, 0x37, 0x4B, 0xA, 0, 653, 112, 0, 0 },
77 { 1, 0, 0xB6, 2, 0x4C, 1, 0x4C, 0x62, 0xA, 0, 179, 218, 0, 0 },
78 { 1, 0, 0xB6, 2, 0x4C, 1, 0x4C, 0x62, 0xA, 0, 563, 120, 0, 0 },
79 { 1, 0, 0xA0, 2, 0xB, 0, 0, 0, 0, 0, 448, 198, 0, 0 },
80 { 1, 0, 0x95, 2, 0xC, 0, 0, 0, 0, 0, 480, 210, 0, 0 },
81 { 1, 0, 0x68, 6, 0x34, 1, 0x34, 0x36, 0xA, 0, 266, 189, 0, 0 },
82 { 1, 0, 0xFF, 4, 0x32, 2, 0, 7, 0x18, 0, 540, -12, 244, 0 },
83 { 1, 0, 0x58, 4, 0, 0, 0, 0, 0, 0, 240, 273, 351, 0 },
84 { 1, 0, 0x68, 4, 1, 0, 0, 0, 0, 0, 208, 259, 345, 0 },
85 { 1, 0, 0x58, 4, 2, 0, 0, 0, 0, 0, 196, 254, 332, 0 },
86 { 1, 0, 0x58, 4, 3, 0, 0, 0, 0, 0, 416, 180, 305, 0 },
87 { 1, 0, 0x93, 4, 4, 0, 0, 0, 0, 0, 384, 157, 299, 0 },
88 { 1, 0, 0x79, 4, 5, 0, 0, 0, 0, 0, 352, 151, 270, 0 },
89 { 1, 0, 0x94, 4, 6, 0, 0, 0, 0, 0, 320, 131, 277, 0 },
90 { 1, 0, 0x5C, 4, 8, 0, 0, 0, 0, 0, 528, 180, 268, 0 },
91 { 1, 0, 0x63, 4, 9, 0, 0, 0, 0, 0, 496, 164, 260, 0 },
92 { 1, 0, 0x5D, 4, 0xA, 0, 0, 0, 0, 0, 485, 159, 250, 0 },
93 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
94};
96 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x2E0, 0x240, 0xD8, 4, 0, 0, 0 },
97 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x2E0, 0xB0, 0x178, 1, 0, 0, 0 },
98 { { { CODES_END, 0 }, { CODES_END, 0 } }, 0, 0, 0, 0, 0, 0, 0, 0 },
99};
100void (*stageFuncs[])(void) = {
102};
#define NULL
Definition common.h:17
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 CODES_END
Definition game_state.h:83
#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,...
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
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 wstag960.c:195
AreaBattle place3Area3Battle2
Definition wstag960.c:196
FieldActorEntry actor0
Definition wstag960.c:69
AreaBattle place2Area3Battle5
Definition wstag960.c:147
AreaBattle place3Area0Battle5
Definition wstag960.c:160
AreaBattle place5Area2Battle4
Definition wstag960.c:237
void(* stageFuncs[])(void)
The stage's functions (common/start_stage.inc.c calls the first): a StageFuncs in the stages with a t...
Definition wstag960.c:100
AreaBattle place5Area1Battle2
Definition wstag960.c:222
AreaBattle place3Area0Battle3
Definition wstag960.c:158
AreaBattle place2Area2Battle6
Definition wstag960.c:135
AreaBattle place5Area3Battle5
Definition wstag960.c:251
AreaBattle place2Area1Battle1
Definition wstag960.c:117
AreaBattle place2Area2Battle5
Definition wstag960.c:134
AreaBattle place5Area0Battle6
Definition wstag960.c:213
AreaBattle place2Area2Battle2
Definition wstag960.c:131
AreaBattle place5Area0Battle4
Definition wstag960.c:211
AreaBattle place3Area2Battle3
Definition wstag960.c:184
BattleList place3Area0Battles
Definition wstag960.c:163
BattleList place3Area1Battles
Definition wstag960.c:176
AreaBattle place3Area1Battle6
Definition wstag960.c:174
AreaBattle place2Area0Battle0
Definition wstag960.c:103
AreaBattle place2Area2Battle4
Definition wstag960.c:133
AreaBattle place3Area3Battle3
Definition wstag960.c:197
AreaBattle place2Area3Battle0
Definition wstag960.c:142
AreaBattle place2Area0Battle1
Definition wstag960.c:104
AreaBattle place5Area2Battle3
Definition wstag960.c:236
AreaBattle place2Area3Battle2
Definition wstag960.c:144
AreaBattle place2Area0Battle3
Definition wstag960.c:106
AreaBattle place3Area0Battle7
Definition wstag960.c:162
AreaBattle place3Area1Battle3
Definition wstag960.c:171
AreaBattle place3Area0Battle0
Definition wstag960.c:155
StagePoint placePoints3_1Point0
Definition wstag960.c:52
const CVECTOR stageColor
the color the setup copies to FIELDSTG_state.spriteColor
Definition wstag960.c:14
BattleList place5Area1Battles
Definition wstag960.c:228
AreaBattle place2Area0Battle5
Definition wstag960.c:108
StagePoints placePoints2_1
Definition wstag960.c:50
#define STAGE_FILE_8
Definition wstag960.c:18
BattleList place2Area1Battles
Definition wstag960.c:124
AreaBattle place5Area3Battle3
Definition wstag960.c:249
AreaBattle place5Area1Battle0
Definition wstag960.c:220
FieldActorEntry * stageActors[]
Definition wstag960.c:70
AreaBattle place5Area0Battle1
Definition wstag960.c:208
AreaBattle place2Area1Battle2
Definition wstag960.c:118
AreaBattle place2Area0Battle4
Definition wstag960.c:107
AreaBattle place2Area2Battle3
Definition wstag960.c:132
AreaBattle place5Area1Battle3
Definition wstag960.c:223
AreaBattle place5Area1Battle4
Definition wstag960.c:224
AreaBattle place2Area1Battle4
Definition wstag960.c:120
StagePoint placePoints2_1Point1
Definition wstag960.c:48
AreaBattle place5Area2Battle7
Definition wstag960.c:240
BattleList place3Area2Battles
Definition wstag960.c:189
AreaBattle place3Area2Battle5
Definition wstag960.c:186
AreaBattle place5Area0Battle3
Definition wstag960.c:210
AreaBattle place5Area0Battle0
Definition wstag960.c:207
AreaBattle place2Area3Battle4
Definition wstag960.c:146
AreaBattle place5Area2Battle6
Definition wstag960.c:239
AreaBattle place2Area0Battle2
Definition wstag960.c:105
AreaBattle place3Area1Battle5
Definition wstag960.c:173
AreaBattle place3Area0Battle4
Definition wstag960.c:159
AreaBattle place2Area3Battle1
Definition wstag960.c:143
#define STAGE_ARCHIVE
Definition wstag960.c:19
AreaBattle place5Area1Battle6
Definition wstag960.c:226
AreaBattle place5Area0Battle2
Definition wstag960.c:209
AreaBattle place3Area2Battle0
Definition wstag960.c:181
AreaBattle place3Area2Battle2
Definition wstag960.c:183
AreaBattle place3Area2Battle7
Definition wstag960.c:188
AreaBattle place5Area3Battle4
Definition wstag960.c:250
AreaBattle place2Area1Battle0
Definition wstag960.c:116
AreaBattle place5Area0Battle7
Definition wstag960.c:214
ActorImage stageImages[]
Definition wstag960.c:60
AreaBattle place3Area1Battle1
Definition wstag960.c:169
void setupStage(void)
Sets the stage up: its map, actors and battles, playing BGM_0027.
Definition wstag960.c:27
AreaBattle place5Area1Battle7
Definition wstag960.c:227
StagePoints * placePoints[]
Names some stages define.
Definition wstag960.c:57
AreaBattle place3Area3Battle6
Definition wstag960.c:200
StagePoint placePoints3_1Point1
Definition wstag960.c:51
AreaBattle place3Area3Battle5
Definition wstag960.c:199
AreaBattle place3Area1Battle4
Definition wstag960.c:172
StageTile stageObjects[]
The tables and color setupStage gives FIELDSTG_state (FieldState)
Definition wstag960.c:74
AreaBattle place5Area3Battle7
Definition wstag960.c:253
AreaBattle place2Area1Battle6
Definition wstag960.c:122
AreaBattle place5Area2Battle2
Definition wstag960.c:235
AreaBattle place3Area3Battle0
Definition wstag960.c:194
AreaBattle place3Area3Battle4
Definition wstag960.c:198
AreaBattle place3Area2Battle1
Definition wstag960.c:182
AreaBattle place5Area0Battle5
Definition wstag960.c:212
AreaBattle place5Area3Battle6
Definition wstag960.c:252
AreaBattle place3Area0Battle1
Definition wstag960.c:156
AreaBattle place5Area2Battle5
Definition wstag960.c:238
BattleList place5Area2Battles
Definition wstag960.c:241
AreaBattle place5Area1Battle1
Definition wstag960.c:221
StageSlot stageSlots[]
Definition wstag960.c:95
AreaBattle place5Area3Battle2
Definition wstag960.c:248
BattleList place3Area3Battles
Definition wstag960.c:202
AreaBattle place2Area0Battle7
Definition wstag960.c:110
AreaBattle place2Area3Battle6
Definition wstag960.c:148
AreaBattle place3Area2Battle6
Definition wstag960.c:187
AreaBattle place3Area1Battle0
Definition wstag960.c:168
AreaBattle place5Area2Battle1
Definition wstag960.c:234
AreaBattle place3Area2Battle4
Definition wstag960.c:185
StagePoint placePoints5_1Point0
Definition wstag960.c:55
AreaBattle place2Area1Battle3
Definition wstag960.c:119
StagePoint placePoints2_1Point0
Definition wstag960.c:49
StagePoint placePoints5_1Point1
Definition wstag960.c:54
BattleList place5Area3Battles
Definition wstag960.c:254
#define STAGE_FILE
Definition wstag960.c:17
AreaBattle place3Area1Battle2
Definition wstag960.c:170
AreaBattle place2Area3Battle7
Definition wstag960.c:149
AreaBattle place2Area1Battle5
Definition wstag960.c:121
AreaBattle place3Area1Battle7
Definition wstag960.c:175
AreaBattle place2Area1Battle7
Definition wstag960.c:123
AreaBattle place3Area0Battle2
Definition wstag960.c:157
AreaBattle place3Area0Battle6
Definition wstag960.c:161
AreaBattle place2Area2Battle7
Definition wstag960.c:136
StagePoints placePoints3_1
Definition wstag960.c:53
AreaBattle place2Area3Battle3
Definition wstag960.c:145
BattleList place2Area3Battles
Definition wstag960.c:150
StagePoints placePoints5_1
Definition wstag960.c:56
#define STAGE_TEXT
Definition wstag960.c:16
BattleList place2Area0Battles
Definition wstag960.c:111
AreaBattle place5Area3Battle0
Definition wstag960.c:246
AreaBattle place2Area2Battle0
Definition wstag960.c:129
AreaBattle place3Area3Battle7
Definition wstag960.c:201
AreaBattle place5Area2Battle0
Definition wstag960.c:233
BattleList place2Area2Battles
Definition wstag960.c:137
FieldBattles stageBattles[]
Definition wstag960.c:259
AreaBattle place5Area3Battle1
Definition wstag960.c:247
BattleList place5Area0Battles
Definition wstag960.c:215
AreaBattle place2Area0Battle6
Definition wstag960.c:109
AreaBattle place5Area1Battle5
Definition wstag960.c:225
AreaBattle place2Area2Battle1
Definition wstag960.c:130