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

FIGHTSTG's cameras: the fighters' cameras, the shot camera, the battle camera and its views, and the camera turns (fighter_camera.c, shot_camera.c, battle_camera.c and camera_task.c). More...

Include dependency graph for camera.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  FighterCamera
 A fighter's camera (FIGHTSTG_createCamera) on layer 0x1009, from its FighterInfo; frames counts the frames it still has to be set. More...
 
struct  CameraShot
 A shot of FIGHTSTG_updateShotCamera's camera. More...
 
struct  ShotCamera
 A camera (FIGHTSTG_createShotCamera) that goes through lists of shots (FIGHTSTG_cameraShots), the next list picked at random (FIGHTSTG_nextShotLists) More...
 
struct  CameraView
 Where the battle camera looks from and to, as a GsRVIEW2 with the transform of its coordinate system. More...
 
struct  BattleCamera
 The battle camera (FIGHTSTG_createBattleCamera), registered as BATTLE_TASK_CAMERA on a layer: set puts a view, fade goes from one to another in time frames. More...
 
struct  CameraShots
 The European version's camera (FIGHTSTG_startCameraShots): one of three lists of shots (FIGHTSTG_euCameraShots) picked at random, then back to the enemy's view. More...
 
struct  CameraTurn
 The camera's turn around the fighters when the player loses (FIGHTSTG_updateCameraTurn) More...
 

Functions

BattleCamera * FIGHTSTG_createBattleCamera (s32 layerId)
 Creates the battle camera (BATTLE_TASK_CAMERA) on a layer.
 
CameraTurn * FIGHTSTG_startCameraTurn (void)
 The tasks FIGHTSTG starts for WFIGHTMN and WFIGHTTS.
 
CameraShots * FIGHTSTG_startCameraShots (void)
 Starts the European version's own camera.
 
void FIGHTSTG_updateShotCamera (ShotCamera *task)
 Shared between the overlay's objects.
 
ShotCamera * FIGHTSTG_createShotCamera (void)
 Starts the camera that plays lists of shots (FIGHTSTG_updateShotCamera)
 
void FIGHTSTG_updateCameraTurn (CameraTurn *task, BattleScript **children)
 When the player loses, turns the camera around the fighters, from the first fighter's view 0xB, over stage 0x17, with the battle script's task as the child; the European version moves on to state 2 after 240 frames, where the camera keeps turning.
 
void FIGHTSTG_updateCameraShots (CameraShots *task)
 A camera of the European version's own: one of the three lists of shots of FIGHTSTG_euCameraShots, picked at random, from the views of the fighters and the enemy, fades to them and a turn, then the enemy's view.
 
void FIGHTSTG_applyCamera (FighterCamera *task)
 Sets layer 0x1009's view to the fighter camera's, with its rotation and translation, and counts down one of the frames it is set for.
 
void FIGHTSTG_loadCamera (FighterCamera *task)
 Loads a fighter camera's view from its fighter's camera 6, or 7 while the model has an idle motion, with no rotation or translation.
 
void FIGHTSTG_updateCamera (FighterCamera *task)
 The fighter camera's task: once layer 0x1009 is there, loads the view and sets it for two frames.
 
FighterCamera * FIGHTSTG_createCamera (s32 fighter, ModelControl *control)
 Creates the camera of a fighter of the partner view, on control's model.
 
void FIGHTSTG_updateBattleCamera (BattleCamera *task)
 The battle camera's task: fades its view from from to to (position, reference, translation, rotation, roll and projection) by tStep a frame, sets it on its layer every frame and goes to the next substate once there; set and fade restart it through TASK_DONE.
 
void FIGHTSTG_setBattleCameraView (BattleCamera *task, CameraView *view)
 BattleCamera.set: puts the battle camera at view.
 
void FIGHTSTG_fadeBattleCamera (BattleCamera *task, CameraView *from, CameraView *to, s32 time)
 BattleCamera.fade: fades the battle camera from from (or where it is) to to over time frames.
 
CameraView * FIGHTSTG_getFighterView (BattleCamera *task, s32 id, s32 camera)
 The view of a fighter's camera (id as Models.getFighter takes it), which ends the battle camera's fade.
 
