No se pq el ultim commit ha deixat 4 fitxers per commitar

This commit is contained in:
2025-03-07 12:21:21 +01:00
parent 6c3e231d51
commit ce88596d35
4 changed files with 8 additions and 14 deletions

View File

@@ -92,10 +92,12 @@ Screen::Screen(SDL_Window *window, SDL_Renderer *renderer)
// Crea la surface donde se dibujan los graficos del juego
game_surface_ = std::make_shared<Surface>(options.game.width, options.game.height);
game_surface_->setPalette(readPalFile(palettes_.at(current_palette_)));
game_surface_->clear(static_cast<Uint8>(PaletteColor::BLACK));
// Crea la surface donde se dibujan los graficos del juego
// Crea la surface para el borde de colores
border_surface_ = std::make_shared<Surface>(options.game.width + options.video.border.width * 2, options.game.height + options.video.border.height * 2);
border_surface_->setPalette(readPalFile(palettes_.at(current_palette_)));
border_surface_->clear(border_color_);
// Establece la surface que actuará como renderer para recibir las llamadas a render()
renderer_surface_ = std::make_shared<std::shared_ptr<Surface>>(game_surface_);
@@ -127,10 +129,7 @@ void Screen::clear(Color color)
}
// Limpia la pantalla
void Screen::clearSurface(Uint8 index)
{
game_surface_->clear(index);
}
void Screen::clearSurface(Uint8 index) { game_surface_->clear(index); }
// Prepara para empezar a dibujar en la textura de juego
void Screen::start()