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

The catcher of a player, the three targets at the bottom of the track the gems fly into. More...

#include <tnlcatcher.h>

Public Member Functions

 TnlCatcher (const char *pszColor, GfxTunnel *pTunnel)
 Find the views and animations of the catcher of a colour and place its targets.
 ~TnlCatcher ()
 Destroy the catcher.
void SetAlpha (float flAlpha)
 Set the opacity of the catcher.
void SetMultiplied (int bMultiplied)
 Record whether the multiplier of the player is raised.
void AttachTo (RndView *pParent)
 Hang the catcher and the bump flare from a view.
void Hit (int nTarget)
 Start the hit animation of a target, if the catcher is shown.
void SetEnabled (int bEnabled)
 Set whether the catcher may be shown.
void SetShown (int bShown)
 Set whether the catcher is shown.
void ResetTargets ()
 Stop the hit animations of every target.
void StopBump (TnlGeom *pGeom, int nPlayer)
 Hide the bump flare and let the camera of the player follow the player again.
void StartBump (const TnlActivator *pAttacker, TnlGeom *pGeom, int nPlayer)
 Show the bump flare in the colour of the attacker and hold the camera of the player.
void SetRaised (bool bRaised)
 Move the animation of the catcher towards its raised or its lowered pose.
void Update (TnlGeom *pGeom, int nPlayer, bool bBumped, float flDelta, float flBumpTime)
 Advance the hit animations, the animation of the catcher, and the bump flare.

Static Public Member Functions

static void LoadConfig (DataArray *pConfig, DataArray *pDefaults, GfxTunnel *pTunnel, int nOption)
 Load the size, the offset, and the depth test of the targets.

Static Public Attributes

static constexpr int kNumTargets = 3
 The targets of the catcher, one for each gem button.
static float sTargetSize
 The scale of a target, target_size.
static float sTargetOffset
 The height of a target above the track, target_offset.
static int sTargetsOnTop
 Whether the targets draw without a depth test, targets_always_on_top.
static float sBumpShowTime
 The time after the start of a bump at which the catcher shows again.
static float sBumpEndTime
 The time after the start of a bump at which the flare ends, the last frame of its alpha.

Detailed Description

The catcher of a player, the three targets at the bottom of the track the gems fly into.

The class is not polymorphic, and the name is inferred. The object is 0x68 bytes. Each target plays a hit animation for a short time after a gem lands in it, and a bumped player shows a flare in the colour of the player who bumped.

Constructor & Destructor Documentation

◆ TnlCatcher()

TnlCatcher::TnlCatcher ( const char * pszColor,
GfxTunnel * pTunnel )

Find the views and animations of the catcher of a colour and place its targets.

Parameters
pszColorThe colour of the player.
pTunnelThe tunnel.
Ghidra address:
NTSC-U/C: 0x001e5608
Ghidra address:
PAL: 0x001ee3a8

◆ ~TnlCatcher()

TnlCatcher::~TnlCatcher ( )

Destroy the catcher.

Ghidra address:
NTSC-U/C: 0x001e5bb8
Ghidra address:
PAL: 0x001ee958

Member Function Documentation

◆ SetAlpha()

void TnlCatcher::SetAlpha ( float flAlpha)

Set the opacity of the catcher.

The body is empty.

Parameters
flAlphaThe opacity.
Ghidra address:
NTSC-U/C: 0x001e5c08
Ghidra address:
PAL: 0x001ee9a8

◆ SetMultiplied()

void TnlCatcher::SetMultiplied ( int bMultiplied)

Record whether the multiplier of the player is raised.

Parameters
bMultipliedWhether the multiplier is raised.
Ghidra address:
NTSC-U/C: 0x001e5c10
Ghidra address:
PAL: 0x001ee9b0

◆ AttachTo()

void TnlCatcher::AttachTo ( RndView * pParent)

Hang the catcher and the bump flare from a view.

Parameters
pParentThe view.
Ghidra address:
NTSC-U/C: 0x001e5c18
Ghidra address:
PAL: 0x001ee9b8

◆ Hit()

void TnlCatcher::Hit ( int nTarget)

Start the hit animation of a target, if the catcher is shown.

Parameters
nTargetThe target.
Ghidra address:
NTSC-U/C: 0x001e5c88
Ghidra address:
PAL: 0x001eea28

◆ SetEnabled()

