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

WSTAG306: Master Room, Amaterasu City. More...

Include dependency graph for wstag306.c:

Go to the source code of this file.

Macros

#define STAGE_CHILDREN_SIZE   0x8
 
#define STAGE_TEXT   TEXT_FILE(TEXT_TALKS_03)
 
#define EVENT_TEXT_FILE   (TEXT_EVENTS_300 - 1)
 
#define STAGE_FILE   0x546
 

Functions

void handleCommand851 (StageSoundTile *task, s32 id)
 Command 851 of the event scripts: told 0x335 in event 930, opens the secret door, with its sound.
 
void updateStage (StageTask *task, void **children)
 Creates the event object of progress 0x25 or 0x27, and the stage helper task before progress 0x27.
 
void setupStage (void)
 Sets the stage up: its map, actors and events, playing KANRIBGM; BGM_0029 instead except at STORY_PRESIDENT_ARRESTED once flag 0x1A0A is set.
 

Variables

AnimFrame updateSoundTileFrames []
 Defined below, after the code that uses them.
 
s16 script930 []
 
s16 script966 []
 
s16 script980 []
 
ActorImage stageImages []
 
FieldTalk actor2Talks []
 
FieldTalk actor3Talks []
 
FieldTalk actor4Talks []
 
FieldTalk actor5Talks []
 
FieldTalk actor6Talks []
 
FieldTalk actor7Talks []
 
FieldTalk actor8Talks []
 
FieldTalk actor9Talks []
 
FieldTalk actor10Talks []
 
FieldTalk actor11Talks []
 
FieldTalk actor12Talks []
 
u16 actor0Conditions [] = { (0x6000 | ( STORY_AMATERASU_BRIDGE )) , 1, 0xFFFF }
 
u16 actor1Conditions [] = { (0x6000 | ( STORY_ASUKA_HEADQUARTERS )) , 1, 0xFFFF }
 
u16 actor2Conditions [] = { (0x7000 | ( 0x94 )) , 1, 0xFFFF }
 
u16 actor3Conditions [] = { (0x7000 | ( 0x1A )) , 1, 0xFFFF }
 
u16 actor4Conditions [] = { (0x7000 | ( 0x1A )) , 1, 0xFFFF }
 
u16 actor5Conditions [] = { (0x7000 | ( 0x94 )) , 1, 0xFFFF }
 
u16 actor6Conditions [] = { (0x7000 | ( 0x94 )) , 1, 0xFFFF }
 
u16 actor7Conditions [] = { (0x7000 | ( 0x1A )) , 1, 0xFFFF }
 
u16 actor8Conditions [] = { (0x7000 | ( 0x94 )) , 1, 0xFFFF }
 
u16 actor9Conditions [] = { (0x7000 | ( 0x94 )) , 1, 0xFFFF }
 
u16 actor10Conditions [] = { (0x7000 | ( 0x94 )) , 1, 0xFFFF }
 
u16 actor11Conditions [] = { (0x7000 | ( 0x94 )) , 1, 0xFFFF }
 
u16 actor12Conditions [] = { (0x7000 | ( 0x1A )) , 1, 0xFFFF }
 
FieldActorEntry actor0 = { actor0Conditions, ((void *)0) , 1, 4, 0, 0, 1 }
 
FieldActorEntry actor1 = { actor1Conditions, ((void *)0) , 1, 4, 0, 0, 1 }
 
FieldActorEntry actor2 = { actor2Conditions, actor2Talks, 0x3F, 5, 121, 260, 7 }
 
FieldActorEntry actor3 = { actor3Conditions, actor3Talks, 0x9D, 6, 463, 264, 1 }
 
FieldActorEntry actor4 = { actor4Conditions, actor4Talks, 0x9E, 7, 367, 312, 5 }
 
FieldActorEntry actor5 = { actor5Conditions, actor5Talks, 0xC6, 8, 185, 229, 7 }
 
FieldActorEntry actor6 = { actor6Conditions, actor6Talks, 0xC7, 9, 249, 197, 7 }
 
