diff options
Diffstat (limited to 'sword1/screen.cpp')
| -rw-r--r-- | sword1/screen.cpp | 5 |
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]); |
