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

WSTAG938: Amaterasu Sewer, 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 wstag938.c:

Go to the source code of this file.

Macros

#define STAGE_TEXT   TEXT_FILE(TEXT_TALKS_08)
 
#define STAGE_FILE   0x903
 
#define STAGE_FILE_8   0x2A3
 

Functions

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

Variables

const CVECTOR stageColor = { 0x54, 0x67, 0x96, 0x00 }
 the color the setup copies to FIELDSTG_state.spriteColor
 
ActorImage stageImages []
 
u16 actor0Talk0Actions []
 
u16 actor4Talk0Actions []
 
FieldTalk actor0Talks []
 
FieldTalk actor1Talks []
 
FieldTalk actor2Talks []
 
FieldTalk actor3Talks []
 
FieldTalk actor4Talks []
 
u16 actor0Conditions [] = { (( 2 ) << 8 | ( 0x67 )) , 0, 0xFFFF }
 
u16 actor4Conditions [] = { (( 2 ) << 8 | ( 0x68 )) , 0, 0xFFFF }
 
FieldActorEntry actor0 = { actor0Conditions, actor0Talks, 0x21, 4, 465, 169, 1 }
 
FieldActorEntry actor1 = { ((void *)0) , actor1Talks, 0x25, 5, 336, 640, 1 }
 
FieldActorEntry actor2 = { ((void *)0) , actor2Talks, 0x26, 6, 839, 533, 1 }
 
FieldActorEntry actor3 = { ((void *)0) , actor3Talks, 0x38, 7, 600, 509, 1 }
 
FieldActorEntry actor4 = { actor4Conditions, actor4Talks, 0x4D, 8, 272, 217, 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.
 
AreaBattle area0Battle0 = { 88, 7, (0x60000000 | ( 2 ) << 18 | ( 0 )) }
 
AreaBattle area0Battle1 = { 88, 7, (0x60000000 | ( 2 ) << 18 | ( 0 )) }
 
AreaBattle area0Battle2 = { 88, 7, (0x60000000 | ( 2 ) << 18 | ( 0 )) }
 
AreaBattle area0Battle3 = { 88, 7, (0x60000000 | ( 2 ) << 18 | ( 0 )) }
 
AreaBattle area0Battle4 = { 90, 7, (0x60000000 | ( 2 ) << 18 | ( 0 )) }
 
AreaBattle area0Battle5 = { 90, 7, (0x60000000 | ( 2 ) << 18 | ( 0 )) }
 
AreaBattle area0Battle6 = { 90, 7, (0x60000000 | ( 2 ) << 18 | ( 0 )) }
 
AreaBattle area0Battle7 = { 90, 7, (0x60000000 | ( 2 ) << 18 | ( 0 )) }
 
BattleList area0Battles
 
AreaBattle area1Battle0 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) }
 
AreaBattle area1Battle1 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) }
 
AreaBattle area1Battle2 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) }
 
AreaBattle area1Battle3 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) }
 
AreaBattle area1Battle4 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) }
 
AreaBattle area1Battle5 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) }
 
AreaBattle area1Battle6 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) }
 
AreaBattle area1Battle7 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) }
 
BattleList area1Battles
 
AreaBattle area2Battle0 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) }
 
AreaBattle area2Battle1 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) }
 
AreaBattle area2Battle2 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) }
 
AreaBattle area2Battle3 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) }
 
AreaBattle area2Battle4 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) }
 
AreaBattle area2Battle5 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) }
 
AreaBattle area2Battle6 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) }
 
AreaBattle area2Battle7 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) }
 
BattleList area2Battles
 
AreaBattle area3Battle0 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) }
 
AreaBattle area3Battle1 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) }
 
AreaBattle area3Battle2 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) }
 
AreaBattle area3Battle3 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) }
 
AreaBattle area3Battle4 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) }
 
AreaBattle area3Battle5 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) }
 
AreaBattle area3Battle6 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) }
 
AreaBattle area3Battle7 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) }
 
BattleList area3Battles
 
FieldBattles stageBattles []
 

Detailed Description

WSTAG938: Amaterasu Sewer, Amaterasu City, in the extra chapter.

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

Definition in file wstag938.c.

Macro Definition Documentation

◆ STAGE_TEXT

#define STAGE_TEXT   TEXT_FILE(TEXT_TALKS_08)

Definition at line 15 of file wstag938.c.

◆ STAGE_FILE

#define STAGE_FILE   0x903

Definition at line 16 of file wstag938.c.

◆ STAGE_FILE_8

#define STAGE_FILE_8   0x2A3

Definition at line 17 of file wstag938.c.

Function Documentation

◆ setupStage()

void setupStage ( void  )

Sets the stage up: its map, actors and battles, playing BGM_0003.

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.

< BGM_0003: the Admin Center's basement and the cities' sewers

< BGM_0003: the Admin Center's basement and the cities' sewers

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

< a cell's value: its battle area (FieldBattles), or 0

Definition at line 24 of file wstag938.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 wstag938.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, 0x1B8, 0x100, 0x1E0, 0, 0x170, 0x1F5 },
{ 0x180, 0x100, 0x1A4, 0x128, 0x190, 0x28, 0x140, 0x1F4 },
{ 0x180, 0x100, 0x1AC, 0x128, 0x1B0, 0x28, 0x160, 0x1F4 },
{ 0x180, 0x100, 0x1A6, 0x158, 0x198, 0x58, 0x170, 0x1F4 },
{ 0x180, 0x100, 0x19E, 0x130, 0x178, 0x30, 0x140, 0x1F3 },
}

Definition at line 45 of file wstag938.c.

Referenced by setupStage().

◆ actor0Talk0Actions

u16 actor0Talk0Actions[]
Initial value:
= {
(( 2 ) << 8 | ( 0x67 )) , 1,
(0x8000 | ( 1 ) << 9 | ( 0x37 )), 1,
(0x7000 | ( 0x13 )) , 1,
0xFFFF ,
}

Definition at line 58 of file wstag938.c.

◆ actor4Talk0Actions

u16 actor4Talk0Actions[]
Initial value:
= {
(( 2 ) << 8 | ( 0x68 )) , 1,
(0x8000 | ( 1 ) << 9 | ( 0x38 )), 1,
(0x7000 | ( 0x13 )) , 1,
0xFFFF ,
}

Definition at line 64 of file wstag938.c.

◆ actor0Talks

FieldTalk actor0Talks[]
Initial value:
= {
{ ((void *)0) , actor0Talk0Actions, 2 },
{ ((void *)0) , ((void *)0) , 0 },
}
u16 actor0Talk0Actions[]
Definition wstag938.c:58

Definition at line 70 of file wstag938.c.

◆ actor1Talks

FieldTalk actor1Talks[]
Initial value:
= {
{ ((void *)0) , ((void *)0) , 0x67 },
{ ((void *)0) , ((void *)0) , 0 },
}

Definition at line 74 of file wstag938.c.

◆ actor2Talks

FieldTalk actor2Talks[]
Initial value:
= {
{ ((void *)0) , ((void *)0) , 0x68 },
{ ((void *)0) , ((void *)0) , 0 },
}

Definition at line 78 of file wstag938.c.

◆ actor3Talks

FieldTalk actor3Talks[]
Initial value:
= {
{ ((void *)0) , ((void *)0) , 0x69 },
{ ((void *)0) , ((void *)0) , 0 },
}

Definition at line 82 of file wstag938.c.

◆ actor4Talks

FieldTalk actor4Talks[]
Initial value:
= {
{ ((void *)0) , actor4Talk0Actions, 3 },
{ ((void *)0) , ((void *)0) , 0 },
}
u16 actor4Talk0Actions[]
Definition wstag938.c:64

Definition at line 86 of file wstag938.c.

◆ actor0Conditions

u16 actor0Conditions[] = { (( 2 ) << 8 | ( 0x67 )) , 0, 0xFFFF }

Definition at line 90 of file wstag938.c.

◆ actor4Conditions

u16 actor4Conditions[] = { (( 2 ) << 8 | ( 0x68 )) , 0, 0xFFFF }

Definition at line 91 of file wstag938.c.

◆ actor0

FieldActorEntry actor0 = { actor0Conditions, actor0Talks, 0x21, 4, 465, 169, 1 }

Definition at line 92 of file wstag938.c.

◆ actor1

FieldActorEntry actor1 = { ((void *)0) , actor1Talks, 0x25, 5, 336, 640, 1 }

Definition at line 93 of file wstag938.c.

◆ actor2

FieldActorEntry actor2 = { ((void *)0) , actor2Talks, 0x26, 6, 839, 533, 1 }

Definition at line 94 of file wstag938.c.

◆ actor3

FieldActorEntry actor3 = { ((void *)0) , actor3Talks, 0x38, 7, 600, 509, 1 }

Definition at line 95 of file wstag938.c.

◆ actor4

FieldActorEntry actor4 = { actor4Conditions, actor4Talks, 0x4D, 8, 272, 217, 1 }

Definition at line 96 of file wstag938.c.

◆ stageActors

FieldActorEntry* stageActors[]
Initial value:
= {
((void *)0) ,
}
FieldActorEntry actor0
Definition wstag938.c:92
FieldActorEntry actor2
Definition wstag938.c:94
FieldActorEntry actor4
Definition wstag938.c:96
FieldActorEntry actor1
Definition wstag938.c:93
FieldActorEntry actor3
Definition wstag938.c:95

Definition at line 97 of file wstag938.c.

Referenced by setupStage().

◆ stageObjects

StageTile stageObjects[]

The tables and color setupStage gives FIELDSTG_state (FieldState)

Definition at line 105 of file wstag938.c.

Referenced by setupStage().

◆ stageSlots

StageSlot stageSlots[]
Initial value:
= {
{ { { 0xFFFF , 0 }, { 0xFFFF , 0 } }, 1 , 0x27A, 0x242, 0x13E, 3, 0, 0, 0 },
{ { { 0xFFFF , 0 }, { 0xFFFF , 0 } }, 1 , 0x28B, 0x88, 0x1B4, 5, 0, 0, 0 },
{ { { 0xFFFF , 0 }, { 0xFFFF , 0 } }, 10 , 0x2E3, 0x380, 0x70, 1, 0, 1, 1 },
{ { { 0xFFFF , 0 }, { 0xFFFF , 0 } }, 3 , 4, 0x130, 0xF8, 0, 0, 0, 0 },
{ { { 0xFFFF , 0 }, { 0xFFFF , 0 } }, 2 , 4, 0x120, 0x140, 0, 0, 0, 0 },
{ { { 0xFFFF , 0 }, { 0xFFFF , 0 } }, 0, 0, 0, 0, 0, 0, 0, 0 },
}

Definition at line 236 of file wstag938.c.

Referenced by setupStage().

◆ stageFuncs

void(* stageFuncs[])(void) ( void  )
Initial value:
= {
}
void setupStage(void)
Sets the stage up: its map, actors and battles, playing BGM_0003.
Definition wstag938.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 244 of file wstag938.c.

◆ area0Battle0

AreaBattle area0Battle0 = { 88, 7, (0x60000000 | ( 2 ) << 18 | ( 0 )) }

Definition at line 247 of file wstag938.c.

◆ area0Battle1

AreaBattle area0Battle1 = { 88, 7, (0x60000000 | ( 2 ) << 18 | ( 0 )) }

Definition at line 248 of file wstag938.c.

◆ area0Battle2

AreaBattle area0Battle2 = { 88, 7, (0x60000000 | ( 2 ) << 18 | ( 0 )) }

Definition at line 249 of file wstag938.c.

◆ area0Battle3

AreaBattle area0Battle3 = { 88, 7, (0x60000000 | ( 2 ) << 18 | ( 0 )) }

Definition at line 250 of file wstag938.c.

◆ area0Battle4

AreaBattle area0Battle4 = { 90, 7, (0x60000000 | ( 2 ) << 18 | ( 0 )) }

Definition at line 251 of file wstag938.c.

◆ area0Battle5

AreaBattle area0Battle5 = { 90, 7, (0x60000000 | ( 2 ) << 18 | ( 0 )) }

Definition at line 252 of file wstag938.c.

◆ area0Battle6

AreaBattle area0Battle6 = { 90, 7, (0x60000000 | ( 2 ) << 18 | ( 0 )) }

Definition at line 253 of file wstag938.c.

◆ area0Battle7

AreaBattle area0Battle7 = { 90, 7, (0x60000000 | ( 2 ) << 18 | ( 0 )) }

Definition at line 254 of file wstag938.c.

◆ area0Battles

BattleList area0Battles
Initial value:
= {
3,
}
AreaBattle area0Battle7
Definition wstag938.c:254
AreaBattle area0Battle1
Definition wstag938.c:248
AreaBattle area0Battle6
Definition wstag938.c:253
AreaBattle area0Battle3
Definition wstag938.c:250
AreaBattle area0Battle5
Definition wstag938.c:252
AreaBattle area0Battle0
Definition wstag938.c:247
AreaBattle area0Battle2
Definition wstag938.c:249
AreaBattle area0Battle4
Definition wstag938.c:251

Definition at line 255 of file wstag938.c.

◆ area1Battle0

AreaBattle area1Battle0 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) }

Definition at line 260 of file wstag938.c.

◆ area1Battle1

AreaBattle area1Battle1 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) }

Definition at line 261 of file wstag938.c.

◆ area1Battle2

AreaBattle area1Battle2 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) }

Definition at line 262 of file wstag938.c.

◆ area1Battle3

AreaBattle area1Battle3 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) }

