From fad3e645507030a2c34e4d6e5a37ec1bcd526105 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Sun, 13 Feb 2011 18:00:39 -0500 Subject: SCI: Fix GK2 Mac picture 2315 It hardcodes the picture so it doesn't get run with the decompressor --- engines/sci/resource.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'engines/sci') diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp index d1bf869836..8c8bc6d512 100644 --- a/engines/sci/resource.cpp +++ b/engines/sci/resource.cpp @@ -459,6 +459,13 @@ void MacResourceForkResourceSource::decompressResource(Common::SeekableReadStrea bool canBeCompressed = !(g_sci && g_sci->getGameId() == GID_KQ6) && isCompressableResource(resource->_id.getType()); uint32 uncompressedSize = 0; + // GK2 Mac is crazy. In its Patches resource fork, picture 2315 is not + // compressed and it is hardcoded in the executable to say that it's + // not compressed. Why didn't they just add four zeroes to the end of + // the resource? (Checked with PPC disasm) + if (g_sci && g_sci->getGameId() == GID_GK2 && resource->_id.getType() == kResourceTypePic && resource->_id.getNumber() == 2315) + canBeCompressed = false; + // Get the uncompressed size from the end of the resource if (canBeCompressed && stream->size() > 4) { stream->seek(stream->size() - 4); -- cgit v1.2.3