Imposible canviar la rendererSurface

This commit is contained in:
2025-03-05 18:51:36 +01:00
parent d41b0cb31c
commit 70a50f5117
16 changed files with 199 additions and 257 deletions

View File

@@ -562,7 +562,7 @@ void Game::initStats()
void Game::fillRoomNameTexture()
{
// Pone la textura como destino de renderizado
Screen::get()->setRenderSurfaceData(room_name_surface_);
Screen::get()->setRendererSurface(room_name_surface_);
// Rellena la textura de color
Screen::get()->clearSurface(stringToColor("white"));
@@ -572,7 +572,7 @@ void Game::fillRoomNameTexture()
text->writeDX(TEXT_CENTER | TEXT_COLOR, GAMECANVAS_CENTER_X, text->getCharacterSize() / 2, room_->getName(), 1, room_->getBGColor());
// Deja el renderizador por defecto
Screen::get()->setRenderSurfaceData(nullptr);
Screen::get()->setRendererSurface(nullptr);
}
// Comprueba algunos logros
@@ -662,7 +662,7 @@ void Game::initPlayer(const PlayerSpawn &spawn_point, std::shared_ptr<Room> room
void Game::createRoomNameTexture()
{
auto text = Resource::get()->getText("smb2");
room_name_surface_ = std::make_shared<Surface>(Screen::get()->getRenderSurfaceData(), options.game.width, text->getCharacterSize() * 2);
room_name_surface_ = std::make_shared<Surface>(Screen::get()->getRendererSurface(), options.game.width, text->getCharacterSize() * 2);
// Establece el destino de la textura
room_name_rect_ = {0, PLAY_AREA_HEIGHT, options.game.width, text->getCharacterSize() * 2};