diff options
author | Travis Howell | 2009-01-10 10:36:01 +0000 |
---|---|---|
committer | Travis Howell | 2009-01-10 10:36:01 +0000 |
commit | d39c075eafe418a520684f4de327ccb42b486d94 (patch) | |
tree | 8dc6ceb7c9ead01bdf051903cd9150323ee92392 /engines/scumm/he | |
parent | b84c864543a496b828f777c1cf141ccee0a68e8c (diff) | |
download | scummvm-rg350-d39c075eafe418a520684f4de327ccb42b486d94.tar.gz scummvm-rg350-d39c075eafe418a520684f4de327ccb42b486d94.tar.bz2 scummvm-rg350-d39c075eafe418a520684f4de327ccb42b486d94.zip |
Fix warning.
svn-id: r35799
Diffstat (limited to 'engines/scumm/he')
-rw-r--r-- | engines/scumm/he/sound_he.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/engines/scumm/he/sound_he.cpp b/engines/scumm/he/sound_he.cpp index 9198698bc4..3a8c90b713 100644 --- a/engines/scumm/he/sound_he.cpp +++ b/engines/scumm/he/sound_he.cpp @@ -591,6 +591,8 @@ void SoundHE::playHESound(int soundID, int heOffset, int heChannel, int heFlags) char *sound; int codeOffs = -1; + priority = (soundID > _vm->_numSounds) ? 255 : *(ptr + 18); + byte *sbngPtr = findSoundTag(MKID_BE('SBNG'), ptr); if (sbngPtr != NULL) { codeOffs = sbngPtr - ptr + 8; @@ -618,7 +620,7 @@ void SoundHE::playHESound(int soundID, int heOffset, int heChannel, int heFlags) _vm->setHETimer(heChannel + 4); _heChannel[heChannel].sound = soundID; - _heChannel[heChannel].priority = (soundID > _vm->_numSounds) ? 255 : 128; + _heChannel[heChannel].priority = priority; _heChannel[heChannel].sbngBlock = (codeOffs != -1) ? 1 : 0; _heChannel[heChannel].codeOffs = codeOffs; memset(_heChannel[heChannel].soundVars, 0, sizeof(_heChannel[heChannel].soundVars)); |