fix: s'havien fotut els dos finals, pero ja estan corregits

This commit is contained in:
2025-03-02 13:43:23 +01:00
parent cdf0b0a694
commit 0d74a8a29f
15 changed files with 214 additions and 277 deletions

View File

@@ -663,20 +663,11 @@ void Game::initPlayer(const PlayerSpawn &spawn_point, std::shared_ptr<Room> room
void Game::createRoomNameTexture()
{
auto text = Resource::get()->getText("smb2");
room_name_texture_ = SDL_CreateTexture(Screen::get()->getRenderer(), SDL_PIXELFORMAT_RGBA8888, SDL_TEXTUREACCESS_TARGET, GAMECANVAS_WIDTH, text->getCharacterSize() * 2);
if (room_name_texture_ == nullptr)
{
if (options.console)
{
std::cout << "Error: room_name_texture_ could not be created!\nSDL Error: " << SDL_GetError() << std::endl;
}
}
// Establece el blend mode de la textura
room_name_texture_ = createTexture(Screen::get()->getRenderer(), options.game.width, text->getCharacterSize() * 2);
SDL_SetTextureBlendMode(room_name_texture_, SDL_BLENDMODE_BLEND);
// Establece el destino de la textura
room_name_rect_ = {0, PLAY_AREA_HEIGHT, GAMECANVAS_WIDTH, text->getCharacterSize() * 2};
room_name_rect_ = {0, PLAY_AREA_HEIGHT, options.game.width, text->getCharacterSize() * 2};
}
// DEMO MODE: Inicializa las variables para el modo demo