aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordhewg2011-02-14 22:00:01 +0100
committerdhewg2011-02-14 22:12:30 +0100
commit50129178efcd2a6defae679f059bd9de796a3122 (patch)
tree67da29cb2a02f1837061fb6e334fdd0130a33028
parent31539697dc4551790f8da0b0a20f4f8008b1b1aa (diff)
downloadscummvm-rg350-50129178efcd2a6defae679f059bd9de796a3122.tar.gz
scummvm-rg350-50129178efcd2a6defae679f059bd9de796a3122.tar.bz2
scummvm-rg350-50129178efcd2a6defae679f059bd9de796a3122.zip
WII: Fix 16bit cursors on some HE games
-rw-r--r--backends/platform/wii/osystem_gfx.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/backends/platform/wii/osystem_gfx.cpp b/backends/platform/wii/osystem_gfx.cpp
index 09575bb83d..4a925a60c9 100644
--- a/backends/platform/wii/osystem_gfx.cpp
+++ b/backends/platform/wii/osystem_gfx.cpp
@@ -333,16 +333,19 @@ void OSystem_Wii::setPalette(const byte *colors, uint start, uint num) {
gfx_tex_flush_palette(&_texGame);
+ s = colors;
+ d = _cursorPalette;
+
+ for (uint i = 0; i < num; ++i) {
+ d[start + i] = Graphics::ARGBToColor<Graphics::ColorMasks<3444> >(0xff, s[0], s[1], s[2]);
+ s += 4;
+ }
+
if (_cursorPaletteDisabled) {
assert(_texMouse.palette);
- s = colors;
- d = _texMouse.palette;
-
- for (uint i = 0; i < num; ++i) {
- d[start + i] = Graphics::ARGBToColor<Graphics::ColorMasks<3444> >(0xff, s[0], s[1], s[2]);
- s += 4;
- }
+ memcpy((u8 *)_texMouse.palette + start * 2,
+ (u8 *)_cursorPalette + start * 2, num * 2);
_cursorPaletteDirty = true;
}