CameraView * FIGHTSTG_getEnemyView (BattleCamera *task)
 The view of the enemy's last camera.
 

Variables

CameraView FIGHTSTG_fighterView
 the view FIGHTSTG_getFighterView makes
 
CameraShot FIGHTSTG_cameraShots [4][6]
 FIGHTSTG_updateShotCamera's shots: how long each lasts and the substate that makes it, in four lists that end with a time of -1.
 
u8 FIGHTSTG_nextShotLists [8][3]
 the lists that can follow each one
 
CameraShot FIGHTSTG_euCameraShots [3][3]
 the lists of shots of the European version's own camera (FIGHTSTG_updateCameraShots)
 

Detailed Description

FIGHTSTG's cameras: the fighters' cameras, the shot camera, the battle camera and its views, and the camera turns (fighter_camera.c, shot_camera.c, battle_camera.c and camera_task.c).

Definition in file camera.h.

Function Documentation

◆ FIGHTSTG_createBattleCamera()

BattleCamera * FIGHTSTG_createBattleCamera ( s32  layerId)

Creates the battle camera (BATTLE_TASK_CAMERA) on a layer.

Definition at line 209 of file battle_camera.c.

Referenced by setUpBattle(), and WFIGHTMN_updateMenu().

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

◆ FIGHTSTG_startCameraTurn()

CameraTurn * FIGHTSTG_startCameraTurn ( void  )

The tasks FIGHTSTG starts for WFIGHTMN and WFIGHTTS.

The tasks FIGHTSTG starts for WFIGHTMN and WFIGHTTS.

Definition at line 59 of file camera_turn.h.

Referenced by endBattleOnKnockOut(), and runPlayPage().

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

◆ FIGHTSTG_startCameraShots()

CameraShots * FIGHTSTG_startCameraShots ( void  )

Starts the European version's own camera.

Definition at line 100 of file camera_task.c.

Referenced by WFIGHTMN_updateMenu().

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

◆ FIGHTSTG_updateShotCamera()

void FIGHTSTG_updateShotCamera ( ShotCamera *  task)

Shared between the overlay's objects.

Shared between the overlay's objects.

< the fighters'

Definition at line 119 of file shot_camera.c.

Referenced by FIGHTSTG_createShotCamera().

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

◆ FIGHTSTG_createShotCamera()

ShotCamera * FIGHTSTG_createShotCamera ( void  )

Starts the camera that plays lists of shots (FIGHTSTG_updateShotCamera)

Definition at line 223 of file shot_camera.c.

Referenced by runCommandMenu(), runConfusedMenu(), and runKnockOutSwitchMenu().

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

◆ FIGHTSTG_updateCameraTurn()

void FIGHTSTG_updateCameraTurn ( CameraTurn *  task,
BattleScript **  children 
)

When the player loses, turns the camera around the fighters, from the first fighter's view 0xB, over stage 0x17, with the battle script's task as the child; the European version moves on to state 2 after 240 frames, where the camera keeps turning.

Definition at line 10 of file camera_turn.h.

Referenced by FIGHTSTG_startCameraTurn().

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

◆ FIGHTSTG_updateCameraShots()

void FIGHTSTG_updateCameraShots ( CameraShots *  task)

A camera of the European version's own: one of the three lists of shots of FIGHTSTG_euCameraShots, picked at random, from the views of the fighters and the enemy, fades to them and a turn, then the enemy's view.

The match depends on the turn's time * 32, which written as a shift reads only the time's low half

< the fighters'

Definition at line 23 of file camera_task.c.

Referenced by FIGHTSTG_startCameraShots().

Here is the caller graph for this function:

◆ FIGHTSTG_applyCamera()

void FIGHTSTG_applyCamera ( FighterCamera *  task)

Sets layer 0x1009's view to the fighter camera's, with its rotation and translation, and counts down one of the frames it is set for.

Definition at line 7 of file fighter_camera.c.

Referenced by FIGHTSTG_updateCamera().

Here is the caller graph for this function:

◆ FIGHTSTG_loadCamera()

void FIGHTSTG_loadCamera ( FighterCamera *  task)

