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

WSTAG936: Water Tunnel, Amaterasu City, in the extra chapter. More...

#include "common.h"
#include "field/stage.h"
#include "common/update_stage.inc.c"
#include "common/start_stage.inc.c"
Include dependency graph for wstag936.c:

Go to the source code of this file.

Macros

#define STAGE_TEXT   TEXT_FILE(TEXT_TALKS_08)
 
#define STAGE_FILE   0x8FF
 
#define STAGE_FILE_8   0x1B0
 

Functions

void setupStage (void)
 Sets the stage up: its map and actors, playing the ambience ENV_0004.
 

Variables

const CVECTOR stageColor = { 0x54, 0x67, 0x96, 0x00 }
 the color the setup copies to FIELDSTG_state.spriteColor
 
ActorImage stageImages []
 
u16 actor0Talk0Conditions [] = { (( 0x18 ) << 8 | ( 6 )) , 1, 0xFFFF }
 
u16 actor0Talk1Conditions [] = { (( 0x18 ) << 8 | ( 6 )) , 0, (( 0 ) << 8 | ( 0 )) , 0, 0xFFFF }
 
u16 actor0Talk1Actions [] = { (( 0 ) << 8 | ( 0 )) , 1, 0xFFFF }
 
u16 actor0Talk2Conditions []
 
u16 actor0Talk2Actions [] = { (( 0 ) << 8 | ( 1 )) , 1, 0xFFFF }
 
u16 actor0Talk3Conditions []
 
u16 actor0Talk3Actions [] = { (( 0 ) << 8 | ( 2 )) , 1, 0xFFFF }
 
u16 actor0Talk4Conditions []
 
u16 actor0Talk4Actions [] = { (( 0 ) << 8 | ( 3 )) , 1, 0xFFFF }
 
u16 actor0Talk5Conditions []
 
u16 actor0Talk5Actions [] = { (( 0 ) << 8 | ( 4 )) , 1, 0xFFFF }
 
u16 actor0Talk6Conditions []
 
u16 actor0Talk6Actions []
 
FieldTalk actor0Talks []
 
FieldActorEntry actor0 = { ((void *)0) , actor0Talks, 0x3F, 4, 175, 408, 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.
 

Detailed Description

WSTAG936: Water Tunnel, Amaterasu City, in the extra chapter.

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

Definition in file wstag936.c.

Macro Definition Documentation

◆ STAGE_TEXT

#define STAGE_TEXT   TEXT_FILE(TEXT_TALKS_08)

Definition at line 15 of file wstag936.c.

◆ STAGE_FILE

#define STAGE_FILE   0x8FF

Definition at line 16 of file wstag936.c.

◆ STAGE_FILE_8

#define STAGE_FILE_8   0x1B0

Definition at line 17 of file wstag936.c.

Function Documentation

◆ setupStage()

void setupStage ( void  )

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

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_0004: the Water Tunnel

< ENV_0004: the Water Tunnel

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

Definition at line 24 of file wstag936.c.

Variable Documentation

◆ stageColor

const CVECTOR stageColor = { 0x54, 0x67, 0x96, 0x00 }

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 13 of file wstag936.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 },
{ 0, 0, 0, 0, 0, 0, 0, 0 },
}

Definition at line 43 of file wstag936.c.

Referenced by setupStage().

◆ actor0Talk0Conditions

u16 actor0Talk0Conditions[] = { (( 0x18 ) << 8 | ( 6 )) , 1, 0xFFFF }

Definition at line 52 of file wstag936.c.

◆ actor0Talk1Conditions

u16 actor0Talk1Conditions[] = { (( 0x18 ) << 8 | ( 6 )) , 0, (( 0 ) << 8 | ( 0 )) , 0, 0xFFFF }

Definition at line 53 of file wstag936.c.

◆ actor0Talk1Actions

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

Definition at line 54 of file wstag936.c.

◆ actor0Talk2Conditions

