treball en curs: correccions de tidy
This commit is contained in:
@@ -15,7 +15,7 @@ struct Animation {
|
||||
int speed; // Velocidad de la animación
|
||||
int loop; // Indica a que frame vuelve la animación al terminar. -1 para que no vuelva
|
||||
bool completed; // Indica si ha finalizado la animación
|
||||
int current_frame; // Frame actual
|
||||
int current_frame; // Frame actual
|
||||
int counter; // Contador para las animaciones
|
||||
};
|
||||
|
||||
@@ -37,9 +37,9 @@ class AnimatedSprite : public MovingSprite {
|
||||
|
||||
~AnimatedSprite() override; // Destructor
|
||||
|
||||
void animate(); // Calcula el frame correspondiente a la animación actual
|
||||
auto getNumFrames() -> int; // Obtiene el numero de frames de la animación actual
|
||||
void setCurrentFrame(int num); // Establece el frame actual de la animación
|
||||
void animate(); // Calcula el frame correspondiente a la animación actual
|
||||
auto getNumFrames() -> int; // Obtiene el numero de frames de la animación actual
|
||||
void setCurrentFrame(int num); // Establece el frame actual de la animación
|
||||
void setAnimationCounter(const std::string &name, int num); // Establece el valor del contador
|
||||
|
||||
void setAnimationSpeed(const std::string &name, int speed); // Establece la velocidad de una animación
|
||||
@@ -56,7 +56,7 @@ class AnimatedSprite : public MovingSprite {
|
||||
auto getAnimationClip(const std::string &name = "default", Uint8 index = 0) -> SDL_Rect; // Devuelve el rectangulo de una animación y frame concreto
|
||||
auto getAnimationClip(int index_a = 0, Uint8 index_f = 0) -> SDL_Rect;
|
||||
|
||||
auto getIndex(const std::string &name) -> int; // Obtiene el indice de la animación a partir del nombre
|
||||
auto getIndex(const std::string &name) -> int; // Obtiene el indice de la animación a partir del nombre
|
||||
auto loadFromVector(std::vector<std::string> *source) -> bool; // Carga la animación desde un vector
|
||||
|
||||
void setCurrentAnimation(const std::string &name = "default"); // Establece la animacion actual
|
||||
@@ -65,12 +65,12 @@ class AnimatedSprite : public MovingSprite {
|
||||
void update() override; // Actualiza las variables del objeto
|
||||
|
||||
void setAnimationFrames(Uint8 index_animation, Uint8 index_frame, int x, int y, int w, int h); // OLD - Establece el rectangulo para un frame de una animación
|
||||
void setAnimationCounter(int value); // OLD - Establece el contador para todas las animaciones
|
||||
void setAnimationCounter(int value); // OLD - Establece el contador para todas las animaciones
|
||||
|
||||
void resetAnimation(); // Reinicia la animación
|
||||
|
||||
private:
|
||||
// Variables
|
||||
std::vector<Animation> animation_; // Vector con las diferentes animaciones
|
||||
int current_animation_; // Animacion activa
|
||||
int current_animation_; // Animacion activa
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user