aboutsummaryrefslogtreecommitdiff
path: root/scumm/wiz_he.cpp
diff options
context:
space:
mode:
authorTravis Howell2005-03-30 14:12:57 +0000
committerTravis Howell2005-03-30 14:12:57 +0000
commitb93b50809a302c994f36bea82a4178e5e9ca61dc (patch)
treee1f669b9c162bfcb337b4d04e7f36ce554a6cb80 /scumm/wiz_he.cpp
parent41f910b5adf58f387ed491e2fbf17468ec4b3490 (diff)
downloadscummvm-rg350-b93b50809a302c994f36bea82a4178e5e9ca61dc.tar.gz
scummvm-rg350-b93b50809a302c994f36bea82a4178e5e9ca61dc.tar.bz2
scummvm-rg350-b93b50809a302c994f36bea82a4178e5e9ca61dc.zip
Correct return values were lost in last commit.
Also revert cleanup from scumm/akos.cpp revision 1.185. Clipping isn't compatible, due to possible negative values. svn-id: r17294
Diffstat (limited to 'scumm/wiz_he.cpp')
-rw-r--r--scumm/wiz_he.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/scumm/wiz_he.cpp b/scumm/wiz_he.cpp
index 77240387ba..625fae3655 100644
--- a/scumm/wiz_he.cpp
+++ b/scumm/wiz_he.cpp
@@ -231,8 +231,6 @@ void Wiz::copyAuxImage(uint8 *dst1, uint8 *dst2, const uint8 *src, int dstw, int
}
static bool calcClipRects(int dst_w, int dst_h, int src_x, int src_y, int src_w, int src_h, const Common::Rect *rect, Common::Rect &srcRect, Common::Rect &dstRect) {
- srcRect = Common::Rect(0, 0, src_w, src_h);
- dstRect = Common::Rect(src_x, src_y, src_x + src_w, src_y + src_h);
Common::Rect r3;
int diff;
@@ -268,7 +266,7 @@ static bool calcClipRects(int dst_w, int dst_h, int src_x, int src_y, int src_w,
dstRect.bottom -= diff;
}
- return true;
+ return srcRect.isValidRect() && dstRect.isValidRect();
}
void Wiz::copyWizImage(uint8 *dst, const uint8 *src, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, const Common::Rect *rect) {
@@ -325,6 +323,9 @@ void Wiz::copyRawWizImage(uint8 *dst, const uint8 *src, int dstw, int dsth, int
}
void Wiz::decompressWizImage(uint8 *dst, int dstPitch, const Common::Rect &dstRect, const uint8 *src, const Common::Rect &srcRect, const uint8 *imagePal) {
+ printf("SRC left %d right %d top %d bottom %d\n", srcRect.left, srcRect.right, srcRect.top, srcRect.bottom);
+ printf("DST left %d right %d top %d bottom %d\n", dstRect.left, dstRect.right, dstRect.top, dstRect.bottom);
+
const uint8 *dataPtr, *dataPtrNext;
uint8 *dstPtr, *dstPtrNext;
uint32 code;