Les enum class passen a estar totes amb la inicial en majuscula

This commit is contained in:
2024-10-07 12:30:46 +02:00
parent cffa4c3c92
commit 7ebefd7b54
16 changed files with 173 additions and 173 deletions

View File

@@ -15,7 +15,7 @@
#include "bullet.h" // for Bullet, BulletType::LEFT, BulletType::RIGHT
#include "enemy_formations.h" // for stage_t, EnemyFormations, enemyIni...
#include "explosions.h" // for Explosions
#include "fade.h" // for Fade, fadeType::RANDOM_SQUARE, FADE_VEN...
#include "fade.h" // for Fade, FadeType::RANDOM_SQUARE, FADE_VEN...
#include "global_inputs.h" // for globalInputs::check
#include "input.h" // for inputs_e, Input, INPUT_DO_NOT_ALLO...
#include "item.h" // for Item, ITEM_COFFEE_MACHINE, ITEM_CLOCK
@@ -24,7 +24,7 @@
#include "manage_hiscore_table.h" // for ManageHiScoreTable
#include "options.h" // for options
#include "param.h" // for param
#include "player.h" // for Player, playerStatus::PLAYING, PLA...
#include "player.h" // for Player, PlayerStatus::PLAYING, PLA...
#include "scoreboard.h" // for Scoreboard, scoreboard_modes_e
#include "screen.h" // for Screen
#include "smart_sprite.h" // for SmartSprite
@@ -146,7 +146,7 @@ void Game::init(int playerID)
Player *player = getPlayer(playerID);
// Cambia el estado del jugador seleccionado
player->setStatusPlaying(playerStatus::PLAYING);
player->setStatusPlaying(PlayerStatus::PLAYING);
// Como es el principio del juego, empieza sin inmunidad
player->setInvulnerable(false);
@@ -154,7 +154,7 @@ void Game::init(int playerID)
// Variables relacionadas con la dificultad
switch (difficulty)
{
case gameDifficulty::EASY:
case GameDifficulty::EASY:
{
defaultEnemySpeed = BALLOON_SPEED_1;
difficultyScoreMultiplier = 0.5f;
@@ -163,7 +163,7 @@ void Game::init(int playerID)
break;
}
case gameDifficulty::NORMAL:
case GameDifficulty::NORMAL:
{
defaultEnemySpeed = BALLOON_SPEED_1;
difficultyScoreMultiplier = 1.0f;
@@ -172,7 +172,7 @@ void Game::init(int playerID)
break;
}
case gameDifficulty::HARD:
case GameDifficulty::HARD:
{
defaultEnemySpeed = BALLOON_SPEED_5;
difficultyScoreMultiplier = 1.5f;
@@ -192,10 +192,10 @@ void Game::init(int playerID)
scoreboard->setName(player->getScoreBoardPanel(), player->getName());
if (player->isWaiting())
{
scoreboard->setMode(player->getScoreBoardPanel(), scoreboardMode::WAITING);
scoreboard->setMode(player->getScoreBoardPanel(), ScoreboardMode::WAITING);
}
}
scoreboard->setMode(SCOREBOARD_CENTER_PANEL, scoreboardMode::STAGE_INFO);
scoreboard->setMode(SCOREBOARD_CENTER_PANEL, ScoreboardMode::STAGE_INFO);
// Resto de variables
hiScore.score = options.game.hiScoreTable[0].score;
@@ -255,7 +255,7 @@ void Game::init(int playerID)
{
const int otherPlayer = playerID == 1 ? 2 : 1;
Player *player = getPlayer(otherPlayer);
player->setStatusPlaying(playerStatus::PLAYING);
player->setStatusPlaying(PlayerStatus::PLAYING);
}
for (auto player : players)
@@ -274,8 +274,8 @@ void Game::init(int playerID)
JA_EnableSound(false);
// Configura los marcadores
scoreboard->setMode(SCOREBOARD_LEFT_PANEL, scoreboardMode::DEMO);
scoreboard->setMode(SCOREBOARD_RIGHT_PANEL, scoreboardMode::DEMO);
scoreboard->setMode(SCOREBOARD_LEFT_PANEL, ScoreboardMode::DEMO);
scoreboard->setMode(SCOREBOARD_RIGHT_PANEL, ScoreboardMode::DEMO);
}
initPaths();
@@ -297,7 +297,7 @@ void Game::init(int playerID)
// Inicializa el objeto para el fundido
fade->setColor(fadeColor.r, fadeColor.g, fadeColor.b);
fade->setPost(param.fade.postDuration);
fade->setType(fadeType::VENETIAN);
fade->setType(FadeType::VENETIAN);
// Con los globos creados, calcula el nivel de amenaza
evaluateAndSetMenace();
@@ -861,7 +861,7 @@ void Game::updatePlayers()
if (demo.enabled && allPlayersAreNotPlaying())
{
fade->setType(fadeType::RANDOM_SQUARE);
fade->setType(FadeType::RANDOM_SQUARE);
fade->activate();
}
}
@@ -1037,7 +1037,7 @@ void Game::setBalloonSpeed(float speed)
void Game::incBalloonSpeed()
{
// La velocidad solo se incrementa en el modo normal
if (difficulty == gameDifficulty::NORMAL)
if (difficulty == GameDifficulty::NORMAL)
{
if (enemySpeed == BALLOON_SPEED_1)
{
@@ -1067,7 +1067,7 @@ void Game::incBalloonSpeed()
void Game::decBalloonSpeed()
{
// La velocidad solo se decrementa en el modo normal
if (difficulty == gameDifficulty::NORMAL)
if (difficulty == GameDifficulty::NORMAL)
{
if (enemySpeed == BALLOON_SPEED_5)
{
@@ -1740,7 +1740,7 @@ void Game::killPlayer(Player *player)
JA_PlaySound(playerCollisionSound);
screen->shake();
JA_PlaySound(coffeeOutSound);
player->setStatusPlaying(playerStatus::DYING);
player->setStatusPlaying(PlayerStatus::DYING);
if (!demo.enabled)
{ // En el modo DEMO ni se para la musica ni se añade la puntuación a la tabla
allPlayersAreNotPlaying() ? JA_StopMusic() : JA_ResumeMusic();
@@ -1840,7 +1840,7 @@ void Game::update()
// Activa el fundido antes de acabar con los datos de la demo
if (demo.counter == TOTAL_DEMO_DATA - 200)
{
fade->setType(fadeType::RANDOM_SQUARE);
fade->setType(FadeType::RANDOM_SQUARE);
fade->activate();
}
@@ -2237,7 +2237,7 @@ void Game::checkInput()
// Si no está jugando, el botón de start le permite continuar jugando
if (input->checkInput(input_start, INPUT_DO_NOT_ALLOW_REPEAT, options.controller[controllerIndex].deviceType, options.controller[controllerIndex].index))
{
player->setStatusPlaying(playerStatus::PLAYING);
player->setStatusPlaying(PlayerStatus::PLAYING);
}
// Si está continuando, los botones de fuego hacen decrementar el contador
@@ -2260,7 +2260,7 @@ void Game::checkInput()
{
player->setInput(input_start);
addScoreToScoreBoard(player->getRecordName(), player->getScore());
player->setStatusPlaying(playerStatus::CONTINUE);
player->setStatusPlaying(PlayerStatus::CONTINUE);
}
else
{
@@ -2287,7 +2287,7 @@ void Game::checkInput()
{
player->setInput(input_start);
addScoreToScoreBoard(player->getRecordName(), player->getScore());
player->setStatusPlaying(playerStatus::CONTINUE);
player->setStatusPlaying(PlayerStatus::CONTINUE);
}
}
}
@@ -2824,7 +2824,7 @@ void Game::checkAndUpdatePlayerStatus(int activePlayerIndex, int inactivePlayerI
!players[inactivePlayerIndex]->isGameOver() &&
!players[inactivePlayerIndex]->isWaiting())
{
players[activePlayerIndex]->setStatusPlaying(playerStatus::WAITING);
players[activePlayerIndex]->setStatusPlaying(PlayerStatus::WAITING);
}
}
@@ -2842,7 +2842,7 @@ void Game::checkPlayersStatusPlaying()
// Entonces los pone en estado de Game Over
for (auto player : players)
{
player->setStatusPlaying(playerStatus::GAME_OVER);
player->setStatusPlaying(PlayerStatus::GAME_OVER);
}
}