Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
wstag250.c
Go to the documentation of this file.
1/*
2 * WSTAG250: Junk Shop, Asuka City.
3 */
4
5#include "common.h"
6#include "field/stage.h"
7
10
11#if VERSION_US || VERSION_JP
12#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_05)
13#define STAGE_FILE 0x19B
14#define STAGE_ARCHIVE 0x3BF
15#elif VERSION_EU
16#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_05)
17#define STAGE_FILE 0x1A9
18#define STAGE_ARCHIVE 0x3CF
19#endif
20/* Sets the stage up: its map and actors, playing SHOP1BGM */
38
40 { 0x200, 0x100, 0x21C, 0x1A6, 0x70, 0xA6, 0x230, 0x1FE },
41 { 0x200, 0x100, 0x200, 0x100, 0, 0, 0x220, 0x1FE },
42 { 0x200, 0x100, 0x216, 0x138, 0x58, 0x38, 0x200, 0x1FD },
43 { 0x200, 0x100, 0x208, 0x1BC, 0x20, 0xBC, 0x210, 0x1FD },
44 { 0x200, 0x100, 0x210, 0x1BC, 0x40, 0xBC, 0x220, 0x1FD },
45 { 0x200, 0x100, 0x200, 0x1BC, 0, 0xBC, 0x230, 0x1FD },
46 { 0x140, 0x100, 0x174, 0x100, 0xD0, 0, 0x170, 0x1FF },
47 { 0x140, 0x100, 0x174, 0x128, 0xD0, 0x28, 0x140, 0x1FE },
48 { 0x140, 0x100, 0x174, 0x148, 0xD0, 0x48, 0x150, 0x1FE },
49 { 0x140, 0x100, 0x174, 0x170, 0xD0, 0x70, 0x160, 0x1FE },
50 { 0x180, 0x100, 0x1B6, 0x158, 0x1D8, 0x58, 0x170, 0x1FE },
51 { 0x180, 0x100, 0x180, 0x190, 0x100, 0x90, 0x140, 0x1FD },
52};
56u16 actor0Talk1Actions[] = { 0x7A04, 1, CODES_END };
60u16 actor1Talk1Actions[] = { 0x7A03, 1, CODES_END };
72 { NULL, NULL, 0x2B },
73 { NULL, NULL, 0 },
74};
76 { NULL, NULL, 0x44A },
77 { NULL, NULL, 0 },
78};
80 { NULL, NULL, 0x442 },
81 { NULL, NULL, 0 },
82};
84 { NULL, NULL, 0x444 },
85 { NULL, NULL, 0 },
86};
88 { NULL, NULL, 0x446 },
89 { NULL, NULL, 0 },
90};
92 { NULL, NULL, 0x448 },
93 { NULL, NULL, 0 },
94};
96 { NULL, NULL, 0x441 },
97 { NULL, NULL, 0 },
98};
100 { NULL, NULL, 0x443 },
101 { NULL, NULL, 0 },
102};
104 { NULL, NULL, 0x445 },
105 { NULL, NULL, 0 },
106};
108 { NULL, NULL, 0x447 },
109 { NULL, NULL, 0 },
110};
112 { NULL, NULL, 0x2A },
113 { NULL, NULL, 0 },
114};
116 { NULL, NULL, 0x440 },
117 { NULL, NULL, 0 },
118};
120 { NULL, NULL, 0x438 },
121 { NULL, NULL, 0 },
122};
124 { NULL, NULL, 0x43A },
125 { NULL, NULL, 0 },
126};
128 { NULL, NULL, 0x43C },
129 { NULL, NULL, 0 },
130};
132 { NULL, NULL, 0x43E },
133 { NULL, NULL, 0 },
134};
136 { NULL, NULL, 0x437 },
137 { NULL, NULL, 0 },
138};
140 { NULL, NULL, 0x439 },
141 { NULL, NULL, 0 },
142};
144 { NULL, NULL, 0x43B },
145 { NULL, NULL, 0 },
146};
148 { NULL, NULL, 0x43D },
149 { NULL, NULL, 0 },
150};
152 { NULL, NULL, 0x43F },
153 { NULL, NULL, 0 },
154};
156 { NULL, NULL, 0x449 },
157 { NULL, NULL, 0 },
158};
181FieldActorEntry actor0 = { NULL, actor0Talks, 0x16, 4, 451, 178, 7 };
182FieldActorEntry actor1 = { NULL, actor1Talks, 0x17, 5, 382, 331, 1 };
206 &actor0,
207 &actor1,
208 &actor2,
209 &actor3,
210 &actor4,
211 &actor5,
212 &actor6,
213 &actor7,
214 &actor8,
215 &actor9,
216 &actor10,
217 &actor11,
218 &actor12,
219 &actor13,
220 &actor14,
221 &actor15,
222 &actor16,
223 &actor17,
224 &actor18,
225 &actor19,
226 &actor20,
227 &actor21,
228 &actor22,
229 &actor23,
230 NULL,
231};
233 { 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x3D, 4, 0, 224, 268, 0, 0 },
234 { 1, 0, 0x40, 6, 0x51, 1, 0x51, 0x53, 0xA, 0, 95, 248, 0, 0 },
235 { 1, 0, 0x40, 6, 0x51, 1, 0x51, 0x53, 0xA, 0, 181, 470, 0, 0 },
236 { 1, 0, 0x40, 6, 0x57, 1, 0x57, 0x59, 0xA, 0, 123, 226, 0, 0 },
237 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 148, 288, 0, 0 },
238 { 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x40, 0xA, 0, 153, 422, 0, 0 },
239 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 114, 401, 0, 0 },
240 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 155, 299, 0, 0 },
241 { 1, 0, 0x40, 6, 0x44, 1, 0x44, 0x46, 0xA, 0, 168, 434, 0, 0 },
242 { 1, 0, 0x40, 6, 0x47, 1, 0x47, 0x49, 0xA, 0, 105, 333, 0, 0 },
243 { 1, 0, 0x40, 6, 0x47, 1, 0x47, 0x49, 0xA, 0, 126, 300, 0, 0 },
244 { 1, 0, 0x40, 6, 0x47, 1, 0x47, 0x49, 0xA, 0, 219, 451, 0, 0 },
245 { 1, 0, 0x40, 6, 0x4A, 1, 0x4A, 0x4C, 0xA, 0, 59, 341, 0, 0 },
246 { 1, 0, 0x40, 6, 0x4A, 1, 0x4A, 0x4C, 0xA, 0, 62, 328, 0, 0 },
247 { 1, 0, 0x40, 6, 0x4A, 1, 0x4A, 0x4C, 0xA, 0, 63, 366, 0, 0 },
248 { 1, 0, 0x40, 6, 0x4A, 1, 0x4A, 0x4C, 0xA, 0, 95, 378, 0, 0 },
249 { 1, 0, 0x40, 6, 0x4A, 1, 0x4A, 0x4C, 0xA, 0, 126, 244, 0, 0 },
250 { 1, 0, 0x40, 6, 0x4D, 1, 0x4D, 0x50, 8, 0, 73, 439, 0, 0 },
251 { 1, 0, 0x40, 6, 0, 1, 0, 5, 4, 0, 299, 241, 0, 0 },
252 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
253};
255 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x20D, 0x150, 0x98, 7, 0, 0, 0 },
256 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x20D, 0x60, 0x150, 7, 0, 0, 0 },
257 { { { CODES_END, 0 }, { CODES_END, 0 } }, 0, 0, 0, 0, 0, 0, 0, 0 },
258};
259void (*stageFuncs[])(void) = {
261};
#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 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_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_SHOP_1
SHOP1BGM: the inns, shops and towers.
Definition sound.h:81
#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 SPECIAL_STORY_JUNGLE_SOUND_TO_AMATERASU_BRIDGE
GAME.progress is from STORY_JUNGLE_SOUND to STORY_AMATERASU_BRIDGE (PROGRESS_RANGES[0x12])
Definition story.h:1917
@ STORY_PRESIDENT_ARRESTED
WSTAG226 (Login Room, Amaterasu City), event 935, after the President of MAGAMI gives himself up (WST...
Definition story.h:136
@ STORY_BULBMON_FOUND
WSTAG520 (Suzaku Hall), event 695: another earthquake; Bulbmon digs the holes.
Definition story.h:103
@ STORY_SEPIKMON_MASK_LOST
WSTAG480 (Jungle Grave), event 171: Sepikmon will say how to beat Zanbamon once the player finds his ...
Definition story.h:49
@ STORY_AMATERASU_BRIDGE
WSTAG206 (Amaterasu Bridge), event 922: an Attacker holds the bridge.
Definition story.h:133
@ STORY_CONTROL_ROOM
WSTAG325 (Control Room, Asuka City), event 560: a Soldier guards the way.
Definition story.h:90
@ STORY_GENJI_BEATEN
WSTAG200, event 52: after the first battle, won against Tamer Genji (event 50), the Digimon Navi give...
Definition story.h:36
@ STORY_KNIGHTMON_REPROGRAMMED
WSTAG210 (Main Lobby, Asuka City), event 685: the A.o.A have reprogrammed Knightmon,...
Definition story.h:97
@ 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_LOOKING_FOR_TEDDY
WSTAG212, event 273: Kail and the player will put on the Agumon Suits to look for Teddy.
Definition story.h:61
@ STORY_MOVIE_BATTLES
WSTAG820, event 1080, with Snatchmon: each encounter plays MODE_BATTLE_MOVIE first.
Definition story.h:146
@ STORY_SEIRYU_BADGE
WSTAG420, event 71: the Seiryu Leader is beaten (the Silver ID and the Seiryu Badge),...
Definition story.h:39
#define SPECIAL_STORY_ASUKA_HEADQUARTERS_TO_OPERATION_SIGMA
GAME.progress is from STORY_ASUKA_HEADQUARTERS to STORY_OPERATION_SIGMA (PROGRESS_RANGES[0x13])
Definition story.h:1920
#define SPECIAL_STORY_DE_SINCERITY_TO_LISA_SAVED
GAME.progress is from STORY_DE_SINCERITY to STORY_LISA_SAVED (PROGRESS_RANGES[0xF])
Definition story.h:1908
#define FLAG_HEAVY_ARMORY_GARGOMON_TALKED
wstag250 Junk Shop: Gargomon introduces the Heavy Armory once; set there, later talks differ
Definition story.h:1049
#define SPECIAL_STORY_SEIRYU_BADGE_TO_ZANBAMON_DRIVEN_OFF
GAME.progress is from STORY_SEIRYU_BADGE to STORY_ZANBAMON_DRIVEN_OFF (PROGRESS_RANGES[0xE])
Definition story.h:1905
#define SPECIAL_STORY_KNIGHTMON_REPROGRAMMED_TO_BULBMON_FOUND
GAME.progress is from STORY_KNIGHTMON_REPROGRAMMED to STORY_BULBMON_FOUND (PROGRESS_RANGES[0x11])
Definition story.h:1914
#define FLAG_BLACK_MARKET_WIZARDMON_TALKED
wstag250 Junk Shop: Wizardmon introduces the Black Market once; set there, later talks differ
Definition story.h:1052
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
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
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 actor0Talk0Actions[]
Definition wstag250.c:54
FieldActorEntry actor0
Definition wstag250.c:181
void(* stageFuncs[])(void)
The stage's functions (common/start_stage.inc.c calls the first): a StageFuncs in the stages with a t...
Definition wstag250.c:259
FieldActorEntry actor6
Definition wstag250.c:187
u16 actor11Conditions[]
Definition wstag250.c:168
u16 actor0Talk0Conditions[]
Definition wstag250.c:53
FieldTalk actor2Talks[]
Definition wstag250.c:71
u16 actor0Talk1Conditions[]
Definition wstag250.c:55
u16 actor10Conditions[]
Definition wstag250.c:167
u16 actor18Conditions[]
Definition wstag250.c:175
FieldActorEntry actor17
Definition wstag250.c:198
FieldTalk actor14Talks[]
Definition wstag250.c:119
FieldActorEntry actor18
Definition wstag250.c:199
FieldTalk actor5Talks[]
Definition wstag250.c:83
FieldActorEntry actor5
Definition wstag250.c:186
u16 actor1Talk1Conditions[]
Definition wstag250.c:59
u16 actor22Conditions[]
Definition wstag250.c:179
FieldActorEntry actor2
Definition wstag250.c:183
FieldActorEntry actor23
Definition wstag250.c:204
FieldActorEntry actor19
Definition wstag250.c:200
u16 actor9Conditions[]
Definition wstag250.c:166
FieldActorEntry * stageActors[]
Definition wstag250.c:205
u16 actor0Talk1Actions[]
Definition wstag250.c:56
u16 actor23Conditions[]
Definition wstag250.c:180
FieldActorEntry actor22
Definition wstag250.c:203
FieldTalk actor1Talks[]
Definition wstag250.c:66
u16 actor13Conditions[]
Definition wstag250.c:170
u16 actor1Talk0Conditions[]
Definition wstag250.c:57
FieldTalk actor0Talks[]
Definition wstag250.c:61
#define STAGE_ARCHIVE
Definition wstag250.c:18
FieldTalk actor21Talks[]
Definition wstag250.c:147
FieldTalk actor20Talks[]
Definition wstag250.c:143
FieldActorEntry actor10
Definition wstag250.c:191
u16 actor19Conditions[]
Definition wstag250.c:176
FieldTalk actor4Talks[]
Definition wstag250.c:79
u16 actor4Conditions[]
Definition wstag250.c:161
FieldActorEntry actor4
Definition wstag250.c:185
u16 actor3Conditions[]
Definition wstag250.c:160
FieldTalk actor17Talks[]
Definition wstag250.c:131
FieldTalk actor11Talks[]
Definition wstag250.c:107
FieldActorEntry actor8
Definition wstag250.c:189
ActorImage stageImages[]
Definition wstag250.c:39
u16 actor1Talk1Actions[]
Definition wstag250.c:60
FieldTalk actor6Talks[]
Definition wstag250.c:87
void setupStage(void)
Sets the stage up: its map and actors, playing SHOP1BGM.
Definition wstag250.c:21
FieldTalk actor19Talks[]
Definition wstag250.c:139
FieldTalk actor23Talks[]
Definition wstag250.c:155
u16 actor16Conditions[]
Definition wstag250.c:173
StageTile stageObjects[]
The tables and color setupStage gives FIELDSTG_state (FieldState)
Definition wstag250.c:232
FieldActorEntry actor9
Definition wstag250.c:190
u16 actor8Conditions[]
Definition wstag250.c:165
FieldActorEntry actor20
Definition wstag250.c:201
u16 actor5Conditions[]
Definition wstag250.c:162
FieldTalk actor10Talks[]
Definition wstag250.c:103
FieldTalk actor3Talks[]
Definition wstag250.c:75
FieldTalk actor9Talks[]
Definition wstag250.c:99
FieldTalk actor15Talks[]
Definition wstag250.c:123
FieldActorEntry actor15
Definition wstag250.c:196
FieldActorEntry actor12
Definition wstag250.c:193
FieldActorEntry actor16
Definition wstag250.c:197
u16 actor15Conditions[]
Definition wstag250.c:172
u16 actor6Conditions[]
Definition wstag250.c:163
u16 actor14Conditions[]
Definition wstag250.c:171
FieldActorEntry actor7
Definition wstag250.c:188
StageSlot stageSlots[]
Definition wstag250.c:254
u16 actor1Talk0Actions[]
Definition wstag250.c:58
FieldActorEntry actor13
Definition wstag250.c:194
FieldActorEntry actor11
Definition wstag250.c:192
FieldActorEntry actor1
Definition wstag250.c:182
FieldActorEntry actor21
Definition wstag250.c:202
FieldTalk actor13Talks[]
Definition wstag250.c:115
#define STAGE_FILE
Definition wstag250.c:17
u16 actor7Conditions[]
Definition wstag250.c:164
u16 actor2Conditions[]
Definition wstag250.c:159
FieldTalk actor18Talks[]
Definition wstag250.c:135
FieldTalk actor7Talks[]
Definition wstag250.c:91
u16 actor20Conditions[]
Definition wstag250.c:177
#define STAGE_TEXT
Definition wstag250.c:16
FieldTalk actor8Talks[]
Definition wstag250.c:95
FieldTalk actor12Talks[]
Definition wstag250.c:111
u16 actor21Conditions[]
Definition wstag250.c:178
FieldTalk actor16Talks[]
Definition wstag250.c:127
u16 actor17Conditions[]
Definition wstag250.c:174
FieldActorEntry actor3
Definition wstag250.c:184
FieldActorEntry actor14
Definition wstag250.c:195
u16 actor12Conditions[]
Definition wstag250.c:169
FieldTalk actor22Talks[]
Definition wstag250.c:151