feat(logo): so glitch.wav sincronitzat amb el scanline reveal

This commit is contained in:
JailDesigner committed 2026-05-07 14:04:48 +02:00
1 parent e32cff9dac
commit e1bd75e00d
6 files changed
+24

No files matched your search

+4
View File
@@ -170,6 +170,10 @@ Director::Director() {
// prem START (vore enterStarting i el reset del segon jugador).
const auto& player_start = UiConfig::get().playerStartSound();
Resource::Cache::get().loadSound(player_start, "data/sounds/" + player_start);
// Soroll de LogoScene (scanline reveal). El dispara LogoScene al
// ctor; amb fallback al nom de Defaults si la clau YAML no hi és.
const auto& logo_glitch = UiConfig::get().logoGlitchSound();
Resource::Cache::get().loadSound(logo_glitch, "data/sounds/" + logo_glitch);
// Catàleg de presets d'efectes per als sons. Es carrega abans d'Audio
// perquè els primers playSoundWith* (al començament del joc) ja
+2
View File
@@ -146,6 +146,7 @@ UiConfig::UiConfig()
menu_select_sound_(Defaults::UI::MENU_SELECT_SOUND),
menu_accept_sound_(Defaults::UI::MENU_ACCEPT_SOUND),
player_start_sound_(Defaults::UI::PLAYER_START_SOUND),
logo_glitch_sound_(Defaults::UI::LOGO_GLITCH_SOUND),
hud_font_{.name = Defaults::UI::Font::HUD_NAME, .gif = Defaults::UI::Font::HUD_GIF, .fnt = Defaults::UI::Font::HUD_FNT, .kerning = Defaults::UI::Font::HUD_KERNING},
placeholder_font_{.name = Defaults::UI::Font::PLACEHOLDER_NAME, .gif = Defaults::UI::Font::PLACEHOLDER_GIF, .fnt = Defaults::UI::Font::PLACEHOLDER_FNT, .kerning = Defaults::UI::Font::PLACEHOLDER_KERNING},
room_text_font_{.name = Defaults::UI::Font::ROOM_TEXT_NAME, .gif = Defaults::UI::Font::ROOM_TEXT_GIF, .fnt = Defaults::UI::Font::ROOM_TEXT_FNT, .kerning = Defaults::UI::Font::ROOM_TEXT_KERNING},
@@ -253,6 +254,7 @@ void UiConfig::load(const std::string& file_path) {
readField(s, "menu_select", menu_select_sound_);
readField(s, "menu_accept", menu_accept_sound_);
readField(s, "player_start", player_start_sound_);
readField(s, "logo_glitch", logo_glitch_sound_);
}
if (yaml.contains("title")) {
+2
View File
@@ -158,6 +158,7 @@ class UiConfig {
[[nodiscard]] auto menuSelectSound() const -> const std::string& { return menu_select_sound_; }
[[nodiscard]] auto menuAcceptSound() const -> const std::string& { return menu_accept_sound_; }
[[nodiscard]] auto playerStartSound() const -> const std::string& { return player_start_sound_; }
[[nodiscard]] auto logoGlitchSound() const -> const std::string& { return logo_glitch_sound_; }
// Fonts de UI.
[[nodiscard]] auto hudFont() const -> const Font& { return hud_font_; }
@@ -232,6 +233,7 @@ class UiConfig {
std::string menu_select_sound_;
std::string menu_accept_sound_;
std::string player_start_sound_;
std::string logo_glitch_sound_;
Font hud_font_;
Font placeholder_font_;