objekt hihi
[sdlbotor.git] / DAnimation.h
blobd60f45e57dbba70c40c0338001e8d29a6bc3365f
1 #ifndef DANIMATION_H
2 #define DANIMATION_H
4 #include "drawable.h"
5 #include "Tileset.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