-
Notifications
You must be signed in to change notification settings - Fork 6
title
The title screen loops through an attract mode sequence indefinitely until a don input is detected, at which point it transitions to the entry screen.
An enum tracking which phase of the attract loop is active.
| Value | Description |
|---|---|
OP_VIDEO |
A randomly selected opening video is playing |
WARNING |
The warning_screen is displayed |
ATTRACT_VIDEO |
A randomly selected attract video is playing |
ATTRACT_CAMERA |
The live webcam feed, Bana advertisements, and camera cloud are displayed |
Inherits from Screen. Constructed with the screen name "title", which is used by the base class to load the correct textures and sounds.
void on_screen_start() override;Calls the base Screen::on_screen_start() to load screen textures and sounds, then calls load_videos(), sets the initial state to OP_VIDEO, creates the hit_taiko_text outlined text object from the skin config using the configured language, and retrieves the fade_out and text_overlay_fade animations from the skin.
void load_videos();Scans Skins/<skin>/Videos/op_videos/ and Skins/<skin>/Videos/attract_videos/ recursively for .mp4 files and stores their paths in op_video_list and attract_video_list. Called on every screen start so the lists are always fresh. Logs a warning if either folder is missing.
Screens on_screen_end(Screens next_screen) override;Releases the op_video and attract_video players before delegating to Screen::on_screen_end, which unloads all sounds, music, and textures.
std::optional<Screens> update() override;Calls Screen::update() to handle first-frame initialisation, then advances text_overlay_fade and fade_out. If fade_out has finished, calls on_screen_end and returns Screens::ENTRY. Otherwise calls scene_manager to advance the attract loop. If a left or right don input is detected (is_l_don_pressed / is_r_don_pressed), fade_out is started and the don sound is played. Returns std::nullopt while waiting.
void scene_manager(double current_ms); // privateDrives the four-state attract loop. Objects are created lazily (using std::optional) when their state is first entered and destroyed when it ends:
-
OP_VIDEO: Picks a random video fromop_video_listand plays it. If the list is empty it skips straight toWARNING. When the video finishes it transitions toWARNING. -
WARNING: Constructs a warning_screen and updates it. When it reports finished, transitions toATTRACT_VIDEO. -
ATTRACT_VIDEO: Picks a random video fromattract_video_listand plays it. If the list is empty it falls back toOP_VIDEO. When the video finishes, transitions toATTRACT_CAMERA. -
ATTRACT_CAMERA: Constructs attract_camera, two bana_advert instances, and camera_cloud and updates them all. Whenattract_camerareports finished (after 30 seconds), all four objects are destroyed and the state returns toOP_VIDEO.
void draw() override;Renders only the content appropriate for the current state:
-
OP_VIDEO— draws the op video player. -
WARNING— drawsWARNING::BACKGROUNDthen the warning_screen. -
ATTRACT_VIDEO— draws the attract video player. -
ATTRACT_CAMERA— draws the webcam feed, then camera_cloud, then the two bana_advert instances at fixed positions ((33, 136)and(1023, 136)).
After the state-specific content, every frame also draws:
- A
MOVIE::BACKGROUNDoverlay atfade_outopacity (the transition-out fade). - The coin_overlay, allnet_indicator, and entry_overlay global HUD objects.
- The "Hit Taiko to Start" text drawn twice — once on the left quarter of the screen and once on the right — both faded by
text_overlay_fade.
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