Lint: rename de helpers file-static y constexpr locales
Tanda local de identifier-naming: ningún símbolo cross-file, todo contenido en su propio TU. De paso traduce los catalán/spanish a inglés allá donde aplica. - shape_renderer.cpp: apply_3d_rotation → apply3dRotation, transform_point → transformPoint, perspective_factor → PERSPECTIVE_FACTOR (constexpr). - debris_manager.cpp: transform_point → transformPoint (otro file-static con el mismo nombre, no comparte símbolo con shape_renderer). - logo_scene.cpp: calcular_progress_letra → computeLetterProgress. - vector_text.cpp: char_width/char_height → BASE_CHAR_WIDTH/BASE_CHAR_HEIGHT (el sufijo BASE_ evita el conflicto con la macro CHAR_WIDTH de Windows headers que clang-tidy detectó). - floating_score_manager.cpp::draw: constexpr scale/spacing → SCALE/SPACING. - game_scene.cpp::dibuixar_missatge_stage: escala_base/spacing → BASE_SCALE/SPACING (constexpr locales). - game_scene.cpp::dibuixar_continue: constexpr spacing → SPACING. - game_scene.cpp en stepGameOver: constexpr scale/spacing → SCALE/SPACING. - ship_animator.cpp::actualizar_exiting: constexpr Vec2 punt_fuga → VANISHING_POINT. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -16,7 +16,7 @@ namespace Effects {
|
||||
|
||||
// Helper: transformar point con rotación, scale i traslación
|
||||
// (Copiat de shape_renderer.cpp:12-34)
|
||||
static auto transform_point(const Vec2& point, const Vec2& shape_centre, const Vec2& position, float angle, float scale) -> Vec2 {
|
||||
static auto transformPoint(const Vec2& point, const Vec2& shape_centre, const Vec2& position, float angle, float scale) -> Vec2 {
|
||||
// 1. Centrar el point respecte al centro de la shape
|
||||
float centered_x = point.x - shape_centre.x;
|
||||
float centered_y = point.y - shape_centre.y;
|
||||
@@ -86,9 +86,9 @@ void DebrisManager::explode(const std::shared_ptr<Graphics::Shape>& shape,
|
||||
for (const auto& [local_p1, local_p2] : segments) {
|
||||
// 1. Transformar points locals → coordenades mundials
|
||||
Vec2 world_p1 =
|
||||
transform_point(local_p1, shape_centre, centro, angle, scale);
|
||||
transformPoint(local_p1, shape_centre, centro, angle, scale);
|
||||
Vec2 world_p2 =
|
||||
transform_point(local_p2, shape_centre, centro, angle, scale);
|
||||
transformPoint(local_p2, shape_centre, centro, angle, scale);
|
||||
|
||||
// 2. Trobar slot lliure
|
||||
Debris* debris = findFreeSlot();
|
||||
|
||||
Reference in New Issue
Block a user