diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-04-04 22:08:55 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-04-04 22:08:55 +0300 |
commit | 4ad3a8e89e64ce3ae845d2786dd433ab2682393e (patch) | |
tree | 80234ae2e147686b822bd2579f9cbc0756aa2f90 /src/resources | |
parent | 5066c50c2869d3f8b13138947eaa3f52accc5ad0 (diff) | |
download | manaverse-4ad3a8e89e64ce3ae845d2786dd433ab2682393e.tar.gz manaverse-4ad3a8e89e64ce3ae845d2786dd433ab2682393e.tar.bz2 manaverse-4ad3a8e89e64ce3ae845d2786dd433ab2682393e.tar.xz manaverse-4ad3a8e89e64ce3ae845d2786dd433ab2682393e.zip |
Add support for animated emotes.
Not particles but really animated emotes.
First frame used as icon.
Diffstat (limited to 'src/resources')
-rw-r--r-- | src/resources/emotedb.cpp | 9 | ||||
-rw-r--r-- | src/resources/emotedb.h | 2 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/resources/emotedb.cpp b/src/resources/emotedb.cpp index 7e923c034..0492cb848 100644 --- a/src/resources/emotedb.cpp +++ b/src/resources/emotedb.cpp @@ -237,6 +237,15 @@ const AnimatedSprite *EmoteDB::getAnimation2(int id, const bool allowNull) return getAnimation(id, allowNull); } +AnimatedSprite *EmoteDB::getClone(int id, const bool allowNull) +{ + const AnimatedSprite *const sprite = getAnimation2(id, allowNull); + if (sprite) + return AnimatedSprite::clone(sprite); + + return nullptr; +} + const EmoteSprite *EmoteDB::getSprite(const int id, const bool allowNull) { const EmoteInfo *const info = get(id, allowNull); diff --git a/src/resources/emotedb.h b/src/resources/emotedb.h index c747042d5..3e4cd7789 100644 --- a/src/resources/emotedb.h +++ b/src/resources/emotedb.h @@ -77,6 +77,8 @@ namespace EmoteDB const bool allowNull = false) A_WARN_UNUSED; + AnimatedSprite *getClone(int id, const bool allowNull); + const EmoteSprite *getSprite(const int id, const bool allowNull = false) A_WARN_UNUSED; |