FieldActorEntry actor7 = { actor7Conditions, actor7Talks, 0x119, 0xA, 428, 278, 1 }
 
FieldActorEntry actor8 = { actor8Conditions, actor8Talks, 0x121, 0xB, 376, 188, 1 }
 
FieldActorEntry actor9 = { actor9Conditions, actor9Talks, 0x122, 0xC, 360, 380, 3 }
 
FieldActorEntry actor10 = { actor10Conditions, actor10Talks, 0x123, 0xD, 424, 348, 3 }
 
FieldActorEntry actor11 = { actor11Conditions, actor11Talks, 0x124, 0xE, 488, 316, 3 }
 
FieldActorEntry actor12 = { actor12Conditions, actor12Talks, 0x13A, 0xF, 451, 290, 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

WSTAG306: Master Room, Amaterasu City.

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

Definition in file wstag306.c.

Macro Definition Documentation

◆ STAGE_CHILDREN_SIZE

#define STAGE_CHILDREN_SIZE   0x8

Definition at line 55 of file wstag306.c.

◆ STAGE_TEXT

#define STAGE_TEXT   TEXT_FILE(TEXT_TALKS_03)

Definition at line 63 of file wstag306.c.

◆ EVENT_TEXT_FILE

#define EVENT_TEXT_FILE   (TEXT_EVENTS_300 - 1)

Definition at line 64 of file wstag306.c.

◆ STAGE_FILE

#define STAGE_FILE   0x546

Definition at line 65 of file wstag306.c.

Function Documentation

◆ handleCommand851()

void handleCommand851 ( StageSoundTile *  task,
s32  id 
)

Command 851 of the event scripts: told 0x335 in event 930, opens the secret door, with its sound.

< held until SOUND.keyOff

Definition at line 19 of file wstag306.c.

◆ updateStage()

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

Creates the event object of progress 0x25 or 0x27, and the stage helper task before progress 0x27.

Definition at line 31 of file wstag306.c.

Here is the call graph for this function:

◆ setupStage()

void setupStage ( void  )

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

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.

< KANRIBGM: the cities' Main Lobby, Admin Center, Digimon Arena, Master Room

< KANRIBGM: the cities' Main Lobby, Admin Center, Digimon Arena, Master Room

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

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

< BGM_0029: the cities and their streets instead of their music while the story is at a crisis (Knightmon reprogrammed, the A.o.A's headquarters, the Amaterasu server's Oinkmon)

< BGM_0029: the cities and their streets instead of their music while the story is at a crisis (Knightmon reprogrammed, the A.o.A's headquarters, the Amaterasu server's Oinkmon)

Definition at line 71 of file wstag306.c.

Variable Documentation

◆ updateSoundTileFrames

AnimFrame updateSoundTileFrames
Initial value:
= {
{ 5, 4 }, { 6, 4 }, { 7, 4 }, { 8, 4 },
{ 9, 4 }, { 255, 0x3E7 },
}

Defined below, after the code that uses them.

Definition at line 267 of file wstag306.c.

Referenced by handleCommand851(), and updateSoundTile().

◆ script930

s16 script930[]

Definition at line 94 of file wstag306.c.

◆ script966

s16 script966[]
Initial value:
= {
0x102, 2 , 0x188 , 0xF5 , 5 ,
0x101, 0x32D , 0x337 , 2 ,
0x302, 2 ,
0x101, 2 , 1 , 5 ,
0x300, 0x1E ,
0x200, 0 , 1 , 2 , 2 ,
0x101, 2 , 7 , 5 ,
0x301 ,
0x101, 2 , 1 , 5 ,
0x300, 0x1E ,
0x304, 0x288 , 0x58 , 0x20C , 5 ,
0 ,
}

Definition at line 147 of file wstag306.c.

◆ script980

s16 script980[]

Definition at line 161 of file wstag306.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 },
{ 0x140, 0x100, 0x176, 0x18C, 0xD8, 0x8C, 0x140, 0x1FB },
{ 0, 0, 0, 0, 0, 0, 0, 0 },
{ 0x180, 0x100, 0x19A, 0x100, 0x168, 0, 0x150, 0x1FB },
{ 0x180, 0x100, 0x1A2, 0x100, 0x188, 0, 0x160, 0x1FB },
{ 0, 0, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, 0, 0 },
{ 0x180, 0x100, 0x180, 0x114, 0x100, 0x14, 0x150, 0x1FA },
{ 0, 0, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, 0, 0 },
{ 0x180, 0x100, 0x188, 0x116, 0x120, 0x16, 0x160, 0x1FA },
}

