forked from jaildesigner-jailgames/jaildoctors_dilemma
El color de fondo de la habitación se pinta en la textura del mapa
This commit is contained in:
@@ -164,8 +164,8 @@ void Demo::render()
|
|||||||
{
|
{
|
||||||
// Prepara para dibujar el frame
|
// Prepara para dibujar el frame
|
||||||
screen->start();
|
screen->start();
|
||||||
screen->clean(room->getBGColor());
|
|
||||||
|
|
||||||
|
// Dibuja los elementos del juego en orden
|
||||||
room->renderMap();
|
room->renderMap();
|
||||||
room->renderEnemies();
|
room->renderEnemies();
|
||||||
room->renderItems();
|
room->renderItems();
|
||||||
|
|||||||
@@ -256,8 +256,8 @@ void Game::render()
|
|||||||
{
|
{
|
||||||
// Prepara para dibujar el frame
|
// Prepara para dibujar el frame
|
||||||
screen->start();
|
screen->start();
|
||||||
screen->clean(room->getBGColor());
|
|
||||||
|
|
||||||
|
// Dibuja los elementos del juego en orden
|
||||||
room->renderMap();
|
room->renderMap();
|
||||||
room->renderEnemies();
|
room->renderEnemies();
|
||||||
room->renderItems();
|
room->renderItems();
|
||||||
|
|||||||
@@ -534,8 +534,9 @@ color_t Room::getBorderColor()
|
|||||||
// Crea la textura con el mapeado de la habitación
|
// Crea la textura con el mapeado de la habitación
|
||||||
void Room::fillMapTexture()
|
void Room::fillMapTexture()
|
||||||
{
|
{
|
||||||
|
const color_t color = stringToColor(options->palette, bgColor);
|
||||||
SDL_SetRenderTarget(renderer, mapTexture);
|
SDL_SetRenderTarget(renderer, mapTexture);
|
||||||
SDL_SetRenderDrawColor(renderer, 0x00, 0x00, 0x00, 0x00);
|
SDL_SetRenderDrawColor(renderer, color.r, color.g, color.b, 0xFF);
|
||||||
SDL_RenderClear(renderer);
|
SDL_RenderClear(renderer);
|
||||||
|
|
||||||
// Los tileSetFiles son de 20x20 tiles. El primer tile es el 0. Cuentan hacia la derecha y hacia abajo
|
// Los tileSetFiles son de 20x20 tiles. El primer tile es el 0. Cuentan hacia la derecha y hacia abajo
|
||||||
|
|||||||
Reference in New Issue
Block a user