diff options
Diffstat (limited to 'backends/platform/wii/osystem_gfx.cpp')
-rw-r--r-- | backends/platform/wii/osystem_gfx.cpp | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/backends/platform/wii/osystem_gfx.cpp b/backends/platform/wii/osystem_gfx.cpp index 4a925a60c9..8dc18464a8 100644 --- a/backends/platform/wii/osystem_gfx.cpp +++ b/backends/platform/wii/osystem_gfx.cpp @@ -326,19 +326,13 @@ void OSystem_Wii::setPalette(const byte *colors, uint start, uint num) { const byte *s = colors; u16 *d = _texGame.palette; - for (uint i = 0; i < num; ++i) { + for (uint i = 0; i < num; ++i, s +=3) d[start + i] = Graphics::RGBToColor<Graphics::ColorMasks<565> >(s[0], s[1], s[2]); - s += 4; - } gfx_tex_flush_palette(&_texGame); - s = colors; - d = _cursorPalette; - - for (uint i = 0; i < num; ++i) { + for (uint i = 0; i < num; ++i, s += 3) { d[start + i] = Graphics::ARGBToColor<Graphics::ColorMasks<3444> >(0xff, s[0], s[1], s[2]); - s += 4; } if (_cursorPaletteDisabled) { @@ -360,13 +354,11 @@ void OSystem_Wii::grabPalette(byte *colors, uint start, uint num) { byte *d = colors; u8 r, g, b; - for (uint i = 0; i < num; ++i) { + for (uint i = 0; i < num; ++i, d += 3) { Graphics::colorToRGB<Graphics::ColorMasks<565> >(s[start + i], r, g, b); d[0] = r; d[1] = g; d[2] = b; - d[3] = 0xff; - d += 4; } } @@ -391,10 +383,8 @@ void OSystem_Wii::setCursorPalette(const byte *colors, uint start, uint num) { const byte *s = colors; u16 *d = _texMouse.palette; - for (uint i = 0; i < num; ++i) { + for (uint i = 0; i < num; ++i, s += 3) d[start + i] = Graphics::ARGBToColor<Graphics::ColorMasks<3444> >(0xff, s[0], s[1], s[2]); - s += 4; - } _cursorPaletteDirty = true; } |