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:
@@ -21,7 +21,7 @@ void detectBulletEnemy(Context& ctx) {
|
||||
}
|
||||
|
||||
// *** COLISIÓN bullet → enemy ***
|
||||
const Vec2& POS_ENEMIC = enemy.getCenter();
|
||||
const Vec2& enemy_pos = enemy.getCenter();
|
||||
|
||||
// 1. Puntos según tipo
|
||||
int points = 0;
|
||||
@@ -39,7 +39,7 @@ void detectBulletEnemy(Context& ctx) {
|
||||
|
||||
uint8_t owner_id = bullet.getOwnerId();
|
||||
ctx.score_per_player[owner_id] += points;
|
||||
ctx.floating_score_manager.crear(points, POS_ENEMIC);
|
||||
ctx.floating_score_manager.crear(points, enemy_pos);
|
||||
|
||||
// 2. Destruir enemy + crear explosión (debris hereda color del enemy)
|
||||
SDL_Color enemy_color{};
|
||||
@@ -52,7 +52,7 @@ void detectBulletEnemy(Context& ctx) {
|
||||
Vec2 vel_enemic = enemy.getVelocityVector();
|
||||
ctx.debris_manager.explode(
|
||||
enemy.getShape(),
|
||||
POS_ENEMIC,
|
||||
enemy_pos,
|
||||
0.0F, // angle (la rotación es interna del enemy)
|
||||
1.0F, // escala
|
||||
VELOCITAT_EXPLOSIO,
|
||||
|
||||
Reference in New Issue
Block a user