diff options
author | Travis Howell | 2004-08-28 09:19:53 +0000 |
---|---|---|
committer | Travis Howell | 2004-08-28 09:19:53 +0000 |
commit | 0f71f50d3743f1a8680a87b6ac88b8a742708885 (patch) | |
tree | aed9b291725e6f009c50e82f99d680eb430053ba /scumm/sound.cpp | |
parent | 51c1ca442eada2281df1c8001848f6fb08066d6f (diff) | |
download | scummvm-rg350-0f71f50d3743f1a8680a87b6ac88b8a742708885.tar.gz scummvm-rg350-0f71f50d3743f1a8680a87b6ac88b8a742708885.tar.bz2 scummvm-rg350-0f71f50d3743f1a8680a87b6ac88b8a742708885.zip |
Sound change for later HE 7.x games
Revert cursor change, later games have no .he3 file.
Add some stubs/opcodes
Later HE games use hard code value for _numRoomVariables
svn-id: r14808
Diffstat (limited to 'scumm/sound.cpp')
-rw-r--r-- | scumm/sound.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/scumm/sound.cpp b/scumm/sound.cpp index fa273ed834..127e5be5d2 100644 --- a/scumm/sound.cpp +++ b/scumm/sound.cpp @@ -180,8 +180,8 @@ void Sound::playSound(int soundID, int offset) { musicFile.seek(+40, SEEK_CUR); if (musicFile.readUint32LE() == MKID('SGEN')) { - // Skip to correct music header - skip = (soundID - 8001) * 21; + // TODO Work out skpi calcution + //skip = (soundID - 8001) * 21; musicFile.seek(+skip, SEEK_CUR); // Skip to offsets @@ -260,12 +260,15 @@ void Sound::playSound(int soundID, int offset) { _vm->_mixer->playRaw(NULL, sound, size, rate, flags, soundID); } // Support for Putt-Putt sounds - very hackish, too 8-) - else if (READ_UINT32(ptr) == MKID('DIGI') || READ_UINT32(ptr) == MKID('TALK')) { + else if (READ_UINT32(ptr) == MKID('DIGI') || READ_UINT32(ptr) == MKID('TALK') || READ_UINT32(ptr) == MKID('HSHD')) { + // Later game start have 8 less + int diff = (READ_UINT32(ptr) == MKID('HSHD')) ? 8 : 0; + // TODO - discover what data the first chunk, HSHD, contains // it might be useful here. - rate = READ_LE_UINT16(ptr + 22); + rate = READ_LE_UINT16(ptr + 22 - diff); - ptr += 8 + READ_BE_UINT32(ptr+12); + ptr += 8 + READ_BE_UINT32(ptr + 12 - diff); if (READ_UINT32(ptr) != MKID('SDAT')) return; // abort |