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

WSTAG680: Storage Room, Byakko City. More...

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

Go to the source code of this file.

Macros

#define STAGE_CHILDREN_SIZE   4
 
#define STAGE_TEXT   TEXT_FILE(TEXT_TALKS_01)
 
#define EVENT_TEXT_FILE   (TEXT_EVENTS_600 - 1)
 
#define STAGE_FILE   0x63D
 

Functions

s32 stepRiser (StageRiser *obj, StageRiserFrame *frames, s32 depth)
 Steps a mover's looping animation, its last frame setting how far it moves.
 
void updateRisers (StageRisers *task)
 Animates and moves the map objects of the stage's table (lifts for animations 8-10) and pushes the player.
 
void handleCommand814 (void *arg, s32 event)
 Starts the map objects an event moves (the handler of the events the task gets)
 
void * createCommand814 (s32 arg)
 Command 814 of the event scripts: the lifts that rise and carry the player off in event 412 (updateRisers)
 
void updateStage (StageTask *task, void **children)
 Creates the event object of story progress 0xF.
 
void setupStage (void)
 Sets the stage up: its map, actors and events, playing the ambience ENV_0019.
 

Variables

StageRiserFrame * updateRisersFrames []
 Defined below, after the code that uses them.
 
s16 script412 []
 
StageRiserFrame updateRisersFrames_0 []
 
StageRiserFrame updateRisersFrames_1 []
 
StageRiserFrame updateRisersFrames_6 []
 
ActorImage stageImages []
 
u16 actor0Conditions [] = { (0x6000 | ( STORY_DE_SINCERITY )) , 1, (( 0x40 ) << 8 | ( 0x1C )) , 0, 0xFFFF }
 
FieldActorEntry actor0 = { actor0Conditions, ((void *)0) , 1, 4, 0, 0, 0 }
 
FieldActorEntry * stageActors []
 
StageTile stageObjects []
 The tables and color setupStage gives FIELDSTG_state (FieldState)
 
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

WSTAG680: Storage Room, Byakko City.

The basement the player falls into; no Bai Hu copy.

Definition in file wstag680.c.

Macro Definition Documentation

◆ STAGE_CHILDREN_SIZE

#define STAGE_CHILDREN_SIZE   4

Definition at line 191 of file wstag680.c.

◆ STAGE_TEXT

#define STAGE_TEXT   TEXT_FILE(TEXT_TALKS_01)

Definition at line 199 of file wstag680.c.

◆ EVENT_TEXT_FILE

#define EVENT_TEXT_FILE   (TEXT_EVENTS_600 - 1)

Definition at line 200 of file wstag680.c.

◆ STAGE_FILE

#define STAGE_FILE   0x63D

Definition at line 201 of file wstag680.c.

Function Documentation

◆ stepRiser()

s32 stepRiser ( StageRiser *  obj,
StageRiserFrame *  frames,
s32  depth 
)

Steps a mover's looping animation, its last frame setting how far it moves.

Definition at line 12 of file wstag680.c.

Referenced by stepRiser(), and updateRisers().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateRisers()

void updateRisers ( StageRisers *  task)

Animates and moves the map objects of the stage's table (lifts for animations 8-10) and pushes the player.

< every character (FIELDSTG_createActor)

Definition at line 38 of file wstag680.c.

Referenced by createCommand814().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ handleCommand814()

void handleCommand814 ( void *  arg,
s32  event 
)

Starts the map objects an event moves (the handler of the events the task gets)

< every character (FIELDSTG_createActor)

Definition at line 113 of file wstag680.c.

◆ createCommand814()

void * createCommand814 ( s32  arg)

Command 814 of the event scripts: the lifts that rise and carry the player off in event 412 (updateRisers)

Definition at line 170 of file wstag680.c.

Here is the call graph for this function:

◆ updateStage()

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

Creates the event object of story progress 0xF.

Definition at line 175 of file wstag680.c.

Here is the call graph for this function:

◆ setupStage()

void setupStage ( void  )

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

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_0019: Byakko City's Storage Room

< ENV_0019: Byakko City's Storage Room

Definition at line 204 of file wstag680.c.

Variable Documentation

◆ updateRisersFrames

StageRiserFrame * updateRisersFrames
Initial value:

Defined below, after the code that uses them.

Definition at line 321 of file wstag680.c.

