aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/screen.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2009-06-29 18:00:18 +0000
committerJohannes Schickel2009-06-29 18:00:18 +0000
commit67f69bcaf2a0e425eb0799683fc631213775aabb (patch)
treeaaa6b93b19599af651d45522e247595706722b0c /engines/kyra/screen.cpp
parentc810f9645af0259c2ff89a76bcc3d565f2f58601 (diff)
downloadscummvm-rg350-67f69bcaf2a0e425eb0799683fc631213775aabb.tar.gz
scummvm-rg350-67f69bcaf2a0e425eb0799683fc631213775aabb.tar.bz2
scummvm-rg350-67f69bcaf2a0e425eb0799683fc631213775aabb.zip
- Get rid of code duplication for mouse cursor setup
- Fix mouse cursor colors in LoL PC98 (This commit might introduce regressions, since it changes the key color the mouse cursor uses) svn-id: r41959
Diffstat (limited to 'engines/kyra/screen.cpp')
-rw-r--r--engines/kyra/screen.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp
index 3c9759d88d..84be942a1f 100644
--- a/engines/kyra/screen.cpp
+++ b/engines/kyra/screen.cpp
@@ -2622,12 +2622,12 @@ void Screen::setMouseCursor(int x, int y, const byte *shape) {
y <<= 1;
mouseWidth <<= 1;
mouseHeight <<= 1;
- fillRect(mouseWidth, 0, mouseWidth, mouseHeight, 0, 8);
+ fillRect(mouseWidth, 0, mouseWidth, mouseHeight, 255, 8);
}
uint8 *cursor = new uint8[mouseHeight * mouseWidth];
- fillRect(0, 0, mouseWidth, mouseHeight, 0, 8);
+ fillRect(0, 0, mouseWidth, mouseHeight, 255, 8);
drawShape(8, shape, 0, 0, 0, 0);
int xOffset = 0;
@@ -2635,11 +2635,14 @@ void Screen::setMouseCursor(int x, int y, const byte *shape) {
if (_vm->gameFlags().useHiResOverlay) {
xOffset = mouseWidth;
scale2x(getPagePtr(8) + mouseWidth, SCREEN_W, getPagePtr(8), SCREEN_W, mouseWidth, mouseHeight);
+ postProcessCursor(getPagePtr(8) + mouseWidth, mouseWidth, mouseHeight, SCREEN_W);
+ } else {
+ postProcessCursor(getPagePtr(8), mouseWidth, mouseHeight, SCREEN_W);
}
CursorMan.showMouse(false);
copyRegionToBuffer(8, xOffset, 0, mouseWidth, mouseHeight, cursor);
- CursorMan.replaceCursor(cursor, mouseWidth, mouseHeight, x, y, 0);
+ CursorMan.replaceCursor(cursor, mouseWidth, mouseHeight, x, y, 255);
if (isMouseVisible())
CursorMan.showMouse(true);
delete[] cursor;