Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
wstag261.c File Reference

WSTAG261: Cargo Tower, Amaterasu City. More...

Include dependency graph for wstag261.c:

Go to the source code of this file.

Macros

#define STAGE_CHILDREN_SIZE   4
 
#define STAGE_TEXT   TEXT_FILE(TEXT_TALKS_03)
 
#define EVENT_TEXT_FILE   (TEXT_EVENTS_200 - 1)
 
#define STAGE_FILE   0x527
 

Functions

void handleCommand827 (Lift *task, s32 id)
 Runs a script command of the lift's: moves it up or down.
 
Lift * createCommand827 (s32 id)
 Creates the lift (updateTileLift), raised when flag 0x1C3D is set.
 
void updateStage (StageTask *task, void **children)
 The stage task: creates the object of map object 0x33B.
 
void setupStage (void)
 Sets the stage up: its map, actors and events, playing the ambience ENV_0204.
 

Variables

s16 tileLiftShake []
 Defined below, after the code that uses them.
 
const CVECTOR stageColor = { 0x80, 0x80, 0x80, 0 }
 the color the setup copies to FIELDSTG_state.spriteColor
 
s16 script1321 []
 
s16 script1326 []
 
ActorImage stageImages []
 
u16 actor0Talk0Conditions [] = { (( 0x1C ) << 8 | ( 0x3D )) , 0, 0xFFFF }
 
u16 actor0Talk0Actions [] = { (0x9000 | ( 0x62 )) , 1, (( 0x1C ) << 8 | ( 0x3D )) , 1, 0xFFFF }
 
u16 actor0Talk1Conditions [] = { (( 0x1C ) << 8 | ( 0x3D )) , 1, 0xFFFF }
 
u16 actor0Talk1Actions [] = { (0x9000 | ( 0x63 )) , 1, (( 0x1C ) << 8 | ( 0x3D )) , 0, 0xFFFF }
 
u16 actor1Talk0Conditions [] = { (( 0x1C ) << 8 | ( 0x3D )) , 0, 0xFFFF }
 
u16 actor1Talk0Actions [] = { (0x9000 | ( 0x62 )) , 1, (( 0x1C ) << 8 | ( 0x3D )) , 1, 0xFFFF }
 
u16 actor1Talk1Conditions [] = { (( 0x1C ) << 8 | ( 0x3D )) , 1, 0xFFFF }
 
u16 actor1Talk1Actions [] = { (0x9000 | ( 0x63 )) , 1, (( 0x1C ) << 8 | ( 0x3D )) , 0, 0xFFFF }
 
FieldTalk actor0Talks []
 
FieldTalk actor1Talks []
 
u16 actor0Conditions [] = { (( 0x1C ) << 8 | ( 0x3D )) , 0, 0xFFFF }
 
u16 actor1Conditions [] = { (( 0x1C ) << 8 | ( 0x3D )) , 1, 0xFFFF }
 
FieldActorEntry actor0 = { actor0Conditions, actor0Talks, 0x3F, 4, 176, 392, 1 }
 
FieldActorEntry actor1 = { actor1Conditions, actor1Talks, 0x3F, 4, 176, 265, 1 }
 
FieldActorEntry * stageActors []
 
StageTile stageObjects []
 The tables and color setupStage gives FIELDSTG_state (FieldState)
 
StageSlot stageSlots []
 
void(* stageFuncs [])(void)
 The stage's functions (common/start_stage.inc.c calls the first): a StageFuncs in the stages with a tween, which define STAGE_TWEEN before they include this file, and in the others an array of just setupStage.
 
FieldEvent stageEvents []
 

Detailed Description

WSTAG261: Cargo Tower, Amaterasu City.

On the Amaterasu server; its Asuka server twin is WSTAG260.

Definition in file wstag261.c.

Macro Definition Documentation

◆ STAGE_CHILDREN_SIZE

#define STAGE_CHILDREN_SIZE   4

Definition at line 56 of file wstag261.c.

◆ STAGE_TEXT

#define STAGE_TEXT   TEXT_FILE(TEXT_TALKS_03)

Definition at line 67 of file wstag261.c.

◆ EVENT_TEXT_FILE

#define EVENT_TEXT_FILE   (TEXT_EVENTS_200 - 1)

Definition at line 68 of file wstag261.c.

◆ STAGE_FILE

#define STAGE_FILE   0x527

Definition at line 69 of file wstag261.c.

Function Documentation

◆ handleCommand827()

void handleCommand827 ( Lift *  task,
s32  id 
)

Runs a script command of the lift's: moves it up or down.

< the lift's script commands: up the screen,

< and back down to the objects' place on the map

Definition at line 14 of file wstag261.c.

◆ createCommand827()

Lift * createCommand827 ( s32  id)

Creates the lift (updateTileLift), raised when flag 0x1C3D is set.

< 0x1C 0x00-0x40: FLAGS_00, GAME.flags02-flags40

