Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
wstag963.c
Go to the documentation of this file.
1/*
2 * WSTAG963: Seabed, Underground: below Shell Beach, Plug Cape, South Cape and
3 * the Lake of Ice, in the extra chapter. The European version's: in its extra
4 * chapter (STORY_EXTRA), mode 739 starts it instead of WSTAG840.
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 0x935
18#define STAGE_FILE_8 0x74A
19#elif VERSION_JP
20#define STAGE_TEXT 0x89B
21#define STAGE_FILE 0x913
22#define STAGE_FILE_8 0x73A
23#endif
24/* Sets the stage up: its map, actors and battles, playing BGM_0027 */
45
46StagePoint placePoints1_1Point1 = { 0x2E1, 1, 1, 0x390, 0x108, 1, NULL };
47StagePoint placePoints1_1Point0 = { 0x28A, 0, 0, 128, 0x1E0, 0, &placePoints1_1Point1 };
49StagePoint placePoints4_1Point1 = { 0x2E6, 4, 1, 0x450, 0x248, 1, NULL };
50StagePoint placePoints4_1Point0 = { 0x28E, 0, 0, 224, 0x208, 0, &placePoints4_1Point1 };
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, 0x140, 0x1A1, 0, 0xA1, 0x160, 0x1FF },
63};
64FieldActorEntry actor0 = { NULL, NULL, 0x147, 4, 0, 0, 0 };
70 { 1, 0, 0x8F, 2, 0x37, 1, 0x37, 0x4B, 0xA, 0, 948, 29, 0, 0 },
71 { 1, 0, 0xB6, 2, 0x4C, 1, 0x4C, 0x62, 0xA, 0, 311, 207, 0, 0 },
72 { 1, 0, 0xB6, 2, 0x4C, 1, 0x4C, 0x62, 0xA, 0, 636, 93, 0, 0 },
73 { 1, 0, 0xB6, 2, 0x4C, 1, 0x4C, 0x62, 0xA, 0, 871, 27, 0, 0 },
74 { 1, 0, 0x8B, 2, 0, 0, 0, 0, 0, 0, 720, 158, 0, 0 },
75 { 1, 0, 0xA1, 2, 1, 0, 0, 0, 0, 0, 688, 136, 0, 0 },
76 { 1, 0, 0x40, 2, 0xA, 0, 0, 0, 0, 0, 262, 340, 0, 0 },
77 { 1, 0, 0x40, 2, 0xB, 0, 0, 0, 0, 0, 320, 330, 0, 0 },
78 { 1, 0, 0x40, 2, 0xC, 0, 0, 0, 0, 0, 384, 299, 0, 0 },
79 { 1, 0, 0x40, 2, 0xD, 0, 0, 0, 0, 0, 448, 266, 0, 0 },
80 { 1, 0, 0x8F, 6, 0x37, 1, 0x37, 0x4B, 0xA, 0, 373, 118, 0, 0 },
81 { 1, 0, 0x8F, 6, 0x37, 1, 0x37, 0x4B, 0xA, 0, 490, 66, 0, 0 },
82 { 1, 0, 0x68, 6, 0x34, 1, 0x34, 0x36, 0xA, 0, 148, 233, 0, 0 },
83 { 1, 0, 0x68, 6, 0x34, 1, 0x34, 0x36, 0xA, 0, 753, 1, 0, 0 },
84 { 1, 0, 0xFF, 4, 0x32, 2, 0, 7, 0x18, 0, 860, -124, 120, 0 },
85 { 1, 0, 0x8B, 4, 2, 0, 0, 0, 0, 0, 656, 118, 250, 0 },
86 { 1, 0, 0x8A, 4, 3, 0, 0, 0, 0, 0, 624, 104, 234, 0 },
87 { 1, 0, 0x79, 4, 4, 0, 0, 0, 0, 0, 592, 89, 218, 0 },
88 { 1, 0, 0x98, 4, 5, 0, 0, 0, 0, 0, 560, 70, 202, 0 },
89 { 1, 0, 0x55, 4, 7, 0, 0, 0, 0, 0, 400, 249, 338, 0 },
90 { 1, 0, 0x67, 4, 8, 0, 0, 0, 0, 0, 368, 233, 322, 0 },
91 { 1, 0, 0x5E, 4, 9, 0, 0, 0, 0, 0, 352, 228, 314, 0 },
92 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
93};
95 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x2E3, 0x380, 0x70, 4, 0, 0, 0 },
96 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x2E3, 0xA0, 0x180, 1, 0, 0, 0 },
97 { { { CODES_END, 0 }, { CODES_END, 0 } }, 0, 0, 0, 0, 0, 0, 0, 0 },
98};
99void (*stageFuncs[])(void) = {
101};
#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 place1Area2Battle4
Definition wstag963.c:132
FieldActorEntry actor0
Definition wstag963.c:64
AreaBattle place1Area1Battle2
Definition wstag963.c:117
StagePoint placePoints4_1Point0
Definition wstag963.c:50
AreaBattle place1Area0Battle3
Definition wstag963.c:105
void(* stageFuncs[])(void)
The stage's functions (common/start_stage.inc.c calls the first): a StageFuncs in the stages with a t...
Definition wstag963.c:99
AreaBattle place1Area1Battle5
Definition wstag963.c:120
AreaBattle place4Area0Battle2
Definition wstag963.c:156
StagePoint placePoints1_1Point0
Definition wstag963.c:47
AreaBattle place4Area1Battle4
Definition wstag963.c:171
AreaBattle place4Area2Battle6
Definition wstag963.c:186
BattleList place4Area2Battles
Definition wstag963.c:188
AreaBattle place4Area0Battle5
Definition wstag963.c:159
AreaBattle place1Area0Battle6
Definition wstag963.c:108
StagePoint placePoints4_1Point1
Definition wstag963.c:49
AreaBattle place1Area0Battle1
Definition wstag963.c:103
AreaBattle place1Area2Battle7
Definition wstag963.c:135
AreaBattle place1Area3Battle3
Definition wstag963.c:144
AreaBattle place4Area1Battle1
Definition wstag963.c:168
BattleList place1Area1Battles
Definition wstag963.c:123
AreaBattle place1Area1Battle7
Definition wstag963.c:122
AreaBattle place1Area3Battle5
Definition wstag963.c:146
AreaBattle place1Area3Battle7
Definition wstag963.c:148
AreaBattle place4Area2Battle5
Definition wstag963.c:185
AreaBattle place1Area1Battle4
Definition wstag963.c:119
AreaBattle place4Area0Battle4
Definition wstag963.c:158
const CVECTOR stageColor
the color the setup copies to FIELDSTG_state.spriteColor
Definition wstag963.c:14
#define STAGE_FILE_8
Definition wstag963.c:18
FieldActorEntry * stageActors[]
Definition wstag963.c:65
AreaBattle place4Area1Battle6
Definition wstag963.c:173
AreaBattle place4Area0Battle6
Definition wstag963.c:160
AreaBattle place4Area0Battle7
Definition wstag963.c:161
AreaBattle place4Area3Battle7
Definition wstag963.c:200
AreaBattle place4Area0Battle1
Definition wstag963.c:155
AreaBattle place1Area2Battle0
Definition wstag963.c:128
BattleList place1Area0Battles
Definition wstag963.c:110
AreaBattle place4Area0Battle3
Definition wstag963.c:157
AreaBattle place4Area1Battle0
Definition wstag963.c:167
AreaBattle place4Area2Battle4
Definition wstag963.c:184
AreaBattle place1Area2Battle2
Definition wstag963.c:130
AreaBattle place1Area3Battle2
Definition wstag963.c:143
StagePoints placePoints1_1
Definition wstag963.c:48
StagePoint placePoints1_1Point1
Definition wstag963.c:46
BattleList place4Area3Battles
Definition wstag963.c:201
AreaBattle place1Area3Battle0
Definition wstag963.c:141
AreaBattle place4Area1Battle2
Definition wstag963.c:169
BattleList place4Area0Battles
Definition wstag963.c:162
ActorImage stageImages[]
Definition wstag963.c:55
void setupStage(void)
Sets the stage up: its map, actors and battles, playing BGM_0027.
Definition wstag963.c:25
StagePoints * placePoints[]
Names some stages define.
Definition wstag963.c:52
StageTile stageObjects[]
The tables and color setupStage gives FIELDSTG_state (FieldState)
Definition wstag963.c:69
AreaBattle place4Area0Battle0
Definition wstag963.c:154
AreaBattle place1Area1Battle1
Definition wstag963.c:116
BattleList place1Area2Battles
Definition wstag963.c:136
AreaBattle place4Area1Battle7
Definition wstag963.c:174
AreaBattle place1Area2Battle3
Definition wstag963.c:131
AreaBattle place4Area2Battle2
Definition wstag963.c:182
AreaBattle place4Area2Battle3
Definition wstag963.c:183
AreaBattle place1Area1Battle3
Definition wstag963.c:118
AreaBattle place4Area3Battle3
Definition wstag963.c:196
AreaBattle place1Area2Battle1
Definition wstag963.c:129
BattleList place4Area1Battles
Definition wstag963.c:175
StageSlot stageSlots[]
Definition wstag963.c:94
BattleList place1Area3Battles
Definition wstag963.c:149
AreaBattle place1Area2Battle5
Definition wstag963.c:133
AreaBattle place4Area3Battle0
Definition wstag963.c:193
AreaBattle place1Area1Battle6
Definition wstag963.c:121
AreaBattle place1Area0Battle2
Definition wstag963.c:104
AreaBattle place4Area2Battle1
Definition wstag963.c:181
AreaBattle place1Area3Battle6
Definition wstag963.c:147
AreaBattle place1Area0Battle0
Definition wstag963.c:102
#define STAGE_FILE
Definition wstag963.c:17
AreaBattle place1Area3Battle1
Definition wstag963.c:142
AreaBattle place1Area1Battle0
Definition wstag963.c:115
AreaBattle place4Area2Battle0
Definition wstag963.c:180
AreaBattle place4Area1Battle3
Definition wstag963.c:170
AreaBattle place1Area0Battle5
Definition wstag963.c:107
AreaBattle place4Area3Battle1
Definition wstag963.c:194
AreaBattle place1Area2Battle6
Definition wstag963.c:134
AreaBattle place1Area0Battle7
Definition wstag963.c:109
AreaBattle place4Area3Battle5
Definition wstag963.c:198
#define STAGE_TEXT
Definition wstag963.c:16
AreaBattle place1Area0Battle4
Definition wstag963.c:106
AreaBattle place4Area1Battle5
Definition wstag963.c:172
StagePoints placePoints4_1
Definition wstag963.c:51
AreaBattle place4Area2Battle7
Definition wstag963.c:187
AreaBattle place4Area3Battle4
Definition wstag963.c:197
FieldBattles stageBattles[]
Definition wstag963.c:206
AreaBattle place4Area3Battle2
Definition wstag963.c:195
AreaBattle place1Area3Battle4
Definition wstag963.c:145
AreaBattle place4Area3Battle6
Definition wstag963.c:199