diff options
Diffstat (limited to 'engines/mortevielle')
-rw-r--r-- | engines/mortevielle/graphics.cpp | 2 | ||||
-rw-r--r-- | engines/mortevielle/outtext.cpp | 4 | ||||
-rw-r--r-- | engines/mortevielle/speech.cpp | 16 | ||||
-rw-r--r-- | engines/mortevielle/utils.cpp | 17 |
4 files changed, 19 insertions, 20 deletions
diff --git a/engines/mortevielle/graphics.cpp b/engines/mortevielle/graphics.cpp index d5036cb4d7..f967ad9c6a 100644 --- a/engines/mortevielle/graphics.cpp +++ b/engines/mortevielle/graphics.cpp @@ -937,7 +937,7 @@ void ScreenSurface::drawPicture(GfxSurface &surface, int x, int y) { (x + surface.w) * 2, (y + surface.h) * 2)); // Get a lookup for the palette mapping - const byte *paletteMap = &_vm->_mem[kAdrPictureComp * 16 + 2]; + const byte *paletteMap = &_vm->_mem[(kAdrPictureComp * 16) + 2]; // Loop through writing for (int yp = 0; yp < surface.h; ++yp) { diff --git a/engines/mortevielle/outtext.cpp b/engines/mortevielle/outtext.cpp index 0bb59a66e1..8e27e471eb 100644 --- a/engines/mortevielle/outtext.cpp +++ b/engines/mortevielle/outtext.cpp @@ -181,7 +181,7 @@ void TextHandler::loadAniFile(Common::String filename, int32 skipSize, int lengt f.close(); for (int i = remainingSkipSize; i <= length + remainingSkipSize; ++i) - _vm->_mem[kAdrAni * 16 + i - remainingSkipSize] = _vm->_mem[(kAdrPictureDecomp * 16) + i]; + _vm->_mem[(kAdrAni * 16) + i - remainingSkipSize] = _vm->_mem[(kAdrPictureDecomp * 16) + i]; } void TextHandler::taffich() { @@ -288,7 +288,7 @@ void TextHandler::taffich() { loadDesFile(filename, lgt, handle); if (_vm->_currGraphicalDevice == MODE_HERCULES) { for (int i = 0; i <= 15; ++i) { - int palh = READ_LE_UINT16(&_vm->_mem[(kAdrPictureComp * 16) + ((i + 1) << 1)]); + int palh = READ_LE_UINT16(&_vm->_mem[(kAdrPictureComp * 16) + 2 + (i << 1)]); alllum[i] = (palh & 15) + (((uint)palh >> 12) & 15) + (((uint)palh >> 8) & 15); } for (int i = 0; i <= 15; ++i) { diff --git a/engines/mortevielle/speech.cpp b/engines/mortevielle/speech.cpp index aea49d8df1..7f11ea20db 100644 --- a/engines/mortevielle/speech.cpp +++ b/engines/mortevielle/speech.cpp @@ -83,7 +83,7 @@ void SpeechManager::spfrac(int wor) { } void SpeechManager::charg_car(int &currWordNumb) { - int wor = swap(READ_LE_UINT16(&_vm->_mem[kAdrWord + currWordNumb])); + int wor = swap(READ_LE_UINT16(&_vm->_mem[(kAdrWord * 16) + currWordNumb])); int int_ = wor & 0x3f; // 63 if ((int_ >= 0) && (int_ <= 13)) { @@ -123,7 +123,7 @@ void SpeechManager::charg_car(int &currWordNumb) { void SpeechManager::entroct(byte o) { - _vm->_mem[kAdrTroct * 16 + _ptr_oct] = o; + _vm->_mem[(kAdrTroct * 16) + _ptr_oct] = o; ++_ptr_oct; } @@ -145,7 +145,7 @@ void SpeechManager::regenbruit() { int i = kOffsetB3 + 8590; int j = 0; do { - _cfiphBuffer[j] = READ_LE_UINT16(&_vm->_mem[kAdrNoise3 + i]); + _cfiphBuffer[j] = READ_LE_UINT16(&_vm->_mem[(kAdrNoise3 * 16) + i]); i += 2; ++j; } while (i < kOffsetB3 + 8790); @@ -161,7 +161,7 @@ void SpeechManager::loadMusicSound() { if (!f.open("sonmus.mor")) error("Missing file - sonmus.mor"); - f.read(&_vm->_mem[0x7414 * 16 + 0], 273); + f.read(&_vm->_mem[0x7414 * 16], 273); _vm->_soundManager.decodeMusic(&_vm->_mem[0x7414 * 16], &_vm->_mem[kAdrNoise * 16], 273); f.close(); @@ -194,10 +194,10 @@ void SpeechManager::loadNoise() { if (!f.open("bruits")) //Translation: "noise" error("Missing file - bruits"); - f.read(&_vm->_mem[kAdrNoise * 16 + 0], 250); + f.read(&_vm->_mem[kAdrNoise * 16], 250); for (i = 0; i <= 19013; ++i) - _vm->_mem[kAdrNoise * 16 + 32000 + i] = _vm->_mem[kAdrNoise5 + i]; - f.read(&_vm->_mem[kAdrNoise1 * 16 + kOffsetB1], 149); + _vm->_mem[(kAdrNoise * 16) + 32000 + i] = _vm->_mem[(kAdrNoise5 * 16) + i]; + f.read(&_vm->_mem[(kAdrNoise1 * 16) + kOffsetB1], 149); f.close(); } @@ -533,7 +533,7 @@ void SpeechManager::handlePhoneme() { int endPos = swap(_cfiphBuffer[_phonemeNumb]) + deca[_typlec]; int wordCount = endPos - startPos; for (int i = (uint)startPos >> 1, currWord = 0; i < (int)((uint)endPos >> 1); i++, currWord += 2) - WRITE_LE_UINT16(&_vm->_mem[kAdrWord + currWord], _cfiphBuffer[i]); + WRITE_LE_UINT16(&_vm->_mem[(kAdrWord * 16) + currWord], _cfiphBuffer[i]); _ptr_oct = 0; int currWord = 0; diff --git a/engines/mortevielle/utils.cpp b/engines/mortevielle/utils.cpp index 216bd72337..20ba38b969 100644 --- a/engines/mortevielle/utils.cpp +++ b/engines/mortevielle/utils.cpp @@ -2152,7 +2152,7 @@ void MortevielleEngine::loadBRUIT5() { if (!f.open("bruit5")) error("Missing file - bruit5"); - f.read(&_mem[kAdrNoise5 * 16 + 0], 149 * 128); + f.read(&_mem[kAdrNoise5 * 16], 149 * 128); f.close(); } @@ -2212,8 +2212,8 @@ void MortevielleEngine::music() { if (!fic.open("mort.img")) error("Missing file - mort.img"); - fic.read(&_mem[0x3800 * 16 + 0], 500); - fic.read(&_mem[0x47a0 * 16 + 0], 123); + fic.read(&_mem[0x3800 * 16], 500); + fic.read(&_mem[0x47a0 * 16], 123); fic.close(); _soundManager.decodeMusic(&_mem[0x3800 * 16], &_mem[kAdrMusic * 16], 623); @@ -2558,7 +2558,7 @@ void MortevielleEngine::displayControlMenu() { void MortevielleEngine::pictout(int seg, int dep, int x, int y) { GfxSurface surface; - surface.decode(&_mem[seg * 16 + dep]); + surface.decode(&_mem[(seg * 16) + dep]); if (_currGraphicalDevice == MODE_HERCULES) { _mem[(kAdrPictureComp * 16) + 2] = 0; @@ -2589,7 +2589,7 @@ void MortevielleEngine::adzon() { if (!f.open("dec.mor")) error("Missing file - dec.mor"); - f.read(&_mem[0x73a2 * 16 + 0], 1 * 1664); + f.read(&_mem[0x73a2 * 16], 1664); f.close(); } @@ -2597,12 +2597,12 @@ void MortevielleEngine::adzon() { * Returns the offset within the compressed image data resource of the desired image */ int MortevielleEngine::animof(int ouf, int num) { - int nani = _mem[kAdrAni * 16 + 1]; + int nani = _mem[(kAdrAni * 16) + 1]; int aux = num; if (ouf != 1) aux += nani; - int animof_result = (nani << 2) + 2 + READ_BE_UINT16(&_mem[kAdrAni * 16 + (aux << 1)]); + int animof_result = (nani << 2) + 2 + READ_BE_UINT16(&_mem[(kAdrAni * 16) + (aux << 1)]); return animof_result; } @@ -2981,11 +2981,10 @@ void MortevielleEngine::aniof(int ouf, int num) { num = 3; } - int ad = kAdrAni; int offset = animof(ouf, num); GfxSurface surface; - surface.decode(&_mem[ad * 16 + offset]); + surface.decode(&_mem[(kAdrAni * 16) + offset]); _screenSurface.drawPicture(surface, 0, 12); prepareScreenType1(); |