[Scummvm-cvs-logs] SF.net SVN: scummvm:[47433] scummvm/trunk/engines/sci

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Fri Jan 22 13:26:17 CET 2010


Revision: 47433
          http://scummvm.svn.sourceforge.net/scummvm/?rev=47433&view=rev
Author:   thebluegr
Date:     2010-01-22 12:26:12 +0000 (Fri, 22 Jan 2010)

Log Message:
-----------
- The reverb value is now obtained from the music driver
- Implemented kSetReverb (0x50) and kResetOnPause (0x4C)

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/savegame.cpp
    scummvm/trunk/engines/sci/sound/midiparser_sci.cpp
    scummvm/trunk/engines/sci/sound/midiparser_sci.h
    scummvm/trunk/engines/sci/sound/music.cpp
    scummvm/trunk/engines/sci/sound/music.h

Modified: scummvm/trunk/engines/sci/engine/savegame.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/savegame.cpp	2010-01-22 08:38:53 UTC (rev 47432)
+++ scummvm/trunk/engines/sci/engine/savegame.cpp	2010-01-22 12:26:12 UTC (rev 47433)
@@ -572,26 +572,27 @@
 
 	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())

Modified: scummvm/trunk/engines/sci/sound/midiparser_sci.cpp
===================================================================
--- scummvm/trunk/engines/sci/sound/midiparser_sci.cpp	2010-01-22 08:38:53 UTC (rev 47432)
+++ scummvm/trunk/engines/sci/sound/midiparser_sci.cpp	2010-01-22 12:26:12 UTC (rev 47433)
@@ -37,7 +37,8 @@
 	kEndOfTrack = 0xFC,
 	kSetReverb = 0x50,
 	kMidiHold = 0x52,
-	kUpdateCue = 0x60
+	kUpdateCue = 0x60,
+	kResetOnPause = 0x4C
 };
 
 //  MidiParser_SCI
@@ -57,6 +58,7 @@
 	_signalToSet = 0;
 	_dataincAdd = false;
 	_dataincToAdd = 0;
+	_resetOnPause = false;
 	_channelsUsed = 0;
 }
 
@@ -176,7 +178,7 @@
 			// 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 @@
 					break;
 				}
 				break;
+			case kResetOnPause:
+				_resetOnPause = info.basic.param2;
+				break;
 			// Unhandled SCI commands
 			case 0x46: // LSL3 - binoculars
 			case 0x61: // Iceman (Adlib?)

Modified: scummvm/trunk/engines/sci/sound/midiparser_sci.h
===================================================================
--- scummvm/trunk/engines/sci/sound/midiparser_sci.h	2010-01-22 08:38:53 UTC (rev 47432)
+++ scummvm/trunk/engines/sci/sound/midiparser_sci.h	2010-01-22 12:26:12 UTC (rev 47433)
@@ -67,6 +67,8 @@
 	}
 	void pause() {
 		allNotesOff();
+		if (_resetOnPause)
+			jumpToTick(0);
 	}
 
 protected:
@@ -86,6 +88,7 @@
 	int16 _signalToSet;
 	bool _dataincAdd;
 	int16 _dataincToAdd;
+	bool _resetOnPause;
 
 	// A 16-bit mask, containing the channels used
 	// by the currently parsed song

Modified: scummvm/trunk/engines/sci/sound/music.cpp
===================================================================
--- scummvm/trunk/engines/sci/sound/music.cpp	2010-01-22 08:38:53 UTC (rev 47432)
+++ scummvm/trunk/engines/sci/sound/music.cpp	2010-01-22 12:26:12 UTC (rev 47433)
@@ -142,8 +142,6 @@
 
 void SciMusic::setReverb(byte reverb) {
 	Common::StackLock lock(_mutex);
-	_reverb = reverb;
-
 	_pMidiDrv->setReverb(reverb);
 }
 

Modified: scummvm/trunk/engines/sci/sound/music.h
===================================================================
--- scummvm/trunk/engines/sci/sound/music.h	2010-01-22 08:38:53 UTC (rev 47432)
+++ scummvm/trunk/engines/sci/sound/music.h	2010-01-22 12:26:12 UTC (rev 47433)
@@ -217,7 +217,6 @@
 
 	MusicList _playList;
 	bool _soundOn;
-	byte _reverb;
 	byte _masterVolume;
 };
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list