void TnlCatcher::SetEnabled ( int bEnabled)

Set whether the catcher may be shown.

Parameters
bEnabledWhether the catcher may be shown.
Ghidra address:
NTSC-U/C: 0x001e5cb8
Ghidra address:
PAL: 0x001eea58

◆ SetShown()

void TnlCatcher::SetShown ( int bShown)

Set whether the catcher is shown.

Parameters
bShownWhether the catcher is shown.
Ghidra address:
NTSC-U/C: 0x001e5cc0
Ghidra address:
PAL: 0x001eea60

◆ ResetTargets()

void TnlCatcher::ResetTargets ( )

Stop the hit animations of every target.

Ghidra address:
NTSC-U/C: 0x001e5cc8
Ghidra address:
PAL: 0x001eea68

◆ StopBump()

void TnlCatcher::StopBump ( TnlGeom * pGeom,
int nPlayer )

Hide the bump flare and let the camera of the player follow the player again.

Parameters
pGeomThe geometry of the tunnel.
nPlayerThe player.
Ghidra address:
NTSC-U/C: 0x001e5d08
Ghidra address:
PAL: 0x001eeaa8

◆ StartBump()

void TnlCatcher::StartBump ( const TnlActivator * pAttacker,
TnlGeom * pGeom,
int nPlayer )

Show the bump flare in the colour of the attacker and hold the camera of the player.

Parameters
pAttackerThe activator of the attacking player, or null for no flare.
pGeomThe geometry of the tunnel.
nPlayerThe bumped player.
Ghidra address:
NTSC-U/C: 0x001e5d68
Ghidra address:
PAL: 0x001eeb08

◆ SetRaised()

void TnlCatcher::SetRaised ( bool bRaised)

Move the animation of the catcher towards its raised or its lowered pose.

Parameters
bRaisedWhether the catcher is raised.
Ghidra address:
NTSC-U/C: 0x001e5e10
Ghidra address:
PAL: 0x001eebb0

◆ Update()

void TnlCatcher::Update ( TnlGeom * pGeom,
int nPlayer,
bool bBumped,
float flDelta,
float flBumpTime )

Advance the hit animations, the animation of the catcher, and the bump flare.

Before the song starts the catcher rises into place with the ticks of the count-in.

Parameters
pGeomThe geometry of the tunnel.
nPlayerThe player.
bBumpedWhether the ship of the player is knocked across the tracks.
flDeltaThe time since the last update.
flBumpTimeThe time the bump started.
Ghidra address:
NTSC-U/C: 0x001e5ee8
Ghidra address:
PAL: 0x001eec88

◆ LoadConfig()

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

Load the size, the offset, and the depth test of the targets.

Parameters
pConfigThe configuration.
pDefaultsThe defaults of the configuration.
pTunnelThe tunnel, which is not read.
nOptionThe fourth argument every loader of the tunnel graphics receives, which is not read.
Ghidra address:
NTSC-U/C: 0x001e6160
Ghidra address:
PAL: 0x001eef00

Member Data Documentation

◆ kNumTargets

int TnlCatcher::kNumTargets = 3
staticconstexpr

The targets of the catcher, one for each gem button.

◆ sTargetSize

float TnlCatcher::sTargetSize
static

The scale of a target, target_size.

Ghidra address:
NTSC-U/C: 0x003afa8c
Ghidra address:
PAL: 0x0042e924

◆ sTargetOffset

float TnlCatcher::sTargetOffset
static

The height of a target above the track, target_offset.

Ghidra address:
NTSC-U/C: 0x003afa90
Ghidra address:
PAL: 0x0042e928

◆ sTargetsOnTop

int TnlCatcher::sTargetsOnTop
static

Whether the targets draw without a depth test, targets_always_on_top.

Ghidra address:
NTSC-U/C: 0x003afa94
Ghidra address:
PAL: 0x0042e92c

◆ sBumpShowTime

float TnlCatcher::sBumpShowTime
static

The time after the start of a bump at which the catcher shows again.

Ghidra address:
NTSC-U/C: 0x003afa98
Ghidra address:
PAL: 0x0042e930

◆ sBumpEndTime

float TnlCatcher::sBumpEndTime
static

The time after the start of a bump at which the flare ends, the last frame of its alpha.

Ghidra address:
NTSC-U/C: 0x003afa9c
Ghidra address:
PAL: 0x0042e934

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