jugant amb clang-tidy
This commit is contained in:
@@ -257,7 +257,7 @@ void Credits::fillCanvas() {
|
||||
|
||||
// Dibuja el rectangulo rojo
|
||||
// SDL_SetRenderDrawColor(Screen::get()->getRenderer(), 0xFF, 0, 0, 0xFF);
|
||||
const Color color = color_.lighten();
|
||||
const Color color = color_.LIGHTEN();
|
||||
SDL_SetRenderDrawColor(Screen::get()->getRenderer(), color.r, color.g, color.b, 0xFF);
|
||||
SDL_RenderRect(Screen::get()->getRenderer(), &red_rect);
|
||||
|
||||
|
||||
@@ -260,7 +260,7 @@ void Game::updateStage() {
|
||||
|
||||
// Modifica el color de fondo al llegar a la Fase 10
|
||||
if (Stage::number == 9) {
|
||||
background_->setColor(Color(0xdd, 0x19, 0x1d).darken());
|
||||
background_->setColor(Color(0xdd, 0x19, 0x1d).DARKEN());
|
||||
background_->setAlpha(96);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -206,7 +206,7 @@ void HiScoreTable::createSprites() {
|
||||
const int first_line = (param.game.height - size) / 2;
|
||||
|
||||
// Crea el sprite para el texto de cabecera
|
||||
header_ = std::make_unique<Sprite>(header_text->writeDXToTexture(TEXT_COLOR, Lang::getText("[HIGHSCORE_TABLE] CAPTION"), -2, background_fade_color_.inverse().lighten(25)));
|
||||
header_ = std::make_unique<Sprite>(header_text->writeDXToTexture(TEXT_COLOR, Lang::getText("[HIGHSCORE_TABLE] CAPTION"), -2, background_fade_color_.INVERSE().LIGHTEN(25)));
|
||||
header_->setPosition(param.game.game_area.center_x - (header_->getWidth() / 2), first_line);
|
||||
|
||||
// Crea los sprites para las entradas en la tabla de puntuaciones
|
||||
@@ -358,10 +358,10 @@ Color HiScoreTable::getEntryColor(int counter_) {
|
||||
// Inicializa los colores de las entradas
|
||||
void HiScoreTable::iniEntryColors() {
|
||||
entry_colors_.clear();
|
||||
entry_colors_.emplace_back(background_fade_color_.inverse().lighten(75));
|
||||
entry_colors_.emplace_back(background_fade_color_.inverse().lighten(50));
|
||||
entry_colors_.emplace_back(background_fade_color_.inverse().lighten(25));
|
||||
entry_colors_.emplace_back(background_fade_color_.inverse());
|
||||
entry_colors_.emplace_back(background_fade_color_.INVERSE().LIGHTEN(75));
|
||||
entry_colors_.emplace_back(background_fade_color_.INVERSE().LIGHTEN(50));
|
||||
entry_colors_.emplace_back(background_fade_color_.INVERSE().LIGHTEN(25));
|
||||
entry_colors_.emplace_back(background_fade_color_.INVERSE());
|
||||
}
|
||||
|
||||
// Hace brillar los nombres de la tabla de records
|
||||
@@ -379,7 +379,7 @@ void HiScoreTable::updateCounter() {
|
||||
++counter_;
|
||||
|
||||
if (counter_ == 150) {
|
||||
background_->setColor(background_fade_color_.darken());
|
||||
background_->setColor(background_fade_color_.DARKEN());
|
||||
background_->setAlpha(96);
|
||||
}
|
||||
|
||||
|
||||
@@ -542,15 +542,15 @@ void Intro::updatePostState() {
|
||||
if (ELAPSED_TIME >= 1000) {
|
||||
tiled_bg_->stopGracefully();
|
||||
|
||||
if (!bg_color_.isEqualTo(param.title.bg_color)) {
|
||||
bg_color_ = bg_color_.approachTo(param.title.bg_color, 1);
|
||||
if (!bg_color_.IS_EQUAL_TO(param.title.bg_color)) {
|
||||
bg_color_ = bg_color_.APPROACH_TO(param.title.bg_color, 1);
|
||||
}
|
||||
|
||||
tiled_bg_->setColor(bg_color_);
|
||||
}
|
||||
|
||||
// Cambia de estado si el fondo se ha detenido y recuperado el color
|
||||
if (tiled_bg_->isStopped() && bg_color_.isEqualTo(param.title.bg_color)) {
|
||||
if (tiled_bg_->isStopped() && bg_color_.IS_EQUAL_TO(param.title.bg_color)) {
|
||||
post_state_ = IntroPostState::END;
|
||||
state_start_time_ = SDL_GetTicks();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user