val! ja pinta coses en altres surfaces

This commit is contained in:
2025-03-05 19:41:55 +01:00
parent 70a50f5117
commit 5a8747cc4b
5 changed files with 15 additions and 13 deletions

View File

@@ -24,13 +24,8 @@ LoadingScreen::LoadingScreen()
color_loading_screen_sprite_(std::make_shared<SSprite>(color_loading_screen_surface_, 0, 0, color_loading_screen_surface_->getWidth(), color_loading_screen_surface_->getHeight())),
screen_surface_(std::make_shared<Surface>(Screen::get()->getRendererSurface(), options.game.width, options.game.height))
{
// Cambia el destino de las surfaces
mono_loading_screen_surface_->setSurfaceDest(screen_surface_);
color_loading_screen_surface_->setSurfaceDest(screen_surface_);
// Configura la superficie donde se van a pintar los sprites
screen_surface_->setColor(0, 0xFF000000);
screen_surface_->clear(0);
screen_surface_->clear(stringToColor("white"));
// Inicializa variables
options.section.section = Section::LOADING_SCREEN;
@@ -141,6 +136,7 @@ void LoadingScreen::updateCounter()
// Dibuja la pantalla de carga
void LoadingScreen::renderLoad()
{
Screen::get()->setRendererSurface(screen_surface_);
loading_first_part_ ? mono_loading_screen_sprite_->render(1, stringToColor("black")) : color_loading_screen_sprite_->render();
}