[Scummvm-cvs-logs] SF.net SVN: scummvm:[41584] scummvm/trunk/engines/gob/sound/adlib.cpp

strangerke at users.sourceforge.net strangerke at users.sourceforge.net
Tue Jun 16 14:25:54 CEST 2009


Revision: 41584
          http://scummvm.svn.sourceforge.net/scummvm/?rev=41584&view=rev
Author:   strangerke
Date:     2009-06-16 12:25:53 +0000 (Tue, 16 Jun 2009)

Log Message:
-----------
MDY/TBR : fix a thing or two. Still far from being OK, but in-game ambiance "music" is (a little) less buggy

Modified Paths:
--------------
    scummvm/trunk/engines/gob/sound/adlib.cpp

Modified: scummvm/trunk/engines/gob/sound/adlib.cpp
===================================================================
--- scummvm/trunk/engines/gob/sound/adlib.cpp	2009-06-16 11:31:52 UTC (rev 41583)
+++ scummvm/trunk/engines/gob/sound/adlib.cpp	2009-06-16 12:25:53 UTC (rev 41584)
@@ -400,14 +400,15 @@
 		}
 		do {
 			instr = *_playPos;
+//			printf("instr 0x%X\n", instr);
 			switch(instr) {
 			case 0xF8:
-				_wait = 0xF8;
+				_wait = *(_playPos++);
 				break;
 			case 0xFC:
 				_ended = true;
 				_samplesTillPoll = 0;
-				break;
+				return;
 			case 0xF0:
 				_playPos++;
 				ctrlByte1 = *(_playPos++);
@@ -450,11 +451,13 @@
 					setVoiceTbr(channel, timbre, false);
 					break;
 				case 0xE0:
-					printf("Pitch bend not yet implemented\n");
+					warning("Pitch bend not yet implemented\n");
     	
 					note = *(_playPos)++;
 					note += (unsigned)(*(_playPos++)) << 7;
-    	
+
+					setKey(channel, note, _notOn[channel], true);
+
 					break;
 				case 0xB0:
 					_playPos += 2;
@@ -475,12 +478,12 @@
 			} //switch instr
 		} while (_wait == 0);
 
-		if (_wait == 0x78) {
+		if (_wait == 0xF8) {
 			_wait = 0xF0;
 			if (*_playPos != 0xF8)
 				_wait += *(_playPos++);
 		}
-		_playPos++;
+//		_playPos++;
 		_samplesTillPoll = _wait * (_rate / 1000);
 	} else {
 		// First tempo, we'll ignore it...


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