[Scummvm-cvs-logs] CVS: scummvm/scumm akos.cpp,1.212,1.213 wiz_he.cpp,2.27,2.28
kirben
kirben at users.sourceforge.net
Wed Mar 30 06:14:24 CEST 2005
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6350/scumm
Modified Files:
akos.cpp wiz_he.cpp
Log Message:
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.
Index: akos.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/akos.cpp,v
retrieving revision 1.212
retrieving revision 1.213
diff -u -d -r1.212 -r1.213
--- akos.cpp 27 Mar 2005 01:07:20 -0000 1.212
+++ akos.cpp 30 Mar 2005 14:12:56 -0000 1.213
@@ -1219,15 +1219,37 @@
dst.left = _actorX + xmoveCur;
}
+ src.top = src.left = 0;
+ src.right = _width;
+ src.bottom = _height;
+
dst.top = _actorY + ymoveCur;
dst.right = dst.left + _width;
dst.bottom = dst.top + _height;
- dst.clip(_clipOverride);
- src = dst;
- src.moveTo(0, 0);
+ int diff;
+ diff = dst.left - _clipOverride.left;
+ if (diff < 0) {
+ src.left -= diff;
+ dst.left -= diff;
+ }
+ diff = dst.right - _clipOverride.right;
+ if (diff > 0) {
+ src.right -= diff;
+ dst.right -= diff;
+ }
+ diff = dst.top - _clipOverride.top;
+ if (diff < 0) {
+ src.top -= diff;
+ dst.top -= diff;
+ }
+ diff = dst.bottom - _clipOverride.bottom;
+ if (diff > 0) {
+ src.bottom -= diff;
+ dst.bottom -= diff;
+ }
- markRectAsDirty(dst);
+ _vm->markRectAsDirty(kMainVirtScreen, dst);
if (_draw_top > dst.top)
_draw_top = dst.top;
Index: wiz_he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/wiz_he.cpp,v
retrieving revision 2.27
retrieving revision 2.28
diff -u -d -r2.27 -r2.28
--- wiz_he.cpp 30 Mar 2005 13:34:24 -0000 2.27
+++ wiz_he.cpp 30 Mar 2005 14:12:57 -0000 2.28
@@ -231,8 +231,6 @@
}
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 @@
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::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;
More information about the Scummvm-git-logs
mailing list