[Scummvm-cvs-logs] SF.net SVN: scummvm: [32973] scummvm/trunk/sound

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Wed Jul 9 12:42:48 CEST 2008


Revision: 32973
          http://scummvm.svn.sourceforge.net/scummvm/?rev=32973&view=rev
Author:   fingolfin
Date:     2008-07-09 03:42:47 -0700 (Wed, 09 Jul 2008)

Log Message:
-----------
cleanup / code formatting

Modified Paths:
--------------
    scummvm/trunk/sound/midiparser_smf.cpp
    scummvm/trunk/sound/midiparser_xmidi.cpp

Modified: scummvm/trunk/sound/midiparser_smf.cpp
===================================================================
--- scummvm/trunk/sound/midiparser_smf.cpp	2008-07-09 02:49:20 UTC (rev 32972)
+++ scummvm/trunk/sound/midiparser_smf.cpp	2008-07-09 10:42:47 UTC (rev 32973)
@@ -85,16 +85,26 @@
 
 	_position._running_status = info.event;
 	switch (info.command()) {
-	case 0xC: case 0xD:
+	case 0x9: // Note On
 		info.basic.param1 = *(_position._play_pos++);
+		info.basic.param2 = *(_position._play_pos++);
+		if (info.basic.param2 == 0)
+			info.event = info.channel() | 0x80;
+		info.length = 0;
+		break;
+
+	case 0xC:
+	case 0xD:
+		info.basic.param1 = *(_position._play_pos++);
 		info.basic.param2 = 0;
 		break;
 
-	case 0x8: case 0x9: case 0xA: case 0xB: case 0xE:
+	case 0x8:
+	case 0xA:
+	case 0xB:
+	case 0xE:
 		info.basic.param1 = *(_position._play_pos++);
 		info.basic.param2 = *(_position._play_pos++);
-		if (info.command() == 0x9 && info.basic.param2 == 0)
-			info.event = info.channel() | 0x80;
 		info.length = 0;
 		break;
 
@@ -110,7 +120,12 @@
 			info.basic.param2 = 0;
 			break;
 
-		case 0x6: case 0x8: case 0xA: case 0xB: case 0xC: case 0xE:
+		case 0x6:
+		case 0x8:
+		case 0xA:
+		case 0xB:
+		case 0xC:
+		case 0xE:
 			info.basic.param1 = info.basic.param2 = 0;
 			break;
 

Modified: scummvm/trunk/sound/midiparser_xmidi.cpp
===================================================================
--- scummvm/trunk/sound/midiparser_xmidi.cpp	2008-07-09 02:49:20 UTC (rev 32972)
+++ scummvm/trunk/sound/midiparser_xmidi.cpp	2008-07-09 10:42:47 UTC (rev 32973)
@@ -86,11 +86,19 @@
 		}
 		break;
 
-	case 0xC: case 0xD:
+	case 0xC:
+	case 0xD:
 		info.basic.param1 = *(_position._play_pos++);
 		info.basic.param2 = 0;
 		break;
 
+	case 0x8:
+	case 0xA:
+	case 0xE:
+		info.basic.param1 = *(_position._play_pos++);
+		info.basic.param2 = *(_position._play_pos++);
+		break;
+
 	case 0xB:
 		info.basic.param1 = *(_position._play_pos++);
 		info.basic.param2 = *(_position._play_pos++);
@@ -128,11 +136,6 @@
 		}
 		break;
 
-	case 0x8: case 0xA: case 0xE:
-		info.basic.param1 = *(_position._play_pos++);
-		info.basic.param2 = *(_position._play_pos++);
-		break;
-
 	case 0xF: // Meta or SysEx event
 		switch (info.event & 0x0F) {
 		case 0x2: // Song Position Pointer
@@ -145,7 +148,12 @@
 			info.basic.param2 = 0;
 			break;
 
-		case 0x6: case 0x8: case 0xA: case 0xB: case 0xC: case 0xE:
+		case 0x6:
+		case 0x8:
+		case 0xA:
+		case 0xB:
+		case 0xC:
+		case 0xE:
 			info.basic.param1 = info.basic.param2 = 0;
 			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