[Scummvm-cvs-logs] SF.net SVN: scummvm: [26120] scummvm/trunk/engines/scumm/he/wiz_he.cpp
kirben at users.sourceforge.net
kirben at users.sourceforge.net
Tue Mar 13 00:13:34 CET 2007
Revision: 26120
http://scummvm.svn.sourceforge.net/scummvm/?rev=26120&view=rev
Author: kirben
Date: 2007-03-12 16:13:33 -0700 (Mon, 12 Mar 2007)
Log Message:
-----------
Restore flipping code for raw wiz images, which was lost in revision 24860.
Revision Links:
--------------
http://scummvm.svn.sourceforge.net/scummvm/?rev=24860&view=rev
Modified Paths:
--------------
scummvm/trunk/engines/scumm/he/wiz_he.cpp
Modified: scummvm/trunk/engines/scumm/he/wiz_he.cpp
===================================================================
--- scummvm/trunk/engines/scumm/he/wiz_he.cpp 2007-03-12 23:03:30 UTC (rev 26119)
+++ scummvm/trunk/engines/scumm/he/wiz_he.cpp 2007-03-12 23:13:33 UTC (rev 26120)
@@ -498,13 +498,22 @@
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 {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list