diff options
author | Borja Lorente | 2016-06-21 20:30:41 +0200 |
---|---|---|
committer | Borja Lorente | 2016-08-14 18:31:44 +0200 |
commit | 4d8f8fd36bdb9b1f807f4da04c9e3e4c3438dbfa (patch) | |
tree | c22b1dcdc7a6a6105b5dcf061bfeba21b421a0ce /engines/macventure/image.cpp | |
parent | 27ecdea89169bf9fd2a1c0870a17c93592ff299e (diff) | |
download | scummvm-rg350-4d8f8fd36bdb9b1f807f4da04c9e3e4c3438dbfa.tar.gz scummvm-rg350-4d8f8fd36bdb9b1f807f4da04c9e3e4c3438dbfa.tar.bz2 scummvm-rg350-4d8f8fd36bdb9b1f807f4da04c9e3e4c3438dbfa.zip |
MACVENTURE: Complete ppic blitting
Diffstat (limited to 'engines/macventure/image.cpp')
-rw-r--r-- | engines/macventure/image.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/engines/macventure/image.cpp b/engines/macventure/image.cpp index 960c18dfc4..46d440c957 100644 --- a/engines/macventure/image.cpp +++ b/engines/macventure/image.cpp @@ -70,7 +70,9 @@ ImageAsset::ImageAsset(ObjID original, Container * container) { //_maskData = nullptr; decodePPIC(_id, _imgData); - decodePPIC(_mask, _maskData); + + if (_container->getItemByteSize(_mask)) // Has mask + decodePPIC(_mask, _maskData); } ImageAsset::~ImageAsset() { @@ -352,9 +354,8 @@ void ImageAsset::blitDirect(Graphics::ManagedSurface * target, uint32 ox, uint32 byte pix = 0; for (uint x = 0; x < _bitWidth; x++) { pix = data[bmpofs + (x >> 3)] & (1 << (7 - (x & 7))); - - pix = pix ? kColorWhite : kColorBlack; - *((byte *)target->getBasePtr(ox + x, oy + y)) = pix; + pix = pix ? kColorBlack : kColorWhite; + if (pix) *((byte *)target->getBasePtr(ox + x, oy + y)) = pix; } } } |