|
wavelength 1.0.0
|
The cursor of a player in the tunnel, a seeker frame and a connector beam over the gems ahead. More...
#include <tnlcursor.h>
Public Types | |
| enum | State { kStateIdle = 0 , kStateFadingIn = 1 , kStateFadingOut = 2 } |
| Values of mState. More... | |
Public Member Functions | |
| TnlCursor (GfxTunnel *pTunnel, int nPlayer, const char *pszColor, char nExcludedType, char nOtherExcludedType) | |
| Create the beam and the frame of a player. | |
| ~TnlCursor () | |
| Delete the frame and the beam. | |
| void | LoadConfig (DataArray *pConfig, DataArray *pDefaults, GfxTunnel *pTunnel, int nOption) |
| Load the settings of the beam, the frame, and the fade, and take the colour of the player. | |
| void | Reset () |
| Reset the beam and the frame, and forget the last target. | |
| void | Refresh (int nStyle) |
| Retarget the pending window with no gems and no length. | |
| void | SetTarget (char nTrack, TnlGems *pGems, float flStartTick, float flEndTick) |
| Move the cursor to a window. | |
| void | OnRangeChanged (const TnlTrackRange *pRange) |
| Pass a changed range of the tunnel to the beam and the frame. | |
| void | OnGemAdded (char nTrack, char nType, TnlGems *pGems, float flTick) |
| Pass a new gem to the beam. | |
| void | OnTicksChanged (char nTrack, TnlGems *pGems, float flStartTick, float flEndTick) |
| Pass a changed span of ticks to the beam. | |
| void | OnGemRemoved (const TnlGem *pGem) |
| Pass a removed gem to the beam. | |
| void | Pulse (float flTick) |
| Pulse the beam on a beat. | |
| void | SetEnergy (float flEnergy) |
| Set the energy of the beam. | |
| void | StartMultiplier (TnlGems *pGems, float flEndTick) |
| Start the multiplier colouring of the beam and the frame. | |
| void | Poll (bool bCaptured, float flTime, float flDelta) |
| Advance the fade, the beam, and the frame. | |
| TnlConnectorBeam * | GetBeam () const |
| TnlSeeker * | GetSeeker () const |
| const Color & | GetColor () const |
| float | GetTargetStartTick () const |
| float | GetTargetEndTick () const |
| char | GetTargetTrack () const |
The cursor of a player in the tunnel, a seeker frame and a connector beam over the gems ahead.
The class is not polymorphic, and the name is inferred. The object is 0x54 bytes. A move to a new window fades the beam out, moves it, and fades it back in.
| enum TnlCursor::State |
| TnlCursor::TnlCursor | ( | GfxTunnel * | pTunnel, |
| int | nPlayer, | ||
| const char * | pszColor, | ||
| char | nExcludedType, | ||
| char | nOtherExcludedType ) |
Create the beam and the frame of a player.
| pTunnel | The tunnel. |
| nPlayer | The player. |
| pszColor | The colour of the player. |
| nExcludedType | A gem type the beam never links. |
| nOtherExcludedType | A second gem type the beam never links. |
| TnlCursor::~TnlCursor | ( | ) |
Delete the frame and the beam.
| void TnlCursor::LoadConfig | ( | DataArray * | pConfig, |
| DataArray * | pDefaults, | ||
| GfxTunnel * | pTunnel, | ||
| int | nOption ) |
Load the settings of the beam, the frame, and the fade, and take the colour of the player.
| pConfig | The configuration. |
| pDefaults | The defaults of the configuration. |
| pTunnel | The tunnel. |
| nOption | The fourth argument every loader of a player's tunnel graphics receives. |
| void TnlCursor::Reset | ( | ) |
Reset the beam and the frame, and forget the last target.
| void TnlCursor::Refresh | ( | int | nStyle | ) |
Retarget the pending window with no gems and no length.
| nStyle | The style of the display. The routine does not read it. |
| void TnlCursor::SetTarget | ( | char | nTrack, |
| TnlGems * | pGems, | ||
| float | flStartTick, | ||
| float | flEndTick ) |
Move the cursor to a window.
A cursor that is idle and faded out shows the window at once and fades in. Otherwise the frame glides to the window, and the beam fades out before it moves.
| nTrack | The track. |
| pGems | The gems, or null. |
| flStartTick | The start of the window. |
| flEndTick | The end of the window. |
| void TnlCursor::OnRangeChanged | ( | const TnlTrackRange * | pRange | ) |
Pass a changed range of the tunnel to the beam and the frame.
| pRange | The range that changed. |
| void TnlCursor::OnGemAdded | ( | char | nTrack, |
| char | nType, | ||
| TnlGems * | pGems, | ||
| float | flTick ) |
Pass a new gem to the beam.
| nTrack | The track of the gem. |
| nType | The type of the gem, or -1. |
| pGems | The gems. |
| flTick | The tick of the gem. |
| void TnlCursor::OnTicksChanged | ( | char | nTrack, |
| TnlGems * | pGems, | ||
| float | flStartTick, | ||
| float | flEndTick ) |
Pass a changed span of ticks to the beam.
| nTrack | The track. |
| pGems | The gems. |
| flStartTick | The start of the span. |
| flEndTick | The end of the span. |
| void TnlCursor::OnGemRemoved | ( | const TnlGem * | pGem | ) |
Pass a removed gem to the beam.
| pGem | The gem. |
| void TnlCursor::Pulse | ( | float | flTick | ) |
Pulse the beam on a beat.
| flTick | The tick of the beat. |
| void TnlCursor::SetEnergy | ( | float | flEnergy | ) |
Set the energy of the beam.
| flEnergy | The input of the energy model. |
| void TnlCursor::StartMultiplier | ( | TnlGems * | pGems, |
| float | flEndTick ) |
Start the multiplier colouring of the beam and the frame.
| pGems | The gems. |
| flEndTick | The tick the multiplier ends at. |
| void TnlCursor::Poll | ( | bool | bCaptured, |
| float | flTime, | ||
| float | flDelta ) |
Advance the fade, the beam, and the frame.
| bCaptured | Whether the track of the player is captured. |
| flTime | The first time of the poll of the player's tunnel graphics. The routine does not read it. |
| flDelta | The ticks since the last poll, whose magnitude advances the fade. |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |