summaryrefslogtreecommitdiff
path: root/src/animatedsprite.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/animatedsprite.cpp')
-rw-r--r--src/animatedsprite.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/animatedsprite.cpp b/src/animatedsprite.cpp
index 7260a512..c1e89ff0 100644
--- a/src/animatedsprite.cpp
+++ b/src/animatedsprite.cpp
@@ -197,3 +197,27 @@ AnimatedSprite::setDirection(SpriteDirection direction)
}
}
}
+
+int
+AnimatedSprite::getWidth() const
+{
+ if (mFrame)
+ {
+ return mFrame->image->getWidth();
+ }
+ else {
+ return 0;
+ }
+}
+
+int
+AnimatedSprite::getHeight() const
+{
+ if (mFrame)
+ {
+ return mFrame->image->getHeight();
+ }
+ else {
+ return 0;
+ }
+}