From bee9391d95ccd85a13a31b8d3a129f367c8c23c7 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 10 Aug 2009 01:34:14 +0000 Subject: Use interface palette for mouse cursor in Kyra1 amiga, when it's enabled. svn-id: r43197 --- engines/kyra/screen_lok.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'engines/kyra/screen_lok.cpp') diff --git a/engines/kyra/screen_lok.cpp b/engines/kyra/screen_lok.cpp index 9fdeae1398..b35f0f5cf0 100644 --- a/engines/kyra/screen_lok.cpp +++ b/engines/kyra/screen_lok.cpp @@ -240,6 +240,20 @@ int Screen_LoK::getRectSize(int x, int y) { return ((x*y) << 3); } +void Screen_LoK::postProcessCursor(uint8 *data, int width, int height, int pitch) { + if (_vm->gameFlags().platform == Common::kPlatformAmiga && _interfacePaletteEnabled) { + pitch -= width; + + for (int y = 0; y < height; ++y) { + for (int x = 0; x < width; ++x) + if (*data != _cursorColorKey) + *data++ += 32; + + data += pitch; + } + } +} + #pragma mark - Screen_LoK_16::Screen_LoK_16(KyraEngine_LoK *vm, OSystem *system) : Screen_LoK(vm, system) { -- cgit v1.2.3