neteja final tidy/cppcheck: const*, static, renames de constants
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user