aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/wii/osystem_gfx.cpp
diff options
context:
space:
mode:
authordhewg2011-02-14 11:38:02 +0100
committerJohannes Schickel2011-02-14 17:08:33 +0100
commitf850ad2ced921e15b226a3f9db551fb96042e0dd (patch)
tree5feb8cdb9ffaed79aff1fe08950769a4b97f1341 /backends/platform/wii/osystem_gfx.cpp
parentf66009c6544ade60467634a50f2b2bb4de1a4f91 (diff)
downloadscummvm-rg350-f850ad2ced921e15b226a3f9db551fb96042e0dd.tar.gz
scummvm-rg350-f850ad2ced921e15b226a3f9db551fb96042e0dd.tar.bz2
scummvm-rg350-f850ad2ced921e15b226a3f9db551fb96042e0dd.zip
WII: Adapt to [set|grab]Palette RGBA->RGB change.
Diffstat (limited to 'backends/platform/wii/osystem_gfx.cpp')
-rw-r--r--backends/platform/wii/osystem_gfx.cpp16
1 files changed, 4 insertions, 12 deletions
diff --git a/backends/platform/wii/osystem_gfx.cpp b/backends/platform/wii/osystem_gfx.cpp
index 09575bb83d..a4e45557f0 100644
--- a/backends/platform/wii/osystem_gfx.cpp
+++ b/backends/platform/wii/osystem_gfx.cpp
@@ -326,10 +326,8 @@ 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);
@@ -339,10 +337,8 @@ void OSystem_Wii::setPalette(const byte *colors, uint start, uint num) {
s = colors;
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;
}
@@ -357,13 +353,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;
}
}
@@ -388,10 +382,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;
}