u16 actor0Talk2Conditions[]
Initial value:
= {
(( 0x18 ) << 8 | ( 6 )) , 0,
(( 0 ) << 8 | ( 0 )) , 1,
(( 0 ) << 8 | ( 1 )) , 0,
0xFFFF ,
}

Definition at line 55 of file wstag936.c.

◆ actor0Talk2Actions

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

Definition at line 61 of file wstag936.c.

◆ actor0Talk3Conditions

u16 actor0Talk3Conditions[]
Initial value:
= {
(( 0x18 ) << 8 | ( 6 )) , 0,
(( 0 ) << 8 | ( 0 )) , 1,
(( 0 ) << 8 | ( 1 )) , 1,
(( 0 ) << 8 | ( 2 )) , 0,
0xFFFF ,
}

Definition at line 62 of file wstag936.c.

◆ actor0Talk3Actions

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

Definition at line 69 of file wstag936.c.

◆ actor0Talk4Conditions

u16 actor0Talk4Conditions[]
Initial value:
= {
(( 0x18 ) << 8 | ( 6 )) , 0,
(( 0 ) << 8 | ( 0 )) , 1,
(( 0 ) << 8 | ( 1 )) , 1,
(( 0 ) << 8 | ( 2 )) , 1,
(( 0 ) << 8 | ( 3 )) , 0,
0xFFFF ,
}

Definition at line 70 of file wstag936.c.

◆ actor0Talk4Actions

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

Definition at line 78 of file wstag936.c.

◆ actor0Talk5Conditions

u16 actor0Talk5Conditions[]
Initial value:
= {
(( 0x18 ) << 8 | ( 6 )) , 0,
(( 0 ) << 8 | ( 0 )) , 1,
(( 0 ) << 8 | ( 1 )) , 1,
(( 0 ) << 8 | ( 2 )) , 1,
(( 0 ) << 8 | ( 4 )) , 0,
(( 0 ) << 8 | ( 3 )) , 1,
0xFFFF ,
}

Definition at line 79 of file wstag936.c.

◆ actor0Talk5Actions

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

Definition at line 88 of file wstag936.c.

◆ actor0Talk6Conditions

u16 actor0Talk6Conditions[]
Initial value:
= {
(( 0x18 ) << 8 | ( 6 )) , 0,
(( 0 ) << 8 | ( 0 )) , 1,
(( 0 ) << 8 | ( 1 )) , 1,
(( 0 ) << 8 | ( 2 )) , 1,
(( 0 ) << 8 | ( 3 )) , 1,
(( 0 ) << 8 | ( 4 )) , 1,
0xFFFF ,
}

Definition at line 89 of file wstag936.c.

◆ actor0Talk6Actions

u16 actor0Talk6Actions[]
Initial value:
= {
(( 0x18 ) << 8 | ( 6 )) , 1,
(0x8000 | ( 0 ) << 9 | ( 0x25 )), 1,
(0x7000 | ( 0x13 )) , 1,
0xFFFF ,
}

Definition at line 98 of file wstag936.c.

◆ actor0Talks

FieldTalk actor0Talks[]
Initial value:
= {
{ actor0Talk0Conditions, ((void *)0) , 0x58 },
{ ((void *)0) , ((void *)0) , 0 },
}
u16 actor0Talk0Conditions[]
Definition wstag936.c:52
u16 actor0Talk1Conditions[]
Definition wstag936.c:53
u16 actor0Talk6Actions[]
Definition wstag936.c:98
u16 actor0Talk3Conditions[]
Definition wstag936.c:62
u16 actor0Talk1Actions[]
Definition wstag936.c:54
u16 actor0Talk4Conditions[]
Definition wstag936.c:70
u16 actor0Talk4Actions[]
Definition wstag936.c:78
u16 actor0Talk2Actions[]
Definition wstag936.c:61
u16 actor0Talk5Conditions[]
Definition wstag936.c:79
u16 actor0Talk2Conditions[]
Definition wstag936.c:55
u16 actor0Talk5Actions[]
Definition wstag936.c:88
u16 actor0Talk6Conditions[]
Definition wstag936.c:89
u16 actor0Talk3Actions[]
Definition wstag936.c:69

