diff options
author | Willem Jan Palenstijn | 2013-09-21 20:05:47 +0200 |
---|---|---|
committer | Willem Jan Palenstijn | 2013-09-21 20:05:47 +0200 |
commit | 4b5ca10f68effb88e297d72f6ea366d760acf9ed (patch) | |
tree | 4a410f6c32f452afaef54c43119730cf6b53c60b /engines/sci/sound | |
parent | a6d902df2827b91dc641b6f51c0a070b70a09179 (diff) | |
parent | 97b255ab33fa5fcd4507573e77cd42a8406e1b55 (diff) | |
download | scummvm-rg350-4b5ca10f68effb88e297d72f6ea366d760acf9ed.tar.gz scummvm-rg350-4b5ca10f68effb88e297d72f6ea366d760acf9ed.tar.bz2 scummvm-rg350-4b5ca10f68effb88e297d72f6ea366d760acf9ed.zip |
Merge branch 'master' into sci_midiparser
Conflicts:
engines/sci/sound/midiparser_sci.cpp
Diffstat (limited to 'engines/sci/sound')
-rw-r--r-- | engines/sci/sound/midiparser_sci.cpp | 1 | ||||
-rw-r--r-- | engines/sci/sound/music.h | 2 | ||||
-rw-r--r-- | engines/sci/sound/soundcmd.cpp | 7 |
3 files changed, 6 insertions, 4 deletions
diff --git a/engines/sci/sound/midiparser_sci.cpp b/engines/sci/sound/midiparser_sci.cpp index 3332edd5a6..d6ff4f6cc8 100644 --- a/engines/sci/sound/midiparser_sci.cpp +++ b/engines/sci/sound/midiparser_sci.cpp @@ -611,7 +611,6 @@ void MidiParser_SCI::processEvent(const EventInfo &info, bool fireEvents) { error("unsupported _soundVersion"); } _pSnd->dataInc += inc; - _pSnd->signal = 0x7f + inc; debugC(4, kDebugLevelSound, "datainc %04x", inc); } diff --git a/engines/sci/sound/music.h b/engines/sci/sound/music.h index 1f798c90d7..40236c8445 100644 --- a/engines/sci/sound/music.h +++ b/engines/sci/sound/music.h @@ -69,7 +69,7 @@ public: uint16 dataInc; uint16 ticker; uint16 signal; - byte priority; + int16 priority; // must be int16, at least in Laura Bow 1, main music (object conMusic) uses priority -1 uint16 loop; int16 volume; int16 hold; diff --git a/engines/sci/sound/soundcmd.cpp b/engines/sci/sound/soundcmd.cpp index b0102a002b..e36c5705ab 100644 --- a/engines/sci/sound/soundcmd.cpp +++ b/engines/sci/sound/soundcmd.cpp @@ -116,7 +116,10 @@ void SoundCommandParser::processInitSound(reg_t obj) { newSound->resourceId = resourceId; newSound->soundObj = obj; newSound->loop = readSelectorValue(_segMan, obj, SELECTOR(loop)); - newSound->priority = readSelectorValue(_segMan, obj, SELECTOR(priority)) & 0xFF; + if (_soundVersion <= SCI_VERSION_0_LATE) + newSound->priority = readSelectorValue(_segMan, obj, SELECTOR(priority)); + else + newSound->priority = readSelectorValue(_segMan, obj, SELECTOR(priority)) & 0xFF; if (_soundVersion >= SCI_VERSION_1_EARLY) newSound->volume = CLIP<int>(readSelectorValue(_segMan, obj, SELECTOR(vol)), 0, MUSIC_VOLUME_MAX); newSound->reverb = -1; // initialize to SCI invalid, it'll be set correctly in soundInitSnd() below @@ -428,7 +431,7 @@ reg_t SoundCommandParser::kDoSoundUpdate(int argc, reg_t *argv, reg_t acc) { int16 objVol = CLIP<int>(readSelectorValue(_segMan, obj, SELECTOR(vol)), 0, 255); if (objVol != musicSlot->volume) _music->soundSetVolume(musicSlot, objVol); - uint32 objPrio = readSelectorValue(_segMan, obj, SELECTOR(priority)); + int16 objPrio = readSelectorValue(_segMan, obj, SELECTOR(priority)); if (objPrio != musicSlot->priority) _music->soundSetPriority(musicSlot, objPrio); return acc; |