correction for zak256 SFX
svn-id: r7918
This commit is contained in:
parent
d356ba4452
commit
cb76f85ca6
1 changed files with 7 additions and 14 deletions
|
@ -329,7 +329,7 @@ void Sound::playSound(int soundID) {
|
||||||
|
|
||||||
As you can see, there are quite some patterns, e.g.
|
As you can see, there are quite some patterns, e.g.
|
||||||
the 00 00 00 3c - the sound data seems to start at
|
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
|
Indy 3 seems to use a different format. The very first sound played
|
||||||
in Indy 3 looks as follows:
|
in Indy 3 looks as follows:
|
||||||
|
@ -358,9 +358,8 @@ void Sound::playSound(int soundID) {
|
||||||
#endif
|
#endif
|
||||||
rate = 11000;
|
rate = 11000;
|
||||||
|
|
||||||
ptr += 0x16;
|
|
||||||
if (size == 30) {
|
if (size == 30) {
|
||||||
int track = *ptr;
|
int track = *(ptr + 0x16);
|
||||||
|
|
||||||
if (track == _scumm->current_cd_sound)
|
if (track == _scumm->current_cd_sound)
|
||||||
if (pollCD() == 1)
|
if (pollCD() == 1)
|
||||||
|
@ -371,21 +370,15 @@ void Sound::playSound(int soundID) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ptr += 0x36;
|
||||||
size -= 0x36;
|
size -= 0x36;
|
||||||
sound = (char *)malloc(size);
|
sound = (char *)malloc(size);
|
||||||
for (int x = 0; x < size; x++) {
|
for (int x = 0; x < size; x++) {
|
||||||
int bit = *ptr++;
|
int bit = *ptr++;
|
||||||
if (_scumm->_gameId == GID_INDY3_256) {
|
if (bit < 0x80)
|
||||||
// FIXME - this is an (obviously incorrect, just listen to it)
|
sound[x] = 0x7F - bit;
|
||||||
// test hack for the Indy3 music format.... it doesn't work better
|
else
|
||||||
// but at least the generated data "looks" somewhat OK :-)
|
sound[x] = bit;
|
||||||
sound[x] = bit ^ 0x80;
|
|
||||||
} else {
|
|
||||||
if (bit < 0x80)
|
|
||||||
sound[x] = 0x7F - bit;
|
|
||||||
else
|
|
||||||
sound[x] = bit;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: Maybe something in the header signifies looping? Need to
|
// FIXME: Maybe something in the header signifies looping? Need to
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue