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

@@ -415,7 +415,7 @@ Room::Room(const std::string &room_path, std::shared_ptr<ScoreboardData> data)
setAnimatedTiles();
// Crea la textura para el mapa de tiles de la habitación
map_surface_ = std::make_shared<Surface>(Screen::get()->getRendererSurface(), PLAY_AREA_WIDTH, PLAY_AREA_HEIGHT);
map_surface_ = std::make_shared<Surface>(PLAY_AREA_WIDTH, PLAY_AREA_HEIGHT);
// Pinta el mapa de la habitación en la textura
fillMapTexture();
@@ -475,7 +475,7 @@ void Room::fillMapTexture()
{
const Uint8 color = stringToColor(bg_color_);
Screen::get()->setRendererSurface(map_surface_);
Screen::get()->clearSurface(color);
map_surface_->clear(color);
// Los tileSetFiles son de 20x20 tiles. El primer tile es el 0. Cuentan hacia la derecha y hacia abajo