Trabajando en la carga de las animaciones
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#include "movingsprite.h"
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
|
||||
#ifndef ANIMATEDSPRITE_H
|
||||
#define ANIMATEDSPRITE_H
|
||||
@@ -39,29 +40,29 @@ public:
|
||||
// Establece el valor del contador
|
||||
void setAnimationCounter(std::string name, int num);
|
||||
|
||||
// Establece el rectangulo para un frame de una animación
|
||||
void setAnimationFrames(Uint8 index_animation, Uint8 index_frame, int x, int y, int w, int h);
|
||||
|
||||
// Establece la velocidad de una animación
|
||||
void setAnimationSpeed(std::string name, int speed);
|
||||
|
||||
// Establece el numero de frames de una animación
|
||||
void setAnimationNumFrames(Uint8 index, Uint8 num);
|
||||
|
||||
// Establece si la animación se reproduce en bucle
|
||||
void setAnimationLoop(Uint8 index, bool loop);
|
||||
void setAnimationLoop(std::string name, bool loop);
|
||||
|
||||
// Establece el valor de la variable
|
||||
void setCompleted(Uint8 index, bool value);
|
||||
void setCompleted(std::string name, bool value);
|
||||
|
||||
// Comprueba si ha terminado la animación
|
||||
bool isCompleted(Uint8 index);
|
||||
bool isCompleted(std::string name);
|
||||
|
||||
// Devuelve el rectangulo de una animación y frame concreto
|
||||
SDL_Rect getAnimationClip(Uint8 index_animation, Uint8 index_frame);
|
||||
SDL_Rect getAnimationClip(std::string name, Uint8 index);
|
||||
|
||||
// Obtiene el indice de la animación a partir del nombre
|
||||
int getIndex(std::string name);
|
||||
|
||||
// Carga la animación desde un fichero
|
||||
bool load(std::string filePath);
|
||||
|
||||
// Asigna variables a partir de dos cadenas
|
||||
bool setVars(int index, std::string var, std::string value);
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user