forked from jaildesigner-jailgames/jaildoctors_dilemma
Imposible canviar la rendererSurface
This commit is contained in:
@@ -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};
|
||||
|
||||
Reference in New Issue
Block a user