Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
wstag232.c
Go to the documentation of this file.
1/*
2 * WSTAG232: Digimon Arena, Asuka City.
3 */
4
5#include "common.h"
6#include "field/stage.h"
7/* Defined below, after the code that uses them */
10
12
14
16
18#define STAGE_CHILDREN_SIZE 4
20
21#if VERSION_US || VERSION_JP
22#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_05)
23#define STAGE_FILE 0x338
24#elif VERSION_EU
25#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_05)
26#define STAGE_FILE 0x347
27#endif
28/*
29 * Sets the stage up: its map, actors and battles, playing KANRIBGM; BGM_0029
30 * instead at story steps 0x14 to 0x17 and 0x27 to 0x28
31 */
55
57 { 50, 18 }, { 44, 6 }, { 50, 60 }, { 44, 6 },
58 { 45, 6 }, { 46, 6 }, { 44, 6 }, { 51, 78 },
59 { 44, 6 }, { 45, 6 }, { 46, 6 }, { 44, 6 },
60 { 52, 60 }, { 44, 6 }, { 52, 18 }, { 44, 6 },
61 { 45, 6 }, { 46, 6 }, { 44, 6 }, { 255, 0 },
62};
64 { 56, 60 }, { 47, 6 }, { 56, 18 }, { 47, 6 },
65 { 48, 6 }, { 49, 6 }, { 47, 6 }, { 57, 78 },
66 { 47, 6 }, { 48, 6 }, { 49, 6 }, { 47, 6 },
67 { 58, 18 }, { 47, 6 }, { 58, 60 }, { 47, 6 },
68 { 48, 6 }, { 49, 6 }, { 47, 6 }, { 255, 0 },
69};
70AreaBattle area0Battle0 = { 0, 0, MUSIC(1, 0) };
71AreaBattle area0Battle1 = { 0, 0, MUSIC(1, 0) };
72AreaBattle area0Battle2 = { 0, 0, MUSIC(1, 0) };
73AreaBattle area0Battle3 = { 0, 0, MUSIC(1, 0) };
74AreaBattle area0Battle4 = { 0, 0, MUSIC(1, 0) };
75AreaBattle area0Battle5 = { 0, 0, MUSIC(1, 0) };
76AreaBattle area0Battle6 = { 0, 0, MUSIC(1, 0) };
77AreaBattle area0Battle7 = { 0, 0, MUSIC(1, 0) };
83AreaBattle area1Battle0 = { 0, 0, MUSIC(1, 0) };
84AreaBattle area1Battle1 = { 0, 0, MUSIC(1, 0) };
85AreaBattle area1Battle2 = { 0, 0, MUSIC(1, 0) };
86AreaBattle area1Battle3 = { 0, 0, MUSIC(1, 0) };
87AreaBattle area1Battle4 = { 0, 0, MUSIC(1, 0) };
88AreaBattle area1Battle5 = { 0, 0, MUSIC(1, 0) };
89AreaBattle area1Battle6 = { 0, 0, MUSIC(1, 0) };
90AreaBattle area1Battle7 = { 0, 0, MUSIC(1, 0) };
96AreaBattle area2Battle0 = { 0, 0, MUSIC(1, 0) };
97AreaBattle area2Battle1 = { 0, 0, MUSIC(1, 0) };
98AreaBattle area2Battle2 = { 0, 0, MUSIC(1, 0) };
99AreaBattle area2Battle3 = { 0, 0, MUSIC(1, 0) };
100AreaBattle area2Battle4 = { 0, 0, MUSIC(1, 0) };
101AreaBattle area2Battle5 = { 0, 0, MUSIC(1, 0) };
102AreaBattle area2Battle6 = { 0, 0, MUSIC(1, 0) };
103AreaBattle area2Battle7 = { 0, 0, MUSIC(1, 0) };
114AreaBattle area3Battle5 = { 0, 0, MUSIC(1, 0) };
115AreaBattle area3Battle6 = { 0, 0, MUSIC(1, 0) };
116AreaBattle area3Battle7 = { 0, 0, MUSIC(1, 0) };
126 { 0x200, 0x100, 0x21C, 0x1A6, 0x70, 0xA6, 0x230, 0x1FE },
127 { 0x200, 0x100, 0x200, 0x100, 0, 0, 0x220, 0x1FE },
128 { 0x200, 0x100, 0x216, 0x138, 0x58, 0x38, 0x200, 0x1FD },
129 { 0x200, 0x100, 0x208, 0x1BC, 0x20, 0xBC, 0x210, 0x1FD },
130 { 0x200, 0x100, 0x210, 0x1BC, 0x40, 0xBC, 0x220, 0x1FD },
131 { 0x200, 0x100, 0x200, 0x1BC, 0, 0xBC, 0x230, 0x1FD },
132};
134 { 1, 0, 0x40, 2, 0x41, 2, 0, 5, 8, 0, 350, 180, 0, 0 },
135 { 1, 0, 0x40, 2, 0x45, 2, 0, 5, 8, 0, 314, 180, 0, 0 },
136 { 1, 2, 0x58, 2, 0x38, 0, 0, 0, 0, 0, 229, 79, 0, 0 },
137 { 1, 1, 0x58, 2, 0x32, 0, 0, 0, 0, 0, 395, 79, 0, 0 },
138 { 1, 0, 0x40, 2, 0x3E, 1, 0x3E, 0x40, 8, 0, 354, 185, 0, 0 },
139 { 1, 0, 0x40, 2, 0x42, 1, 0x42, 0x44, 8, 0, 318, 185, 0, 0 },
140 { 1, 0, 0x40, 2, 0x46, 2, 0, 3, 4, 0, 206, 186, 0, 0 },
141 { 1, 0, 0x40, 2, 0x46, 2, 0, 3, 4, 0, 370, 138, 0, 0 },
142 { 1, 0, 0x40, 2, 0x47, 2, 0, 3, 4, 0, 238, 170, 0, 0 },
143 { 1, 0, 0x40, 2, 0x47, 2, 0, 3, 4, 0, 402, 154, 0, 0 },
144 { 1, 0, 0x40, 2, 0x48, 2, 0, 3, 4, 0, 270, 154, 0, 0 },
145 { 1, 0, 0x40, 2, 0x48, 2, 0, 3, 4, 0, 434, 170, 0, 0 },
146 { 1, 0, 0x40, 2, 0x49, 2, 0, 3, 4, 0, 302, 138, 0, 0 },
147 { 1, 0, 0x40, 2, 0x49, 2, 0, 3, 4, 0, 466, 186, 0, 0 },
148 { 1, 0, 0x40, 6, 0x36, 2, 0, 5, 6, 0, 387, 77, 0, 0 },
149 { 1, 0, 0x40, 6, 0x37, 2, 0, 5, 6, 0, 395, 79, 0, 0 },
150 { 1, 0, 0x40, 6, 0x3C, 2, 0, 5, 6, 0, 229, 77, 0, 0 },
151 { 1, 0, 0x40, 6, 0x3D, 2, 0, 5, 6, 0, 229, 79, 0, 0 },
152 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
153};
154void (*stageFuncs[])(void) = {
156};
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
FieldMap FIELDSTG_map
Definition fieldstg.c:3660
FieldState FIELDSTG_state
Definition fieldstg.c:2641
#define MUSIC_ADMIN_CENTER
KANRIBGM: the cities' Main Lobby, Admin Center, Digimon Arena, Master Room.
Definition sound.h:79
#define MUSIC_CITY_CRISIS
BGM_0029: the cities and their streets instead of their music while the story is at a crisis (Knightm...
Definition sound.h:105
#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_BATTLE_1
BATL1000: the Digimon Arena's battles and some event battles (AreaBattle)
Definition sound.h:77
#define MUSIC_BANK(music)
The sound bank of a music, which a stage loads for it (FieldState.soundBank)
Definition sound.h:148
#define MUSIC_BOSS_1
BOSS_001: the Digimon Arena's, the cities', the dungeons' and the A.o.A's boss battles.
Definition sound.h:109
FIELDSTG's start of the stage (StageEntry.init in FIELDSTG_stages): the stage's task,...
@ STORY_BYAKKO_LEADER_FOUGHT
WSTAG620 (the rebels' hideout), event 534: the Byakko Leader takes the player for the A....
Definition story.h:85
@ STORY_GUNSLINGER
WSTAG810 (Gunslinger 1F), event 1035.
Definition story.h:143
@ STORY_KNIGHTMON_REPROGRAMMED
WSTAG210 (Main Lobby, Asuka City), event 685: the A.o.A have reprogrammed Knightmon,...
Definition story.h:97
@ STORY_ASUKA_HEADQUARTERS
WSTAG310 (A.o.A Headquarters, Asuka City), event 961.
Definition story.h:138
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
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
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 wstag232.c:103
void(* stageFuncs[])(void)
The stage's functions (common/start_stage.inc.c calls the first): a StageFuncs in the stages with a t...
Definition wstag232.c:154
AreaBattle area2Battle6
Definition wstag232.c:102
AreaBattle area1Battle6
Definition wstag232.c:89
AreaBattle area0Battle7
Definition wstag232.c:77
AreaBattle area3Battle4
Definition wstag232.c:113
AreaBattle area3Battle3
Definition wstag232.c:112
AreaBattle area0Battle1
Definition wstag232.c:71
AreaBattle area2Battle0
Definition wstag232.c:96
AreaBattle area1Battle2
Definition wstag232.c:85
AreaBattle area3Battle0
Definition wstag232.c:109
AreaBattle area0Battle6
Definition wstag232.c:76
AreaBattle area3Battle2
Definition wstag232.c:111
AreaBattle area3Battle1
Definition wstag232.c:110
AreaBattle area0Battle3
Definition wstag232.c:73
AreaBattle area3Battle6
Definition wstag232.c:115
AnimFrame updateTileAnimsFrames1[]
Definition wstag232.c:63
ActorImage stageImages[]
Definition wstag232.c:125
void setupStage(void)
Sets the stage up: its map, actors and battles, playing KANRIBGM; BGM_0029 instead at story steps 0x1...
Definition wstag232.c:32
AreaBattle area2Battle4
Definition wstag232.c:100
StageTile stageObjects[]
The tables and color setupStage gives FIELDSTG_state (FieldState)
Definition wstag232.c:133
BattleList area3Battles
Definition wstag232.c:117
AreaBattle area3Battle5
Definition wstag232.c:114
AreaBattle area0Battle5
Definition wstag232.c:75
BattleList area1Battles
Definition wstag232.c:91
BattleList area2Battles
Definition wstag232.c:104
AreaBattle area1Battle4
Definition wstag232.c:87
AreaBattle area2Battle2
Definition wstag232.c:98
AreaBattle area1Battle5
Definition wstag232.c:88
AreaBattle area2Battle1
Definition wstag232.c:97
AreaBattle area1Battle3
Definition wstag232.c:86
AreaBattle area1Battle0
Definition wstag232.c:83
AnimFrame updateTileAnimsFrames0[]
Defined below, after the code that uses them.
Definition wstag232.c:56
AreaBattle area0Battle0
Definition wstag232.c:70
AreaBattle area0Battle2
Definition wstag232.c:72
#define STAGE_FILE
Definition wstag232.c:26
AreaBattle area2Battle5
Definition wstag232.c:101
AreaBattle area1Battle1
Definition wstag232.c:84
AreaBattle area2Battle3
Definition wstag232.c:99
AreaBattle area0Battle4
Definition wstag232.c:74
#define STAGE_TEXT
Definition wstag232.c:25
AreaBattle area3Battle7
Definition wstag232.c:116
BattleList area0Battles
Definition wstag232.c:78
AreaBattle area1Battle7
Definition wstag232.c:90
FieldBattles stageBattles[]
Definition wstag232.c:122