summaryrefslogtreecommitdiff
path: root/noncore/games/sfcave-sdl/animatedimage.cpp
Unidiff
Diffstat (limited to 'noncore/games/sfcave-sdl/animatedimage.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/games/sfcave-sdl/animatedimage.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/noncore/games/sfcave-sdl/animatedimage.cpp b/noncore/games/sfcave-sdl/animatedimage.cpp
index d9d6ff6..441c647 100644
--- a/noncore/games/sfcave-sdl/animatedimage.cpp
+++ b/noncore/games/sfcave-sdl/animatedimage.cpp
@@ -5,5 +5,5 @@
5#include "animatedimage.h" 5#include "animatedimage.h"
6 6
7AnimatedImage :: AnimatedImage( QString file, int nFrames ) 7AnimatedImage :: AnimatedImage( string file, int nFrames )
8{ 8{
9 nrFrames = nFrames; 9 nrFrames = nFrames;
@@ -20,7 +20,4 @@ AnimatedImage :: AnimatedImage( QString file, int nFrames )
20 20
21 SDL_SetColorKey(image, SDL_SRCCOLORKEY | SDL_RLEACCEL, SDL_MapRGB( image->format, 0, 0, 0 ) ); 21 SDL_SetColorKey(image, SDL_SRCCOLORKEY | SDL_RLEACCEL, SDL_MapRGB( image->format, 0, 0, 0 ) );
22 //image = SDL_DisplayFormat( tmp );
23
24 //SDL_FreeSurface( tmp );
25 frameWidth = image->w/nrFrames; 22 frameWidth = image->w/nrFrames;
26 frameHeight = image->h; 23 frameHeight = image->h;
@@ -48,4 +45,7 @@ bool AnimatedImage :: nextFrame()
48void AnimatedImage :: draw( SDL_Surface *screen, int x, int y ) 45void AnimatedImage :: draw( SDL_Surface *screen, int x, int y )
49{ 46{
47 if ( !image )
48 return;
49
50 SDL_Rect dst; 50 SDL_Rect dst;
51 dst.x = currentFrame * frameWidth; 51 dst.x = currentFrame * frameWidth;