aboutsummaryrefslogtreecommitdiff
path: root/engines/director/frame.cpp
diff options
context:
space:
mode:
authorstevenhoefel2017-02-28 15:44:52 +1100
committerstevenhoefel2017-02-28 15:44:52 +1100
commitb0093cba4bd750201c803d0e05e046801cb62684 (patch)
treea492e3eccd187a392186d249ce3881f07f82cbd6 /engines/director/frame.cpp
parentf819d7332d84e250145d5f93843142d73bf53dd4 (diff)
downloadscummvm-rg350-b0093cba4bd750201c803d0e05e046801cb62684.tar.gz
scummvm-rg350-b0093cba4bd750201c803d0e05e046801cb62684.tar.bz2
scummvm-rg350-b0093cba4bd750201c803d0e05e046801cb62684.zip
DIRECTOR: Capture Mouse Down Sprite and highlight respective items.
Diffstat (limited to 'engines/director/frame.cpp')
-rw-r--r--engines/director/frame.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/engines/director/frame.cpp b/engines/director/frame.cpp
index 176bc475d1..f77bf5c8f8 100644
--- a/engines/director/frame.cpp
+++ b/engines/director/frame.cpp
@@ -622,8 +622,8 @@ void Frame::renderSprites(Graphics::ManagedSurface &surface, bool renderTrail) {
Common::Rect drawRect(x, y, x + width, y + height);
- inkBasedBlit(surface, *img->getSurface(), i, drawRect);
addDrawRect(i, drawRect);
+ inkBasedBlit(surface, *img->getSurface(), i, drawRect);
}
}
}
@@ -645,10 +645,10 @@ void Frame::renderShape(Graphics::ManagedSurface &surface, uint16 spriteId) {
Graphics::ManagedSurface tmpSurface;
tmpSurface.create(shapeRect.width(), shapeRect.height(), Graphics::PixelFormat::createFormatCLUT8());
if (_vm->getVersion() <= 3 && _sprites[spriteId]->_spriteType == 0x0c) {
- tmpSurface.fillRect(Common::Rect(shapeRect.width(), shapeRect.height()), 255);
- tmpSurface.frameRect(Common::Rect(shapeRect.width(), shapeRect.height()), 0);
+ tmpSurface.fillRect(Common::Rect(shapeRect.width(), shapeRect.height()), (_vm->getCurrentScore()->_currentMouseDownSpriteId == spriteId ? 0 : 0xff));
+ //tmpSurface.frameRect(Common::Rect(shapeRect.width(), shapeRect.height()), 0);
// TODO: don't override, work out how to display correctly.
- _sprites[spriteId]->_ink = kInkTypeTransparent;
+ _sprites[spriteId]->_ink = kInkTypeReverse;
} else {
// No minus one on the pattern here! MacPlotData will do that for us!
Graphics::MacPlotData pd(&tmpSurface, &_vm->getPatterns(), _sprites[spriteId]->_castId, 1, _sprites[spriteId]->_backColor);
@@ -661,8 +661,8 @@ void Frame::renderShape(Graphics::ManagedSurface &surface, uint16 spriteId) {
tmpSurface.frameRect(Common::Rect(rr, rr, shapeRect.width() - (rr * 2), shapeRect.height() - (rr * 2)), 0);
}
+ addDrawRect(spriteId, shapeRect);
inkBasedBlit(surface, tmpSurface, spriteId, shapeRect);
- addDrawRect(spriteId, shapeRect);
}
void Frame::renderButton(Graphics::ManagedSurface &surface, uint16 spriteId, uint16 textId) {
@@ -1062,7 +1062,7 @@ void Frame::drawReverseSprite(Graphics::ManagedSurface &target, const Graphics::
for (int j = 0; j < drawRect.width(); j++) {
if ((getSpriteIDFromPos(Common::Point(drawRect.left + j, drawRect.top + ii)) != 0))
- *dst = (_vm->getPaletteColorCount() - 1) - *src;
+ if (*src != skipColor) *dst = (*dst == *src ? (*src == 0 ? 0xff : 0) : *src);
else if (*src != skipColor)
*dst = *src;
src++;