diff options
author | Paul Gilbert | 2014-03-24 22:33:49 -0400 |
---|---|---|
committer | Paul Gilbert | 2014-03-24 22:33:49 -0400 |
commit | d958f509241714f140c95e7afa0005b1fe5c8352 (patch) | |
tree | aefb430ddd8511d03170511ee10115f180732895 | |
parent | c177056653d09f16dbf8a28bd93d048f95e9398a (diff) | |
download | scummvm-rg350-d958f509241714f140c95e7afa0005b1fe5c8352.tar.gz scummvm-rg350-d958f509241714f140c95e7afa0005b1fe5c8352.tar.bz2 scummvm-rg350-d958f509241714f140c95e7afa0005b1fe5c8352.zip |
MADS: Fix incorrect palette for player sprites
-rw-r--r-- | engines/mads/palette.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/engines/mads/palette.cpp b/engines/mads/palette.cpp index 4a62cca5bc..f57766ebf1 100644 --- a/engines/mads/palette.cpp +++ b/engines/mads/palette.cpp @@ -107,10 +107,10 @@ int PaletteUsage::process(Common::Array<RGB6> &palette, uint flags) { bool flag1 = false; if (hasUsage) { - if (varA || !_vm->_palette->_paletteUsage[0]) + if (varA || _vm->_palette->_paletteUsage.empty()) hasUsage = false; - if (varA && _vm->_palette->_paletteUsage[0]) + if (varA && !_vm->_palette->_paletteUsage.empty()) flag1 = true; } @@ -178,10 +178,9 @@ int PaletteUsage::process(Common::Array<RGB6> &palette, uint flags) { } if (!var48 && !varA) { - int var2 = !(palette[palIndex]._flags & 0x20) && ( - ((flags & 0x2000) && !(palette[palIndex]._flags & 0x40)) || - ((flags & 0x1000) && (palCount > 0)) - ) ? 1 : 0x7fff; + int var2 = (palette[palIndex]._flags & 0x20) || + (((flags & 0x2000) || (palette[palIndex]._flags & 0x4000)) && + ((flags & 0x1000) || (palCount == 0))) ? 0x7fff : 1; int var36 = (palette[palIndex]._flags & 0x80) ? 0 : 2; for (int idx = palLow; idx < palIdx; ++idx) { |