181 std::list<Transform> *pFreeXfms,
191 void Reset(std::list<Transform> *pFreeXfms);
204 std::list<Transform>::iterator mInstance;
270 const Color *pInnerColor,
271 const Color *pOuterColor,
272 const Color *pTrackColor,
273 const std::vector<float> *pGemTicks,
306 void Update(
float flTicks,
float flTime);
420 std::list<Chunk> mFreeChunks;
421 std::list<Chunk> mChunks;
422 std::vector<ChunkModel> mModels;
424 std::list<Transform> mFreeXfms;
435 alignas(16)
Color mTrackColor;
436 std::vector<float> mGemTicks;
438 float mNextChunkTick;
Tunnel of tracks the players fly down, with the gems, the cameras of the players, and the effects dra...
Definition gfxtunnel.h:58
Surface description: blending, lighting colours, culling, and a list of texture stages.
Definition rndmat.h:20
Triangle mesh with a material.
Definition rndmesh.h:31
Mesh drawn once at each of a list of transforms.
Definition rndmultimesh.h:17
Emitter that spawns, moves, and fades a population of particles.
Definition rndparticlesys.h:69
Animation of a transformable's local transform by rotation, translation, and scale keys.
Definition rndtransanim.h:20
View that shows the children of another view, its children owner, under its own transform and frame.
Definition rndview.h:27
A kind of chunk, a mesh and the animation it tumbles by, drawn as many instances.
Definition tnlfire.h:116
RndMesh * mMesh
Definition tnlfire.h:147
std::unique_ptr< RndMultiMesh > mMultiMesh
Definition tnlfire.h:145
ChunkModel()
Make a model with no mesh.
Definition tnlfire.h:121
void CreateMultiMesh()
Create the instanced mesh that draws the chunks of the model, named for the address of the model.
RndTransAnim * mTransAnim
Definition tnlfire.h:146
ChunkModel(ChunkModel &&) noexcept=default
Move a model.
float mWeight
Definition tnlfire.h:144
void Spawn(ChunkModel *pModel, int bAuto, int nTrack, const Transform *pCellXfm, const Transform *pBlendXfm, std::list< Transform > *pFreeXfms, float flTick)
Launch the chunk from a cell of a track with a random velocity and life.
Chunk()
Make an idle chunk.
void Reset(std::list< Transform > *pFreeXfms)
Give the instance back to the pool of transforms and make the chunk idle.
bool Update(float flTicks)
Move the chunk under the world force and place its instance with its animation.
The flames of one particle system, scaled, coloured, and turned on and off by the fire.
Definition tnlfire.h:37
~Emitter()
Give the system back its saved emission rates and force.
void Start()
Free the particles of the system and restart its emission at the saved rates.
void Rotate(const Vector3 *pBasis)
Turn the saved force by a basis and give it to the system.
void Init(RndParticleSys *pSys, GfxTunnel *pTunnel)
Take a system, save its emission rates and its scaled force, scale its emission box,...
void Stop()
Stop the emission of the system.
Emitter()
Make an emitter of no system.
void SetColor(const Color *pColor)
Colour the flames.
static constexpr int kChunkPlayer
The value of mPlayer of the fire that throws chunks.
Definition tnlfire.h:220
void Draw()
Draw the flying chunks in the colour of the track.
static int sMaxChunks
The chunks of a fire, capture_max_chunks.
Definition tnlfire.h:347
TnlFire(const char *pszName, int nPlayer, GfxTunnel *pTunnel, bool bChunks)
Find the view and particle systems of a fire by name and, when asked, load the models and fill the po...
static Vector3 sAutoCaptureVelocity[kRangeCount]
The range of the velocity of a chunk of an automatic capture, in the basis of the cell,...
Definition tnlfire.h:410
static float sChunkYDisplace
The height above the cell a chunk starts at, capture_chunk_y_displace.
Definition tnlfire.h:355
static std::vector< Vector3 > sChunkScales
The scale of the basis of a chunk on each track.
Definition tnlfire.h:372
float StartTick(int nPlayer) const
Report the first tick of the fire of a player.
void Reset(bool bClearChunks)
Stop the flames and the fire.
static Vector2 sCaptureInterval
The shortest and the longest ticks between chunks of a capture, capture_chunk_interval.
Definition tnlfire.h:379
void Update(float flTicks, float flTime)
Move the chunks, move the head of the fire, throw the chunks of the gems it passes,...
static Vector3 sCaptureVelocity[kRangeCount]
The range of the velocity of a chunk of a capture, in the basis of the cell, capture_chunk_initial_ve...
Definition tnlfire.h:402
static Vector2 sAutoCaptureInterval
The shortest and the longest ticks between chunks of an automatic capture, autocapture_chunk_interval...
Definition tnlfire.h:387
static int sChunksLit
Whether the chunks are lit, capture_chunks_lit.
Definition tnlfire.h:364
static Vector2 sChunkLifespan
The shortest and the longest ticks a chunk flies, capture_chunk_lifespan.
Definition tnlfire.h:417
static float sPanelSize
The size of a panel, the scale of the flames.
Definition tnlfire.h:339
static void Disable(const char *pszName, RndView *pParent)
Take the view of an unused fire out of a view and empty its particle system.
Range
The ends of the ranges of sCaptureVelocity and sAutoCaptureVelocity.
Definition tnlfire.h:213
@ kRangeCount
Definition tnlfire.h:216
@ kRangeMax
Definition tnlfire.h:215
@ kRangeMin
Definition tnlfire.h:214
bool Start(int nPlayer, int nTrack, int bAuto, const Color *pInnerColor, const Color *pOuterColor, const Color *pTrackColor, const std::vector< float > *pGemTicks, float flTick, float flStartTick, float flEndTick)
Start the fire on a track, unless it burns or another fire's chunks still fly.
static float sCaptureSpeed
The ticks the head moves for each tick of a capture, track_capture_speed.
Definition tnlfire.h:323
static float sAutoCaptureSpeed
The ticks the head moves for each tick of an automatic capture, track_autocapture_speed.
Definition tnlfire.h:331
static Vector3 sChunkForce
The change of velocity of a chunk per tick, capture_chunk_world_force.
Definition tnlfire.h:394
Linear colour with four float components.
Definition color.h:12
Two-component vector, used for texture coordinates.
Definition vector2.h:12
Three-component vector, padded to a PlayStation 2 quadword.
Definition vector3.h:14