-
Notifications
You must be signed in to change notification settings - Fork 0
/
Mario.h
executable file
·59 lines (41 loc) · 1.11 KB
/
Mario.h
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/*
Mario.h
Sean T Fitzgerald, Jon T Gautsch, Daniel Y Tamaru, Maribeth E Rauh
Final Project CSE 20212 Spring 2013
The character that animates through the level
*/
#ifndef MARIO_H
#define MARIO_H
#include "constants.h"
#include "SDL_Program.h"
#include "SDL/SDL.h"
#include "SDL/SDL_image.h"
class Mario : public SDL_Program
{
public:
// initializes the variables
Mario();
~Mario();
Mario(std::string);
// shows Mario
void show(SDL_Surface*);
// define clip locations
void set_clips();
// clean up function for Mario
virtual void cleanUp();
// Mario surface
SDL_Surface *marioSurface;
// areas of the sprite sheet
SDL_Rect standClip[ 1 ];
SDL_Rect stepClips[ 2 ];
SDL_Rect jumpClip[ 1 ];
SDL_Rect turnClip[ 1 ];
SDL_Rect kickClip[ 1 ];
// animation status
int status;
SDL_Rect marioRect;
private:
// current frame of Mario animation being shown
int frame;
};
#endif //defined MARIO_H