Corregido bug en los colores del texto del marcador
This commit is contained in:
@@ -24,10 +24,10 @@ Game::Game(SDL_Renderer *renderer, Screen *screen, Asset *asset, Input *input, D
|
||||
// currentRoom = "06.room";
|
||||
// spawnPoint = {14 * 8, 9 * 8, 0, 0, 0, s_standing, SDL_FLIP_HORIZONTAL};
|
||||
|
||||
currentRoom = "55.room";
|
||||
const int x = 30;
|
||||
const int y = 13;
|
||||
spawnPoint = {x * 8, y * 8, 0, 0, 0, s_standing, SDL_FLIP_HORIZONTAL};
|
||||
currentRoom = "55.room";
|
||||
const int x = 30;
|
||||
const int y = 13;
|
||||
spawnPoint = {x * 8, y * 8, 0, 0, 0, s_standing, SDL_FLIP_HORIZONTAL};
|
||||
// ****
|
||||
|
||||
// Crea los objetos
|
||||
@@ -48,7 +48,8 @@ Game::Game(SDL_Renderer *renderer, Screen *screen, Asset *asset, Input *input, D
|
||||
board.lives = 9;
|
||||
board.items = 0;
|
||||
board.rooms = 1;
|
||||
board.color = room->getBorderColor();
|
||||
const color_t c = room->getBorderColor();
|
||||
board.color = (c.r + c.g + c.b == 0) ? stringToColor("white") : c; // Si el color es negro lo cambia a blanco
|
||||
roomTracker->addRoom(currentRoom);
|
||||
paused = false;
|
||||
blackScreen = false;
|
||||
@@ -316,8 +317,8 @@ bool Game::changeRoom(std::string file)
|
||||
room = new Room(asset->get(file), renderer, screen, asset, itemTracker, &board.items, debug);
|
||||
|
||||
// Actualiza el marcador
|
||||
const color_t c = room->getBorderColor(); // Pon el color del marcador
|
||||
board.color = (c.r + c.g + c.b == 0) ? stringToColor("white") : c; // Si el color es negrom cambialo a blanco
|
||||
const color_t c = room->getBorderColor(); // Pone el color del marcador
|
||||
board.color = (c.r + c.g + c.b == 0) ? stringToColor("white") : c; // Si el color es negro lo cambia a blanco
|
||||
if (roomTracker->addRoom(file))
|
||||
{ // Incrementa el contador de habitaciones visitadas
|
||||
board.rooms++;
|
||||
@@ -390,7 +391,7 @@ void Game::killPlayer()
|
||||
return;
|
||||
}
|
||||
|
||||
//board.lives--;
|
||||
// board.lives--;
|
||||
|
||||
// Destruye la habitacion y el jugador
|
||||
delete room;
|
||||
|
||||
Reference in New Issue
Block a user