Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
wstag366.c
Go to the documentation of this file.
1/*
2 * WSTAG366: Forest Inn BF, East Sector. On the Amaterasu server; its Asuka
3 * server twin is WSTAG365.
4 */
5
6#include "common.h"
7#include "field/stage.h"
8
11
12/*
13 * After event 720, with Boy and Courageous Kenny: gives the player the Crony
14 * ID and keeps it from playing again
15 */
20
21#if VERSION_US || VERSION_JP
22#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_04)
23#define EVENT_TEXT_FILE (TEXT_EVENTS_300 - 1)
24#define STAGE_FILE 0x575
25#elif VERSION_EU
26#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_04)
27#define EVENT_TEXT_FILE (TEXT_EVENTS_300 - 1)
28#define STAGE_FILE 0x585
29#endif
30/* Sets the stage up: its map, actors and events, playing the ambience ENV_0009 */
49
51 SCRIPT_WALK(2, 0xE1, 0xF1, 3),
52 SCRIPT_PLACE(0x2D, 0xF1, 0xC9),
53 SCRIPT_POSE(0x2D, 1, 5),
56 SCRIPT_WAIT(0x1E),
57 SCRIPT_COMMAND(0x323, 0x325, 0x2D),
58 SCRIPT_WAIT(0x3C),
59 SCRIPT_POSE(0x2D, 1, 1),
60 SCRIPT_COMMAND(0x323, 0x326, 0x2D),
61 SCRIPT_WAIT(0x1E),
62 SCRIPT_WALK(0x2D, 0xC1, 0xE1, 1),
63 SCRIPT_WAIT_WALK(0x2D),
64 SCRIPT_POSE(0x2D, 1, 7),
65 SCRIPT_WAIT(0x1E),
66 SCRIPT_TALK(0, 1, 0x2D, 2),
68 SCRIPT_WAIT(0x1E),
69 SCRIPT_TALK(0, 2, 2, 1),
70 SCRIPT_POSE(2, 7, 3),
72 SCRIPT_POSE(2, 1, 3),
73 SCRIPT_WAIT(0x1E),
74 SCRIPT_TALK(0, 3, 0x2D, 2),
76 SCRIPT_WAIT(0x1E),
77 SCRIPT_TALK(0, 4, 2, 1),
78 SCRIPT_POSE(2, 7, 3),
80 SCRIPT_POSE(2, 1, 3),
81 SCRIPT_WAIT(0x1E),
82 SCRIPT_TALK(0, 5, 0x2D, 2),
84 SCRIPT_WAIT(0x1E),
85 SCRIPT_TALK(0, 6, 2, 1),
86 SCRIPT_POSE(2, 7, 3),
88 SCRIPT_POSE(2, 1, 3),
89 SCRIPT_WAIT(0x1E),
90 SCRIPT_TALK(0, 7, 0x2D, 2),
92 SCRIPT_WAIT(0x1E),
93 SCRIPT_TALK(0, 8, 2, 1),
94 SCRIPT_POSE(2, 7, 3),
96 SCRIPT_POSE(2, 1, 3),
97 SCRIPT_WAIT(0x1E),
98 SCRIPT_TALK(0, 9, 0x2D, 2),
100 SCRIPT_WAIT(0x1E),
101 SCRIPT_TALK(0, 0xA, 2, 1),
102 SCRIPT_POSE(2, 7, 3),
104 SCRIPT_POSE(2, 1, 3),
105 SCRIPT_WAIT(0x1E),
106 SCRIPT_TALK(0, 0xB, 0x2D, 2),
108 SCRIPT_WAIT(0x1E),
109 SCRIPT_TALK(0, 0xC, 2, 3),
110 SCRIPT_POSE(2, 7, 3),
112 SCRIPT_POSE(2, 1, 3),
113 SCRIPT_WAIT(0x1E),
114 SCRIPT_TALK(0, 0xD, 0x2D, 2),
117 SCRIPT_WAIT(0x1E),
118 SCRIPT_TALK(0, 0xE, 2, 1),
119 SCRIPT_POSE(2, 7, 3),
121 SCRIPT_POSE(2, 1, 3),
122 SCRIPT_WAIT(0x1E),
123 SCRIPT_TALK(0, 0xF, 0x2D, 2),
125 SCRIPT_WAIT(0x1E),
126 SCRIPT_TALK(0, 0x10, 2, 1),
127 SCRIPT_POSE(2, 7, 3),
129 SCRIPT_POSE(2, 1, 3),
130 SCRIPT_WAIT(0x1E),
131 SCRIPT_TALK(0, 0x11, 0x2D, 2),
133 SCRIPT_WAIT(0x1E),
134 SCRIPT_TALK(0, 0x12, 2, 1),
135 SCRIPT_POSE(2, 7, 3),
137 SCRIPT_POSE(2, 1, 3),
138 SCRIPT_WAIT(0x1E),
139 SCRIPT_POSE(0x2D, 1, 3),
140 SCRIPT_WAIT(0x1E),
141 SCRIPT_WALK(0x2D, 0x49, 0xA5, 3),
142 SCRIPT_WAIT_WALK(0x2D),
143 SCRIPT_PLACE(0x2D, 0, 0),
144 SCRIPT_POSE(0x2D, 1, 0),
145 SCRIPT_WAIT(0x1E),
146 SCRIPT_TALK(0, 0x13, 2, 1),
148 SCRIPT_WAIT(0x1E),
150};
152 { 0x200, 0x100, 0x21C, 0x1A6, 0x70, 0xA6, 0x230, 0x1FE },
153 { 0x200, 0x100, 0x200, 0x100, 0, 0, 0x220, 0x1FE },
154 { 0x200, 0x100, 0x216, 0x138, 0x58, 0x38, 0x200, 0x1FD },
155 { 0x200, 0x100, 0x208, 0x1BC, 0x20, 0xBC, 0x210, 0x1FD },
156 { 0x200, 0x100, 0x210, 0x1BC, 0x40, 0xBC, 0x220, 0x1FD },
157 { 0x200, 0x100, 0x200, 0x1BC, 0, 0xBC, 0x230, 0x1FD },
158 { 0x140, 0x100, 0x170, 0x150, 0xC0, 0x50, 0x160, 0x1FF },
159};
165FieldActorEntry actor0 = { actor0Conditions, NULL, 0x2D, 4, 241, 201, 5 };
167 &actor0,
168 NULL,
169};
171 { 1, 0, 0x40, 2, 0x34, 2, 0, 7, 4, 0, 97, 134, 0, 0 },
172 { 1, 0, 0x40, 2, 0x35, 2, 0, 7, 4, 0, 137, 114, 0, 0 },
173 { 1, 0, 0x40, 6, 0x32, 2, 0, 7, 4, 0, 321, 137, 0, 0 },
174 { 1, 0, 0x40, 6, 0x32, 2, 0, 7, 4, 0, 577, 313, 0, 0 },
175 { 1, 0, 0x40, 6, 0x33, 2, 0, 7, 4, 0, 497, 272, 0, 0 },
176 { 1, 0, 0x40, 6, 0x34, 2, 0, 7, 4, 0, 167, 516, 0, 0 },
177 { 1, 0, 0x40, 6, 0x35, 2, 0, 7, 4, 0, 187, 293, 0, 0 },
178 { 1, 0, 0x40, 6, 0x36, 2, 0, 7, 4, 0, 307, 233, 0, 0 },
179 { 1, 0, 0x40, 4, 0, 0, 0, 0, 0, 0, 276, 208, 242, 0 },
180 { 1, 0, 0x40, 4, 1, 0, 0, 0, 0, 0, 51, 156, 208, 0 },
181 { 1, 0, 0x40, 4, 2, 0, 0, 0, 0, 0, 425, 290, 314, 0 },
182 { 1, 0, 0x40, 4, 3, 0, 0, 0, 0, 0, 421, 428, 438, 0 },
183 { 1, 0, 0x40, 4, 4, 0, 0, 0, 0, 0, 423, 392, 429, 0 },
184 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
185};
187 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x292, 0x156, 0x1B0, 3, 0, 0, 0 },
188 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x245, 0x5E8, 0xDC, 3, 0, 0, 0 },
189 { { { PROGRESS(STORY_JUNGLE_SOUND), 1 }, { FLAG_TEDDY_FOREST_INN_SEEN, 0 } }, SLOT_EVENT, 0x2D0, 0, 0, 0, 0, 0, 0 },
190 { { { CODES_END, 0 }, { CODES_END, 0 } }, 0, 0, 0, 0, 0, 0, 0, 0 },
191};
192void (*stageFuncs[])(void) = {
194};
196 { 720, script720, EVENT_TEXT(0xD), NULL, endEvent720 },
197 { -1, NULL, 0, NULL, NULL },
198};
#define NULL
Definition common.h:17
signed short s16
Definition common.h:9
unsigned short u16
Definition common.h:10
GameFlags FLAGS_00
The flag bitset FLAGS_00 and the event functions.
Definition events.c:701
The stage overlays (AAA/PRO/WSTAG###.PRO), loaded at 0x800A4CA4 on top of FIELDSTG.
#define EVENT_TEXT(n)
An entry of the stage's events' text file, for FieldEvent.text.
Definition stage.h:732
#define SCRIPT_WAIT_WALK(id)
until the character gets to its goal
Definition field_map.h:168
#define FIELD_COMMAND_HALT_PARTNERS
The field commands, which an event script hands FIELD_TASK_COMMANDS as the first argument of a pose c...
Definition field_map.h:41
#define SCRIPT_END
The commands of an event script (FieldEvent.script), as FIELDSTG_runEvent reads them: a halfword kind...
Definition field_map.h:156
#define SCRIPT_COMMAND(id, command, arg)
the same word for a script command's id: FIELDSTG_setEventPose creates its task if none runs and hand...
Definition field_map.h:161
#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 FIELD_COMMAND_ICON3
its substate 3, with ITEM_GET
Definition field_map.h:44
#define SLOT_EVENT
starts the event arg
Definition field_map.h:262
#define SCRIPT_WALK(id, x, y, dir)
Actor.setGoal: walks to (x, y), then faces dir.
Definition field_map.h:162
#define SCRIPT_WAIT_BOX
until box 0 closes
Definition field_map.h:167
#define SLOT_EXIT
The kinds of StageSlot (type).
Definition field_map.h:255
#define SCRIPT_POSE(id, set, dir)
Actor.setPose: its animation set, facing dir.
Definition field_map.h:158
#define FIELD_MAP_TRIGGERS
a cell's value: a direction (3 bits) and a StageSlot (5)
Definition field_map.h:88
#define SCRIPT_WAIT(frames)
Definition field_map.h:166
#define FIELD_TASK_COMMANDS
script command 813 (FIELDSTG_startCommandTask): the field commands
Definition field_map.h:33
#define SCRIPT_PLACE(id, x, y)
puts a character at (x, y)
Definition field_map.h:157
#define SCRIPT_TALK(box, entry, id, kind)
box of the event's boxes shows the event text's entry: a talk box at the corner kind next to the char...
Definition field_map.h:165
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 MUSIC_FOREST_INN_BF
ENV_0009: the Forest Inn's basement.
Definition sound.h:125
#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_JUNGLE_SOUND
WSTAG545 (Bug Maze Pit), event 711: Patamon heard a weird sound from the jungle, where its leader wen...
Definition story.h:106
#define FLAG_TEDDY_FOREST_INN_SEEN
wstag366 event 720: Teddy catches up before Amaterasu City and the player gets the Crony ID; set at i...
Definition story.h:1348
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
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
void(* applyAction)(s32 code, s32 value)
Definition game_state.h:52
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
FieldActorEntry actor0
Definition wstag366.c:165
void(* stageFuncs[])(void)
The stage's functions (common/start_stage.inc.c calls the first): a StageFuncs in the stages with a t...
Definition wstag366.c:192
void endEvent720(void)
After event 720, with Boy and Courageous Kenny: gives the player the Crony ID and keeps it from playi...
Definition wstag366.c:16
FieldActorEntry * stageActors[]
Definition wstag366.c:166
s16 script720[]
Definition wstag366.c:50
ActorImage stageImages[]
Definition wstag366.c:151
void setupStage(void)
Sets the stage up: its map, actors and events, playing the ambience ENV_0009.
Definition wstag366.c:31
StageTile stageObjects[]
The tables and color setupStage gives FIELDSTG_state (FieldState)
Definition wstag366.c:170
StageSlot stageSlots[]
Definition wstag366.c:186
#define STAGE_FILE
Definition wstag366.c:28
#define STAGE_TEXT
Definition wstag366.c:26
FieldEvent stageEvents[]
Definition wstag366.c:195
u16 actor0Conditions[]
Definition wstag366.c:160