eliminat soport de borde en les habitacions
This commit is contained in:
@@ -362,7 +362,6 @@ void Game::updateBlackScreen(float delta_time) {
|
||||
// Despausar al salir
|
||||
player_->setPaused(false);
|
||||
room_->setPaused(false);
|
||||
Screen::get()->setBorderColor(room_->getBorderColor());
|
||||
transitionToState(State::PLAYING);
|
||||
}
|
||||
}
|
||||
@@ -542,9 +541,7 @@ void Game::renderPlaying() {
|
||||
// Renderiza el juego en estado BLACK_SCREEN (pantalla negra)
|
||||
void Game::renderBlackScreen() {
|
||||
Screen::get()->start();
|
||||
auto const COLOR = 0;
|
||||
Screen::get()->clearSurface(COLOR);
|
||||
Screen::get()->setBorderColor(COLOR);
|
||||
Screen::get()->clearSurface(0);
|
||||
Screen::get()->render();
|
||||
}
|
||||
|
||||
@@ -768,8 +765,6 @@ auto Game::changeRoom(const std::string& room_path) -> bool {
|
||||
room_ = std::make_shared<Room>(room_path, scoreboard_data_);
|
||||
|
||||
// Pone el color del marcador en función del color del borde de la habitación
|
||||
setScoreBoardColor();
|
||||
|
||||
if (room_tracker_->addRoom(room_path)) {
|
||||
// Incrementa el contador de habitaciones visitadas
|
||||
scoreboard_data_->rooms++;
|
||||
@@ -907,18 +902,6 @@ void Game::killPlayer() {
|
||||
transitionToState(State::BLACK_SCREEN);
|
||||
}
|
||||
|
||||
// Pone el color del marcador en función del color del borde de la habitación
|
||||
void Game::setScoreBoardColor() { // NOLINT(readability-convert-member-functions-to-static)
|
||||
// Obtiene el color del borde
|
||||
const Uint8 BORDER_COLOR = room_->getBorderColor();
|
||||
|
||||
const bool IS_BLACK = BORDER_COLOR == 0;
|
||||
const bool IS_BRIGHT_BLACK = BORDER_COLOR == 1;
|
||||
|
||||
// Si el color del borde es negro o negro brillante cambia el texto del marcador a blanco
|
||||
scoreboard_data_->color = IS_BLACK || IS_BRIGHT_BLACK ? 14 : BORDER_COLOR;
|
||||
}
|
||||
|
||||
// Pone el juego en pausa
|
||||
void Game::togglePause() {
|
||||
paused_ = !paused_;
|
||||
|
||||
@@ -74,7 +74,6 @@ class Game {
|
||||
void checkPlayerAndItems(); // Comprueba las colisiones del jugador con los objetos
|
||||
void checkIfPlayerIsAlive(); // Comprueba si el jugador esta vivo
|
||||
void killPlayer(); // Mata al jugador
|
||||
void setScoreBoardColor(); // Pone el color del marcador en función del color del borde de la habitación
|
||||
void togglePause(); // Pone el juego en pausa
|
||||
void initPlayer(const Player::SpawnData& spawn_point, std::shared_ptr<Room> room); // Inicializa al jugador
|
||||
void endTransition(); // Finaliza la transición entre pantallas
|
||||
|
||||
Reference in New Issue
Block a user