Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
wstag370.c
Go to the documentation of this file.
1/*
2 * WSTAG370: Protocol Forest, East Sector.
3 */
4
5#include "common.h"
6#include "field/stage.h"
7
10
11/* Defined below, after the code that uses them */
14#if VERSION_US || VERSION_JP
15#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_06)
16#define STAGE_FILE 0x1AF
17#define STAGE_ARCHIVE 0x3C8
18#elif VERSION_EU
19#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_06)
20#define STAGE_FILE 0x1BD
21#define STAGE_ARCHIVE 0x3D8
22#endif
23/*
24 * Sets the stage up: its map, actors and battles, playing the ambience
25 * ENV10_00; battle list 0 before STORY_TEDDY_FOUND, 1 from then on
26 */
50
162 { 0x200, 0x100, 0x21C, 0x1A6, 0x70, 0xA6, 0x230, 0x1FE },
163 { 0x200, 0x100, 0x200, 0x100, 0, 0, 0x220, 0x1FE },
164 { 0x200, 0x100, 0x216, 0x138, 0x58, 0x38, 0x200, 0x1FD },
165 { 0x200, 0x100, 0x208, 0x1BC, 0x20, 0xBC, 0x210, 0x1FD },
166 { 0x200, 0x100, 0x210, 0x1BC, 0x40, 0xBC, 0x220, 0x1FD },
167 { 0x200, 0x100, 0x200, 0x1BC, 0, 0xBC, 0x230, 0x1FD },
168 { 0x140, 0x100, 0x160, 0x100, 0x80, 0, 0x140, 0x1FF },
169};
171 { NULL, NULL, 0x330 },
172 { NULL, NULL, 0 },
173};
175 { NULL, NULL, 0x330 },
176 { NULL, NULL, 0 },
177};
179 { NULL, NULL, 0x330 },
180 { NULL, NULL, 0 },
181};
189 &actor0,
190 &actor1,
191 &actor2,
192 NULL,
193};
195 { 1, 0, 0x40, 2, 0, 0, 0, 0, 0, 0, 1024, 448, 0, 0 },
196 { 1, 0, 0x40, 2, 1, 0, 0, 0, 0, 0, 1088, 448, 0, 0 },
197 { 1, 0, 0x40, 2, 2, 0, 0, 0, 0, 0, 896, 576, 0, 0 },
198 { 1, 0, 0x40, 2, 3, 0, 0, 0, 0, 0, 960, 576, 0, 0 },
199 { 1, 0, 0x40, 2, 4, 0, 0, 0, 0, 0, 1024, 576, 0, 0 },
200 { 1, 0, 0x40, 2, 5, 0, 0, 0, 0, 0, 1088, 576, 0, 0 },
201 { 1, 0, 0x40, 2, 6, 0, 0, 0, 0, 0, 1024, 640, 0, 0 },
202 { 1, 0, 0x40, 2, 7, 0, 0, 0, 0, 0, 1088, 640, 0, 0 },
203 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
204};
206 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x226, 0x5E, 0x40E, 5, 0, 0, 0 },
207 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x222, 0x374, 0x9B, 1, 0, 0, 0 },
208 { { { CODES_END, 0 }, { CODES_END, 0 } }, 0, 0, 0, 0, 0, 0, 0, 0 },
209};
210void (*stageFuncs[])(void) = {
212};
#define NULL
Definition common.h:17
unsigned short u16
Definition common.h:10
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 PROGRESS(n)
GAME.progress is n.
Definition game_state.h:69
#define MUSIC_BATTLE
BATL0000: the maps' random battles (AreaBattle, nearly all of them)
Definition sound.h:76
#define MUSIC_PROTOCOL_FOREST
ENV10_00: the Protocol Forest.
Definition sound.h:126
#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,...
@ STORY_TEDDY_FOUND
WSTAG212, event 352: Teddy is found; MAGAMI is part of the A.o.A, and the player sets off to beat the...
Definition story.h:67
@ STORY_SOUTH_STATION_GHOST
WSTAG440 (South Station), event 152: a ghost's voice in the empty station.
Definition story.h:45
@ STORY_SEIRYU_BADGE
WSTAG420, event 71: the Seiryu Leader is beaten (the Silver ID and the Seiryu Badge),...
Definition story.h:39
@ STORY_FAKE_BLUE_CARD
WSTAG410 (East Station), event 90: the Blue Card the player was given turns out to be a fake.
Definition story.h:42
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
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 a character says (FIELDSTG_runActorAction): the first whose conditions hold, or the last,...
Definition field_map.h:176
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
u16 actor1Conditions[]
Definition wstag370.c:183
FieldActorEntry actor0
Definition wstag370.c:185
void(* stageFuncs[])(void)
The stage's functions (common/start_stage.inc.c calls the first): a StageFuncs in the stages with a t...
Definition wstag370.c:210
AreaBattle battles1Area3Battle5
Definition wstag370.c:147
BattleList battles1Area1Battles
Definition wstag370.c:124
AreaBattle battles0Area1Battle4
Definition wstag370.c:68
FieldTalk actor2Talks[]
Definition wstag370.c:178
AreaBattle battles0Area0Battle3
Definition wstag370.c:54
AreaBattle battles1Area2Battle4
Definition wstag370.c:133
FieldBattles stageBattles0[]
Defined below, after the code that uses them.
Definition wstag370.c:155
AreaBattle battles0Area1Battle2
Definition wstag370.c:66
BattleList battles0Area3Battles
Definition wstag370.c:98
AreaBattle battles1Area2Battle2
Definition wstag370.c:131
AreaBattle battles1Area0Battle4
Definition wstag370.c:107
BattleList battles1Area3Battles
Definition wstag370.c:150
AreaBattle battles0Area1Battle3
Definition wstag370.c:67
BattleList battles0Area0Battles
Definition wstag370.c:59
AreaBattle battles0Area3Battle3
Definition wstag370.c:93
AreaBattle battles1Area1Battle5
Definition wstag370.c:121
FieldBattles stageBattles1[]
Definition wstag370.c:158
AreaBattle battles1Area1Battle3
Definition wstag370.c:119
AreaBattle battles1Area0Battle5
Definition wstag370.c:108
AreaBattle battles0Area0Battle7
Definition wstag370.c:58
AreaBattle battles1Area3Battle0
Definition wstag370.c:142
FieldActorEntry actor2
Definition wstag370.c:187
AreaBattle battles1Area0Battle6
Definition wstag370.c:109
AreaBattle battles1Area0Battle0
Definition wstag370.c:103
AreaBattle battles1Area2Battle6
Definition wstag370.c:135
BattleList battles1Area0Battles
Definition wstag370.c:111
AreaBattle battles0Area0Battle5
Definition wstag370.c:56
FieldActorEntry * stageActors[]
Definition wstag370.c:188
AreaBattle battles0Area2Battle2
Definition wstag370.c:79
AreaBattle battles1Area1Battle2
Definition wstag370.c:118
AreaBattle battles0Area3Battle7
Definition wstag370.c:97
AreaBattle battles1Area3Battle7
Definition wstag370.c:149
AreaBattle battles0Area3Battle1
Definition wstag370.c:91
AreaBattle battles0Area2Battle1
Definition wstag370.c:78
AreaBattle battles1Area3Battle2
Definition wstag370.c:144
FieldTalk actor1Talks[]
Definition wstag370.c:174
AreaBattle battles1Area2Battle3
Definition wstag370.c:132
AreaBattle battles1Area3Battle6
Definition wstag370.c:148
AreaBattle battles0Area2Battle3
Definition wstag370.c:80
AreaBattle battles0Area0Battle4
Definition wstag370.c:55
AreaBattle battles0Area3Battle6
Definition wstag370.c:96
BattleList battles0Area2Battles
Definition wstag370.c:85
FieldTalk actor0Talks[]
Definition wstag370.c:170
#define STAGE_ARCHIVE
Definition wstag370.c:21
AreaBattle battles0Area1Battle6
Definition wstag370.c:70
AreaBattle battles0Area2Battle0
Definition wstag370.c:77
AreaBattle battles1Area1Battle1
Definition wstag370.c:117
AreaBattle battles0Area2Battle5
Definition wstag370.c:82
AreaBattle battles1Area0Battle3
Definition wstag370.c:106
ActorImage stageImages[]
Definition wstag370.c:161
AreaBattle battles0Area1Battle5
Definition wstag370.c:69
BattleList battles0Area1Battles
Definition wstag370.c:72
AreaBattle battles0Area2Battle4
Definition wstag370.c:81
void setupStage(void)
Sets the stage up: its map, actors and battles, playing the ambience ENV10_00; battle list 0 before S...
Definition wstag370.c:27
AreaBattle battles1Area3Battle4
Definition wstag370.c:146
StageTile stageObjects[]
The tables and color setupStage gives FIELDSTG_state (FieldState)
Definition wstag370.c:194
AreaBattle battles0Area1Battle7
Definition wstag370.c:71
AreaBattle battles1Area1Battle4
Definition wstag370.c:120
AreaBattle battles0Area3Battle4
Definition wstag370.c:94
AreaBattle battles0Area2Battle6
Definition wstag370.c:83
AreaBattle battles1Area2Battle0
Definition wstag370.c:129
AreaBattle battles0Area0Battle1
Definition wstag370.c:52
BattleList battles1Area2Battles
Definition wstag370.c:137
AreaBattle battles1Area2Battle5
Definition wstag370.c:134
AreaBattle battles1Area1Battle0
Definition wstag370.c:116
StageSlot stageSlots[]
Definition wstag370.c:205
AreaBattle battles1Area3Battle3
Definition wstag370.c:145
FieldActorEntry actor1
Definition wstag370.c:186
#define STAGE_FILE
Definition wstag370.c:20
AreaBattle battles0Area0Battle0
Definition wstag370.c:51
AreaBattle battles0Area2Battle7
Definition wstag370.c:84
AreaBattle battles1Area2Battle1
Definition wstag370.c:130
AreaBattle battles1Area0Battle7
Definition wstag370.c:110
AreaBattle battles0Area1Battle1
Definition wstag370.c:65
AreaBattle battles0Area3Battle2
Definition wstag370.c:92
AreaBattle battles1Area2Battle7
Definition wstag370.c:136
u16 actor2Conditions[]
Definition wstag370.c:184
AreaBattle battles0Area1Battle0
Definition wstag370.c:64
AreaBattle battles0Area3Battle5
Definition wstag370.c:95
#define STAGE_TEXT
Definition wstag370.c:19
AreaBattle battles1Area0Battle1
Definition wstag370.c:104
AreaBattle battles1Area1Battle6
Definition wstag370.c:122
AreaBattle battles0Area0Battle2
Definition wstag370.c:53
AreaBattle battles0Area3Battle0
Definition wstag370.c:90
AreaBattle battles0Area0Battle6
Definition wstag370.c:57
AreaBattle battles1Area1Battle7
Definition wstag370.c:123
AreaBattle battles1Area3Battle1
Definition wstag370.c:143
AreaBattle battles1Area0Battle2
Definition wstag370.c:105
u16 actor0Conditions[]
Definition wstag370.c:182