resonance 1.0.1
Loading...
Searching...
No Matches
tnlbumpfx.h
Go to the documentation of this file.
1#pragma once
2
3#include "os/hxstr.h"
4
5namespace Rnd {
6class Generator;
7class Mat;
8class TransAnim;
9} // namespace Rnd
10
25class TnlBumpFX {
26public:
37 explicit TnlBumpFX(int nIndex);
38
46
63 void Start(int nStep, const HxStr &colorName, int nForward, float flPathOffset);
64
73 bool IsIdle() const {
74 return mState == kStateIdle;
75 }
76
88 void SetFrame(float flFrame);
89
90private:
91 // Phase SetFrame() runs. Spawning follows a start and lasts 500 frames, and draining ends
92 // 1500 frames after the start by hiding the generator.
93 enum State { kStateIdle = 0, kStateSpawning = 1, kStateDraining = 2 };
94
95 Rnd::Generator *mGenerator; // "bumpfx<n>.mgen".
96 Rnd::TransAnim *mTransAnim; // "bumpfx<n>.tnm".
97 Rnd::Mat *mMat; // "bumpfx<n>.mat".
98 float mPathOffset; // Distance from the song frame to the path window.
99 int mForward; // Non-zero runs the path window forward.
100 State mState;
101 float mStartFrame; // Last frame SetFrame() received while idle.
102 float mSavedRateGen; // The generator's authored low spawn rate.
103};
Heap-allocated NUL-terminated string.
Definition hxstr.h:41
Emitter that spawns copies of one drawable along an animated path.
Definition generator.h:96
Surface description a Rnd::Mesh draws with.
Definition mat.h:36
Animation that drives one transformable from three keyframe channels.
Definition transanim.h:49
void SetFrame(float flFrame)
Advance the burst.
bool IsIdle() const
Report whether the burst waits for Start().
Definition tnlbumpfx.h:73
void Start(int nStep, const HxStr &colorName, int nForward, float flPathOffset)
Start a burst that sweeps towards one lane in one player's colour.
TnlBumpFX(int nIndex)
Resolve the objects of one burst slot and silence its generator.
~TnlBumpFX()
Give the generator back both rate bounds at the recorded low rate.
The rendering engine.
Definition animhelper.h:3