[Scummvm-cvs-logs] SF.net SVN: scummvm: [20985] scummvm/trunk/engines/kyra/sound_adlib.cpp

eriktorbjorn at users.sourceforge.net eriktorbjorn at users.sourceforge.net
Tue Feb 28 23:28:06 CET 2006


Revision: 20985
Author:   eriktorbjorn
Date:     2006-02-28 23:27:35 -0800 (Tue, 28 Feb 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm?rev=20985&view=rev

Log Message:
-----------
Cleaned up updateCallback36() and renamed it setVibratoDepth().

Modified Paths:
--------------
    scummvm/trunk/engines/kyra/sound_adlib.cpp
Modified: scummvm/trunk/engines/kyra/sound_adlib.cpp
===================================================================
--- scummvm/trunk/engines/kyra/sound_adlib.cpp	2006-03-01 07:21:51 UTC (rev 20984)
+++ scummvm/trunk/engines/kyra/sound_adlib.cpp	2006-03-01 07:27:35 UTC (rev 20985)
@@ -220,7 +220,7 @@
 	int updateCallback33(uint8 *&dataptr, OutputState &state, uint8 value);
 	int updateCallback34(uint8 *&dataptr, OutputState &state, uint8 value);
 	int setAMDepth(uint8 *&dataptr, OutputState &state, uint8 value);
-	int updateCallback36(uint8 *&dataptr, OutputState &state, uint8 value);
+	int setVibratoDepth(uint8 *&dataptr, OutputState &state, uint8 value);
 	int updateCallback37(uint8 *&dataptr, OutputState &state, uint8 value);
 	int updateCallback38(uint8 *&dataptr, OutputState &state, uint8 value);
 	int updateCallback39(uint8 *&dataptr, OutputState &state, uint8 value);
@@ -1212,12 +1212,13 @@
 	return 0;
 }
 
-int AdlibDriver::updateCallback36(uint8 *&dataptr, OutputState &state, uint8 value) {
-	value &= 1;
-	value <<= 6;
-	_unkOutputByte2 = (_unkOutputByte2 & 0xBF) | value;
+int AdlibDriver::setVibratoDepth(uint8 *&dataptr, OutputState &state, uint8 value) {
+	if (value & 1)
+		_unkOutputByte2 |= 0x40;
+	else
+		_unkOutputByte2 &= 0xBF;
 
-	// AM depth / Vibrato depth / Rhythm control
+	// The Vibrato Depth bit is set or cleared, the others remain unchanged
 	output0x388(0xBD00 | _unkOutputByte2);
 	return 0;
 }
@@ -1742,7 +1743,7 @@
 	COMMAND(updateCallback33),
 	COMMAND(updateCallback34),
 	COMMAND(setAMDepth),
-	COMMAND(updateCallback36),
+	COMMAND(setVibratoDepth),
 
 	// 48
 	COMMAND(updateCallback37),







More information about the Scummvm-git-logs mailing list