diff options
author | Johannes Schickel | 2012-02-19 22:19:38 +0100 |
---|---|---|
committer | Johannes Schickel | 2012-02-19 22:19:38 +0100 |
commit | 87d85a7b20c611898bbb4c714b40de5691a8d8ff (patch) | |
tree | a1ebae101f75cdaf2ee3570cf17a9615c08943cd /backends/platform | |
parent | ceae3dd191039711ea388e2878397d26a0932611 (diff) | |
download | scummvm-rg350-87d85a7b20c611898bbb4c714b40de5691a8d8ff.tar.gz scummvm-rg350-87d85a7b20c611898bbb4c714b40de5691a8d8ff.tar.bz2 scummvm-rg350-87d85a7b20c611898bbb4c714b40de5691a8d8ff.zip |
IPHONE: Use the proper RGBA5551 palette for the mouse cursor.
Formerly the overlay cursor was using a RGB565 palette, even though the
texture is really set up as RGBA5551.
Diffstat (limited to 'backends/platform')
-rw-r--r-- | backends/platform/iphone/osys_main.h | 3 | ||||
-rw-r--r-- | backends/platform/iphone/osys_video.cpp | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/backends/platform/iphone/osys_main.h b/backends/platform/iphone/osys_main.h index b89eed9d43..c63ba41319 100644 --- a/backends/platform/iphone/osys_main.h +++ b/backends/platform/iphone/osys_main.h @@ -70,7 +70,10 @@ protected: uint16 *_fullscreen; + // For use with the game texture uint16 _gamePalette[256]; + // For use with the mouse texture + uint16 _gamePaletteRGBA5551[256]; bool _overlayVisible; uint16 _screenWidth; uint16 _screenHeight; diff --git a/backends/platform/iphone/osys_video.cpp b/backends/platform/iphone/osys_video.cpp index c97b6757ea..3b14126234 100644 --- a/backends/platform/iphone/osys_video.cpp +++ b/backends/platform/iphone/osys_video.cpp @@ -99,6 +99,7 @@ void OSystem_IPHONE::setPalette(const byte *colors, uint start, uint num) { for (uint i = start; i < start + num; ++i) { _gamePalette[i] = Graphics::RGBToColor<Graphics::ColorMasks<565> >(b[0], b[1], b[2]); + _gamePaletteRGBA5551[i] = Graphics::RGBToColor<Graphics::ColorMasks<5551> >(b[0], b[1], b[2]); b += 3; } @@ -473,7 +474,7 @@ void OSystem_IPHONE::setMouseCursor(const byte *buf, uint w, uint h, int hotspot for (uint y = 0; y < h; ++y) { byte color = buf[y * w + x]; if (color != keycolor) - mouseBuf[y * texWidth + x] = _gamePalette[color] | 0x1; + mouseBuf[y * texWidth + x] = _gamePaletteRGBA5551[color] | 0x1; else mouseBuf[y * texWidth + x] = 0x0; } |