aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kyra/kyra.cpp2
-rw-r--r--kyra/screen.cpp12
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