author | sudonix <sudonix> | 2004-02-26 02:25:15 (UTC) |
---|---|---|
committer | sudonix <sudonix> | 2004-02-26 02:25:15 (UTC) |
commit | b339031e14a607ff18e404e0395b1c2782b92fdc (patch) (side-by-side diff) | |
tree | ecd65299976322166ee5dfb2c30f045dd542c1e1 /noncore/games/sfcave-sdl/animatedimage.cpp | |
parent | cb72ff620022306e493421006b024b971449f864 (diff) | |
download | opie-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) (show whitespace changes)
-rw-r--r-- | noncore/games/sfcave-sdl/animatedimage.cpp | 4 |
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,50 +1,50 @@ -#include "SDL.h" -#include "SDL_image.h" +#include <SDL/SDL.h> +#include <SDL/SDL_image.h> #include "constants.h" #include "animatedimage.h" AnimatedImage :: AnimatedImage( string file, int nFrames ) { nrFrames = nFrames; currentFrame = 0; // Load image image = IMG_Load( (const char *)file.c_str() ); if ( !image ) { nrFrames = 0; image = 0; return; } SDL_SetColorKey(image, SDL_SRCCOLORKEY | SDL_RLEACCEL, SDL_MapRGB( image->format, 0, 0, 0 ) ); frameWidth = image->w/nrFrames; frameHeight = image->h; } AnimatedImage :: ~AnimatedImage() { if ( image != 0 ) SDL_FreeSurface( image ); } bool AnimatedImage :: nextFrame() { bool rc = true; currentFrame ++; if ( currentFrame >= nrFrames ) { currentFrame --; rc = false; } return rc; } void AnimatedImage :: draw( SDL_Surface *screen, int x, int y ) { if ( !image ) return; SDL_Rect dst; |