aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorNicola Mettifogo2008-12-06 06:13:48 +0000
committerNicola Mettifogo2008-12-06 06:13:48 +0000
commit3fc72c63d930c07a52c9c34c36eb1ef58271e42a (patch)
treedfc9500614216cae6eb37e357249fcade803e454 /engines
parent7681461b16ee09eb8620fc99d8cd9445c263594b (diff)
downloadscummvm-rg350-3fc72c63d930c07a52c9c34c36eb1ef58271e42a.tar.gz
scummvm-rg350-3fc72c63d930c07a52c9c34c36eb1ef58271e42a.tar.bz2
scummvm-rg350-3fc72c63d930c07a52c9c34c36eb1ef58271e42a.zip
Simplified scrolling calculations.
svn-id: r35254
Diffstat (limited to 'engines')
-rw-r--r--engines/parallaction/parallaction.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/parallaction/parallaction.cpp b/engines/parallaction/parallaction.cpp
index 4a5436b4a6..652e7660d0 100644
--- a/engines/parallaction/parallaction.cpp
+++ b/engines/parallaction/parallaction.cpp
@@ -168,10 +168,10 @@ void Parallaction::updateView() {
int max = _vm->_screenWidth - SCROLL_BAND_WIDTH;
if (foot.x < min) {
- scrollX = CLIP(scrollX - (min - foot.x), 0, scrollX);
+ scrollX -= (min - foot.x);
} else
if (foot.x > max) {
- scrollX = CLIP(scrollX + (foot.x - max), scrollX, _vm->_gfx->_backgroundInfo->width - _vm->_screenWidth);
+ scrollX += (foot.x - max);
}
_gfx->setScrollPos(scrollX);