Merge branch 'lua' of nslu34:disk/projects/SDLBotor into lua
[sdlbotor.git] / DAnimation.h
blob1269315142c8ae108e0058f7e5a13079e890e9ae
1 #ifndef DANIMATION_H
2 #define DANIMATION_H
4 #include "Tileset.h"
5 #include "drawable.h"
7 namespace botor
10 struct anim_t
12 unsigned int start;
13 unsigned int length;
14 unsigned int delay;
15 bool loop;
17 anim_t( unsigned int _start, unsigned int _length, unsigned int _delay, bool _loop = true );
20 class DAnimation : public Drawable
23 Tileset *set;
24 anim_t *anim;
26 unsigned int framescount;
27 unsigned int pos;
29 void Reset();
31 public:
33 DAnimation( Tileset *set );
34 ~DAnimation();
36 void load( anim_t *anim );
37 void Draw( Sint16 X, Sint16 Y );
38 bool finished();
45 #endif