wavelength 1.0.0
Loading...
Searching...
No Matches
tnlcripfx.h
Go to the documentation of this file.
1#pragma once
2
3#include "gfx/gfxtunnel.h"
4#include "math/transform.h"
5#include "math/vector3.h"
7#include "rnd/rndview.h"
8
16class TnlCripFX {
17public:
19 enum State {
23 };
24
32 explicit TnlCripFX(int nIndex);
33
41
51 bool Poll(float flDelta, GfxTunnel *pTunnel);
52
60 void Draw(GfxTunnel *pTunnel);
61
68 static void DrawParticles();
69
79 void Start(GfxTunnel *pTunnel, char nAttacker, char nVictim);
80
89 void Stop(GfxTunnel *pTunnel, bool bRestore);
90
98 char ArrivedWaveTrack() const;
99
108 void GetWaveTracks(char *pnTrack, char *pnPrevTrack) const;
109
112 static float sFlyTime;
115 static float sFadeTime;
118 static float sWaveTime;
121 static float sSpatialFreqs[2];
124 static float sTimeFreqs[2];
128 static float sWaveDeathLength;
130 static float sWaveMagnitudes[2];
133 static float sTickVelocity;
135 static float sStartHeight;
143 static float sImpactCamJiggle;
146 static float sMaxTwist;
148 static float sTwistFreq;
153 static float sParticleFrame;
154
156 char GetState() const {
157 return mState;
158 }
159
160private:
161 char mState;
162 char mVictim;
163 RndView *mView;
164 RndView *mShadow;
165 Transform mXfm;
166 Vector3 mShadowPos;
167 union {
168 float mFlyTick;
169 struct {
172 };
173 };
174 union {
175 float mHeight;
177 };
178 union {
180 float mWaveTick;
181 };
182 float mStartTime;
183 float mDelta;
184};
Tunnel of tracks the players fly down, with the gems, the cameras of the players, and the effects dra...
Definition gfxtunnel.h:58
Emitter that spawns, moves, and fades a population of particles.
Definition rndparticlesys.h:69
View that shows the children of another view, its children owner, under its own transform and frame.
Definition rndview.h:27
static float sStartHeightVelocity
The rise per millisecond the flight starts with.
Definition tnlcripfx.h:138
static float sWaveMagnitudes[2]
The heights of the two waves.
Definition tnlcripfx.h:130
static float sHeightAcceleration
The change of the rise per millisecond.
Definition tnlcripfx.h:141
static float sStartHeight
The height the flight starts at.
Definition tnlcripfx.h:135
static void DrawParticles()
Draw the shared particles at the time of the song.
static float sTwistFreq
The radians per tick of the twist.
Definition tnlcripfx.h:148
static float sParticleFrame
The frame of sParticles.
Definition tnlcripfx.h:153
float mFlyTick
Definition tnlcripfx.h:168
static float sWaveDeathLength
crippler_wave_death_length.
Definition tnlcripfx.h:128
static float sTimeFreqs[2]
The radians per millisecond of the two waves.
Definition tnlcripfx.h:124
~TnlCripFX()
Release the shared particles.
static float sFlyTime
The milliseconds of the flight, crippler_fly_time.
Definition tnlcripfx.h:112
char GetState() const
Definition tnlcripfx.h:156
void Start(GfxTunnel *pTunnel, char nAttacker, char nVictim)
Send the crippler at a player.
static float sFadeTime
The milliseconds the view shows after landing.
Definition tnlcripfx.h:115
static float sTickVelocity
The ticks per millisecond of the flight.
Definition tnlcripfx.h:133
static float sWaveTime
The milliseconds of the wave, crippler_wave_time.
Definition tnlcripfx.h:118
float mHeight
Definition tnlcripfx.h:175
char mPrevWaveTrack
Definition tnlcripfx.h:171
char ArrivedWaveTrack() const
Report the track of a wave that has reached the victim.
static RndParticleSys * sParticles
The particles of the cripplers, crippler.part.
Definition tnlcripfx.h:151
void Draw(GfxTunnel *pTunnel)
Draw the crippler, and land it once its flight ends.
static float sImpactCamJiggle
The kick a landing gives the camera.
Definition tnlcripfx.h:143
int mArrived
Definition tnlcripfx.h:176
bool Poll(float flDelta, GfxTunnel *pTunnel)
Advance the flight or the wave.
static float sMaxTwist
The largest twist of the wave in radians.
Definition tnlcripfx.h:146
static float sSpatialFreqs[2]
The radians per tick of the two waves.
Definition tnlcripfx.h:121
TnlCripFX(int nIndex)
Construct an idle crippler, and for the first one the shared particles.
char mWaveTrack
Definition tnlcripfx.h:170
float mHeightVelocity
Definition tnlcripfx.h:179
State
The values of mState.
Definition tnlcripfx.h:19
@ kStateWave
Definition tnlcripfx.h:22
@ kStateIdle
Definition tnlcripfx.h:20
@ kStateFly
Definition tnlcripfx.h:21
void GetWaveTracks(char *pnTrack, char *pnPrevTrack) const
Report the track of a running wave and the track it bent before.
void Stop(GfxTunnel *pTunnel, bool bRestore)
Stop the crippler.
float mWaveTick
Definition tnlcripfx.h:180
Affine transform stored as three basis rows and a translation row.
Definition transform.h:18
Three-component vector, padded to a PlayStation 2 quadword.
Definition vector3.h:14