aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Göffringmann2004-12-04 04:41:17 +0000
committerRobert Göffringmann2004-12-04 04:41:17 +0000
commit634b99037bf923b4bd47405cb018f9f8fcd7eccf (patch)
treef560541a9ade73362d4f213284b733338bec668c
parent0f2117cbd023ccb764d2e211cc47f96bffd01cac (diff)
downloadscummvm-rg350-634b99037bf923b4bd47405cb018f9f8fcd7eccf.tar.gz
scummvm-rg350-634b99037bf923b4bd47405cb018f9f8fcd7eccf.tar.bz2
scummvm-rg350-634b99037bf923b4bd47405cb018f9f8fcd7eccf.zip
clear scroll offsets... not sure if this is actually necessary, but it *could* be related to bug #1077394
svn-id: r15981
-rw-r--r--sword1/screen.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/sword1/screen.cpp b/sword1/screen.cpp
index 3687da9708..0f33629cdc 100644
--- a/sword1/screen.cpp
+++ b/sword1/screen.cpp
@@ -68,8 +68,11 @@ int32 Screen::inRange(int32 a, int32 b, int32 c) { // return b(!) so that: a <=
}
void Screen::setScrolling(int16 offsetX, int16 offsetY) {
- if (!Logic::_scriptVars[SCROLL_FLAG])
+ if (!Logic::_scriptVars[SCROLL_FLAG]) {
+ Logic::_scriptVars[SCROLL_OFFSET_X] = _oldScrollX = 0;
+ Logic::_scriptVars[SCROLL_OFFSET_Y] = _oldScrollY = 0;
return ; // screen is smaller than 640x400 => no need for scrolling
+ }
offsetX = inRange(0, offsetX, Logic::_scriptVars[MAX_SCROLL_OFFSET_X]);
offsetY = inRange(0, offsetY, Logic::_scriptVars[MAX_SCROLL_OFFSET_Y]);