Migración de dbgtxt a SDL_TTF + conversión de textos a mixed case

Sistema de texto:
- Reemplazado dbgtxt.cpp (bitmap 8x8) por TextRenderer (SDL_TTF)
- Creado source/text/ con TextRenderer class
- Añadidas fuentes TrueType en data/fonts/
- Implementados dos TextRenderer (display + debug) con escalado dinámico
- Constantes configurables: TEXT_FONT_PATH, TEXT_BASE_SIZE, TEXT_ANTIALIASING

Correcciones de centrado:
- Reemplazado text.length() * 8 por text_renderer_.getTextWidth() en ~25 lugares
- Texto de tecla F ahora se centra correctamente
- Texto de modo (Demo/Logo/Lite) fijo en tercera fila del HUD debug
- Implementado espaciado dinámico con getTextHeight()

Conversión a mixed case:
- ~26 textos de display cambiados de ALL CAPS a mixed case
- 15 nombres de temas en theme_manager.cpp convertidos a mixed case
- Ejemplos: "FPS" → "fps", "MODO FISICA" → "Modo Física", "DEMO MODE ON" → "Modo Demo: On"
- Temas: "SUNSET" → "Sunset", "OCEANO" → "Océano", etc.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-10-09 20:18:01 +02:00
parent c50ecbc02a
commit f00b08b6be
14 changed files with 338 additions and 138 deletions

View File

@@ -17,8 +17,8 @@ void ThemeManager::initialize() {
// 0: SUNSET (Atardecer) - Naranjas, rojos, amarillos, rosas
themes_.push_back(std::make_unique<StaticTheme>(
"SUNSET",
"ATARDECER",
"Sunset",
"Atardecer",
255, 140, 60, // Color texto: naranja cálido
180.0f / 255.0f, 140.0f / 255.0f, 100.0f / 255.0f, // Fondo superior: naranja suave
40.0f / 255.0f, 20.0f / 255.0f, 60.0f / 255.0f, // Fondo inferior: púrpura oscuro
@@ -30,8 +30,8 @@ void ThemeManager::initialize() {
// 1: OCEAN (Océano) - Azules, turquesas, blancos
themes_.push_back(std::make_unique<StaticTheme>(
"OCEAN",
"OCEANO",
"Ocean",
"Océano",
80, 200, 255, // Color texto: azul océano
100.0f / 255.0f, 150.0f / 255.0f, 200.0f / 255.0f, // Fondo superior: azul cielo
20.0f / 255.0f, 40.0f / 255.0f, 80.0f / 255.0f, // Fondo inferior: azul marino
@@ -43,8 +43,8 @@ void ThemeManager::initialize() {
// 2: NEON - Cian, magenta, verde lima, amarillo vibrante
themes_.push_back(std::make_unique<StaticTheme>(
"NEON",
"NEON",
"Neon",
"Neón",
255, 60, 255, // Color texto: magenta brillante
20.0f / 255.0f, 20.0f / 255.0f, 40.0f / 255.0f, // Fondo superior: negro azulado
0.0f / 255.0f, 0.0f / 255.0f, 0.0f / 255.0f, // Fondo inferior: negro
@@ -56,8 +56,8 @@ void ThemeManager::initialize() {
// 3: FOREST (Bosque) - Verdes, marrones, amarillos otoño
themes_.push_back(std::make_unique<StaticTheme>(
"FOREST",
"BOSQUE",
"Forest",
"Bosque",
100, 255, 100, // Color texto: verde natural
144.0f / 255.0f, 238.0f / 255.0f, 144.0f / 255.0f, // Fondo superior: verde claro
101.0f / 255.0f, 67.0f / 255.0f, 33.0f / 255.0f, // Fondo inferior: marrón tierra
@@ -104,8 +104,8 @@ void ThemeManager::initialize() {
// 5: MONOCHROME (Monocromo) - Fondo negro degradado, sprites blancos
themes_.push_back(std::make_unique<StaticTheme>(
"MONOCHROME",
"MONOCROMO",
"Monochrome",
"Monocromo",
200, 200, 200, // Color texto: gris claro
20.0f / 255.0f, 20.0f / 255.0f, 20.0f / 255.0f, // Fondo superior: gris muy oscuro
0.0f / 255.0f, 0.0f / 255.0f, 0.0f / 255.0f, // Fondo inferior: negro
@@ -117,8 +117,8 @@ void ThemeManager::initialize() {
// 6: LAVENDER (Lavanda) - Degradado violeta oscuro → azul medianoche, pelotas amarillo dorado
themes_.push_back(std::make_unique<StaticTheme>(
"LAVENDER",
"LAVANDA",
"Lavender",
"Lavanda",
255, 200, 100, // Color texto: amarillo cálido
120.0f / 255.0f, 80.0f / 255.0f, 140.0f / 255.0f, // Fondo superior: violeta oscuro
25.0f / 255.0f, 30.0f / 255.0f, 60.0f / 255.0f, // Fondo inferior: azul medianoche
@@ -130,8 +130,8 @@ void ThemeManager::initialize() {
// 7: CRIMSON (Carmesí) - Fondo negro-rojo oscuro, pelotas rojas uniformes
themes_.push_back(std::make_unique<StaticTheme>(
"CRIMSON",
"CARMESI",
"Crimson",
"Carmesí",
255, 100, 100, // Color texto: rojo claro
40.0f / 255.0f, 0.0f / 255.0f, 0.0f / 255.0f, // Fondo superior: rojo muy oscuro
0.0f / 255.0f, 0.0f / 255.0f, 0.0f / 255.0f, // Fondo inferior: negro puro
@@ -143,8 +143,8 @@ void ThemeManager::initialize() {
// 8: EMERALD (Esmeralda) - Fondo negro-verde oscuro, pelotas verdes uniformes
themes_.push_back(std::make_unique<StaticTheme>(
"EMERALD",
"ESMERALDA",
"Emerald",
"Esmeralda",
100, 255, 100, // Color texto: verde claro
0.0f / 255.0f, 40.0f / 255.0f, 0.0f / 255.0f, // Fondo superior: verde muy oscuro
0.0f / 255.0f, 0.0f / 255.0f, 0.0f / 255.0f, // Fondo inferior: negro puro
@@ -160,8 +160,8 @@ void ThemeManager::initialize() {
// 9: SUNRISE (Amanecer) - Noche → Alba → Día (loop)
themes_.push_back(std::make_unique<DynamicTheme>(
"SUNRISE",
"AMANECER",
"Sunrise",
"Amanecer",
255, 200, 100, // Color texto: amarillo cálido
std::vector<DynamicThemeKeyframe>{
// Keyframe 0: Noche oscura (estado inicial)
@@ -201,8 +201,8 @@ void ThemeManager::initialize() {
// 10: OCEAN WAVES (Olas Oceánicas) - Azul oscuro ↔ Turquesa (loop)
themes_.push_back(std::make_unique<DynamicTheme>(
"OCEAN WAVES",
"OLAS OCEANICAS",
"Ocean Waves",
"Olas Oceánicas",
100, 220, 255, // Color texto: cian claro
std::vector<DynamicThemeKeyframe>{
// Keyframe 0: Profundidad oceánica (azul oscuro)
@@ -232,8 +232,8 @@ void ThemeManager::initialize() {
// 11: NEON PULSE (Pulso Neón) - Negro → Neón brillante (rápido ping-pong)
themes_.push_back(std::make_unique<DynamicTheme>(
"NEON PULSE",
"PULSO NEON",
"Neon Pulse",
"Pulso Neón",
255, 60, 255, // Color texto: magenta brillante
std::vector<DynamicThemeKeyframe>{
// Keyframe 0: Apagado (negro)
@@ -263,8 +263,8 @@ void ThemeManager::initialize() {
// 12: FIRE (Fuego Vivo) - Brasas → Llamas → Inferno (loop)
themes_.push_back(std::make_unique<DynamicTheme>(
"FIRE",
"FUEGO",
"Fire",
"Fuego",
255, 150, 80, // Color texto: naranja cálido
std::vector<DynamicThemeKeyframe>{
// Keyframe 0: Brasas oscuras (estado inicial)
@@ -314,8 +314,8 @@ void ThemeManager::initialize() {
// 13: AURORA (Aurora Boreal) - Verde → Violeta → Cian (loop)
themes_.push_back(std::make_unique<DynamicTheme>(
"AURORA",
"AURORA",
"Aurora",
"Aurora",
150, 255, 200, // Color texto: verde claro
std::vector<DynamicThemeKeyframe>{
// Keyframe 0: Verde aurora (estado inicial)
@@ -365,8 +365,8 @@ void ThemeManager::initialize() {
// 14: VOLCANIC (Erupción Volcánica) - Ceniza → Erupción → Lava (loop)
themes_.push_back(std::make_unique<DynamicTheme>(
"VOLCANIC",
"VOLCAN",
"Volcanic",
"Volcán",
200, 120, 80, // Color texto: naranja apagado
std::vector<DynamicThemeKeyframe>{
// Keyframe 0: Ceniza oscura (pre-erupción)