Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
wstag621.c
Go to the documentation of this file.
1/*
2 * WSTAG621: Secret Room, West Sector. On the Amaterasu server; its Asuka
3 * server twin is WSTAG620.
4 */
5
6#include "common.h"
7#include "field/stage.h"
8
11
12#if VERSION_US || VERSION_JP
13#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_07)
14#define STAGE_FILE 0x607
15#elif VERSION_EU
16#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_07)
17#define STAGE_FILE 0x617
18#endif
19/* Sets the stage up: its map and actors, playing BGM_0019 */
37
39 { 0x200, 0x100, 0x21C, 0x1A6, 0x70, 0xA6, 0x230, 0x1FE },
40 { 0x200, 0x100, 0x200, 0x100, 0, 0, 0x220, 0x1FE },
41 { 0x200, 0x100, 0x216, 0x138, 0x58, 0x38, 0x200, 0x1FD },
42 { 0x200, 0x100, 0x208, 0x1BC, 0x20, 0xBC, 0x210, 0x1FD },
43 { 0x200, 0x100, 0x210, 0x1BC, 0x40, 0xBC, 0x220, 0x1FD },
44 { 0x200, 0x100, 0x200, 0x1BC, 0, 0xBC, 0x230, 0x1FD },
45 { 0x140, 0x100, 0x174, 0x150, 0xD0, 0x50, 0x160, 0x1F6 },
46 { 0x140, 0x100, 0x14C, 0x178, 0x30, 0x78, 0x160, 0x1F5 },
47 { 0x140, 0x100, 0x154, 0x178, 0x50, 0x78, 0x170, 0x1F5 },
48 { 0x140, 0x100, 0x16C, 0x190, 0xB0, 0x90, 0x140, 0x1F4 },
49 { 0x140, 0x100, 0x140, 0x198, 0, 0x98, 0x160, 0x1F4 },
50 { 0x140, 0x100, 0x174, 0x198, 0xD0, 0x98, 0x170, 0x1F4 },
51 { 0x140, 0x100, 0x148, 0x1A0, 0x20, 0xA0, 0x140, 0x1F3 },
52 { 0x140, 0x100, 0x150, 0x1A0, 0x40, 0xA0, 0x150, 0x1F3 },
53 { 0x140, 0x100, 0x158, 0x1A0, 0x60, 0xA0, 0x160, 0x1F3 },
54 { 0x140, 0x100, 0x15C, 0x178, 0x70, 0x78, 0x170, 0x1F3 },
55};
66u16 actor9Talk1Conditions[] = { ITEM(3, 0x68), 0, FLAG(0, 0), 0, CODES_END };
68u16 actor9Talk2Conditions[] = { ITEM(3, 0x68), 0, FLAG(0, 0), 1, ITEM(2, 0x64), 0, CODES_END };
69u16 actor9Talk3Conditions[] = { ITEM(3, 0x68), 0, FLAG(0, 0), 1, ITEM(2, 0x64), 1, CODES_END };
71 ITEM(3, 0x68), 1,
72 ITEM(3, 0x67), 0,
73 ITEM(2, 0x64), 0,
76};
78 { actor0Talk0Conditions, NULL, 0x11F },
79 { actor0Talk1Conditions, NULL, 0x120 },
80 { actor0Talk2Conditions, NULL, 0x127 },
81 { NULL, NULL, 0 },
82};
84 { actor1Talk0Conditions, NULL, 0x122 },
85 { actor1Talk1Conditions, NULL, 0x123 },
86 { actor1Talk2Conditions, NULL, 0x128 },
87 { NULL, NULL, 0 },
88};
90 { actor2Talk0Conditions, NULL, 0x125 },
91 { actor2Talk1Conditions, NULL, 0x126 },
92 { actor2Talk2Conditions, NULL, 0x129 },
93 { NULL, NULL, 0 },
94};
96 { NULL, NULL, 0x11E },
97 { NULL, NULL, 0 },
98};
100 { NULL, NULL, 0x121 },
101 { NULL, NULL, 0 },
102};
104 { NULL, NULL, 0x124 },
105 { NULL, NULL, 0 },
106};
123 ITEM(3, 0x67), 1,
124 ITEM(3, 0x68), 0,
125 CODES_END,
126};
130FieldActorEntry actor3 = { NULL, NULL, 0x9A, 7, 641, 350, 0 };
131FieldActorEntry actor4 = { NULL, NULL, 0x9B, 8, 593, 325, 1 };
132FieldActorEntry actor5 = { NULL, NULL, 0x9C, 9, 545, 301, 2 };
133FieldActorEntry actor6 = { actor6Conditions, actor6Talks, 0x9D, 0xA, 385, 417, 3 };
134FieldActorEntry actor7 = { actor7Conditions, actor7Talks, 0x9E, 0xB, 449, 360, 5 };
135FieldActorEntry actor8 = { actor8Conditions, actor8Talks, 0x9F, 0xC, 515, 414, 7 };
136FieldActorEntry actor9 = { actor9Conditions, actor9Talks, 0xAC, 0xD, 400, 232, 7 };
138 &actor0,
139 &actor1,
140 &actor2,
141 &actor3,
142 &actor4,
143 &actor5,
144 &actor6,
145 &actor7,
146 &actor8,
147 &actor9,
148 NULL,
149};
151 { 1, 0, 0x40, 2, 0x40, 2, 0, 3, 6, 0, 521, 212, 0, 0 },
152 { 1, 0, 0x40, 2, 0x40, 2, 0, 3, 6, 0, 569, 236, 0, 0 },
153 { 1, 0, 0x40, 2, 0x41, 2, 0, 3, 6, 0, 617, 260, 0, 0 },
154 { 1, 0, 0x40, 2, 0x43, 2, 0, 5, 6, 0, 392, 163, 0, 0 },
155 { 1, 0, 0x40, 2, 0x44, 2, 0, 5, 6, 0, 369, 205, 0, 0 },
156 { 1, 0, 0x40, 6, 0x3F, 2, 0, 3, 6, 0, 360, 389, 0, 0 },
157 { 1, 0, 0x40, 6, 0x42, 2, 0, 5, 6, 0, 361, 186, 0, 0 },
158 { 1, 0, 0x40, 4, 0, 0, 0, 0, 0, 0, 377, 371, 399, 0 },
159 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
160};
162 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x2BE, 0x2D4, 0xC4, 7, 0, 0, 0 },
163 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_CLIMB_DOWN, 5, 0x1D0, 0xF8, 0, 0, 0, 0 },
164 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_CLIMB_UP, 5, 0x1E0, 0x150, 0, 0, 0, 0 },
165 { { { CODES_END, 0 }, { CODES_END, 0 } }, 0, 0, 0, 0, 0, 0, 0, 0 },
166};
167void (*stageFuncs[])(void) = {
169};
#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
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 PROGRESS(n)
GAME.progress is n.
Definition game_state.h:69
#define FLAG(group, id)
The codes of the (code, value) pairs that FLAGS_00 checks as conditions and applies as actions (event...
Definition game_state.h:68
#define MUSIC_SECRET_ROOM
BGM_0019: the Secret Room, the rebels' hideout.
Definition sound.h:95
#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_PRESIDENT_ARRESTED
WSTAG226 (Login Room, Amaterasu City), event 935, after the President of MAGAMI gives himself up (WST...
Definition story.h:136
@ STORY_AMATERASU_BRIDGE
WSTAG206 (Amaterasu Bridge), event 922: an Attacker holds the bridge.
Definition story.h:133
#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_JUNGLE_SOUND_TO_BLACK_ID_PASS
GAME.progress is from STORY_JUNGLE_SOUND to STORY_BLACK_ID_PASS (PROGRESS_RANGES[0x15])
Definition story.h:1926
#define SPECIAL_KOTEMON_IN_PARTY
PARTNER_KOTEMON is in the party.
Definition story.h:1709
#define SPECIAL_STORY_JUNGLE_SOUND_TO_PRESIDENT_ARRESTED
GAME.progress is from STORY_JUNGLE_SOUND to STORY_PRESIDENT_ARRESTED (PROGRESS_RANGES[0x17])
Definition story.h:1932
#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
#define SPECIAL_KOTEMON_LEVEL_45
PARTNER_KOTEMON is unlocked and at level 45 or more.
Definition story.h:1749
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 actor1Conditions[]
Definition wstag621.c:115
FieldActorEntry actor0
Definition wstag621.c:127
void(* stageFuncs[])(void)
The stage's functions (common/start_stage.inc.c calls the first): a StageFuncs in the stages with a t...
Definition wstag621.c:167
FieldActorEntry actor6
Definition wstag621.c:133
u16 actor9Talk1Actions[]
Definition wstag621.c:67
u16 actor0Talk0Conditions[]
Definition wstag621.c:56
FieldTalk actor2Talks[]
Definition wstag621.c:89
u16 actor0Talk1Conditions[]
Definition wstag621.c:57
u16 actor2Talk1Conditions[]
Definition wstag621.c:63
FieldActorEntry actor5
Definition wstag621.c:132
u16 actor1Talk1Conditions[]
Definition wstag621.c:60
FieldActorEntry actor2
Definition wstag621.c:129
u16 actor9Talk0Conditions[]
Definition wstag621.c:65
u16 actor9Conditions[]
Definition wstag621.c:120
FieldActorEntry * stageActors[]
Definition wstag621.c:137
FieldTalk actor1Talks[]
Definition wstag621.c:83
u16 actor1Talk0Conditions[]
Definition wstag621.c:59
FieldTalk actor0Talks[]
Definition wstag621.c:77
FieldActorEntry actor4
Definition wstag621.c:131
u16 actor2Talk2Conditions[]
Definition wstag621.c:64
FieldActorEntry actor8
Definition wstag621.c:135
ActorImage stageImages[]
Definition wstag621.c:38
FieldTalk actor6Talks[]
Definition wstag621.c:95
void setupStage(void)
Sets the stage up: its map and actors, playing BGM_0019.
Definition wstag621.c:20
StageTile stageObjects[]
The tables and color setupStage gives FIELDSTG_state (FieldState)
Definition wstag621.c:150
FieldActorEntry actor9
Definition wstag621.c:136
u16 actor8Conditions[]
Definition wstag621.c:119
u16 actor9Talk1Conditions[]
Definition wstag621.c:66
FieldTalk actor9Talks[]
Definition wstag621.c:107
u16 actor2Talk0Conditions[]
Definition wstag621.c:62
u16 actor6Conditions[]
Definition wstag621.c:117
u16 actor0Talk2Conditions[]
Definition wstag621.c:58
u16 actor9Talk3Actions[]
Definition wstag621.c:70
FieldActorEntry actor7
Definition wstag621.c:134
StageSlot stageSlots[]
Definition wstag621.c:161
u16 actor1Talk2Conditions[]
Definition wstag621.c:61
FieldActorEntry actor1
Definition wstag621.c:128
#define STAGE_FILE
Definition wstag621.c:17
u16 actor7Conditions[]
Definition wstag621.c:118
u16 actor2Conditions[]
Definition wstag621.c:116
FieldTalk actor7Talks[]
Definition wstag621.c:99
u16 actor9Talk2Conditions[]
Definition wstag621.c:68
u16 actor9Talk3Conditions[]
Definition wstag621.c:69
#define STAGE_TEXT
Definition wstag621.c:16
FieldTalk actor8Talks[]
Definition wstag621.c:103
FieldActorEntry actor3
Definition wstag621.c:130
u16 actor0Conditions[]
Definition wstag621.c:114