Skip to content

result_crown

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

Displays the performance crown (Clear / Full Combo / DFC) with an entrance animation and gleam effect. Created by player after the bottom characters finish settling, provided the stage was cleared.

CrownType

Defined in result_crown.h. Determined by player at construction from the session result data.

Value Condition Visual
CROWN_CLEAR bad > 0 Clear crown
CROWN_FC bad == 0, ok > 0 Full combo crown
CROWN_DFC bad == 0 and ok == 0 Donderful combo crown

ResultCrown

Construction

ResultCrown(bool is_2p);

Loads five animations from slots 2–6 and starts all of them immediately:

Slot Animation Role
2 resize Initial scale-up pop
3 resize_fix Settle back to final scale after the pop
4 white_fadein White flash that fades over the crown
5 gleam Cycling gleam sprite frames
6 fadein Overall crown fade-in

Members

Member Type Description
resize TextureResizeAnimation* Pop-in scale animation
resize_fix TextureResizeAnimation* Settle-to-final-scale animation
white_fadein FadeAnimation* White flash fade
gleam TextureChangeAnimation* Gleam frame cycle
fadein FadeAnimation* Crown alpha ramp
sound_played bool Guards the one-shot "crown" sound
is_2p bool Selects 2P texture index

Methods

void update(double current_ms);

Advances all animations. Plays the "crown" sound once when resize_fix finishes.

void draw(CrownType crown_type);

Resolves the crown texture name ("crown/crown_clear", "crown/crown_fc", or "crown/crown_dfc"). Draws it at the scale from resize (or resize_fix once resize is done), centred. Then draws the white flash (CROWN::CROWN_FADE) and, if gleam->attribute >= 0, the gleam sprite at the current frame.

Clone this wiki locally