diff options
author | Jared Adams <jaxad0127@gmail.com> | 2010-06-08 21:55:16 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2010-06-09 00:00:53 -0600 |
commit | ec980b3c586fc64d02ad02f31497013908056d52 (patch) | |
tree | c8a5c573bf8fc5ed2151f32cb7f8468bba31d72a /src/compoundsprite.h | |
parent | 891d14807cd042aa90aed94558c2c8eda66d6859 (diff) | |
download | mana-ec980b3c586fc64d02ad02f31497013908056d52.tar.gz mana-ec980b3c586fc64d02ad02f31497013908056d52.tar.bz2 mana-ec980b3c586fc64d02ad02f31497013908056d52.tar.xz mana-ec980b3c586fc64d02ad02f31497013908056d52.zip |
Remove hard-coded frame counts from Being class
Also removes the Monster/Player difference in tmwAthena's Being::logic
and moves the particle code from Being::setAttack to Being::Logic for
tmwAthena.
Reviewed-by: Chuck Miller
Diffstat (limited to 'src/compoundsprite.h')
-rw-r--r-- | src/compoundsprite.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/compoundsprite.h b/src/compoundsprite.h index c714c34b..38c38453 100644 --- a/src/compoundsprite.h +++ b/src/compoundsprite.h @@ -58,6 +58,10 @@ public: int getNumberOfLayers() const; + size_t getCurrentFrame() const; + + size_t getFrameCount() const; + size_t size() const { return std::vector<Sprite*>::size(); } @@ -74,6 +78,16 @@ public: void ensureSize(size_t layerCount); + /** + * Returns the curent frame in the current animation of the given layer. + */ + virtual size_t getCurrentFrame(size_t layer); + + /** + * Returns the frame count in the current animation of the given layer. + */ + virtual size_t getFrameCount(size_t layer); + private: typedef CompoundSprite::iterator SpriteIterator; typedef CompoundSprite::const_iterator SpriteConstIterator; |