|
wavelength 1.0.0
|
The gems of the tunnel, with the groups that draw them. More...
#include <tnlgems.h>
Public Member Functions | |
| TnlGems (GfxTunnel *pTunnel, int nMaxGems, int nNumTracks) | |
| Construct an empty set of gems with a pool of instance transforms. | |
| ~TnlGems () | |
| Delete the groups and the animations the gems created. | |
| char | AddMeshGroups (const char *pszName, const char *pszDrawParent, float flLookahead) |
| Add one mesh group for each multimesh <name><n>.mm, chained in that order. | |
| char | AddCompositeMeshGroups (const char *pszName, const char *pszDrawParent, float flLookahead) |
| Add one composite mesh group for each multimesh <name>_<n>.mm, chained in that order. | |
| char | AddSpriteGroup (const char *pszName) |
| Add a sprite group for the particle system <name>.ps. | |
| void | AddRotations (char nType, int nKeys, int bLoop, RndAnimatable *pParent, float flStartFrame, float flStartAngle, float flEndFrame, float flEndAngle) |
| Add an animation that turns each mesh of the groups of a gem type. | |
| void | ClearInstances (const char *pszName) |
| Empty the instances of each multimesh <name><n>.mm. | |
| MeshGroup * | GetMeshGroup (char nType) |
| Report the first mesh group of a gem type. | |
| SpriteGroup * | GetSpriteGroup (char nType) |
| Report the sprite group of a gem type. | |
| void | AddGem (char nTrack, char nType, char nSlot, int bFlash, char nColor, float flTick, float flShowTick) |
| Add a gem, and set the removal of a gem of the same tick, slot, and track to its show tick. | |
| void | RemoveGems (char nTrack, float flStartTick, float flEndTick) |
| Remove the gems of a track over a span of ticks. | |
| void | RemoveGem (char nTrack, char nSlot, float flTick) |
| Remove the gems of a tick, slot, and track. | |
| void | Clear () |
| Remove every gem. | |
| void | Poll (const TnlTrackRange *pRange) |
| Drop the gems behind the song and far ahead of it, fire the events of the gems that pass, and place the gems that show. | |
| void | DrawComposites () |
| Draw the composite mesh groups, each mesh through the multimesh in turn. | |
| std::list< TnlGem >::iterator | LowerBound (float flTick) |
| Find the first gem at or after a tick. | |
| std::list< TnlGem >::iterator | Find (float flTick) |
| Find the first gem at or after a tick. | |
| std::list< TnlGem > & | GetGemList () |
| void | SetFocusTrack (char nTrack) |
| Set the track whose passing gems fire hit events. | |
| void | SetHasFocusTrack (int bHasFocusTrack) |
| Set whether the focus track applies. | |
Static Public Member Functions | |
| static void | LoadConfig (DataArray *pConfig, DataArray *pDefaults, GfxTunnel *pTunnel, int nOption) |
| Load the shared settings of the gems. | |
| static void | ApplyRenderScales () |
| Scale the meshes and particle systems of the gems by the world length of a tick. | |
The gems of the tunnel, with the groups that draw them.
The class is not polymorphic, and the name is inferred. The object is 0x4c bytes. The mesh groups are indexed by gem type, and the sprite groups by gem type less TnlGem::kTypeSprite.
| TnlGems::TnlGems | ( | GfxTunnel * | pTunnel, |
| int | nMaxGems, | ||
| int | nNumTracks ) |
Construct an empty set of gems with a pool of instance transforms.
| pTunnel | The tunnel. |
| nMaxGems | The most gems placed at once. |
| nNumTracks | The number of tracks. The constructor does not read it. |
| TnlGems::~TnlGems | ( | ) |
Delete the groups and the animations the gems created.
|
static |
Load the shared settings of the gems.
| pConfig | The configuration. |
| pDefaults | The defaults of the configuration. |
| pTunnel | The tunnel. The routine does not read it. |
| nOption | The fourth argument every loader of the tunnel receives. The routine does not read it. |
| char TnlGems::AddMeshGroups | ( | const char * | pszName, |
| const char * | pszDrawParent, | ||
| float | flLookahead ) |
Add one mesh group for each multimesh <name><n>.mm, chained in that order.
| pszName | The prefix of the multimeshes. |
| pszDrawParent | The drawable the multimeshes draw under, or null. |
| flLookahead | The ticks beyond the minimum screen size of a mesh the group draws to. |
| char TnlGems::AddCompositeMeshGroups | ( | const char * | pszName, |
| const char * | pszDrawParent, | ||
| float | flLookahead ) |
Add one composite mesh group for each multimesh <name>_<n>.mm, chained in that order.
The meshes of group n are <name><letter>_<n>.mesh from a on, and the glow particles are <name>.ps.
| pszName | The prefix of the multimeshes. |
| pszDrawParent | The drawable the multimeshes draw under, or null. |
| flLookahead | The ticks beyond the minimum screen size of a mesh the group draws to. |
| char TnlGems::AddSpriteGroup | ( | const char * | pszName | ) |
Add a sprite group for the particle system <name>.ps.
| pszName | The name of the particle system, without its extension. |
| void TnlGems::AddRotations | ( | char | nType, |
| int | nKeys, | ||
| int | bLoop, | ||
| RndAnimatable * | pParent, | ||
| float | flStartFrame, | ||
| float | flStartAngle, | ||
| float | flEndFrame, | ||
| float | flEndAngle ) |
Add an animation that turns each mesh of the groups of a gem type.
A mesh that already has its animation <mesh> rot.msnm is passed over.
| nType | The gem type. |
| nKeys | The number of keys of each animation. |
| bLoop | Whether the animations loop between their first and last frames. |
| pParent | The animatable the animations run under. |
| flStartFrame | The frame of the first key. |
| flStartAngle | The angle of the first key, in radians. |
| flEndFrame | The frame of the last key. |
| flEndAngle | The angle of the last key, in radians. |
| void TnlGems::ClearInstances | ( | const char * | pszName | ) |
Empty the instances of each multimesh <name><n>.mm.
| pszName | The prefix of the multimeshes. |
|
static |
Scale the meshes and particle systems of the gems by the world length of a tick.
| MeshGroup * TnlGems::GetMeshGroup | ( | char | nType | ) |
Report the first mesh group of a gem type.
| nType | The gem type. |
| SpriteGroup * TnlGems::GetSpriteGroup | ( | char | nType | ) |
Report the sprite group of a gem type.
| nType | The gem type, with TnlGem::kTypeSprite. |
| void TnlGems::AddGem | ( | char | nTrack, |
| char | nType, | ||
| char | nSlot, | ||
| int | bFlash, | ||
| char | nColor, | ||
| float | flTick, | ||
| float | flShowTick ) |
Add a gem, and set the removal of a gem of the same tick, slot, and track to its show tick.
| nTrack | The track. |
| nType | The gem type. |
| nSlot | The lateral slot. |
| bFlash | Whether the gem flashes as it passes. |
| nColor | The player colour of a sprite gem, or a negative value for its own colour. |
| flTick | The tick of the gem. |
| flShowTick | The tick the gem is placed from. |
| void TnlGems::RemoveGems | ( | char | nTrack, |
| float | flStartTick, | ||
| float | flEndTick ) |
Remove the gems of a track over a span of ticks.
| nTrack | The track. |
| flStartTick | The start of the span. |
| flEndTick | The end of the span. |
| void TnlGems::RemoveGem | ( | char | nTrack, |
| char | nSlot, | ||
| float | flTick ) |
Remove the gems of a tick, slot, and track.
| nTrack | The track. |
| nSlot | The lateral slot. |
| flTick | The tick. |
| void TnlGems::Clear | ( | ) |
Remove every gem.
| void TnlGems::Poll | ( | const TnlTrackRange * | pRange | ) |
Drop the gems behind the song and far ahead of it, fire the events of the gems that pass, and place the gems that show.
| pRange | The range of the tunnel that changed, or null. |
| void TnlGems::DrawComposites | ( | ) |
Draw the composite mesh groups, each mesh through the multimesh in turn.
The glow particles of a group draw after its first mesh.
| std::list< TnlGem >::iterator TnlGems::LowerBound | ( | float | flTick | ) |
Find the first gem at or after a tick.
| flTick | The tick. |
| std::list< TnlGem >::iterator TnlGems::Find | ( | float | flTick | ) |
Find the first gem at or after a tick.
| flTick | The tick. |
|
inline |
|
inline |
Set the track whose passing gems fire hit events.
| nTrack | The track. |
|
inline |
Set whether the focus track applies.
| bHasFocusTrack | Whether it applies. |