Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
field_stage.c
Go to the documentation of this file.
1/* The field's own stage: the ends of its events and its setup */
2
3#include "field/field_mode.h"
4
5/* The ends of the events of question n's answers (FIELDSTG_events): both set
6 event flag 0x400 + n, and the first answer's also applies a, the auction's
7 price (SPECIAL_LOSE_*_BIT), and b */
8#define END_CHOICE(n, a, b) \
9 void FIELDSTG_endChoice##n##Answer0(void) { \
10 FLAGS_00.applyAction(a, 1); \
11 FLAGS_00.applyAction(b, 1); \
12 FLAGS_00.applyAction(0x400 + n, 1); \
13 } \
14 \
15 void FIELDSTG_endChoice##n##Answer1(void) { \
16 FLAGS_00.applyAction(0x400 + n, 1); \
17 }
18
35
36/* The color the field's stage starts with (FieldState.spriteColor) */
37const CVECTOR FIELDSTG_startColor = {0x80, 0x80, 0x80, 0};
38
39#if VERSION_US || VERSION_JP
40#define FIELD_FILE 0x19F
41#elif VERSION_EU
42#define FIELD_FILE 0x1AD
43#endif
44
45/*
46 * The setup of the field's own stage (FIELDSTG_initFuncs), which fills
47 * FIELDSTG_state as the stage overlays' setup functions do; some points of the
48 * story change its soundBank and music. As theirs, the match depends on the
49 * start position being set with a constructor, (Vec2){x, y}.
50 */
52#if VERSION_US || VERSION_JP
54#endif
59#if VERSION_US || VERSION_JP
61#elif VERSION_EU
64#endif
65 FIELDSTG_state.start = (Vec2){0x6700, 0x12300};
73 FIELDSTG_map.setFile(0, FIELD_FILE << 16 | 2);
74 FIELDSTG_map.setFile(1, FIELD_FILE << 16 | 3);
77 switch (GAME.progress) {
96 break;
97 }
98}
GameState GAME
The save data, the game mode and the methods.
Definition state.c:64
#define FIELD_MAP_TRIGGERS
a cell's value: a direction (3 bits) and a StageSlot (5)
Definition field_map.h:88
FIELDSTG.PRO: the field mode, where the player walks around the map.
#define END_CHOICE(n, a, b)
The ends of the events of question n's answers (FIELDSTG_events): both set event flag 0x400 + n,...
Definition field_stage.c:8
void FIELDSTG_setupField(void)
The setup of the field's own stage (FIELDSTG_initFuncs), which fills FIELDSTG_state as the stage over...
Definition field_stage.c:51
#define FIELD_FILE
Definition field_stage.c:42
const CVECTOR FIELDSTG_startColor
The color the field's stage starts with (FieldState.spriteColor)
Definition field_stage.c:37
FieldEvent FIELDSTG_events[]
The story events (FIELDSTG_setupField), up to the first id -1: the scripts are WSTAG260's,...
Definition fieldstg.c:2572
FieldMap FIELDSTG_map
Definition fieldstg.c:3660
FieldActorEntry * FIELDSTG_actorList[]
Definition fieldstg.c:2501
StageTile FIELDSTG_mapObjects[]
The field's map objects (FieldState.objects), up to the first margin 0.
Definition fieldstg.c:2534
FieldImages FIELDSTG_images
The field's own image and its actors' (FieldState.images)
Definition fieldstg.c:2124
StageSlot FIELDSTG_slots[]
What the player can trigger on the field's map (FieldState.slots), up to type 0.
Definition fieldstg.c:2552
FieldState FIELDSTG_state
Definition fieldstg.c:2641
#define TEXT_TALKS_05
Definition file.h:264
#define TEXT_FILE(file)
Definition file.h:190
#define MUSIC_CARGO_TOWER
ENV_0204: the Cargo Tower.
Definition sound.h:143
#define MUSIC_EAUCTION
EAUCTION: the Cargo Tower at some points of the story (FIELDSTG_setupField)
Definition sound.h:142
#define MUSIC_BANK(music)
The sound bank of a music, which a stage loads for it (FieldState.soundBank)
Definition sound.h:148
#define SPECIAL_LOSE_32000_BIT
an action: takes 32000 BIT (MONEY_LOSSES[9])
Definition story.h:1856
@ STORY_BLACK_ID_PASS
WSTAG756 (Battle Gate), event 911: the Black ID Pass.
Definition story.h:131
@ 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_BLUE_ID_PASS
WSTAG421 (Qing Long City), event 743: with the Blue ID Pass a Trooper takes the player for the Qing L...
Definition story.h:109
@ 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_NUMEMON_FOUND
WSTAG685 (Underground Cave, Byakko City), event 413: the rock blocking the hole is Numemon.
Definition story.h:73
@ 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_WAY_TO_AMATERASU
WSTAG305, events 893 and 895: the way into Amaterasu City, the A.o.A's headquarters,...
Definition story.h:126
@ STORY_DE_KNOWLEDGE
WSTAG526 (Zhu Que UG Lake), event 760: the fight with Zanbamon (the DE Knowledge)
Definition story.h:115
@ STORY_GENBU_BADGE
WSTAG755 (Battle Gate), event 781: the Xuen Wu Chief, who holds the Black ID Pass,...
Definition story.h:118
@ STORY_ASUKA_HEADQUARTERS
WSTAG310 (A.o.A Headquarters, Asuka City), event 961.
Definition story.h:138
@ STORY_SEIRYU_BADGE
WSTAG420, event 71: the Seiryu Leader is beaten (the Silver ID and the Seiryu Badge),...
Definition story.h:39
#define SPECIAL_LOSE_4000_BIT
an action: takes 4000 BIT (MONEY_LOSSES[3])
Definition story.h:1844
#define SPECIAL_LOSE_17500_BIT
an action: takes 17500 BIT (MONEY_LOSSES[7])
Definition story.h:1852
#define SPECIAL_LOSE_6000_BIT
an action: takes 6000 BIT (MONEY_LOSSES[4])
Definition story.h:1846
#define SPECIAL_LOSE_24000_BIT
an action: takes 24000 BIT (MONEY_LOSSES[8])
Definition story.h:1854
#define SPECIAL_LOSE_2700_BIT
an action: takes 2700 BIT (MONEY_LOSSES[2])
Definition story.h:1842
#define SPECIAL_LOSE_1600_BIT
an action: takes 1600 BIT (MONEY_LOSSES[1])
Definition story.h:1840
#define SPECIAL_LOSE_11500_BIT
an action: takes 11500 BIT (MONEY_LOSSES[6])
Definition story.h:1850
#define SPECIAL_LOSE_8700_BIT
an action: takes 8700 BIT (MONEY_LOSSES[5])
Definition story.h:1848
#define SPECIAL_LOSE_800_BIT
an action: takes 800 BIT (MONEY_LOSSES[0])
Definition story.h:1838
FieldImage field
Definition field_mode.h:693
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
FieldImage * field
the field's image (the first two ActorImages)
Definition field_map.h:453
s32 music
SOUND.playSound's, or 0.
Definition field_map.h:460
Definition gfx.h:352