Skip to content

high_score_indicator

Anthony Samms edited this page Jun 2, 2026 · 1 revision

Displays a "new high score" badge that slides up and fades out when the player's current score exceeds their previous personal best. Created by player the first time the score animation advances past the first field, provided a new record was set.

HighScoreIndicator

Construction

HighScoreIndicator(int old_score, int new_score, bool is_2p);

Computes score_diff = new_score - old_score. Loads a MoveAnimation (slot 18) and a FadeAnimation (slot 19), then starts both immediately.

Members

Member Type Description
is_2p bool Selects 2P texture index
score_diff int Amount by which the old score was beaten
move MoveAnimation* Vertical slide animation (slot 18)
fade FadeAnimation* Opacity animation (slot 19)

Methods

void update(double current_ms);

Advances move and fade.

void draw();

Draws the localized high-score label texture ("score/high_score_<language>") displaced vertically by move->attribute and faded by fade->attribute. Below it draws the score difference digit-by-digit using SCORE::HIGH_SCORE_NUM, right-to-left with spacing from SC::HIGH_SCORE_INDICATOR_MARGIN.

Clone this wiki locally