From 0f8de0d8b53d892e82218a0ea1f0386055eaf1ce Mon Sep 17 00:00:00 2001 From: Sergio Valor Date: Fri, 21 Mar 2025 08:42:54 +0100 Subject: [PATCH] arreglos d'estil --- source/loading_screen.cpp | 4 ++-- source/screen.cpp | 10 +--------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/source/loading_screen.cpp b/source/loading_screen.cpp index 80658cf..71f1ad4 100644 --- a/source/loading_screen.cpp +++ b/source/loading_screen.cpp @@ -146,10 +146,10 @@ void LoadingScreen::renderBorder() auto border = Screen::get()->getBorderSurface(); // Pinta el borde de color azul - border->clear(stringToColor("blue")); + border->clear(static_cast(PaletteColor::BLUE)); // Añade lineas amarillas - const Uint8 COLOR = stringToColor("yellow"); + const Uint8 COLOR = static_cast(PaletteColor::YELLOW); const int WIDTH = options.game.width + (options.video.border.width * 2); const int HEIGHT = options.game.height + (options.video.border.height * 2); bool draw_enabled = rand() % 2 == 0 ? true : false; diff --git a/source/screen.cpp b/source/screen.cpp index 09880dc..cc57497 100644 --- a/source/screen.cpp +++ b/source/screen.cpp @@ -137,11 +137,7 @@ void Screen::clearRenderer(Color color) } // Prepara para empezar a dibujar en la textura de juego -void Screen::start() -{ - //SDL_SetRenderTarget(renderer_, game_texture_); - setRendererSurface(nullptr); -} +void Screen::start() { setRendererSurface(nullptr); } // Vuelca el contenido del renderizador en pantalla void Screen::render() @@ -164,9 +160,6 @@ void Screen::setVideoMode(int mode) // Actualiza las opciones options.video.mode = mode; - // Mostrar u ocultar el cursor según el modo - SDL_ShowCursor(options.video.mode == 0 ? SDL_ENABLE : SDL_DISABLE); - // Configura el modo de pantalla y ajusta la ventana SDL_SetWindowFullscreen(window_, options.video.mode); adjustWindowSize(); @@ -381,7 +374,6 @@ void Screen::processPaletteList() // Copia la surface a la textura void Screen::surfaceToTexture() { - // Si está el borde activo, vuelca gameCanvas sobre borderCanvas if (options.video.border.enabled) { border_surface_->copyToTexture(renderer_, border_texture_);