Diffstat (limited to 'noncore/games/sfcave-sdl/player.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/games/sfcave-sdl/player.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/games/sfcave-sdl/player.cpp b/noncore/games/sfcave-sdl/player.cpp index 2d52ae2..f024d6b 100644 --- a/noncore/games/sfcave-sdl/player.cpp +++ b/noncore/games/sfcave-sdl/player.cpp @@ -12,49 +12,49 @@ Player :: Player( int w, int h ) sHeight = h; thrust = 0.4; gravity = 0.6; maxUpSpeed = 4.0; maxDownSpeed = 5.0; explosion = new AnimatedImage( IMAGES_PATH "explosion.bmp", 15 ); init(); } Player :: ~Player() { if ( explosion ) delete explosion; } void Player :: init() { // Set player position pos.x( 50 ); pos.y( sWidth/2 ); pos.h( 2 ); pos.w( 4 ); - thrust = 0; + currentThrust = 0; crashing = false; crashLineLength = 0; crashed = false; explosion->reset(); allFaded = false; expNextFrame = false; // Reset Trail for ( int i = 0 ; i < TRAILSIZE ; ++i ) { trail[i].x( -1 ); trail[i].y( 0 ); trail[i].w( 2 ); trail[i].h( 2 ); } } void Player :: draw( SDL_Surface *screen ) { if ( !crashing ) { // Draw Player // ellipseRGBA( screen, pos.x(), pos.y(), pos.x()+ pos.width(), pos.y()+pos.height(), 0, 255, 255, 255 ); filledEllipseRGBA( screen, pos.x() + pos.w(), pos.y(), pos.w(), pos.h(), 0, 255, 255, 255 ); |