Lint: rename de locales (constants + const-ref vars)

Tanda de identifier-naming de variables y constantes locales a funciones
o archivos. Ninguno cross-file (los símbolos públicos quedan para una
pasada manual con VS Code).

- audio_adapter.cpp: path → PATH (const local en 3 funciones).
- vector_text.cpp: symbols → SYMBOLS, char_width_scaled → CHAR_WIDTH_SCALED,
  char_height_scaled → CHAR_HEIGHT_SCALED, spacing_scaled → SPACING_SCALED
  (const locales en render/renderCentered/get_text_width).
- physics_world.cpp: acceleration → ACCELERATION (const local en update).
- constants.hpp::dins_zona_joc: point → POINT.
- game_scene.cpp:
  - stepGameOver: game_over_text → GAME_OVER_TEXT.
  - dibuixar_marcador: scale/spacing → SCALE/SPACING (const), y la ref
    local 'scoreboard' (const SDL_FRect&) → 'scoreboard_zone' para no
    colisionar con Defaults::Zones::SCOREBOARD (las refs no son
    "constant" según el .clang-tidy y deben ser lower_case).
  - dibuixar_missatge_stage: max_width → MAX_WIDTH (const local).
  - dibuixar_continue: continue_text/counter_str/continues_text →
    UPPER_CASE.
- title_scene.cpp::draw (sección MAIN): spacing → SPACING, main_text →
  MAIN_TEXT, escala_main → MAIN_SCALE.
- shape_renderer.cpp: const Vec2& SHAPE_CENTRE → shape_centre (es ref,
  no constant).
- collision_system.cpp: const Vec2& POS_ENEMIC → enemy_pos (ref + traducción).
- init_hud_animator.cpp: refs ZONA → zone (en 2 funciones), SCOREBOARD →
  scoreboard_zone (sin colisionar con Defaults::Zones::SCOREBOARD).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-20 11:50:58 +02:00
parent 1214599c4c
commit c80212adb9
9 changed files with 66 additions and 66 deletions
+5 -5
View File
@@ -676,7 +676,7 @@ void TitleScene::draw() {
// En state MAIN: siempre visible
// En state TRANSITION: parpellejant (blink con sinusoide)
const float spacing = Defaults::Title::Layout::TEXT_SPACING;
const float SPACING = Defaults::Title::Layout::TEXT_SPACING;
bool mostrar_text = true;
if (estat_actual_ == TitleState::PLAYER_JOIN_PHASE) {
@@ -686,16 +686,16 @@ void TitleScene::draw() {
}
if (mostrar_text) {
const std::string main_text = "PRESS START TO PLAY";
const float escala_main = Defaults::Title::Layout::PRESS_START_SCALE;
const std::string MAIN_TEXT = "PRESS START TO PLAY";
const float MAIN_SCALE = Defaults::Title::Layout::PRESS_START_SCALE;
float centre_x = Defaults::Game::WIDTH / 2.0F;
float centre_y = Defaults::Game::HEIGHT * Defaults::Title::Layout::PRESS_START_POS;
text_.renderCentered(main_text, {.x = centre_x, .y = centre_y}, escala_main, spacing);
text_.renderCentered(MAIN_TEXT, {.x = centre_x, .y = centre_y}, MAIN_SCALE, SPACING);
}
dibuixarPeuTitol(spacing);
dibuixarPeuTitol(SPACING);
}
}