style: aplicar readability-uppercase-literal-suffix

- Cambiar todos los literales float de minúscula a mayúscula (1.0f → 1.0F)
- 657 correcciones aplicadas automáticamente con clang-tidy
- Check 1/N completado

🤖 Generated with Claude Code
This commit is contained in:
2025-12-18 13:06:48 +01:00
parent 44cd0857e0
commit bc94eff176
41 changed files with 705 additions and 594 deletions

View File

@@ -15,11 +15,11 @@
Bala::Bala(SDL_Renderer* renderer)
: renderer_(renderer),
centre_({0.0f, 0.0f}),
angle_(0.0f),
velocitat_(0.0f),
centre_({0.0F, 0.0F}),
angle_(0.0F),
velocitat_(0.0F),
esta_(false),
grace_timer_(0.0f),
grace_timer_(0.0F),
brightness_(Defaults::Brightness::BALA) {
// [NUEVO] Carregar forma compartida des de fitxer
forma_ = Graphics::ShapeLoader::load("bullet.shp");
@@ -32,10 +32,10 @@ Bala::Bala(SDL_Renderer* renderer)
void Bala::inicialitzar() {
// Inicialment inactiva
esta_ = false;
centre_ = {0.0f, 0.0f};
angle_ = 0.0f;
velocitat_ = 0.0f;
grace_timer_ = 0.0f;
centre_ = {0.0F, 0.0F};
angle_ = 0.0F;
velocitat_ = 0.0F;
grace_timer_ = 0.0F;
}
void Bala::disparar(const Punt& posicio, float angle, uint8_t owner_id) {
@@ -57,7 +57,7 @@ void Bala::disparar(const Punt& posicio, float angle, uint8_t owner_id) {
// Velocitat alta (el joc Pascal original usava 7 px/frame)
// 7 px/frame × 20 FPS = 140 px/s
velocitat_ = 140.0f;
velocitat_ = 140.0F;
// Activar grace period (prevents instant self-collision)
grace_timer_ = Defaults::Game::BULLET_GRACE_PERIOD;
@@ -69,10 +69,10 @@ void Bala::disparar(const Punt& posicio, float angle, uint8_t owner_id) {
void Bala::actualitzar(float delta_time) {
if (esta_) {
// Decrementar grace timer
if (grace_timer_ > 0.0f) {
if (grace_timer_ > 0.0F) {
grace_timer_ -= delta_time;
if (grace_timer_ < 0.0f) {
grace_timer_ = 0.0f;
if (grace_timer_ < 0.0F) {
grace_timer_ = 0.0F;
}
}
@@ -84,7 +84,7 @@ void Bala::dibuixar() const {
if (esta_ && forma_) {
// [NUEVO] Usar render_shape en lloc de rota_pol
// Les bales roten segons l'angle de trajectòria
Rendering::render_shape(renderer_, forma_, centre_, angle_, 1.0f, true, 1.0f, brightness_);
Rendering::render_shape(renderer_, forma_, centre_, angle_, 1.0F, true, 1.0F, brightness_);
}
}
@@ -98,8 +98,8 @@ void Bala::mou(float delta_time) {
float velocitat_efectiva = velocitat_ * delta_time;
// Calcular desplaçament (angle-PI/2 perquè angle=0 apunta amunt)
float dy = velocitat_efectiva * std::sin(angle_ - Constants::PI / 2.0f);
float dx = velocitat_efectiva * std::cos(angle_ - Constants::PI / 2.0f);
float dy = velocitat_efectiva * std::sin(angle_ - Constants::PI / 2.0F);
float dx = velocitat_efectiva * std::cos(angle_ - Constants::PI / 2.0F);
// Acumulació directa amb precisió subpíxel
centre_.y += dy;