From 92419b025aa5d82bb7592281af5505ff931c2e58 Mon Sep 17 00:00:00 2001 From: andyq Date: Mon, 20 Jan 2003 23:11:56 +0000 Subject: Initial Revision --- (limited to 'noncore/games/sfcave-sdl/animatedimage.h') diff --git a/noncore/games/sfcave-sdl/animatedimage.h b/noncore/games/sfcave-sdl/animatedimage.h new file mode 100644 index 0000000..1b38e6d --- a/dev/null +++ b/noncore/games/sfcave-sdl/animatedimage.h @@ -0,0 +1,25 @@ +#ifndef __ANIMATED_IMAGE_H +#define __ANIMATED_IMAGE_H + +#include "SDL.h" + +class AnimatedImage +{ +public: + AnimatedImage( QString file, int nFrames ); + ~AnimatedImage(); + + bool nextFrame(); + void draw( SDL_Surface *screen, int x, int y ); + bool AtEnd(); + void reset() { currentFrame = 0; } +private: + + SDL_Surface *image; + int nrFrames; + int currentFrame; + + int frameWidth; + int frameHeight; +}; +#endif -- cgit v0.9.0.2