aboutsummaryrefslogtreecommitdiff
path: root/engines/mads
diff options
context:
space:
mode:
authorFilippos Karapetis2014-05-06 03:26:44 +0300
committerFilippos Karapetis2014-05-06 03:26:44 +0300
commit13bd409bbff3a88e0bf89e9a069f340aed9f4b44 (patch)
treee607cb0c70e9f5ac267fc44d790412767c8e20ae /engines/mads
parentf8380e9654f98700691956c784df57b6f4ac618c (diff)
downloadscummvm-rg350-13bd409bbff3a88e0bf89e9a069f340aed9f4b44.tar.gz
scummvm-rg350-13bd409bbff3a88e0bf89e9a069f340aed9f4b44.tar.bz2
scummvm-rg350-13bd409bbff3a88e0bf89e9a069f340aed9f4b44.zip
MADS: Add a sanity check for color 255
This is used in scene 752
Diffstat (limited to 'engines/mads')
-rw-r--r--engines/mads/msurface.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/mads/msurface.cpp b/engines/mads/msurface.cpp
index 2c9d093877..64b3ae1f23 100644
--- a/engines/mads/msurface.cpp
+++ b/engines/mads/msurface.cpp
@@ -488,7 +488,8 @@ void MSurface::translate(Common::Array<RGB6> &palette) {
byte *pDest = getBasePtr(0, y);
for (int x = 0; x < this->w; ++x, ++pDest) {
- *pDest = palette[*pDest]._palIndex;
+ if (*pDest < 255) // scene 752 has some palette indices of 255
+ *pDest = palette[*pDest]._palIndex;
}
}
}