diff options
author | Johannes Schickel | 2011-02-13 14:58:44 +0100 |
---|---|---|
committer | Johannes Schickel | 2011-02-14 17:08:32 +0100 |
commit | 7b8b73f64ae035a4bc883bf97d7686a6db06aa70 (patch) | |
tree | e496eea4bbcf8b106c4ce5099927aeb7eb097dd1 | |
parent | 05f0855efc611289173a6ca9b9490316651839db (diff) | |
download | scummvm-rg350-7b8b73f64ae035a4bc883bf97d7686a6db06aa70.tar.gz scummvm-rg350-7b8b73f64ae035a4bc883bf97d7686a6db06aa70.tar.bz2 scummvm-rg350-7b8b73f64ae035a4bc883bf97d7686a6db06aa70.zip |
GUI: Update cursor palette handling for RGBA->RGB change.
-rw-r--r-- | gui/ThemeEngine.cpp | 7 | ||||
-rw-r--r-- | gui/ThemeEngine.h | 2 | ||||
-rw-r--r-- | gui/gui-manager.cpp | 8 |
3 files changed, 8 insertions, 9 deletions
diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp index beb17b0c88..ee83ca620c 100644 --- a/gui/ThemeEngine.cpp +++ b/gui/ThemeEngine.cpp @@ -1327,10 +1327,9 @@ bool ThemeEngine::createCursor(const Common::String &filename, int hotspotX, int const int index = colorsFound++; colorToIndex[col] = index; - _cursorPal[index * 4 + 0] = r; - _cursorPal[index * 4 + 1] = g; - _cursorPal[index * 4 + 2] = b; - _cursorPal[index * 4 + 3] = 0xFF; + _cursorPal[index * 3 + 0] = r; + _cursorPal[index * 3 + 1] = g; + _cursorPal[index * 3 + 2] = b; if (colorsFound > MAX_CURS_COLORS) { warning("Cursor contains too many colors (%d, but only %d are allowed)", colorsFound, MAX_CURS_COLORS); diff --git a/gui/ThemeEngine.h b/gui/ThemeEngine.h index 966c792042..e852760e44 100644 --- a/gui/ThemeEngine.h +++ b/gui/ThemeEngine.h @@ -661,7 +661,7 @@ protected: byte *_cursor; bool _needPaletteUpdates; uint _cursorWidth, _cursorHeight; - byte _cursorPal[4*MAX_CURS_COLORS]; + byte _cursorPal[3*MAX_CURS_COLORS]; byte _cursorPalSize; }; diff --git a/gui/gui-manager.cpp b/gui/gui-manager.cpp index af567c65d8..7644cbe7b2 100644 --- a/gui/gui-manager.cpp +++ b/gui/gui-manager.cpp @@ -441,10 +441,10 @@ void GuiManager::closeTopDialog() { void GuiManager::setupCursor() { const byte palette[] = { - 255, 255, 255, 0, - 255, 255, 255, 0, - 171, 171, 171, 0, - 87, 87, 87, 0 + 255, 255, 255, + 255, 255, 255, + 171, 171, 171, + 87, 87, 87 }; CursorMan.pushCursorPalette(palette, 0, 4); |