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:
@@ -59,11 +59,11 @@ void ShipAnimator::dibuixar() const {
|
||||
renderer_,
|
||||
nau.forma,
|
||||
nau.posicio_actual,
|
||||
0.0f, // angle (rotació 2D no utilitzada)
|
||||
0.0F, // angle (rotació 2D no utilitzada)
|
||||
nau.escala_actual,
|
||||
true, // dibuixar
|
||||
1.0f, // progress (sempre visible)
|
||||
1.0f // brightness (brillantor màxima)
|
||||
1.0F, // progress (sempre visible)
|
||||
1.0F // brightness (brillantor màxima)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -73,14 +73,14 @@ void ShipAnimator::start_entry_animation() {
|
||||
|
||||
// Configurar nau P1 per a l'animació d'entrada
|
||||
naus_[0].estat = EstatNau::ENTERING;
|
||||
naus_[0].temps_estat = 0.0f;
|
||||
naus_[0].temps_estat = 0.0F;
|
||||
naus_[0].posicio_inicial = calcular_posicio_fora_pantalla(CLOCK_8_ANGLE);
|
||||
naus_[0].posicio_actual = naus_[0].posicio_inicial;
|
||||
naus_[0].escala_actual = naus_[0].escala_inicial;
|
||||
|
||||
// Configurar nau P2 per a l'animació d'entrada
|
||||
naus_[1].estat = EstatNau::ENTERING;
|
||||
naus_[1].temps_estat = 0.0f;
|
||||
naus_[1].temps_estat = 0.0F;
|
||||
naus_[1].posicio_inicial = calcular_posicio_fora_pantalla(CLOCK_4_ANGLE);
|
||||
naus_[1].posicio_actual = naus_[1].posicio_inicial;
|
||||
naus_[1].escala_actual = naus_[1].escala_inicial;
|
||||
@@ -91,7 +91,7 @@ void ShipAnimator::trigger_exit_animation() {
|
||||
for (auto& nau : naus_) {
|
||||
// Canviar estat a EXITING
|
||||
nau.estat = EstatNau::EXITING;
|
||||
nau.temps_estat = 0.0f;
|
||||
nau.temps_estat = 0.0F;
|
||||
|
||||
// Preservar posició actual (pot estar a mig camí si START es prem durant ENTERING)
|
||||
nau.posicio_inicial = nau.posicio_actual;
|
||||
@@ -105,8 +105,8 @@ void ShipAnimator::skip_to_floating_state() {
|
||||
// Posar ambdues naus directament en estat FLOATING
|
||||
for (auto& nau : naus_) {
|
||||
nau.estat = EstatNau::FLOATING;
|
||||
nau.temps_estat = 0.0f;
|
||||
nau.fase_oscilacio = 0.0f;
|
||||
nau.temps_estat = 0.0F;
|
||||
nau.fase_oscilacio = 0.0F;
|
||||
|
||||
// Posar en posició objectiu (sense animació)
|
||||
nau.posicio_actual = nau.posicio_objectiu;
|
||||
@@ -133,7 +133,7 @@ void ShipAnimator::trigger_exit_animation_for_player(int jugador_id) {
|
||||
if (nau.jugador_id == jugador_id) {
|
||||
// Canviar estat a EXITING només per aquesta nau
|
||||
nau.estat = EstatNau::EXITING;
|
||||
nau.temps_estat = 0.0f;
|
||||
nau.temps_estat = 0.0F;
|
||||
|
||||
// Preservar posició actual (pot estar a mig camí si START es prem durant ENTERING)
|
||||
nau.posicio_inicial = nau.posicio_actual;
|
||||
@@ -177,7 +177,7 @@ void ShipAnimator::actualitzar_entering(NauTitol& nau, float delta_time) {
|
||||
|
||||
// Càlcul del progrés (restant el delay)
|
||||
float elapsed = nau.temps_estat - nau.entry_delay;
|
||||
float progress = std::min(1.0f, elapsed / ENTRY_DURATION);
|
||||
float progress = std::min(1.0F, elapsed / ENTRY_DURATION);
|
||||
|
||||
// Aplicar easing (ease_out_quad per arribada suau)
|
||||
float eased_progress = Easing::ease_out_quad(progress);
|
||||
@@ -192,8 +192,8 @@ void ShipAnimator::actualitzar_entering(NauTitol& nau, float delta_time) {
|
||||
// Transicionar a FLOATING quan completi
|
||||
if (elapsed >= ENTRY_DURATION) {
|
||||
nau.estat = EstatNau::FLOATING;
|
||||
nau.temps_estat = 0.0f;
|
||||
nau.fase_oscilacio = 0.0f; // Reiniciar fase d'oscil·lació
|
||||
nau.temps_estat = 0.0F;
|
||||
nau.fase_oscilacio = 0.0F; // Reiniciar fase d'oscil·lació
|
||||
}
|
||||
}
|
||||
|
||||
@@ -205,8 +205,8 @@ void ShipAnimator::actualitzar_floating(NauTitol& nau, float delta_time) {
|
||||
nau.fase_oscilacio += delta_time;
|
||||
|
||||
// Oscil·lació sinusoïdal X/Y (paràmetres específics per nau)
|
||||
float offset_x = nau.amplitude_x * std::sin(2.0f * Defaults::Math::PI * nau.frequency_x * nau.fase_oscilacio);
|
||||
float offset_y = nau.amplitude_y * std::sin(2.0f * Defaults::Math::PI * nau.frequency_y * nau.fase_oscilacio + FLOAT_PHASE_OFFSET);
|
||||
float offset_x = nau.amplitude_x * std::sin(2.0F * Defaults::Math::PI * nau.frequency_x * nau.fase_oscilacio);
|
||||
float offset_y = nau.amplitude_y * std::sin(2.0F * Defaults::Math::PI * nau.frequency_y * nau.fase_oscilacio + FLOAT_PHASE_OFFSET);
|
||||
|
||||
// Aplicar oscil·lació a la posició objectiu
|
||||
nau.posicio_actual.x = nau.posicio_objectiu.x + offset_x;
|
||||
@@ -222,7 +222,7 @@ void ShipAnimator::actualitzar_exiting(NauTitol& nau, float delta_time) {
|
||||
nau.temps_estat += delta_time;
|
||||
|
||||
// Calcular progrés (0.0 → 1.0)
|
||||
float progress = std::min(1.0f, nau.temps_estat / EXIT_DURATION);
|
||||
float progress = std::min(1.0F, nau.temps_estat / EXIT_DURATION);
|
||||
|
||||
// Aplicar easing (ease_in_quad per acceleració cap al punt de fuga)
|
||||
float eased_progress = Easing::ease_in_quad(progress);
|
||||
@@ -236,10 +236,10 @@ void ShipAnimator::actualitzar_exiting(NauTitol& nau, float delta_time) {
|
||||
nau.posicio_actual.y = Easing::lerp(nau.posicio_inicial.y, punt_fuga.y, eased_progress);
|
||||
|
||||
// Escala redueix a 0 (simula Z → infinit)
|
||||
nau.escala_actual = nau.escala_objectiu * (1.0f - eased_progress);
|
||||
nau.escala_actual = nau.escala_objectiu * (1.0F - eased_progress);
|
||||
|
||||
// Marcar invisible quan l'animació completi
|
||||
if (progress >= 1.0f) {
|
||||
if (progress >= 1.0F) {
|
||||
nau.visible = false;
|
||||
}
|
||||
}
|
||||
@@ -250,7 +250,7 @@ void ShipAnimator::configurar_nau_p1(NauTitol& nau) {
|
||||
|
||||
// Estat inicial: FLOATING (per test estàtic)
|
||||
nau.estat = EstatNau::FLOATING;
|
||||
nau.temps_estat = 0.0f;
|
||||
nau.temps_estat = 0.0F;
|
||||
|
||||
// Posicions (clock 8, bottom-left)
|
||||
nau.posicio_objectiu = {P1_TARGET_X(), P1_TARGET_Y()};
|
||||
@@ -265,7 +265,7 @@ void ShipAnimator::configurar_nau_p1(NauTitol& nau) {
|
||||
nau.escala_inicial = ENTRY_SCALE_START;
|
||||
|
||||
// Flotació
|
||||
nau.fase_oscilacio = 0.0f;
|
||||
nau.fase_oscilacio = 0.0F;
|
||||
|
||||
// Paràmetres d'entrada
|
||||
nau.entry_delay = P1_ENTRY_DELAY;
|
||||
@@ -285,7 +285,7 @@ void ShipAnimator::configurar_nau_p2(NauTitol& nau) {
|
||||
|
||||
// Estat inicial: FLOATING (per test estàtic)
|
||||
nau.estat = EstatNau::FLOATING;
|
||||
nau.temps_estat = 0.0f;
|
||||
nau.temps_estat = 0.0F;
|
||||
|
||||
// Posicions (clock 4, bottom-right)
|
||||
nau.posicio_objectiu = {P2_TARGET_X(), P2_TARGET_Y()};
|
||||
@@ -300,7 +300,7 @@ void ShipAnimator::configurar_nau_p2(NauTitol& nau) {
|
||||
nau.escala_inicial = ENTRY_SCALE_START;
|
||||
|
||||
// Flotació
|
||||
nau.fase_oscilacio = 0.0f;
|
||||
nau.fase_oscilacio = 0.0F;
|
||||
|
||||
// Paràmetres d'entrada
|
||||
nau.entry_delay = P2_ENTRY_DELAY;
|
||||
@@ -323,8 +323,8 @@ Punt ShipAnimator::calcular_posicio_fora_pantalla(float angle_rellotge) const {
|
||||
// ENTRY_OFFSET es calcula automàticament: (SHIP_MAX_RADIUS * ENTRY_SCALE_START) + ENTRY_OFFSET_MARGIN
|
||||
float extended_radius = CLOCK_RADIUS + ENTRY_OFFSET;
|
||||
|
||||
float x = Defaults::Game::WIDTH / 2.0f + extended_radius * std::cos(angle_rellotge);
|
||||
float y = Defaults::Game::HEIGHT / 2.0f + extended_radius * std::sin(angle_rellotge);
|
||||
float x = Defaults::Game::WIDTH / 2.0F + extended_radius * std::cos(angle_rellotge);
|
||||
float y = Defaults::Game::HEIGHT / 2.0F + extended_radius * std::sin(angle_rellotge);
|
||||
|
||||
return {x, y};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user