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

The tunnel graphics of one player: the camera, the activator, the grid, the cursor, and the freestyle. More...

#include <tnlplayer.h>

Public Member Functions

 TnlPlayer (int nPlayer, int nCam, const char *pszColor, GfxTunnel *pTunnel, TnlGeom *pGeom, int nFreestyleType, char nExcludedType, char nOtherExcludedType)
 Build the graphics of a player and find the views of its camera.
 ~TnlPlayer ()
 Destroy the graphics of the player.
void LoadConfig (DataArray *pConfig, DataArray *pDefaults, GfxTunnel *pTunnel, int nOption, int bFreestyle)
 Load the settings of the graphics of the player and the colours of its track.
bool SelectColor (int nMultiplier)
 Choose the colour of the track for a multiplier.
void Update (GfxArena *pArena, float flTicks, float flTime)
 Advance the activator, the grid, and the cursor.
void UpdateTrail (float flTicks, float flTime)
 Draw the needle of the scratch freestyle.
int GetPlayer () const
TnlActivator & GetActivator ()
TnlGrid & GetGrid ()
TnlCursor & GetCursor ()
TnlFreestyle & GetFreestyle ()

Static Public Member Functions

static void LoadCamXfm (DataArray *pConfig, DataArray *pDefaults, RndCam *pCam)
 Place a camera from the base pitch and offset of the configuration.

Detailed Description

The tunnel graphics of one player: the camera, the activator, the grid, the cursor, and the freestyle.

The class is not polymorphic, and the name is inferred. The object is 0x2cc bytes. A player without a camera of the tunnel, one that plays on another console, has no camera views.

Constructor & Destructor Documentation

◆ TnlPlayer()

TnlPlayer::TnlPlayer ( int nPlayer,
int nCam,
const char * pszColor,
GfxTunnel * pTunnel,
TnlGeom * pGeom,
int nFreestyleType,
char nExcludedType,
char nOtherExcludedType )

Build the graphics of a player and find the views of its camera.

Parameters
nPlayerThe player.
nCamThe camera of the player, or -1 for none.
pszColorThe colour of the player.
pTunnelThe tunnel.
pGeomThe geometry of the tunnel.
nFreestyleTypeThe kind of freestyle of the player, one of Freestylus::Type.
nExcludedTypeA gem type the cursor never links.
nOtherExcludedTypeA second gem type the cursor never links.
Ghidra address:
NTSC-U/C: 0x001d6780
Ghidra address:
PAL: 0x001df520

◆ ~TnlPlayer()

TnlPlayer::~TnlPlayer ( )

Destroy the graphics of the player.

Ghidra address:
NTSC-U/C: 0x001d6ad8
Ghidra address:
PAL: 0x001df878

Member Function Documentation

◆ LoadCamXfm()

void TnlPlayer::LoadCamXfm ( DataArray * pConfig,
DataArray * pDefaults,
RndCam * pCam )
static

Place a camera from the base pitch and offset of the configuration.

Parameters
pConfigThe configuration.
pDefaultsThe defaults of the configuration.
pCamThe camera.
Ghidra address:
NTSC-U/C: 0x001d6b48
Ghidra address:
PAL: 0x001df8e8

◆ LoadConfig()

void TnlPlayer::LoadConfig ( DataArray * pConfig,
DataArray * pDefaults,
GfxTunnel * pTunnel,
int nOption,
int bFreestyle )

Load the settings of the graphics of the player and the colours of its track.

Parameters
pConfigThe configuration.
pDefaultsThe defaults of the configuration.
pTunnelThe tunnel.
nOptionThe fourth argument every loader of a player's tunnel graphics receives.
bFreestyleWhether the freestyle settings load.
Ghidra address:
NTSC-U/C: 0x001d6c88
Ghidra address:
PAL: 0x001dfa28

◆ SelectColor()

bool TnlPlayer::SelectColor ( int nMultiplier)

Choose the colour of the track for a multiplier.

Parameters
nMultiplierThe multiplier.
Returns
Whether the colour changed.
Ghidra address:
NTSC-U/C: 0x001d6e18
Ghidra address:
PAL: 0x001dfbb8

◆ Update()

void TnlPlayer::Update ( GfxArena * pArena,
float flTicks,
float flTime )

Advance the activator, the grid, and the cursor.

Parameters
pArenaThe arena of the tunnel. The routine does not read it.
flTicksThe ticks since the last poll.
flTimeThe time since the last poll.
Ghidra address:
NTSC-U/C: 0x001d6e48
Ghidra address:
PAL: 0x001dfbe8

◆ UpdateTrail()

void TnlPlayer::UpdateTrail ( float flTicks,
float flTime )

Draw the needle of the scratch freestyle.

Parameters
flTicksThe ticks since the last poll. The routine does not read it.
flTimeThe milliseconds since the last poll. The routine does not read it.
Ghidra address:
NTSC-U/C: 0x001d6ed0
Ghidra address:
PAL: 0x001dfc70

◆ GetPlayer()

int TnlPlayer::GetPlayer ( ) const
inline
Returns
The player.

◆ GetActivator()

TnlActivator & TnlPlayer::GetActivator ( )
inline
Returns
The activator.

◆ GetGrid()

TnlGrid & TnlPlayer::GetGrid ( )
inline
Returns
The grid.

◆ GetCursor()

TnlCursor & TnlPlayer::GetCursor ( )
inline
Returns
The cursor.

◆ GetFreestyle()

TnlFreestyle & TnlPlayer::GetFreestyle ( )
inline
Returns
The freestyle.

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