|
resonance 1.0.1
|
Score readout of one player's badge on the head-up display. More...
#include <hudscore.h>

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. | |
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.
| 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.
| pPlayer | The player whose colour the font takes. |
| nIndex | The badge number that fills <n>. |
| void HudScore::Update | ( | float | flTime | ) |
Redraw the score once the change has settled.
HudBadge::SetFrame() inlines the body, and this copy has no caller.
| flTime | The time HudBadge::SetFrame() receives as its second argument. |
| 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.
| 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.
| int HudScore::mScore |