aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2015-08-01 16:03:01 -0400
committerPaul Gilbert2015-08-01 16:03:01 -0400
commit650c455e8525a8b294e966e7cc7a31a3f127a2dd (patch)
tree2054f320fdac74229b30054adaba1eed914e575d
parentaede69df3c495688cdacc17e2ca69cc28398f0e8 (diff)
downloadscummvm-rg350-650c455e8525a8b294e966e7cc7a31a3f127a2dd.tar.gz
scummvm-rg350-650c455e8525a8b294e966e7cc7a31a3f127a2dd.tar.bz2
scummvm-rg350-650c455e8525a8b294e966e7cc7a31a3f127a2dd.zip
SHERLOCK: RT: Fix setting default _lookPos in scrolled scenes
-rw-r--r--engines/sherlock/tattoo/tattoo_people.cpp3
-rw-r--r--engines/sherlock/tattoo/tattoo_user_interface.cpp3
2 files changed, 6 insertions, 0 deletions
diff --git a/engines/sherlock/tattoo/tattoo_people.cpp b/engines/sherlock/tattoo/tattoo_people.cpp
index cc5872e8c8..31aa3335d7 100644
--- a/engines/sherlock/tattoo/tattoo_people.cpp
+++ b/engines/sherlock/tattoo/tattoo_people.cpp
@@ -1119,6 +1119,9 @@ void TattooPerson::centerScreenOnPerson() {
ui._targetScroll.x = CLIP(_position.x / FIXED_INT_MULTIPLIER - SHERLOCK_SCREEN_WIDTH / 2,
0, screen._backBuffer1.w() - SHERLOCK_SCREEN_WIDTH);
screen._currentScroll = ui._targetScroll;
+
+ // Reset the default look position to the center of the screen
+ ui._lookPos = screen._currentScroll + Common::Point(SHERLOCK_SCREEN_WIDTH / 2, SHERLOCK_SCREEN_HEIGHT / 2);
}
/*----------------------------------------------------------------*/
diff --git a/engines/sherlock/tattoo/tattoo_user_interface.cpp b/engines/sherlock/tattoo/tattoo_user_interface.cpp
index 36f00f31b2..5b56c94d3a 100644
--- a/engines/sherlock/tattoo/tattoo_user_interface.cpp
+++ b/engines/sherlock/tattoo/tattoo_user_interface.cpp
@@ -362,6 +362,9 @@ void TattooUserInterface::doScroll() {
if (screen._currentScroll.x < _targetScroll.x)
screen._currentScroll.x = _targetScroll.x;
}
+
+ // Reset the default look position to the center of the new screen area
+ _lookPos = screen._currentScroll + Common::Point(SHERLOCK_SCREEN_WIDTH / 2, SHERLOCK_SCREEN_HEIGHT / 2);
}
void TattooUserInterface::doStandardControl() {