aboutsummaryrefslogtreecommitdiff
path: root/engines/agos/charset.cpp
diff options
context:
space:
mode:
authorTravis Howell2009-07-06 06:21:59 +0000
committerTravis Howell2009-07-06 06:21:59 +0000
commitdc0f6dce7698ce383ad7ca82f8ae1dcba984a044 (patch)
tree91bd92cb5835a456efa42361d5b9fd5a8bf619db /engines/agos/charset.cpp
parent08df8dc2721808c7019f49d9051e2eebfe8dad9c (diff)
downloadscummvm-rg350-dc0f6dce7698ce383ad7ca82f8ae1dcba984a044.tar.gz
scummvm-rg350-dc0f6dce7698ce383ad7ca82f8ae1dcba984a044.tar.bz2
scummvm-rg350-dc0f6dce7698ce383ad7ca82f8ae1dcba984a044.zip
Use graphics surfaces for screen buffers, and always use correct pitch when writing to the frameBuffer.
svn-id: r42163
Diffstat (limited to 'engines/agos/charset.cpp')
-rw-r--r--engines/agos/charset.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/agos/charset.cpp b/engines/agos/charset.cpp
index c60640d761..5b0a694312 100644
--- a/engines/agos/charset.cpp
+++ b/engines/agos/charset.cpp
@@ -639,13 +639,13 @@ void AGOSEngine::windowScroll(WindowBlock *window) {
w = window->width * 8;
h = (window->height -1) * 8;
- dst = (byte *)screen->pixels + window->y * _screenWidth + window->x * 8;
- src = dst + 8 * _screenWidth;
+ dst = (byte *)screen->pixels + window->y * screen->pitch + window->x * 8;
+ src = dst + 8 * screen->pitch;
do {
memcpy(dst, src, w);
- src += _screenWidth;
- dst += _screenWidth;
+ src += screen->pitch;
+ dst += screen->pitch;
} while (--h);
_system->unlockScreen();