aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Howell2005-04-16 06:16:22 +0000
committerTravis Howell2005-04-16 06:16:22 +0000
commit537b8ae7e839421bab653441bfae9aea2c4656a6 (patch)
treee367a03d0646197c17bcaac15537efcd6bb91190
parenta9ff09b06602082086207971f8c5d24ec30fe664 (diff)
downloadscummvm-rg350-537b8ae7e839421bab653441bfae9aea2c4656a6.tar.gz
scummvm-rg350-537b8ae7e839421bab653441bfae9aea2c4656a6.tar.bz2
scummvm-rg350-537b8ae7e839421bab653441bfae9aea2c4656a6.zip
Add missing check for palette remap in drawWizImage.
Can get further in freddi4. svn-id: r17613
-rw-r--r--scumm/wiz_he.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/scumm/wiz_he.cpp b/scumm/wiz_he.cpp
index e09f386476..23bf7c04cc 100644
--- a/scumm/wiz_he.cpp
+++ b/scumm/wiz_he.cpp
@@ -950,10 +950,12 @@ uint8 *ScummEngine_v72he::drawWizImage(int resNum, int state, int x1, int y1, in
if (flags & kWIFRemapPalette) {
rmap = findWrappedBlock(MKID('RMAP'), dataPtr, state, 0);
assert(rmap);
- uint8 *rgbs = findWrappedBlock(MKID('RGBS'), dataPtr, state, 0);
- assert(rgbs);
- remapPalette(rgbs, rmap + 4);
- warning("drawWizImage() flag 0x2");
+ if (_heversion <= 80 || READ_BE_UINT32(rmap) != 0x01234567) {
+ uint8 *rgbs = findWrappedBlock(MKID('RGBS'), dataPtr, state, 0);
+ assert(rgbs);
+ remapPalette(rgbs, rmap + 4);
+ debug(0, "drawWizImage() flag 0x2");
+ }
}
if (flags & kWIFPrint) {
warning("WizImage printing is unimplemented");
@@ -1380,7 +1382,7 @@ void ScummEngine_v72he::displayWizComplexImage(const WizParameters *params) {
assert(iwiz);
uint8 *rmap = findWrappedBlock(MKID('RMAP'), iwiz, st, 0) ;
assert(rmap);
- WRITE_BE_UINT32(rmap, 0x12345678);
+ WRITE_BE_UINT32(rmap, 0x01234567);
while (num--) {
uint8 idx = *index++;
rmap[4 + idx] = params->remapColor[idx];
@@ -1698,7 +1700,7 @@ void ScummEngine_v90he::processWizImage(const WizParameters *params) {
assert(iwiz);
uint8 *rmap = findWrappedBlock(MKID('RMAP'), iwiz, state, 0) ;
assert(rmap);
- WRITE_BE_UINT32(rmap, 0x12345678);
+ WRITE_BE_UINT32(rmap, 0x01234567);
while (num--) {
uint8 idx = *index++;
rmap[4 + idx] = params->remapColor[idx];