aboutsummaryrefslogtreecommitdiff
path: root/engines/director
diff options
context:
space:
mode:
authorScott Percival2020-01-05 11:07:36 +0800
committerScott Percival2020-01-05 11:35:40 +0800
commit86db38520a5fd5e02a6e48b07da22c0072f495c6 (patch)
treef5ff6b0aba1b1fa681fac8483b90980c3f58c211 /engines/director
parentb2cb41580e7caf7e56a0bb60afce785605f76ae0 (diff)
downloadscummvm-rg350-86db38520a5fd5e02a6e48b07da22c0072f495c6.tar.gz
scummvm-rg350-86db38520a5fd5e02a6e48b07da22c0072f495c6.tar.bz2
scummvm-rg350-86db38520a5fd5e02a6e48b07da22c0072f495c6.zip
DIRECTOR: Fix solid fill shapes
Diffstat (limited to 'engines/director')
-rw-r--r--engines/director/frame.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/engines/director/frame.cpp b/engines/director/frame.cpp
index 24a0be8f00..672e856b97 100644
--- a/engines/director/frame.cpp
+++ b/engines/director/frame.cpp
@@ -208,7 +208,7 @@ void Frame::readChannels(Common::ReadStreamEndian *stream) {
else
sprite._trails = 0;
- sprite._lineSize = (sprite._flags >> 8) & 0x03;
+ sprite._lineSize = ((sprite._flags >> 8) & 0x03) + 1;
sprite._castId = stream->readUint16();
sprite._startPoint.y = stream->readUint16();
@@ -664,7 +664,7 @@ void Frame::renderShape(Graphics::ManagedSurface &surface, uint16 spriteId) {
byte spriteType = sp->_spriteType;
byte foreColor = sp->_foreColor;
byte backColor = sp->_backColor;
- int lineSize = sp->_lineSize - 1;
+ int lineSize = sp->_lineSize;
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 - 1;
+ lineSize = sc->_lineThickness;
ink = sc->_ink;
// shapes should be rendered with transparency by default
if (ink == kInkTypeCopy) {
@@ -702,6 +702,16 @@ void Frame::renderShape(Graphics::ManagedSurface &surface, uint16 spriteId) {
}
}
+ // for outlined shapes, line thickness of 1 means invisible.
+ // filled shapes need at least a line thickness of 1 for MacPlot to render them
+ if (spriteType == kOutlinedRectangleSprite ||
+ spriteType == kOutlinedRoundedRectangleSprite ||
+ spriteType == kOutlinedOvalSprite ||
+ spriteType == kLineBottomTopSprite ||
+ spriteType == kLineTopBottomSprite) {
+ lineSize -= 1;
+ }
+
Common::Rect shapeRect = Common::Rect(sp->_startPoint.x,
sp->_startPoint.y,
sp->_startPoint.x + sp->_width,