linter: renombrar variables

This commit is contained in:
2025-10-24 10:33:18 +02:00
parent f50ad68f10
commit 357b5d5977
3 changed files with 13 additions and 13 deletions

View File

@@ -514,10 +514,10 @@ void Background::updateAlphaColorTexture(float delta_time) {
// 4. Actualiza el valor entero solo si ha cambiado lo suficiente
// Usamos std::round para un redondeo más natural.
const auto new_alpha = static_cast<size_t>(std::round(current_alpha_float_));
const auto NEW_ALPHA = static_cast<size_t>(std::round(current_alpha_float_));
if (new_alpha != previous_alpha_color_texture_) {
previous_alpha_color_texture_ = new_alpha;
if (NEW_ALPHA != previous_alpha_color_texture_) {
previous_alpha_color_texture_ = NEW_ALPHA;
// SDL espera un Uint8 (0-255), así que hacemos un cast seguro.
SDL_SetTextureAlphaMod(color_texture_, static_cast<Uint8>(previous_alpha_color_texture_));
}

View File

@@ -3,9 +3,9 @@
#include <SDL3/SDL.h> // Para SDL_FRect
#include <functional> // Para function
#include <list> // Para list
#include <memory> // Para shared_ptr
#include <vector> // Para vector
#include <list> // Para list
#include "bullet.hpp" // for Bullet
@@ -72,5 +72,5 @@ class BulletManager {
// --- Métodos internos ---
void processBulletUpdate(const std::shared_ptr<Bullet>& bullet, float delta_time); // Procesa actualización individual
auto isBulletOutOfBounds(const std::shared_ptr<Bullet>& bullet) const -> bool; // Verifica si la bala está fuera de límites
[[nodiscard]] auto isBulletOutOfBounds(const std::shared_ptr<Bullet>& bullet) const -> bool; // Verifica si la bala está fuera de límites
};

View File

@@ -24,22 +24,22 @@ ResourceLoader::~ResourceLoader() {
shutdown();
}
auto ResourceLoader::initialize(const std::string& packFile, bool enable_fallback) -> bool {
auto ResourceLoader::initialize(const std::string& pack_file, bool enable_fallback) -> bool {
shutdown();
fallback_to_files_ = enable_fallback;
pack_path_ = packFile;
pack_path_ = pack_file;
if (std::filesystem::exists(packFile)) {
if (std::filesystem::exists(pack_file)) {
resource_pack_ = new ResourcePack();
if (resource_pack_->loadPack(packFile)) {
std::cout << "Resource pack loaded successfully: " << packFile << '\n';
if (resource_pack_->loadPack(pack_file)) {
std::cout << "Resource pack loaded successfully: " << pack_file << '\n';
std::cout << "Resources available: " << resource_pack_->getResourceCount() << '\n';
return true;
}
delete resource_pack_;
resource_pack_ = nullptr;
std::cerr << "Failed to load resource pack: " << packFile << std::endl;
std::cerr << "Failed to load resource pack: " << pack_file << std::endl;
}
if (fallback_to_files_) {
@@ -47,7 +47,7 @@ auto ResourceLoader::initialize(const std::string& packFile, bool enable_fallbac
return true;
}
std::cerr << "Resource pack not found and fallback disabled: " << packFile << '\n';
std::cerr << "Resource pack not found and fallback disabled: " << pack_file << '\n';
return false;
}