diff options
author | Strangerke | 2012-03-29 11:39:04 +0200 |
---|---|---|
committer | Strangerke | 2012-04-06 08:24:02 +0200 |
commit | f91e909afa4e3e839f29d2ba643ecd69da88c817 (patch) | |
tree | b9f71e362bc1666ea8a2dce7f00d21ddc7cc6731 /engines/mortevielle | |
parent | 16194412155e82b64736eb46cd37e702463e1416 (diff) | |
download | scummvm-rg350-f91e909afa4e3e839f29d2ba643ecd69da88c817.tar.gz scummvm-rg350-f91e909afa4e3e839f29d2ba643ecd69da88c817.tar.bz2 scummvm-rg350-f91e909afa4e3e839f29d2ba643ecd69da88c817.zip |
MORTEVIELLE: Start adding German DOS version
Diffstat (limited to 'engines/mortevielle')
-rw-r--r-- | engines/mortevielle/mortevielle.cpp | 37 | ||||
-rw-r--r-- | engines/mortevielle/mortevielle.h | 2 | ||||
-rw-r--r-- | engines/mortevielle/outtext.cpp | 6 | ||||
-rw-r--r-- | engines/mortevielle/speech.h | 2 |
4 files changed, 36 insertions, 11 deletions
diff --git a/engines/mortevielle/mortevielle.cpp b/engines/mortevielle/mortevielle.cpp index 94821bf7cd..5be59d5ec5 100644 --- a/engines/mortevielle/mortevielle.cpp +++ b/engines/mortevielle/mortevielle.cpp @@ -214,6 +214,8 @@ Common::ErrorCode MortevielleEngine::initialise() { _currGraphicalDevice = _newGraphicalDevice; hirs(); + free(_cfiecBuffer); + free(_speechManager._cfiphBuffer); return Common::kNoError; } @@ -714,7 +716,8 @@ void MortevielleEngine::loadPlaces() { Common::File f; if (!f.open("MXX.mor")) - error("Missing file - MXX.mor"); + if (!f.open("MFXX.mor")) + error("Missing file - MXX.mor"); for (int i = 0; i < 7; ++i) { for (int j = 0; j < 25; ++j) @@ -2345,8 +2348,13 @@ void MortevielleEngine::loadPalette() { Common::File f; byte b; - if (!f.open("fxx.mor")) - error("Missing file - fxx.mor"); + if (!f.open("fxx.mor")) { + if (f.open("mfxx.mor")) + f.seek(7 * 25); + else + error("Missing file - fxx.mor"); + } + for (int i = 0; i < 108; ++i) _fxxBuffer[i] = f.readSint16LE(); f.close(); @@ -2446,10 +2454,19 @@ void MortevielleEngine::loadBRUIT5() { void MortevielleEngine::loadCFIEC() { Common::File f; - if (!f.open("cfiec.mor")) - error("Missing file - cfiec.mor"); + if (!f.open("cfiec.mor")) { + if (!f.open("alcfiec.mor")) + error("Missing file - *cfiec.mor"); + } + + int size = ((f.size() / 128) + 1) * 128; + + if (!_reloadCFIEC) + _cfiecBuffer = (byte *)malloc(sizeof(byte) * size); + + for (int i = 0; i < size; ++i) + _cfiecBuffer[i] = f.readByte(); - f.read(&_cfiecBuffer[0], 822 * 128); f.close(); _reloadCFIEC = false; @@ -2459,8 +2476,12 @@ void MortevielleEngine::loadCFIEC() { void MortevielleEngine::loadCFIPH() { Common::File f; - if (!f.open("cfiph.mor")) - error("Missing file - cfiph.mor"); + if (!f.open("cfiph.mor")) { + if (!f.open("alcfiph.mor")) + error("Missing file - *cfiph.mor"); + } + + _speechManager._cfiphBuffer = (int16 *)malloc(sizeof(int16) * (f.size() / 2)); for (int i = 0; i < (f.size() / 2); ++i) _speechManager._cfiphBuffer[i] = f.readSint16LE(); diff --git a/engines/mortevielle/mortevielle.h b/engines/mortevielle/mortevielle.h index 68ea2277e9..e22732600f 100644 --- a/engines/mortevielle/mortevielle.h +++ b/engines/mortevielle/mortevielle.h @@ -272,7 +272,7 @@ private: Common::String _hintPctMessage; - byte _cfiecBuffer[822 * 128]; + byte *_cfiecBuffer; byte _touv[8]; int _nbrep[9]; int _nbrepm[9]; diff --git a/engines/mortevielle/outtext.cpp b/engines/mortevielle/outtext.cpp index 75d9bde9ff..e44dc989c6 100644 --- a/engines/mortevielle/outtext.cpp +++ b/engines/mortevielle/outtext.cpp @@ -296,7 +296,11 @@ void TextHandler::taffich() { filename = "DXX.mor"; } else { - filename = "DZZ.mor"; + if (g_vm->getLanguage() == Common::DE_DEU) + filename = "DZZALL"; + else + filename = "DZZ.mor"; + handle = g_vm->_fxxBuffer[87]; if (a == 51) { lgt = handle; diff --git a/engines/mortevielle/speech.h b/engines/mortevielle/speech.h index f9af192089..42be466a57 100644 --- a/engines/mortevielle/speech.h +++ b/engines/mortevielle/speech.h @@ -73,7 +73,7 @@ private: int _ptr_oct; public: - int _cfiphBuffer[6401]; + int16 *_cfiphBuffer; int _tbi[256]; int _mlec; |