Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

player.h

Go to the documentation of this file.
00001 #ifndef __PLAYER_H
00002 #define __PLAYER_H
00003 
00004 #include "rect.h"
00005 
00006 class SDL_Surface;
00007 class AnimatedImage;
00008 
00009 class Player
00010 {
00011 public:
00012         Player( int w, int h );
00013         ~Player();
00014 
00015         void init();
00016         void draw( SDL_Surface *screen );
00017         void drawTrails( SDL_Surface *screen );
00018         void move( bool up );
00019         void moveTrails();
00020         Rect getPos() { return pos; }
00021         int getX() { return pos.x(); }
00022         int getY() { return pos.y(); }
00023         int getHeight() { return pos.h(); }
00024         bool updateCrashing();
00025         void setMovementInfo( double up, double grav, double maxUp, double maxDown );
00026         void incValue( int valType );
00027         void decValue( int valType );
00028         double getValue( int valueType );
00029     string getValueString( int valueType );
00030     string getValueTypeString( int valueType );
00031     void setValue( int valueType, double val ); 
00032 
00033 private:
00034         AnimatedImage *explosion;
00035 
00036         int sWidth;
00037         int sHeight;
00038 
00039         bool expNextFrame;
00040         bool allFaded;
00041         bool crashing;
00042         bool crashed;
00043         int crashLineLength;
00044         Rect pos;
00045         double currentThrust;
00046 
00047         double thrust;
00048         double gravity;
00049         double maxUpSpeed;
00050         double maxDownSpeed;
00051 
00052         Rect trail[TRAILSIZE];
00053 
00054 };
00055 
00056 #endif

Generated on Sat Nov 5 16:17:24 2005 for OPIE by  doxygen 1.4.2