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

One player's track display on the head-up display. More...

#include <hudtrack.h>

Collaboration diagram for HudTrack:

Public Member Functions

 HudTrack (Player *pPlayer, int nIndex)
 Build the display for one player.
void SetFrame (float flFrame, float flTime)
 Advance every animated part.

Public Attributes

HudEnergy mEnergy
HudPowerup mPowerup
HudTextMessage mTextMessage
HudLoop mLoop
HudTrackLabel mTrackLabel
HudEffects mEffects
HudPoints mPoints
HudCountdown mCountdown
int mBlockedCatches
int mTrack
int mReservedE8
int mDeployedPowerup
Player * mPlayer

Detailed Description

One player's track display on the head-up display.

The class is not polymorphic and emits no RTTI. Overlay allocates one per world player that has a slot, with the untagged scalar allocator (0xf4 bytes, the size its constructor requests at 0x0041cf50), and stores the pointers in its vector at +0x08. No descriptor, tag, or file path identifies the class, and its name is inferred from the eight parts it aggregates.

The class declares no destructor. The routine at 0x0042aa18 that Overlay's destructor calls on each element is the compiler's deleting destructor, which runs the effect lamps' vector teardown and ~HudTextMessage() and then the scalar free.

Every member is public because Overlay's handlers access the parts directly. They look a display up by mPlayer, set the track name through mTrackLabel, record the track in mTrack, and drive mPoints, mEffects, and the words at +0xe0 and +0xec.

Constructor & Destructor Documentation

◆ HudTrack()

HudTrack::HudTrack ( Player * pPlayer,
int nIndex )

Build the display for one player.

Parameters
pPlayerThe player the display shows.
nIndexThe display number, counted over the players with a slot from 0.
Ghidra address:
NTSC-U/C: 0x0041bec8
Ghidra address:
PAL: 0x004569f0

Member Function Documentation

◆ SetFrame()

void HudTrack::SetFrame ( float flFrame,
float flTime )

Advance every animated part.

The energy bar and the countdown follow the song position, and the text message and the points readout follow the time.

Parameters
flFrameThe song position, in MIDI ticks.
flTimeThe time the text message and the points readout run against.
Ghidra address:
NTSC-U/C: 0x0042ab08
Ghidra address:
PAL: 0x00465e58

Member Data Documentation

◆ mEnergy

HudEnergy HudTrack::mEnergy

The shared energy bar. +0x00

◆ mPowerup

HudPowerup HudTrack::mPowerup

The powerup indicator. +0x0c

◆ mTextMessage

HudTextMessage HudTrack::mTextMessage

<layout> textmsg<n>. +0x28

◆ mLoop

HudLoop HudTrack::mLoop

The loop indicator. +0x48

◆ mTrackLabel

HudTrackLabel HudTrack::mTrackLabel

The track name label. +0x50

◆ mEffects

HudEffects HudTrack::mEffects

The effect lamps. +0x58

◆ mPoints

HudPoints HudTrack::mPoints

The points readout. +0x78

◆ mCountdown

HudCountdown HudTrack::mCountdown

The bar countdown. +0xc4

◆ mBlockedCatches

int HudTrack::mBlockedCatches

Blocked catches in a row, as Overlay::OnCatch() counts. +0xe0

◆ mTrack

int HudTrack::mTrack

The track the player selected. +0xe4

◆ mReservedE8

int HudTrack::mReservedE8

The recovered routines never access it. +0xe8

◆ mDeployedPowerup

int HudTrack::mDeployedPowerup

Set once Overlay::OnDeployedPowerup() runs; never read. +0xec

◆ mPlayer

Player* HudTrack::mPlayer

The player the display shows. +0xf0


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