|
wavelength 1.0.0
|
The fire of a captured track, flames that burn along the track and chunks of its panels that fly off. More...
#include <tnlfire.h>

Classes | |
| class | Emitter |
| The flames of one particle system, scaled, coloured, and turned on and off by the fire. More... | |
| class | ChunkModel |
| A kind of chunk, a mesh and the animation it tumbles by, drawn as many instances. More... | |
| class | Chunk |
| A chunk flying off the track, an instance of the mesh of a model. More... | |
Public Types | |
| enum | Range { kRangeMin = 0 , kRangeMax = 1 , kRangeCount } |
| The ends of the ranges of sCaptureVelocity and sAutoCaptureVelocity. More... | |
Public Member Functions | |
| 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 pools of chunks. | |
| 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. | |
| void | Reset (bool bClearChunks) |
| Stop the flames and the fire. | |
| float | StartTick (int nPlayer) const |
| Report the first tick of the fire of a player. | |
| void | Update (float flTicks, float flTime) |
| Move the chunks, move the head of the fire, throw the chunks of the gems it passes, and stop the fire at its end. | |
| void | Draw () |
| Draw the flying chunks in the colour of the track. | |
Static Public Member Functions | |
| static void | Disable (const char *pszName, RndView *pParent) |
| Take the view of an unused fire out of a view and empty its particle system. | |
Static Public Attributes | |
| static constexpr int | kChunkPlayer = -1 |
| The value of mPlayer of the fire that throws chunks. | |
| static float | sCaptureSpeed |
| The ticks the head moves for each tick of a capture, track_capture_speed. | |
| static float | sAutoCaptureSpeed |
| The ticks the head moves for each tick of an automatic capture, track_autocapture_speed. | |
| static float | sPanelSize |
| The size of a panel, the scale of the flames. | |
| static int | sMaxChunks |
| The chunks of a fire, capture_max_chunks. | |
| static float | sChunkYDisplace |
| The height above the cell a chunk starts at, capture_chunk_y_displace. | |
| static int | sChunksLit |
| Whether the chunks are lit, capture_chunks_lit. | |
| static std::vector< Vector3 > | sChunkScales |
| The scale of the basis of a chunk on each track. | |
| static Vector2 | sCaptureInterval |
| The shortest and the longest ticks between chunks of a capture, capture_chunk_interval. | |
| static Vector2 | sAutoCaptureInterval |
| The shortest and the longest ticks between chunks of an automatic capture, autocapture_chunk_interval. | |
| static Vector3 | sChunkForce |
| The change of velocity of a chunk per tick, capture_chunk_world_force. | |
| static Vector3 | sCaptureVelocity [kRangeCount] |
| The range of the velocity of a chunk of a capture, in the basis of the cell, capture_chunk_initial_velocity_min and capture_chunk_initial_velocity_max. | |
| static Vector3 | sAutoCaptureVelocity [kRangeCount] |
| The range of the velocity of a chunk of an automatic capture, in the basis of the cell, autocapture_chunk_initial_velocity_min and autocapture_chunk_initial_velocity_max. | |
| static Vector2 | sChunkLifespan |
| The shortest and the longest ticks a chunk flies, capture_chunk_lifespan. | |
The fire of a captured track, flames that burn along the track and chunks of its panels that fly off.
The class is not polymorphic. RTTI identifies it and its nested Chunk and ChunkModel. The object is 0xe0 bytes. A capture starts the fire at a tick, and the head of the fire then moves along the track until the end of the capture or of the built bars. The view of the fire follows the head, and a chunk of a randomly chosen model flies off the track at the gems the head passes.
| enum TnlFire::Range |
| TnlFire::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 pools of chunks.
| pszName | The name of the fire. The objects are <name>.view, <name>.ps, and <name>a.ps. |
| nPlayer | The player of the fire. Only a fire of kChunkPlayer has outer flames and throws chunks. |
| pTunnel | The tunnel. |
| bChunks | Whether to load the models in capture_chunks and fill the pools. |
|
static |
Take the view of an unused fire out of a view and empty its particle system.
| pszName | The name of the fire. |
| pParent | The view that draws the view of the fire. |
| bool TnlFire::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.
A capture that is not automatic also colours the flames, turns their force upright, and starts them.
| nPlayer | The player, who has to be the player of the fire. |
| nTrack | The track. |
| bAuto | Whether the capture is automatic. |
| pInnerColor | The colour of the inner flames. |
| pOuterColor | The colour of the outer flames. |
| pTrackColor | The colour of the track. |
| pGemTicks | The ticks of the gems the fire burns, or null to collect them. |
| flTick | The tick of the capture. |
| flStartTick | The first tick of the fire. |
| flEndTick | The last tick of the fire. |
| void TnlFire::Reset | ( | bool | bClearChunks | ) |
Stop the flames and the fire.
| bClearChunks | Whether to give every flying chunk back to the pool. |
| float TnlFire::StartTick | ( | int | nPlayer | ) | const |
Report the first tick of the fire of a player.
| nPlayer | The player. |
| void TnlFire::Update | ( | float | flTicks, |
| float | flTime ) |
Move the chunks, move the head of the fire, throw the chunks of the gems it passes, and stop the fire at its end.
| flTicks | The ticks since the last poll. |
| flTime | The time since the last poll. The fire does not read it. |
| void TnlFire::Draw | ( | ) |
Draw the flying chunks in the colour of the track.
A fire with no flying chunk draws nothing.
|
staticconstexpr |
The value of mPlayer of the fire that throws chunks.
|
static |
The ticks the head moves for each tick of a capture, track_capture_speed.
|
static |
The ticks the head moves for each tick of an automatic capture, track_autocapture_speed.
|
static |
The size of a panel, the scale of the flames.
The tunnel sets it when it builds its panels.
|
static |
The chunks of a fire, capture_max_chunks.
|
static |
The height above the cell a chunk starts at, capture_chunk_y_displace.
|
static |
Whether the chunks are lit, capture_chunks_lit.
GfxTunnel::LoadConfig() writes it and the flag is never read.
|
static |
The scale of the basis of a chunk on each track.
The tunnel sets it when it builds its panels.
|
static |
The shortest and the longest ticks between chunks of a capture, capture_chunk_interval.
|
static |
The shortest and the longest ticks between chunks of an automatic capture, autocapture_chunk_interval.
|
static |
The change of velocity of a chunk per tick, capture_chunk_world_force.
|
static |
The range of the velocity of a chunk of a capture, in the basis of the cell, capture_chunk_initial_velocity_min and capture_chunk_initial_velocity_max.
|
static |
The range of the velocity of a chunk of an automatic capture, in the basis of the cell, autocapture_chunk_initial_velocity_min and autocapture_chunk_initial_velocity_max.
|
static |
The shortest and the longest ticks a chunk flies, capture_chunk_lifespan.