From 66faa07c005198762a7f22680e7fcfded2414019 Mon Sep 17 00:00:00 2001 From: Sergio Valor Date: Thu, 21 May 2026 19:50:45 +0200 Subject: [PATCH] =?UTF-8?q?tune(debug):=20overlay=20m=C3=A9s=20endins=20de?= =?UTF-8?q?l=20playfield=20i=20en=20color=20daurat?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/core/defaults/hud.hpp | 9 ++++++--- source/core/system/debug_overlay.cpp | 9 ++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/source/core/defaults/hud.hpp b/source/core/defaults/hud.hpp index 072a536..9b3e608 100644 --- a/source/core/defaults/hud.hpp +++ b/source/core/defaults/hud.hpp @@ -3,6 +3,8 @@ #pragma once +#include + 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 diff --git a/source/core/system/debug_overlay.cpp b/source/core/system/debug_overlay.cpp index 5434143..948a5f9 100644 --- a/source/core/system/debug_overlay.cpp +++ b/source/core/system/debug_overlay.cpp @@ -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