resonance 1.0.1
Loading...
Searching...
No Matches
TnlSabreTrail Class Reference

Line drawn through the gems of a run of bars on one tunnel track, with a glow at each gem. More...

#include <tnlsabretrail.h>

Collaboration diagram for TnlSabreTrail:

Classes

struct  Point
 One point of the line, 0x20 bytes. More...

Public Member Functions

 TnlSabreTrail (int nIndex, HxStr colorName)
 Resolve the string and the glow system, show the string, and empty it.
 ~TnlSabreTrail ()
 Empty the line.
void SetShowing (int nShowing)
 Show or hide the string.
void Clear ()
 Release every glow particle, drop every point, and zero the track and the bar range.
void Rebuild ()
 Build the line again from the track and bar range it last built.
void Build (int nTrack, int nFirstBar, int nBarCount)
 Build the line through the gems of nBarCount bars of one track.
void Pulse (float flFrame, int nStrength, int nTotal)
 Start an oscillation of the revealed filler points.
void Update (float flFrame)
 Reveal points, advance the oscillation, and shrink the glows toward their floor.

Public Attributes

Rnd::String * mString

Detailed Description

Line drawn through the gems of a run of bars on one tunnel track, with a glow at each gem.

The class is not polymorphic and emits no RTTI, and no allocation tag or file path identifies it. The name is inferred from the Rnd::String it draws, "sabre_<c>.str", where <c> is the first letter of the player's colour name.

Build() places one point per gem and fills each gap between gems with a point every 60 frames. Update() reveals the points at 0.04 per frame from the first update, and a Pulse() makes the revealed filler points past the pulse frame oscillate across the track and swells the gem glows.

TnlPlayer embeds one, 0x48 bytes, at +0x128.

Constructor & Destructor Documentation

◆ TnlSabreTrail()

TnlSabreTrail::TnlSabreTrail ( int nIndex,
HxStr colorName )

Resolve the string and the glow system, show the string, and empty it.

Parameters
nIndexThe player index, selecting "gem_glow<n>.ps".
colorNameThe player's colour name, whose first letter selects the string.
Ghidra address:
NTSC-U/C: 0x00438518
Ghidra address:
PAL: 0x00474308

◆ ~TnlSabreTrail()

TnlSabreTrail::~TnlSabreTrail ( )

Empty the line.

Ghidra address:
NTSC-U/C: 0x00454c50
Ghidra address:
PAL: 0x00492180

Member Function Documentation

◆ SetShowing()

void TnlSabreTrail::SetShowing ( int nShowing)

Show or hide the string.

Parameters
nShowingNon-zero to show.
Ghidra address:
NTSC-U/C: 0x00454d30
Ghidra address:
PAL: 0x00492260

◆ Clear()

void TnlSabreTrail::Clear ( )

Release every glow particle, drop every point, and zero the track and the bar range.

Ghidra address:
NTSC-U/C: 0x00454dc8
Ghidra address:
PAL: 0x004922f8

◆ Rebuild()

void TnlSabreTrail::Rebuild ( )

Build the line again from the track and bar range it last built.

Does nothing while mBarCount is zero.

Ghidra address:
NTSC-U/C: 0x00454d60
Ghidra address:
PAL: 0x00492290

◆ Build()

void TnlSabreTrail::Build ( int nTrack,
int nFirstBar,
int nBarCount )

Build the line through the gems of nBarCount bars of one track.

Returns at once when the arguments match the current line and it has points. Each gem gives a point at tick + bar * 1920 frames and at 0.315 * lane + 0.185 across the track. The gems come from the level's TrackData for nTrack.

Parameters
nTrackThe tunnel track and the level track.
nFirstBarThe first bar.
nBarCountThe number of bars.
Ghidra address:
NTSC-U/C: 0x004387b0
Ghidra address:
PAL: 0x004745e0

◆ Pulse()

void TnlSabreTrail::Pulse ( float flFrame,
int nStrength,
int nTotal )

Start an oscillation of the revealed filler points.

Ignored with fewer than two points or when flFrame is before the first bar. The strength becomes nStrength * 0.05, clamped to 0 through 1, and sets the amplitude, the frequency, and the glow size.

Parameters
flFrameThe song position the oscillation starts at.
nStrengthThe strength, the gems caught so far in the phrase.
nTotalThe gems the phrase requires. AppTunnel's CatchMsg handler loads it into $a2 at 0x00447af4, and the body does not read it.
Ghidra address:
NTSC-U/C: 0x00438ad0
Ghidra address:
PAL: 0x00474900

◆ Update()

void TnlSabreTrail::Update ( float flFrame)

Reveal points, advance the oscillation, and shrink the glows toward their floor.

Does nothing with fewer than two points.

Parameters
flFrameThe song position.
Ghidra address:
NTSC-U/C: 0x00438c20
Ghidra address:
PAL: 0x00474a50

Member Data Documentation

◆ mString

Rnd::String* TnlSabreTrail::mString

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