Definition at line 271 of file wstag306.c.

Referenced by setupStage().

◆ actor2Talks

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

Definition at line 291 of file wstag306.c.

◆ actor3Talks

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

Definition at line 295 of file wstag306.c.

◆ actor4Talks

FieldTalk actor4Talks[]
Initial value:
= {
{ ((void *)0) , ((void *)0) , 0x1F9 },
{ ((void *)0) , ((void *)0) , 0 },
}

Definition at line 299 of file wstag306.c.

◆ actor5Talks

FieldTalk actor5Talks[]
Initial value:
= {
{ ((void *)0) , ((void *)0) , 0x20C },
{ ((void *)0) , ((void *)0) , 0 },
}

Definition at line 303 of file wstag306.c.

◆ actor6Talks

FieldTalk actor6Talks[]
Initial value:
= {
{ ((void *)0) , ((void *)0) , 0x20C },
{ ((void *)0) , ((void *)0) , 0 },
}

Definition at line 307 of file wstag306.c.

◆ actor7Talks

FieldTalk actor7Talks[]
Initial value:
= {
{ ((void *)0) , ((void *)0) , 4 },
{ ((void *)0) , ((void *)0) , 0 },
}

Definition at line 311 of file wstag306.c.

◆ actor8Talks

FieldTalk actor8Talks[]
Initial value:
= {
{ ((void *)0) , ((void *)0) , 0x20C },
{ ((void *)0) , ((void *)0) , 0 },
}

Definition at line 315 of file wstag306.c.

◆ actor9Talks

FieldTalk actor9Talks[]
Initial value:
= {
{ ((void *)0) , ((void *)0) , 0x20C },
{ ((void *)0) , ((void *)0) , 0 },
}

Definition at line 319 of file wstag306.c.

◆ actor10Talks

FieldTalk actor10Talks[]
Initial value:
= {
{ ((void *)0) , ((void *)0) , 0x20C },
{ ((void *)0) , ((void *)0) , 0 },
}

Definition at line 323 of file wstag306.c.

◆ actor11Talks

FieldTalk actor11Talks[]
Initial value:
= {
{ ((void *)0) , ((void *)0) , 0x20C },
{ ((void *)0) , ((void *)0) , 0 },
}

Definition at line 327 of file wstag306.c.

◆ actor12Talks

FieldTalk actor12Talks[]
Initial value:
= {
{ ((void *)0) , ((void *)0) , 5 },
{ ((void *)0) , ((void *)0) , 0 },
}

Definition at line 331 of file wstag306.c.

◆ actor0Conditions

u16 actor0Conditions[] = { (0x6000 | ( STORY_AMATERASU_BRIDGE )) , 1, 0xFFFF }

Definition at line 335 of file wstag306.c.

◆ actor1Conditions

u16 actor1Conditions[] = { (0x6000 | ( STORY_ASUKA_HEADQUARTERS )) , 1, 0xFFFF }

Definition at line 336 of file wstag306.c.

◆ actor2Conditions

u16 actor2Conditions[] = { (0x7000 | ( 0x94 )) , 1, 0xFFFF }

Definition at line 337 of file wstag306.c.

◆ actor3Conditions

u16 actor3Conditions[] = { (0x7000 | ( 0x1A )) , 1, 0xFFFF }

Definition at line 338 of file wstag306.c.

◆ actor4Conditions

