aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorSven Hesse2011-09-12 18:00:11 +0200
committerSven Hesse2011-09-14 18:54:28 +0200
commite21b1af568fd255da8b2a1d45b42b9d9cb170eb4 (patch)
treea69f7b9439f4111fa35e265bc97960f368b4adaf /engines
parenta43794b9c4e7cfd5b5bba760c08e19350c7d0c98 (diff)
downloadscummvm-rg350-e21b1af568fd255da8b2a1d45b42b9d9cb170eb4.tar.gz
scummvm-rg350-e21b1af568fd255da8b2a1d45b42b9d9cb170eb4.tar.bz2
scummvm-rg350-e21b1af568fd255da8b2a1d45b42b9d9cb170eb4.zip
GOB: Add ANIObject::rewind()
Diffstat (limited to 'engines')
-rw-r--r--engines/gob/aniobject.cpp4
-rw-r--r--engines/gob/aniobject.h3
2 files changed, 7 insertions, 0 deletions
diff --git a/engines/gob/aniobject.cpp b/engines/gob/aniobject.cpp
index c689145b75..a01fe43672 100644
--- a/engines/gob/aniobject.cpp
+++ b/engines/gob/aniobject.cpp
@@ -63,6 +63,10 @@ void ANIObject::setAnimation(uint16 animation) {
_frame = 0;
}
+void ANIObject::rewind() {
+ _frame = 0;
+}
+
void ANIObject::setPosition() {
if (_animation >= _ani->getAnimationCount())
return;
diff --git a/engines/gob/aniobject.h b/engines/gob/aniobject.h
index dfadf79b06..28103007a6 100644
--- a/engines/gob/aniobject.h
+++ b/engines/gob/aniobject.h
@@ -72,6 +72,9 @@ public:
/** Set the animation number. */
void setAnimation(uint16 animation);
+ /** Rewind the current animation to the first frame. */
+ void rewind();
+
/** Return the current animation number. */
uint16 getAnimation() const;
/** Return the current frame number. */