aboutsummaryrefslogtreecommitdiff
path: root/engines/sherlock/scene.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2015-07-25 17:24:31 -0400
committerPaul Gilbert2015-07-25 17:24:31 -0400
commit3e0383ac0c3101460453d8305468db8cc9ac38b2 (patch)
treec27ab0d486e4616201678175f40c033ddeeffe55 /engines/sherlock/scene.cpp
parent8753fa17d302297ff9cd2cc0156397fb4d3da0ed (diff)
downloadscummvm-rg350-3e0383ac0c3101460453d8305468db8cc9ac38b2.tar.gz
scummvm-rg350-3e0383ac0c3101460453d8305468db8cc9ac38b2.tar.bz2
scummvm-rg350-3e0383ac0c3101460453d8305468db8cc9ac38b2.zip
SHERLOCK: RT: Fix centering screen on person when scene starts
Diffstat (limited to 'engines/sherlock/scene.cpp')
-rw-r--r--engines/sherlock/scene.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/engines/sherlock/scene.cpp b/engines/sherlock/scene.cpp
index 2ae45b0530..8669d4c092 100644
--- a/engines/sherlock/scene.cpp
+++ b/engines/sherlock/scene.cpp
@@ -1207,15 +1207,6 @@ void Scene::transitionToScene() {
// Standard info, so set it
people[HOLMES]._position = hSavedPos;
people[HOLMES]._sequenceNumber = hSavedFacing;
-
- if (saves._justLoaded && IS_ROSE_TATTOO) {
- Tattoo::TattooUserInterface &ui = *(Tattoo::TattooUserInterface *)_vm->_ui;
-
- // For scrolling scenes, make sure the player is on-screen
- ui._targetScroll.x = CLIP(people[HOLMES]._position.x / FIXED_INT_MULTIPLIER -
- SHERLOCK_SCREEN_WIDTH / 8 - 250, 0, screen._backBuffer1.w() - SHERLOCK_SCREEN_WIDTH);
- screen._currentScroll = ui._targetScroll;
- }
} else {
// It's canimation information
cAnimNum = hSavedFacing - 101;
@@ -1230,6 +1221,11 @@ void Scene::transitionToScene() {
people[HOLMES]._position = Common::Point(0, 0);
}
+ // If the scene is capable of scrolling, set the current scroll so that whoever has control
+ // of the scroll code is in the middle of the screen
+ if (screen._backBuffer1.w() > SHERLOCK_SCREEN_WIDTH)
+ people[people._walkControl].centerScreenOnPerson();
+
for (uint objIdx = 0; objIdx < _bgShapes.size(); ++objIdx) {
Object &obj = _bgShapes[objIdx];