neteja final tidy/cppcheck: const*, static, renames de constants

This commit is contained in:
2026-05-16 19:40:33 +02:00
parent 37cb3c782a
commit 479d9d941a
14 changed files with 272 additions and 337 deletions
+3 -5
View File
@@ -10,8 +10,6 @@
#include "core/input/input.h" // for Input, REPEAT_FALSE, InputAction
#include "core/rendering/screen.h" // for Screen
#include "core/rendering/sprite.h" // for Sprite
#include "core/rendering/texture.h" // for Texture
#include "core/resources/asset.h" // for Asset
#include "core/resources/resource.h"
#include "game/defaults.hpp" // for bgColor, SECTION_PROG_LOGO, SECTION_PROG...
#include "utils/utils.h" // for Section, Color
@@ -76,9 +74,9 @@ void Logo::checkInput() {
void Logo::renderFade() {
// Dibuja el fade
if (counter_ >= INIT_FADE) {
const float step = (float)(counter_ - INIT_FADE) / (float)(END_LOGO - INIT_FADE);
const int alpha = std::min((int)(255 * step), 255);
SDL_SetRenderDrawColor(renderer_, bgColor.r, bgColor.g, bgColor.b, alpha);
const float STEP = (float)(counter_ - INIT_FADE) / (float)(END_LOGO - INIT_FADE);
const int ALPHA = std::min((int)(255 * STEP), 255);
SDL_SetRenderDrawColor(renderer_, BG_COLOR.r, BG_COLOR.g, BG_COLOR.b, ALPHA);
SDL_RenderFillRect(renderer_, nullptr);
}
}