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

WSTAG934: Cargo Tower, Amaterasu City, in the extra chapter. More...

Include dependency graph for wstag934.c:

Go to the source code of this file.

Macros

#define STAGE_TWEEN
 stageFuncs is a StageFuncs (stage.h)
 
#define STAGE_TEXT   TEXT_FILE(TEXT_TALKS_08)
 
#define STAGE_FILE   0x8FB
 
#define STAGE_FILE_8   0x1AC
 

Functions

void handleTileLift (Lift *task, s32 id)
 Runs a script command of the lift's: moves it up or down.
 
Lift * createTileLift (s32 id)
 Creates the lift (updateTileLift), raised when flag 0x1C3D is set; nothing in the game calls it.
 
StageTask * startStage (void *owner)
 Creates the stage task (updateStage) of the given owner.
 
void setupStage (void)
 Sets the stage up: its map and actors, 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
 
ActorImage stageImages []
 
u16 actor1Talk0Conditions [] = { (( 0 ) << 8 | ( 0 )) , 0, 0xFFFF }
 
u16 actor1Talk0Actions [] = { (( 0 ) << 8 | ( 0 )) , 1, 0xFFFF }
 
u16 actor1Talk1Conditions [] = { (( 0 ) << 8 | ( 0 )) , 1, (0x8000 | ( 0 ) << 9 | ( 0x192 )), 0, 0xFFFF }
 
u16 actor1Talk1Actions [] = { (0x8000 | ( 0 ) << 9 | ( 0x192 )), 1, (0x7000 | ( 0x13 )) , 1, 0xFFFF }
 
u16 actor1Talk2Conditions [] = { (( 0 ) << 8 | ( 0 )) , 1, (0x8000 | ( 0 ) << 9 | ( 0x192 )), 1, 0xFFFF }
 
FieldTalk actor0Talks []
 
FieldTalk actor1Talks []
 
FieldActorEntry actor0 = { ((void *)0) , actor0Talks, 0x2D, 4, 271, 361, 5 }
 
FieldActorEntry actor1 = { ((void *)0) , actor1Talks, 0x67, 5, 191, 400, 3 }
 
FieldActorEntry * stageActors []
 
StageTile stageObjects []
 The tables and color setupStage gives FIELDSTG_state (FieldState)
 
StageSlot stageSlots []
 
StageFuncs stageFuncs = { setupStage, startTween, updateTween }
 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.
 

Detailed Description

WSTAG934: Cargo Tower, Amaterasu City, in the extra chapter.

The European version's: in its extra chapter (STORY_EXTRA), mode 639 starts it instead of WSTAG261.

Definition in file wstag934.c.

Macro Definition Documentation

◆ STAGE_TWEEN

#define STAGE_TWEEN

stageFuncs is a StageFuncs (stage.h)

Definition at line 8 of file wstag934.c.

◆ STAGE_TEXT

#define STAGE_TEXT   TEXT_FILE(TEXT_TALKS_08)

Definition at line 58 of file wstag934.c.

◆ STAGE_FILE

#define STAGE_FILE   0x8FB

Definition at line 59 of file wstag934.c.

◆ STAGE_FILE_8

#define STAGE_FILE_8   0x1AC

Definition at line 60 of file wstag934.c.

Function Documentation

◆ handleTileLift()

void handleTileLift ( 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 16 of file wstag934.c.

◆ createTileLift()

Lift * createTileLift ( s32  id)

Creates the lift (updateTileLift), raised when flag 0x1C3D is set; nothing in the game calls it.

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

Definition at line 32 of file wstag934.c.

Here is the call graph for this function:

◆ startStage()

StageTask * startStage ( void *  owner)

Creates the stage task (updateStage) of the given owner.

Definition at line 46 of file wstag934.c.

Here is the call graph for this function:

◆ setupStage()

void setupStage ( void  )

Sets the stage up: its map and actors, 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 67 of file wstag934.c.

Variable Documentation

◆ tileLiftShake

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

Defined below, after the code that uses them.

Definition at line 90 of file wstag934.c.

◆ stageColor

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

the color the setup copies to FIELDSTG_state.spriteColor

the color the setup copies to FIELDSTG_state.spriteColor

It starts the stage, before its jump tables: in wstag924.c GCC would align them to 8 bytes after it, so it is a file of its own, linked first

Definition at line 55 of file wstag934.c.

Referenced by setupStage().

◆ 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 },
{ 0x180, 0x100, 0x18C, 0x1DD, 0x130, 0xDD, 0x160, 0x1FE },
{ 0x1C0, 0x100, 0x1EA, 0x13C, 0x2A8, 0x3C, 0x170, 0x1FE },
}

