Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
wstag237.c
Go to the documentation of this file.
1/*
2 * WSTAG237: Underground Path, Asuka City.
3 */
4
5#include "common.h"
6#include "field/stage.h"
7
10
11/* After event 300, with Kail: moves the story on to STORY_AGUMON_DISGUISE */
15
16#if VERSION_US || VERSION_JP
17#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_05)
18#define EVENT_TEXT_FILE (TEXT_EVENTS_200 - 1)
19#define STAGE_FILE 0x2A9
20#define STAGE_ARCHIVE 0x330
21#elif VERSION_EU
22#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_05)
23#define EVENT_TEXT_FILE (TEXT_EVENTS_200 - 1)
24#define STAGE_FILE 0x2B8
25#define STAGE_ARCHIVE 0x33F
26#endif
27/* Sets the stage up: its map, actors and events, playing ASKA_BGM */
46
48 SCRIPT_FOLLOW(1, 2),
49 SCRIPT_WALK(2, 0x17C, 0xA1, 5),
50 SCRIPT_PLACE(0xB, 0x1A1, 0x91),
51 SCRIPT_POSE(0xB, 1, 1),
54 SCRIPT_POSE(2, 1, 5),
55 SCRIPT_WAIT(0x1E),
56 SCRIPT_TALK(0, 1, 0xB, 2),
57 SCRIPT_POSE(0xB, 7, 1),
59 SCRIPT_POSE(0xB, 1, 1),
60 SCRIPT_WAIT(0x1E),
61 SCRIPT_TALK(0, 2, 2, 0),
62 SCRIPT_POSE(2, 7, 5),
64 SCRIPT_POSE(2, 1, 5),
65 SCRIPT_WAIT(0x1E),
66 SCRIPT_TALK(0, 3, 0xB, 2),
67 SCRIPT_POSE(0xB, 7, 1),
69 SCRIPT_POSE(0xB, 1, 1),
70 SCRIPT_WAIT(0x1E),
71 SCRIPT_LEAVE(0x203, 0x60, 0x190, 5),
73};
75 { 0x200, 0x100, 0x21C, 0x1A6, 0x70, 0xA6, 0x230, 0x1FE },
76 { 0x200, 0x100, 0x200, 0x100, 0, 0, 0x220, 0x1FE },
77 { 0x200, 0x100, 0x216, 0x138, 0x58, 0x38, 0x200, 0x1FD },
78 { 0x200, 0x100, 0x208, 0x1BC, 0x20, 0xBC, 0x210, 0x1FD },
79 { 0x200, 0x100, 0x210, 0x1BC, 0x40, 0xBC, 0x220, 0x1FD },
80 { 0x200, 0x100, 0x200, 0x1BC, 0, 0xBC, 0x230, 0x1FD },
81 { 0x140, 0x100, 0x148, 0x130, 0x20, 0x30, 0x170, 0x1FF },
82};
85 { NULL, actor0Talk0Actions, 0x58 },
86 { NULL, NULL, 0 },
87};
95 { 1, 0, 0x40, 2, 0x32, 2, 0, 1, 6, 0, 261, 137, 0, 0 },
96 { 1, 0, 0x40, 6, 0x32, 2, 0, 1, 6, 0, 53, 223, 0, 0 },
97 { 1, 0, 0x40, 6, 0x32, 2, 0, 1, 6, 0, 173, 179, 0, 0 },
98 { 1, 0, 0x40, 6, 0x32, 2, 0, 1, 6, 0, 325, 105, 0, 0 },
99 { 1, 0, 0x40, 6, 0x33, 2, 0, 1, 6, 0, 435, 83, 0, 0 },
100 { 1, 0, 0x40, 6, 0x33, 2, 0, 1, 6, 0, 523, 127, 0, 0 },
101 { 1, 0, 0x40, 6, 0x33, 2, 0, 1, 6, 0, 555, 239, 0, 0 },
102 { 1, 0x64, 0x40, 6, 1, 0, 0, 0, 0, 0, 286, 127, 0, 0 },
103 { 1, 0, 0x40, 4, 0, 0, 0, 0, 0, 0, 224, 144, 184, 0 },
104 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
105};
107 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x201, 0xF0, 0x108, 7, 0, 0, 0 },
108 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x21B, 0x138, 0x64, 7, 0, 0, 0 },
109 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x20A, 0xA7, 0x153, 3, 0x64, 0, 0 },
110 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_CLIMB_DOWN, 6, 0x203, 0xC2, 0, 0, 0, 0 },
111 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_CLIMB_UP, 6, 0x212, 0x128, 0, 0, 0, 0 },
112 { { { CODES_END, 0 }, { CODES_END, 0 } }, 0, 0, 0, 0, 0, 0, 0, 0 },
113};
114void (*stageFuncs[])(void) = {
116};
118 { 300, script300, EVENT_TEXT(0x1B), NULL, endEvent300 },
119 { -1, NULL, 0, NULL, NULL },
120};
#define NULL
Definition common.h:17
signed short s16
Definition common.h:9
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 EVENT_TEXT(n)
An entry of the stage's events' text file, for FieldEvent.text.
Definition stage.h:732
#define SLOT_CLIMB_UP
Definition field_map.h:256
#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_LEAVE(mode, x, y, dir)
FIELDSTG_leaveField; ends the event.
Definition field_map.h:170
#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 SCRIPT_FOLLOW(snap, id)
FIELDSTG_followWithCamera.
Definition field_map.h:171
#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 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 START_EVENT(index)
action: FIELDSTG_startListedEvent
Definition game_state.h:81
#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_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,...
@ 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_AGUMON_DISGUISE
WSTAG237 (Underground Path), event 300: in the Agumon Suit; Kail goes on ahead alone.
Definition story.h:64
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
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 wstag237.c:83
FieldActorEntry actor0
Definition wstag237.c:89
void(* stageFuncs[])(void)
The stage's functions (common/start_stage.inc.c calls the first): a StageFuncs in the stages with a t...
Definition wstag237.c:114
FieldActorEntry * stageActors[]
Definition wstag237.c:90
void endEvent300(void)
After event 300, with Kail: moves the story on to STORY_AGUMON_DISGUISE.
Definition wstag237.c:12
FieldTalk actor0Talks[]
Definition wstag237.c:84
#define STAGE_ARCHIVE
Definition wstag237.c:25
ActorImage stageImages[]
Definition wstag237.c:74
void setupStage(void)
Sets the stage up: its map, actors and events, playing ASKA_BGM.
Definition wstag237.c:28
StageTile stageObjects[]
The tables and color setupStage gives FIELDSTG_state (FieldState)
Definition wstag237.c:94
s16 script300[]
Definition wstag237.c:47
StageSlot stageSlots[]
Definition wstag237.c:106
#define STAGE_FILE
Definition wstag237.c:24
#define STAGE_TEXT
Definition wstag237.c:22
FieldEvent stageEvents[]
Definition wstag237.c:117
u16 actor0Conditions[]
Definition wstag237.c:88