summaryrefslogtreecommitdiff
path: root/noncore/games/sfcave-sdl/player.h
authorandyq <andyq>2003-01-20 23:11:56 (UTC)
committer andyq <andyq>2003-01-20 23:11:56 (UTC)
commit92419b025aa5d82bb7592281af5505ff931c2e58 (patch) (unidiff)
tree374ee9ca86ef716ce388c8a28e38261f6a04ce7a /noncore/games/sfcave-sdl/player.h
parent02090d2e63ad8398c0a8a9f1fb895a9c6e42514b (diff)
downloadopie-92419b025aa5d82bb7592281af5505ff931c2e58.zip
opie-92419b025aa5d82bb7592281af5505ff931c2e58.tar.gz
opie-92419b025aa5d82bb7592281af5505ff931c2e58.tar.bz2
Initial Revision
Diffstat (limited to 'noncore/games/sfcave-sdl/player.h') (more/less context) (show whitespace changes)
-rw-r--r--noncore/games/sfcave-sdl/player.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/noncore/games/sfcave-sdl/player.h b/noncore/games/sfcave-sdl/player.h
new file mode 100644
index 0000000..e4c904a
--- a/dev/null
+++ b/noncore/games/sfcave-sdl/player.h
@@ -0,0 +1,50 @@
1#ifndef __PLAYER_H
2#define __PLAYER_H
3
4#include "rect.h"
5
6class SDL_Surface;
7class AnimatedImage;
8
9class Player
10{
11public:
12 Player( int w, int h );
13 ~Player();
14
15 void init();
16 void draw( SDL_Surface *screen );
17 void drawTrails( SDL_Surface *screen );
18 void move( bool up );
19 void moveTrails();
20 Rect getPos() { return pos; }
21 int getX() { return pos.x(); }
22 int getY() { return pos.y(); }
23 int getHeight() { return pos.h(); }
24 bool updateCrashing();
25 void setMovementInfo( double up, double down, double maxUp, double maxDown );
26
27private:
28 AnimatedImage *explosion;
29
30 int sWidth;
31 int sHeight;
32
33 bool expNextFrame;
34 bool allFaded;
35 bool crashing;
36 bool crashed;
37 int crashLineLength;
38 Rect pos;
39 double thrust;
40
41 double thrustUp;
42 double thrustDown;
43 double maxUpSpeed;
44 double maxDownSpeed;
45
46 Rect trail[TRAILSIZE];
47
48};
49
50#endif