i per fi ja comença a tornar tot a la normalitat

This commit is contained in:
2025-03-05 20:52:34 +01:00
parent 5a8747cc4b
commit 241732752a
25 changed files with 75 additions and 81 deletions

View File

@@ -29,10 +29,10 @@ Credits::Credits()
Screen::get()->setBorderColor(stringToColor("black"));
// Crea la textura para el texto que se escribe en pantalla
text_surface_ = std::make_shared<Surface>(Screen::get()->getRendererSurface(), options.game.width, options.game.height);
text_surface_ = std::make_shared<Surface>(options.game.width, options.game.height);
// Crea la textura para cubrir el rexto
cover_surface_ = std::make_shared<Surface>(Screen::get()->getRendererSurface(), options.game.width, options.game.height);
cover_surface_ = std::make_shared<Surface>(options.game.width, options.game.height);
// Escribe el texto en la textura
fillTexture();
@@ -143,7 +143,7 @@ void Credits::fillTexture()
// Rellena la textura de texto
Screen::get()->setRendererSurface(text_surface_);
Screen::get()->clearSurface(stringToColor("black"));
text_surface_->clear(stringToColor("black"));
auto text = Resource::get()->getText("smb2");
@@ -168,7 +168,7 @@ void Credits::fillTexture()
// Rellena la textura que cubre el texto con color transparente
Screen::get()->setRendererSurface(text_surface_);
Screen::get()->clearSurface(stringToColor("transparent"));
text_surface_->clear(stringToColor("transparent"));
// Los primeros 8 pixels crea una malla
auto surface = Screen::get()->getRendererSurface();