Refinar modos DEMO: más dinamismo figuras/gravedad + textos del tema

CAMBIOS EN PESOS DEMO MODE:
 **Escenario: 10% → 2%** - Cambio MUY ocasional (mantiene cantidad actual)
 **Toggle gravedad ON/OFF: 8% → 15%** - ¡Ver caer pelotas sin gravedad!
 **Toggle física ↔ figura: 12% → 18%** - ¡Destruir figuras más frecuente!
 **Activar figura 3D: 20% → 22%** - Construir figuras
 **Re-generar figura: 8% → 10%** - Reconstruir después de destruir
 **Cambiar dirección gravedad: 10% → 12%**
 **Tema: 15% → 12%**
 **Impulso: 10% → 6%**
 **Profundidad/Escala/Sprite: 3%/2%/2% → 1%/1%/1%** - Muy ocasional

RESULTADO: Mucho más dinámico y entretenido
- Más "destrucción → caída → reconstrucción"
- Mantiene mismo escenario más tiempo
- Balance perfecto para embobarse viendo

MEJORAS TEXTOS:
 **Eliminado display permanente** "DEMO MODE" / "DEMO LITE"
 **Texto solo al activar/desactivar** (como el resto)
 **Usa color del tema actual** (no naranja/azul fijos)
 **Centrado correctamente** con text_pos_

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-10-04 12:05:25 +02:00
parent 0d49a6e814
commit 9eb03b5091
2 changed files with 17 additions and 28 deletions

View File

@@ -484,13 +484,15 @@ void Engine::handleEvents() {
float interval_range = DEMO_ACTION_INTERVAL_MAX - DEMO_ACTION_INTERVAL_MIN;
demo_next_action_time_ = DEMO_ACTION_INTERVAL_MIN + (rand() % 1000) / 1000.0f * interval_range;
// Mostrar texto de activación
// Mostrar texto de activación (usa color del tema)
text_ = "DEMO MODE ON";
text_pos_ = (current_screen_width_ - static_cast<int>(text_.length() * 8)) / 2;
show_text_ = true;
text_init_time_ = SDL_GetTicks();
} else {
// Al desactivar: mostrar texto
text_ = "DEMO MODE OFF";
text_pos_ = (current_screen_width_ - static_cast<int>(text_.length() * 8)) / 2;
show_text_ = true;
text_init_time_ = SDL_GetTicks();
}
@@ -511,13 +513,15 @@ void Engine::handleEvents() {
float interval_range = DEMO_LITE_ACTION_INTERVAL_MAX - DEMO_LITE_ACTION_INTERVAL_MIN;
demo_next_action_time_ = DEMO_LITE_ACTION_INTERVAL_MIN + (rand() % 1000) / 1000.0f * interval_range;
// Mostrar texto de activación
// Mostrar texto de activación (usa color del tema)
text_ = "DEMO LITE ON";
text_pos_ = (current_screen_width_ - static_cast<int>(text_.length() * 8)) / 2;
show_text_ = true;
text_init_time_ = SDL_GetTicks();
} else {
// Al desactivar: mostrar texto
text_ = "DEMO LITE OFF";
text_pos_ = (current_screen_width_ - static_cast<int>(text_.length() * 8)) / 2;
show_text_ = true;
text_init_time_ = SDL_GetTicks();
}
@@ -662,21 +666,6 @@ void Engine::render() {
dbg_print(8, 72, mode_text.c_str(), 0, 255, 128); // Verde claro para modo
}
// Mostrar indicador "DEMO MODE" o "DEMO LITE" permanente (independiente de show_debug_)
if (demo_mode_enabled_) {
// Centrar texto horizontalmente
const char* demo_text = "DEMO MODE";
int demo_text_width = static_cast<int>(strlen(demo_text) * 8); // 8 píxeles por carácter
int demo_x = (current_screen_width_ - demo_text_width) / 2;
dbg_print(demo_x, 8, demo_text, 255, 128, 0); // Naranja brillante
} else if (demo_lite_enabled_) {
// Centrar texto horizontalmente
const char* demo_lite_text = "DEMO LITE";
int demo_lite_text_width = static_cast<int>(strlen(demo_lite_text) * 8);
int demo_lite_x = (current_screen_width_ - demo_lite_text_width) / 2;
dbg_print(demo_lite_x, 8, demo_lite_text, 128, 200, 255); // Azul claro
}
SDL_RenderPresent(renderer_);
}