forked from jaildesigner-jailgames/jaildoctors_dilemma
Corregido bug en el calculo del color del marcador
This commit is contained in:
@@ -8,7 +8,7 @@ roomDown=0
|
|||||||
roomLeft=14.room
|
roomLeft=14.room
|
||||||
roomRight=46.room
|
roomRight=46.room
|
||||||
itemColor1=yellow
|
itemColor1=yellow
|
||||||
itemColor2=cyan
|
itemColor2=green
|
||||||
|
|
||||||
[enemy]
|
[enemy]
|
||||||
tileSetFile=chip.png
|
tileSetFile=chip.png
|
||||||
@@ -62,7 +62,7 @@ color=magenta
|
|||||||
tileSetFile=items.png
|
tileSetFile=items.png
|
||||||
tile=54
|
tile=54
|
||||||
x=17
|
x=17
|
||||||
y=1
|
y=2
|
||||||
[/item]
|
[/item]
|
||||||
|
|
||||||
[item]
|
[item]
|
||||||
|
|||||||
@@ -6,12 +6,12 @@
|
|||||||
30,30,30,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
30,30,30,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||||
30,30,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
30,30,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||||
30,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
30,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||||
|
30,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||||
30,0,0,0,0,0,0,0,0,0,0,323,323,0,0,0,0,323,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
30,0,0,0,0,0,0,0,0,0,0,323,323,0,0,0,0,323,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||||
30,0,0,0,0,0,0,0,323,323,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
30,0,0,0,0,0,0,0,323,323,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||||
30,0,0,0,0,323,323,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
30,0,0,0,0,323,323,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||||
30,0,323,323,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
||||||
30,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
30,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||||
0,0,323,323,0,323,323,323,323,323,0,323,323,323,323,323,0,323,323,323,323,0,395,0,0,0,395,395,395,395,395,395,
|
0,0,0,0,0,323,323,323,323,323,0,323,323,323,323,323,0,323,323,323,323,0,395,0,0,0,395,395,395,395,395,395,
|
||||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,395,0,0,0,0,0,0,0,0,0,
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,395,0,0,0,0,0,0,0,0,0,
|
||||||
30,30,30,0,0,0,395,395,395,0,0,0,395,395,0,0,0,0,395,395,395,0,0,0,0,0,0,0,0,0,0,0,
|
30,30,30,0,0,0,395,395,395,0,0,0,395,395,0,0,0,0,395,395,395,0,0,0,0,0,0,0,0,0,0,0,
|
||||||
|
|||||||
@@ -500,15 +500,13 @@ void Game::renderBlackScreen()
|
|||||||
void Game::setScoreBoardColor()
|
void Game::setScoreBoardColor()
|
||||||
{
|
{
|
||||||
// Obtiene el color del borde
|
// Obtiene el color del borde
|
||||||
const color_t c = room->getBorderColor();
|
const color_t colorBorder = room->getBorderColor();
|
||||||
|
|
||||||
// Si el color es negro lo cambia a blanco
|
const bool isBlack = colorAreEqual(colorBorder, stringToColor(options->palette, "black"));
|
||||||
const color_t cBlack = stringToColor(options->palette, "black");
|
const bool isBrightBlack = colorAreEqual(colorBorder, stringToColor(options->palette, "bright_black"));
|
||||||
board.color = colorAreEqual(c, cBlack) ? stringToColor(options->palette, "white") : c;
|
|
||||||
|
|
||||||
// Si el color es negro brillante lo cambia a blanco
|
// Si el color del borde es negro o negro brillante cambia el texto del marcador a blanco
|
||||||
const color_t cBrightBlack = stringToColor(options->palette, "bright_black");
|
board.color = isBlack || isBrightBlack? stringToColor(options->palette, "white") : colorBorder;
|
||||||
board.color = colorAreEqual(c, cBrightBlack) ? stringToColor(options->palette, "white") : c;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Comprueba si ha finalizado el juego
|
// Comprueba si ha finalizado el juego
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ void ScoreBoard::render()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Escribe los textos
|
// Escribe los textos
|
||||||
const std::string timeTxt = std::to_string((clock.minutes % 60) / 10) + std::to_string(clock.minutes % 10) + clock.separator + std::to_string((clock.seconds % 60) / 10) + std::to_string(clock.seconds % 10);
|
const std::string timeTxt = std::to_string((clock.minutes % 100) / 10) + std::to_string(clock.minutes % 10) + clock.separator + std::to_string((clock.seconds % 60) / 10) + std::to_string(clock.seconds % 10);
|
||||||
const std::string itemsTxt = std::to_string(board->items / 100) + std::to_string((board->items % 100) / 10) + std::to_string(board->items % 10);
|
const std::string itemsTxt = std::to_string(board->items / 100) + std::to_string((board->items % 100) / 10) + std::to_string(board->items % 10);
|
||||||
this->text->writeColored(BLOCK, line1, "Items collected ", board->color);
|
this->text->writeColored(BLOCK, line1, "Items collected ", board->color);
|
||||||
this->text->writeColored(17 * BLOCK, line1, itemsTxt, itemsColor);
|
this->text->writeColored(17 * BLOCK, line1, itemsTxt, itemsColor);
|
||||||
|
|||||||
Reference in New Issue
Block a user