diff options
author | Travis Howell | 2007-03-12 23:13:33 +0000 |
---|---|---|
committer | Travis Howell | 2007-03-12 23:13:33 +0000 |
commit | 753c13111ccc5f133ed75a94d640529ea3d5bcc4 (patch) | |
tree | 33848d1225cd9330a9be0c3d33c6ff2f5d320e4c /engines/scumm/he | |
parent | 1e8047a5d221cb9328bfa13efa9460d51d3bfdc4 (diff) | |
download | scummvm-rg350-753c13111ccc5f133ed75a94d640529ea3d5bcc4.tar.gz scummvm-rg350-753c13111ccc5f133ed75a94d640529ea3d5bcc4.tar.bz2 scummvm-rg350-753c13111ccc5f133ed75a94d640529ea3d5bcc4.zip |
Restore flipping code for raw wiz images, which was lost in revision 24860.
svn-id: r26120
Diffstat (limited to 'engines/scumm/he')
-rw-r--r-- | engines/scumm/he/wiz_he.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/engines/scumm/he/wiz_he.cpp b/engines/scumm/he/wiz_he.cpp index d9ece1cb1c..30a5786122 100644 --- a/engines/scumm/he/wiz_he.cpp +++ b/engines/scumm/he/wiz_he.cpp @@ -498,13 +498,22 @@ void Wiz::copyWizImageWithMask(uint8 *dst, const uint8 *src, int dstw, int dsth, 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)) { - dst += r2.left + r2.top * dstw; - src += r1.left + r1.top * srcw; - if (flags & (kWIFFlipY | kWIFFlipX)) { - warning("Unhandled Wiz flags (kWIFFlipY | kWIFFlipX)"); + if (flags & kWIFFlipX) { + int l = r1.left; + int r = r1.right; + r1.left = srcw - r; + r1.right = srcw - l; + } + if (flags & kWIFFlipY) { + int t = r1.top; + int b = r1.bottom; + r1.top = srch - b; + r1.bottom = srch - t; } int h = r1.height(); int w = r1.width(); + src += r1.left + r1.top * srcw; + dst += r2.left + r2.top * dstw; if (palPtr) { decompressRawWizImage<kWizRMap>(dst, dstw, src, srcw, w, h, transColor, palPtr); } else { |