MORTEVIELLE: Start adding German DOS version

This commit is contained in:
Strangerke 2012-03-29 11:39:04 +02:00
parent 1619441215
commit f91e909afa
4 changed files with 36 additions and 11 deletions

View File

@ -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();

View File

@ -272,7 +272,7 @@ private:
Common::String _hintPctMessage;
byte _cfiecBuffer[822 * 128];
byte *_cfiecBuffer;
byte _touv[8];
int _nbrep[9];
int _nbrepm[9];

View File

@ -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;

View File

@ -73,7 +73,7 @@ private:
int _ptr_oct;
public:
int _cfiphBuffer[6401];
int16 *_cfiphBuffer;
int _tbi[256];
int _mlec;