diff options
author | Robert Göffringmann | 2003-07-13 06:04:39 +0000 |
---|---|---|
committer | Robert Göffringmann | 2003-07-13 06:04:39 +0000 |
commit | 43ab7128928dfb8c7c029454f6bd702563848b91 (patch) | |
tree | 30de8ed377661e611b4f1276f7c6352892ae0f9d | |
parent | 3b8a1461520b542a726da1894eb6555f58f4a235 (diff) | |
download | scummvm-rg350-43ab7128928dfb8c7c029454f6bd702563848b91.tar.gz scummvm-rg350-43ab7128928dfb8c7c029454f6bd702563848b91.tar.bz2 scummvm-rg350-43ab7128928dfb8c7c029454f6bd702563848b91.zip |
sound support for v.0.0109
svn-id: r8967
-rw-r--r-- | sky/sound.cpp | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/sky/sound.cpp b/sky/sound.cpp index 47958b39ec..bac2449518 100644 --- a/sky/sound.cpp +++ b/sky/sound.cpp @@ -1070,12 +1070,24 @@ void SkySound::loadSection(uint8 pSection) { if (_soundData) free(_soundData); _soundData = _skyDisk->loadFile(pSection * 4 + SOUND_FILE_BASE, NULL); - if ((_soundData[0x7E] != 0x3C) || (_soundData[0xA5] != 0x8D) || (_soundData[0xA6] != 0x1E) || - (_soundData[0xAD] != 0x8D) || (_soundData[0xAE] != 0x36)) - error("Unknown sounddriver version!\n"); - _soundsTotal = _soundData[0x7F]; - uint16 sRateTabOfs = (_soundData[0xA8] << 8) | _soundData[0xA7]; - _sfxBaseOfs = (_soundData[0xB0] << 8) | _soundData[0xAF]; + uint16 asmOfs; + if (SkyState::_systemVars.gameVersion == 109) { + if (pSection == 0) + asmOfs = 0x78; + else + asmOfs = 0x7C; + } else + asmOfs = 0x7E; + + if ((_soundData[asmOfs] != 0x3C) || (_soundData[asmOfs + 0x27] != 0x8D) || + (_soundData[asmOfs + 0x28] != 0x1E) || (_soundData[asmOfs + 0x2F] != 0x8D) || + (_soundData[asmOfs + 0x30] != 0x36)) + error("Unknown sounddriver version!\n"); + + _soundsTotal = _soundData[asmOfs + 1]; + uint16 sRateTabOfs = (_soundData[asmOfs + 0x2A] << 8) | _soundData[asmOfs + 0x29]; + _sfxBaseOfs = (_soundData[asmOfs + 0x32] << 8) | _soundData[asmOfs + 0x31]; + _sampleRates = _soundData + sRateTabOfs; _sfxInfo = _soundData + _sfxBaseOfs; for (uint8 cnt = 0; cnt < 4; cnt++) |