aboutsummaryrefslogtreecommitdiff
path: root/engines/sherlock
diff options
context:
space:
mode:
authorPaul Gilbert2015-09-29 20:15:04 -0400
committerPaul Gilbert2015-09-29 20:15:04 -0400
commitf5ea337656a8e10743233d1a667d056e1ca05f51 (patch)
treea358c7a4ae07affaa18ad0f14bbb7da6fc6c331c /engines/sherlock
parentf633b02d62f0e2dc4aad3b9220d13f71aeaecdee (diff)
downloadscummvm-rg350-f5ea337656a8e10743233d1a667d056e1ca05f51.tar.gz
scummvm-rg350-f5ea337656a8e10743233d1a667d056e1ca05f51.tar.bz2
scummvm-rg350-f5ea337656a8e10743233d1a667d056e1ca05f51.zip
SHERLOCK: RT: Fix restoring background when expanding map closeup
Diffstat (limited to 'engines/sherlock')
-rw-r--r--engines/sherlock/tattoo/tattoo_map.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/engines/sherlock/tattoo/tattoo_map.cpp b/engines/sherlock/tattoo/tattoo_map.cpp
index 8438734996..4c7e8c8fef 100644
--- a/engines/sherlock/tattoo/tattoo_map.cpp
+++ b/engines/sherlock/tattoo/tattoo_map.cpp
@@ -365,8 +365,7 @@ void TattooMap::showCloseUp(int closeUpNum) {
Events &events = *_vm->_events;
Screen &screen = *_vm->_screen;
- // Reset scroll position
- screen._currentScroll = Common::Point(0, 0);
+ // Hide the cursor
events.hideCursor();
// Get the closeup images
@@ -404,7 +403,8 @@ void TattooMap::showCloseUp(int closeUpNum) {
for (int step = 0; step < CLOSEUP_STEPS; ++step) {
Common::Point picSize(pic[0].sDrawXSize(scaleVal), pic[0].sDrawYSize(scaleVal));
- Common::Point pt(closeUp.x / 100 - picSize.x / 2, closeUp.y / 100 - picSize.y / 2);
+ Common::Point pt(screen._currentScroll.x + closeUp.x / 100 - picSize.x / 2,
+ screen._currentScroll.y + closeUp.y / 100 - picSize.y / 2);
restoreArea(oldBounds);
screen._backBuffer1.transBlitFrom(pic[0], pt, false, 0, scaleVal);
@@ -420,9 +420,10 @@ void TattooMap::showCloseUp(int closeUpNum) {
}
// Handle final drawing of closeup
- Common::Rect r(SHERLOCK_SCREEN_WIDTH / 2 - pic[0]._width / 2, SHERLOCK_SCREEN_HEIGHT / 2 - pic[0]._height / 2,
- SHERLOCK_SCREEN_WIDTH / 2 - pic[0]._width / 2 + pic[0]._width,
- SHERLOCK_SCREEN_HEIGHT / 2 - pic[0]._height / 2 + pic[0]._height);
+ Common::Rect r(screen._currentScroll.x + SHERLOCK_SCREEN_WIDTH / 2 - pic[0]._width / 2,
+ screen._currentScroll.y + SHERLOCK_SCREEN_HEIGHT / 2 - pic[0]._height / 2,
+ screen._currentScroll.x + SHERLOCK_SCREEN_WIDTH / 2 - pic[0]._width / 2 + pic[0]._width,
+ screen._currentScroll.y + SHERLOCK_SCREEN_HEIGHT / 2 - pic[0]._height / 2 + pic[0]._height);
restoreArea(oldBounds);
screen._backBuffer1.transBlitFrom(pic[0], Common::Point(r.left, r.top));