diff options
author | Johannes Schickel | 2009-08-10 01:34:14 +0000 |
---|---|---|
committer | Johannes Schickel | 2009-08-10 01:34:14 +0000 |
commit | bee9391d95ccd85a13a31b8d3a129f367c8c23c7 (patch) | |
tree | 09802ae1c9919066a3f0dd1491645aff1bec4a81 | |
parent | d68706d8edcdf8e605c2e2ddbf7dd05d96785fe9 (diff) | |
download | scummvm-rg350-bee9391d95ccd85a13a31b8d3a129f367c8c23c7.tar.gz scummvm-rg350-bee9391d95ccd85a13a31b8d3a129f367c8c23c7.tar.bz2 scummvm-rg350-bee9391d95ccd85a13a31b8d3a129f367c8c23c7.zip |
Use interface palette for mouse cursor in Kyra1 amiga, when it's enabled.
svn-id: r43197
-rw-r--r-- | engines/kyra/screen.cpp | 2 | ||||
-rw-r--r-- | engines/kyra/screen_lok.cpp | 14 | ||||
-rw-r--r-- | engines/kyra/screen_lok.h | 3 |
3 files changed, 19 insertions, 0 deletions
diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp index 8d212917a8..6f93db1ad9 100644 --- a/engines/kyra/screen.cpp +++ b/engines/kyra/screen.cpp @@ -643,6 +643,8 @@ void Screen::enableInterfacePalette(bool e) { _forceFullUpdate = true; _dirtyRects.clear(); + // TODO: We might need to reset the mouse cursor + updateScreen(); } 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) { diff --git a/engines/kyra/screen_lok.h b/engines/kyra/screen_lok.h index 4eb22df374..ae1d85c0a7 100644 --- a/engines/kyra/screen_lok.h +++ b/engines/kyra/screen_lok.h @@ -59,6 +59,9 @@ public: void addBitBlitRect(int x, int y, int w, int h); void bitBlitRects(); + // AMIGA specific + virtual void postProcessCursor(uint8 *data, int width, int height, int pitch); + protected: enum { kNumBitBlitRects = 10 |