Definition at line 30 of file wstag261.c.

Referenced by updateStage().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateStage()

void updateStage ( StageTask *  task,
void **  children 
)

The stage task: creates the object of map object 0x33B.

Definition at line 42 of file wstag261.c.

Here is the call graph for this function:

◆ setupStage()

void setupStage ( void  )

Sets the stage up: its map, actors and events, playing the ambience ENV_0204.

Sets the stage up: its map, actors, battles and events, playing KANRIBGM; BGM_0029 instead except at STORY_PRESIDENT_ARRESTED once flag 0x1A0A is set.

< ENV_0204: the Cargo Tower

< ENV_0204: the Cargo Tower

< a cell's value: a direction (3 bits) and a StageSlot (5)

Definition at line 72 of file wstag261.c.

Variable Documentation

◆ tileLiftShake

s16 tileLiftShake
Initial value:
= {
1, 2, 1, 0, -1, -2, -1, 0,
0x3E8, 0,
}

Defined below, after the code that uses them.

Definition at line 169 of file wstag261.c.

Referenced by updateTileLift().

◆ stageColor

const CVECTOR stageColor = { 0x80, 0x80, 0x80, 0 }

the color the setup copies to FIELDSTG_state.spriteColor

Definition at line 60 of file wstag261.c.

Referenced by setupStage().

◆ script1321

s16 script1321[]

Definition at line 93 of file wstag261.c.

◆ script1326

s16 script1326[]

Definition at line 131 of file wstag261.c.

◆ stageImages

ActorImage stageImages[]
Initial value:
= {
{ 0x200, 0x100, 0x21C, 0x1A6, 0x70, 0xA6, 0x230, 0x1FE },
{ 0x200, 0x100, 0x200, 0x100, 0, 0, 0x220, 0x1FE },
{ 0x200, 0x100, 0x216, 0x138, 0x58, 0x38, 0x200, 0x1FD },
{ 0x200, 0x100, 0x208, 0x1BC, 0x20, 0xBC, 0x210, 0x1FD },
{ 0x200, 0x100, 0x210, 0x1BC, 0x40, 0xBC, 0x220, 0x1FD },
{ 0x200, 0x100, 0x200, 0x1BC, 0, 0xBC, 0x230, 0x1FD },
{ 0, 0, 0, 0, 0, 0, 0, 0 },
}

Definition at line 173 of file wstag261.c.

Referenced by setupStage().

◆ actor0Talk0Conditions

u16 actor0Talk0Conditions[] = { (( 0x1C ) << 8 | ( 0x3D )) , 0, 0xFFFF }

Definition at line 182 of file wstag261.c.

◆ actor0Talk0Actions

u16 actor0Talk0Actions[] = { (0x9000 | ( 0x62 )) , 1, (( 0x1C ) << 8 | ( 0x3D )) , 1, 0xFFFF }

Definition at line 183 of file wstag261.c.

◆ actor0Talk1Conditions

u16 actor0Talk1Conditions[] = { (( 0x1C ) << 8 | ( 0x3D )) , 1, 0xFFFF }

Definition at line 184 of file wstag261.c.

◆ actor0Talk1Actions

u16 actor0Talk1Actions[] = { (0x9000 | ( 0x63 )) , 1, (( 0x1C ) << 8 | ( 0x3D )) , 0, 0xFFFF }

Definition at line 185 of file wstag261.c.

◆ actor1Talk0Conditions

u16 actor1Talk0Conditions[] = { (( 0x1C ) << 8 | ( 0x3D )) , 0, 0xFFFF }

Definition at line 186 of file wstag261.c.

◆ actor1Talk0Actions

u16 actor1Talk0Actions[] = { (0x9000 | ( 0x62 )) , 1, (( 0x1C ) << 8 | ( 0x3D )) , 1, 0xFFFF }

Definition at line 187 of file wstag261.c.

◆ actor1Talk1Conditions

u16 actor1Talk1Conditions[] = { (( 0x1C ) << 8 | ( 0x3D )) , 1, 0xFFFF }

Definition at line 188 of file wstag261.c.

◆ actor1Talk1Actions

u16 actor1Talk1Actions[] = { (0x9000 | ( 0x63 )) , 1, (( 0x1C ) << 8 | ( 0x3D )) , 0, 0xFFFF }

Definition at line 189 of file wstag261.c.

◆ actor0Talks

FieldTalk actor0Talks[]
Initial value:
= {
{ ((void *)0) , ((void *)0) , 0 },
}
u16 actor0Talk0Actions[]
Definition wstag261.c:183
u16 actor0Talk0Conditions[]
Definition wstag261.c:182
u16 actor0Talk1Conditions[]
Definition wstag261.c:184
u16 actor0Talk1Actions[]
Definition wstag261.c:185

Definition at line 190 of file wstag261.c.

◆ actor1Talks

