diff options
-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; }; |