u16 actor4Conditions[] = { (0x7000 | ( 0x1A )) , 1, 0xFFFF }

Definition at line 339 of file wstag306.c.

◆ actor5Conditions

u16 actor5Conditions[] = { (0x7000 | ( 0x94 )) , 1, 0xFFFF }

Definition at line 340 of file wstag306.c.

◆ actor6Conditions

u16 actor6Conditions[] = { (0x7000 | ( 0x94 )) , 1, 0xFFFF }

Definition at line 341 of file wstag306.c.

◆ actor7Conditions

u16 actor7Conditions[] = { (0x7000 | ( 0x1A )) , 1, 0xFFFF }

Definition at line 342 of file wstag306.c.

◆ actor8Conditions

u16 actor8Conditions[] = { (0x7000 | ( 0x94 )) , 1, 0xFFFF }

Definition at line 343 of file wstag306.c.

◆ actor9Conditions

u16 actor9Conditions[] = { (0x7000 | ( 0x94 )) , 1, 0xFFFF }

Definition at line 344 of file wstag306.c.

◆ actor10Conditions

u16 actor10Conditions[] = { (0x7000 | ( 0x94 )) , 1, 0xFFFF }

Definition at line 345 of file wstag306.c.

◆ actor11Conditions

u16 actor11Conditions[] = { (0x7000 | ( 0x94 )) , 1, 0xFFFF }

Definition at line 346 of file wstag306.c.

◆ actor12Conditions

u16 actor12Conditions[] = { (0x7000 | ( 0x1A )) , 1, 0xFFFF }

Definition at line 347 of file wstag306.c.

◆ actor0

FieldActorEntry actor0 = { actor0Conditions, ((void *)0) , 1, 4, 0, 0, 1 }

Definition at line 348 of file wstag306.c.

◆ actor1

FieldActorEntry actor1 = { actor1Conditions, ((void *)0) , 1, 4, 0, 0, 1 }

Definition at line 349 of file wstag306.c.

◆ actor2

FieldActorEntry actor2 = { actor2Conditions, actor2Talks, 0x3F, 5, 121, 260, 7 }

Definition at line 350 of file wstag306.c.

◆ actor3

FieldActorEntry actor3 = { actor3Conditions, actor3Talks, 0x9D, 6, 463, 264, 1 }

Definition at line 351 of file wstag306.c.

◆ actor4

FieldActorEntry actor4 = { actor4Conditions, actor4Talks, 0x9E, 7, 367, 312, 5 }

Definition at line 352 of file wstag306.c.

◆ actor5

FieldActorEntry actor5 = { actor5Conditions, actor5Talks, 0xC6, 8, 185, 229, 7 }

Definition at line 353 of file wstag306.c.

◆ actor6

FieldActorEntry actor6 = { actor6Conditions, actor6Talks, 0xC7, 9, 249, 197, 7 }

Definition at line 354 of file wstag306.c.

◆ actor7

FieldActorEntry actor7 = { actor7Conditions, actor7Talks, 0x119, 0xA, 428, 278, 1 }

Definition at line 355 of file wstag306.c.

◆ actor8

FieldActorEntry actor8 = { actor8Conditions, actor8Talks, 0x121, 0xB, 376, 188, 1 }

Definition at line 356 of file wstag306.c.

◆ actor9

FieldActorEntry actor9 = { actor9Conditions, actor9Talks, 0x122, 0xC, 360, 380, 3 }

Definition at line 357 of file wstag306.c.

◆ actor10

FieldActorEntry actor10 = { actor10Conditions, actor10Talks, 0x123, 0xD, 424, 348, 3 }

Definition at line 358 of file wstag306.c.

◆ actor11

FieldActorEntry actor11 = { actor11Conditions, actor11Talks, 0x124, 0xE, 488, 316, 3 }

Definition at line 359 of file wstag306.c.

◆ actor12

FieldActorEntry actor12 = { actor12Conditions, actor12Talks, 0x13A, 0xF, 451, 290, 1 }

Definition at line 360 of file wstag306.c.

