-
Notifications
You must be signed in to change notification settings - Fork 6
warning_screen
The warning screen is played during the attract mode sequence on the title screen.
It is composed of four sub-objects that each handle a distinct piece of the animation, all orchestrated by the top-level WarningScreen class.
The top-level class that owns and drives all sub-objects.
WarningScreen(double current_ms);Initialises all sub-objects and starts the overall fade-in animation. current_ms is used to record the start time so the update loop can calculate elapsed time.
void update(double current_ms);Steps every sub-object forward. Once WarningCharacters reports it is finished, WarningBachiHit begins updating. While characters are still animating, a 566.67 ms delay is observed before the warning_voiceover and bachi_swipe sounds are played (once each). The fade-out animation is started at the same time as the voiceover/swipe sounds, and a MOVIE::BACKGROUND overlay is drawn at the fade-out opacity to transition out of the screen.
void draw();Draws all layers in order: board → X background → characters → X foreground → bachi hit → fade-out overlay.
bool is_finished();Returns true when the fade-out animation completes.
Handles the warning box sliding in and settling into place.
Three MoveAnimations run in sequence: move_down starts first, then move_up takes over once move_down finishes, and finally move_center takes over once move_up finishes. The current y_pos is set to whichever animation is currently active.
void draw();Draws WARNING::WARNING_BOX at the current y_pos.
The red "X" graphic that appears on the warning box. It has a background layer (light red) and a foreground layer (red) that scales in.
When the resize animation's attribute exceeds 1, the error sound is played once. The foreground is drawn centered and scaled; the background is drawn at full size with its own fade.
void draw_bg();Draws WARNING::X_LIGHTRED with the secondary fade applied.
void draw_fg();Draws WARNING::X_RED centered, scaled by the resize animation, with the primary fade applied.
bool is_finished();Returns true when all three of its animations (resize, fade, fade 2) are finished.
The drumstick-hit graphic that appears after the characters finish animating.
On the first update call, the bachi_hit sound is played and both animations are started. The bachi graphic (WARNING::BACHI) is drawn at a fixed position once the resize animation has begun; the hit flash (WARNING::BACHI_HIT) is drawn centered and scaled.
bool is_finished();Returns true when its fade and resize animations are both finished and the sound has played.
Animates the two Don-chan characters that appear on the warning box.
Both characters use TextureChangeAnimation to step through their sprite frames. A FadeAnimation (shadow_fade) drives the opacity of the trailing shadow frame for character 1; it starts as soon as the character's frame changes for the first time.
void draw(float fade, float fade_2, float y_pos);-
fade— main opacity for both characters and their shadow sprites. -
fade_2— capped at0.75, used for the shadow sprites (CHARA_0_SHADOW,CHARA_1_SHADOW). -
y_pos— vertical offset inherited fromBoard::y_posso the characters ride the board.
Character 1's previous frame is drawn at shadow_fade->attribute opacity (ghost/trail effect) before the current frame is drawn at fade opacity. The previous-frame draw is skipped if the frame index is out of the valid range (0–6).
bool is_finished();Returns true when character 1's TextureChangeAnimation is finished.
Building
libs
- animation
- audio
- config
- filesystem
- global_data
- input
- logging
- ray
- scores
- screen
- script
- song_parser
- text
- texture
- video
- webcam
libs/parsers
objects
objects/game
- player
- background
- gauge
- judgment
- combo
- branch_indicator
- ending_animations
- gogo_time
- fireworks
- song_info
- transition
- result_transition
- judge_counter
- score_counter
- score_counter_animation
- balloon_counter
- drumroll_counter
- kusudama_counter
- drum_hit_effect
- lane_hit_effect
- gauge_hit_effect
- combo_announce
- note_arc
objects/global
objects/title
objects/entry
objects/settings
objects/result
objects/song_select
- player
- navigator
- box_base
- box_song
- box_folder
- neiro
- modifier
- ura_switch
- diff_sort
- search_box
- dan_transition
- genre_bg
- score_history
- song_select_script
scenes