wavelength 1.0.0
Loading...
Searching...
No Matches
PlayerCamFX Class Reference

The camera of the tunnel. More...

#include <playercamfx.h>

Public Types

typedef void(PlayerCamFX::* Algorithm) (GfxTunnel *, Transform &, Transform &, int, bool)
 An algorithm that places the camera for a player.

Public Member Functions

 PlayerCamFX (int nPlayer, int nNumTracks, bool bBoss)
 Find the camera objects and the intro animation.
 ~PlayerCamFX ()
 Release the camera.
void Poll (GfxTunnel *pTunnel, GfxArena *pArena, float flTick, float flTime)
 Place the camera objects for a frame.
void SetSlide (const Transform *pXfm, float flBlend)
 Slide the view towards a transform, or stop sliding.
void SetZoomedOut (int nZoomedOut)
 Select the far pull back, and start the pull back to it.
void SetZoom (float flZoom)
 Set a pull back as a multiple of the far one, and start the pull back to it.
void Reset (bool bNearPullBack)
 Return the camera to its start.
void Kick (float flAmount)
 Kick the jiggle of the camera.
void SetBlendAlgorithm (const char *pszName, float flBlend)
 Blend in a second algorithm by its name.
void SetBlend (float flBlend)
 Set the blend towards the second algorithm.
const Transform & GetCamera () const
const Transform & GetView () const
float GetPullBackLevel () const
int GetZoomedOut () const
const Vector3 * GetScreenJiggle () const

Static Public Member Functions

static void LoadConfig (DataArray *pConfig, DataArray *pDefaults, GfxTunnel *pTunnel, int nOption)
 Load the shared settings, and register the algorithms.

Detailed Description

The camera of the tunnel.

It follows a player with one of a set of algorithms.

The class is not polymorphic. The name comes from the type of the algorithm table, a map of pointers to members of PlayerCamFX. The object is 0x1f0 bytes. An algorithm places the camera behind a frame of the tunnel. The view then pulls back from the camera along the frame, plays the intro fly-in before the song starts, slides towards a transform the tunnel supplies, and jiggles when kicked.

Member Typedef Documentation

◆ Algorithm

typedef void(PlayerCamFX::* PlayerCamFX::Algorithm) (GfxTunnel *, Transform &, Transform &, int, bool)

An algorithm that places the camera for a player.

The first transform receives the frame of the track and the second the camera. The integer is the player and the flag records a game of several players on one console.

Constructor & Destructor Documentation

◆ PlayerCamFX()

PlayerCamFX::PlayerCamFX ( int nPlayer,
int nNumTracks,
bool bBoss )

Find the camera objects and the intro animation.

Parameters
nPlayerThe player the camera follows.
nNumTracksThe number of tracks. It places the centre of the tunnel.
bBossWhether the song is a boss song. A boss song selects the boss intro.
Ghidra address:
NTSC-U/C: 0x001f7478
Ghidra address:
PAL: 0x00200218

◆ ~PlayerCamFX()

PlayerCamFX::~PlayerCamFX ( )

Release the camera.

Ghidra address:
NTSC-U/C: 0x001f77d8
Ghidra address:
PAL: 0x00200578

Member Function Documentation

◆ Poll()

void PlayerCamFX::Poll ( GfxTunnel * pTunnel,
GfxArena * pArena,
float flTick,
float flTime )

Place the camera objects for a frame.

Parameters
pTunnelThe tunnel.
pArenaThe arena of the tunnel. The routine does not read it.
flTickThe tick of the song. The intro runs while the tick is early enough.
flTimeThe time of the song. The pull back runs over it.
Ghidra address:
NTSC-U/C: 0x001f7818
Ghidra address:
PAL: 0x002005b8

◆ SetSlide()

void PlayerCamFX::SetSlide ( const Transform * pXfm,
float flBlend )

Slide the view towards a transform, or stop sliding.

Parameters
pXfmThe transform, or null to stop.
flBlendHow far the view slides, from 0 to 1.
Ghidra address:
NTSC-U/C: 0x001f7d40
Ghidra address:
PAL: 0x00200ae0

◆ LoadConfig()

void PlayerCamFX::LoadConfig ( DataArray * pConfig,
DataArray * pDefaults,
GfxTunnel * pTunnel,
int nOption )
static

Load the shared settings, and register the algorithms.

Parameters
pConfigThe configuration.
pDefaultsThe defaults of the configuration.
pTunnelThe tunnel. The routine does not read it.
nOptionThe fourth argument every loader of the tunnel receives. A non-zero value skips the registration of the algorithms.
Ghidra address:
NTSC-U/C: 0x001f8750
Ghidra address:
PAL: 0x002014f0

◆ SetZoomedOut()

void PlayerCamFX::SetZoomedOut ( int nZoomedOut)

Select the far pull back, and start the pull back to it.

Parameters
nZoomedOutNon-zero for the far pull back.
Ghidra address:
NTSC-U/C: 0x001f8f20
Ghidra address:
PAL: 0x00201cc0

◆ SetZoom()

void PlayerCamFX::SetZoom ( float flZoom)

Set a pull back as a multiple of the far one, and start the pull back to it.

Parameters
flZoomThe multiple, or 0 to use the near or far pull back.
Ghidra address:
NTSC-U/C: 0x001f8f40
Ghidra address:
PAL: 0x00201ce0

◆ Reset()

void PlayerCamFX::Reset ( bool bNearPullBack)

Return the camera to its start.

The intro is not played again.

Parameters
bNearPullBackTake the near pull back at once rather than the selected one.
Ghidra address:
NTSC-U/C: 0x001f9020
Ghidra address:
PAL: 0x00201dc0

◆ Kick()

void PlayerCamFX::Kick ( float flAmount)

Kick the jiggle of the camera.

A camera at rest also takes new random directions to jiggle in.

Parameters
flAmountThe speed the kick adds.
Ghidra address:
NTSC-U/C: 0x001f9280
Ghidra address:
PAL: 0x00202020

◆ SetBlendAlgorithm()

void PlayerCamFX::SetBlendAlgorithm ( const char * pszName,
float flBlend )

Blend in a second algorithm by its name.

Parameters
pszNameThe name, or null for no second algorithm.
flBlendThe blend towards the second algorithm, from 0 to 1.
Ghidra address:
NTSC-U/C: 0x001f93e0
Ghidra address:
PAL: 0x00202180

◆ SetBlend()

void PlayerCamFX::SetBlend ( float flBlend)

Set the blend towards the second algorithm.

Parameters
flBlendThe blend, from 0 to 1.
Ghidra address:
NTSC-U/C: 0x001f9520
Ghidra address:
PAL: 0x002022c0

◆ GetCamera()

const Transform & PlayerCamFX::GetCamera ( ) const
inline
Returns
The camera the algorithm places.

◆ GetView()

const Transform & PlayerCamFX::GetView ( ) const
inline
Returns
The camera after the pull back and the intro.

◆ GetPullBackLevel()

float PlayerCamFX::GetPullBackLevel ( ) const
inline
Returns
The pull back that scales sPullBack.

◆ GetZoomedOut()

int PlayerCamFX::GetZoomedOut ( ) const
inline
Returns
Whether the far pull back is selected.

◆ GetScreenJiggle()

const Vector3 * PlayerCamFX::GetScreenJiggle ( ) const
inline
Returns
The jiggle across the screen.

The documentation for this class was generated from the following file: