aboutsummaryrefslogtreecommitdiff
path: root/engines/mohawk
diff options
context:
space:
mode:
authorMatthew Hoops2010-12-11 18:38:27 +0000
committerMatthew Hoops2010-12-11 18:38:27 +0000
commitb1e3b48418e2514893768ecf8a6ba0db61b9302e (patch)
treef8754abe1a04fc9a1c96d615c76c7bf4070d65f7 /engines/mohawk
parent36851d4eb4a4b9fe3f717aee24ab4f10e14ac725 (diff)
downloadscummvm-rg350-b1e3b48418e2514893768ecf8a6ba0db61b9302e.tar.gz
scummvm-rg350-b1e3b48418e2514893768ecf8a6ba0db61b9302e.tar.bz2
scummvm-rg350-b1e3b48418e2514893768ecf8a6ba0db61b9302e.zip
MOHAWK: Fix some Myst ME cards that store PICT images in WDIB resources (see myst 4013)
svn-id: r54867
Diffstat (limited to 'engines/mohawk')
-rw-r--r--engines/mohawk/graphics.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/mohawk/graphics.cpp b/engines/mohawk/graphics.cpp
index 8812b2edb2..30478bf74b 100644
--- a/engines/mohawk/graphics.cpp
+++ b/engines/mohawk/graphics.cpp
@@ -323,15 +323,17 @@ MohawkSurface *MystGraphics::decodeImage(uint16 id) {
// The PICT resource exists. However, it could still contain a MystBitmap
// instead of a PICT image...
dataStream = _vm->getResource(ID_PICT, id);
+ } else // No PICT, so the WDIB must exist. Let's go grab it.
+ dataStream = _vm->getResource(ID_WDIB, id);
+ if (_vm->getFeatures() & GF_ME) {
// Here we detect whether it's really a PICT or a WDIB. Since a MystBitmap
// would be compressed, there's no way to detect for the BM without a hack.
// So, we search for the PICT version opcode for detection.
dataStream->seek(512 + 10); // 512 byte pict header
isPict = (dataStream->readUint32BE() == 0x001102FF);
dataStream->seek(0);
- } else // No PICT, so the WDIB must exist. Let's go grab it.
- dataStream = _vm->getResource(ID_WDIB, id);
+ }
if (isPict)
mhkSurface = new MohawkSurface(_pictDecoder->decodeImage(dataStream));