From 3f191e8f0fb3fb4dbfac8e09fc39bf33557ab4ab Mon Sep 17 00:00:00 2001 From: Strangerke Date: Thu, 25 Jul 2013 09:49:43 +0200 Subject: MORTEVIELLE: Fix the German 2nd intro screen (original bug) --- engines/mortevielle/outtext.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'engines') diff --git a/engines/mortevielle/outtext.cpp b/engines/mortevielle/outtext.cpp index 37ea06eb33..9bc6d8ffc8 100644 --- a/engines/mortevielle/outtext.cpp +++ b/engines/mortevielle/outtext.cpp @@ -129,10 +129,17 @@ void TextHandler::displayStr(Common::String inputStr, int x, int y, int dx, int * @remarks Originally called 'chardes' */ void TextHandler::loadPictureFile(Common::String filename, int32 skipSize, int length) { + warning("%s - pos %d size %d", filename.c_str(), skipSize, length); Common::File f; if (!f.open(filename)) error("Missing file %s", filename.c_str()); + // HACK: The original game contains a bug in the intro screen, in German DOS version. + // The size specified in the fxx array is wrong (too short). In order to fix it, we are using + // the value -1 to force a variable read length. + if (length < 0) + length = f.size() - skipSize; + assert(skipSize + length <= f.size()); free(_vm->_curPict); @@ -251,11 +258,14 @@ void TextHandler::taffich() { filename = "DZZ.mor"; if (a == 50) { + // First intro screen drawingStartPos = 0; drawingSize = _vm->_drawingSizeArr[87]; } else { // a == 51 + // Second intro screen drawingStartPos = _vm->_drawingSizeArr[87]; - drawingSize = _vm->_drawingSizeArr[88]; + // HACK: Force a variable size in order to fix the wrong size used by the German version + drawingSize = -1; } _vm->_maff = a; npal = a + 37; -- cgit v1.2.3