Sound queue order is different in HE72+ games.

Fixes wrong music been played in some locations.

svn-id: r20075
This commit is contained in:
Travis Howell 2006-01-18 06:06:14 +00:00
parent a4151c9982
commit b88a79750b
2 changed files with 29 additions and 13 deletions

View file

@ -142,17 +142,33 @@ void Sound::processSoundQueues() {
int snd, heOffset, heChannel, heFlags;
int data[16];
while (_soundQue2Pos) {
_soundQue2Pos--;
snd = _soundQue2[_soundQue2Pos].sound;
heOffset = _soundQue2[_soundQue2Pos].offset;
heChannel = _soundQue2[_soundQue2Pos].channel;
heFlags = _soundQue2[_soundQue2Pos].flags;
if (snd) {
if (_vm->_heversion>= 60)
playHESound(snd, heOffset, heChannel, heFlags);
else
playSound(snd);
if (_vm->_heversion >= 72) {
for (i = 0; i <_soundQue2Pos; i++) {
snd = _soundQue2[i].sound;
heOffset = _soundQue2[i].offset;
heChannel = _soundQue2[i].channel;
heFlags = _soundQue2[i].flags;
if (snd) {
if (_vm->_heversion>= 60)
playHESound(snd, heOffset, heChannel, heFlags);
else
playSound(snd);
}
}
_soundQue2Pos = 0;
} else {
while (_soundQue2Pos) {
_soundQue2Pos--;
snd = _soundQue2[_soundQue2Pos].sound;
heOffset = _soundQue2[_soundQue2Pos].offset;
heChannel = _soundQue2[_soundQue2Pos].channel;
heFlags = _soundQue2[_soundQue2Pos].flags;
if (snd) {
if (_vm->_heversion>= 60)
playHESound(snd, heOffset, heChannel, heFlags);
else
playSound(snd);
}
}
}