diff options
author | Travis Howell | 2005-04-16 04:56:06 +0000 |
---|---|---|
committer | Travis Howell | 2005-04-16 04:56:06 +0000 |
commit | c810139b72939048da3d9acf4e2fb97d1790459d (patch) | |
tree | 5203ede0783bac4db4de1d3bd41ce79e2d057921 | |
parent | df3bc8bb37fb182c7bb2a2e558c9533c4563638f (diff) | |
download | scummvm-rg350-c810139b72939048da3d9acf4e2fb97d1790459d.tar.gz scummvm-rg350-c810139b72939048da3d9acf4e2fb97d1790459d.tar.bz2 scummvm-rg350-c810139b72939048da3d9acf4e2fb97d1790459d.zip |
use dstResNum for destination, if set.
svn-id: r17610
-rw-r--r-- | scumm/wiz_he.cpp | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/scumm/wiz_he.cpp b/scumm/wiz_he.cpp index e259597831..0839784a05 100644 --- a/scumm/wiz_he.cpp +++ b/scumm/wiz_he.cpp @@ -1194,18 +1194,29 @@ void ScummEngine_v72he::drawWizPolygon(int resNum, int state, int id, int flags, uint8 *srcWizBuf = drawWizImage(resNum, state, 0, 0, xmapNum, r, kWIFBlitToMemBuffer, 0, paletteNum); if (srcWizBuf) { uint8 *dst; + int32 wizW, wizH; VirtScreen *pvs = &virtscr[kMainVirtScreen]; - if (flags & kWIFMarkBufferDirty) { - dst = pvs->getPixels(0, 0); + + if (dstResNum) { + uint8 *dstPtr = getResourceAddress(rtImage, dstResNum); + assert(dstPtr); + dst = findWrappedBlock(MKID('WIZD'), dstPtr, state, 0); + assert(dst); + + getWizImageDim(dstResNum, 0, wizW, wizH); } else { - dst = pvs->getBackPixels(0, 0); + if (flags & kWIFMarkBufferDirty) { + dst = pvs->getPixels(0, 0); + } else { + dst = pvs->getBackPixels(0, 0); + } + + getWizImageDim(resNum, state, wizW, wizH); } if (wp->bound.left < 0 || wp->bound.top < 0 || wp->bound.right >= pvs->w || wp->bound.bottom >= pvs->h) { error("Invalid coords polygon %d", wp->id); } - int32 wizW, wizH; - getWizImageDim(resNum, state, wizW, wizH); Common::Point bbox[4]; bbox[0].x = 0; bbox[0].y = 0; |