aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scumm/akos.cpp5
-rw-r--r--scumm/gfx.cpp8
-rw-r--r--scumm/script_v72he.cpp4
3 files changed, 7 insertions, 10 deletions
diff --git a/scumm/akos.cpp b/scumm/akos.cpp
index d3fb0ef285..565b54f8e1 100644
--- a/scumm/akos.cpp
+++ b/scumm/akos.cpp
@@ -1219,8 +1219,8 @@ byte AkosRenderer::codec32(int xmoveCur, int ymoveCur) {
}
dst.top = _actorY + ymoveCur;
- dst.right = dst.left + _width - 1;
- dst.bottom = dst.top + _height - 1;
+ dst.right = dst.left + _width;
+ dst.bottom = dst.top + _height;
dst.clip(_clipOverride);
src = dst;
@@ -1228,7 +1228,6 @@ byte AkosRenderer::codec32(int xmoveCur, int ymoveCur) {
_vm->markRectAsDirty(kMainVirtScreen, dst, _actorID);
- // cyx: are these variables really useful ?
if (_draw_top > dst.top)
_draw_top = dst.top;
if (_draw_bottom < dst.bottom)
diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp
index b528a1ae77..e59bcaaca0 100644
--- a/scumm/gfx.cpp
+++ b/scumm/gfx.cpp
@@ -1450,21 +1450,19 @@ void Gdi::drawBMAPObject(const byte *ptr, VirtScreen *vs, int obj, int x, int y,
}
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;
-
if (rect) {
r3 = *rect;
- Common::Rect r4(0, 0, dst_w, dst_h);
+ Common::Rect r4(dst_w, dst_h);
if (r3.intersects(r4)) {
r3.clip(r4);
} else {
return false;
}
} else {
- r3 = Common::Rect(0, 0, dst_w, dst_h);
+ r3 = Common::Rect(dst_w, dst_h);
}
+ dstRect = Common::Rect(src_x, src_y, src_x + src_w, src_y + src_h);
dstRect.clip(r3);
srcRect = dstRect;
srcRect.moveTo(0, 0);
diff --git a/scumm/script_v72he.cpp b/scumm/script_v72he.cpp
index df82e0e7b2..ecfb2a3b94 100644
--- a/scumm/script_v72he.cpp
+++ b/scumm/script_v72he.cpp
@@ -1475,7 +1475,7 @@ uint8 *ScummEngine_v72he::drawWizImage(int restype, const WizImage *pwi) {
cw = pvs->w;
ch = pvs->h;
}
- Common::Rect rScreen(0, 0, cw - 1, ch - 1);
+ Common::Rect rScreen(cw, ch);
if (pwi->flags & 0x80) {
// drawWizImageHelper2(p, wizd, cw, ch, x1, y1, width, height, &rScreen, 0, 2);
warning("drawWizImage() unhandled flag 0x80");
@@ -1489,7 +1489,7 @@ uint8 *ScummEngine_v72he::drawWizImage(int restype, const WizImage *pwi) {
warning("printing Wiz image is unimplemented");
dst = NULL;
} else if (!(pwi->flags & 0x20)) {
- Common::Rect rImage(pwi->x1, pwi->y1, pwi->x1 + width - 1, pwi->y1 + height - 1);
+ Common::Rect rImage(pwi->x1, pwi->y1, pwi->x1 + width, pwi->y1 + height);
if (rImage.intersects(rScreen)) {
rImage.clip(rScreen);
if (pwi->flags & 0x18) {