Merge branch 'enhancements': debug overlay, àudio a 48000 i typewriter ràpid
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -9,11 +9,11 @@
|
||||
namespace Defaults::Audio {
|
||||
|
||||
constexpr bool ENABLED = true; // Audio habilitado por defecto
|
||||
constexpr float VOLUME = 1.0F; // Volumen maestro (0..1)
|
||||
constexpr float VOLUME = 1.0F; // Volumen maestro (0..1) — 100%
|
||||
constexpr bool MUSIC_ENABLED = true; // Música habilitada
|
||||
constexpr float MUSIC_VOLUME = 0.8F; // Volumen música (0..1)
|
||||
constexpr float MUSIC_VOLUME = 1.0F; // Volumen música (0..1) — 100%
|
||||
constexpr bool SOUND_ENABLED = true; // Efectos habilitados
|
||||
constexpr float SOUND_VOLUME = 1.0F; // Volumen efectos (0..1)
|
||||
constexpr float SOUND_VOLUME = 0.25F; // Volumen efectos (0..1) — 25%
|
||||
constexpr float VOLUME_STEP = 0.05F; // Paso UI (5%)
|
||||
constexpr int FREQUENCY = 48000; // Frecuencia de muestreo (Hz)
|
||||
constexpr int CROSSFADE_MS = 1500; // Crossfade por defecto entre pistas (ms)
|
||||
|
||||
@@ -31,8 +31,8 @@ namespace Defaults::Game {
|
||||
constexpr float LEVEL_START_TYPING_RATIO = 0.3F; // 30% escribiendo, 70% mostrando
|
||||
|
||||
// Transición LEVEL_COMPLETED (mensaje "GOOD JOB COMMANDER!")
|
||||
constexpr float LEVEL_COMPLETED_DURATION = 3.0F; // Duración total
|
||||
constexpr float LEVEL_COMPLETED_TYPING_RATIO = 0.0F; // 0.0 = sin typewriter (directo)
|
||||
constexpr float LEVEL_COMPLETED_DURATION = 3.0F; // Duración total
|
||||
constexpr float LEVEL_COMPLETED_TYPING_RATIO = 0.05F; // ~150ms de typewriter (escan ràpid però visible)
|
||||
|
||||
// Transición INIT_HUD (animación inicial del HUD)
|
||||
constexpr float INIT_HUD_DURATION = 3.0F; // Duración total del estado
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <SDL3/SDL.h>
|
||||
|
||||
namespace Defaults::Hud {
|
||||
|
||||
// Marcador (scoreboard inferior). Usado por GameScene::drawScoreboard()
|
||||
@@ -29,13 +31,14 @@ namespace Defaults::Hud {
|
||||
|
||||
// Overlay de debug (FPS, métriques) en coordenades lògiques (1280×720).
|
||||
namespace DebugOverlay {
|
||||
constexpr float X = 12.0F;
|
||||
constexpr float Y_FPS = 12.0F;
|
||||
constexpr float X = 30.0F;
|
||||
constexpr float Y_FPS = 24.0F;
|
||||
constexpr float LINE_HEIGHT = 18.0F; // separació entre línies (scale 0.4 → ~16 px alt)
|
||||
constexpr float TEXT_SCALE = 0.4F;
|
||||
constexpr float TEXT_SPACING = 2.0F;
|
||||
constexpr float BRIGHTNESS = 1.0F;
|
||||
constexpr float FPS_UPDATE_INTERVAL = 0.5F; // Cadencia d'actualització del FPS visible
|
||||
constexpr float FPS_UPDATE_INTERVAL = 0.5F; // Cadencia d'actualització del FPS visible
|
||||
constexpr SDL_Color COLOR = {.r = 255, .g = 215, .b = 0, .a = 255}; // #FFD700 — daurat
|
||||
} // namespace DebugOverlay
|
||||
|
||||
} // namespace Defaults::Hud
|
||||
|
||||
@@ -42,17 +42,20 @@ namespace System {
|
||||
Vec2{.x = Cfg::X, .y = Cfg::Y_FPS},
|
||||
Cfg::TEXT_SCALE,
|
||||
Cfg::TEXT_SPACING,
|
||||
Cfg::BRIGHTNESS);
|
||||
Cfg::BRIGHTNESS,
|
||||
Cfg::COLOR);
|
||||
text_.render(VSYNC_TEXT,
|
||||
Vec2{.x = Cfg::X, .y = Cfg::Y_FPS + Cfg::LINE_HEIGHT},
|
||||
Cfg::TEXT_SCALE,
|
||||
Cfg::TEXT_SPACING,
|
||||
Cfg::BRIGHTNESS);
|
||||
Cfg::BRIGHTNESS,
|
||||
Cfg::COLOR);
|
||||
text_.render(AA_TEXT,
|
||||
Vec2{.x = Cfg::X, .y = Cfg::Y_FPS + (2.0F * Cfg::LINE_HEIGHT)},
|
||||
Cfg::TEXT_SCALE,
|
||||
Cfg::TEXT_SPACING,
|
||||
Cfg::BRIGHTNESS);
|
||||
Cfg::BRIGHTNESS,
|
||||
Cfg::COLOR);
|
||||
}
|
||||
|
||||
} // namespace System
|
||||
|
||||
Reference in New Issue
Block a user