forked from jaildesigner-jailgames/jaildoctors_dilemma
Arreglado el color del marcador
This commit is contained in:
@@ -297,7 +297,11 @@ void Game::renderRoomName()
|
|||||||
bool Game::changeRoom(std::string file)
|
bool Game::changeRoom(std::string file)
|
||||||
{
|
{
|
||||||
// En las habitaciones los limites tienen la cadena del fichero o un 0 en caso de no limitar con nada
|
// En las habitaciones los limites tienen la cadena del fichero o un 0 en caso de no limitar con nada
|
||||||
if (file != "0")
|
if (file == "0")
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// Verifica que exista el fichero que se va a cargar
|
// Verifica que exista el fichero que se va a cargar
|
||||||
if (asset->get(file) != "")
|
if (asset->get(file) != "")
|
||||||
{
|
{
|
||||||
@@ -309,8 +313,10 @@ bool Game::changeRoom(std::string file)
|
|||||||
room = new Room(resource->getRoom(file), renderer, screen, asset, options, itemTracker, &board.items, debug);
|
room = new Room(resource->getRoom(file), renderer, screen, asset, options, itemTracker, &board.items, debug);
|
||||||
|
|
||||||
// Actualiza el marcador
|
// Actualiza el marcador
|
||||||
const color_t c = room->getBorderColor(); // Pone el color del marcador
|
const color_t c = room->getBorderColor(); // Obtiene el color del vorde
|
||||||
board.color = (c.r + c.g + c.b == 0) ? stringToColor(options->palette, "white") : c; // Si el color es negro lo cambia a blanco
|
const color_t cBlack = stringToColor(options->palette, "black");
|
||||||
|
board.color = (c.r == cBlack.r && c.g == cBlack.g && c.b == cBlack.b) ? stringToColor(options->palette, "white") : c; // Si el color es negro lo cambia a blanco
|
||||||
|
// board.color = (c.r + c.g + c.b == 0) ? stringToColor(options->palette, "white") : c; // Si el color es negro lo cambia a blanco
|
||||||
if (roomTracker->addRoom(file))
|
if (roomTracker->addRoom(file))
|
||||||
{ // Incrementa el contador de habitaciones visitadas
|
{ // Incrementa el contador de habitaciones visitadas
|
||||||
board.rooms++;
|
board.rooms++;
|
||||||
|
|||||||
Reference in New Issue
Block a user