From b6b4247335c5cc0f82cdaf590b2bd93e22eb62af Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 27 Jun 2010 11:16:49 +0000 Subject: Workaround that corrects some bad frame data in the Russian version that was causing the several game crashes svn-id: r50372 --- engines/tinsel/graphics.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'engines/tinsel') diff --git a/engines/tinsel/graphics.cpp b/engines/tinsel/graphics.cpp index 9700e8947f..3423f1054a 100644 --- a/engines/tinsel/graphics.cpp +++ b/engines/tinsel/graphics.cpp @@ -443,6 +443,12 @@ static void t2WrtNonZero(DRAWOBJECT *pObj, uint8 *srcP, uint8 *destP, bool apply int numBytes; int clipAmount; + // WORKAROUND: One of the mortician frames has several corrupt bytes in the Russian version + if ((pObj->hBits == 2517583660) && (_vm->getLanguage() == Common::RU_RUS)) { + uint8 correctBytes[5] = {0xA3, 0x00, 0x89, 0xC0, 0xA6}; + Common::copy(&correctBytes[0], &correctBytes[5], srcP); + } + for (int y = 0; y < pObj->height; ++y) { // Get the position to start writing out from uint8 *tempP = !horizFlipped ? destP : @@ -596,6 +602,23 @@ static void PackedWrtNonZero(DRAWOBJECT *pObj, uint8 *srcP, uint8 *destP, int numBytes, colour; int v; + if (_vm->getLanguage() == Common::RU_RUS) { + // WORKAROUND: One of the mortician frames has several corrupt bytes in the Russian version + if (pObj->hBits == 2517583393) { + uint8 correctBytes[5] = {0x00, 0x00, 0x17, 0x01, 0x00}; + Common::copy(&correctBytes[0], &correctBytes[5], srcP + 267); + } + // WORKAROUND: One of Dibbler's frames in the end sequence has corrupt bytes in the Russian version + if (pObj->hBits == 33651742) { + uint8 correctBytes[40] = { + 0x06, 0xc0, 0xd6, 0xc1, 0x09, 0xce, 0x0d, 0x24, 0x02, 0x12, 0x01, 0x00, 0x00, 0x23, 0x21, 0x32, + 0x12, 0x00, 0x00, 0x20, 0x01, 0x11, 0x32, 0x12, 0x01, 0x00, 0x00, 0x1b, 0x02, 0x11, 0x34, 0x11, + 0x00, 0x00, 0x18, 0x01, 0x11, 0x35, 0x21, 0x01 + }; + Common::copy(&correctBytes[0], &correctBytes[40], srcP); + } + } + if (applyClipping) { pObj->height -= pObj->botClip; topClip = pObj->topClip; -- cgit v1.2.3