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

The activator of a player, the frame at the bottom of the track that carries the catcher. More...

#include <tnlactivator.h>

Public Member Functions

 TnlActivator (GfxTunnel *pTunnel, int nPlayer, int nCam, const char *pszColor)
 Find the views of the activator of a player and attach the catcher to it.
 ~TnlActivator ()
 Destroy the activator.
void LoadConfig (DataArray *pConfig, DataArray *pDefaults, GfxTunnel *pTunnel, int nOption)
 Load the settings of the activator.
void SetRotShowing (int bShowing)
 Show or hide the rotating part of the activator.
void SetSuppressed (int bSuppressed)
 Hide the catcher, or let it show again.
void SetPlace (signed char nPlace, signed char nNumPlaces)
 Move the activator to the place of the player in the race.
void Hit (int nTarget, bool bHit)
 Start the hit animation of a target of the catcher.
void Bump (bool bBumped, int nTrack, const TnlActivator *pAttacker)
 Show a bump on the catcher of a leading player who is bumped.
void Reset ()
 Put the activator back at the first place at its full size and end a bump.
void Update (float flDelta)
 Advance the slide, the scale, and the catcher, and pass the place and the scale to the ship.
TnlCatcher & GetCatcher ()
const TnlCatcher & GetCatcher () const
const LinearInterpolator & GetPlace () const

Detailed Description

The activator of a player, the frame at the bottom of the track that carries the catcher.

The class is not polymorphic, and the name is inferred. The object is 0xdc bytes. The activator slides across the track to the place of the player in the race and shrinks for a player behind the others.

Constructor & Destructor Documentation

◆ TnlActivator()

TnlActivator::TnlActivator ( GfxTunnel * pTunnel,
int nPlayer,
int nCam,
const char * pszColor )

Find the views of the activator of a player and attach the catcher to it.

Parameters
pTunnelThe tunnel.
nPlayerThe player.
nCamThe camera of the player plus one, which the activator does not read.
pszColorThe colour of the player.
Ghidra address:
NTSC-U/C: 0x001e6218
Ghidra address:
PAL: 0x001eefb8

◆ ~TnlActivator()

TnlActivator::~TnlActivator ( )

Destroy the activator.

Ghidra address:
NTSC-U/C: 0x001e6470
Ghidra address:
PAL: 0x001ef210

Member Function Documentation

◆ LoadConfig()

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

Load the settings of the activator.

The body is empty.

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: 0x001e64d0
Ghidra address:
PAL: 0x001ef270

◆ SetRotShowing()

void TnlActivator::SetRotShowing ( int bShowing)

Show or hide the rotating part of the activator.

Parameters
bShowingWhether the part is shown.
Ghidra address:
NTSC-U/C: 0x001e64d8
Ghidra address:
PAL: 0x001ef278

◆ SetSuppressed()

void TnlActivator::SetSuppressed ( int bSuppressed)

Hide the catcher, or let it show again.

Parameters
bSuppressedWhether the catcher is hidden.
Ghidra address:
NTSC-U/C: 0x001e6508
Ghidra address:
PAL: 0x001ef2a8

◆ SetPlace()

void TnlActivator::SetPlace ( signed char nPlace,
signed char nNumPlaces )

Move the activator to the place of the player in the race.

The activator slides to its place over 240 ticks and loses 0.04 of its scale for each place it is ahead of the last.

Parameters
nPlaceThe place, 0 for the leader.
nNumPlacesThe number of places.
Ghidra address:
NTSC-U/C: 0x001e6528
Ghidra address:
PAL: 0x001ef2c8

◆ Hit()

void TnlActivator::Hit ( int nTarget,
bool bHit )

Start the hit animation of a target of the catcher.

Parameters
nTargetThe target.
bHitWhether the gem was hit. The routine does not read it.
Ghidra address:
NTSC-U/C: 0x001e6680
Ghidra address:
PAL: 0x001ef420

◆ Bump()

void TnlActivator::Bump ( bool bBumped,
int nTrack,
const TnlActivator * pAttacker )

Show a bump on the catcher of a leading player who is bumped.

Parameters
bBumpedWhether the player is the one bumped.
nTrackThe track of the bump, which the activator does not read.
pAttackerThe activator of the attacking player, or null.
Ghidra address:
NTSC-U/C: 0x001e66a0
Ghidra address:
PAL: 0x001ef440

◆ Reset()

void TnlActivator::Reset ( )

Put the activator back at the first place at its full size and end a bump.

Ghidra address:
NTSC-U/C: 0x001e66e8
Ghidra address:
PAL: 0x001ef488

◆ Update()

void TnlActivator::Update ( float flDelta)

Advance the slide, the scale, and the catcher, and pass the place and the scale to the ship.

Parameters
flDeltaThe time since the last update.
Ghidra address:
NTSC-U/C: 0x001e6770
Ghidra address:
PAL: 0x001ef510

◆ GetCatcher() [1/2]

TnlCatcher & TnlActivator::GetCatcher ( )
inline
Returns
The catcher.

◆ GetCatcher() [2/2]

const TnlCatcher & TnlActivator::GetCatcher ( ) const
inline
Returns
The catcher.

◆ GetPlace()

const LinearInterpolator & TnlActivator::GetPlace ( ) const
inline
Returns
The place over the ticks of the slide.

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