Definition at line 100 of file wstag934.c.

Referenced by setupStage().

◆ actor1Talk0Conditions

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

Definition at line 110 of file wstag934.c.

◆ actor1Talk0Actions

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

Definition at line 111 of file wstag934.c.

◆ actor1Talk1Conditions

u16 actor1Talk1Conditions[] = { (( 0 ) << 8 | ( 0 )) , 1, (0x8000 | ( 0 ) << 9 | ( 0x192 )), 0, 0xFFFF }

Definition at line 112 of file wstag934.c.

◆ actor1Talk1Actions

u16 actor1Talk1Actions[] = { (0x8000 | ( 0 ) << 9 | ( 0x192 )), 1, (0x7000 | ( 0x13 )) , 1, 0xFFFF }

Definition at line 113 of file wstag934.c.

◆ actor1Talk2Conditions

u16 actor1Talk2Conditions[] = { (( 0 ) << 8 | ( 0 )) , 1, (0x8000 | ( 0 ) << 9 | ( 0x192 )), 1, 0xFFFF }

Definition at line 114 of file wstag934.c.

◆ actor0Talks

FieldTalk actor0Talks[]
Initial value:
= {
{ ((void *)0) , ((void *)0) , 0x41 },
{ ((void *)0) , ((void *)0) , 0 },
}

Definition at line 115 of file wstag934.c.

◆ actor1Talks

FieldTalk actor1Talks[]
Initial value:
= {
{ actor1Talk2Conditions, ((void *)0) , 0x40 },
{ ((void *)0) , ((void *)0) , 0 },
}
u16 actor1Talk1Conditions[]
Definition wstag934.c:112
u16 actor1Talk0Conditions[]
Definition wstag934.c:110
u16 actor1Talk1Actions[]
Definition wstag934.c:113
u16 actor1Talk0Actions[]
Definition wstag934.c:111
u16 actor1Talk2Conditions[]
Definition wstag934.c:114

Definition at line 119 of file wstag934.c.

◆ actor0

FieldActorEntry actor0 = { ((void *)0) , actor0Talks, 0x2D, 4, 271, 361, 5 }

Definition at line 125 of file wstag934.c.

◆ actor1

FieldActorEntry actor1 = { ((void *)0) , actor1Talks, 0x67, 5, 191, 400, 3 }

Definition at line 126 of file wstag934.c.

◆ stageActors

FieldActorEntry* stageActors[]
Initial value:
= {
((void *)0) ,
}
FieldActorEntry actor0
Definition wstag934.c:125
FieldActorEntry actor1
Definition wstag934.c:126

Definition at line 127 of file wstag934.c.

Referenced by setupStage().

◆ stageObjects

StageTile stageObjects[]
Initial value:
= {
{ 1, 1, 0x44, 2, 0x52, 2, 0, 1, 4, 0, 312, 282, 0, 0 },
{ 1, 2, 0x40, 2, 0x4A, 1, 0x4A, 0x51, 4, 0, 135, 358, 0, 0 },
{ 1, 0, 0x40, 6, 0x3E, 1, 0x3E, 0x43, 4, 0, 357, 161, 0, 0 },
{ 1, 0, 0x40, 6, 1, 0, 0, 0, 0, 0, 192, 417, 0, 0 },
{ 1, 0, 0x40, 6, 2, 1, 2, 7, 4, 0, 357, 161, 0, 0 },
{ 1, 3, 0xCD, 6, 0, 0, 0, 0, 0, 0, 160, 338, 0, 0 },
{ 1, 0, 0x40, 0xA, 0x44, 1, 0x44, 0x49, 4, 0, 357, 241, 0, 0 },
{ 1, 0, 0x40, 0xA, 8, 1, 8, 0xD, 4, 0, 357, 241, 0, 0 },
{ 1, 0, 0x40, 0xA, 0xF, 1, 0xF, 0x13, 4, 0, 62, 326, 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, 0x32, 1, 0x32, 0x37, 4, 0, 357, 161, 200, 0 },
{ 1, 0, 0x40, 8, 0x38, 1, 0x38, 0x3D, 4, 0, 357, 241, 280, 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 132 of file wstag934.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 148 of file wstag934.c.

Referenced by setupStage().

◆ stageFuncs

StageFuncs stageFuncs ( void  ) = { setupStage, startTween, updateTween }

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 155 of file wstag934.c.

Referenced by startStage().