diff options
author | Max Horn | 2003-05-24 23:51:57 +0000 |
---|---|---|
committer | Max Horn | 2003-05-24 23:51:57 +0000 |
commit | cb76f85ca608a6071b13e327ab458d8ef64f7dc9 (patch) | |
tree | 659011c435fb340a6674a3c8260663690e21f839 /scumm/sound.cpp | |
parent | d356ba445271de59d91559e1abebe7a80907db36 (diff) | |
download | scummvm-rg350-cb76f85ca608a6071b13e327ab458d8ef64f7dc9.tar.gz scummvm-rg350-cb76f85ca608a6071b13e327ab458d8ef64f7dc9.tar.bz2 scummvm-rg350-cb76f85ca608a6071b13e327ab458d8ef64f7dc9.zip |
correction for zak256 SFX
svn-id: r7918
Diffstat (limited to 'scumm/sound.cpp')
-rw-r--r-- | scumm/sound.cpp | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/scumm/sound.cpp b/scumm/sound.cpp index bbc8ff11ac..1a860a20b4 100644 --- a/scumm/sound.cpp +++ b/scumm/sound.cpp @@ -329,7 +329,7 @@ void Sound::playSound(int soundID) { As you can see, there are quite some patterns, e.g. the 00 00 00 3c - the sound data seems to start at - offset 54. + offset 54 = 0x36, but it could also be 0x3c... Indy 3 seems to use a different format. The very first sound played in Indy 3 looks as follows: @@ -358,9 +358,8 @@ void Sound::playSound(int soundID) { #endif rate = 11000; - ptr += 0x16; if (size == 30) { - int track = *ptr; + int track = *(ptr + 0x16); if (track == _scumm->current_cd_sound) if (pollCD() == 1) @@ -371,21 +370,15 @@ void Sound::playSound(int soundID) { return; } + ptr += 0x36; size -= 0x36; sound = (char *)malloc(size); for (int x = 0; x < size; x++) { int bit = *ptr++; - if (_scumm->_gameId == GID_INDY3_256) { - // FIXME - this is an (obviously incorrect, just listen to it) - // test hack for the Indy3 music format.... it doesn't work better - // but at least the generated data "looks" somewhat OK :-) - sound[x] = bit ^ 0x80; - } else { - if (bit < 0x80) - sound[x] = 0x7F - bit; - else - sound[x] = bit; - } + if (bit < 0x80) + sound[x] = 0x7F - bit; + else + sound[x] = bit; } // FIXME: Maybe something in the header signifies looping? Need to |