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

The cursor of a player in the tunnel, a seeker frame and a connector beam over the gems ahead. More...

#include <tnlcursor.h>

Public Types

enum  State { kStateIdle = 0 , kStateFadingIn = 1 , kStateFadingOut = 2 }
 Values of mState. More...

Public Member Functions

 TnlCursor (GfxTunnel *pTunnel, int nPlayer, const char *pszColor, char nExcludedType, char nOtherExcludedType)
 Create the beam and the frame of a player.
 ~TnlCursor ()
 Delete the frame and the beam.
void LoadConfig (DataArray *pConfig, DataArray *pDefaults, GfxTunnel *pTunnel, int nOption)
 Load the settings of the beam, the frame, and the fade, and take the colour of the player.
void Reset ()
 Reset the beam and the frame, and forget the last target.
void Refresh (int nStyle)
 Retarget the pending window with no gems and no length.
void SetTarget (char nTrack, TnlGems *pGems, float flStartTick, float flEndTick)
 Move the cursor to a window.
void OnRangeChanged (const TnlTrackRange *pRange)
 Pass a changed range of the tunnel to the beam and the frame.
void OnGemAdded (char nTrack, char nType, TnlGems *pGems, float flTick)
 Pass a new gem to the beam.
void OnTicksChanged (char nTrack, TnlGems *pGems, float flStartTick, float flEndTick)
 Pass a changed span of ticks to the beam.
void OnGemRemoved (const TnlGem *pGem)
 Pass a removed gem to the beam.
void Pulse (float flTick)
 Pulse the beam on a beat.
void SetEnergy (float flEnergy)
 Set the energy of the beam.
void StartMultiplier (TnlGems *pGems, float flEndTick)
 Start the multiplier colouring of the beam and the frame.
void Poll (bool bCaptured, float flTime, float flDelta)
 Advance the fade, the beam, and the frame.
TnlConnectorBeam * GetBeam () const
TnlSeeker * GetSeeker () const
const Color & GetColor () const
float GetTargetStartTick () const
float GetTargetEndTick () const
char GetTargetTrack () const

Detailed Description

The cursor of a player in the tunnel, a seeker frame and a connector beam over the gems ahead.

The class is not polymorphic, and the name is inferred. The object is 0x54 bytes. A move to a new window fades the beam out, moves it, and fades it back in.

Member Enumeration Documentation

◆ State

Values of mState.

Enumerator
kStateIdle 

The beam is steady.

kStateFadingIn 

The beam fades in on its window.

kStateFadingOut 

The beam fades out before it moves to the pending window.

Constructor & Destructor Documentation

◆ TnlCursor()

TnlCursor::TnlCursor ( GfxTunnel * pTunnel,
int nPlayer,
const char * pszColor,
char nExcludedType,
char nOtherExcludedType )

Create the beam and the frame of a player.

Parameters
pTunnelThe tunnel.
nPlayerThe player.
pszColorThe colour of the player.
nExcludedTypeA gem type the beam never links.
nOtherExcludedTypeA second gem type the beam never links.
Ghidra address:
NTSC-U/C: 0x001fd030
Ghidra address:
PAL: 0x00205dd0

◆ ~TnlCursor()

TnlCursor::~TnlCursor ( )

Delete the frame and the beam.

Ghidra address:
NTSC-U/C: 0x001fd120
Ghidra address:
PAL: 0x00205ec0

Member Function Documentation

◆ LoadConfig()

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

Load the settings of the beam, the frame, and the fade, and take the colour of the player.

Parameters
pConfigThe configuration.
pDefaultsThe defaults of the configuration.
pTunnelThe tunnel.
nOptionThe fourth argument every loader of a player's tunnel graphics receives.
Ghidra address:
NTSC-U/C: 0x001fd188
Ghidra address:
PAL: 0x00205f28

◆ Reset()

void TnlCursor::Reset ( )

Reset the beam and the frame, and forget the last target.

Ghidra address:
NTSC-U/C: 0x001fd250
Ghidra address:
PAL: 0x00205ff0

◆ Refresh()

void TnlCursor::Refresh ( int nStyle)

Retarget the pending window with no gems and no length.

Parameters
nStyleThe style of the display. The routine does not read it.
Ghidra address:
NTSC-U/C: 0x001fd298
Ghidra address:
PAL: 0x00206038

◆ SetTarget()

void TnlCursor::SetTarget ( char nTrack,
TnlGems * pGems,
float flStartTick,
float flEndTick )

Move the cursor to a window.

A cursor that is idle and faded out shows the window at once and fades in. Otherwise the frame glides to the window, and the beam fades out before it moves.

Parameters
nTrackThe track.
pGemsThe gems, or null.
flStartTickThe start of the window.
flEndTickThe end of the window.
Ghidra address:
NTSC-U/C: 0x001fd2c0
Ghidra address:
PAL: 0x00206060

◆ OnRangeChanged()

void TnlCursor::OnRangeChanged ( const TnlTrackRange * pRange)

Pass a changed range of the tunnel to the beam and the frame.

Parameters
pRangeThe range that changed.
Ghidra address:
NTSC-U/C: 0x001fd3a0
Ghidra address:
PAL: 0x00206140

◆ OnGemAdded()

void TnlCursor::OnGemAdded ( char nTrack,
char nType,
TnlGems * pGems,
float flTick )

Pass a new gem to the beam.

Parameters
nTrackThe track of the gem.
nTypeThe type of the gem, or -1.
pGemsThe gems.
flTickThe tick of the gem.
Ghidra address:
NTSC-U/C: 0x001fd3e0
Ghidra address:
PAL: 0x00206180

◆ OnTicksChanged()

void TnlCursor::OnTicksChanged ( char nTrack,
TnlGems * pGems,
float flStartTick,
float flEndTick )

Pass a changed span of ticks to the beam.

Parameters
nTrackThe track.
pGemsThe gems.
flStartTickThe start of the span.
flEndTickThe end of the span.
Ghidra address:
NTSC-U/C: 0x001fd410
Ghidra address:
PAL: 0x002061b0

◆ OnGemRemoved()

void TnlCursor::OnGemRemoved ( const TnlGem * pGem)

Pass a removed gem to the beam.

Parameters
pGemThe gem.
Ghidra address:
NTSC-U/C: 0x001fd438
Ghidra address:
PAL: 0x002061d8

◆ Pulse()

void TnlCursor::Pulse ( float flTick)

Pulse the beam on a beat.

Parameters
flTickThe tick of the beat.
Ghidra address:
NTSC-U/C: 0x001fd458
Ghidra address:
PAL: 0x002061f8

◆ SetEnergy()

void TnlCursor::SetEnergy ( float flEnergy)

Set the energy of the beam.

Parameters
flEnergyThe input of the energy model.
Ghidra address:
NTSC-U/C: 0x001fd478
Ghidra address:
PAL: 0x00206218

◆ StartMultiplier()

void TnlCursor::StartMultiplier ( TnlGems * pGems,
float flEndTick )

Start the multiplier colouring of the beam and the frame.

Parameters
pGemsThe gems.
flEndTickThe tick the multiplier ends at.
Ghidra address:
NTSC-U/C: 0x001fd498
Ghidra address:
PAL: 0x00206238

◆ Poll()

void TnlCursor::Poll ( bool bCaptured,
float flTime,
float flDelta )

Advance the fade, the beam, and the frame.

Parameters
bCapturedWhether the track of the player is captured.
flTimeThe first time of the poll of the player's tunnel graphics. The routine does not read it.
flDeltaThe ticks since the last poll, whose magnitude advances the fade.
Ghidra address:
NTSC-U/C: 0x001fd4d8
Ghidra address:
PAL: 0x00206278

◆ GetBeam()

TnlConnectorBeam * TnlCursor::GetBeam ( ) const
inline
Returns
The beam.

◆ GetSeeker()

TnlSeeker * TnlCursor::GetSeeker ( ) const
inline
Returns
The frame.

◆ GetColor()

const Color & TnlCursor::GetColor ( ) const
inline
Returns
The colour of the player.

◆ GetTargetStartTick()

float TnlCursor::GetTargetStartTick ( ) const
inline
Returns
The start of the last target.

◆ GetTargetEndTick()

float TnlCursor::GetTargetEndTick ( ) const
inline
Returns
The end of the last target.

◆ GetTargetTrack()

char TnlCursor::GetTargetTrack ( ) const
inline
Returns
The track of the last target, or -1.

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