aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Percival2020-01-04 22:48:48 +0800
committerScott Percival2020-01-04 22:49:14 +0800
commit7fb14af6f97c80d1372bcdb9310e53f784350f69 (patch)
treed35262014c2dae5772d961600042212b0616420f
parentb32d0f2ad99b526d72d47523eb642f8bc70fc91a (diff)
downloadscummvm-rg350-7fb14af6f97c80d1372bcdb9310e53f784350f69.tar.gz
scummvm-rg350-7fb14af6f97c80d1372bcdb9310e53f784350f69.tar.bz2
scummvm-rg350-7fb14af6f97c80d1372bcdb9310e53f784350f69.zip
DIRECTOR: Fix margins on shape rendering
-rw-r--r--engines/director/frame.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/director/frame.cpp b/engines/director/frame.cpp
index fe332ad4a4..9a15554142 100644
--- a/engines/director/frame.cpp
+++ b/engines/director/frame.cpp
@@ -664,7 +664,7 @@ void Frame::renderShape(Graphics::ManagedSurface &surface, uint16 spriteId) {
byte spriteType = sp->_spriteType;
byte foreColor = sp->_foreColor;
byte backColor = sp->_backColor;
- byte lineSize = sp->_lineSize + 1;
+ int lineSize = sp->_lineSize - 1;
if (spriteType == kCastMemberSprite && sp->_cast != NULL) {
switch (sp->_cast->_type) {
case kCastShape:
@@ -688,7 +688,7 @@ void Frame::renderShape(Graphics::ManagedSurface &surface, uint16 spriteId) {
}
foreColor = sc->_fgCol;
backColor = sc->_bgCol;
- lineSize = sc->_lineThickness;
+ lineSize = sc->_lineThickness - 1;
ink = sc->_ink;
// shapes should be rendered with transparency by default
if (ink == kInkTypeCopy) {
@@ -714,7 +714,7 @@ void Frame::renderShape(Graphics::ManagedSurface &surface, uint16 spriteId) {
// No minus one on the pattern here! MacPlotData will do that for us!
//Graphics::MacPlotData pd(&tmpSurface, &_vm->getPatterns(), 1, 1, sp->_backColor);
Graphics::MacPlotData pd(&tmpSurface, &_vm->getPatterns(), sp->getPattern(), lineSize, backColor);
- Common::Rect fillRect(shapeRect.width(), shapeRect.height());
+ Common::Rect fillRect(MAX((int)shapeRect.width() - lineSize, 0), MAX((int)shapeRect.height() - lineSize, 0));
switch (spriteType) {
case kRectangleSprite: