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

WSTAG645: Mirage Tower, West Sector. More...

Include dependency graph for wstag645.c:

Go to the source code of this file.

Macros

#define STAGE_CHILDREN_SIZE   4
 
#define STAGE_TEXT   TEXT_FILE(TEXT_TALKS_02)
 
#define STAGE_FILE   0x4A8
 

Functions

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

Variables

AnimFrame updateTileAnimsFrames0 []
 Defined below, after the code that uses them.
 
AnimFrame updateTileAnimsFrames1 []
 
AnimFrame updateTileAnimsFrames2 []
 
AreaBattle area0Battle0 = { 156, 5, (0x60000000 | ( 2 ) << 18 | ( 0 )) }
 
AreaBattle area0Battle1 = { 156, 5, (0x60000000 | ( 2 ) << 18 | ( 0 )) }
 
AreaBattle area0Battle2 = { 156, 5, (0x60000000 | ( 2 ) << 18 | ( 0 )) }
 
AreaBattle area0Battle3 = { 156, 5, (0x60000000 | ( 2 ) << 18 | ( 0 )) }
 
AreaBattle area0Battle4 = { 156, 5, (0x60000000 | ( 2 ) << 18 | ( 0 )) }
 
AreaBattle area0Battle5 = { 156, 5, (0x60000000 | ( 2 ) << 18 | ( 0 )) }
 
AreaBattle area0Battle6 = { 156, 5, (0x60000000 | ( 2 ) << 18 | ( 0 )) }
 
AreaBattle area0Battle7 = { 156, 5, (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 []
 
ActorImage stageImages []
 
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

WSTAG645: Mirage Tower, West Sector.

Definition in file wstag645.c.

Macro Definition Documentation

◆ STAGE_CHILDREN_SIZE

#define STAGE_CHILDREN_SIZE   4

Definition at line 19 of file wstag645.c.

◆ STAGE_TEXT

#define STAGE_TEXT   TEXT_FILE(TEXT_TALKS_02)

Definition at line 26 of file wstag645.c.

◆ STAGE_FILE

#define STAGE_FILE   0x4A8

Definition at line 27 of file wstag645.c.

Function Documentation

◆ setupStage()

void setupStage ( void  )

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

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_0016: the West Sector's deserts and the Mirage Tower

< ENV_0016: the West Sector's deserts and the Mirage Tower

< 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 30 of file wstag645.c.

Variable Documentation

◆ updateTileAnimsFrames0

AnimFrame updateTileAnimsFrames0[]
Initial value:
= {
{ 50, 8 }, { 51, 8 }, { 52, 8 }, { 53, 8 },
{ 54, 8 }, { 55, 8 }, { 56, 8 }, { 57, 8 },
{ 58, 8 }, { 59, 8 }, { 60, 8 }, { 82, 160 },
{ 255, 0 },
}

Defined below, after the code that uses them.

Definition at line 49 of file wstag645.c.

◆ updateTileAnimsFrames1

AnimFrame updateTileAnimsFrames1[]
Initial value:
= {
{ 61, 8 }, { 62, 8 }, { 63, 8 }, { 64, 8 },
{ 65, 8 }, { 66, 8 }, { 67, 8 }, { 68, 8 },
{ 69, 8 }, { 70, 8 }, { 71, 8 }, { 82, 160 },
{ 255, 0 },
}

Definition at line 55 of file wstag645.c.

◆ updateTileAnimsFrames2

AnimFrame updateTileAnimsFrames2[]
Initial value:
= {
{ 72, 8 }, { 73, 8 }, { 74, 8 }, { 75, 8 },
{ 76, 8 }, { 77, 8 }, { 78, 8 }, { 79, 8 },
{ 80, 8 }, { 81, 8 }, { 82, 160 }, { 255, 0 },
}

Definition at line 61 of file wstag645.c.

◆ area0Battle0

AreaBattle area0Battle0 = { 156, 5, (0x60000000 | ( 2 ) << 18 | ( 0 )) }

Definition at line 66 of file wstag645.c.

◆ area0Battle1

AreaBattle area0Battle1 = { 156, 5, (0x60000000 | ( 2 ) << 18 | ( 0 )) }

Definition at line 67 of file wstag645.c.

◆ area0Battle2

AreaBattle area0Battle2 = { 156, 5, (0x60000000 | ( 2 ) << 18 | ( 0 )) }

Definition at line 68 of file wstag645.c.

◆ area0Battle3

AreaBattle area0Battle3 = { 156, 5, (0x60000000 | ( 2 ) << 18 | ( 0 )) }

Definition at line 69 of file wstag645.c.

◆ area0Battle4

AreaBattle area0Battle4 = { 156, 5, (0x60000000 | ( 2 ) << 18 | ( 0 )) }

Definition at line 70 of file wstag645.c.

◆ area0Battle5

AreaBattle area0Battle5 = { 156, 5, (0x60000000 | ( 2 ) << 18 | ( 0 )) }

Definition at line 71 of file wstag645.c.

◆ area0Battle6

AreaBattle area0Battle6 = { 156, 5, (0x60000000 | ( 2 ) << 18 | ( 0 )) }

Definition at line 72 of file wstag645.c.

◆ area0Battle7

AreaBattle area0Battle7 = { 156, 5, (0x60000000 | ( 2 ) << 18 | ( 0 )) }

Definition at line 73 of file wstag645.c.

◆ area0Battles

BattleList area0Battles
Initial value:
= {
3,
}
AreaBattle area0Battle7
Definition wstag645.c:73
AreaBattle area0Battle1
Definition wstag645.c:67
AreaBattle area0Battle6
Definition wstag645.c:72
AreaBattle area0Battle3
Definition wstag645.c:69
AreaBattle area0Battle5
Definition wstag645.c:71
AreaBattle area0Battle0
Definition wstag645.c:66
AreaBattle area0Battle2
Definition wstag645.c:68
AreaBattle area0Battle4
Definition wstag645.c:70

Definition at line 74 of file wstag645.c.

◆ area1Battle0

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

Definition at line 79 of file wstag645.c.

◆ area1Battle1

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

Definition at line 80 of file wstag645.c.

◆ area1Battle2

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

Definition at line 81 of file wstag645.c.

◆ area1Battle3

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

Definition at line 82 of file wstag645.c.

◆ area1Battle4

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

Definition at line 83 of file wstag645.c.

◆ area1Battle5

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

Definition at line 84 of file wstag645.c.

◆ area1Battle6

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

Definition at line 85 of file wstag645.c.

◆ area1Battle7

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

Definition at line 86 of file wstag645.c.

◆ area1Battles

BattleList area1Battles
Initial value:
= {
0,
}
AreaBattle area1Battle6
Definition wstag645.c:85
AreaBattle area1Battle2
Definition wstag645.c:81
AreaBattle area1Battle4
Definition wstag645.c:83
AreaBattle area1Battle5
Definition wstag645.c:84
AreaBattle area1Battle3
Definition wstag645.c:82
AreaBattle area1Battle0
Definition wstag645.c:79
AreaBattle area1Battle1
Definition wstag645.c:80
AreaBattle area1Battle7
Definition wstag645.c:86

Definition at line 87 of file wstag645.c.

◆ area2Battle0

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

Definition at line 92 of file wstag645.c.

◆ area2Battle1

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

Definition at line 93 of file wstag645.c.

◆ area2Battle2

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

Definition at line 94 of file wstag645.c.

◆ area2Battle3

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

Definition at line 95 of file wstag645.c.

◆ area2Battle4

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

Definition at line 96 of file wstag645.c.

◆ area2Battle5

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

Definition at line 97 of file wstag645.c.

◆ area2Battle6

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

Definition at line 98 of file wstag645.c.

◆ area2Battle7

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

Definition at line 99 of file wstag645.c.

◆ area2Battles

BattleList area2Battles
Initial value:
= {
0,
}
AreaBattle area2Battle7
Definition wstag645.c:99
AreaBattle area2Battle6
Definition wstag645.c:98
AreaBattle area2Battle0
Definition wstag645.c:92
AreaBattle area2Battle4
Definition wstag645.c:96
AreaBattle area2Battle2
Definition wstag645.c:94
AreaBattle area2Battle1
Definition wstag645.c:93
AreaBattle area2Battle5
Definition wstag645.c:97
AreaBattle area2Battle3
Definition wstag645.c:95

Definition at line 100 of file wstag645.c.

◆ area3Battle0

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

Definition at line 105 of file wstag645.c.

◆ area3Battle1

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

Definition at line 106 of file wstag645.c.

◆ area3Battle2

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

Definition at line 107 of file wstag645.c.

◆ area3Battle3

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

Definition at line 108 of file wstag645.c.

◆ area3Battle4

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

Definition at line 109 of file wstag645.c.

◆ area3Battle5

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

Definition at line 110 of file wstag645.c.

◆ area3Battle6

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

Definition at line 111 of file wstag645.c.

◆ area3Battle7

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

Definition at line 112 of file wstag645.c.

◆ area3Battles

BattleList area3Battles
Initial value:
= {
0,
}
AreaBattle area3Battle4
Definition wstag645.c:109
AreaBattle area3Battle3
Definition wstag645.c:108
AreaBattle area3Battle0
Definition wstag645.c:105
AreaBattle area3Battle2
Definition wstag645.c:107
AreaBattle area3Battle1
Definition wstag645.c:106
AreaBattle area3Battle6
Definition wstag645.c:111
AreaBattle area3Battle5
Definition wstag645.c:110
AreaBattle area3Battle7
Definition wstag645.c:112

Definition at line 113 of file wstag645.c.

◆ stageBattles

FieldBattles stageBattles[]
Initial value:
= {
}
BattleList area3Battles
Definition wstag645.c:113
BattleList area1Battles
Definition wstag645.c:87
BattleList area2Battles
Definition wstag645.c:100
BattleList area0Battles
Definition wstag645.c:74

Definition at line 118 of file wstag645.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 },
}

Definition at line 121 of file wstag645.c.

Referenced by setupStage().

◆ stageObjects

StageTile stageObjects[]
Initial value:
= {
{ 1, 3, 0xC8, 2, 0x48, 0, 0, 0, 0, 0, 59, 435, 0, 0 },
{ 1, 3, 0xC8, 2, 0x48, 0, 0, 0, 0, 0, 384, 640, 0, 0 },
{ 1, 3, 0xC8, 2, 0x48, 0, 0, 0, 0, 0, 606, 469, 0, 0 },
{ 1, 1, 0x40, 6, 0x32, 0, 0, 0, 0, 0, 260, 441, 0, 0 },
{ 1, 1, 0x40, 6, 0x32, 0, 0, 0, 0, 0, 394, 596, 0, 0 },
{ 1, 2, 0x40, 6, 0x3D, 0, 0, 0, 0, 0, 569, 465, 0, 0 },
{ 1, 1, 0x40, 6, 0x32, 0, 0, 0, 0, 0, 706, 596, 0, 0 },
{ 1, 1, 0x40, 6, 0x32, 0, 0, 0, 0, 0, 858, 657, 0, 0 },
{ 1, 0, 0x40, 6, 4, 0, 0, 0, 0, 0, 562, 254, 0, 0 },
{ 1, 0, 0x40, 4, 0x53, 2, 0, 0xF, 8, 0, 604, 194, 256, 0 },
{ 1, 0, 0x40, 4, 0x54, 2, 0, 0xF, 8, 0, 604, 194, 252, 0 },
{ 1, 0, 0x40, 4, 0x55, 2, 0, 0xF, 8, 0, 604, 194, 248, 0 },
{ 1, 0, 0x40, 4, 0x56, 2, 0, 0xF, 8, 0, 604, 194, 244, 0 },
{ 1, 0, 0x40, 4, 0x57, 2, 0, 0xF, 8, 0, 604, 194, 240, 0 },
{ 1, 0, 0x40, 4, 0x58, 2, 0, 0xF, 8, 0, 604, 194, 236, 0 },
{ 1, 0, 0x40, 4, 0x59, 2, 0, 0xF, 8, 0, 604, 194, 232, 0 },
{ 1, 0, 0x40, 4, 0x5A, 2, 0, 0xF, 8, 0, 604, 194, 228, 0 },
{ 1, 0, 0x40, 4, 0, 0, 0, 0, 0, 0, 566, 208, 264, 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 129 of file wstag645.c.

Referenced by setupStage().

◆ stageSlots

StageSlot stageSlots[]
Initial value:
= {
{ { { 0xFFFF , 0 }, { 0xFFFF , 0 } }, 1 , 0x25B, 0x27A, 0x256, 3, 0, 0, 0 },
{ { { 0xFFFF , 0 }, { 0xFFFF , 0 } }, 1 , 0x258, 0x110, 0x108, 7, 0, 1, 6 },
{ { { 0xFFFF , 0 }, { 0xFFFF , 0 } }, 0, 0, 0, 0, 0, 0, 0, 0 },
}

Definition at line 150 of file wstag645.c.

Referenced by setupStage().

◆ stageFuncs

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

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 wstag645.c.