File: Animation.h

package info (click to toggle)
hannah 1.0-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 8,712 kB
  • ctags: 281
  • sloc: cpp: 2,210; sh: 214; makefile: 117
file content (35 lines) | stat: -rw-r--r-- 578 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Loads and stores an animation sequence
//
//

#ifndef _ANIMATION_H_
#define _ANIMATION_H_

//#define WIN32

#include "SDL.h"
#include "SDL_image.h"
#include <vector>

using namespace std;

class Animation{
	public:
		Animation(char* spritename, char *filename, bool loop, char* knownAs);
		virtual ~Animation();
		SDL_Surface* getFrame();
		SDL_Surface* getFrame(int fnum);
		char* getKnown();
		void reset();
		bool loop;
		bool finished;
		char* name;
		char* knownAs;
	//private:
		int numframes;
		int currentframe;
		vector<SDL_Surface*> frames;
		int delay;
};

#endif