diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-03-27 23:17:55 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-03-27 23:17:55 +0300 |
commit | 930eeae09a3a7dc31c047d199c77ef9e284d37ba (patch) | |
tree | 733dce14ac39bf3eab15a5cf3e210238adde9447 /src/resources/spritedef.h | |
parent | 762280b60344ac6e7652e4b34b9614ca18693ddd (diff) | |
download | manaverse-930eeae09a3a7dc31c047d199c77ef9e284d37ba.tar.gz manaverse-930eeae09a3a7dc31c047d199c77ef9e284d37ba.tar.bz2 manaverse-930eeae09a3a7dc31c047d199c77ef9e284d37ba.tar.xz manaverse-930eeae09a3a7dc31c047d199c77ef9e284d37ba.zip |
Extend sequence animation tag. Allow set in attribute value any frame numbers.
Examples what doing same:
<sequence start="55" end="60" delay="75" />
<sequence value="55-60" delay="75" />
<sequence value="55,56,57,58,59,60" delay="75" />
Other examples:
<sequence value="55,p,56,p,58,p,59,p,60" delay="75" />
p mean pause.
Diffstat (limited to 'src/resources/spritedef.h')
-rw-r--r-- | src/resources/spritedef.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/resources/spritedef.h b/src/resources/spritedef.h index e167cf188..35b066296 100644 --- a/src/resources/spritedef.h +++ b/src/resources/spritedef.h @@ -34,6 +34,7 @@ #include <vector> class Action; +class Animation; class ImageSet; struct SpriteReference @@ -126,10 +127,16 @@ class SpriteDef : public Resource * Converts a string into a SpriteDirection enum. */ static SpriteDirection + makeSpriteDirection(const std::string &direction); void addAction(unsigned hp, std::string name, Action *action); + bool addSequence(int start, int end, int delay, + int offsetX, int offsetY, int variant_offset, + int repeat, int rand, ImageSet *imageSet, + Animation *animation); + private: /** * Constructor. |