From 3e0383ac0c3101460453d8305468db8cc9ac38b2 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 25 Jul 2015 17:24:31 -0400 Subject: SHERLOCK: RT: Fix centering screen on person when scene starts --- engines/sherlock/scene.cpp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'engines/sherlock/scene.cpp') 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]; -- cgit v1.2.3