aboutsummaryrefslogtreecommitdiff
path: root/scumm/wiz_he.cpp
diff options
context:
space:
mode:
authorTravis Howell2005-04-07 12:23:44 +0000
committerTravis Howell2005-04-07 12:23:44 +0000
commit9ac823cf811553198153abde9fa364ab559da3ec (patch)
treeb61e9f3060fe3fdbe3439072bf51250e75b662d1 /scumm/wiz_he.cpp
parentc7bb5eacda314f42c93f1d668e91fb54e4a48c9b (diff)
downloadscummvm-rg350-9ac823cf811553198153abde9fa364ab559da3ec.tar.gz
scummvm-rg350-9ac823cf811553198153abde9fa364ab559da3ec.tar.bz2
scummvm-rg350-9ac823cf811553198153abde9fa364ab559da3ec.zip
Correct palPtr
svn-id: r17439
Diffstat (limited to 'scumm/wiz_he.cpp')
-rw-r--r--scumm/wiz_he.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/scumm/wiz_he.cpp b/scumm/wiz_he.cpp
index 201178eff4..8abc0c5d7b 100644
--- a/scumm/wiz_he.cpp
+++ b/scumm/wiz_he.cpp
@@ -890,7 +890,7 @@ uint8 *ScummEngine_v72he::drawWizImage(int resNum, int state, int x1, int y1, in
uint8 *dataPtr = getResourceAddress(rtImage, resNum);
if (dataPtr) {
uint8 *rmap = NULL;
- //uint8 *xmap = findWrappedBlock(MKID('XMAP'), dataPtr, state, 0);
+ uint8 *xmap = findWrappedBlock(MKID('XMAP'), dataPtr, state, 0);
uint8 *wizh = findWrappedBlock(MKID('WIZH'), dataPtr, state, 0);
assert(wizh);
@@ -965,20 +965,24 @@ uint8 *ScummEngine_v72he::drawWizImage(int resNum, int state, int x1, int y1, in
}
// XXX handle 'XMAP' / 'RMAP' data
+ if (xmap) {
+ palPtr = xmap;
+ }
+ if (flags & kWIFRemapPalette) {
+ palPtr = rmap + 4;
+ }
if (comp == 1) {
+ // TODO Adding masking for flags 0x80 and 0x100
if (flags & 0x80) {
- warning("drawWizImage() unhandled flag 0x80");
+ error("drawWizImage() unhandled flag 0x80");
} else if (flags & 0x100) {
- warning("drawWizImage() unhandled flag 0x100");
+ error("drawWizImage() unhandled flag 0x100");
} else {
_wiz.copyWizImage(dst, wizd, cw, ch, x1, y1, width, height, &rScreen, palPtr);
}
} else if (comp == 0 || comp == 2 || comp == 3) {
uint8 *trns = findWrappedBlock(MKID('TRNS'), dataPtr, state, 0);
int color = (trns == NULL) ? VAR(VAR_WIZ_TCOLOR) : -1;
- if (flags & kWIFRemapPalette) {
- palPtr = rmap + 4;
- }
_wiz.copyRawWizImage(dst, wizd, cw, ch, x1, y1, width, height, &rScreen, flags, palPtr, color);
} else {
warning("unhandled wiz compression type %d", comp);