treball en curs: correccions de tidy
This commit is contained in:
@@ -18,9 +18,9 @@ Balloon::Balloon(float x, float y, Uint8 kind, float velx, float speed, Uint16 c
|
||||
switch (kind) {
|
||||
case BALLOON_1:
|
||||
// Alto y ancho del objeto
|
||||
width_ = BALLOON_WIDTH_1;
|
||||
height_ = BALLOON_WIDTH_1;
|
||||
size_ = BALLOON_SIZE_1;
|
||||
width_ = WIDTH_1;
|
||||
height_ = WIDTH_1;
|
||||
size_ = SIZE_1;
|
||||
power_ = 1;
|
||||
|
||||
// Inicializa los valores de velocidad y gravedad
|
||||
@@ -31,7 +31,7 @@ Balloon::Balloon(float x, float y, Uint8 kind, float velx, float speed, Uint16 c
|
||||
default_vel_y_ = 2.6F;
|
||||
|
||||
// Puntos que da el globo al ser destruido
|
||||
score_ = BALLOON_SCORE_1;
|
||||
score_ = SCORE_1;
|
||||
|
||||
// Amenaza que genera el globo
|
||||
menace_ = 1;
|
||||
@@ -40,9 +40,9 @@ Balloon::Balloon(float x, float y, Uint8 kind, float velx, float speed, Uint16 c
|
||||
|
||||
case BALLOON_2:
|
||||
// Alto y ancho del objeto
|
||||
width_ = BALLOON_WIDTH_2;
|
||||
height_ = BALLOON_WIDTH_2;
|
||||
size_ = BALLOON_SIZE_2;
|
||||
width_ = WIDTH_2;
|
||||
height_ = WIDTH_2;
|
||||
size_ = SIZE_2;
|
||||
power_ = 3;
|
||||
|
||||
// Inicializa los valores de velocidad y gravedad
|
||||
@@ -53,7 +53,7 @@ Balloon::Balloon(float x, float y, Uint8 kind, float velx, float speed, Uint16 c
|
||||
default_vel_y_ = 3.5F;
|
||||
|
||||
// Puntos que da el globo al ser destruido
|
||||
score_ = BALLOON_SCORE_2;
|
||||
score_ = SCORE_2;
|
||||
|
||||
// Amenaza que genera el globo
|
||||
menace_ = 2;
|
||||
@@ -62,9 +62,9 @@ Balloon::Balloon(float x, float y, Uint8 kind, float velx, float speed, Uint16 c
|
||||
|
||||
case BALLOON_3:
|
||||
// Alto y ancho del objeto
|
||||
width_ = BALLOON_WIDTH_3;
|
||||
height_ = BALLOON_WIDTH_3;
|
||||
size_ = BALLOON_SIZE_3;
|
||||
width_ = WIDTH_3;
|
||||
height_ = WIDTH_3;
|
||||
size_ = SIZE_3;
|
||||
power_ = 7;
|
||||
|
||||
// Inicializa los valores de velocidad y gravedad
|
||||
@@ -75,7 +75,7 @@ Balloon::Balloon(float x, float y, Uint8 kind, float velx, float speed, Uint16 c
|
||||
default_vel_y_ = 4.50F;
|
||||
|
||||
// Puntos que da el globo al ser destruido
|
||||
score_ = BALLOON_SCORE_3;
|
||||
score_ = SCORE_3;
|
||||
|
||||
// Amenaza que genera el globo
|
||||
menace_ = 4;
|
||||
@@ -84,9 +84,9 @@ Balloon::Balloon(float x, float y, Uint8 kind, float velx, float speed, Uint16 c
|
||||
|
||||
case BALLOON_4:
|
||||
// Alto y ancho del objeto
|
||||
width_ = BALLOON_WIDTH_4;
|
||||
height_ = BALLOON_WIDTH_4;
|
||||
size_ = BALLOON_SIZE_4;
|
||||
width_ = WIDTH_4;
|
||||
height_ = WIDTH_4;
|
||||
size_ = SIZE_4;
|
||||
power_ = 15;
|
||||
|
||||
// Inicializa los valores de velocidad y gravedad
|
||||
@@ -97,7 +97,7 @@ Balloon::Balloon(float x, float y, Uint8 kind, float velx, float speed, Uint16 c
|
||||
default_vel_y_ = 4.95F;
|
||||
|
||||
// Puntos que da el globo al ser destruido
|
||||
score_ = BALLOON_SCORE_4;
|
||||
score_ = SCORE_4;
|
||||
|
||||
// Amenaza que genera el globo
|
||||
menace_ = 8;
|
||||
@@ -106,9 +106,9 @@ Balloon::Balloon(float x, float y, Uint8 kind, float velx, float speed, Uint16 c
|
||||
|
||||
case HEXAGON_1:
|
||||
// Alto y ancho del objeto
|
||||
width_ = BALLOON_WIDTH_1;
|
||||
height_ = BALLOON_WIDTH_1;
|
||||
size_ = BALLOON_SIZE_1;
|
||||
width_ = WIDTH_1;
|
||||
height_ = WIDTH_1;
|
||||
size_ = SIZE_1;
|
||||
power_ = 1;
|
||||
|
||||
// Inicializa los valores de velocidad y gravedad
|
||||
@@ -119,7 +119,7 @@ Balloon::Balloon(float x, float y, Uint8 kind, float velx, float speed, Uint16 c
|
||||
default_vel_y_ = std::fabs(velx) * 2;
|
||||
|
||||
// Puntos que da el globo al ser destruido
|
||||
score_ = BALLOON_SCORE_1;
|
||||
score_ = SCORE_1;
|
||||
|
||||
// Amenaza que genera el globo
|
||||
menace_ = 1;
|
||||
@@ -128,9 +128,9 @@ Balloon::Balloon(float x, float y, Uint8 kind, float velx, float speed, Uint16 c
|
||||
|
||||
case HEXAGON_2:
|
||||
// Alto y ancho del objeto
|
||||
width_ = BALLOON_WIDTH_2;
|
||||
height_ = BALLOON_WIDTH_2;
|
||||
size_ = BALLOON_SIZE_2;
|
||||
width_ = WIDTH_2;
|
||||
height_ = WIDTH_2;
|
||||
size_ = SIZE_2;
|
||||
power_ = 3;
|
||||
|
||||
// Inicializa los valores de velocidad y gravedad
|
||||
@@ -141,7 +141,7 @@ Balloon::Balloon(float x, float y, Uint8 kind, float velx, float speed, Uint16 c
|
||||
default_vel_y_ = std::fabs(velx) * 2;
|
||||
|
||||
// Puntos que da el globo al ser destruido
|
||||
score_ = BALLOON_SCORE_2;
|
||||
score_ = SCORE_2;
|
||||
|
||||
// Amenaza que genera el globo
|
||||
menace_ = 2;
|
||||
@@ -150,9 +150,9 @@ Balloon::Balloon(float x, float y, Uint8 kind, float velx, float speed, Uint16 c
|
||||
|
||||
case HEXAGON_3:
|
||||
// Alto y ancho del objeto
|
||||
width_ = BALLOON_WIDTH_3;
|
||||
height_ = BALLOON_WIDTH_3;
|
||||
size_ = BALLOON_SIZE_3;
|
||||
width_ = WIDTH_3;
|
||||
height_ = WIDTH_3;
|
||||
size_ = SIZE_3;
|
||||
power_ = 7;
|
||||
|
||||
// Inicializa los valores de velocidad y gravedad
|
||||
@@ -163,7 +163,7 @@ Balloon::Balloon(float x, float y, Uint8 kind, float velx, float speed, Uint16 c
|
||||
default_vel_y_ = std::fabs(velx) * 2;
|
||||
|
||||
// Puntos que da el globo al ser destruido
|
||||
score_ = BALLOON_SCORE_3;
|
||||
score_ = SCORE_3;
|
||||
|
||||
// Amenaza que genera el globo
|
||||
menace_ = 4;
|
||||
@@ -172,9 +172,9 @@ Balloon::Balloon(float x, float y, Uint8 kind, float velx, float speed, Uint16 c
|
||||
|
||||
case HEXAGON_4:
|
||||
// Alto y ancho del objeto
|
||||
width_ = BALLOON_WIDTH_4;
|
||||
height_ = BALLOON_WIDTH_4;
|
||||
size_ = BALLOON_SIZE_4;
|
||||
width_ = WIDTH_4;
|
||||
height_ = WIDTH_4;
|
||||
size_ = SIZE_4;
|
||||
power_ = 15;
|
||||
|
||||
// Inicializa los valores de velocidad y gravedad
|
||||
@@ -185,7 +185,7 @@ Balloon::Balloon(float x, float y, Uint8 kind, float velx, float speed, Uint16 c
|
||||
default_vel_y_ = std::fabs(velx) * 2;
|
||||
|
||||
// Puntos que da el globo al ser destruido
|
||||
score_ = BALLOON_SCORE_4;
|
||||
score_ = SCORE_4;
|
||||
|
||||
// Amenaza que genera el globo
|
||||
menace_ = 8;
|
||||
@@ -194,8 +194,8 @@ Balloon::Balloon(float x, float y, Uint8 kind, float velx, float speed, Uint16 c
|
||||
|
||||
case POWER_BALL:
|
||||
// Alto y ancho del objeto
|
||||
width_ = BALLOON_WIDTH_4;
|
||||
height_ = BALLOON_WIDTH_4;
|
||||
width_ = WIDTH_4;
|
||||
height_ = WIDTH_4;
|
||||
size_ = 4;
|
||||
power_ = 0;
|
||||
|
||||
|
||||
@@ -9,57 +9,57 @@
|
||||
class AnimatedSprite;
|
||||
class Texture;
|
||||
|
||||
// Tipos de globo
|
||||
constexpr int BALLOON_1 = 1;
|
||||
constexpr int BALLOON_2 = 2;
|
||||
constexpr int BALLOON_3 = 3;
|
||||
constexpr int BALLOON_4 = 4;
|
||||
constexpr int HEXAGON_1 = 5;
|
||||
constexpr int HEXAGON_2 = 6;
|
||||
constexpr int HEXAGON_3 = 7;
|
||||
constexpr int HEXAGON_4 = 8;
|
||||
constexpr int POWER_BALL = 9;
|
||||
|
||||
// Puntos de globo
|
||||
constexpr int BALLOON_SCORE_1 = 50;
|
||||
constexpr int BALLOON_SCORE_2 = 100;
|
||||
constexpr int BALLOON_SCORE_3 = 200;
|
||||
constexpr int BALLOON_SCORE_4 = 400;
|
||||
|
||||
// Tamaños de globo
|
||||
constexpr int BALLOON_SIZE_1 = 1;
|
||||
constexpr int BALLOON_SIZE_2 = 2;
|
||||
constexpr int BALLOON_SIZE_3 = 3;
|
||||
constexpr int BALLOON_SIZE_4 = 4;
|
||||
|
||||
// Clases de globo
|
||||
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;
|
||||
|
||||
// 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;
|
||||
|
||||
// Tamaño de los globos
|
||||
constexpr int BALLOON_WIDTH_1 = 8;
|
||||
constexpr int BALLOON_WIDTH_2 = 13;
|
||||
constexpr int BALLOON_WIDTH_3 = 21;
|
||||
constexpr int BALLOON_WIDTH_4 = 37;
|
||||
|
||||
// PowerBall
|
||||
constexpr int POWERBALL_SCREENPOWER_MINIMUM = 10;
|
||||
constexpr int POWERBALL_COUNTER = 8;
|
||||
|
||||
// Clase Balloon
|
||||
class Balloon {
|
||||
public:
|
||||
// Tipos de globo
|
||||
static constexpr int BALLOON_1 = 1;
|
||||
static constexpr int BALLOON_2 = 2;
|
||||
static constexpr int BALLOON_3 = 3;
|
||||
static constexpr int BALLOON_4 = 4;
|
||||
static constexpr int HEXAGON_1 = 5;
|
||||
static constexpr int HEXAGON_2 = 6;
|
||||
static constexpr int HEXAGON_3 = 7;
|
||||
static constexpr int HEXAGON_4 = 8;
|
||||
static constexpr int POWER_BALL = 9;
|
||||
|
||||
// Puntos de globo
|
||||
static constexpr int SCORE_1 = 50;
|
||||
static constexpr int SCORE_2 = 100;
|
||||
static constexpr int SCORE_3 = 200;
|
||||
static constexpr int SCORE_4 = 400;
|
||||
|
||||
// Tamaños de globo
|
||||
static constexpr int SIZE_1 = 1;
|
||||
static constexpr int SIZE_2 = 2;
|
||||
static constexpr int SIZE_3 = 3;
|
||||
static constexpr int SIZE_4 = 4;
|
||||
|
||||
// Clases de globo
|
||||
static constexpr int BALLOON_CLASS = 0;
|
||||
static constexpr int HEXAGON_CLASS = 1;
|
||||
|
||||
// Velocidad del globo
|
||||
static constexpr float VELX_POSITIVE = 0.7F;
|
||||
static constexpr float VELX_NEGATIVE = -0.7F;
|
||||
|
||||
// Velocidades a las que se mueven los globos
|
||||
static constexpr float SPEED_1 = 0.60F;
|
||||
static constexpr float SPEED_2 = 0.70F;
|
||||
static constexpr float SPEED_3 = 0.80F;
|
||||
static constexpr float SPEED_4 = 0.90F;
|
||||
static constexpr float SPEED_5 = 1.00F;
|
||||
|
||||
// Tamaño de los globos
|
||||
static constexpr int WIDTH_1 = 8;
|
||||
static constexpr int WIDTH_2 = 13;
|
||||
static constexpr int WIDTH_3 = 21;
|
||||
static constexpr int WIDTH_4 = 37;
|
||||
|
||||
// PowerBall
|
||||
static constexpr int POWERBALL_SCREENPOWER_MINIMUM = 10;
|
||||
static constexpr int POWERBALL_COUNTER = 8;
|
||||
|
||||
Balloon(float x, float y, Uint8 kind, float velx, float speed, Uint16 creationtimer, Texture *texture, std::vector<std::string> *animation, SDL_Renderer *renderer); // Constructor
|
||||
~Balloon(); // Destructor
|
||||
|
||||
|
||||
Reference in New Issue
Block a user