Fase 1d: rename del codi restant (effects, stage_system, locals)

Sweep final del naming a CamelCase/camelBack/lower_case:

Fitxers renombrats:
- effects/gestor_puntuacio_flotant.{hpp,cpp} -> floating_score_manager.{hpp,cpp}
- effects/puntuacio_flotant.hpp -> floating_score.hpp

Tipus (CamelCase):
- GestorPuntuacioFlotant -> FloatingScoreManager
- PuntuacioFlotant -> FloatingScore
- ConfigStage -> StageConfig
- ConfigSistemaStages -> StageSystemConfig
- NauTitol -> TitleShip
- EstatNau -> ShipState

Metodes publics (camelBack):
- obte_renderer -> getRenderer
- get_num_actius -> getActiveCount
- calcular_direccio_explosio -> computeExplosionDirection
- trobar_slot_lliure -> findFreeSlot
- explotar -> explode
- reiniciar -> reset
- es_valida -> isValid
- parsejar_fitxer -> parseFile
- carregar -> load
- crear_explosio -> createExplosion
- registrar_puntuacio -> registerScore
- construir_marcador -> buildScoreboard
- render_centered -> renderCentered

Camps struct publics (snake_case):
- actiu/actius -> active
- rotacio -> rotation, rotacio_visual -> visual_rotation
- acceleracio -> acceleration
- velocitat -> velocity
- escala/escala_inicial/objectiu/actual -> scale/initial_scale/...
- posicio/posicio_inicial/objectiu/actual -> position/initial_position/...
- fase_oscilacio -> oscillation_phase
- temps_estat -> state_time
- jugador_id -> player_id
- estat -> state
- brillantor -> brightness
- tipus -> type

Camps privats (sufix _):
- naus_ -> ships_, orni_ -> enemies_, bales_ -> bullets_
- gestor_puntuacio_ -> floating_score_manager_
- punt_mort_ -> death_position_, punt_spawn_ -> spawn_position_
- itocado_per_jugador_ -> hit_timer_per_player_
- vides_per_jugador_ -> lives_per_player_
- puntuacio_per_jugador_ -> score_per_player_
- estat_game_over_ -> game_over_state_
- continues_usados_ -> continues_used_

Constants:
- MARGE_ESQ/DRET/DALT/BAIX -> MARGIN_LEFT/RIGHT/TOP/BOTTOM

Variables locals i parametres comuns (snake_case):
- nau -> ship, enemic -> enemy, bala -> bullet
- forma -> shape, punt(s) -> point(s)
- jugador -> player, partida -> match
- temps -> time, missatge -> message

Diff: 59 fitxers, +1000/-1000 (simetric). Compila i enllaça.

Pendents per a futures fases (no bloquejants):
- Comentaris de capçalera en catala -> castella
- Variables locals/parametres minoritaris en catala
- Include guards (queden alguns #ifndef en lloc de #pragma once)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-19 11:44:45 +02:00
parent 5871d29d48
commit 7ee359b910
59 changed files with 998 additions and 998 deletions
+12 -12
View File
@@ -10,30 +10,30 @@
namespace Graphics {
// Tipus de primitiva dins d'una forma
// Tipus de primitiva dins d'una shape
enum class PrimitiveType {
POLYLINE, // Seqüència de punts connectats
LINE // Línia individual (2 punts)
POLYLINE, // Seqüència de points connectats
LINE // Línia individual (2 points)
};
// Primitiva individual (polyline o line)
struct ShapePrimitive {
PrimitiveType type;
std::vector<Vec2> points; // 2+ punts per polyline, exactament 2 per line
std::vector<Vec2> points; // 2+ points per polyline, exactament 2 per line
};
// Classe Shape - representa una forma vectorial carregada des de .shp
// Classe Shape - representa una shape vectorial carregada des de .shp
class Shape {
public:
// Constructors
Shape() = default;
explicit Shape(const std::string& filepath);
// Carregar forma des de fitxer .shp
bool carregar(const std::string& filepath);
// Carregar shape des de fitxer .shp
bool load(const std::string& filepath);
// Parsejar forma des de buffer de memòria (per al sistema de recursos)
bool parsejar_fitxer(const std::string& contingut);
// Parsejar shape des de buffer de memòria (per al sistema de recursos)
bool parseFile(const std::string& contingut);
// Getters
[[nodiscard]] const std::vector<ShapePrimitive>& get_primitives() const {
@@ -41,7 +41,7 @@ class Shape {
}
[[nodiscard]] const Vec2& getCenter() const { return center_; }
[[nodiscard]] float get_escala_defecte() const { return escala_defecte_; }
[[nodiscard]] bool es_valida() const { return !primitives_.empty(); }
[[nodiscard]] bool isValid() const { return !primitives_.empty(); }
// Info de depuració
[[nodiscard]] std::string get_nom() const { return nom_; }
@@ -49,9 +49,9 @@ class Shape {
private:
std::vector<ShapePrimitive> primitives_;
Vec2 center_; // Centre/origen de la forma
Vec2 center_; // Centre/origen de la shape
float escala_defecte_; // Escala per defecte (normalment 1.0)
std::string nom_; // Nom de la forma (per depuració)
std::string nom_; // Nom de la shape (per depuració)
// Helpers privats per parsejar
[[nodiscard]] std::string trim(const std::string& str) const;