Loads a fighter camera's view from its fighter's camera 6, or 7 while the model has an idle motion, with no rotation or translation.

Definition at line 24 of file fighter_camera.c.

Referenced by FIGHTSTG_updateCamera().

Here is the caller graph for this function:

◆ FIGHTSTG_updateCamera()

void FIGHTSTG_updateCamera ( FighterCamera *  task)

The fighter camera's task: once layer 0x1009 is there, loads the view and sets it for two frames.

Definition at line 48 of file fighter_camera.c.

Referenced by FIGHTSTG_createCamera().

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

◆ FIGHTSTG_createCamera()

FighterCamera * FIGHTSTG_createCamera ( s32  fighter,
ModelControl *  control 
)

Creates the camera of a fighter of the partner view, on control's model.

Definition at line 78 of file fighter_camera.c.

Referenced by FIGHTSTG_updatePartnerView().

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

◆ FIGHTSTG_updateBattleCamera()

void FIGHTSTG_updateBattleCamera ( BattleCamera *  task)

The battle camera's task: fades its view from from to to (position, reference, translation, rotation, roll and projection) by tStep a frame, sets it on its layer every frame and goes to the next substate once there; set and fade restart it through TASK_DONE.

Definition at line 9 of file battle_camera.c.

Referenced by FIGHTSTG_createBattleCamera().

Here is the caller graph for this function:

◆ FIGHTSTG_setBattleCameraView()

void FIGHTSTG_setBattleCameraView ( BattleCamera *  task,
CameraView *  view 
)

BattleCamera.set: puts the battle camera at view.

Definition at line 117 of file battle_camera.c.

Referenced by FIGHTSTG_createBattleCamera().

Here is the caller graph for this function:

◆ FIGHTSTG_fadeBattleCamera()

void FIGHTSTG_fadeBattleCamera ( BattleCamera *  task,
CameraView *  from,
CameraView *  to,
s32  time 
)

BattleCamera.fade: fades the battle camera from from (or where it is) to to over time frames.

Definition at line 125 of file battle_camera.c.

Referenced by FIGHTSTG_createBattleCamera().

Here is the caller graph for this function:

◆ FIGHTSTG_getFighterView()

CameraView * FIGHTSTG_getFighterView ( BattleCamera *  task,
s32  id,
s32  camera 
)

The view of a fighter's camera (id as Models.getFighter takes it), which ends the battle camera's fade.

< the fighters'

Definition at line 139 of file battle_camera.c.

Referenced by FIGHTSTG_createBattleCamera(), and FIGHTSTG_getEnemyView().

Here is the caller graph for this function:

◆ FIGHTSTG_getEnemyView()

CameraView * FIGHTSTG_getEnemyView ( BattleCamera *  task)

The view of the enemy's last camera.

< the fighters'

Definition at line 188 of file battle_camera.c.

Referenced by FIGHTSTG_createBattleCamera().

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

Variable Documentation

◆ FIGHTSTG_fighterView

CameraView FIGHTSTG_fighterView
extern

the view FIGHTSTG_getFighterView makes

Definition at line 1081 of file model_mesh.c.

Referenced by FIGHTSTG_getEnemyView(), FIGHTSTG_getFighterView(), FIGHTSTG_runScriptCamera(), FIGHTSTG_updateCameraTurn(), startChange(), and swapInNewDigimon().

◆ FIGHTSTG_cameraShots

CameraShot FIGHTSTG_cameraShots[4][6]
extern

FIGHTSTG_updateShotCamera's shots: how long each lasts and the substate that makes it, in four lists that end with a time of -1.

Definition at line 8 of file shot_camera.c.

Referenced by FIGHTSTG_updateShotCamera(), and startNextShot().

◆ FIGHTSTG_nextShotLists

u8 FIGHTSTG_nextShotLists[8][3]
extern

the lists that can follow each one

Definition at line 15 of file shot_camera.c.

Referenced by startNextShot().

◆ FIGHTSTG_euCameraShots

CameraShot FIGHTSTG_euCameraShots[3][3]
extern

the lists of shots of the European version's own camera (FIGHTSTG_updateCameraShots)

Definition at line 12 of file camera_task.c.

Referenced by FIGHTSTG_updateCameraShots().