Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
wstag233.c
Go to the documentation of this file.
1/*
2 * WSTAG233: Digimon Arena, Amaterasu 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_03)
23#define STAGE_FILE 0x4CC
24#elif VERSION_EU
25#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_03)
26#define STAGE_FILE 0x4DC
27#endif
28/*
29 * Sets the stage up: its map, actors and battles, playing KANRIBGM; BGM_0029
30 * instead except at STORY_PRESIDENT_ARRESTED once flag 0x1A0A is set
31 */
51
53 { 50, 18 }, { 44, 6 }, { 50, 60 }, { 44, 6 },
54 { 45, 6 }, { 46, 6 }, { 44, 6 }, { 51, 78 },
55 { 44, 6 }, { 45, 6 }, { 46, 6 }, { 44, 6 },
56 { 52, 60 }, { 44, 6 }, { 52, 18 }, { 44, 6 },
57 { 45, 6 }, { 46, 6 }, { 44, 6 }, { 255, 0 },
58};
60 { 56, 60 }, { 47, 6 }, { 56, 18 }, { 47, 6 },
61 { 48, 6 }, { 49, 6 }, { 47, 6 }, { 57, 78 },
62 { 47, 6 }, { 48, 6 }, { 49, 6 }, { 47, 6 },
63 { 58, 18 }, { 47, 6 }, { 58, 60 }, { 47, 6 },
64 { 48, 6 }, { 49, 6 }, { 47, 6 }, { 255, 0 },
65};
66AreaBattle area0Battle0 = { 0, 0, MUSIC(1, 0) };
67AreaBattle area0Battle1 = { 0, 0, MUSIC(1, 0) };
68AreaBattle area0Battle2 = { 0, 0, MUSIC(1, 0) };
69AreaBattle area0Battle3 = { 0, 0, MUSIC(1, 0) };
70AreaBattle area0Battle4 = { 0, 0, MUSIC(1, 0) };
71AreaBattle area0Battle5 = { 0, 0, MUSIC(1, 0) };
72AreaBattle area0Battle6 = { 0, 0, MUSIC(1, 0) };
73AreaBattle area0Battle7 = { 0, 0, MUSIC(1, 0) };
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) };
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, 0, 0x40, 2, 0x41, 2, 0, 5, 8, 0, 350, 180, 0, 0 },
131 { 1, 0, 0x40, 2, 0x45, 2, 0, 5, 8, 0, 314, 180, 0, 0 },
132 { 1, 2, 0x58, 2, 0x38, 0, 0, 0, 0, 0, 229, 79, 0, 0 },
133 { 1, 1, 0x58, 2, 0x32, 0, 0, 0, 0, 0, 395, 79, 0, 0 },
134 { 1, 0, 0x40, 2, 0x3E, 1, 0x3E, 0x40, 8, 0, 354, 185, 0, 0 },
135 { 1, 0, 0x40, 2, 0x42, 1, 0x42, 0x44, 8, 0, 318, 185, 0, 0 },
136 { 1, 0, 0x40, 2, 0x46, 2, 0, 3, 4, 0, 206, 186, 0, 0 },
137 { 1, 0, 0x40, 2, 0x46, 2, 0, 3, 4, 0, 370, 138, 0, 0 },
138 { 1, 0, 0x40, 2, 0x47, 2, 0, 3, 4, 0, 238, 170, 0, 0 },
139 { 1, 0, 0x40, 2, 0x47, 2, 0, 3, 4, 0, 402, 154, 0, 0 },
140 { 1, 0, 0x40, 2, 0x48, 2, 0, 3, 4, 0, 270, 154, 0, 0 },
141 { 1, 0, 0x40, 2, 0x48, 2, 0, 3, 4, 0, 434, 170, 0, 0 },
142 { 1, 0, 0x40, 2, 0x49, 2, 0, 3, 4, 0, 302, 138, 0, 0 },
143 { 1, 0, 0x40, 2, 0x49, 2, 0, 3, 4, 0, 466, 186, 0, 0 },
144 { 1, 0, 0x40, 6, 0x36, 2, 0, 5, 6, 0, 387, 77, 0, 0 },
145 { 1, 0, 0x40, 6, 0x37, 2, 0, 5, 6, 0, 395, 79, 0, 0 },
146 { 1, 0, 0x40, 6, 0x3C, 2, 0, 5, 6, 0, 229, 77, 0, 0 },
147 { 1, 0, 0x40, 6, 0x3D, 2, 0, 5, 6, 0, 229, 79, 0, 0 },
148 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
149};
150void (*stageFuncs[])(void) = {
152};
GameFlags FLAGS_00
The flag bitset FLAGS_00 and the event functions.
Definition events.c:701
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,...
#define FLAG_OINKMON_CITIZENS_RESTORED
wstag435 Gale Tower: Airdramon spins the windmill and turns everyone back from Oinkmon; tested in 62 ...
Definition story.h:1031
@ STORY_PRESIDENT_ARRESTED
WSTAG226 (Login Room, Amaterasu City), event 935, after the President of MAGAMI gives himself up (WST...
Definition story.h:136
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
s32(* checkCondition)(u16 code, u16 value)
Definition game_state.h:53
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 wstag233.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 wstag233.c:150
AreaBattle area2Battle6
Definition wstag233.c:98
AreaBattle area1Battle6
Definition wstag233.c:85
AreaBattle area0Battle7
Definition wstag233.c:73
AreaBattle area3Battle4
Definition wstag233.c:109
AreaBattle area3Battle3
Definition wstag233.c:108
AreaBattle area0Battle1
Definition wstag233.c:67
AreaBattle area2Battle0
Definition wstag233.c:92
AreaBattle area1Battle2
Definition wstag233.c:81
AreaBattle area3Battle0
Definition wstag233.c:105
AreaBattle area0Battle6
Definition wstag233.c:72
AnimFrame updateTileAnimsFrames0[]
Defined below, after the code that uses them.
Definition wstag233.c:52
AreaBattle area3Battle2
Definition wstag233.c:107
AreaBattle area3Battle1
Definition wstag233.c:106
AreaBattle area0Battle3
Definition wstag233.c:69
AreaBattle area3Battle6
Definition wstag233.c:111
AnimFrame updateTileAnimsFrames1[]
Definition wstag233.c:59
ActorImage stageImages[]
Definition wstag233.c:121
void setupStage(void)
Sets the stage up: its map, actors and battles, playing KANRIBGM; BGM_0029 instead except at STORY_PR...
Definition wstag233.c:32
AreaBattle area2Battle4
Definition wstag233.c:96
StageTile stageObjects[]
The tables and color setupStage gives FIELDSTG_state (FieldState)
Definition wstag233.c:129
BattleList area3Battles
Definition wstag233.c:113
AreaBattle area3Battle5
Definition wstag233.c:110
AreaBattle area0Battle5
Definition wstag233.c:71
BattleList area1Battles
Definition wstag233.c:87
BattleList area2Battles
Definition wstag233.c:100
AreaBattle area1Battle4
Definition wstag233.c:83
AreaBattle area2Battle2
Definition wstag233.c:94
AreaBattle area1Battle5
Definition wstag233.c:84
AreaBattle area2Battle1
Definition wstag233.c:93
AreaBattle area1Battle3
Definition wstag233.c:82
AreaBattle area1Battle0
Definition wstag233.c:79
AreaBattle area0Battle0
Definition wstag233.c:66
AreaBattle area0Battle2
Definition wstag233.c:68
#define STAGE_FILE
Definition wstag233.c:26
AreaBattle area2Battle5
Definition wstag233.c:97
AreaBattle area1Battle1
Definition wstag233.c:80
AreaBattle area2Battle3
Definition wstag233.c:95
AreaBattle area0Battle4
Definition wstag233.c:70
#define STAGE_TEXT
Definition wstag233.c:25
AreaBattle area3Battle7
Definition wstag233.c:112
BattleList area0Battles
Definition wstag233.c:74
AreaBattle area1Battle7
Definition wstag233.c:86
FieldBattles stageBattles[]
Definition wstag233.c:118