The Game Engine  1
Animation.h
Go to the documentation of this file.
1 #ifndef __ANIMATION_H__
2 #define __ANIMATION_H__
3 #include "SpriteFrame.h"
4 #include <string>
5 #include <SDL/SDL.h>
6 #include <SDL/SDL_image.h>
7 
8 using std::vector;
9 using std::string;
10 
17 class Animation
18 {
19 public:
21  bool Built;
23  unsigned int NumFrames;
25  string Name;
27  vector<SpriteFrame*> Frames;
28 
29  Animation();
30  Animation(string animFile);
31  Animation(string animFile, string name);
32 
36  void clear();
37 
38  bool operator==(Animation a) {return Name==a.Name;}
39  bool operator!=(Animation a) {return Name!=a.Name;}
40 
41 protected:
43  bool loadAnimation(string animFile);
44 };
45 
46 #endif