From e21b1af568fd255da8b2a1d45b42b9d9cb170eb4 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Mon, 12 Sep 2011 18:00:11 +0200 Subject: GOB: Add ANIObject::rewind() --- engines/gob/aniobject.cpp | 4 ++++ engines/gob/aniobject.h | 3 +++ 2 files changed, 7 insertions(+) (limited to 'engines') 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. */ -- cgit v1.2.3