aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2017-11-23 20:01:49 -0500
committerPaul Gilbert2017-11-23 20:01:49 -0500
commit7ef9772d0de2aff24c5c8d0d43b30d1ede22085f (patch)
treeb22f7dd4197d5b28e6f5e8f0c074f501645ba77e
parent02ffcacacf1cb56c5c770c0302c252186a6189ab (diff)
downloadscummvm-rg350-7ef9772d0de2aff24c5c8d0d43b30d1ede22085f.tar.gz
scummvm-rg350-7ef9772d0de2aff24c5c8d0d43b30d1ede22085f.tar.bz2
scummvm-rg350-7ef9772d0de2aff24c5c8d0d43b30d1ede22085f.zip
XEEN: Fix drawing of yellow rect around selected character
-rw-r--r--engines/xeen/sprites.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/xeen/sprites.cpp b/engines/xeen/sprites.cpp
index 68382abc67..8070368a30 100644
--- a/engines/xeen/sprites.cpp
+++ b/engines/xeen/sprites.cpp
@@ -257,7 +257,7 @@ void SpriteResource::drawOffset(XSurface &dest, uint16 offset, const Common::Poi
assert(byteCount == lineLength);
drawBounds.top = MIN(drawBounds.top, destPos.y);
- drawBounds.bottom = MAX(drawBounds.bottom, destPos.y);
+ drawBounds.bottom = MAX((int)drawBounds.bottom, destPos.y + 1);
// Handle drawing out the line
byte *destP = (byte *)dest.getBasePtr(destPos.x, destPos.y);
@@ -274,7 +274,7 @@ void SpriteResource::drawOffset(XSurface &dest, uint16 offset, const Common::Poi
if (*lineP != -1 && xp >= bounds.left && xp < bounds.right &&
((!(flags & SPRFLAG_SCENE_CLIPPED) && !enlarge) || (xp >= SCENE_CLIP_LEFT && xp < SCENE_CLIP_RIGHT))) {
drawBounds.left = MIN(drawBounds.left, xp);
- drawBounds.right = MAX(drawBounds.right, xp);
+ drawBounds.right = MAX((int)drawBounds.right, xp + 1);
*destP = (byte)*lineP;
if (enlarge)
*(destP + SCREEN_WIDTH) = (byte)*lineP;