neteja tidy a source/core/system i audio amb fixes d'arrel

This commit is contained in:
2026-05-14 21:02:43 +02:00
parent dc622c7bae
commit 0ee117135c
11 changed files with 145 additions and 115 deletions
+16 -16
View File
@@ -266,16 +266,16 @@ class Game {
void loadMedia();
// Carga el fichero de puntos
bool loadScoreFile();
auto loadScoreFile() -> bool;
// Carga el fichero de datos para la demo
bool loadDemoFile();
auto loadDemoFile() -> bool;
// Guarda el fichero de puntos
bool saveScoreFile();
auto saveScoreFile() -> bool;
// Guarda el fichero de datos para la demo
bool saveDemoFile();
auto saveDemoFile() -> bool;
// Inicializa las formaciones enemigas
void initEnemyFormations();
@@ -299,7 +299,7 @@ class Game {
void updateHiScore();
// Transforma un valor numérico en una cadena de 6 cifras
std::string updateScoreText(Uint32 num);
auto updateScoreText(Uint32 num) -> std::string;
// Pinta el marcador en pantalla usando un objeto texto
void renderScoreBoard();
@@ -326,7 +326,7 @@ class Game {
void renderBalloons();
// Crea un globo nuevo en el vector de globos
Uint8 createBalloon(float x, int y, Uint8 kind, float velx, float speed, Uint16 stoppedcounter);
auto createBalloon(float x, int y, Uint8 kind, float velx, float speed, Uint16 stoppedcounter) -> Uint8;
// Crea una PowerBall
void createPowerBall();
@@ -359,7 +359,7 @@ class Game {
void freeBalloons();
// Comprueba la colisión entre el jugador y los globos activos
bool checkPlayerBalloonCollision(Player *player);
auto checkPlayerBalloonCollision(Player *player) -> bool;
// Comprueba la colisión entre el jugador y los items
void checkPlayerItemCollision(Player *player);
@@ -386,7 +386,7 @@ class Game {
void renderItems();
// Devuelve un item en función del azar
Uint8 dropItem();
auto dropItem() -> Uint8;
// Crea un objeto item
void createItem(Uint8 kind, float x, float y);
@@ -422,13 +422,13 @@ class Game {
void evaluateAndSetMenace();
// Obtiene el valor de la variable
Uint8 getMenace();
auto getMenace() -> Uint8;
// Establece el valor de la variable
void setTimeStopped(bool value);
// Obtiene el valor de la variable
bool isTimeStopped();
auto isTimeStopped() -> bool;
// Establece el valor de la variable
void setTimeStoppedCounter(Uint16 value);
@@ -470,7 +470,7 @@ class Game {
void updateDeathShake();
// Indica si el efecto de agitación intensa está activo
bool isDeathShaking();
auto isDeathShaking() -> bool;
// Actualiza la secuencia de muerte del jugador
void updateDeathSequence();
@@ -494,10 +494,10 @@ class Game {
void enterGameOverScreen();
// Indica si se puede crear una powerball
bool canPowerBallBeCreated();
auto canPowerBallBeCreated() -> bool;
// Calcula el poder actual de los globos en pantalla
int calculateScreenPower();
auto calculateScreenPower() -> int;
// Inicializa las variables que contienen puntos de ruta para mover objetos
void initPaths();
@@ -509,7 +509,7 @@ class Game {
void updateHelper();
// Comprueba si todos los jugadores han muerto
bool allPlayersAreDead();
auto allPlayersAreDead() -> bool;
// Elimina todos los objetos contenidos en vectores
void deleteAllVectorObjects();
@@ -525,7 +525,7 @@ class Game {
~Game();
Game(const Game &) = delete;
Game &operator=(const Game &) = delete;
auto operator=(const Game &) -> Game & = delete;
// Bucle para el juego
void run();
@@ -534,7 +534,7 @@ class Game {
void iterate();
// Indica si el juego ha terminado
bool hasFinished() const;
[[nodiscard]] auto hasFinished() const -> bool;
// Procesa un evento
void handleEvent(const SDL_Event *event);
+3 -3
View File
@@ -46,7 +46,7 @@ class Instructions {
~Instructions();
Instructions(const Instructions &) = delete;
Instructions &operator=(const Instructions &) = delete;
auto operator=(const Instructions &) -> Instructions & = delete;
// Bucle principal
void run(mode_e mode);
@@ -64,8 +64,8 @@ class Instructions {
void checkEvents();
// Indica si las instrucciones han terminado
bool hasFinished() const;
[[nodiscard]] auto hasFinished() const -> bool;
// Indica si se ha solicitado salir de la aplicación
bool isQuitRequested() const;
[[nodiscard]] auto isQuitRequested() const -> bool;
};
+1 -1
View File
@@ -48,7 +48,7 @@ class Intro {
~Intro();
Intro(const Intro &) = delete;
Intro &operator=(const Intro &) = delete;
auto operator=(const Intro &) -> Intro & = delete;
// Bucle principal
void run();
+1 -1
View File
@@ -43,7 +43,7 @@ class Logo {
~Logo();
Logo(const Logo &) = delete;
Logo &operator=(const Logo &) = delete;
auto operator=(const Logo &) -> Logo & = delete;
// Bucle principal
void run();
+2 -2
View File
@@ -129,7 +129,7 @@ class Title {
void runDemoGame();
// Modifica las opciones para los controles de los jugadores
bool updatePlayerInputs(int numPlayer);
auto updatePlayerInputs(int numPlayer) -> bool;
// Crea el mosaico de fondo del titulo
void createTiledBackground();
@@ -148,7 +148,7 @@ class Title {
~Title();
Title(const Title &) = delete;
Title &operator=(const Title &) = delete;
auto operator=(const Title &) -> Title & = delete;
// Bucle para el titulo del juego
void run();