diff options
author | Eugene Sandulenko | 2016-06-03 16:44:41 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2016-08-03 23:40:36 +0200 |
commit | f95410532015363eb158537637147cb97081eee9 (patch) | |
tree | 02945145566ab8cfea134f920469ed499cf44e76 | |
parent | 910803a914b1c1503dafc86a742ca39ee190aa0a (diff) | |
download | scummvm-rg350-f95410532015363eb158537637147cb97081eee9.tar.gz scummvm-rg350-f95410532015363eb158537637147cb97081eee9.tar.bz2 scummvm-rg350-f95410532015363eb158537637147cb97081eee9.zip |
DIRECTOR: Switch Matte Ink to using flood fill mask mode.
-rw-r--r-- | engines/director/score.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/engines/director/score.cpp b/engines/director/score.cpp index eb33ef567c..bd07f7849d 100644 --- a/engines/director/score.cpp +++ b/engines/director/score.cpp @@ -297,12 +297,12 @@ Frame::Frame() { _transFlags = 0; _transChunkSize = 0; _tempo = 0; - + _sound1 = 0; _sound2 = 0; _soundType1 = 0; _soundType2 = 0; - + _actionId = 0; _skipFrameFlag = 0; _blend = 0; @@ -556,7 +556,7 @@ void Frame::drawBackgndTransSprite(Graphics::ManagedSurface &target, const Graph void Frame::drawMatteSprite(Graphics::ManagedSurface &target, const Graphics::Surface &sprite, Common::Rect &drawRect) { //Like background trans, but all white pixels NOT ENCLOSED by coloured pixels are transparent uint8 skipColor = 15; - uint8 toColor = 16; + uint8 toColor = 0; // Could be anything, not used. Graphics::Surface tmp; tmp.copyFrom(sprite); @@ -571,23 +571,22 @@ void Frame::drawMatteSprite(Graphics::ManagedSurface &target, const Graphics::Su ff.addSeed(xx, 0); ff.addSeed(xx, tmp.h - 1); } - ff.fill(); + ff.fillMask(); for (int yy = 0; yy < tmp.h; yy++) { const byte *src = (const byte *)tmp.getBasePtr(0, yy); + const byte *mask = (const byte *)ff.getMask()->getBasePtr(0, yy); byte *dst = (byte *)target.getBasePtr(drawRect.left, drawRect.top + yy); - for (int xx = 0; xx < drawRect.width(); xx++) { - if (*src != toColor) + + for (int xx = 0; xx < drawRect.width(); xx++, src++, dst++, mask++) + if (*mask == 0) *dst = *src; - src++; - dst++; - } } tmp.free(); } -Sprite::Sprite() { +Sprite::Sprite() { _enabled = false; _width = 0; _ink = kInkTypeCopy; |