Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
wstag645.c
Go to the documentation of this file.
1/*
2 * WSTAG645: Mirage Tower, West Sector.
3 */
4
5#include "common.h"
6#include "field/stage.h"
7/* Defined below, after the code that uses them */
11
13
15
17
19#define STAGE_CHILDREN_SIZE 4
21
22#if VERSION_US || VERSION_JP
23#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_02)
24#define STAGE_FILE 0x498
25#elif VERSION_EU
26#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_02)
27#define STAGE_FILE 0x4A8
28#endif
29/* Sets the stage up: its map, actors and battles, playing the ambience ENV_0016 */
48
50 { 50, 8 }, { 51, 8 }, { 52, 8 }, { 53, 8 },
51 { 54, 8 }, { 55, 8 }, { 56, 8 }, { 57, 8 },
52 { 58, 8 }, { 59, 8 }, { 60, 8 }, { 82, 160 },
53 { 255, 0 },
54};
56 { 61, 8 }, { 62, 8 }, { 63, 8 }, { 64, 8 },
57 { 65, 8 }, { 66, 8 }, { 67, 8 }, { 68, 8 },
58 { 69, 8 }, { 70, 8 }, { 71, 8 }, { 82, 160 },
59 { 255, 0 },
60};
62 { 72, 8 }, { 73, 8 }, { 74, 8 }, { 75, 8 },
63 { 76, 8 }, { 77, 8 }, { 78, 8 }, { 79, 8 },
64 { 80, 8 }, { 81, 8 }, { 82, 160 }, { 255, 0 },
65};
79AreaBattle area1Battle0 = { 0, 0, MUSIC(1, 0) };
80AreaBattle area1Battle1 = { 0, 0, MUSIC(1, 0) };
81AreaBattle area1Battle2 = { 0, 0, MUSIC(1, 0) };
82AreaBattle area1Battle3 = { 0, 0, MUSIC(1, 0) };
83AreaBattle area1Battle4 = { 0, 0, MUSIC(1, 0) };
84AreaBattle area1Battle5 = { 0, 0, MUSIC(1, 0) };
85AreaBattle area1Battle6 = { 0, 0, MUSIC(1, 0) };
86AreaBattle area1Battle7 = { 0, 0, MUSIC(1, 0) };
92AreaBattle area2Battle0 = { 0, 0, MUSIC(1, 0) };
93AreaBattle area2Battle1 = { 0, 0, MUSIC(1, 0) };
94AreaBattle area2Battle2 = { 0, 0, MUSIC(1, 0) };
95AreaBattle area2Battle3 = { 0, 0, MUSIC(1, 0) };
96AreaBattle area2Battle4 = { 0, 0, MUSIC(1, 0) };
97AreaBattle area2Battle5 = { 0, 0, MUSIC(1, 0) };
98AreaBattle area2Battle6 = { 0, 0, MUSIC(1, 0) };
99AreaBattle area2Battle7 = { 0, 0, MUSIC(1, 0) };
105AreaBattle area3Battle0 = { 0, 0, MUSIC(1, 0) };
106AreaBattle area3Battle1 = { 0, 0, MUSIC(1, 0) };
107AreaBattle area3Battle2 = { 0, 0, MUSIC(1, 0) };
108AreaBattle area3Battle3 = { 0, 0, MUSIC(1, 0) };
109AreaBattle area3Battle4 = { 0, 0, MUSIC(1, 0) };
110AreaBattle area3Battle5 = { 0, 0, MUSIC(1, 0) };
111AreaBattle area3Battle6 = { 0, 0, MUSIC(1, 0) };
112AreaBattle area3Battle7 = { 0, 0, MUSIC(1, 0) };
122 { 0x200, 0x100, 0x21C, 0x1A6, 0x70, 0xA6, 0x230, 0x1FE },
123 { 0x200, 0x100, 0x200, 0x100, 0, 0, 0x220, 0x1FE },
124 { 0x200, 0x100, 0x216, 0x138, 0x58, 0x38, 0x200, 0x1FD },
125 { 0x200, 0x100, 0x208, 0x1BC, 0x20, 0xBC, 0x210, 0x1FD },
126 { 0x200, 0x100, 0x210, 0x1BC, 0x40, 0xBC, 0x220, 0x1FD },
127 { 0x200, 0x100, 0x200, 0x1BC, 0, 0xBC, 0x230, 0x1FD },
128};
130 { 1, 3, 0xC8, 2, 0x48, 0, 0, 0, 0, 0, 59, 435, 0, 0 },
131 { 1, 3, 0xC8, 2, 0x48, 0, 0, 0, 0, 0, 384, 640, 0, 0 },
132 { 1, 3, 0xC8, 2, 0x48, 0, 0, 0, 0, 0, 606, 469, 0, 0 },
133 { 1, 1, 0x40, 6, 0x32, 0, 0, 0, 0, 0, 260, 441, 0, 0 },
134 { 1, 1, 0x40, 6, 0x32, 0, 0, 0, 0, 0, 394, 596, 0, 0 },
135 { 1, 2, 0x40, 6, 0x3D, 0, 0, 0, 0, 0, 569, 465, 0, 0 },
136 { 1, 1, 0x40, 6, 0x32, 0, 0, 0, 0, 0, 706, 596, 0, 0 },
137 { 1, 1, 0x40, 6, 0x32, 0, 0, 0, 0, 0, 858, 657, 0, 0 },
138 { 1, 0, 0x40, 6, 4, 0, 0, 0, 0, 0, 562, 254, 0, 0 },
139 { 1, 0, 0x40, 4, 0x53, 2, 0, 0xF, 8, 0, 604, 194, 256, 0 },
140 { 1, 0, 0x40, 4, 0x54, 2, 0, 0xF, 8, 0, 604, 194, 252, 0 },
141 { 1, 0, 0x40, 4, 0x55, 2, 0, 0xF, 8, 0, 604, 194, 248, 0 },
142 { 1, 0, 0x40, 4, 0x56, 2, 0, 0xF, 8, 0, 604, 194, 244, 0 },
143 { 1, 0, 0x40, 4, 0x57, 2, 0, 0xF, 8, 0, 604, 194, 240, 0 },
144 { 1, 0, 0x40, 4, 0x58, 2, 0, 0xF, 8, 0, 604, 194, 236, 0 },
145 { 1, 0, 0x40, 4, 0x59, 2, 0, 0xF, 8, 0, 604, 194, 232, 0 },
146 { 1, 0, 0x40, 4, 0x5A, 2, 0, 0xF, 8, 0, 604, 194, 228, 0 },
147 { 1, 0, 0x40, 4, 0, 0, 0, 0, 0, 0, 566, 208, 264, 0 },
148 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
149};
151 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x25B, 0x27A, 0x256, 3, 0, 0, 0 },
152 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x258, 0x110, 0x108, 7, 0, 1, 6 },
153 { { { CODES_END, 0 }, { CODES_END, 0 } }, 0, 0, 0, 0, 0, 0, 0, 0 },
154};
155void (*stageFuncs[])(void) = {
157};
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_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,...
Where an actor's frames go in VRAM: one of the records after the FieldImage (Actor....
Definition field_map.h:114
One frame of a sprite animation; frame 0xFF ends it (or loops it)
Definition gfx.h:296
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
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 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 area2Battle7
Definition wstag645.c:99
void(* stageFuncs[])(void)
The stage's functions (common/start_stage.inc.c calls the first): a StageFuncs in the stages with a t...
Definition wstag645.c:155
AnimFrame updateTileAnimsFrames2[]
Definition wstag645.c:61
AreaBattle area2Battle6
Definition wstag645.c:98
AreaBattle area1Battle6
Definition wstag645.c:85
AreaBattle area0Battle7
Definition wstag645.c:73
AreaBattle area3Battle4
Definition wstag645.c:109
AreaBattle area3Battle3
Definition wstag645.c:108
AreaBattle area0Battle1
Definition wstag645.c:67
AreaBattle area2Battle0
Definition wstag645.c:92
AreaBattle area1Battle2
Definition wstag645.c:81
AreaBattle area3Battle0
Definition wstag645.c:105
AreaBattle area0Battle6
Definition wstag645.c:72
AreaBattle area3Battle2
Definition wstag645.c:107
AreaBattle area3Battle1
Definition wstag645.c:106
AreaBattle area0Battle3
Definition wstag645.c:69
AreaBattle area3Battle6
Definition wstag645.c:111
AnimFrame updateTileAnimsFrames1[]
Definition wstag645.c:55
ActorImage stageImages[]
Definition wstag645.c:121
void setupStage(void)
Sets the stage up: its map, actors and battles, playing the ambience ENV_0016.
Definition wstag645.c:30
AreaBattle area2Battle4
Definition wstag645.c:96
StageTile stageObjects[]
The tables and color setupStage gives FIELDSTG_state (FieldState)
Definition wstag645.c:129
BattleList area3Battles
Definition wstag645.c:113
AreaBattle area3Battle5
Definition wstag645.c:110
AreaBattle area0Battle5
Definition wstag645.c:71
BattleList area1Battles
Definition wstag645.c:87
BattleList area2Battles
Definition wstag645.c:100
AreaBattle area1Battle4
Definition wstag645.c:83
AreaBattle area2Battle2
Definition wstag645.c:94
AreaBattle area1Battle5
Definition wstag645.c:84
StageSlot stageSlots[]
Definition wstag645.c:150
AreaBattle area2Battle1
Definition wstag645.c:93
AreaBattle area1Battle3
Definition wstag645.c:82
AreaBattle area1Battle0
Definition wstag645.c:79
AnimFrame updateTileAnimsFrames0[]
Defined below, after the code that uses them.
Definition wstag645.c:49
AreaBattle area0Battle0
Definition wstag645.c:66
AreaBattle area0Battle2
Definition wstag645.c:68
#define STAGE_FILE
Definition wstag645.c:27
AreaBattle area2Battle5
Definition wstag645.c:97
AreaBattle area1Battle1
Definition wstag645.c:80
AreaBattle area2Battle3
Definition wstag645.c:95
AreaBattle area0Battle4
Definition wstag645.c:70
#define STAGE_TEXT
Definition wstag645.c:26
AreaBattle area3Battle7
Definition wstag645.c:112
BattleList area0Battles
Definition wstag645.c:74
AreaBattle area1Battle7
Definition wstag645.c:86
FieldBattles stageBattles[]
Definition wstag645.c:118