aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/sherlock/objects.cpp28
-rw-r--r--engines/sherlock/scene.cpp10
2 files changed, 21 insertions, 17 deletions
diff --git a/engines/sherlock/objects.cpp b/engines/sherlock/objects.cpp
index 4cf26a3ad7..ca1bdfb2c5 100644
--- a/engines/sherlock/objects.cpp
+++ b/engines/sherlock/objects.cpp
@@ -693,24 +693,24 @@ bool Object::checkEndOfSequence() {
setObjSequence(seq, false);
}
}
- }
- if (_allow && _frameNumber == 0) {
- // canimation just ended
- if (_type != NO_SHAPE && _type != REMOVE) {
- _type = REMOVE;
+ if (_allow && _frameNumber == 0) {
+ // canimation just ended
+ if (_type != NO_SHAPE && _type != REMOVE) {
+ _type = REMOVE;
- if (!_countCAnimFrames) {
- // Save details before shape is removed
- _delta.x = _imageFrame->_frame.w;
- _delta.y = _imageFrame->_frame.h;
- _position = _imageFrame->_offset;
+ if (!_countCAnimFrames) {
+ // Save details before shape is removed
+ _delta.x = _imageFrame->_frame.w;
+ _delta.y = _imageFrame->_frame.h;
+ _position = _imageFrame->_offset;
- // Free the images
- delete _images;
+ // Free the images
+ delete _images;
+ }
+ } else {
+ _type = INVALID;
}
- } else {
- _type = INVALID;
}
}
diff --git a/engines/sherlock/scene.cpp b/engines/sherlock/scene.cpp
index 8a6681b5e0..1ce2183af1 100644
--- a/engines/sherlock/scene.cpp
+++ b/engines/sherlock/scene.cpp
@@ -663,13 +663,13 @@ void Scene::transitionToScene() {
if (cAnimNum != -1) {
CAnim &c = _cAnim[cAnimNum];
- Common::Point pt = c._position;
+ Common::Point pt = c._goto;
- c._position = Common::Point(-1, -1);
+ c._goto = Common::Point(-1, -1);
people[AL]._position = Common::Point(0, 0);
startCAnim(cAnimNum, 1);
- c._position = pt;
+ c._goto = pt;
}
}
@@ -875,7 +875,9 @@ int Scene::startCAnim(int cAnimNum, int playRate) {
tpDir = cAnim._teleportDir;
}
+ CursorId oldCursor = events.getCursor();
events.setCursor(WAIT);
+
_canimShapes.push_back(Object());
Object &cObj = _canimShapes[_canimShapes.size() - 1];
@@ -1040,6 +1042,8 @@ int Scene::startCAnim(int cAnimNum, int playRate) {
people.gotoStand(people[AL]);
}
+ events.setCursor(oldCursor);
+
return 1;
}