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

Score of a player on the head-up display, with the bar a shared-screen game shows at each checkpoint. More...

#include <ovyscore.h>

Inheritance diagram for OvyScore:
Collaboration diagram for OvyScore:

Public Types

enum  State {
  kStateIdle = 0 , kStateMoveIn = 1 , kStateGrow = 2 , kStateFade = 3 ,
  kStateMoveOut = 4
}
 The stages of the checkpoint display, the values of mState. More...

Public Member Functions

 OvyScore (int nPlayer, int nIndex, RndView *pHudView)
 Construct a hidden score of a player.
 ~OvyScore () override
 Destroy the score, its slide, and its power-up icon.
void Show (bool bShow) override
 Slide the score in or out.
void Reset ()
 Empty the score and stop the checkpoint display.
void SetScore (int nScore)
 Record a score, which shows after 600 milliseconds.
void Poll (float fDelta, float fUnused, float fDeltaTicks)
 Advance the slide, the checkpoint display, the score text, and the power-up icon.
void Draw ()
 Draw the score.
void ShowCheckpoint (float fShare, int nPlace)
 Start the checkpoint display.
HudPowerup * GetPowerup () const
int GetScore () const
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 constexpr int kNumCheckpointPositions = 4
 The number of places of the ranking at a checkpoint.
static float sMoveInTicks
 The ticks the score takes to move in, score_checkpoint_move_in_ticks.
static float sBarGrowTicks
 The ticks the bar takes to grow, score_checkpoint_bar_grow_ticks.
static float sStableTicks
 The ticks the bar rests, score_checkpoint_stable_ticks.
static float sFadeTicks
 The ticks the bar takes to fade, score_checkpoint_fade_ticks.
static float sMoveOutTicks
 The ticks the score takes to move back, score_checkpoint_move_out_ticks.
static Vector3 sCheckpointPositions [kNumCheckpointPositions]
 The places of the ranking, score_checkpoint_pos_1 to score_checkpoint_pos_4.
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

Score of a player on the head-up display, with the bar a shared-screen game shows at each checkpoint.

The RTTI records the class as deriving from HideablePanel. The object is 0x94 bytes. At a checkpoint the score moves to its place in the ranking, its bar grows to the player's share, rests, fades, and the score moves back.

Member Enumeration Documentation

◆ State

The stages of the checkpoint display, the values of mState.

Enumerator
kStateIdle 

No checkpoint shows.

kStateMoveIn 

The score moves to its place in the ranking.

kStateGrow 

The bar grows.

kStateFade 

The bar rests and then fades.

kStateMoveOut 

The score moves back.

Constructor & Destructor Documentation

◆ OvyScore()

OvyScore::OvyScore ( int nPlayer,
int nIndex,
RndView * pHudView )

Construct a hidden score of a player.

The scene objects are <hud> score<n>.mesh, <hud> score<n>.tnm, <hud> score<n>.txt, and <hud> pts<n>.mesh. A shared-screen game adds the bar <hud> score bar<n>.mesh and its objects, and a game of local players adds the slide <hud> pts<n> hide.tnm. A local player of a game that is neither a remix nor a duel has a power-up icon.

Parameters
nPlayerThe player.
nIndexThe number of the score, from 0.
pHudViewThe view of the head-up display.
Ghidra address:
NTSC-U/C: 0x001bd080
Ghidra address:
PAL: 0x001c5e20

◆ ~OvyScore()

OvyScore::~OvyScore ( )
override

Destroy the score, its slide, and its power-up icon.

Ghidra address:
NTSC-U/C: 0x001bd700
Ghidra address:
PAL: 0x001c64a0

Member Function Documentation

◆ Show()

void OvyScore::Show ( bool bShow)
overridevirtual

Slide the score in or out.

The score does not show in the victory lap.

Parameters
bShowWhether to show the score.
Ghidra address:
NTSC-U/C: 0x001bd8f8
Ghidra address:
PAL: 0x001c6698

Reimplemented from HideablePanel.

◆ Reset()

void OvyScore::Reset ( )

Empty the score and stop the checkpoint display.

Ghidra address:
NTSC-U/C: 0x001bd7b0
Ghidra address:
PAL: 0x001c6550

◆ SetScore()

void OvyScore::SetScore ( int nScore)

Record a score, which shows after 600 milliseconds.

The text waits only in a solo game, in a duel, and for a local player of an online game. Otherwise it shows at the next poll.

Parameters
nScoreThe score.
Ghidra address:
NTSC-U/C: 0x001bd860
Ghidra address:
PAL: 0x001c6600

◆ Poll()

void OvyScore::Poll ( float fDelta,
float fUnused,
float fDeltaTicks )

Advance the slide, the checkpoint display, the score text, and the power-up icon.

Parameters
fDeltaThe time since the last poll.
fUnusedPassed to HudPowerup::Poll().
fDeltaTicksThe ticks since the last poll.
Ghidra address:
NTSC-U/C: 0x001bd928
Ghidra address:
PAL: 0x001c66c8

◆ Draw()

void OvyScore::Draw ( )

Draw the score.

Ghidra address:
NTSC-U/C: 0x001bdc98
Ghidra address:
PAL: 0x001c6a38

◆ ShowCheckpoint()

void OvyScore::ShowCheckpoint ( float fShare,
int nPlace )

Start the checkpoint display.

Parameters
fShareThe player's share of the points, the length of the bar from 0 to 1.
nPlaceThe player's place in the ranking.
Ghidra address:
NTSC-U/C: 0x001bdcc0
Ghidra address:
PAL: 0x001c6a60

◆ GetPowerup()

HudPowerup * OvyScore::GetPowerup ( ) const
inline
Returns
The power-up icon, or null.

◆ GetScore()

int OvyScore::GetScore ( ) const
inline
Returns
The last score.

Member Data Documentation

◆ kNumCheckpointPositions

int OvyScore::kNumCheckpointPositions = 4
staticconstexpr

The number of places of the ranking at a checkpoint.

◆ sMoveInTicks

float OvyScore::sMoveInTicks
static

The ticks the score takes to move in, score_checkpoint_move_in_ticks.

Ghidra address:
NTSC-U/C: 0x003af928
Ghidra address:
PAL: 0x0042e7bc

◆ sBarGrowTicks

float OvyScore::sBarGrowTicks
static

The ticks the bar takes to grow, score_checkpoint_bar_grow_ticks.

Ghidra address:
NTSC-U/C: 0x003af92c
Ghidra address:
PAL: 0x0042e7c0

◆ sStableTicks

float OvyScore::sStableTicks
static

The ticks the bar rests, score_checkpoint_stable_ticks.

Ghidra address:
NTSC-U/C: 0x003af930
Ghidra address:
PAL: 0x0042e7c4

◆ sFadeTicks

float OvyScore::sFadeTicks
static

The ticks the bar takes to fade, score_checkpoint_fade_ticks.

Ghidra address:
NTSC-U/C: 0x003af934
Ghidra address:
PAL: 0x0042e7c8

◆ sMoveOutTicks

float OvyScore::sMoveOutTicks
static

The ticks the score takes to move back, score_checkpoint_move_out_ticks.

Ghidra address:
NTSC-U/C: 0x003af938
Ghidra address:
PAL: 0x0042e7cc

◆ sCheckpointPositions

Vector3 OvyScore::sCheckpointPositions[kNumCheckpointPositions]
static

The places of the ranking, score_checkpoint_pos_1 to score_checkpoint_pos_4.

Ghidra address:
NTSC-U/C: 0x0043b160

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