diff options
author | Denis Kasak | 2009-07-18 02:53:37 +0000 |
---|---|---|
committer | Denis Kasak | 2009-07-18 02:53:37 +0000 |
commit | adf9e91e1fd1bc9e23147ef4ce100a5343a23ffa (patch) | |
tree | 203e0c4a11586e148bdd9fe55cba7dea7107fb0d /engines/draci/animation.h | |
parent | 8e1f29630869481f88911476d900f421fa0c2164 (diff) | |
download | scummvm-rg350-adf9e91e1fd1bc9e23147ef4ce100a5343a23ffa.tar.gz scummvm-rg350-adf9e91e1fd1bc9e23147ef4ce100a5343a23ffa.tar.bz2 scummvm-rg350-adf9e91e1fd1bc9e23147ef4ce100a5343a23ffa.zip |
* Added Animation::getFrame()
* Added support for sorting animations when Z is changed later on (AnimationManager::sortAnimations())
* Added support for relative coordinates (Animation::setRelative())
* Fixed bug where AnimationManager::deleteOverlays() deleted all animations
svn-id: r42579
Diffstat (limited to 'engines/draci/animation.h')
-rw-r--r-- | engines/draci/animation.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/engines/draci/animation.h b/engines/draci/animation.h index fea7fb3f89..66988482f0 100644 --- a/engines/draci/animation.h +++ b/engines/draci/animation.h @@ -32,6 +32,8 @@ namespace Draci { enum { kOverlayImage = -1, kUnused = -2 }; +enum { kCurrentFrame = -1 }; + class DraciEngine; class Animation { @@ -50,6 +52,7 @@ public: void drawFrame(Surface *surface); void addFrame(Drawable *frame); + Drawable *getFrame(int frameNum = kCurrentFrame); uint getFramesNum(); void deleteFrames(); @@ -59,6 +62,11 @@ public: bool isLooping(); void setLooping(bool looping); + void setRelative(int relx, int rely); + + int _relX; + int _relY; + private: uint nextFrameNum(); @@ -66,6 +74,7 @@ private: int _id; uint _currentFrame; uint _z; + uint _tick; bool _playing; bool _looping; @@ -96,7 +105,7 @@ public: Animation *getAnimation(int id); private: - + void sortAnimations(); void insertAnimation(Animation *anim); DraciEngine *_vm; |