summaryrefslogtreecommitdiff
path: root/noncore/games/sfcave-sdl/animatedimage.cpp
authorsudonix <sudonix>2004-02-26 02:25:15 (UTC)
committer sudonix <sudonix>2004-02-26 02:25:15 (UTC)
commitb339031e14a607ff18e404e0395b1c2782b92fdc (patch) (unidiff)
treeecd65299976322166ee5dfb2c30f045dd542c1e1 /noncore/games/sfcave-sdl/animatedimage.cpp
parentcb72ff620022306e493421006b024b971449f864 (diff)
downloadopie-b339031e14a607ff18e404e0395b1c2782b92fdc.zip
opie-b339031e14a607ff18e404e0395b1c2782b92fdc.tar.gz
opie-b339031e14a607ff18e404e0395b1c2782b92fdc.tar.bz2
SDL includes corrected, CRs in some files removed, just for consistency :)
Diffstat (limited to 'noncore/games/sfcave-sdl/animatedimage.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/games/sfcave-sdl/animatedimage.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/games/sfcave-sdl/animatedimage.cpp b/noncore/games/sfcave-sdl/animatedimage.cpp
index 441c647..680b603 100644
--- a/noncore/games/sfcave-sdl/animatedimage.cpp
+++ b/noncore/games/sfcave-sdl/animatedimage.cpp
@@ -1,26 +1,26 @@
1#include "SDL.h" 1#include <SDL/SDL.h>
2#include "SDL_image.h" 2#include <SDL/SDL_image.h>
3 3
4#include "constants.h" 4#include "constants.h"
5#include "animatedimage.h" 5#include "animatedimage.h"
6 6
7AnimatedImage :: AnimatedImage( string file, int nFrames ) 7AnimatedImage :: AnimatedImage( string file, int nFrames )
8{ 8{
9 nrFrames = nFrames; 9 nrFrames = nFrames;
10 currentFrame = 0; 10 currentFrame = 0;
11 11
12 // Load image 12 // Load image
13 image = IMG_Load( (const char *)file.c_str() ); 13 image = IMG_Load( (const char *)file.c_str() );
14 if ( !image ) 14 if ( !image )
15 { 15 {
16 nrFrames = 0; 16 nrFrames = 0;
17 image = 0; 17 image = 0;
18 return; 18 return;
19 } 19 }
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 frameWidth = image->w/nrFrames; 22 frameWidth = image->w/nrFrames;
23 frameHeight = image->h; 23 frameHeight = image->h;
24} 24}
25 25
26AnimatedImage :: ~AnimatedImage() 26AnimatedImage :: ~AnimatedImage()