aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicola Mettifogo2008-12-24 09:53:00 +0000
committerNicola Mettifogo2008-12-24 09:53:00 +0000
commit41ebd732f59bd14220c050225153082f29e75b9b (patch)
treeafb75296eaa01e31f72d244e95ebcc956de232d4
parent6c1dc0c03bcdbfeeb3bf8be7285d43228f244846 (diff)
downloadscummvm-rg350-41ebd732f59bd14220c050225153082f29e75b9b.tar.gz
scummvm-rg350-41ebd732f59bd14220c050225153082f29e75b9b.tar.bz2
scummvm-rg350-41ebd732f59bd14220c050225153082f29e75b9b.zip
Fixed display of location background when changing from a scrollable to a non-scrollable one.
svn-id: r35522
-rw-r--r--engines/parallaction/graphics.cpp2
-rw-r--r--engines/parallaction/parallaction.cpp6
2 files changed, 4 insertions, 4 deletions
diff --git a/engines/parallaction/graphics.cpp b/engines/parallaction/graphics.cpp
index c30eb837bf..83570013fa 100644
--- a/engines/parallaction/graphics.cpp
+++ b/engines/parallaction/graphics.cpp
@@ -817,7 +817,7 @@ void Gfx::setBackground(uint type, BackgroundInfo *info) {
}
_minScroll = 0;
- _maxScroll = _backgroundInfo->width - _vm->_screenWidth;
+ _maxScroll = MAX(0, _backgroundInfo->width - _vm->_screenWidth);
}
} // namespace Parallaction
diff --git a/engines/parallaction/parallaction.cpp b/engines/parallaction/parallaction.cpp
index cfadb9602e..5628c3c8c6 100644
--- a/engines/parallaction/parallaction.cpp
+++ b/engines/parallaction/parallaction.cpp
@@ -145,8 +145,9 @@ void Parallaction::updateView() {
#define SCROLL_BAND_WIDTH 120
+ int scrollX = 0;
if (canScroll()) {
- int scrollX = _gfx->getScrollPos();
+ scrollX = _gfx->getScrollPos();
Common::Point foot;
_char.getFoot(foot);
@@ -163,9 +164,8 @@ void Parallaction::updateView() {
if (foot.x > max) {
scrollX += (foot.x - max);
}
-
- _gfx->setScrollPos(scrollX);
}
+ _gfx->setScrollPos(scrollX);
_gfx->animatePalette();
_gfx->updateScreen();