Skip to content

Commit

Permalink
MADS: Rex - Remove an erroneous assert on newPalIndex
Browse files Browse the repository at this point in the history
  • Loading branch information
Strangerke committed Oct 8, 2014
1 parent 0328f19 commit 8c07c77
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions engines/mads/palette.cpp
Expand Up @@ -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) {
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit 8c07c77

Please sign in to comment.