From 634b99037bf923b4bd47405cb018f9f8fcd7eccf Mon Sep 17 00:00:00 2001 From: Robert Göffringmann Date: Sat, 4 Dec 2004 04:41:17 +0000 Subject: clear scroll offsets... not sure if this is actually necessary, but it *could* be related to bug #1077394 svn-id: r15981 --- sword1/screen.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sword1/screen.cpp') 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]); -- cgit v1.2.3