neteja clang-tidy
This commit is contained in:
@@ -31,7 +31,7 @@ auto CardSprite::enable() -> bool {
|
||||
|
||||
// Ángulo inicial
|
||||
rotate_.angle = start_angle_;
|
||||
rotate_.center = {pos_.w / 2.0F, pos_.h / 2.0F};
|
||||
rotate_.center = {.x = pos_.w / 2.0F, .y = pos_.h / 2.0F};
|
||||
|
||||
shadow_visible_ = true;
|
||||
return true;
|
||||
@@ -55,7 +55,7 @@ void CardSprite::startExit() {
|
||||
// Rotación continua
|
||||
rotate_.enabled = true;
|
||||
rotate_.amount = exit_rotate_amount_;
|
||||
rotate_.center = {pos_.w / 2.0F, pos_.h / 2.0F};
|
||||
rotate_.center = {.x = pos_.w / 2.0F, .y = pos_.h / 2.0F};
|
||||
}
|
||||
|
||||
// Actualiza según el estado
|
||||
@@ -80,7 +80,7 @@ void CardSprite::updateEntering(float delta_time) {
|
||||
double eased = entry_easing_(static_cast<double>(progress));
|
||||
|
||||
// Zoom: de start_zoom_ a 1.0 con rebote
|
||||
auto current_zoom = static_cast<float>(start_zoom_ + (1.0 - start_zoom_) * eased);
|
||||
auto current_zoom = static_cast<float>(start_zoom_ + ((1.0 - start_zoom_) * eased));
|
||||
horizontal_zoom_ = current_zoom;
|
||||
vertical_zoom_ = current_zoom;
|
||||
|
||||
@@ -90,8 +90,8 @@ void CardSprite::updateEntering(float delta_time) {
|
||||
// Posición: de entry_start a landing con easing suave (sin rebote)
|
||||
// Usamos easeOutCubic para que el desplazamiento sea fluido
|
||||
double pos_eased = easeOutCubic(static_cast<double>(progress));
|
||||
auto current_x = static_cast<float>(entry_start_x_ + (landing_x_ - entry_start_x_) * pos_eased);
|
||||
auto current_y = static_cast<float>(entry_start_y_ + (landing_y_ - entry_start_y_) * pos_eased);
|
||||
auto current_x = static_cast<float>(entry_start_x_ + ((landing_x_ - entry_start_x_) * pos_eased));
|
||||
auto current_y = static_cast<float>(entry_start_y_ + ((landing_y_ - entry_start_y_) * pos_eased));
|
||||
setPos(current_x, current_y);
|
||||
|
||||
// Detecta el primer toque (cuando el easing alcanza ~1.0 por primera vez)
|
||||
@@ -117,12 +117,9 @@ void CardSprite::updateExiting(float delta_time) {
|
||||
|
||||
// Ganar altura gradualmente (zoom hacia el objetivo)
|
||||
if (exit_zoom_speed_ > 0.0F && horizontal_zoom_ < exit_target_zoom_) {
|
||||
float new_zoom = horizontal_zoom_ + exit_zoom_speed_ * delta_time;
|
||||
if (new_zoom > exit_target_zoom_) {
|
||||
new_zoom = exit_target_zoom_;
|
||||
}
|
||||
horizontal_zoom_ = new_zoom;
|
||||
vertical_zoom_ = new_zoom;
|
||||
const float NEW_ZOOM = std::min(horizontal_zoom_ + (exit_zoom_speed_ * delta_time), exit_target_zoom_);
|
||||
horizontal_zoom_ = NEW_ZOOM;
|
||||
vertical_zoom_ = NEW_ZOOM;
|
||||
}
|
||||
|
||||
if (isOffScreen()) {
|
||||
@@ -164,8 +161,8 @@ void CardSprite::renderShadow() {
|
||||
|
||||
// Offset respecto a la tarjeta: base + extra proporcional a la altura
|
||||
// La sombra se aleja en diagonal abajo-derecha (opuesta a la luz en 0,0)
|
||||
float offset_x = shadow_offset_x_ + height * SHADOW_HEIGHT_MULTIPLIER;
|
||||
float offset_y = shadow_offset_y_ + height * SHADOW_HEIGHT_MULTIPLIER;
|
||||
float offset_x = shadow_offset_x_ + (height * SHADOW_HEIGHT_MULTIPLIER);
|
||||
float offset_y = shadow_offset_y_ + (height * SHADOW_HEIGHT_MULTIPLIER);
|
||||
|
||||
shadow_texture_->render(
|
||||
pos_.x + offset_x,
|
||||
|
||||
Reference in New Issue
Block a user