feat(logo): timeline lineal de 7 fases amb glitch tail i durades al YAML

This commit is contained in:
JailDesigner committed 2026-05-07 16:44:34 +02:00
1 parent 7d5a4cee8e
commit f10671d9c0
7 files changed
+204 -76

No files matched your search

+17
View File
@@ -131,6 +131,7 @@ UiConfig::UiConfig()
},
logo_scan_{
.duration_ms = Defaults::UI::Logo::Scan::DURATION_MS,
.tail_glitch_ms = Defaults::UI::Logo::Scan::TAIL_GLITCH_MS,
.band_height_px = Defaults::UI::Logo::Scan::BAND_HEIGHT_PX,
.band_alpha = Defaults::UI::Logo::Scan::BAND_ALPHA,
.band_pulse_hz = Defaults::UI::Logo::Scan::BAND_PULSE_HZ,
@@ -143,6 +144,13 @@ UiConfig::UiConfig()
.vhs_burst_amplitude_px = Defaults::UI::Logo::Scan::VHS_BURST_AMPLITUDE_PX,
.flash_ms = Defaults::UI::Logo::Scan::FLASH_MS,
},
logo_timeline_{
.black_intro_ms = Defaults::UI::Logo::Timeline::BLACK_INTRO_MS,
.hold_silent_ms = Defaults::UI::Logo::Timeline::HOLD_SILENT_MS,
.hold_with_music_ms = Defaults::UI::Logo::Timeline::HOLD_WITH_MUSIC_MS,
.fade_out_ms = Defaults::UI::Logo::Timeline::FADE_OUT_MS,
.black_outro_ms = Defaults::UI::Logo::Timeline::BLACK_OUTRO_MS,
},
menu_select_sound_(Defaults::UI::MENU_SELECT_SOUND),
menu_accept_sound_(Defaults::UI::MENU_ACCEPT_SOUND),
player_start_sound_(Defaults::UI::PLAYER_START_SOUND),
@@ -301,6 +309,7 @@ void UiConfig::load(const std::string& file_path) {
if (l.contains("scan")) {
const auto& s = l["scan"];
readField(s, "duration_ms", logo_scan_.duration_ms);
readField(s, "tail_glitch_ms", logo_scan_.tail_glitch_ms);
readField(s, "band_height_px", logo_scan_.band_height_px);
readField(s, "band_alpha", logo_scan_.band_alpha);
readField(s, "band_pulse_hz", logo_scan_.band_pulse_hz);
@@ -313,6 +322,14 @@ void UiConfig::load(const std::string& file_path) {
readField(s, "vhs_burst_amplitude_px", logo_scan_.vhs_burst_amplitude_px);
readField(s, "flash_ms", logo_scan_.flash_ms);
}
if (l.contains("timeline")) {
const auto& tl = l["timeline"];
readField(tl, "black_intro_ms", logo_timeline_.black_intro_ms);
readField(tl, "hold_silent_ms", logo_timeline_.hold_silent_ms);
readField(tl, "hold_with_music_ms", logo_timeline_.hold_with_music_ms);
readField(tl, "fade_out_ms", logo_timeline_.fade_out_ms);
readField(tl, "black_outro_ms", logo_timeline_.black_outro_ms);
}
}
if (yaml.contains("notifier")) {
+18 -1
View File
@@ -124,9 +124,12 @@ class UiConfig {
[[nodiscard]] auto titleHeatHaze() const -> const TitleHeatHaze& { return title_heat_haze_; }
// Escena LOGO — paràmetres del scanline reveal del logo de l'editora.
// Tot s'aplica només a la fase SCAN (substitueix l'antic FADE_IN).
// `duration_ms` és la durada de la línia descendent; `tail_glitch_ms`
// és el temps post-flash en què el logo queda totalment visible
// però els bursts VHS encara hi salten (glitch tail).
struct LogoScan {
int duration_ms;
int tail_glitch_ms;
int band_height_px;
int band_alpha;
float band_pulse_hz;
@@ -142,6 +145,19 @@ class UiConfig {
[[nodiscard]] auto logoScan() const -> const LogoScan& { return logo_scan_; }
// Timeline lineal de la LogoScene. Cada camp és la durada (ms) d'una
// fase. La SCAN no apareix aquí perquè la marca el propi
// `LogoScan` (duration_ms + tail_glitch_ms + flash_ms).
struct LogoTimeline {
int black_intro_ms;
int hold_silent_ms;
int hold_with_music_ms;
int fade_out_ms;
int black_outro_ms;
};
[[nodiscard]] auto logoTimeline() const -> const LogoTimeline& { return logo_timeline_; }
// Corbes d'easing triades al YAML. Si el nom no és conegut, s'usa
// Easing::linear com a fallback.
[[nodiscard]] auto pauseEnterCurve() const -> CurveFn { return pause_enter_curve_; }
@@ -229,6 +245,7 @@ class UiConfig {
TitleIntro title_intro_;
TitleHeatHaze title_heat_haze_;
LogoScan logo_scan_;
LogoTimeline logo_timeline_;
std::string menu_select_sound_;
std::string menu_accept_sound_;