[Scummvm-cvs-logs] SF.net SVN: scummvm: [24408] scummvm/trunk/engines/agos/midiparser_s1d.cpp

kirben at users.sourceforge.net kirben at users.sourceforge.net
Sat Oct 21 14:59:28 CEST 2006


Revision: 24408
          http://svn.sourceforge.net/scummvm/?rev=24408&view=rev
Author:   kirben
Date:     2006-10-21 05:59:23 -0700 (Sat, 21 Oct 2006)

Log Message:
-----------
Add extra events, which are triggered by Elvira 1/2 and WW

Modified Paths:
--------------
    scummvm/trunk/engines/agos/midiparser_s1d.cpp

Modified: scummvm/trunk/engines/agos/midiparser_s1d.cpp
===================================================================
--- scummvm/trunk/engines/agos/midiparser_s1d.cpp	2006-10-21 12:44:10 UTC (rev 24407)
+++ scummvm/trunk/engines/agos/midiparser_s1d.cpp	2006-10-21 12:59:23 UTC (rev 24408)
@@ -121,10 +121,35 @@
 			info.length = 0;
 			break;
 		}
-		// Otherwise fall through to default.
 
+		switch (info.event & 0x0F) {
+		case 0x2: // Song Position Pointer?
+			info.basic.param1 = *(_position._play_pos++);
+			info.basic.param2 = *(_position._play_pos++);
+			break;
+
+		case 0x3: // Song Select?
+			info.basic.param1 = *(_position._play_pos++);
+			info.basic.param2 = 0;
+			break;
+
+		case 0x8:
+			info.basic.param1 = info.basic.param2 = 0;
+			break;
+
+		case 0xF: // META event?
+			info.ext.type = *(_position._play_pos++);
+			info.length = readVLQ(_position._play_pos);
+			info.ext.data = _position._play_pos;
+			_position._play_pos += info.length;
+			break;
+		default:
+			debug(0, "MidiParser_S1D: Unexpected type 0x%02X found", (int) info.event);
+			break;
+		}
+		break;
 	default:
-		debug(6, "MidiParser_S1D: Unexpected byte 0x%02X found", (int) info.command());
+		debug(0, "MidiParser_S1D: Unexpected event 0x%02X found", (int) info.command());
 		break;
 	}
 }


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