diff options
author | Paul Gilbert | 2015-05-02 16:29:08 -1000 |
---|---|---|
committer | Paul Gilbert | 2015-05-02 16:29:08 -1000 |
commit | 9ff445497fe53b72193dcf944b54091080c90964 (patch) | |
tree | fe057c65530a731818c82a81f09c0c941140c39f /engines | |
parent | eb4757d6e31171bde9b03fa44c20ab490639b5c0 (diff) | |
download | scummvm-rg350-9ff445497fe53b72193dcf944b54091080c90964.tar.gz scummvm-rg350-9ff445497fe53b72193dcf944b54091080c90964.tar.bz2 scummvm-rg350-9ff445497fe53b72193dcf944b54091080c90964.zip |
SHERLOCK: Properly close door when entering Sarah's flat
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sherlock/objects.cpp | 2 | ||||
-rw-r--r-- | engines/sherlock/scene.cpp | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/engines/sherlock/objects.cpp b/engines/sherlock/objects.cpp index fa5dfee26c..6f4795de7e 100644 --- a/engines/sherlock/objects.cpp +++ b/engines/sherlock/objects.cpp @@ -728,7 +728,7 @@ bool Object::checkEndOfSequence() { // Save details before shape is removed _delta.x = _imageFrame->_frame.w; _delta.y = _imageFrame->_frame.h; - _position = _imageFrame->_offset; + _position += _imageFrame->_offset; // Free the images delete _images; diff --git a/engines/sherlock/scene.cpp b/engines/sherlock/scene.cpp index ab57e9cfd2..2c5859024c 100644 --- a/engines/sherlock/scene.cpp +++ b/engines/sherlock/scene.cpp @@ -931,7 +931,7 @@ int Scene::startCAnim(int cAnimNum, int playRate) { cObj._frameNumber = -1; cObj._sequenceNumber = cAnimNum; cObj._oldPosition = Common::Point(0, 0); - cObj._oldPosition = Common::Point(0, 0); + cObj._oldSize = Common::Point(0, 0); cObj._goto = Common::Point(0, 0); cObj._status = 0; cObj._misc = 0; @@ -1050,6 +1050,10 @@ int Scene::startCAnim(int cAnimNum, int playRate) { cObj.checkObject(); for (uint idx = 0; idx < _canimShapes.size(); ++idx) { if (&_canimShapes[idx] == &cObj) { + // Do a final call to doBgAnim to erase the anim shape before it's erased + doBgAnim(); + + // Remove the completed sprite from the animation shapes array _canimShapes.remove_at(idx); break; } @@ -1372,7 +1376,7 @@ void Scene::doBgAnim() { } } - for (int idx = _canimShapes.size() - 1; idx >= 0; --idx) { + for (uint idx = 0; idx < _canimShapes.size(); ++idx) { Object &o = _canimShapes[idx]; if (o._type == REMOVE) { if (_goToScene == -1) |