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

Energy bar of the head-up display. More...

#include <hudenergy.h>

Public Member Functions

 HudEnergy (int nIndex)
 Resolve the bar and its animation, and empty it.
void SetFrame (float flFrame)
 Show the level, blinking the bar while the level is low.

Public Attributes

float mLevel
 The level, 0 through 1.

Detailed Description

Energy bar of the head-up display.

The class is not polymorphic and emits no RTTI. No descriptor, tag, or file path identifies it, and its name is inferred from the HUD1 energy objects it resolves. HudTrack embeds one at +0x00. Every track display resolves the same three HUD1 objects, so all of them drive one shared bar.

Constructor & Destructor Documentation

◆ HudEnergy()

HudEnergy::HudEnergy ( int nIndex)

Resolve the bar and its animation, and empty it.

The frame of HUD1 energy.mesh shows only in kPlayModeGame with kGameModeSolo. The level starts at 0, and the constructor then runs SetFrame() 100 times with a frame of -1.

Parameters
nIndexThe track display number. The body does not read it.
Ghidra address:
NTSC-U/C: 0x00416428
Ghidra address:
PAL: 0x0044ffd0

Member Function Documentation

◆ SetFrame()

void HudEnergy::SetFrame ( float flFrame)

Show the level, blinking the bar while the level is low.

The animation takes the level scaled to 0 through 100. A level below 0.01 hides the bar, a level below 0.2 shows it for the first 120 of every 240 ticks, and any other level shows it.

Parameters
flFrameThe song position, in MIDI ticks, that times the blink.
Ghidra address:
NTSC-U/C: 0x004166b8
Ghidra address:
PAL: 0x004502b8

Member Data Documentation

◆ mLevel

float HudEnergy::mLevel

The level, 0 through 1.

+0x08

Public because Overlay's JuiceAmountMsg handler at 0x0041f310 writes the juice amount into it directly, and the image has no accessor for it.


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