resonance 1.0.1
Loading...
Searching...
No Matches
tnlsabretrail.h
Go to the documentation of this file.
1#pragma once
2
3#include <vector>
4
5#include "math/vector3.h"
6#include "os/hxstr.h"
7
8namespace Rnd {
9class ParticleSys;
10class String;
11} // namespace Rnd
12
27public:
33 struct Point {
35 float mFrame;
36 float mLane;
37 int mGem;
39 };
40
49 TnlSabreTrail(int nIndex, HxStr colorName);
50
58
66 void SetShowing(int nShowing);
67
74 void Clear();
75
84 void Rebuild();
85
99 void Build(int nTrack, int nFirstBar, int nBarCount);
100
115 void Pulse(float flFrame, int nStrength, int nTotal);
116
126 void Update(float flFrame);
127
128private:
135 void AddPoint(float flFrame, float flLane, int nGem);
136
144 void AddSegmentPoint(float flFrame, float flLane);
145
154 void Wobble(float flFrame);
155
156 std::vector<Point> mPoints;
157 int mRevealed; // Points handed to mString so far.
158
159public:
160 // Public because the seeker script command drives it with no accessor in the image.
162
163private:
164 int mFirstBar;
165 int mBarCount;
166 int mTrack;
167 int mIndex;
168 float mStartFrame; // Frame of the first Update() after a build.
169 float mAmplitude;
170 float mStrength;
171 float mPulseFrame;
172 float mPhase; // Update() count, the time base of the oscillation.
173 float mGlowFloor;
174 float mGlowSize;
175 Rnd::ParticleSys *mGlow;
176 int mReserved44; // +0x44, never accessed by the recovered routines.
177};
Heap-allocated NUL-terminated string.
Definition hxstr.h:41
Emitter that spawns, integrates, and draws a population of particles.
Definition particlesys.h:60
Screen-aligned ribbon drawn through a list of world-space points.
Definition string.h:58
void Clear()
Release every glow particle, drop every point, and zero the track and the bar range.
~TnlSabreTrail()
Empty the line.
void SetShowing(int nShowing)
Show or hide the string.
void Pulse(float flFrame, int nStrength, int nTotal)
Start an oscillation of the revealed filler points.
Rnd::String * mString
Definition tnlsabretrail.h:161
void Rebuild()
Build the line again from the track and bar range it last built.
void Update(float flFrame)
Reveal points, advance the oscillation, and shrink the glows toward their floor.
TnlSabreTrail(int nIndex, HxStr colorName)
Resolve the string and the glow system, show the string, and empty it.
void Build(int nTrack, int nFirstBar, int nBarCount)
Build the line through the gems of nBarCount bars of one track.
The rendering engine.
Definition animhelper.h:3
One point of the line, 0x20 bytes.
Definition tnlsabretrail.h:33
float mFrame
Definition tnlsabretrail.h:35
float mLane
Definition tnlsabretrail.h:36
int mReserved1c
Definition tnlsabretrail.h:38
Vector3 mPos
Definition tnlsabretrail.h:34
int mGem
Definition tnlsabretrail.h:37
Three-component vector, padded to a PlayStation 2 quadword.
Definition vector3.h:12