aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Howell2006-06-12 06:00:52 +0000
committerTravis Howell2006-06-12 06:00:52 +0000
commit1e358906ef6c540568788efec819851543ae0bcc (patch)
treee3629eb11ba58550d2a9643fcfe5715148711bc8
parente31ea42d1203aec0e9416aa308f5ae0aba9abbdf (diff)
downloadscummvm-rg350-1e358906ef6c540568788efec819851543ae0bcc.tar.gz
scummvm-rg350-1e358906ef6c540568788efec819851543ae0bcc.tar.bz2
scummvm-rg350-1e358906ef6c540568788efec819851543ae0bcc.zip
Fix errors in centreScroll() of FF
svn-id: r23053
-rw-r--r--engines/simon/vga.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/engines/simon/vga.cpp b/engines/simon/vga.cpp
index e9fb99d1ff..3d2b926aeb 100644
--- a/engines/simon/vga.cpp
+++ b/engines/simon/vga.cpp
@@ -2589,32 +2589,32 @@ void SimonEngine::centreScroll() {
if (_scrollXMax != 0) {
_scrollCount = 0;
x = _variableArray[15] - _scrollX;
- if (getBitFlag(85) || x >= 624) {
+ if (x < 17 || (getBitFlag(85) && x < 320)) {
+ x -= 320;
+ if (_scrollX < -x)
+ x = -_scrollX;
+ _scrollCount = x;
+ } else if ((getBitFlag(85) && x >= 320) || x >= 624) {
x -= 320;
tmp = _scrollXMax - _scrollX;
if (tmp < x)
x = tmp;
_scrollCount = x;
- } else if (x < 17) {
- x -= 320;
- if (_scrollX < -x)
- x = -_scrollX;
- _scrollCount = x;
}
} else if (_scrollYMax != 0) {
_scrollCount = 0;
y = _variableArray[16] - _scrollY;
- if (y >= 460) {
+ if (y < 30) {
+ y -= 240;
+ if (_scrollY < -y)
+ y = -_scrollY;
+ _scrollCount = y;
+ } else if (y >= 460) {
y -= 240;
tmp = _scrollYMax - _scrollY;
if (tmp < y)
y = tmp;
_scrollCount = y;
- } else if (y < 30) {
- y -= 240;
- if (_scrollY < -y)
- y = -_scrollY;
- _scrollCount = y;
}
}
}