clang-tidy readability
This commit is contained in:
@@ -34,7 +34,7 @@ HiScoreTable::HiScoreTable()
|
||||
background_(std::make_unique<Background>()),
|
||||
|
||||
ticks_(0),
|
||||
view_area_(SDL_FRect{0, 0, static_cast<float>(param.game.width), static_cast<float>(param.game.height)}),
|
||||
view_area_(SDL_FRect{0, 0, param.game.width, param.game.height}),
|
||||
fade_mode_(FadeMode::IN),
|
||||
background_fade_color_(Color(0, 0, 0)) {
|
||||
// Inicializa el resto
|
||||
@@ -83,7 +83,7 @@ void HiScoreTable::update() {
|
||||
// Dibuja los sprites en la textura
|
||||
void HiScoreTable::fillTexture() {
|
||||
// Pinta en el backbuffer el texto y los sprites
|
||||
auto temp = SDL_GetRenderTarget(renderer_);
|
||||
auto *temp = SDL_GetRenderTarget(renderer_);
|
||||
SDL_SetRenderTarget(renderer_, backbuffer_);
|
||||
SDL_SetRenderDrawColor(renderer_, 0, 0, 0, 0);
|
||||
SDL_RenderClear(renderer_);
|
||||
@@ -112,7 +112,7 @@ void HiScoreTable::render() {
|
||||
background_->render();
|
||||
|
||||
// Establece la ventana del backbuffer
|
||||
view_area_.y = std::max(0.0f, param.game.height - counter_ + 100);
|
||||
view_area_.y = std::max(0.0F, param.game.height - counter_ + 100);
|
||||
|
||||
// Copia el backbuffer al renderizador
|
||||
SDL_RenderTexture(renderer_, backbuffer_, nullptr, &view_area_);
|
||||
@@ -218,7 +218,7 @@ void HiScoreTable::createSprites() {
|
||||
const auto TABLE_POSITION = format(i + 1) + ". ";
|
||||
const auto SCORE = format(Options::settings.hi_score_table.at(i).score);
|
||||
const auto NUM_DOTS = ENTRY_LENGHT - Options::settings.hi_score_table.at(i).name.size() - SCORE.size();
|
||||
const auto ONE_CC = Options::settings.hi_score_table.at(i).one_credit_complete ? " }" : "";
|
||||
const auto *const ONE_CC = Options::settings.hi_score_table.at(i).one_credit_complete ? " }" : "";
|
||||
std::string dots;
|
||||
for (int j = 0; j < (int)NUM_DOTS; ++j) {
|
||||
dots = dots + ".";
|
||||
@@ -301,16 +301,16 @@ void HiScoreTable::initFade() {
|
||||
// Inicializa el fondo
|
||||
void HiScoreTable::initBackground() {
|
||||
background_->setPos(param.game.game_area.rect);
|
||||
background_->setCloudsSpeed(-0.1f);
|
||||
background_->setCloudsSpeed(-0.1F);
|
||||
|
||||
const int LUCKY = rand() % 3;
|
||||
switch (LUCKY) {
|
||||
case 0: // Fondo verde
|
||||
{
|
||||
background_->setGradientNumber(2);
|
||||
background_->setTransition(0.0f);
|
||||
background_->setSunProgression(1.0f);
|
||||
background_->setMoonProgression(0.0f);
|
||||
background_->setTransition(0.0F);
|
||||
background_->setSunProgression(1.0F);
|
||||
background_->setMoonProgression(0.0F);
|
||||
background_fade_color_ = GREEN_SKY_COLOR;
|
||||
break;
|
||||
}
|
||||
@@ -318,9 +318,9 @@ void HiScoreTable::initBackground() {
|
||||
case 1: // Fondo naranja
|
||||
{
|
||||
background_->setGradientNumber(1);
|
||||
background_->setTransition(0.0f);
|
||||
background_->setSunProgression(0.65f);
|
||||
background_->setMoonProgression(0.0f);
|
||||
background_->setTransition(0.0F);
|
||||
background_->setSunProgression(0.65F);
|
||||
background_->setMoonProgression(0.0F);
|
||||
background_fade_color_ = PINK_SKY_COLOR;
|
||||
break;
|
||||
}
|
||||
@@ -328,9 +328,9 @@ void HiScoreTable::initBackground() {
|
||||
case 2: // Fondo azul
|
||||
{
|
||||
background_->setGradientNumber(0);
|
||||
background_->setTransition(0.0f);
|
||||
background_->setSunProgression(0.0f);
|
||||
background_->setMoonProgression(0.0f);
|
||||
background_->setTransition(0.0F);
|
||||
background_->setSunProgression(0.0F);
|
||||
background_->setMoonProgression(0.0F);
|
||||
background_fade_color_ = BLUE_SKY_COLOR;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user