diff options
Diffstat (limited to 'engines/gob/aniobject.cpp')
| -rw-r--r-- | engines/gob/aniobject.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/engines/gob/aniobject.cpp b/engines/gob/aniobject.cpp index c6a9234eb9..9974874bbf 100644 --- a/engines/gob/aniobject.cpp +++ b/engines/gob/aniobject.cpp @@ -26,8 +26,8 @@ namespace Gob { -ANIObject::ANIObject(const ANIFile &ani) : _ani(&ani), _visible(false), - _x(0), _y(0), _background(0), _drawn(false) { +ANIObject::ANIObject(const ANIFile &ani) : _ani(&ani), + _visible(false), _paused(false), _x(0), _y(0), _background(0), _drawn(false) { setAnimation(0); setPosition(); @@ -45,6 +45,14 @@ bool ANIObject::isVisible() const { return _visible; } +void ANIObject::setPause(bool pause) { + _paused = pause; +} + +bool ANIObject::isPaused() const { + return _paused; +} + void ANIObject::setAnimation(uint16 animation) { _animation = animation; _frame = 0; @@ -152,6 +160,9 @@ void ANIObject::clear(Surface &dest, int16 &left, int16 &top, } void ANIObject::advance() { + if (_paused) + return; + if (_animation >= _ani->getAnimationCount()) return; |