Definition at line 263 of file wstag938.c.

◆ area1Battle4

AreaBattle area1Battle4 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) }

Definition at line 264 of file wstag938.c.

◆ area1Battle5

AreaBattle area1Battle5 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) }

Definition at line 265 of file wstag938.c.

◆ area1Battle6

AreaBattle area1Battle6 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) }

Definition at line 266 of file wstag938.c.

◆ area1Battle7

AreaBattle area1Battle7 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) }

Definition at line 267 of file wstag938.c.

◆ area1Battles

BattleList area1Battles
Initial value:
= {
0,
}
AreaBattle area1Battle6
Definition wstag938.c:266
AreaBattle area1Battle2
Definition wstag938.c:262
AreaBattle area1Battle4
Definition wstag938.c:264
AreaBattle area1Battle5
Definition wstag938.c:265
AreaBattle area1Battle3
Definition wstag938.c:263
AreaBattle area1Battle0
Definition wstag938.c:260
AreaBattle area1Battle1
Definition wstag938.c:261
AreaBattle area1Battle7
Definition wstag938.c:267

Definition at line 268 of file wstag938.c.

◆ area2Battle0

AreaBattle area2Battle0 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) }

Definition at line 273 of file wstag938.c.

◆ area2Battle1

AreaBattle area2Battle1 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) }

Definition at line 274 of file wstag938.c.

◆ area2Battle2

AreaBattle area2Battle2 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) }

Definition at line 275 of file wstag938.c.

◆ area2Battle3

AreaBattle area2Battle3 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) }

Definition at line 276 of file wstag938.c.

◆ area2Battle4

AreaBattle area2Battle4 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) }

Definition at line 277 of file wstag938.c.

◆ area2Battle5

AreaBattle area2Battle5 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) }

Definition at line 278 of file wstag938.c.

◆ area2Battle6

AreaBattle area2Battle6 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) }

Definition at line 279 of file wstag938.c.

◆ area2Battle7

AreaBattle area2Battle7 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) }

Definition at line 280 of file wstag938.c.

◆ area2Battles

BattleList area2Battles
Initial value:
= {
0,
}
AreaBattle area2Battle7
Definition wstag938.c:280
AreaBattle area2Battle6
Definition wstag938.c:279
AreaBattle area2Battle0
Definition wstag938.c:273
AreaBattle area2Battle4
Definition wstag938.c:277
AreaBattle area2Battle2
Definition wstag938.c:275
AreaBattle area2Battle1
Definition wstag938.c:274
AreaBattle area2Battle5
Definition wstag938.c:278
AreaBattle area2Battle3
Definition wstag938.c:276

Definition at line 281 of file wstag938.c.

◆ area3Battle0

AreaBattle area3Battle0 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) }

Definition at line 286 of file wstag938.c.

◆ area3Battle1

AreaBattle area3Battle1 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) }

Definition at line 287 of file wstag938.c.

◆ area3Battle2

AreaBattle area3Battle2 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) }

Definition at line 288 of file wstag938.c.

◆ area3Battle3

AreaBattle area3Battle3 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) }

Definition at line 289 of file wstag938.c.

◆ area3Battle4

AreaBattle area3Battle4 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) }

Definition at line 290 of file wstag938.c.

◆ area3Battle5

AreaBattle area3Battle5 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) }

Definition at line 291 of file wstag938.c.

◆ area3Battle6

AreaBattle area3Battle6 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) }

Definition at line 292 of file wstag938.c.

◆ area3Battle7

AreaBattle area3Battle7 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) }

Definition at line 293 of file wstag938.c.

◆ area3Battles

BattleList area3Battles
Initial value:
= {
0,
}
AreaBattle area3Battle4
Definition wstag938.c:290
AreaBattle area3Battle3
Definition wstag938.c:289
AreaBattle area3Battle0
Definition wstag938.c:286
AreaBattle area3Battle2
Definition wstag938.c:288
AreaBattle area3Battle1
Definition wstag938.c:287
AreaBattle area3Battle6
Definition wstag938.c:292
AreaBattle area3Battle5
Definition wstag938.c:291
AreaBattle area3Battle7
Definition wstag938.c:293

Definition at line 294 of file wstag938.c.

◆ stageBattles

FieldBattles stageBattles[]
Initial value:
= {
}
BattleList area3Battles
Definition wstag938.c:294
BattleList area1Battles
Definition wstag938.c:268
BattleList area2Battles
Definition wstag938.c:281
BattleList area0Battles
Definition wstag938.c:255

Definition at line 299 of file wstag938.c.

Referenced by setupStage().