neteja tidy a source/game (fixes d'arrel: BulletKind enum class, signatures, branches)
This commit is contained in:
+12
-10
@@ -2,10 +2,12 @@
|
||||
|
||||
#include <SDL3/SDL.h>
|
||||
|
||||
#include <string> // for string, basic_string
|
||||
#include <vector> // for vector
|
||||
#include <cstdint> // for uint8_t
|
||||
#include <string> // for string, basic_string
|
||||
#include <vector> // for vector
|
||||
|
||||
#include "utils/utils.h" // for demoKeys_t, color_t
|
||||
#include "game/entities/bullet.h" // for BulletKind (signatura de createBullet)
|
||||
#include "utils/utils.h" // for demoKeys_t, color_t
|
||||
class Balloon;
|
||||
class Bullet;
|
||||
class Fade;
|
||||
@@ -92,7 +94,7 @@ class Game {
|
||||
};
|
||||
|
||||
// Fases de la secuencia de muerte del jugador
|
||||
enum class DeathPhase { None,
|
||||
enum class DeathPhase : std::uint8_t { None,
|
||||
Shaking,
|
||||
Waiting,
|
||||
Done };
|
||||
@@ -299,7 +301,7 @@ class Game {
|
||||
void updateHiScore();
|
||||
|
||||
// Transforma un valor numérico en una cadena de 6 cifras
|
||||
auto updateScoreText(Uint32 num) -> std::string;
|
||||
static auto updateScoreText(Uint32 num) -> std::string;
|
||||
|
||||
// Pinta el marcador en pantalla usando un objeto texto
|
||||
void renderScoreBoard();
|
||||
@@ -326,7 +328,7 @@ class Game {
|
||||
void renderBalloons();
|
||||
|
||||
// Crea un globo nuevo en el vector de globos
|
||||
auto createBalloon(float x, int y, Uint8 kind, float velx, float speed, Uint16 stoppedcounter) -> Uint8;
|
||||
auto createBalloon(float x, float y, Uint8 kind, float velx, float speed, Uint16 creationtimer) -> Uint8;
|
||||
|
||||
// Crea una PowerBall
|
||||
void createPowerBall();
|
||||
@@ -374,7 +376,7 @@ class Game {
|
||||
void renderBullets();
|
||||
|
||||
// Crea un objeto bala
|
||||
void createBullet(int x, int y, Uint8 kind, bool poweredUp, int owner);
|
||||
void createBullet(int x, int y, BulletKind kind, bool poweredUp, int owner);
|
||||
|
||||
// Vacia el vector de balas
|
||||
void freeBullets();
|
||||
@@ -422,13 +424,13 @@ class Game {
|
||||
void evaluateAndSetMenace();
|
||||
|
||||
// Obtiene el valor de la variable
|
||||
auto getMenace() -> Uint8;
|
||||
[[nodiscard]] auto getMenace() const -> Uint8;
|
||||
|
||||
// Establece el valor de la variable
|
||||
void setTimeStopped(bool value);
|
||||
|
||||
// Obtiene el valor de la variable
|
||||
auto isTimeStopped() -> bool;
|
||||
[[nodiscard]] auto isTimeStopped() const -> bool;
|
||||
|
||||
// Establece el valor de la variable
|
||||
void setTimeStoppedCounter(Uint16 value);
|
||||
@@ -470,7 +472,7 @@ class Game {
|
||||
void updateDeathShake();
|
||||
|
||||
// Indica si el efecto de agitación intensa está activo
|
||||
auto isDeathShaking() -> bool;
|
||||
[[nodiscard]] auto isDeathShaking() const -> bool;
|
||||
|
||||
// Actualiza la secuencia de muerte del jugador
|
||||
void updateDeathSequence();
|
||||
|
||||
Reference in New Issue
Block a user