clang-format

clang-tidy (macos)
This commit is contained in:
2026-03-23 07:26:21 +01:00
parent 0ddb6c85e1
commit 6595b28790
65 changed files with 583 additions and 570 deletions

View File

@@ -374,7 +374,7 @@ void Ending2::renderTexts() {
}
// Coloca los sprites en su sito
void Ending2::placeSprites() {
void Ending2::placeSprites() const {
for (int i = 0; i < static_cast<int>(sprites_.size()); ++i) {
const float X = i % 2 == 0 ? FIRST_COL : SECOND_COL;
const float Y = ((i / 1) * (sprite_max_height_ + DIST_SPRITE_TEXT + Resource::Cache::get()->getText("smb2")->getCharacterSize() + DIST_SPRITE_SPRITE)) + Options::game.height + INITIAL_Y_OFFSET;
@@ -383,7 +383,7 @@ void Ending2::placeSprites() {
const float DX = -(W / 2);
const float DY = sprite_max_height_ - H;
sprites_.at(i)->setPos({X + DX, Y + DY, W, H});
sprites_.at(i)->setPos({.x = X + DX, .y = Y + DY, .w = W, .h = H});
sprites_.at(i)->setVelY(SPRITE_DESP_SPEED);
}
@@ -395,7 +395,7 @@ void Ending2::placeSprites() {
}
// Crea los sprites con las texturas con los textos
void Ending2::createSpriteTexts() {
void Ending2::createSpriteTexts() { // NOLINT(readability-convert-member-functions-to-static)
// Crea los sprites de texto a partir de la lista
for (size_t i = 0; i < sprite_list_.size(); ++i) {
auto text = Resource::Cache::get()->getText("smb2");
@@ -404,7 +404,7 @@ void Ending2::createSpriteTexts() {
std::string txt = sprite_list_[i];
std::ranges::replace(txt, '_', ' '); // Reemplaza '_' por ' '
if (txt == "player") {
txt = Locale::get()->get("ending2.jaildoctor"); // Reemplaza "player" por nombre localizado
txt = Locale::get()->get("ending2.jaildoctor"); // NOLINT(readability-static-accessed-through-instance) Reemplaza "player" por nombre localizado
}
// Calcula las dimensiones del texto
@@ -426,7 +426,7 @@ void Ending2::createSpriteTexts() {
text->write(0, 0, txt);
// Crea el sprite
SDL_FRect pos = {X, Y, W, H};
SDL_FRect pos = {.x = X, .y = Y, .w = W, .h = H};
sprite_texts_.emplace_back(std::make_shared<SurfaceDissolveSprite>(surface, pos));
sprite_texts_.back()->setColorReplace(1, static_cast<Uint8>(PaletteColor::WHITE));
sprite_texts_.back()->setProgress(1.0F); // comença invisible
@@ -436,7 +436,7 @@ void Ending2::createSpriteTexts() {
}
// Crea los sprites con las texturas con los textos del final
void Ending2::createTexts() {
void Ending2::createTexts() { // NOLINT(readability-convert-member-functions-to-static)
// Crea los primeros textos
std::vector<std::string> list;
list.emplace_back(Locale::get()->get("ending2.starring"));
@@ -459,7 +459,7 @@ void Ending2::createTexts() {
text->write(0, 0, list[i]);
// Crea el sprite
SDL_FRect pos = {X + DX, Y, W, H};
SDL_FRect pos = {.x = X + DX, .y = Y, .w = W, .h = H};
texts_.emplace_back(std::make_shared<SurfaceDissolveSprite>(surface, pos));
texts_.back()->setProgress(1.0F); // comença invisible
texts_.back()->setVelY(SPRITE_DESP_SPEED);
@@ -489,7 +489,7 @@ void Ending2::createTexts() {
text->write(0, 0, list[i]);
// Crea el sprite
SDL_FRect pos = {X + DX, Y, W, H};
SDL_FRect pos = {.x = X + DX, .y = Y, .w = W, .h = H};
texts_.emplace_back(std::make_shared<SurfaceDissolveSprite>(surface, pos));
texts_.back()->setProgress(1.0F); // comença invisible
texts_.back()->setVelY(SPRITE_DESP_SPEED);