aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorJohannes Schickel2011-02-15 23:40:06 +0100
committerJohannes Schickel2011-02-15 23:42:50 +0100
commita02454644af514c4f50b861cc718e2951d4c46dd (patch)
treee6385482a68f330f412e87aa33b049b4f5912911 /backends
parent01d511bf1b6df74254a2f6bd3007e884cd0c0dde (diff)
parent369db4fdfd5dac16858505f91cb37f4ae386fe80 (diff)
downloadscummvm-rg350-a02454644af514c4f50b861cc718e2951d4c46dd.tar.gz
scummvm-rg350-a02454644af514c4f50b861cc718e2951d4c46dd.tar.bz2
scummvm-rg350-a02454644af514c4f50b861cc718e2951d4c46dd.zip
Merge branch 'master' into osystem-palette
Conflicts: backends/platform/wii/osystem_gfx.cpp
Diffstat (limited to 'backends')
-rw-r--r--backends/platform/wii/osystem_gfx.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/backends/platform/wii/osystem_gfx.cpp b/backends/platform/wii/osystem_gfx.cpp
index a4e45557f0..8dc18464a8 100644
--- a/backends/platform/wii/osystem_gfx.cpp
+++ b/backends/platform/wii/osystem_gfx.cpp
@@ -331,14 +331,15 @@ void OSystem_Wii::setPalette(const byte *colors, uint start, uint num) {
gfx_tex_flush_palette(&_texGame);
+ for (uint i = 0; i < num; ++i, s += 3) {
+ d[start + i] = Graphics::ARGBToColor<Graphics::ColorMasks<3444> >(0xff, s[0], s[1], s[2]);
+ }
+
if (_cursorPaletteDisabled) {
assert(_texMouse.palette);
- s = colors;
- d = _texMouse.palette;
-
- for (uint i = 0; i < num; ++i, s += 3)
- d[start + i] = Graphics::ARGBToColor<Graphics::ColorMasks<3444> >(0xff, s[0], s[1], s[2]);
+ memcpy((u8 *)_texMouse.palette + start * 2,
+ (u8 *)_cursorPalette + start * 2, num * 2);
_cursorPaletteDirty = true;
}