1 // Loads and stores an animation sequence
2 //
3 //
4 
5 #ifndef _ANIMATION_H_
6 #define _ANIMATION_H_
7 
8 //#define WIN32
9 
10 #include "SDL.h"
11 #include "SDL_image.h"
12 #include <vector>
13 
14 using namespace std;
15 
16 class Animation{
17 	public:
18 		Animation(char* spritename, char *filename, bool loop, char* knownAs);
19 		virtual ~Animation();
20 		SDL_Surface* getFrame();
21 		SDL_Surface* getFrame(int fnum);
22 		char* getKnown();
23 		void reset();
24 		bool loop;
25 		bool finished;
26 		char* name;
27 		char* knownAs;
28 	//private:
29 		int numframes;
30 		int currentframe;
31 		vector<SDL_Surface*> frames;
32 		int delay;
33 };
34 
35 #endif
36