aboutsummaryrefslogtreecommitdiff
path: root/engines/m4/graphics.cpp
diff options
context:
space:
mode:
authorD G Turner2011-02-20 03:20:06 +0000
committerD G Turner2011-02-20 03:20:06 +0000
commit10e2cec6b95f0e185f0522fdc7f10a076de24c7e (patch)
treec200c531660bdb43fcf19f850a153ce69a46df91 /engines/m4/graphics.cpp
parent292f1971426de8d7947ed2d2792902c6bfef1424 (diff)
downloadscummvm-rg350-10e2cec6b95f0e185f0522fdc7f10a076de24c7e.tar.gz
scummvm-rg350-10e2cec6b95f0e185f0522fdc7f10a076de24c7e.tar.bz2
scummvm-rg350-10e2cec6b95f0e185f0522fdc7f10a076de24c7e.zip
M4: Updated for OSystem Palette RGBA->RGB Change.
Diffstat (limited to 'engines/m4/graphics.cpp')
-rw-r--r--engines/m4/graphics.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/engines/m4/graphics.cpp b/engines/m4/graphics.cpp
index a651510d10..5fc46d3881 100644
--- a/engines/m4/graphics.cpp
+++ b/engines/m4/graphics.cpp
@@ -795,7 +795,11 @@ void M4Surface::m4LoadBackground(Common::SeekableReadStream *source) {
palette[i].b = source->readByte() << 2;
palette[i].g = source->readByte() << 2;
palette[i].r = source->readByte() << 2;
- palette[i].u = source->readByte() << 2;
+ // FIXME - Removed u field from RGB8 as the OSystem palette is now RGB.
+ // If this is needed, then the system setPalette() call will need changing to skip this.
+ uint8 u = source->readByte() << 2;
+ if (u != 0)
+ debugC(1, kDebugGraphics, "Unused u field in Palette data non-zero: %d", u);
if ((blackIndex == 0) && !palette[i].r && !palette[i].g && !palette[i].b)
blackIndex = i;
@@ -1049,7 +1053,6 @@ void Palette::setEntry(uint index, uint8 r, uint8 g, uint8 b) {
c.r = r;
c.g = g;
c.b = b;
- c.u = 255;
g_system->getPaletteManager()->setPalette((const byte *)&c, index, 1);
}