FieldTalk actor1Talks[]
Initial value:
= {
{ ((void *)0) , ((void *)0) , 0 },
}
u16 actor1Talk1Conditions[]
Definition wstag261.c:188
u16 actor1Talk0Conditions[]
Definition wstag261.c:186
u16 actor1Talk1Actions[]
Definition wstag261.c:189
u16 actor1Talk0Actions[]
Definition wstag261.c:187

Definition at line 195 of file wstag261.c.

◆ actor0Conditions

u16 actor0Conditions[] = { (( 0x1C ) << 8 | ( 0x3D )) , 0, 0xFFFF }

Definition at line 200 of file wstag261.c.

◆ actor1Conditions

u16 actor1Conditions[] = { (( 0x1C ) << 8 | ( 0x3D )) , 1, 0xFFFF }

Definition at line 201 of file wstag261.c.

◆ actor0

FieldActorEntry actor0 = { actor0Conditions, actor0Talks, 0x3F, 4, 176, 392, 1 }

Definition at line 202 of file wstag261.c.

◆ actor1

FieldActorEntry actor1 = { actor1Conditions, actor1Talks, 0x3F, 4, 176, 265, 1 }

Definition at line 203 of file wstag261.c.

◆ stageActors

FieldActorEntry* stageActors[]
Initial value:
= {
((void *)0) ,
}
FieldActorEntry actor0
Definition wstag261.c:202
FieldActorEntry actor1
Definition wstag261.c:203

Definition at line 204 of file wstag261.c.

Referenced by setupStage().

◆ stageObjects

StageTile stageObjects[]
Initial value:
= {
{ 0, 1, 0x44, 2, 0x3A, 2, 0, 1, 4, 0, 312, 282, 0, 0 },
{ 1, 2, 0x40, 2, 0x32, 1, 0x32, 0x39, 4, 0, 135, 358, 0, 0 },
{ 1, 0, 0x40, 6, 0x3C, 0, 0, 0, 0, 0, 328, 194, 0, 0 },
{ 1, 0, 0x40, 6, 1, 0, 0, 0, 0, 0, 192, 417, 0, 0 },
{ 1, 3, 0xCD, 6, 0, 0, 0, 0, 0, 0, 160, 338, 0, 0 },
{ 1, 0, 0x40, 0xA, 0x3E, 0, 0, 0, 0, 0, 328, 272, 0, 0 },
{ 1, 0, 0x48, 0xA, 0x14, 0, 0, 0, 0, 0, 128, 202, 0, 0 },
{ 1, 0, 0x49, 0xA, 0x15, 0, 0, 0, 0, 0, 200, 183, 0, 0 },
{ 1, 0, 0x40, 4, 0x3D, 0, 0, 0, 0, 0, 336, 166, 193, 0 },
{ 1, 0, 0x40, 8, 0x3F, 0, 0, 0, 0, 0, 336, 244, 277, 0 },
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
}

The tables and color setupStage gives FIELDSTG_state (FieldState)

Definition at line 209 of file wstag261.c.

Referenced by setupStage().

◆ stageSlots

StageSlot stageSlots[]
Initial value:
= {
{ { { 0xFFFF , 0 }, { 0xFFFF , 0 } }, 1 , 0x271, 0x368, 0xF4, 1, 0, 0, 0 },
{ { { 0xFFFF , 0 }, { 0xFFFF , 0 } }, 1 , 0x281, 0x2FE, 0xA5, 1, 0, 0, 0 },
{ { { 0xFFFF , 0 }, { 0xFFFF , 0 } }, 6 , 1, 0, 0, 0, 0, 0, 0 },
{ { { 0xFFFF , 0 }, { 0xFFFF , 0 } }, 5 , 8, 0, 0, 0, 0, 0, 0 },
{ { { 0xFFFF , 0 }, { 0xFFFF , 0 } }, 0, 0, 0, 0, 0, 0, 0, 0 },
}

Definition at line 222 of file wstag261.c.

Referenced by setupStage().

◆ stageFuncs

void(* stageFuncs[])(void) ( void  )
Initial value:
= {
}
void setupStage(void)
Sets the stage up: its map, actors and events, playing the ambience ENV_0204.
Definition wstag261.c:72

The stage's functions (common/start_stage.inc.c calls the first): a StageFuncs in the stages with a tween, which define STAGE_TWEEN before they include this file, and in the others an array of just setupStage.

Definition at line 229 of file wstag261.c.

◆ stageEvents

FieldEvent stageEvents[]
Initial value:
= {
{ 1321, script1321, ( ( 0x113 - 1) << 16 | ( 0x2E )), ((void *)0) , ((void *)0) },
{ 1326, script1326, ( ( 0x113 - 1) << 16 | ( 0x2F )), ((void *)0) , ((void *)0) },
{ -1, ((void *)0) , 0, ((void *)0) , ((void *)0) },
}
s16 script1326[]
Definition wstag261.c:131
s16 script1321[]
Definition wstag261.c:93

Definition at line 232 of file wstag261.c.

Referenced by setupStage().