Estandaritzant noms segons convencions

This commit is contained in:
2024-10-10 20:27:31 +02:00
parent 9e5f41644e
commit d6c3c89872
67 changed files with 1457 additions and 1504 deletions

View File

@@ -15,30 +15,30 @@ 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 currentFrame; // Frame actual
int current_frame; // Frame actual
int counter; // Contador para las animaciones
};
struct animatedSprite_t
struct AnimatedFile
{
std::vector<Animation> animations; // Vector con las diferentes animaciones
std::shared_ptr<Texture> texture; // Textura con los graficos para el sprite
};
// Carga la animación desde un fichero
animatedSprite_t loadAnimationFromFile(std::shared_ptr<Texture> texture, std::string filePath);
AnimatedFile loadAnimationFromFile(std::shared_ptr<Texture> texture, std::string filePath);
class AnimatedSprite : public MovingSprite
{
private:
// Variables
std::vector<Animation> animations_; // Vector con las diferentes animaciones
int currentAnimation_; // Animacion activa
int current_animation_; // Animacion activa
public:
// Constructor
AnimatedSprite(std::shared_ptr<Texture> texture = nullptr, std::string file = "", std::vector<std::string> *buffer = nullptr);
AnimatedSprite(animatedSprite_t *animation);
AnimatedSprite(AnimatedFile *animation);
// Destructor
~AnimatedSprite();