Definition at line 104 of file wstag936.c.

◆ actor0

FieldActorEntry actor0 = { ((void *)0) , actor0Talks, 0x3F, 4, 175, 408, 1 }

Definition at line 114 of file wstag936.c.

◆ stageActors

FieldActorEntry* stageActors[]
Initial value:
= {
((void *)0) ,
}
FieldActorEntry actor0
Definition wstag936.c:114

Definition at line 115 of file wstag936.c.

Referenced by setupStage().

◆ stageObjects

StageTile stageObjects[]
Initial value:
= {
{ 1, 0, 0x9F, 2, 0x37, 1, 0x37, 0x39, 6, 0, 450, 296, 0, 0 },
{ 1, 0, 0xBE, 2, 0x3A, 1, 0x3A, 0x3C, 6, 0, 560, 270, 0, 0 },
{ 1, 0, 0x8F, 2, 0x1D, 1, 0x1D, 0x31, 8, 0, 584, 352, 0, 0 },
{ 1, 0, 0xB6, 2, 6, 1, 6, 0x1C, 8, 0, 471, 277, 0, 0 },
{ 1, 0, 0xB6, 2, 6, 1, 6, 0x1C, 8, 0, 535, 294, 0, 0 },
{ 1, 0, 0x70, 2, 4, 0, 0, 0, 0, 0, 374, 310, 0, 0 },
{ 1, 0, 0xD0, 2, 5, 0, 0, 0, 0, 0, 438, 232, 0, 0 },
{ 1, 0, 0x40, 6, 0x32, 2, 0, 1, 4, 0, 609, 253, 0, 0 },
{ 1, 0, 0x40, 6, 0x33, 2, 0, 1, 4, 0, 633, 246, 0, 0 },
{ 1, 0, 0x40, 6, 0x34, 2, 0, 1, 4, 0, 640, 242, 0, 0 },
{ 1, 0, 0x40, 6, 0x35, 2, 0, 1, 4, 0, 652, 281, 0, 0 },
{ 1, 0, 0x9F, 6, 0x37, 1, 0x37, 0x39, 6, 0, 366, 170, 0, 0 },
{ 1, 0, 0x67, 6, 0x3D, 1, 0x3D, 0x52, 8, 0, 507, 185, 0, 0 },
{ 1, 0, 0xB6, 6, 6, 1, 6, 0x1C, 8, 0, 421, 106, 0, 0 },
{ 1, 0x64, 0x40, 6, 2, 0, 0, 0, 0, 0, 91, 362, 0, 0 },
{ 1, 0x65, 0x40, 6, 3, 0, 0, 0, 0, 0, 770, 115, 0, 0 },
{ 1, 0, 0x90, 4, 0, 0, 0, 0, 0, 0, 0, 256, 410, 0 },
{ 1, 0, 0xB0, 4, 1, 0, 0, 0, 0, 0, 768, 0, 165, 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 119 of file wstag936.c.

Referenced by setupStage().

◆ stageSlots

StageSlot stageSlots[]
Initial value:
= {
{ { { 0xFFFF , 0 }, { 0xFFFF , 0 } }, 1 , 0x282, 0x13A, 0x144, 3, 0x64, 0, 0 },
{ { { 0xFFFF , 0 }, { 0xFFFF , 0 } }, 1 , 0x27F, 0xE8, 0x1A2, 5, 0x65, 0, 0 },
{ { { 0xFFFF , 0 }, { 0xFFFF , 0 } }, 0, 0, 0, 0, 0, 0, 0, 0 },
}

Definition at line 140 of file wstag936.c.

Referenced by setupStage().

◆ stageFuncs

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

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 145 of file wstag936.c.