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

Activator of one player, the object that rides the player's tunnel seeker from track to track. More...

#include <tnlactivator.h>

Public Member Functions

 TnlActivator (int nIndex, HxStr colorName, TnlPlayer *pOwner)
 Resolve every object, attach the pointer and the catcher, and hide the mesh.
void Update (float flFrame, float flScaledFrame)
 Advance the turn, the seeker offsets, the blink, the intro, the catcher, and the pointer.
void SetRotShowing (int nShowing)
 Show or hide the rotation view.
void SetLeader (int nLeader)
 Attach "leader.ps" to the effect view and show it, or detach and hide it.
void SetGhost (int nGhost)
 Record whether the ghost is wanted, and show or hide it unless mLevel is set.
void SetSuppressed (int nSuppressed)
 Hide or restore the rotation view and the ghost together.
void MoveToTrack (int nLevel, int nKind, float flTrack)
 Start a turn toward a track and set the level and the instrument kind.

Friends

class AppTunnel

Detailed Description

Activator of one player, the object that rides the player's tunnel seeker from track to track.

The class is not polymorphic and emits no RTTI, and no allocation tag or file path identifies it. The name is inferred from its objects, "activator%d", "activator rot%d", and "activator fx%d".

MoveToTrack() turns the rotation view toward the new track at 0.15 radians per update and hides the player's ghost on the old track. Once the turn and the seeker offset ramp have both settled, Update() shows the ghost on the new track. Before the song starts the "act_<c> intro.view" animation plays, and after frame -1920 the activator mesh appears and the rotation view is removed from the owner's local view.

TnlPlayer embeds one, 0xe0 bytes, at +0x34. The destructor at 0x00455970 is the implicit one, in its deleting form with no caller, and is not written.

Constructor & Destructor Documentation

◆ TnlActivator()

TnlActivator::TnlActivator ( int nIndex,
HxStr colorName,
TnlPlayer * pOwner )

Resolve every object, attach the pointer and the catcher, and hide the mesh.

The seeker transform offset is -500, or -550 with at least two local players. The rotation view joins the owner's local view when the owner has a camera.

Parameters
nIndexThe player index and the seeker index.
colorNameThe player's colour name, taken by value.
pOwnerThe player object that embeds this one.
Ghidra address:
NTSC-U/C: 0x0043b3d8
Ghidra address:
PAL: 0x004778f8

Member Function Documentation

◆ Update()

void TnlActivator::Update ( float flFrame,
float flScaledFrame )

Advance the turn, the seeker offsets, the blink, the intro, the catcher, and the pointer.

Parameters
flFrameThe song position.
flScaledFrameThe song position scaled by the AppTunnel factor at +0x144. The catcher and the pointer run on it.
Ghidra address:
NTSC-U/C: 0x0043baf8
Ghidra address:
PAL: 0x004780c0

◆ SetRotShowing()

void TnlActivator::SetRotShowing ( int nShowing)

Show or hide the rotation view.

Parameters
nShowingNon-zero to show.
Ghidra address:
NTSC-U/C: 0x00455ac8
Ghidra address:
PAL: 0x00492ff8

◆ SetLeader()

void TnlActivator::SetLeader ( int nLeader)

Attach "leader.ps" to the effect view and show it, or detach and hide it.

Parameters
nLeaderNon-zero to attach and show.
Ghidra address:
NTSC-U/C: 0x00455a40
Ghidra address:
PAL: 0x00492f70

◆ SetGhost()

void TnlActivator::SetGhost ( int nGhost)

Record whether the ghost is wanted, and show or hide it unless mLevel is set.

The ghost is mGhostView placed on track mTrack through AppTunnel.

Parameters
nGhostNon-zero to show.
Ghidra address:
NTSC-U/C: 0x00455c98
Ghidra address:
PAL: 0x004931c8

◆ SetSuppressed()

void TnlActivator::SetSuppressed ( int nSuppressed)

Hide or restore the rotation view and the ghost together.

mGhost is restored after the inner SetGhost() call. The image has no caller.

Parameters
nSuppressedNon-zero to hide both.
Ghidra address:
NTSC-U/C: 0x00455af8
Ghidra address:
PAL: 0x00493028

◆ MoveToTrack()

void TnlActivator::MoveToTrack ( int nLevel,
int nKind,
float flTrack )

Start a turn toward a track and set the level and the instrument kind.

Track n sits at (1 - n / 8) of a full turn. The seeker offset ramp moves toward a third of nLevel, the pointer shows the pair of nKind, and the catcher shows for kinds 2 and 5 only. The image has no caller.

Parameters
nLevelThe level. A non-zero level hides the ghost.
nKindThe instrument kind.
flTrackThe track.
Ghidra address:
NTSC-U/C: 0x00455b70
Ghidra address:
PAL: 0x004930a0

◆ AppTunnel

friend class AppTunnel
friend

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