arreglos d'estil

This commit is contained in:
2025-03-21 08:42:54 +01:00
parent 2ee2d5c45d
commit 0f8de0d8b5
2 changed files with 3 additions and 11 deletions

View File

@@ -146,10 +146,10 @@ void LoadingScreen::renderBorder()
auto border = Screen::get()->getBorderSurface(); auto border = Screen::get()->getBorderSurface();
// Pinta el borde de color azul // Pinta el borde de color azul
border->clear(stringToColor("blue")); border->clear(static_cast<Uint8>(PaletteColor::BLUE));
// Añade lineas amarillas // Añade lineas amarillas
const Uint8 COLOR = stringToColor("yellow"); const Uint8 COLOR = static_cast<Uint8>(PaletteColor::YELLOW);
const int WIDTH = options.game.width + (options.video.border.width * 2); const int WIDTH = options.game.width + (options.video.border.width * 2);
const int HEIGHT = options.game.height + (options.video.border.height * 2); const int HEIGHT = options.game.height + (options.video.border.height * 2);
bool draw_enabled = rand() % 2 == 0 ? true : false; bool draw_enabled = rand() % 2 == 0 ? true : false;

View File

@@ -137,11 +137,7 @@ void Screen::clearRenderer(Color color)
} }
// Prepara para empezar a dibujar en la textura de juego // Prepara para empezar a dibujar en la textura de juego
void Screen::start() void Screen::start() { setRendererSurface(nullptr); }
{
//SDL_SetRenderTarget(renderer_, game_texture_);
setRendererSurface(nullptr);
}
// Vuelca el contenido del renderizador en pantalla // Vuelca el contenido del renderizador en pantalla
void Screen::render() void Screen::render()
@@ -164,9 +160,6 @@ void Screen::setVideoMode(int mode)
// Actualiza las opciones // Actualiza las opciones
options.video.mode = mode; 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 // Configura el modo de pantalla y ajusta la ventana
SDL_SetWindowFullscreen(window_, options.video.mode); SDL_SetWindowFullscreen(window_, options.video.mode);
adjustWindowSize(); adjustWindowSize();
@@ -381,7 +374,6 @@ void Screen::processPaletteList()
// Copia la surface a la textura // Copia la surface a la textura
void Screen::surfaceToTexture() void Screen::surfaceToTexture()
{ {
// Si está el borde activo, vuelca gameCanvas sobre borderCanvas
if (options.video.border.enabled) if (options.video.border.enabled)
{ {
border_surface_->copyToTexture(renderer_, border_texture_); border_surface_->copyToTexture(renderer_, border_texture_);