From 88f5fe7329f2ee75db66c58daead78f4f4296da6 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Sun, 21 Jul 2013 19:59:58 +0200 Subject: MORTEVIELLE: Get rid of the last remaining magic values used with _mem --- engines/mortevielle/mortevielle.h | 3 +++ engines/mortevielle/speech.cpp | 4 ++-- engines/mortevielle/utils.cpp | 6 +++--- 3 files changed, 8 insertions(+), 5 deletions(-) (limited to 'engines') diff --git a/engines/mortevielle/mortevielle.h b/engines/mortevielle/mortevielle.h index d2649425e8..28e342cb95 100644 --- a/engines/mortevielle/mortevielle.h +++ b/engines/mortevielle/mortevielle.h @@ -67,6 +67,9 @@ const int kAdrMusic = 0x5000; const int kAdrPictureDecomp = 0x6000; const int kAdrPictureComp = 0x7000; +const int kAdrCompMusicBuf1 = 0x7414; +const int kAdrCompMusicBuf2 = 0x3800; +const int kAdrUnknownBuf = 0x47a0; const int kAdrDecBuffer = 0x73A2; #define ord(v) ((int) v) diff --git a/engines/mortevielle/speech.cpp b/engines/mortevielle/speech.cpp index 7f11ea20db..70b017c747 100644 --- a/engines/mortevielle/speech.cpp +++ b/engines/mortevielle/speech.cpp @@ -161,9 +161,9 @@ void SpeechManager::loadMusicSound() { if (!f.open("sonmus.mor")) error("Missing file - sonmus.mor"); - f.read(&_vm->_mem[0x7414 * 16], 273); + f.read(&_vm->_mem[kAdrCompMusicBuf1 * 16], 273); - _vm->_soundManager.decodeMusic(&_vm->_mem[0x7414 * 16], &_vm->_mem[kAdrNoise * 16], 273); + _vm->_soundManager.decodeMusic(&_vm->_mem[kAdrCompMusicBuf1 * 16], &_vm->_mem[kAdrNoise * 16], 273); f.close(); } diff --git a/engines/mortevielle/utils.cpp b/engines/mortevielle/utils.cpp index d5b777bab1..1a3b1f1ec1 100644 --- a/engines/mortevielle/utils.cpp +++ b/engines/mortevielle/utils.cpp @@ -2212,11 +2212,11 @@ void MortevielleEngine::music() { if (!fic.open("mort.img")) error("Missing file - mort.img"); - fic.read(&_mem[0x3800 * 16], 500); - fic.read(&_mem[0x47a0 * 16], 123); + fic.read(&_mem[kAdrCompMusicBuf2 * 16], 500); + fic.read(&_mem[kAdrUnknownBuf * 16], 123); fic.close(); - _soundManager.decodeMusic(&_mem[0x3800 * 16], &_mem[kAdrMusic * 16], 623); + _soundManager.decodeMusic(&_mem[kAdrCompMusicBuf2 * 16], &_mem[kAdrMusic * 16], 623); _addFix = (float)((kTempoMusic - 8)) / 256; _speechManager.cctable(_speechManager._tbi); -- cgit v1.2.3