wavelength 1.0.0
Loading...
Searching...
No Matches
OvyJuice Class Reference

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

#include <ovyjuice.h>

Inheritance diagram for OvyJuice:
Collaboration diagram for OvyJuice:

Public Member Functions

 OvyJuice ()
 Construct a hidden, full bar from HUD1 energy.tnm and HUD energy.view.
 ~OvyJuice () override=default
 Destroy the bar.
void Show (bool bShow) override
 Slide the bar in or out.
void Reset ()
 Empty the bar, hide the warning and the ghost, and settle the display.
void SetLevel (float fLevel, int nColor)
 Set the level of the bar, leaving a fading ghost when it drops.
void SetWarning (bool bWarn)
 Start or stop the blinking warning.
void Poll (float fDelta)
 Advance the slide, the warning, the ghost, and the blink of a low bar.
void SetHideBar (int nHideBar)
Public Member Functions inherited from HideablePanel
 HideablePanel (const char *pszAnim, const char *pszDrawable, bool bShown)
 Construct a panel and find its animation and drawable.
virtual ~HideablePanel ()=default
 Destroy the panel.
virtual void ShowNow (bool bShow)
 Show or hide the panel at once.
void SetObjects (const char *pszAnim, const char *pszDrawable, bool bShown)
 Find the animation and the drawable of the panel, and show or hide it at once.
void Poll ()
 Advance the slide by sDeltaTime, and show the drawable while the panel is not hidden.

Static Public Attributes

static float sGhostFadeTime
 The time the ghost of a dropped level takes to fade, juice_ghost_fade_time.
static float sWarningBlinkTime
 The half period of the warning's blink, juice_dying_blink_time.
static LinearInterpolator sBlinkRate
 The blinks per unit of time of a low bar against its level, from juice_blink_range and juice_blink_frequency.
static float sBlinkLeft
 The part of the current blink of a low bar still to run.
Static Public Attributes inherited from HideablePanel
static constexpr float kShownFrame = 240.0f
 The frame of the animation at which the panel is fully shown.
static int sSnap
 Whether Show() moves a panel at once rather than sliding it.
static float sDeltaTime
 The time Poll() advances every panel by.
static RndAnimatable * sMaterialAnim
 The animation of the two-dimensional materials, mat_2d_EE.anim, or null.
static float sMaterialFrame
 The frame PoseMaterials() poses sMaterialAnim at.

Additional Inherited Members

Static Public Member Functions inherited from HideablePanel
static void ClearSnap ()
 Clear sSnap.
static void SetDeltaTime (float fDeltaTime)
 Set the time the next Poll() of every panel advances by.
static void Init ()
 Find the animation of the two-dimensional materials and the frame it rests at.
static void Terminate ()
 Forget the animation of the two-dimensional materials.
static void PoseMaterials ()
 Pose the animation of the two-dimensional materials at its resting frame.
Protected Attributes inherited from HideablePanel
RampAnimator mSlide

Detailed Description

Energy bar of the solo head-up display.

The RTTI records the class as deriving from HideablePanel. The object is 0x64 bytes. A drop in energy leaves a ghost of the old level that fades out, the bar blinks faster as it empties, and a warning blinks while the player is about to fail.

Constructor & Destructor Documentation

◆ OvyJuice()

OvyJuice::OvyJuice ( )

Construct a hidden, full bar from HUD1 energy.tnm and HUD energy.view.

Ghidra address:
NTSC-U/C: 0x001b9bf0
Ghidra address:
PAL: 0x001c2990

◆ ~OvyJuice()

OvyJuice::~OvyJuice ( )
overridedefault

Destroy the bar.

Ghidra address:
NTSC-U/C: 0x003671b0
Ghidra address:
PAL: 0x003d58e0

Member Function Documentation

◆ Show()

void OvyJuice::Show ( bool bShow)
overridevirtual

Slide the bar in or out.

The bar shows only in a solo game outside the victory lap.

Parameters
bShowWhether to show the bar.
Ghidra address:
NTSC-U/C: 0x001b9ed8
Ghidra address:
PAL: 0x001c2c78

Reimplemented from HideablePanel.

◆ Reset()

void OvyJuice::Reset ( )

Empty the bar, hide the warning and the ghost, and settle the display.

Ghidra address:
NTSC-U/C: 0x001b9f30
Ghidra address:
PAL: 0x001c2cd0

◆ SetLevel()

void OvyJuice::SetLevel ( float fLevel,
int nColor )

Set the level of the bar, leaving a fading ghost when it drops.

Parameters
fLevelThe level, clamped to 0 through 1.
nColorThe colour of the bar, a frame of HUD energy.mnm in steps of 500.
Ghidra address:
NTSC-U/C: 0x001ba010
Ghidra address:
PAL: 0x001c2db0

◆ SetWarning()

void OvyJuice::SetWarning ( bool bWarn)

Start or stop the blinking warning.

Parameters
bWarnWhether the warning shows.
Ghidra address:
NTSC-U/C: 0x001ba0f0
Ghidra address:
PAL: 0x001c2e90

◆ Poll()

void OvyJuice::Poll ( float fDelta)

Advance the slide, the warning, the ghost, and the blink of a low bar.

Parameters
fDeltaThe time since the last poll.
Ghidra address:
NTSC-U/C: 0x001ba148
Ghidra address:
PAL: 0x001c2ee8

◆ SetHideBar()

void OvyJuice::SetHideBar ( int nHideBar)
inline
Parameters
nHideBarWhether the bar is hidden. Reset() clears it.

Member Data Documentation

◆ sGhostFadeTime

float OvyJuice::sGhostFadeTime
static

The time the ghost of a dropped level takes to fade, juice_ghost_fade_time.

Ghidra address:
NTSC-U/C: 0x003af91c
Ghidra address:
PAL: 0x0042e7b0

◆ sWarningBlinkTime

float OvyJuice::sWarningBlinkTime
static

The half period of the warning's blink, juice_dying_blink_time.

Ghidra address:
NTSC-U/C: 0x003af920
Ghidra address:
PAL: 0x0042e7b4

◆ sBlinkRate

LinearInterpolator OvyJuice::sBlinkRate
static

The blinks per unit of time of a low bar against its level, from juice_blink_range and juice_blink_frequency.

A level above the end of the range does not blink.

Ghidra address:
NTSC-U/C: 0x0043b110

◆ sBlinkLeft

float OvyJuice::sBlinkLeft
static

The part of the current blink of a low bar still to run.

Ghidra address:
NTSC-U/C: 0x003af94c
Ghidra address:
PAL: 0x0042e7e0

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