[Scummvm-cvs-logs] CVS: scummvm/scumm imuse.cpp,2.33,2.34

Jamieson Christian jamieson630 at users.sourceforge.net
Fri May 16 12:17:16 CEST 2003


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv19914/scummvm/scumm

Modified Files:
	imuse.cpp 
Log Message:
FINALLY got MI2 Woodtick music working!

Index: imuse.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/imuse.cpp,v
retrieving revision 2.33
retrieving revision 2.34
diff -u -d -r2.33 -r2.34
--- imuse.cpp	16 May 2003 15:48:01 -0000	2.33
+++ imuse.cpp	16 May 2003 19:16:43 -0000	2.34
@@ -2042,6 +2042,8 @@
 			//   BYTE 05: Volume (upper 4 bits) [guessing]
 			//   BYTE 06: Volume (lower 4 bits) [guessing]
 			//   BYTE 09: BIT 04 (0x08): Percussion? (1 = yes)
+			//   BYTE 15: Program (upper 4 bits)
+			//   BYTE 16: Program (lower 4 bits)
 			part = get_part (p[0] & 0x0F);
 			if (part) {
 				part->set_onoff (p[2] & 0x01);
@@ -2053,6 +2055,12 @@
 						_se->reallocateMidiChannels (_midi);
 					}
 				} else {
+					// Even in cases where a program does not seem to be specified,
+					// i.e. bytes 15 and 16 are 0, we send a program change because
+					// 0 is a valid program number. MI2 tests show that in such
+					// cases, a regular program change message always seems to follow
+					// anyway.
+					part->_instrument.program ((p[15] & 0x0F) << 4 | (p[16] & 0x0F), _mt32emulate);
 					part->sendAll();
 				}
 			}





More information about the Scummvm-git-logs mailing list