diff options
author | Gregory Montoir | 2005-02-27 03:23:16 +0000 |
---|---|---|
committer | Gregory Montoir | 2005-02-27 03:23:16 +0000 |
commit | a0347d46de528dda23c07fbcc4e20a48a86f9190 (patch) | |
tree | edf907ebd36aba784eb7ec069bdce5310702c829 /scumm | |
parent | 5eec97c24c310e4cce74caffcf7d4ebf8b300d34 (diff) | |
download | scummvm-rg350-a0347d46de528dda23c07fbcc4e20a48a86f9190.tar.gz scummvm-rg350-a0347d46de528dda23c07fbcc4e20a48a86f9190.tar.bz2 scummvm-rg350-a0347d46de528dda23c07fbcc4e20a48a86f9190.zip |
fixed footdemo startup wizimage
svn-id: r16946
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/wiz_he.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/scumm/wiz_he.cpp b/scumm/wiz_he.cpp index b5e722c709..cc303f4f51 100644 --- a/scumm/wiz_he.cpp +++ b/scumm/wiz_he.cpp @@ -256,13 +256,13 @@ void Wiz::copyWizImage(uint8 *dst, const uint8 *src, int dstw, int dsth, int src void Wiz::copyRawWizImage(uint8 *dst, const uint8 *src, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, const Common::Rect *rect, int flags, const uint8 *palPtr, int transColor) { Common::Rect r1, r2; if (calcClipRects(dstw, dsth, srcx, srcy, srcw, srch, rect, r1, r2)) { - if (flags & 0x400) { + if (flags & kWIFFlipX) { int l = r1.left; int r = r1.right; r1.left = srcw - r; r1.right = srcw - l; } - if (flags & 0x800) { + if (flags & kWIFFlipY) { int t = r1.top; int b = r1.bottom; r1.top = srch - b; @@ -277,14 +277,22 @@ void Wiz::copyRawWizImage(uint8 *dst, const uint8 *src, int dstw, int dsth, int } int h = r1.height(); int w = r1.width(); + if (srcx < 0) { + src -= srcx; + } + if (srcy < 0) { + src -= srcy * srcw; + } dst += r2.left + r2.top * dstw; while (h--) { + const uint8 *p = src; for (int i = 0; i < w; ++i) { - uint8 col = *src++; + uint8 col = *p++; if (transColor == -1 || transColor != col) { dst[i] = palPtr[col]; } } + src += srcw; dst += dstw; } } @@ -863,6 +871,7 @@ uint8 *ScummEngine_v72he::drawWizImage(int restype, const WizImage *pwi) { uint32 comp = READ_LE_UINT32(wizh + 0x0); uint32 width = READ_LE_UINT32(wizh + 0x4); uint32 height = READ_LE_UINT32(wizh + 0x8); + debug(1, "wiz_header.comp = %d wiz_header.w = %d wiz_header.h = %d)", comp, width, height); assert(comp == 0 || comp == 1 || comp == 2 || comp == 3 || comp == 10 || comp == 11); const uint8 *wizd = findWrappedBlock(MKID('WIZD'), dataPtr, pwi->state, 0); |