[go: up one dir, main page]

Menu

[r9]: / engine / ISprite.h  Maximize  Restore  History

Download this file

42 lines (38 with data), 1.0 kB

 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
36
37
38
39
40
41
42
#ifndef _ISPRITE_H_
#define _ISPRITE_H_
#include "Constants.h"
class ISprite
{
private:
int type, controlType, itemType;
int status;
SDL_Rect *rect;
//SDL_Surface *surface;
public:
ISprite();
virtual ~ISprite();
// Non virtual function prototypes
SDL_Surface* loadImage(string fileName);
void applySurface(int x, int y, SDL_Surface *souce, SDL_Surface *dest, SDL_Rect *clip);
void setType(const int &spriteType);
void setControlType(const int &cType);
void setItemType(const int &iType);
void setStatus(const int &newStatus);
void setLocation(const int &x, const int &y);
void setWH(const int &width, const int &height);
int getType();
int getControlType();
int getItemType();
int getStatus();
int getX();
int getY();
int getW();
int getH();
SDL_Rect* getRect();
// Virtual function prototypes
virtual void init();
virtual void draw(SDL_Surface *screen, SDL_Rect *camera);
virtual int handleInput(SDL_Event *event);
virtual void update();
};
#endif