diff --git a/source/demo.cpp b/source/demo.cpp index ac3a820..33c35af 100644 --- a/source/demo.cpp +++ b/source/demo.cpp @@ -164,8 +164,8 @@ void Demo::render() { // Prepara para dibujar el frame screen->start(); - screen->clean(room->getBGColor()); + // Dibuja los elementos del juego en orden room->renderMap(); room->renderEnemies(); room->renderItems(); diff --git a/source/game.cpp b/source/game.cpp index 8b145f9..e32e844 100644 --- a/source/game.cpp +++ b/source/game.cpp @@ -256,8 +256,8 @@ void Game::render() { // Prepara para dibujar el frame screen->start(); - screen->clean(room->getBGColor()); + // Dibuja los elementos del juego en orden room->renderMap(); room->renderEnemies(); room->renderItems(); diff --git a/source/room.cpp b/source/room.cpp index c1349a8..980eaad 100644 --- a/source/room.cpp +++ b/source/room.cpp @@ -534,8 +534,9 @@ color_t Room::getBorderColor() // Crea la textura con el mapeado de la habitación void Room::fillMapTexture() { + const color_t color = stringToColor(options->palette, bgColor); SDL_SetRenderTarget(renderer, mapTexture); - SDL_SetRenderDrawColor(renderer, 0x00, 0x00, 0x00, 0x00); + SDL_SetRenderDrawColor(renderer, color.r, color.g, color.b, 0xFF); SDL_RenderClear(renderer); // Los tileSetFiles son de 20x20 tiles. El primer tile es el 0. Cuentan hacia la derecha y hacia abajo