Referenced by updateRisers().

◆ script412

s16 script412[]

Definition at line 221 of file wstag680.c.

◆ updateRisersFrames_0

StageRiserFrame updateRisersFrames_0[]
Initial value:
= {
{ 14, 6, 0 },
{ 15, 6, 0 },
{ 16, 6, 0 },
{ 255, 0, 72 },
}

Definition at line 302 of file wstag680.c.

◆ updateRisersFrames_1

StageRiserFrame updateRisersFrames_1[]
Initial value:
= {
{ 10, 6, 0 },
{ 11, 6, 0 },
{ 12, 6, 0 },
{ 255, 0, 80 },
}

Definition at line 308 of file wstag680.c.

◆ updateRisersFrames_6

StageRiserFrame updateRisersFrames_6[]
Initial value:
= {
{ 5, 6, 0 },
{ 6, 6, 0 },
{ 7, 6, 0 },
{ 8, 6, 0 },
{ 255, 0, 80 },
}

Definition at line 314 of file wstag680.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, 0x164, 0xD8, 0x64, 0x150, 0x1FF },
}

Definition at line 334 of file wstag680.c.

Referenced by setupStage().

◆ actor0Conditions

u16 actor0Conditions[] = { (0x6000 | ( STORY_DE_SINCERITY )) , 1, (( 0x40 ) << 8 | ( 0x1C )) , 0, 0xFFFF }

Definition at line 343 of file wstag680.c.

◆ actor0

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

Definition at line 344 of file wstag680.c.

◆ stageActors

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

Definition at line 345 of file wstag680.c.

Referenced by setupStage().

◆ stageObjects

StageTile stageObjects[]
Initial value:
= {
{ 1, 0, 0x40, 2, 0x32, 2, 0, 1, 6, 0, 56, 56, 0, 0 },
{ 1, 0, 0x40, 2, 0x32, 2, 0, 1, 6, 0, 124, 22, 0, 0 },
{ 1, 0, 0x40, 6, 3, 0, 0, 0, 0, 0, 240, 176, 0, 0 },
{ 1, 1, 0x40, 6, 0xD, 0, 0, 0, 0, 0, 208, 160, 0, 0 },
{ 1, 2, 0x40, 6, 9, 0, 0, 0, 0, 0, 176, 144, 0, 0 },
{ 1, 3, 0x40, 6, 0xD, 0, 0, 0, 0, 0, 112, 144, 0, 0 },
{ 1, 3, 0x40, 6, 9, 0, 0, 0, 0, 0, 80, 128, 0, 0 },
{ 1, 4, 0x40, 6, 9, 0, 0, 0, 0, 0, 144, 128, 0, 0 },
{ 1, 3, 0x40, 6, 0xD, 0, 0, 0, 0, 0, 48, 112, 0, 0 },
{ 1, 4, 0x40, 6, 4, 0, 0, 0, 0, 0, 112, 112, 0, 0 },
{ 1, 5, 0x40, 6, 0xD, 0, 0, 0, 0, 0, 176, 112, 0, 0 },
{ 1, 4, 0x40, 6, 9, 0, 0, 0, 0, 0, 80, 96, 0, 0 },
{ 1, 6, 0x40, 6, 4, 0, 0, 0, 0, 0, 144, 96, 0, 0 },
{ 1, 7, 0x40, 6, 4, 0, 0, 0, 0, 0, 112, 80, 0, 0 },
{ 1, 8, 0x40, 6, 0, 0, 0, 0, 0, 0, 55, 119, 0, 0 },
{ 1, 0xA, 0x40, 6, 1, 0, 0, 0, 0, 0, 122, 85, 0, 0 },
{ 1, 9, 0x40, 6, 2, 0, 0, 0, 0, 0, 216, 127, 0, 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 349 of file wstag680.c.

Referenced by setupStage().

◆ stageFuncs

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

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 369 of file wstag680.c.

◆ stageEvents

FieldEvent stageEvents[]
Initial value:
= {
{ 412, script412, ( ( 0x144 - 1) << 16 | ( 2 )), ((void *)0) , ((void *)0) },
{ -1, ((void *)0) , 0, ((void *)0) , ((void *)0) },
}
s16 script412[]
Definition wstag680.c:221

Definition at line 372 of file wstag680.c.

Referenced by setupStage().