-
Notifications
You must be signed in to change notification settings - Fork 6
loading
The loading screen parses all configured song files, computes per-difficulty hashes, and registers them with scores before advancing to the title screen. All parsing work runs on a background thread so the progress bar can update smoothly.
Inherits from Screen. Constructed with the screen name "loading".
| Member | Type | Description |
|---|---|---|
loading_complete |
atomic<bool> |
Set to true by the background thread when all songs are processed |
progress |
atomic<float> |
Fraction of songs processed (0.0–1.0), written by the background thread |
songs |
vector<fs::path> |
Full list of song file paths collected at startup |
loading_thread |
thread |
Background thread running load_song_hashes()
|
fade_in |
unique_ptr<FadeAnimation> |
White fade-to-white played after loading completes, used to transition to the title screen |
allnet_indicator |
AllNetIcon |
Online/offline status icon |
void on_screen_start() override;Calls Screen::on_screen_start(), calculates progress bar geometry (43% of screen width, positioned at 85% screen height), creates the fade_in animation, collects all song file paths from the configured tja_path directories via get_song_files(), and launches loading_thread.
Screens on_screen_end(Screens next_screen) override;Joins loading_thread before delegating to Screen::on_screen_end.
std::optional<Screens> update() override;Once loading_complete is set, starts the fade_in animation. When the fade finishes, calls on_screen_end and returns Screens::TITLE.
void load_song_hashes(); // private, runs on loading_threadParses every song file using SongParser, computes a hash for each difficulty, and writes the results to scores inside a single database transaction. Work is distributed across all available hardware threads. After all songs are processed:
- If
scores_pytaiko.dbexists in the working directory, imports it viascores_manager.py_taiko_import()and deletes the file. - Sets
loading_complete = true.
void draw() override;Draws a black background, a dark-red progress bar track, a red filled bar scaled to the current progress value, the KIDOU::WARNING skin texture, a white rectangle fading in over everything (driven by fade_in), and the allnet_indicator.
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