aboutsummaryrefslogtreecommitdiff
path: root/engines/mads/palette.cpp
diff options
context:
space:
mode:
authorStrangerke2014-10-08 07:37:44 +0200
committerStrangerke2014-10-08 07:37:44 +0200
commit8c07c773886097e6dec989fd88e34d44ea8bba35 (patch)
tree17e3e929bed64a4118cb95629817f1e65aa86d12 /engines/mads/palette.cpp
parent0328f19cb125a3f48125eb1c4a8e2d9deaa13529 (diff)
downloadscummvm-rg350-8c07c773886097e6dec989fd88e34d44ea8bba35.tar.gz
scummvm-rg350-8c07c773886097e6dec989fd88e34d44ea8bba35.tar.bz2
scummvm-rg350-8c07c773886097e6dec989fd88e34d44ea8bba35.zip
MADS: Rex - Remove an erroneous assert on newPalIndex
Diffstat (limited to 'engines/mads/palette.cpp')
-rw-r--r--engines/mads/palette.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/engines/mads/palette.cpp b/engines/mads/palette.cpp
index eedbf36ddd..c098e23bf9 100644
--- a/engines/mads/palette.cpp
+++ b/engines/mads/palette.cpp
@@ -143,7 +143,7 @@ int PaletteUsage::process(Common::Array<RGB6> &palette, uint flags) {
for (uint palIndex = 0; palIndex < palette.size(); ++palIndex) {
bool changed = false;
- int newPalIndex = -1;
+ int newPalIndex = 0xFF;
int v1 = palRange[palIndex]._v2;
if (palette[v1]._flags & 8) {
@@ -229,7 +229,10 @@ int PaletteUsage::process(Common::Array<RGB6> &palette, uint flags) {
// In at least scene 318, when the doctor knocks you with the blackjack,
// the changed flag can be false
//assert(changed);
- assert(newPalIndex != -1);
+
+ // CHECKME: When pressing on F1 in the first screen, newPalIndex is set to 0xFF at this point
+ // which is a valid value for the index. Maybe a better check would be "< 256" ?
+ //assert(newPalIndex != -1);
int var52 = (noUsageFlag && palette[palIndex]._u2) ? 2 : 0;