aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/sherlock/objects.cpp3
-rw-r--r--engines/sherlock/scene.cpp8
2 files changed, 8 insertions, 3 deletions
diff --git a/engines/sherlock/objects.cpp b/engines/sherlock/objects.cpp
index 6231c9abc7..e66f2a68bd 100644
--- a/engines/sherlock/objects.cpp
+++ b/engines/sherlock/objects.cpp
@@ -424,6 +424,9 @@ Object::Object() {
_misc = 0;
_maxFrames = 0;
_flags = 0;
+ _aOpen._cAnimNum = 0;
+ _aOpen._cAnimSpeed = 0;
+ _aType = OBJECT;
_lookFrames = 0;
_seqCounter = 0;
_lookFacing = 0;
diff --git a/engines/sherlock/scene.cpp b/engines/sherlock/scene.cpp
index ea7d517301..d9161e25c0 100644
--- a/engines/sherlock/scene.cpp
+++ b/engines/sherlock/scene.cpp
@@ -892,9 +892,6 @@ int Scene::startCAnim(int cAnimNum, int playRate) {
CursorId oldCursor = events.getCursor();
events.setCursor(WAIT);
- _canimShapes.push_back(Object());
- Object &cObj = _canimShapes[_canimShapes.size() - 1];
-
if (walkPos.x != -1) {
// Holmes must walk to the walk point before the cAnimation is started
if (people[AL]._position != walkPos)
@@ -904,6 +901,10 @@ int Scene::startCAnim(int cAnimNum, int playRate) {
if (talk._talkToAbort)
return 1;
+ // Add new anim shape entry for displaying the animationo
+ _canimShapes.push_back(Object());
+ Object &cObj = _canimShapes[_canimShapes.size() - 1];
+
// Copy the canimation into the bgShapes type canimation structure so it can be played
cObj._allow = cAnimNum + 1; // Keep track of the parent structure
cObj._name = _cAnim[cAnimNum]._name; // Copy name
@@ -1304,6 +1305,7 @@ void Scene::doBgAnim() {
people[AL]._oldPosition.x + people[AL]._oldSize.x,
people[AL]._oldPosition.y + people[AL]._oldSize.y
));
+ people[AL]._type = INVALID;
} else {
screen.flushImage(people[AL]._imageFrame,
Common::Point(people[AL]._position.x / 100,