◆ stageActors

FieldActorEntry* stageActors[]
Initial value:
= {
((void *)0) ,
}
FieldActorEntry actor0
Definition wstag306.c:348
FieldActorEntry actor6
Definition wstag306.c:354
FieldActorEntry actor5
Definition wstag306.c:353
FieldActorEntry actor2
Definition wstag306.c:350
FieldActorEntry actor10
Definition wstag306.c:358
FieldActorEntry actor4
Definition wstag306.c:352
FieldActorEntry actor8
Definition wstag306.c:356
FieldActorEntry actor9
Definition wstag306.c:357
FieldActorEntry actor12
Definition wstag306.c:360
FieldActorEntry actor7
Definition wstag306.c:355
FieldActorEntry actor11
Definition wstag306.c:359
FieldActorEntry actor1
Definition wstag306.c:349
FieldActorEntry actor3
Definition wstag306.c:351

Definition at line 361 of file wstag306.c.

Referenced by setupStage().

◆ stageObjects

StageTile stageObjects[]
Initial value:
= {
{ 1, 0, 0x40, 6, 0x32, 1, 0x32, 0x3B, 6, 0, 374, 136, 0, 0 },
{ 1, 0, 0x40, 6, 0x3C, 1, 0x3C, 0x45, 8, 0, 408, 105, 0, 0 },
{ 1, 0, 0x40, 6, 0x46, 1, 0x46, 0x57, 8, 0, 418, 102, 0, 0 },
{ 0, 1, 0x40, 6, 5, 0, 5, 0xA, 4, 0, 382, 196, 0, 0 },
{ 1, 0, 0x40, 4, 0, 0, 0, 0, 0, 0, 453, 185, 199, 0 },
{ 1, 0, 0x40, 4, 1, 0, 0, 0, 0, 0, 449, 190, 204, 0 },
{ 1, 0, 0x58, 4, 2, 0, 0, 0, 0, 0, 351, 136, 218, 0 },
{ 1, 0, 0x40, 4, 3, 0, 0, 0, 0, 0, 215, 302, 353, 0 },
{ 1, 0, 0x48, 4, 4, 0, 0, 0, 0, 0, 144, 262, 322, 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 377 of file wstag306.c.

Referenced by setupStage().

◆ stageSlots

StageSlot stageSlots[]
Initial value:
= {
{ { { 0xFFFF , 0 }, { 0xFFFF , 0 } }, 1 , 0x286, 0x398, 0xCC, 1, 0, 0, 0 },
{ { { (0x7000 | ( 0x1A )) , 1 }, { 0xFFFF , 0 } }, 8 , 0x3C6, 0, 0, 0, 0, 0, 0 },
{ { { 0xFFFF , 0 }, { 0xFFFF , 0 } }, 0, 0, 0, 0, 0, 0, 0, 0 },
}

Definition at line 389 of file wstag306.c.

Referenced by setupStage().

◆ stageFuncs

void(* stageFuncs[])(void) ( void  )
Initial value:
= {
}
void setupStage(void)
Sets the stage up: its map, actors and events, playing KANRIBGM; BGM_0029 instead except at STORY_PRE...
Definition wstag306.c:71

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 394 of file wstag306.c.

◆ stageEvents

FieldEvent stageEvents[]
Initial value:
= {
{ 930, script930, ( ( 0x128 - 1) << 16 | ( 0xF )), ((void *)0) , ((void *)0) },
{ 966, script966, ( ( 0x128 - 1) << 16 | ( 0x15 )), ((void *)0) , ((void *)0) },
{ 980, script980, ( ( 0x128 - 1) << 16 | ( 0x17 )), ((void *)0) , ((void *)0) },
{ -1, ((void *)0) , 0, ((void *)0) , ((void *)0) },
}
s16 script930[]
Definition wstag306.c:94
s16 script966[]
Definition wstag306.c:147
s16 script980[]
Definition wstag306.c:161

Definition at line 397 of file wstag306.c.

Referenced by setupStage().