diff options
Diffstat (limited to 'src/resources')
-rw-r--r-- | src/resources/animation.h | 2 | ||||
-rw-r--r-- | src/resources/spritedef.cpp | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/resources/animation.h b/src/resources/animation.h index 1629aebf..14ba2b27 100644 --- a/src/resources/animation.h +++ b/src/resources/animation.h @@ -70,7 +70,7 @@ class Animation int getLength() const { return mFrames.size(); } /** - * Returns the duration of this animation. + * Returns the duration of this animation in milliseconds. */ int getDuration() const { return mDuration; } diff --git a/src/resources/spritedef.cpp b/src/resources/spritedef.cpp index 22312107..4375fb89 100644 --- a/src/resources/spritedef.cpp +++ b/src/resources/spritedef.cpp @@ -22,6 +22,7 @@ #include "resources/spritedef.h" #include "log.h" +#include "sprite.h" #include "resources/action.h" #include "resources/animation.h" @@ -224,7 +225,8 @@ void SpriteDef::loadAnimation(xmlNodePtr animationNode, // Get animation frames for_each_xml_child_node(frameNode, animationNode) { - const int delay = XML::getProperty(frameNode, "delay", 0); + const int delay = XML::getProperty(frameNode, "delay", + DEFAULT_FRAME_DELAY); int offsetX = XML::getProperty(frameNode, "offsetX", 0); int offsetY = XML::getProperty(frameNode, "offsetY", 0); |