diff options
author | Filippos Karapetis | 2010-01-22 12:26:12 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-01-22 12:26:12 +0000 |
commit | 47c97f4a60c54952956e2eea58ae31939afe7fae (patch) | |
tree | a3e8e0e714f68c0caf579387f183b577e7334338 /engines/sci | |
parent | 57a4c0b910b1548c21b3de53c68f620002b6d448 (diff) | |
download | scummvm-rg350-47c97f4a60c54952956e2eea58ae31939afe7fae.tar.gz scummvm-rg350-47c97f4a60c54952956e2eea58ae31939afe7fae.tar.bz2 scummvm-rg350-47c97f4a60c54952956e2eea58ae31939afe7fae.zip |
- The reverb value is now obtained from the music driver
- Implemented kSetReverb (0x50) and kResetOnPause (0x4C)
svn-id: r47433
Diffstat (limited to 'engines/sci')
-rw-r--r-- | engines/sci/engine/savegame.cpp | 11 | ||||
-rw-r--r-- | engines/sci/sound/midiparser_sci.cpp | 9 | ||||
-rw-r--r-- | engines/sci/sound/midiparser_sci.h | 3 | ||||
-rw-r--r-- | engines/sci/sound/music.cpp | 2 | ||||
-rw-r--r-- | engines/sci/sound/music.h | 1 |
5 files changed, 16 insertions, 10 deletions
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp index ff80325049..b12ef0a0a4 100644 --- a/engines/sci/engine/savegame.cpp +++ b/engines/sci/engine/savegame.cpp @@ -572,26 +572,27 @@ void SciMusic::saveLoadWithSerializer(Common::Serializer &s) { int songcount = 0; byte masterVolume = soundGetMasterVolume(); + byte reverb = _pMidiDrv->getReverb(); if (s.isSaving()) { s.syncAsByte(_soundOn); s.syncAsByte(masterVolume); - s.syncAsByte(_reverb, VER(17)); + s.syncAsByte(reverb, VER(17)); } else if (s.isLoading()) { if (s.getVersion() >= 15) { s.syncAsByte(_soundOn); s.syncAsByte(masterVolume); - _reverb = 0; - s.syncAsByte(_reverb, VER(17)); + reverb = 0; + s.syncAsByte(reverb, VER(17)); } else { _soundOn = true; masterVolume = 15; - _reverb = 0; + reverb = 0; } soundSetSoundOn(_soundOn); soundSetMasterVolume(masterVolume); - setReverb(_reverb); + setReverb(reverb); } if (s.isSaving()) diff --git a/engines/sci/sound/midiparser_sci.cpp b/engines/sci/sound/midiparser_sci.cpp index 69e9c61a62..e6f5e38741 100644 --- a/engines/sci/sound/midiparser_sci.cpp +++ b/engines/sci/sound/midiparser_sci.cpp @@ -37,7 +37,8 @@ enum SciMidiCommands { kEndOfTrack = 0xFC, kSetReverb = 0x50, kMidiHold = 0x52, - kUpdateCue = 0x60 + kUpdateCue = 0x60, + kResetOnPause = 0x4C }; // MidiParser_SCI @@ -57,6 +58,7 @@ MidiParser_SCI::MidiParser_SCI(SciVersion soundVersion) : _signalToSet = 0; _dataincAdd = false; _dataincToAdd = 0; + _resetOnPause = false; _channelsUsed = 0; } @@ -176,7 +178,7 @@ void MidiParser_SCI::parseNextEvent(EventInfo &info) { // Also, sci/sound/iterator/iterator.cpp, function BaseSongIterator::parseMidiCommand() switch (info.basic.param1) { case kSetReverb: - // TODO: Not implemented yet + ((MidiPlayer *)_driver)->setReverb(info.basic.param2); break; case kMidiHold: // Check if the hold ID marker is the same as the hold ID @@ -200,6 +202,9 @@ void MidiParser_SCI::parseNextEvent(EventInfo &info) { break; } break; + case kResetOnPause: + _resetOnPause = info.basic.param2; + break; // Unhandled SCI commands case 0x46: // LSL3 - binoculars case 0x61: // Iceman (Adlib?) diff --git a/engines/sci/sound/midiparser_sci.h b/engines/sci/sound/midiparser_sci.h index 19d3a3c888..f95c71ce2f 100644 --- a/engines/sci/sound/midiparser_sci.h +++ b/engines/sci/sound/midiparser_sci.h @@ -67,6 +67,8 @@ public: } void pause() { allNotesOff(); + if (_resetOnPause) + jumpToTick(0); } protected: @@ -86,6 +88,7 @@ protected: int16 _signalToSet; bool _dataincAdd; int16 _dataincToAdd; + bool _resetOnPause; // A 16-bit mask, containing the channels used // by the currently parsed song diff --git a/engines/sci/sound/music.cpp b/engines/sci/sound/music.cpp index c3141e67ef..ef75ba96fc 100644 --- a/engines/sci/sound/music.cpp +++ b/engines/sci/sound/music.cpp @@ -142,8 +142,6 @@ MusicEntry *SciMusic::getSlot(reg_t obj) { void SciMusic::setReverb(byte reverb) { Common::StackLock lock(_mutex); - _reverb = reverb; - _pMidiDrv->setReverb(reverb); } diff --git a/engines/sci/sound/music.h b/engines/sci/sound/music.h index 02b79b04b5..660aef9cad 100644 --- a/engines/sci/sound/music.h +++ b/engines/sci/sound/music.h @@ -217,7 +217,6 @@ private: MusicList _playList; bool _soundOn; - byte _reverb; byte _masterVolume; }; |