Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
wstag922.c
Go to the documentation of this file.
1/*
2 * WSTAG922: Amaterasu Bridge, Central Sector, in the extra chapter. The
3 * European version's: in its extra chapter (STORY_EXTRA), mode 626 starts it
4 * instead of WSTAG206.
5 */
6
7#include "common.h"
8#include "field/stage.h"
9
11#define STAGE_CHILDREN_SIZE 4
13
14const CVECTOR stageColor = { 0x54, 0x67, 0x96, 0x00 };
15#if VERSION_EU
16#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_08)
17#define STAGE_FILE 0x8E6
18#define STAGE_FILE_8 0x198
19#elif VERSION_JP
20#define STAGE_TEXT 0x89A
21#define STAGE_FILE 0x89E
22#define STAGE_FILE_8 0x18A
23#endif
24/* Sets the stage up: its map, actors and events, playing ASKA_BGM */
44
46 { 0x200, 0x100, 0x21C, 0x1A6, 0x70, 0xA6, 0x230, 0x1FE },
47 { 0x200, 0x100, 0x200, 0x100, 0, 0, 0x220, 0x1FE },
48 { 0x200, 0x100, 0x216, 0x138, 0x58, 0x38, 0x200, 0x1FD },
49 { 0x200, 0x100, 0x208, 0x1BC, 0x20, 0xBC, 0x210, 0x1FD },
50 { 0x200, 0x100, 0x210, 0x1BC, 0x40, 0xBC, 0x220, 0x1FD },
51 { 0x200, 0x100, 0x200, 0x1BC, 0, 0xBC, 0x230, 0x1FD },
52 { 0x140, 0x100, 0x168, 0x184, 0xA0, 0x84, 0x150, 0x1FF },
53 { 0x180, 0x100, 0x180, 0x144, 0x100, 0x44, 0x160, 0x1FF },
54 { 0x180, 0x100, 0x188, 0x144, 0x120, 0x44, 0x170, 0x1FF },
55};
64 { NULL, NULL, 0 },
65};
67 { NULL, NULL, 0x16 },
68 { NULL, NULL, 0 },
69};
71 { NULL, NULL, 0x17 },
72 { NULL, NULL, 0 },
73};
76FieldActorEntry actor1 = { NULL, actor1Talks, 0x25, 5, 736, 184, 1 };
77FieldActorEntry actor2 = { NULL, actor2Talks, 0x26, 6, 848, 240, 1 };
79 &actor0,
80 &actor1,
81 &actor2,
82 NULL,
83};
85 { 1, 0, 0x80, 2, 0, 0, 0, 0, 0, 0, 384, 384, 0, 0 },
86 { 1, 0, 0x40, 2, 1, 0, 0, 0, 0, 0, 128, 475, 0, 0 },
87 { 1, 0, 0x40, 2, 2, 0, 0, 0, 0, 0, 240, 499, 0, 0 },
88 { 1, 0, 0x40, 2, 3, 0, 0, 0, 0, 0, 252, 384, 0, 0 },
89 { 1, 0, 0x80, 2, 4, 0, 0, 0, 0, 0, 512, 307, 0, 0 },
90 { 1, 0, 0x40, 2, 5, 0, 0, 0, 0, 0, 496, 371, 0, 0 },
91 { 1, 0, 0x40, 2, 6, 0, 0, 0, 0, 0, 248, 352, 0, 0 },
92 { 1, 0, 0x40, 2, 0x10, 0, 0, 0, 0, 0, 104, 512, 0, 0 },
93 { 1, 0, 0x80, 2, 7, 0, 0, 0, 0, 0, 896, 128, 0, 0 },
94 { 1, 0, 0x80, 2, 8, 0, 0, 0, 0, 0, 256, 384, 0, 0 },
95 { 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x34, 0xA, 0, 8, 460, 0, 0 },
96 { 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x34, 0xA, 0, 11, 459, 0, 0 },
97 { 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x34, 0xA, 0, 22, 447, 0, 0 },
98 { 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x34, 0xA, 0, 142, 254, 0, 0 },
99 { 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x34, 0xA, 0, 344, 345, 0, 0 },
100 { 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x34, 0xA, 0, 410, 192, 0, 0 },
101 { 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x34, 0xA, 0, 417, 596, 0, 0 },
102 { 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x34, 0xA, 0, 507, 261, 0, 0 },
103 { 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x34, 0xA, 0, 606, 427, 0, 0 },
104 { 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x34, 0xA, 0, 680, 401, 0, 0 },
105 { 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x34, 0xA, 0, 712, 393, 0, 0 },
106 { 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x34, 0xA, 0, 985, 188, 0, 0 },
107 { 1, 0, 0x40, 6, 0x35, 1, 0x35, 0x37, 0xA, 0, 37, 451, 0, 0 },
108 { 1, 0, 0x40, 6, 0x35, 1, 0x35, 0x37, 0xA, 0, 357, 335, 0, 0 },
109 { 1, 0, 0x40, 6, 0x35, 1, 0x35, 0x37, 0xA, 0, 444, 299, 0, 0 },
110 { 1, 0, 0x40, 6, 0x35, 1, 0x35, 0x37, 0xA, 0, 457, 287, 0, 0 },
111 { 1, 0, 0x40, 6, 0x35, 1, 0x35, 0x37, 0xA, 0, 540, 244, 0, 0 },
112 { 1, 0, 0x40, 6, 0x35, 1, 0x35, 0x37, 0xA, 0, 554, 453, 0, 0 },
113 { 1, 0, 0x40, 6, 0x35, 1, 0x35, 0x37, 0xA, 0, 782, 396, 0, 0 },
114 { 1, 0, 0x40, 6, 0x35, 1, 0x35, 0x37, 0xA, 0, 817, 391, 0, 0 },
115 { 1, 0, 0x40, 6, 0x35, 1, 0x35, 0x37, 0xA, 0, 942, 475, 0, 0 },
116 { 1, 0, 0x40, 6, 0x35, 1, 0x35, 0x37, 0xA, 0, 990, 449, 0, 0 },
117 { 1, 0, 0x40, 6, 0x35, 1, 0x35, 0x37, 0xA, 0, 1109, 334, 0, 0 },
118 { 1, 0, 0x40, 6, 0x35, 1, 0x35, 0x37, 0xA, 0, 1122, 488, 0, 0 },
119 { 1, 0, 0x40, 6, 0x35, 1, 0x35, 0x37, 0xA, 0, 1250, 276, 0, 0 },
120 { 1, 0, 0x40, 6, 0x38, 1, 0x38, 0x3A, 0xA, 0, 102, 206, 0, 0 },
121 { 1, 0, 0x40, 6, 0x38, 1, 0x38, 0x3A, 0xA, 0, 113, 248, 0, 0 },
122 { 1, 0, 0x40, 6, 0x38, 1, 0x38, 0x3A, 0xA, 0, 416, 303, 0, 0 },
123 { 1, 0, 0x40, 6, 0x38, 1, 0x38, 0x3A, 0xA, 0, 422, 57, 0, 0 },
124 { 1, 0, 0x40, 6, 0x38, 1, 0x38, 0x3A, 0xA, 0, 574, 418, 0, 0 },
125 { 1, 0, 0x40, 6, 0x38, 1, 0x38, 0x3A, 0xA, 0, 633, 141, 0, 0 },
126 { 1, 0, 0x40, 6, 0x38, 1, 0x38, 0x3A, 0xA, 0, 654, 397, 0, 0 },
127 { 1, 0, 0x40, 6, 0x38, 1, 0x38, 0x3A, 0xA, 0, 887, 427, 0, 0 },
128 { 1, 0, 0x40, 6, 0x38, 1, 0x38, 0x3A, 0xA, 0, 928, 444, 0, 0 },
129 { 1, 0, 0x40, 6, 0x38, 1, 0x38, 0x3A, 0xA, 0, 1034, 516, 0, 0 },
130 { 1, 0, 0x40, 6, 0x38, 1, 0x38, 0x3A, 0xA, 0, 1181, 488, 0, 0 },
131 { 1, 0, 0x40, 6, 0x3B, 1, 0x3B, 0x3D, 0xA, 0, 168, 451, 0, 0 },
132 { 1, 0, 0x40, 6, 0x3B, 1, 0x3B, 0x3D, 0xA, 0, 392, 601, 0, 0 },
133 { 1, 0, 0x40, 6, 0x3B, 1, 0x3B, 0x3D, 0xA, 0, 440, 70, 0, 0 },
134 { 1, 0, 0x40, 6, 0x3B, 1, 0x3B, 0x3D, 0xA, 0, 440, 555, 0, 0 },
135 { 1, 0, 0x40, 6, 0x3B, 1, 0x3B, 0x3D, 0xA, 0, 510, 455, 0, 0 },
136 { 1, 0, 0x40, 6, 0x3B, 1, 0x3B, 0x3D, 0xA, 0, 1085, 507, 0, 0 },
137 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 44, 434, 0, 0 },
138 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 381, 116, 0, 0 },
139 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 397, 206, 0, 0 },
140 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 415, 603, 0, 0 },
141 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 479, 284, 0, 0 },
142 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 541, 258, 0, 0 },
143 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 545, 250, 0, 0 },
144 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 555, 460, 0, 0 },
145 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 711, 403, 0, 0 },
146 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 781, 404, 0, 0 },
147 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 843, 392, 0, 0 },
148 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 977, 194, 0, 0 },
149 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 985, 457, 0, 0 },
150 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 1114, 365, 0, 0 },
151 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 1144, 486, 0, 0 },
152 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 1218, 456, 0, 0 },
153 { 1, 0, 0x40, 6, 0x50, 1, 0x50, 0x53, 4, 0, 30, 340, 0, 0 },
154 { 1, 0, 0x40, 6, 0x50, 1, 0x50, 0x53, 4, 0, 70, 360, 0, 0 },
155 { 1, 0, 0x40, 6, 0x50, 1, 0x50, 0x53, 4, 0, 110, 380, 0, 0 },
156 { 1, 0, 0x40, 6, 0x50, 1, 0x50, 0x53, 4, 0, 150, 400, 0, 0 },
157 { 1, 0, 0x40, 6, 0x50, 1, 0x50, 0x53, 4, 0, 190, 420, 0, 0 },
158 { 1, 0, 0x40, 6, 0x50, 1, 0x50, 0x53, 4, 0, 470, 560, 0, 0 },
159 { 1, 0, 0x40, 6, 0x50, 1, 0x50, 0x53, 4, 0, 510, 580, 0, 0 },
160 { 1, 0, 0x40, 6, 0x58, 1, 0x58, 0x5B, 4, 0, 585, 125, 0, 0 },
161 { 1, 0, 0x40, 6, 0x5C, 1, 0x5C, 0x5F, 4, 0, 363, 49, 0, 0 },
162 { 1, 0, 0x40, 6, 0x5C, 1, 0x5C, 0x5F, 4, 0, 435, 161, 0, 0 },
163 { 1, 0, 0x40, 6, 0x54, 1, 0x54, 0x57, 4, 0, 1009, 162, 0, 0 },
164 { 1, 0x64, 0x80, 6, 9, 0, 0, 0, 0, 0, 758, 96, 0, 0 },
165 { 1, 0, 0x40, 0xA, 0x2F, 1, 0x2F, 0x31, 6, 0, 943, 296, 0, 0 },
166 { 1, 0, 0x40, 0xA, 0x2F, 1, 0x2F, 0x31, 6, 0, 1019, 140, 0, 0 },
167 { 1, 0, 0x40, 0xA, 0x42, 1, 0x42, 0x44, 6, 0, 582, 78, 0, 0 },
168 { 1, 0, 0x40, 0xA, 0x45, 1, 0x45, 0x47, 6, 0, 358, 18, 0, 0 },
169 { 1, 0, 0x40, 0xA, 0x48, 1, 0x48, 0x4B, 6, 0, 37, 267, 0, 0 },
170 { 1, 0, 0x40, 0xA, 0x48, 1, 0x48, 0x4B, 6, 0, 77, 287, 0, 0 },
171 { 1, 0, 0x40, 0xA, 0x48, 1, 0x48, 0x4B, 6, 0, 117, 307, 0, 0 },
172 { 1, 0, 0x40, 0xA, 0x48, 1, 0x48, 0x4B, 6, 0, 157, 327, 0, 0 },
173 { 1, 0, 0x40, 0xA, 0x48, 1, 0x48, 0x4B, 6, 0, 196, 347, 0, 0 },
174 { 1, 0, 0x40, 0xA, 0x48, 1, 0x48, 0x4B, 6, 0, 236, 367, 0, 0 },
175 { 1, 0, 0x40, 0xA, 0x48, 1, 0x48, 0x4B, 6, 0, 276, 387, 0, 0 },
176 { 1, 0, 0x40, 0xA, 0x48, 1, 0x48, 0x4B, 6, 0, 477, 487, 0, 0 },
177 { 1, 0, 0x40, 0xA, 0x48, 1, 0x48, 0x4B, 6, 0, 517, 507, 0, 0 },
178 { 1, 0, 0x40, 0xA, 0x50, 1, 0x50, 0x53, 4, 0, 230, 440, 0, 0 },
179 { 1, 0, 0x40, 0xA, 0x60, 1, 0x60, 0x63, 6, 0, 422, 110, 0, 0 },
180 { 1, 0, 0x40, 0xA, 0x4C, 1, 0x4C, 0x4F, 6, 0, 942, 205, 0, 0 },
181 { 1, 0, 0x40, 4, 0xA, 0, 0, 0, 0, 0, 224, 177, 200, 0 },
182 { 1, 0, 0x40, 4, 0xB, 0, 0, 0, 0, 0, 600, 214, 273, 0 },
183 { 1, 0, 0x40, 4, 0xC, 0, 0, 0, 0, 0, 1046, 371, 407, 0 },
184 { 1, 0, 0x40, 4, 0xD, 0, 0, 0, 0, 0, 1062, 315, 337, 0 },
185 { 1, 0, 0x40, 4, 0xE, 0, 0, 0, 0, 0, 902, 275, 295, 0 },
186 { 1, 0, 0x40, 4, 0xF, 0, 0, 0, 0, 0, 846, 177, 226, 0 },
187 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
188};
190 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x270, 0x60, 0x31C, 5, 0x64, 0, 0 },
191 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x28C, 0x5E2, 0xE0, 1, 0, 0, 0 },
192 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_WARP0, 0x2E1, 0x1D0, 0x154, 7, 0, 1, 1 },
193 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_WARP0, 0x2E1, 0xE0, 0x110, 7, 0, 1, 1 },
194 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_CLIMB_UP, 3, 0x110, 0x100, 0, 0, 0, 0 },
195 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_CLIMB_DOWN, 3, 0x120, 0xC8, 0, 0, 0, 0 },
196 { { { CODES_END, 0 }, { CODES_END, 0 } }, 0, 0, 0, 0, 0, 0, 0, 0 },
197};
198void (*stageFuncs[])(void) = {
200};
202 { -1, NULL, 0, NULL, NULL },
203};
#define NULL
Definition common.h:17
unsigned short u16
Definition common.h:10
The stage overlays (AAA/PRO/WSTAG###.PRO), loaded at 0x800A4CA4 on top of FIELDSTG.
#define SLOT_CLIMB_UP
Definition field_map.h:256
#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_CLIMB_DOWN
Definition field_map.h:257
#define SLOT_EXIT
The kinds of StageSlot (type).
Definition field_map.h:255
#define FIELD_MAP_TRIGGERS
a cell's value: a direction (3 bits) and a StageSlot (5)
Definition field_map.h:88
#define SLOT_WARP0
the same with effect and cutscene 0
Definition field_map.h:264
FieldMap FIELDSTG_map
Definition fieldstg.c:3660
FieldState FIELDSTG_state
Definition fieldstg.c:2641
#define CODES_END
Definition game_state.h:83
#define ITEM(kind, id)
an item, in the bag or equipped; kind (bits 9-11) isn't read, and the scripts set it after the item's...
Definition game_state.h:80
#define MUSIC_ASUKA_CITY
ASKA_BGM: the Central Sector's streets and bridges, the Underground Path.
Definition sound.h:78
#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,...
#define FLAG_AMATERASU_BRIDGE_BOOST_CHIP_FOUND
wstag922 (extra chapter): chest that gives the Boost Chip, "I got" text; its conditions test it 0 (EU...
Definition story.h:461
#define SPECIAL_SHOW_ITEM_GET_ICON
an action: the player's icon plays its animation 3 with SOUND_ITEM_GET (FIELD_COMMAND_ICON3); the tal...
Definition story.h:1982
Where an actor's frames go in VRAM: one of the records after the FieldImage (Actor....
Definition field_map.h:114
A character of the field (FieldState.actors, a list of pointers up to NULL), which FIELDSTG_updateFie...
Definition field_map.h:194
An event of the table FieldState.events, up to the first id -1, which FIELDSTG_startEvent starts.
Definition field_map.h:141
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
FieldEvent * events
up to the first id -1
Definition field_map.h:451
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
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
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 actor0Talk0Actions[]
Definition wstag922.c:56
FieldActorEntry actor0
Definition wstag922.c:75
void(* stageFuncs[])(void)
The stage's functions (common/start_stage.inc.c calls the first): a StageFuncs in the stages with a t...
Definition wstag922.c:198
FieldTalk actor2Talks[]
Definition wstag922.c:70
FieldActorEntry actor2
Definition wstag922.c:77
const CVECTOR stageColor
the color the setup copies to FIELDSTG_state.spriteColor
Definition wstag922.c:14
#define STAGE_FILE_8
Definition wstag922.c:18
FieldActorEntry * stageActors[]
Definition wstag922.c:78
FieldTalk actor1Talks[]
Definition wstag922.c:66
FieldTalk actor0Talks[]
Definition wstag922.c:62
ActorImage stageImages[]
Definition wstag922.c:45
void setupStage(void)
Sets the stage up: its map, actors and events, playing ASKA_BGM.
Definition wstag922.c:25
StageTile stageObjects[]
The tables and color setupStage gives FIELDSTG_state (FieldState)
Definition wstag922.c:84
StageSlot stageSlots[]
Definition wstag922.c:189
FieldActorEntry actor1
Definition wstag922.c:76
#define STAGE_FILE
Definition wstag922.c:17
#define STAGE_TEXT
Definition wstag922.c:16
FieldEvent stageEvents[]
Definition wstag922.c:201
u16 actor0Conditions[]
Definition wstag922.c:74