clang-format

This commit is contained in:
2026-03-23 08:58:31 +01:00
parent 302b86ddb4
commit 3ca744ee46
88 changed files with 7147 additions and 7090 deletions

View File

@@ -180,7 +180,7 @@ void Fade::updateCenterFade() {
void Fade::drawCenterFadeRectangles() {
auto* temp = SDL_GetRenderTarget(renderer_);
SDL_SetRenderTarget(renderer_, backbuffer_);
cleanBackbuffer(r_, g_, b_, 0); // Limpiar para modo IN
cleanBackbuffer(r_, g_, b_, 0); // Limpiar para modo IN
SDL_SetRenderDrawColor(renderer_, r_, g_, b_, 255);
SDL_RenderFillRect(renderer_, &rect1_);
@@ -223,14 +223,14 @@ void Fade::updateRandomSquare2Fade() {
squares_to_activate = total_squares;
}
for (int i = 0; i < squares_to_activate; ++i) {
if (square_age_[i] == -1) {square_age_[i] = elapsed_time;}
if (square_age_[i] == -1) { square_age_[i] = elapsed_time; }
}
} else {
squares_to_activate = total_squares;
float activation_progress = static_cast<float>(elapsed_time) / activation_time;
int squares_starting_transition = std::min(total_squares, std::max(1, static_cast<int>(activation_progress * total_squares)));
for (int i = 0; i < squares_starting_transition; ++i) {
if (square_age_[i] == -1) {square_age_[i] = elapsed_time;}
if (square_age_[i] == -1) { square_age_[i] = elapsed_time; }
}
}
@@ -331,7 +331,7 @@ void Fade::drawDiagonal() {
void Fade::drawRandomSquares(int active_count) {
auto* temp = SDL_GetRenderTarget(renderer_);
SDL_SetRenderTarget(renderer_, backbuffer_);
// El fondo se prepara en activate()
SDL_BlendMode blend_mode;
SDL_GetRenderDrawBlendMode(renderer_, &blend_mode);
@@ -410,7 +410,7 @@ void Fade::drawVenetianBlinds() {
SDL_BlendMode blend_mode;
SDL_GetRenderDrawBlendMode(renderer_, &blend_mode);
SDL_SetRenderDrawBlendMode(renderer_, SDL_BLENDMODE_NONE);
// Dibuja las persianas con el color opuesto al fondo
Uint8 draw_alpha = (mode_ == Mode::OUT) ? 255 : 0;
SDL_SetRenderDrawColor(renderer_, r_, g_, b_, draw_alpha);
@@ -434,10 +434,10 @@ void Fade::activate() {
// Preparación inicial de cada tipo
switch (type_) {
/*case Type::FULLSCREEN:
cleanBackbuffer(r_, g_, b_, (mode_ == Mode::OUT) ? 0 : 255);
SDL_SetTextureAlphaMod(backbuffer_, (mode_ == Mode::OUT) ? 255 : 0);
break;*/
/*case Type::FULLSCREEN:
cleanBackbuffer(r_, g_, b_, (mode_ == Mode::OUT) ? 0 : 255);
SDL_SetTextureAlphaMod(backbuffer_, (mode_ == Mode::OUT) ? 255 : 0);
break;*/
case Type::FULLSCREEN: {
// La textura en sí siempre debe ser de un color sólido y opaco.
@@ -515,7 +515,6 @@ void Fade::activate() {
}
}
// Establece el color del fade
void Fade::setColor(Uint8 r, Uint8 g, Uint8 b) {
r_ = r;