|
resonance 1.0.1
|
Line drawn through the gems of a run of bars on one tunnel track, with a glow at each gem. More...
#include <tnlsabretrail.h>

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 |
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.
| TnlSabreTrail::TnlSabreTrail | ( | int | nIndex, |
| HxStr | colorName ) |
Resolve the string and the glow system, show the string, and empty it.
| nIndex | The player index, selecting "gem_glow<n>.ps". |
| colorName | The player's colour name, whose first letter selects the string. |
| TnlSabreTrail::~TnlSabreTrail | ( | ) |
Empty the line.
| void TnlSabreTrail::SetShowing | ( | int | nShowing | ) |
Show or hide the string.
| nShowing | Non-zero to show. |
| void TnlSabreTrail::Clear | ( | ) |
Release every glow particle, drop every point, and zero the track and the bar range.
| void TnlSabreTrail::Rebuild | ( | ) |
Build the line again from the track and bar range it last built.
Does nothing while mBarCount is zero.
| 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.
| nTrack | The tunnel track and the level track. |
| nFirstBar | The first bar. |
| nBarCount | The number of bars. |
| 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.
| flFrame | The song position the oscillation starts at. |
| nStrength | The strength, the gems caught so far in the phrase. |
| nTotal | The gems the phrase requires. AppTunnel's CatchMsg handler loads it into $a2 at 0x00447af4, and the body does not read it. |
| void TnlSabreTrail::Update | ( | float | flFrame | ) |
Reveal points, advance the oscillation, and shrink the glows toward their floor.
Does nothing with fewer than two points.
| flFrame | The song position. |
| Rnd::String* TnlSabreTrail::mString |