Implementar sistema de zoom dinámico y fullscreen

- Agregar zoom dinámico de ventana con F1/F2
- F1: reducir zoom hasta 1x mínimo
- F2: aumentar zoom hasta máximo basado en resolución
- Centrado inteligente al cambiar zoom
- Cálculo correcto de zoom máximo usando SDL_GetCurrentDisplayMode()
- F3: toggle fullscreen entre ventana y pantalla completa
- Mover temas de colores de F1-F4 a teclado numérico (KP_1-4)
- Mejorar resolución base a 640x480 con zoom inicial 2x
- Resolver paths absolutos para data/ball.png

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-09-18 18:48:12 +02:00
parent 036268f135
commit 8a05f69442
3 changed files with 145 additions and 10 deletions

View File

@@ -41,6 +41,9 @@ private:
// UI y debug
bool show_debug_ = false;
bool show_text_ = true;
// Sistema de zoom dinámico
int current_window_zoom_ = WINDOW_ZOOM;
std::string text_;
int text_pos_ = 0;
Uint64 text_init_time_ = 0;
@@ -52,6 +55,7 @@ private:
std::string fps_text_ = "FPS: 0";
bool vsync_enabled_ = true;
std::string vsync_text_ = "VSYNC ON";
bool fullscreen_enabled_ = false;
// Sistema de temas
ColorTheme current_theme_ = ColorTheme::SUNSET;
@@ -100,8 +104,15 @@ private:
void switchBallsGravity();
void changeGravityDirection(GravityDirection direction);
void toggleVSync();
void toggleFullscreen();
std::string gravityDirectionToString(GravityDirection direction) const;
// Sistema de zoom dinámico
int calculateMaxWindowZoom() const;
void setWindowZoom(int new_zoom);
void zoomIn();
void zoomOut();
// Rendering
void renderGradientBackground();
void addSpriteToBatch(float x, float y, float w, float h, int r, int g, int b);