Fase 1b: rename d'entitats i metodes virtuals a CamelCase/camelBack

Tots els tipus d'entitat passen del catala a l'angles seguint el
.clang-tidy del projecte (tipus en CamelCase, metodes en camelBack,
membres en lower_case amb sufix _).

Renames de tipus:
- Entitat -> Entity (core/entities/entity.hpp)
- Nau -> Ship (game/entities/ship.{hpp,cpp})
- Enemic -> Enemy (game/entities/enemy.{hpp,cpp})
- Bala -> Bullet (game/entities/bullet.{hpp,cpp})
- TipusEnemic -> EnemyType
- AnimacioEnemic -> EnemyAnimation

Metodes virtuals (s'aplica a tot el codi, no nomes a entitats):
- actualitzar -> update
- dibuixar -> draw
- inicialitzar -> init
- processar_input -> processInput
- esta_actiu -> isActive
- es_collidable -> isCollidable
- get_collision_radius -> getCollisionRadius

Getters comuns:
- get_centre -> getCenter
- get_angle -> getAngle
- get_brightness -> getBrightness
- get_forma -> getShape

Metodes especifics:
- esta_viva -> isAlive
- esta_tocada -> isHit
- es_invulnerable -> isInvulnerable
- get_velocitat_vector -> getVelocityVector
- set_centre -> setCenter
- marcar_tocada -> markHit
- aplicar_fisica -> applyPhysics
- get_tipus -> getType

Camps privats:
- centre_ -> center_
- velocitat_ -> velocity_
- forma_ -> shape_
- esta_tocada_ -> is_hit_
- tipus_ -> type_

L'import d'audio/input d'AEEA quedara coherent (mateix estil).
Diff net: 30 fitxers, +437/-437 (la majoria es renames simetrics).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-19 11:37:18 +02:00
parent cd38101f99
commit ae5cc1cfb4
32 changed files with 505 additions and 505 deletions
+3 -3
View File
@@ -62,7 +62,7 @@ void DebrisManager::explotar(const std::shared_ptr<Graphics::Shape>& shape,
Audio::get()->playSound(sound, Audio::Group::GAME);
// Obtenir centre de la forma per a transformacions
const Vec2& shape_centre = shape->get_centre();
const Vec2& shape_centre = shape->getCenter();
// Iterar sobre totes les primitives de la forma
for (const auto& primitive : shape->get_primitives()) {
@@ -204,7 +204,7 @@ void DebrisManager::explotar(const std::shared_ptr<Graphics::Shape>& shape,
}
}
void DebrisManager::actualitzar(float delta_time) {
void DebrisManager::update(float delta_time) {
for (auto& debris : debris_pool_) {
if (!debris.actiu) {
continue;
@@ -302,7 +302,7 @@ void DebrisManager::actualitzar(float delta_time) {
}
}
void DebrisManager::dibuixar() const {
void DebrisManager::draw() const {
for (const auto& debris : debris_pool_) {
if (!debris.actiu) {
continue;
+2 -2
View File
@@ -42,10 +42,10 @@ class DebrisManager {
const std::string& sound = Defaults::Sound::EXPLOSION);
// Actualitzar tots els fragments actius
void actualitzar(float delta_time);
void update(float delta_time);
// Dibuixar tots els fragments actius
void dibuixar() const;
void draw() const;
// Reiniciar tots els fragments (neteja)
void reiniciar();
@@ -33,7 +33,7 @@ void GestorPuntuacioFlotant::crear(int punts, const Vec2& posicio) {
pf->actiu = true;
}
void GestorPuntuacioFlotant::actualitzar(float delta_time) {
void GestorPuntuacioFlotant::update(float delta_time) {
for (auto& pf : pool_) {
if (!pf.actiu) {
continue;
@@ -57,7 +57,7 @@ void GestorPuntuacioFlotant::actualitzar(float delta_time) {
}
}
void GestorPuntuacioFlotant::dibuixar() {
void GestorPuntuacioFlotant::draw() {
for (const auto& pf : pool_) {
if (!pf.actiu) {
continue;
@@ -26,10 +26,10 @@ class GestorPuntuacioFlotant {
void crear(int punts, const Vec2& posicio);
// Actualitzar tots els números actius
void actualitzar(float delta_time);
void update(float delta_time);
// Dibuixar tots els números actius
void dibuixar();
void draw();
// Reiniciar tots (neteja)
void reiniciar();