el indicador de trucos ja no es el color del jugador sino que es veu al marcador

This commit is contained in:
2026-04-01 22:12:52 +02:00
parent b37b62ef1e
commit 950eeffb07
14 changed files with 86 additions and 65 deletions

View File

@@ -620,21 +620,16 @@ auto Player::handleKillingTiles() -> bool {
return false; // No se encontró ninguna colisión
}
// Establece el color del jugador (0 = automático según cheats/options)
// Establece el color del jugador (0 = automático según options)
void Player::setColor(Uint8 color) {
if (color != 0) {
color_ = color;
return;
}
// Color personalizado desde opciones (prioridad sobre cheats)
// Color personalizado desde opciones
if (Options::game.player_color >= 0) {
color_ = static_cast<Uint8>(Options::game.player_color);
} else if (Options::cheats.invincible == Options::Cheat::State::ENABLED) {
// Color automático según cheats
color_ = static_cast<Uint8>(PaletteColor::CYAN);
} else if (Options::cheats.infinite_lives == Options::Cheat::State::ENABLED) {
color_ = static_cast<Uint8>(PaletteColor::YELLOW);
} else {
color_ = static_cast<Uint8>(PaletteColor::WHITE);
}
@@ -642,8 +637,8 @@ void Player::setColor(Uint8 color) {
// Si el color coincide con el fondo de la habitación, usar fallback
if (room_ != nullptr && color_ == room_->getBGColor()) {
color_ = (room_->getBGColor() != static_cast<Uint8>(PaletteColor::WHITE))
? static_cast<Uint8>(PaletteColor::WHITE)
: static_cast<Uint8>(PaletteColor::BRIGHT_BLACK);
? static_cast<Uint8>(PaletteColor::WHITE)
: static_cast<Uint8>(PaletteColor::BRIGHT_BLACK);
}
}