tune(debug): overlay més endins del playfield i en color daurat

This commit is contained in:
2026-05-21 19:50:45 +02:00
parent 72158c7c3f
commit 66faa07c00
2 changed files with 12 additions and 6 deletions
+6 -3
View File
@@ -3,6 +3,8 @@
#pragma once #pragma once
#include <SDL3/SDL.h>
namespace Defaults::Hud { namespace Defaults::Hud {
// Marcador (scoreboard inferior). Usado por GameScene::drawScoreboard() // 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). // Overlay de debug (FPS, métriques) en coordenades lògiques (1280×720).
namespace DebugOverlay { namespace DebugOverlay {
constexpr float X = 12.0F; constexpr float X = 30.0F;
constexpr float Y_FPS = 12.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 LINE_HEIGHT = 18.0F; // separació entre línies (scale 0.4 → ~16 px alt)
constexpr float TEXT_SCALE = 0.4F; constexpr float TEXT_SCALE = 0.4F;
constexpr float TEXT_SPACING = 2.0F; constexpr float TEXT_SPACING = 2.0F;
constexpr float BRIGHTNESS = 1.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 DebugOverlay
} // namespace Defaults::Hud } // namespace Defaults::Hud
+6 -3
View File
@@ -42,17 +42,20 @@ namespace System {
Vec2{.x = Cfg::X, .y = Cfg::Y_FPS}, Vec2{.x = Cfg::X, .y = Cfg::Y_FPS},
Cfg::TEXT_SCALE, Cfg::TEXT_SCALE,
Cfg::TEXT_SPACING, Cfg::TEXT_SPACING,
Cfg::BRIGHTNESS); Cfg::BRIGHTNESS,
Cfg::COLOR);
text_.render(VSYNC_TEXT, text_.render(VSYNC_TEXT,
Vec2{.x = Cfg::X, .y = Cfg::Y_FPS + Cfg::LINE_HEIGHT}, Vec2{.x = Cfg::X, .y = Cfg::Y_FPS + Cfg::LINE_HEIGHT},
Cfg::TEXT_SCALE, Cfg::TEXT_SCALE,
Cfg::TEXT_SPACING, Cfg::TEXT_SPACING,
Cfg::BRIGHTNESS); Cfg::BRIGHTNESS,
Cfg::COLOR);
text_.render(AA_TEXT, text_.render(AA_TEXT,
Vec2{.x = Cfg::X, .y = Cfg::Y_FPS + (2.0F * Cfg::LINE_HEIGHT)}, Vec2{.x = Cfg::X, .y = Cfg::Y_FPS + (2.0F * Cfg::LINE_HEIGHT)},
Cfg::TEXT_SCALE, Cfg::TEXT_SCALE,
Cfg::TEXT_SPACING, Cfg::TEXT_SPACING,
Cfg::BRIGHTNESS); Cfg::BRIGHTNESS,
Cfg::COLOR);
} }
} // namespace System } // namespace System