resonance 1.0.1
Loading...
Searching...
No Matches
TnlPointer Class Reference

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.

Detailed Description

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.

Constructor & Destructor Documentation

◆ TnlPointer()

TnlPointer::TnlPointer ( const HxStr & colorName)
explicit

Resolve the views and the three mesh pairs, and stop the spin.

Parameters
colorNameThe player's colour name, whose first letter selects every object.
Ghidra address:
NTSC-U/C: 0x0043a810
Ghidra address:
PAL: 0x00476b10

Member Function Documentation

◆ SetKind()

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.

Parameters
nKindThe instrument kind.
Ghidra address:
NTSC-U/C: 0x0043b248
Ghidra address:
PAL: 0x00477768

◆ Reset()

void TnlPointer::Reset ( )

Stop the spin and send the dip ramp back to rest.

Ghidra address:
NTSC-U/C: 0x004557d0
Ghidra address:
PAL: 0x00492d00

◆ Spin()

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.

Parameters
nRestartNon-zero to restart the 300-unit spin period at the next Update().
Ghidra address:
NTSC-U/C: 0x00455768
Ghidra address:
PAL: 0x00492c98

◆ SetLane()

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.

Parameters
flLaneThe lane position, 0 through 1.
Ghidra address:
NTSC-U/C: 0x00455810
Ghidra address:
PAL: 0x00492d40

◆ SetAlpha()

void TnlPointer::SetAlpha ( float flAlpha)

Set the alpha of every icon mesh's material.

The image has no caller. TnlActivator::Update() inlines the body.

Parameters
flAlphaThe alpha.
Ghidra address:
NTSC-U/C: 0x004556c8
Ghidra address:
PAL: 0x00492bf8

◆ AttachTo()

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.

Parameters
pParentThe parent view.
Ghidra address:
NTSC-U/C: 0x00455670
Ghidra address:
PAL: 0x00492ba0

◆ Update()

void TnlPointer::Update ( float flTime)

Advance the dip ramp and the spin.

The image has no caller. TnlActivator::Update() inlines the body.

Parameters
flTimeThe scaled song position TnlActivator::Update() receives.
Ghidra address:
NTSC-U/C: 0x00455860
Ghidra address:
PAL: 0x00492d90

The documentation for this class was generated from the following file: