renomena tipus _t/_e a CamelCase (Circle, Color, Section, ...)

This commit is contained in:
2026-05-14 22:16:36 +02:00
parent 9a2da460cc
commit 0bc55f5732
37 changed files with 209 additions and 209 deletions
+7 -7
View File
@@ -9,7 +9,7 @@
#include "core/rendering/movingsprite.h" // for MovingSprite
class Texture;
struct animation_t {
struct Animation {
std::string name; // Nombre de la animacion
std::vector<SDL_Rect> frames; // Cada uno de los frames que componen la animación
int speed; // Velocidad de la animación
@@ -19,27 +19,27 @@ struct animation_t {
int counter; // Contador para las animaciones
};
struct animatedSprite_t {
std::vector<animation_t> animations; // Vector con las diferentes animaciones
struct AnimatedSpriteData {
std::vector<Animation> animations; // Vector con las diferentes animaciones
Texture *texture; // Textura con los graficos para el sprite
};
// Carga la animación desde un fichero
auto loadAnimationFromFile(Texture *texture, const std::string &filePath, bool verbose = false) -> animatedSprite_t;
auto loadAnimationFromFile(Texture *texture, const std::string &filePath, bool verbose = false) -> AnimatedSpriteData;
// Carga la animación desde bytes en memoria
auto loadAnimationFromMemory(Texture *texture, const std::vector<uint8_t> &bytes, const std::string &nameForLogs = "", bool verbose = false) -> animatedSprite_t;
auto loadAnimationFromMemory(Texture *texture, const std::vector<uint8_t> &bytes, const std::string &nameForLogs = "", bool verbose = false) -> AnimatedSpriteData;
class AnimatedSprite : public MovingSprite {
private:
// Variables
std::vector<animation_t> animation; // Vector con las diferentes animaciones
std::vector<Animation> animation; // Vector con las diferentes animaciones
int currentAnimation; // Animacion activa
public:
// Constructor
explicit AnimatedSprite(Texture *texture = nullptr, SDL_Renderer *renderer = nullptr, const std::string &file = "", std::vector<std::string> *buffer = nullptr);
AnimatedSprite(SDL_Renderer *renderer, animatedSprite_t *animation);
AnimatedSprite(SDL_Renderer *renderer, AnimatedSpriteData *animation);
// Destructor
~AnimatedSprite() override;