|
resonance 1.0.1
|
Instrument pointer of one player's activator, with its dip and spin. More...
#include <tnlpointer.h>
Classes | |
| class | MeshPair |
| Icon and base mesh of one instrument kind, 8 bytes. More... | |
Public Member Functions | |
| TnlPointer (const HxStr &colorName) | |
| Resolve the views and the three mesh pairs, and stop the spin. | |
| void | SetKind (int nKind) |
| Show the mesh pair of one instrument kind and stop the spin. | |
| void | Reset () |
| Stop the spin and send the dip ramp back to rest. | |
| void | Spin (int nRestart) |
| Drop the pointer at once and spin it. | |
| void | SetLane (float flLane) |
| Set the sideways offset of the spin view from a lane position. | |
| void | SetAlpha (float flAlpha) |
| Set the alpha of every icon mesh's material. | |
| void | AttachTo (Rnd::View *pParent) |
| Parent the pointer view to another view for both transform and drawing. | |
| void | Update (float flTime) |
| Advance the dip ramp and the spin. | |
Instrument pointer of one player's activator, with its dip and spin.
The class is not polymorphic and emits no RTTI, and no allocation tag or file path identifies it. The name is inferred from its views, "ptr_<c>" and "ptr_<c>_spin.view", where <c> is the first letter of the player's colour name.
Three mesh pairs, one per instrument kind, sit under the pointer, and SetKind() shows at most one. Spin() drops the spin view from a height of 0.1 to 0 at once and runs the pointer animation. After 300 time units Update() stops the spin, and the view rises back over 60.
TnlActivator embeds one, 0x44 bytes, at +0x18.
|
explicit |
Resolve the views and the three mesh pairs, and stop the spin.
| colorName | The player's colour name, whose first letter selects every object. |
| void TnlPointer::SetKind | ( | int | nKind | ) |
Show the mesh pair of one instrument kind and stop the spin.
Kind 1 shows the axe pair, 3 the scratch pair, and 4 the voice pair. Every other kind shows no pair.
| nKind | The instrument kind. |
| void TnlPointer::Reset | ( | ) |
Stop the spin and send the dip ramp back to rest.
| void TnlPointer::Spin | ( | int | nRestart | ) |
Drop the pointer at once and spin it.
Does nothing while the pointer view is hidden. The image has no caller.
| nRestart | Non-zero to restart the 300-unit spin period at the next Update(). |
| void TnlPointer::SetLane | ( | float | flLane | ) |
Set the sideways offset of the spin view from a lane position.
The offset is (flLane - 0.5) * -0.5, computed in double precision. The image has no caller.
| flLane | The lane position, 0 through 1. |
| void TnlPointer::SetAlpha | ( | float | flAlpha | ) |
Set the alpha of every icon mesh's material.
The image has no caller. TnlActivator::Update() inlines the body.
| flAlpha | The alpha. |
| void TnlPointer::AttachTo | ( | Rnd::View * | pParent | ) |
Parent the pointer view to another view for both transform and drawing.
The image has no caller. TnlActivator's constructor inlines the body.
| pParent | The parent view. |
| void TnlPointer::Update | ( | float | flTime | ) |
Advance the dip ramp and the spin.
The image has no caller. TnlActivator::Update() inlines the body.
| flTime | The scaled song position TnlActivator::Update() receives. |