neteja tidy a source/game (fixes d'arrel: BulletKind enum class, signatures, branches)

This commit is contained in:
2026-05-14 21:52:45 +02:00
parent 0ee117135c
commit 9a2da460cc
19 changed files with 643 additions and 693 deletions
+18 -18
View File
@@ -87,7 +87,7 @@ class Player {
~Player();
Player(const Player &) = delete;
Player &operator=(const Player &) = delete;
auto operator=(const Player &) -> Player & = delete;
// Iniciador
void init();
@@ -117,19 +117,19 @@ class Player {
void setAnimation();
// Obtiene el valor de la variable
int getPosX();
[[nodiscard]] auto getPosX() const -> int;
// Obtiene el valor de la variable
int getPosY();
[[nodiscard]] auto getPosY() const -> int;
// Obtiene el valor de la variable
int getWidth();
[[nodiscard]] auto getWidth() const -> int;
// Obtiene el valor de la variable
int getHeight();
[[nodiscard]] auto getHeight() const -> int;
// Indica si el jugador puede disparar
bool canFire();
[[nodiscard]] auto canFire() const -> bool;
// Establece el valor de la variable
void setFireCooldown(int time);
@@ -138,7 +138,7 @@ class Player {
void updateCooldown();
// Obtiene la puntuación del jugador
Uint32 getScore();
[[nodiscard]] auto getScore() const -> Uint32;
// Asigna un valor a la puntuación del jugador
void setScore(Uint32 score);
@@ -147,13 +147,13 @@ class Player {
void addScore(Uint32 score);
// Obtiene el valor de la variable
bool isAlive();
[[nodiscard]] auto isAlive() const -> bool;
// Establece el valor de la variable
void setAlive(bool value);
// Obtiene el valor de la variable
float getScoreMultiplier();
[[nodiscard]] auto getScoreMultiplier() const -> float;
// Establece el valor de la variable
void setScoreMultiplier(float value);
@@ -165,25 +165,25 @@ class Player {
void decScoreMultiplier();
// Obtiene el valor de la variable
bool isInvulnerable();
[[nodiscard]] auto isInvulnerable() const -> bool;
// Establece el valor de la variable
void setInvulnerable(bool value);
// Obtiene el valor de la variable
Uint16 getInvulnerableCounter();
[[nodiscard]] auto getInvulnerableCounter() const -> Uint16;
// Establece el valor de la variable
void setInvulnerableCounter(Uint16 value);
// Obtiene el valor de la variable
bool isPowerUp();
[[nodiscard]] auto isPowerUp() const -> bool;
// Establece el valor de la variable
void setPowerUp(bool value);
// Obtiene el valor de la variable
Uint16 getPowerUpCounter();
[[nodiscard]] auto getPowerUpCounter() const -> Uint16;
// Establece el valor de la variable
void setPowerUpCounter(Uint16 value);
@@ -192,7 +192,7 @@ class Player {
void updatePowerUpCounter();
// Obtiene el valor de la variable
bool hasExtraHit();
[[nodiscard]] auto hasExtraHit() const -> bool;
// Concede un toque extra al jugador
void giveExtraHit();
@@ -207,14 +207,14 @@ class Player {
void disableInput();
// Devuelve el numero de cafes actuales
Uint8 getCoffees();
[[nodiscard]] auto getCoffees() const -> Uint8;
// Obtiene el circulo de colisión
circle_t &getCollider();
auto getCollider() -> circle_t &;
// Obtiene el puntero a la textura con los gráficos de la animación de morir
Texture *getDeadTexture();
auto getDeadTexture() -> Texture *;
// Obtiene el valor de la variable
Uint16 getDeathCounter();
[[nodiscard]] auto getDeathCounter() const -> Uint16;
};