diff options
author | Johannes Schickel | 2005-10-22 21:04:07 +0000 |
---|---|---|
committer | Johannes Schickel | 2005-10-22 21:04:07 +0000 |
commit | ea85d8c0848d465aa20ddd973a4e4cdf7b23b7cc (patch) | |
tree | 9a8803b00d59c8d2db1e990dd578943daf9ba837 /kyra | |
parent | d8aa978ae74ae7ee00c38cb3aa0ec47050e47d46 (diff) | |
download | scummvm-rg350-ea85d8c0848d465aa20ddd973a4e4cdf7b23b7cc.tar.gz scummvm-rg350-ea85d8c0848d465aa20ddd973a4e4cdf7b23b7cc.tar.bz2 scummvm-rg350-ea85d8c0848d465aa20ddd973a4e4cdf7b23b7cc.zip |
Fixed a double loading of shape 10,
and corrected mouse cursor region backup.
svn-id: r19242
Diffstat (limited to 'kyra')
-rw-r--r-- | kyra/kyra.cpp | 2 | ||||
-rw-r--r-- | kyra/screen.cpp | 12 |
2 files changed, 11 insertions, 3 deletions
diff --git a/kyra/kyra.cpp b/kyra/kyra.cpp index 9c92cb133a..eb48efa8c6 100644 --- a/kyra/kyra.cpp +++ b/kyra/kyra.cpp @@ -463,6 +463,7 @@ void KyraEngine::mainLoop() { if (_needMouseUpdate) { _screen->hideMouse(); _screen->showMouse(); + _needMouseUpdate = false; } _screen->updateScreen(); @@ -964,7 +965,6 @@ void KyraEngine::loadMouseShapes() { _itemShapes[8] = _screen->encodeShape(0x70, 0x12, 0x10, 9, 0); _itemShapes[9] = _screen->encodeShape(0x80, 0x12, 0x10, 11, 0); _itemShapes[10] = _screen->encodeShape(0x90, 0x12, 0x10, 10, 0); - _itemShapes[10] = _screen->encodeShape(0x90, 0x12, 0x10, 10, 0); _itemShapes[364] = _screen->encodeShape(0x28, 0, 0x10, 13, 0); _screen->setMouseCursor(1, 1, 0); _screen->setMouseCursor(1, 1, _itemShapes[4]); diff --git a/kyra/screen.cpp b/kyra/screen.cpp index c95ce3bfeb..f99786211b 100644 --- a/kyra/screen.cpp +++ b/kyra/screen.cpp @@ -1404,7 +1404,11 @@ void Screen::copyScreenFromRect(int x, int y, int w, int h, uint8 *ptr) { x <<= 3; w <<= 3; uint8 *src = ptr; uint8 *dst = &_pagePtrs[0][y * SCREEN_W + x]; - memcpy(dst, src, w); + for (int i = 0; i < h; ++i) { + memcpy(dst, src, w); + src += w; + dst += SCREEN_W; + } } void Screen::copyScreenToRect(int x, int y, int w, int h, uint8 *ptr) { @@ -1412,7 +1416,11 @@ void Screen::copyScreenToRect(int x, int y, int w, int h, uint8 *ptr) { x <<= 3; w <<= 3; uint8 *src = &_pagePtrs[0][y * SCREEN_W + x]; uint8 *dst = ptr; - memcpy(dst, src, w); + for (int i = 0; i < h; ++i) { + memcpy(dst, src, w); + dst += w; + src += SCREEN_W; + } } } // End of namespace Kyra |