diff options
| author | Strangerke | 2013-07-25 09:59:25 +0200 | 
|---|---|---|
| committer | Strangerke | 2013-07-25 09:59:25 +0200 | 
| commit | 31dffa00e094f0782561fe3f5a342caae67dfdfd (patch) | |
| tree | 91f46bfa5ebed88141ce8a3bf6c2d0a55f0257be | |
| parent | 3f191e8f0fb3fb4dbfac8e09fc39bf33557ab4ab (diff) | |
| download | scummvm-rg350-31dffa00e094f0782561fe3f5a342caae67dfdfd.tar.gz scummvm-rg350-31dffa00e094f0782561fe3f5a342caae67dfdfd.tar.bz2 scummvm-rg350-31dffa00e094f0782561fe3f5a342caae67dfdfd.zip | |
MORTEVIELLE: Remove the check on German for the intro filename by using an alternate filename in loading code
| -rw-r--r-- | engines/mortevielle/outtext.cpp | 26 | ||||
| -rw-r--r-- | engines/mortevielle/outtext.h | 2 | 
2 files changed, 13 insertions, 15 deletions
| diff --git a/engines/mortevielle/outtext.cpp b/engines/mortevielle/outtext.cpp index 9bc6d8ffc8..85cc5809dc 100644 --- a/engines/mortevielle/outtext.cpp +++ b/engines/mortevielle/outtext.cpp @@ -128,16 +128,16 @@ void TextHandler::displayStr(Common::String inputStr, int x, int y, int dx, int   * Load DES (picture container) file   * @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); +void TextHandler::loadPictureFile(Common::String filename, Common::String altFilename, int32 skipSize, int 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. +	if (!f.open(filename)) { +		if (!f.open(altFilename)) +			error("Missing file: Either %s or %s", filename.c_str(), altFilename.c_str()); +	} +	// HACK: The original game contains a bug in the 2nd 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) +	if (length == -1)  		length = f.size() - skipSize;  	assert(skipSize + length <= f.size()); @@ -224,7 +224,7 @@ void TextHandler::taffich() {  	_vm->_destinationOk = true;  	_vm->_mouse.hideMouse();  	drawingStartPos = 0; -	Common::String filename; +	Common::String filename, altFilename;  	if ((a != 50) && (a != 51)) {  		_vm->_maff = a; @@ -250,12 +250,10 @@ void TextHandler::taffich() {  			drawingStartPos += _vm->_drawingSizeArr[cx];  		drawingSize = _vm->_drawingSizeArr[a]; -		filename = "DXX.mor"; +		altFilename = filename = "DXX.mor";  	} else { -		if (_vm->getLanguage() == Common::DE_DEU) -			filename = "DZZALL"; -		else -			filename = "DZZ.mor"; +		filename = "DZZ.mor"; +		altFilename = "DZZALL";  		if (a == 50) {  			// First intro screen @@ -270,7 +268,7 @@ void TextHandler::taffich() {  		_vm->_maff = a;  		npal = a + 37;  	} -	loadPictureFile(filename, drawingStartPos, drawingSize); +	loadPictureFile(filename, altFilename, drawingStartPos, drawingSize);  	if (_vm->_currGraphicalDevice == MODE_HERCULES) {  		for (int i = 0; i <= 15; ++i) {  			int palh = READ_LE_UINT16(&_vm->_curPict[2 + (i << 1)]); diff --git a/engines/mortevielle/outtext.h b/engines/mortevielle/outtext.h index 1689e01714..1c69d9b9b4 100644 --- a/engines/mortevielle/outtext.h +++ b/engines/mortevielle/outtext.h @@ -42,7 +42,7 @@ private:  public:  	void setParent(MortevielleEngine *vm);  	void displayStr(Common::String inputStr, int x, int y, int dx, int dy, int typ); -	void loadPictureFile(Common::String filename, int32 skipSize, int length); +	void loadPictureFile(Common::String filename, Common::String altFilename, int32 skipSize, int length);  	void loadAniFile(Common::String filename, int32 skipSize, int length);  	void taffich();  }; | 
