summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-04-09 03:13:43 +0300
committerAndrei Karas <akaras@inbox.ru>2011-04-09 03:13:43 +0300
commit3968453eb82521f6ab3966ff1dc08cd0c803d359 (patch)
treef1bec30f7e0baeb119cbb987873a5c5749cc119f /src/resources
parent73ff0a5f6b3fe6b26df14eb1dae413a26d002bbb (diff)
downloadmanaplus-3968453eb82521f6ab3966ff1dc08cd0c803d359.tar.gz
manaplus-3968453eb82521f6ab3966ff1dc08cd0c803d359.tar.bz2
manaplus-3968453eb82521f6ab3966ff1dc08cd0c803d359.tar.xz
manaplus-3968453eb82521f6ab3966ff1dc08cd0c803d359.zip
Add enum to animation actions support.
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/animation.cpp4
-rw-r--r--src/resources/animation.h7
2 files changed, 9 insertions, 2 deletions
diff --git a/src/resources/animation.cpp b/src/resources/animation.cpp
index fe5822f7b..98ea19f2a 100644
--- a/src/resources/animation.cpp
+++ b/src/resources/animation.cpp
@@ -31,7 +31,7 @@ Animation::Animation():
void Animation::addFrame(Image *image, int delay, int offsetX, int offsetY)
{
- Frame frame = { image, delay, offsetX, offsetY, "" };
+ Frame frame = { image, delay, offsetX, offsetY, Frame::ANIMATION, "" };
mFrames.push_back(frame);
mDuration += delay;
}
@@ -48,6 +48,6 @@ bool Animation::isTerminator(const Frame &candidate)
void Animation::addJump(std::string name)
{
- Frame frame = { 0, 0, 0, 0, name };
+ Frame frame = { 0, 0, 0, 0, Frame::JUMP, name };
mFrames.push_back(frame);
}
diff --git a/src/resources/animation.h b/src/resources/animation.h
index 9ec8396af..5130bc8dd 100644
--- a/src/resources/animation.h
+++ b/src/resources/animation.h
@@ -35,10 +35,17 @@ class Image;
*/
struct Frame
{
+ enum FrameType
+ {
+ ANIMATION = 0,
+ JUMP,
+ LABEL
+ };
Image *image;
int delay;
int offsetX;
int offsetY;
+ FrameType type;
std::string nextAction;
};