aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2015-04-26 23:31:29 -0500
committerPaul Gilbert2015-04-26 23:31:29 -0500
commit3a8aa6956812d8e69c6b5e1021ba5c05e3fe0b0b (patch)
tree1f2b5bad37ec69012c6947c6599eebbd0a72d986
parent3d483400698526a79fe31ac440bb2c410889f85f (diff)
downloadscummvm-rg350-3a8aa6956812d8e69c6b5e1021ba5c05e3fe0b0b.tar.gz
scummvm-rg350-3a8aa6956812d8e69c6b5e1021ba5c05e3fe0b0b.tar.bz2
scummvm-rg350-3a8aa6956812d8e69c6b5e1021ba5c05e3fe0b0b.zip
SHERLOCK: Fixes for using flower on lab table
-rw-r--r--engines/sherlock/scene.cpp4
-rw-r--r--engines/sherlock/talk.cpp3
-rw-r--r--engines/sherlock/user_interface.cpp2
3 files changed, 7 insertions, 2 deletions
diff --git a/engines/sherlock/scene.cpp b/engines/sherlock/scene.cpp
index 7c31788a2f..7b885a2cb9 100644
--- a/engines/sherlock/scene.cpp
+++ b/engines/sherlock/scene.cpp
@@ -953,6 +953,8 @@ int Scene::startCAnim(int cAnimNum, int playRate) {
cObj._imageFrame = &(*cObj._images)[0];
cObj._maxFrames = cObj._images->size();
+ ++_ongoingCans;
+
int frames = 0;
if (playRate < 0) {
// Reverse direction
@@ -1362,6 +1364,8 @@ void Scene::doBgAnim() {
screen.slamArea(o._position.x, o._position.y, o._delta.x, o._delta.y);
_canimShapes.remove_at(idx);
+ if (_ongoingCans > 0)
+ --_ongoingCans;
} else if (o._type == ACTIVE_BG_SHAPE) {
screen.flushImage(o._imageFrame, o._position,
&o._oldPosition.x, &o._oldPosition.y, &o._oldSize.x, &o._oldSize.y);
diff --git a/engines/sherlock/talk.cpp b/engines/sherlock/talk.cpp
index 94779ae760..ea2cb16252 100644
--- a/engines/sherlock/talk.cpp
+++ b/engines/sherlock/talk.cpp
@@ -312,7 +312,8 @@ void Talk::talkTo(const Common::String &filename) {
select = _talkIndex = idx;
}
- if (_scriptMoreFlag && _scriptSelect != 0)
+ // If there's a pending automatic selection to be made, then use it
+ if (_scriptMoreFlag && _scriptSelect != 100)
select = _scriptSelect;
if (select == -1)
diff --git a/engines/sherlock/user_interface.cpp b/engines/sherlock/user_interface.cpp
index 97f6cfd63a..e4d7255774 100644
--- a/engines/sherlock/user_interface.cpp
+++ b/engines/sherlock/user_interface.cpp
@@ -818,7 +818,7 @@ void UserInterface::lookScreen(const Common::Point &pt) {
tempStr.deleteLastChar();
}
- int xStart = (SHERLOCK_SCREEN_HEIGHT - x) / 2;
+ int xStart = (SHERLOCK_SCREEN_WIDTH - x) / 2;
screen.print(Common::Point(xStart, INFO_LINE + 1),
INFO_FOREGROUND, "Use ");