From 207ef00754e3c7363d3489a0e1957a392c4343e2 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Thu, 23 Nov 2006 06:45:21 +0000 Subject: et up cursor palette. This fixes Amiga/Atari versions and makes cursor more visible in most cases. svn-id: r24766 --- engines/cine/gfx.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/engines/cine/gfx.cpp b/engines/cine/gfx.cpp index c99f2269f4..46a7eb26d0 100644 --- a/engines/cine/gfx.cpp +++ b/engines/cine/gfx.cpp @@ -28,6 +28,7 @@ #include "common/system.h" #include "graphics/cursorman.h" +#include "graphics/paletteman.h" namespace Cine { @@ -87,6 +88,11 @@ static const struct MouseCursor { { 7, 7, mouseCursorCross } }; +static const byte cursorPalette[] = { + 0, 0, 0, 0xff, + 0xff, 0xff, 0xff, 0xff +}; + void init_video() { screenBuffer = (byte *)malloc(320 * 200 * 3); assert(screenBuffer); @@ -108,7 +114,7 @@ void setMouseCursor(int cursor) { int offs = i * 8; for (byte mask = 0x80; mask != 0; mask >>= 1) { if (src[0] & mask) { - mouseCursor[offs] = 2; + mouseCursor[offs] = 1; } else if (src[32] & mask) { mouseCursor[offs] = 0; } else { @@ -119,6 +125,7 @@ void setMouseCursor(int cursor) { ++src; } CursorMan.replaceCursor(mouseCursor, 16, 16, mc->hotspotX, mc->hotspotY); + PaletteMan.replaceCursorPalette(cursorPalette, 0, 2); currentMouseCursor = cursor; } } -- cgit v1.2.3