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

Score readout of one player's badge on the head-up display. More...

#include <hudscore.h>

Collaboration diagram for HudScore:

Public Member Functions

 HudScore (Player *pPlayer, int nIndex)
 Resolve the readout's objects for one player.
void Update (float flTime)
 Redraw the score once the change has settled.

Public Attributes

Rnd::Mesh * mMesh
 The readout's backing mesh.
float mChangeTime
 When the pending change arrived.
int mScore
 The score the text shows once Update() redraws.

Detailed Description

Score readout of one player's badge on the head-up display.

The class is not polymorphic, emits no RTTI, and is never allocated on its own. No descriptor, allocation tag, or file path identifies it, and its name is inferred from the s scored family of objects its constructor resolves. It occupies the first 0x10 bytes of HudBadge.

The readout redraws once more than 600 units of Update()'s time have passed since a change. mChangeTime records when the change arrived, -1 marks a change whose time is not yet recorded, and 1e9 marks the readout as up to date.

Constructor & Destructor Documentation

◆ HudScore()

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

Resolve the readout's objects for one player.

Resolves <layout> score<n>.mesh, .txt, and .font, where <layout> is g_hudLayoutName, and gives the font the material HUD score font <colour>.mat for the player's colour name. Shows the mesh only in play mode 1, and starts the pending time at -100000 with a score of 0, which makes the first Update() redraw at once.

Parameters
pPlayerThe player whose colour the font takes.
nIndexThe badge number that fills <n>.
Ghidra address:
NTSC-U/C: 0x00419618
Ghidra address:
PAL: 0x00453b10

Member Function Documentation

◆ Update()

void HudScore::Update ( float flTime)

Redraw the score once the change has settled.

HudBadge::SetFrame() inlines the body, and this copy has no caller.

Parameters
flTimeThe time HudBadge::SetFrame() receives as its second argument.
Ghidra address:
NTSC-U/C: 0x0042a220
Ghidra address:
PAL: 0x00454120

Member Data Documentation

◆ mMesh

Rnd::Mesh* HudScore::mMesh

The readout's backing mesh.

+0x00

Public because HudScorePulse::MoveTo() reads its local translation directly, and the image has no accessor for it.

◆ mChangeTime

float HudScore::mChangeTime

When the pending change arrived.

See the class documentation for the two sentinels. +0x08

Public because Overlay's PointAmountMsg handler at 0x0042aff0 writes -1 into it directly when it records a new score, and the image has no accessor for it.

◆ mScore

int HudScore::mScore

The score the text shows once Update() redraws.

+0x0c

Public on the same evidence as mChangeTime.


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