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

The second object of FIGHTSTG.PRO (see model_mesh.c), the fight stage: its rodata starts at 0x80082464 (USA), 4 bytes past a multiple of 8. More...

Include dependency graph for stage.c:

Go to the source code of this file.

Functions

void FIGHTSTG_fadeStage (FightStage *task, Model **children)
 Sets the stage model's color and SCREEN_LAYER's background to their fades' current values (a black background is drawn as 1, 1, 1)
 
static void fadeInStageLights (FightStage *task)
 Fades the stage's lights in.
 
static void prepareStageModel (FightStage *task, Model **children, FightStageInfo *stages)
 Once the stage's model is in: turns off the bounds check of the stage's listed bones and starts the model and the background in black.
 
static void startStageFadeIn (FightStage *task, FightStageInfo *stages)
 Sets the fade of the model's color and the background in from black.
 
static void advanceStageFade (FightStage *task)
 Moves the fade on by the frame's time, up to its end (0x1000).
 
static void startStageFadeOut (FightStage *task, FightStageInfo *stages)
 Sets the fade of the model's color and the old stage's background out to black.
 
void FIGHTSTG_updateStage (FightStage *task, Model **children)
 The fight stage's task: loads the stage's model, starts its music and fades in its lights, then fades the model's color and the background in from black; setStage fades them out, frees the old model and stops its music, and loads the new stage.
 
void FIGHTSTG_setStage (FightStage *task, s32 id, s32 fadeOutTime, s32 fadeInTime)
 FightStage.setStage: changes to stage ID, fading the old one out over FADEOUTTIME and the new one in over FADEINTIME.
 
s32 FIGHTSTG_randomStage (void)
 A random fight stage, 1-27.
 
s32 FIGHTSTG_getStageMotionsFile (s32 id)
 The file of fight stage ID's motions.
 
FightStage * FIGHTSTG_createStage (s32 id, s32 fadeInTime)
 Creates the fight stage (id 0x15), which loads stage id and fades it in over fadeInTime.
 

Variables

const Vec2 FIGHTSTG_stageTexPos = { 0x280, 0 }
 
s32 FIGHTSTG_stageMusic [8]
 the fight stages' music (FightStageInfo.music), as sound ids
 

Detailed Description

The second object of FIGHTSTG.PRO (see model_mesh.c), the fight stage: its rodata starts at 0x80082464 (USA), 4 bytes past a multiple of 8.

Definition in file stage.c.

Function Documentation

◆ FIGHTSTG_fadeStage()

void FIGHTSTG_fadeStage ( FightStage *  task,
Model **  children 
)

Sets the stage model's color and SCREEN_LAYER's background to their fades' current values (a black background is drawn as 1, 1, 1)

Definition at line 8 of file stage.c.

Referenced by FIGHTSTG_updateStage().

Here is the caller graph for this function:

◆ fadeInStageLights()

static void fadeInStageLights ( FightStage *  task)
inlinestatic

Fades the stage's lights in.

Definition at line 37 of file stage.c.

Referenced by FIGHTSTG_updateStage().

Here is the caller graph for this function:

◆ prepareStageModel()

static void prepareStageModel ( FightStage *  task,
Model **  children,
FightStageInfo *  stages 
)
inlinestatic

Once the stage's model is in: turns off the bounds check of the stage's listed bones and starts the model and the background in black.

Definition at line 47 of file stage.c.

Referenced by FIGHTSTG_updateStage().

Here is the caller graph for this function:

◆ startStageFadeIn()

static void startStageFadeIn ( FightStage *  task,
FightStageInfo *  stages 
)
inlinestatic

Sets the fade of the model's color and the background in from black.

Definition at line 70 of file stage.c.

Referenced by FIGHTSTG_updateStage().

Here is the caller graph for this function:

◆ advanceStageFade()

static void advanceStageFade ( FightStage *  task)
inlinestatic

Moves the fade on by the frame's time, up to its end (0x1000).

Definition at line 88 of file stage.c.

Referenced by FIGHTSTG_updateStage().

Here is the caller graph for this function:

◆ startStageFadeOut()

static void startStageFadeOut ( FightStage *  task,
FightStageInfo *  stages 
)
inlinestatic

Sets the fade of the model's color and the old stage's background out to black.

Definition at line 97 of file stage.c.

Referenced by FIGHTSTG_updateStage().

Here is the caller graph for this function:

◆ FIGHTSTG_updateStage()

void FIGHTSTG_updateStage ( FightStage *  task,
Model **  children 
)

The fight stage's task: loads the stage's model, starts its music and fades in its lights, then fades the model's color and the background in from black; setStage fades them out, frees the old model and stops its music, and loads the new stage.

Definition at line 118 of file stage.c.

Referenced by FIGHTSTG_createStage().

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

◆ FIGHTSTG_setStage()

void FIGHTSTG_setStage ( FightStage *  task,
s32  id,
s32  fadeOutTime,
s32  fadeInTime 
)

FightStage.setStage: changes to stage ID, fading the old one out over FADEOUTTIME and the new one in over FADEINTIME.

Definition at line 189 of file stage.c.

Referenced by FIGHTSTG_createStage().

Here is the caller graph for this function:

◆ FIGHTSTG_randomStage()

s32 FIGHTSTG_randomStage ( void  )

A random fight stage, 1-27.

Definition at line 200 of file stage.c.

Referenced by FIGHTSTG_updateRoot().

Here is the caller graph for this function:

◆ FIGHTSTG_getStageMotionsFile()

s32 FIGHTSTG_getStageMotionsFile ( s32  id)

The file of fight stage ID's motions.

Definition at line 205 of file stage.c.

Referenced by FIGHTSTG_runScriptStage().

Here is the caller graph for this function:

◆ FIGHTSTG_createStage()

FightStage * FIGHTSTG_createStage ( s32  id,
s32  fadeInTime 
)

Creates the fight stage (id 0x15), which loads stage id and fades it in over fadeInTime.

The tasks FIGHTSTG starts for WFIGHTMN and WFIGHTTS.

Definition at line 213 of file stage.c.

Referenced by setUpBattle(), and WFIGHTMN_updateMenu().

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

Variable Documentation

◆ FIGHTSTG_stageTexPos

const Vec2 FIGHTSTG_stageTexPos = { 0x280, 0 }

Definition at line 28 of file stage.c.

Referenced by FIGHTSTG_updateStage().

◆ FIGHTSTG_stageMusic

s32 FIGHTSTG_stageMusic[8]
Initial value:
= {
0xA004E03C, 0xA004E0BD, 0xA004E13E, 0xA004E1BF,
0xA004E240, 0xA004E2C1, 0xA004E342, 0xA004E3C3,
}

the fight stages' music (FightStageInfo.music), as sound ids

Shared between the overlay's objects.

Definition at line 31 of file stage.c.

Referenced by FIGHTSTG_updateStage().