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
+29 -29
View File
@@ -40,8 +40,8 @@ constexpr int BALLOON_CLASS = 0;
constexpr int HEXAGON_CLASS = 1;
// Velocidad del globo
constexpr float BALLOON_VELX_POSITIVE = 0.7f;
constexpr float BALLOON_VELX_NEGATIVE = -0.7f;
constexpr float BALLOON_VELX_POSITIVE = 0.7F;
constexpr float BALLOON_VELX_NEGATIVE = -0.7F;
// Índice para las animaciones de los globos
constexpr int BALLOON_MOVING_ANIMATION = 0;
@@ -52,11 +52,11 @@ constexpr int BALLOON_BORN_ANIMATION = 2;
constexpr int MAX_BALLOONS = 100;
// Velocidades a las que se mueven los globos
constexpr float BALLOON_SPEED_1 = 0.60f;
constexpr float BALLOON_SPEED_2 = 0.70f;
constexpr float BALLOON_SPEED_3 = 0.80f;
constexpr float BALLOON_SPEED_4 = 0.90f;
constexpr float BALLOON_SPEED_5 = 1.00f;
constexpr float BALLOON_SPEED_1 = 0.60F;
constexpr float BALLOON_SPEED_2 = 0.70F;
constexpr float BALLOON_SPEED_3 = 0.80F;
constexpr float BALLOON_SPEED_4 = 0.90F;
constexpr float BALLOON_SPEED_5 = 1.00F;
// Tamaño de los globos
constexpr int BALLOON_WIDTH_1 = 8;
@@ -147,7 +147,7 @@ class Balloon {
~Balloon();
Balloon(const Balloon &) = delete;
Balloon &operator=(const Balloon &) = delete;
auto operator=(const Balloon &) -> Balloon & = delete;
// Centra el globo en la posición X
void allignTo(int x);
@@ -168,22 +168,22 @@ class Balloon {
void update();
// Comprueba si el globo está habilitado
bool isEnabled();
[[nodiscard]] auto isEnabled() const -> bool;
// Obtiene del valor de la variable
float getPosX();
[[nodiscard]] auto getPosX() const -> float;
// Obtiene del valor de la variable
float getPosY();
[[nodiscard]] auto getPosY() const -> float;
// Obtiene del valor de la variable
float getVelY();
[[nodiscard]] auto getVelY() const -> float;
// Obtiene del valor de la variable
int getWidth();
[[nodiscard]] auto getWidth() const -> int;
// Obtiene del valor de la variable
int getHeight();
[[nodiscard]] auto getHeight() const -> int;
// Establece el valor de la variable
void setVelY(float velY);
@@ -192,62 +192,62 @@ class Balloon {
void setSpeed(float speed);
// Obtiene del valor de la variable
int getKind();
[[nodiscard]] auto getKind() const -> int;
// Obtiene del valor de la variable
Uint8 getSize();
[[nodiscard]] auto getSize() const -> Uint8;
// Obtiene la clase a la que pertenece el globo
Uint8 getClass();
[[nodiscard]] auto getClass() const -> Uint8;
// Establece el valor de la variable
void setStop(bool value);
void setStop(bool state);
// Obtiene del valor de la variable
bool isStopped();
[[nodiscard]] auto isStopped() const -> bool;
// Establece el valor de la variable
void setBlink(bool value);
// Obtiene del valor de la variable
bool isBlinking();
[[nodiscard]] auto isBlinking() const -> bool;
// Establece el valor de la variable
void setVisible(bool value);
// Obtiene del valor de la variable
bool isVisible();
[[nodiscard]] auto isVisible() const -> bool;
// Establece el valor de la variable
void setInvulnerable(bool value);
// Obtiene del valor de la variable
bool isInvulnerable();
[[nodiscard]] auto isInvulnerable() const -> bool;
// Obtiene del valor de la variable
bool isBeingCreated();
[[nodiscard]] auto isBeingCreated() const -> bool;
// Establece el valor de la variable
void setPopping(bool value);
// Obtiene del valor de la variable
bool isPopping();
[[nodiscard]] auto isPopping() const -> bool;
// Establece el valor de la variable
void setStoppedTimer(Uint16 time);
// Obtiene del valor de la variable
Uint16 getStoppedTimer();
[[nodiscard]] auto getStoppedTimer() const -> Uint16;
// Obtiene del valor de la variable
Uint16 getScore();
[[nodiscard]] auto getScore() const -> Uint16;
// Obtiene el circulo de colisión
circle_t &getCollider();
auto getCollider() -> circle_t &;
// Obtiene le valor de la variable
Uint8 getMenace();
[[nodiscard]] auto getMenace() const -> Uint8;
// Obtiene le valor de la variable
Uint8 getPower();
[[nodiscard]] auto getPower() const -> Uint8;
};