author | andyq <andyq> | 2003-01-21 20:37:00 (UTC) |
---|---|---|
committer | andyq <andyq> | 2003-01-21 20:37:00 (UTC) |
commit | 0a6563fcc2f49857c581d9def24407a3a4ef526c (patch) (unidiff) | |
tree | f1b82a4bd7582ef2cb722cffb87eecff1e1f96e6 /noncore/games/sfcave-sdl/player.h | |
parent | 50b5915b48fc5cbacf23e4d2b75d7a266f141a4a (diff) | |
download | opie-0a6563fcc2f49857c581d9def24407a3a4ef526c.zip opie-0a6563fcc2f49857c581d9def24407a3a4ef526c.tar.gz opie-0a6563fcc2f49857c581d9def24407a3a4ef526c.tar.bz2 |
Clean up of code - fixed memory leaks (most of them) and added new custom config menu
Diffstat (limited to 'noncore/games/sfcave-sdl/player.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/games/sfcave-sdl/player.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/noncore/games/sfcave-sdl/player.h b/noncore/games/sfcave-sdl/player.h index e4c904a..595c25b 100644 --- a/noncore/games/sfcave-sdl/player.h +++ b/noncore/games/sfcave-sdl/player.h | |||
@@ -13,38 +13,44 @@ public: | |||
13 | ~Player(); | 13 | ~Player(); |
14 | 14 | ||
15 | void init(); | 15 | void init(); |
16 | void draw( SDL_Surface *screen ); | 16 | void draw( SDL_Surface *screen ); |
17 | void drawTrails( SDL_Surface *screen ); | 17 | void drawTrails( SDL_Surface *screen ); |
18 | void move( bool up ); | 18 | void move( bool up ); |
19 | void moveTrails(); | 19 | void moveTrails(); |
20 | Rect getPos() { return pos; } | 20 | Rect getPos() { return pos; } |
21 | int getX() { return pos.x(); } | 21 | int getX() { return pos.x(); } |
22 | int getY() { return pos.y(); } | 22 | int getY() { return pos.y(); } |
23 | int getHeight() { return pos.h(); } | 23 | int getHeight() { return pos.h(); } |
24 | bool updateCrashing(); | 24 | bool updateCrashing(); |
25 | void setMovementInfo( double up, double down, double maxUp, double maxDown ); | 25 | void setMovementInfo( double up, double grav, double maxUp, double maxDown ); |
26 | void incValue( int valType ); | ||
27 | void decValue( int valType ); | ||
28 | double getValue( int valueType ); | ||
29 | string getValueString( int valueType ); | ||
30 | string getValueTypeString( int valueType ); | ||
31 | void setValue( int valueType, double val ); | ||
26 | 32 | ||
27 | private: | 33 | private: |
28 | AnimatedImage *explosion; | 34 | AnimatedImage *explosion; |
29 | 35 | ||
30 | int sWidth; | 36 | int sWidth; |
31 | int sHeight; | 37 | int sHeight; |
32 | 38 | ||
33 | bool expNextFrame; | 39 | bool expNextFrame; |
34 | bool allFaded; | 40 | bool allFaded; |
35 | bool crashing; | 41 | bool crashing; |
36 | bool crashed; | 42 | bool crashed; |
37 | int crashLineLength; | 43 | int crashLineLength; |
38 | Rect pos; | 44 | Rect pos; |
39 | double thrust; | 45 | double currentThrust; |
40 | 46 | ||
41 | double thrustUp; | 47 | double thrust; |
42 | double thrustDown; | 48 | double gravity; |
43 | double maxUpSpeed; | 49 | double maxUpSpeed; |
44 | double maxDownSpeed; | 50 | double maxDownSpeed; |
45 | 51 | ||
46 | Rect trail[TRAILSIZE]; | 52 | Rect trail[TRAILSIZE]; |
47 | 53 | ||
48 | }; | 54 | }; |
49 | 55 | ||
50 | #endif | 56 | #endif |