aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/parallaction/disk_br.cpp4
-rw-r--r--engines/parallaction/gfxbase.cpp16
2 files changed, 14 insertions, 6 deletions
diff --git a/engines/parallaction/disk_br.cpp b/engines/parallaction/disk_br.cpp
index 57e413e354..97931aa731 100644
--- a/engines/parallaction/disk_br.cpp
+++ b/engines/parallaction/disk_br.cpp
@@ -481,14 +481,14 @@ void AmigaDisk_br::loadScenery(BackgroundInfo& info, const char* name, const cha
}
#if 0
if (mask) {
- stream = tryOpenFile("msk/" + Common::String(path), ".msk");
+ stream = tryOpenFile("msk/" + Common::String(mask), ".msk");
if (stream) {
Graphics::PackBitsReadStream unpackedStream(*stream);
info._mask = new MaskBuffer;
+ info._path->bigEndian = false;
info._mask->create(info.width, info.height);
unpackedStream.read(info._mask->data, info._mask->size);
// TODO: there is another step to do after decompression...
- loadMask(mask, *info._mask);
delete stream;
} else {
debugC(1, kDebugDisk, "AmigaDisk_br::loadScenery: (%s) not found", mask);
diff --git a/engines/parallaction/gfxbase.cpp b/engines/parallaction/gfxbase.cpp
index a0becfe70e..47bf0000db 100644
--- a/engines/parallaction/gfxbase.cpp
+++ b/engines/parallaction/gfxbase.cpp
@@ -349,8 +349,12 @@ void Gfx::bltMaskScale(const Common::Rect& r, byte *data, Graphics::Surface *sur
}
if (*s != transparentColor) {
- byte v = _backgroundInfo->_mask->getValue(dp.x + col, dp.y + line);
- if (z >= v) *d2 = *s;
+ if (_backgroundInfo->hasMask()) {
+ byte v = _backgroundInfo->_mask->getValue(dp.x + col, dp.y + line);
+ if (z >= v) *d2 = *s;
+ } else {
+ *d2 = *s;
+ }
}
s++;
@@ -395,8 +399,12 @@ void Gfx::bltMaskNoScale(const Common::Rect& r, byte *data, Graphics::Surface *s
for (uint16 j = 0; j < q.width(); j++) {
if (*s != transparentColor) {
- byte v = _backgroundInfo->_mask->getValue(dp.x + j, dp.y + i);
- if (z >= v) *d = *s;
+ if (_backgroundInfo->hasMask()) {
+ byte v = _backgroundInfo->_mask->getValue(dp.x + j, dp.y + i);
+ if (z >= v) *d = *s;
+ } else {
+ *d = *s;
+ }
}
s++;