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

The beam that links the gems ahead of a player's cursor on its track. More...

#include <tnlconnectorbeam.h>

Classes

struct  Gem
 A gem the beam links, 0x10 bytes. More...
struct  Span
 A straight piece of the beam between two points, 0x50 bytes. More...

Public Member Functions

 TnlConnectorBeam (GfxTunnel *pTunnel, int nPlayer, const char *pszColor, char nExcludedType, char nOtherExcludedType)
 Find the line, the glow particles, and the material of a player's beam.
 ~TnlConnectorBeam ()
 Release the gems and the spans.
void LoadConfig (DataArray *pConfig, DataArray *pDefaults, GfxTunnel *pTunnel)
 Load the shared settings from the connector_beam section.
void Reset ()
 Forget the last pulse and the end of the window, and drop the multiplier colouring.
void SetWindow (char nTrack, TnlGems *pGems, float flStartTick, float flEndTick)
 Move the window onto a track and link its gems.
void OnRangeChanged (const TnlTrackRange *pRange)
 Rebuild the spans when the tunnel changes a range that overlaps the window.
void OnGemAdded (char nTrack, char nType, TnlGems *pGems, float flTick)
 Relink the gems when a gem the beam may link appears inside the window.
void OnTicksChanged (char nTrack, TnlGems *pGems, float flStartTick, float flEndTick)
 Relink the gems when a span of ticks that overlaps the window changes on the track.
void OnGemRemoved (const TnlGem *pGem)
 Detach the particle of a gem that leaves the tunnel from the linked gems.
void Pulse (float flTick)
 Pulse the beam on a beat inside the window.
void SetEnergy (float flEnergy)
 Set the energy level from the energy model.
void StartMultiplier (TnlGems *pGems, float flEndTick)
 Colour the glows with the multiplier until a tick and relink the gems.
void StopMultiplier ()
 Drop the multiplier colouring and return the glows to white.
void Poll (bool bCaptured, float flDelta, float flAlpha)
 Advance the glows and the energy, and lay the line through the spans.

Detailed Description

The beam that links the gems ahead of a player's cursor on its track.

The class is not polymorphic, and the name is inferred from the connector_beam section it loads. The object is 0xa4 bytes. The beam is a line through the gems of a window of ticks, which sways with a wave across the track and pulses in time with the beat. Each linked gem has a glow particle.

Constructor & Destructor Documentation

◆ TnlConnectorBeam()

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

Find the line, the glow particles, and the material of a player's beam.

Parameters
pTunnelThe tunnel.
nPlayerThe player, which selects gem_glow<player>.ps.
pszColorThe colour of the player, whose first letter selects sabre_<letter>.str.
nExcludedTypeA gem type the beam never links.
nOtherExcludedTypeA second gem type the beam never links.
Ghidra address:
NTSC-U/C: 0x001f9c88
Ghidra address:
PAL: 0x00202a28

◆ ~TnlConnectorBeam()

TnlConnectorBeam::~TnlConnectorBeam ( )

Release the gems and the spans.

Ghidra address:
NTSC-U/C: 0x001f9f78
Ghidra address:
PAL: 0x00202d18

Member Function Documentation

◆ LoadConfig()

void TnlConnectorBeam::LoadConfig ( DataArray * pConfig,
DataArray * pDefaults,
GfxTunnel * pTunnel )

Load the shared settings from the connector_beam section.

Parameters
pConfigThe configuration.
pDefaultsThe defaults of the configuration.
pTunnelThe tunnel, whose panel width scales the width of the line.
Ghidra address:
NTSC-U/C: 0x001fa010
Ghidra address:
PAL: 0x00202db0

◆ Reset()

void TnlConnectorBeam::Reset ( )

Forget the last pulse and the end of the window, and drop the multiplier colouring.

Ghidra address:
NTSC-U/C: 0x001fa2d8
Ghidra address:
PAL: 0x00203078

◆ SetWindow()

void TnlConnectorBeam::SetWindow ( char nTrack,
TnlGems * pGems,
float flStartTick,
float flEndTick )

Move the window onto a track and link its gems.

The line is hidden instead when the window is empty, when there are no gems, or when the track is negative.

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

◆ OnRangeChanged()

void TnlConnectorBeam::OnRangeChanged ( const TnlTrackRange * pRange)

Rebuild the spans when the tunnel changes a range that overlaps the window.

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

◆ OnGemAdded()

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

Relink the gems when a gem the beam may link appears inside the window.

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: 0x001fab50
Ghidra address:
PAL: 0x002038f0

◆ OnTicksChanged()

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

Relink the gems when a span of ticks that overlaps the window changes on the track.

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

◆ OnGemRemoved()

void TnlConnectorBeam::OnGemRemoved ( const TnlGem * pGem)

Detach the particle of a gem that leaves the tunnel from the linked gems.

Parameters
pGemThe gem.
Ghidra address:
NTSC-U/C: 0x001fac38
Ghidra address:
PAL: 0x002039d8

◆ Pulse()

void TnlConnectorBeam::Pulse ( float flTick)

Pulse the beam on a beat inside the window.

The first pulse after the energy runs out also chooses a new sway frequency.

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

◆ SetEnergy()

void TnlConnectorBeam::SetEnergy ( float flEnergy)

Set the energy level from the energy model.

A rise in the level, or a full level, boosts the glow.

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

◆ StartMultiplier()

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

Colour the glows with the multiplier until a tick and relink the gems.

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

◆ StopMultiplier()

void TnlConnectorBeam::StopMultiplier ( )

Drop the multiplier colouring and return the glows to white.

Ghidra address:
NTSC-U/C: 0x001faef0
Ghidra address:
PAL: 0x00203c90

◆ Poll()

void TnlConnectorBeam::Poll ( bool bCaptured,
float flDelta,
float flAlpha )

Advance the glows and the energy, and lay the line through the spans.

Parameters
bCapturedWhether the track is captured, which leaves the glows unchanged.
flDeltaThe ticks since the last poll.
flAlphaThe opacity of the line.
Ghidra address:
NTSC-U/C: 0x001faf88
Ghidra address:
PAL: 0x00203d28

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