diff --git a/engines/mtropolis/assets.cpp b/engines/mtropolis/assets.cpp index a64f5cb7665..b2a4733322e 100644 --- a/engines/mtropolis/assets.cpp +++ b/engines/mtropolis/assets.cpp @@ -436,16 +436,12 @@ void CachedMToon::loadUncompressedFrame(const Common::Array &data, size_t void CachedMToon::decompressQuickTimeFrame(const Common::Array &data, size_t frameIndex) { const MToonMetadata::FrameDef &frameDef = _metadata->frames[frameIndex]; - uint16 bpp = _metadata->bitsPerPixel; - size_t w = frameDef.rect.width(); - size_t h = frameDef.rect.height(); - - if (_metadata->codecData.size() < 86) { - error("Unknown codec data block size"); - } - if (READ_BE_UINT16(&_metadata->codecData[32]) != w || READ_BE_UINT16(&_metadata->codecData[34]) != h || READ_BE_UINT16(&_metadata->codecData[82]) != bpp) { - error("Codec data block didn't match mToon metadata"); - } + // We used to validate that these match the sample desc, but that actually breaks in Obsidian + // on the Bureau Immediate Action clock puzzle, because the frames have different sizes and + // the codec data encodes the size of the last frame. + uint16 w = frameDef.rect.width(); + uint16 h = frameDef.rect.height(); + uint16 bpp = READ_BE_UINT16(&_metadata->codecData[82]); Image::Codec *codec = Image::createQuickTimeCodec(_metadata->codecID, w, h, bpp); if (!codec) { diff --git a/engines/mtropolis/data.h b/engines/mtropolis/data.h index 896d430ec16..d050745cc30 100644 --- a/engines/mtropolis/data.h +++ b/engines/mtropolis/data.h @@ -1694,6 +1694,9 @@ struct MToonAsset : public DataObject { Common::Array frames; // Codec data appears to be a 16-byte header followed by a QuickTime sample description + // Note that the sample description is partly useless because frames can have different sizes + // and the sample desc is only for the last frame! + // // The 16-byte header is: // uint32be size of codec data // char[4] codec ID