diff options
author | athrxx | 2018-11-04 23:44:20 +0100 |
---|---|---|
committer | athrxx | 2018-11-14 17:22:22 +0100 |
commit | b81493718e4474b995a94f552b3a01d157462251 (patch) | |
tree | ede0c4f0aa60d344fd766cc544d7194f489f9452 | |
parent | 4cce54efee1779d4374a6e218649e186408f6816 (diff) | |
download | scummvm-rg350-b81493718e4474b995a94f552b3a01d157462251.tar.gz scummvm-rg350-b81493718e4474b995a94f552b3a01d157462251.tar.bz2 scummvm-rg350-b81493718e4474b995a94f552b3a01d157462251.zip |
KYRA: (EOB) - fix 16 bit mouse cursor color key
-rw-r--r-- | engines/kyra/screen_eob.cpp | 5 | ||||
-rw-r--r-- | engines/kyra/screen_eob.h | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/engines/kyra/screen_eob.cpp b/engines/kyra/screen_eob.cpp index e24f6219a9..629d00ce4a 100644 --- a/engines/kyra/screen_eob.cpp +++ b/engines/kyra/screen_eob.cpp @@ -38,7 +38,7 @@ namespace Kyra { -Screen_EoB::Screen_EoB(EoBCoreEngine *vm, OSystem *system) : Screen(vm, system, _screenDimTable, _screenDimTableCount) { +Screen_EoB::Screen_EoB(EoBCoreEngine *vm, OSystem *system) : Screen(vm, system, _screenDimTable, _screenDimTableCount), _cursorColorKey16Bit(0x8000) { _dsBackgroundFading = false; _dsShapeFadingLevel = 0; _dsBackgroundFadingXOffs = 0; @@ -133,7 +133,7 @@ void Screen_EoB::setMouseCursor(int x, int y, const byte *shape, const uint8 *ov int mouseW = (shape[2] << 3); int mouseH = (shape[3]); - int colorKey = (_renderMode == Common::kRenderCGA) ? 0 : _cursorColorKey; + int colorKey = (_renderMode == Common::kRenderCGA) ? 0 : (_bytesPerPixel == 2 ? _cursorColorKey16Bit : _cursorColorKey); int scaleFactor = _vm->gameFlags().useHiRes ? 2 : 1; int bpp = _useHiColorScreen ? 2 : 1; @@ -141,7 +141,6 @@ void Screen_EoB::setMouseCursor(int x, int y, const byte *shape, const uint8 *ov uint8 *cursor = new uint8[mouseW * scaleFactor * bpp * mouseH * scaleFactor]; if (_bytesPerPixel == 2) { - colorKey = _16bitPalette[colorKey]; for (int s = mouseW * scaleFactor * bpp * mouseH * scaleFactor; s; s -= 2) *(uint16*)(cursor + s - 2) = colorKey; } else { diff --git a/engines/kyra/screen_eob.h b/engines/kyra/screen_eob.h index f213fc985e..f5bd9874d8 100644 --- a/engines/kyra/screen_eob.h +++ b/engines/kyra/screen_eob.h @@ -125,6 +125,8 @@ private: uint8 *_egaDitheringTable; uint8 *_egaDitheringTempPage; + const uint16 _cursorColorKey16Bit; + static const uint8 _egaMatchTable[]; static const ScreenDim _screenDimTable[]; static const int _screenDimTableCount; |