[Scummvm-cvs-logs] SF.net SVN: scummvm:[46565] scummvm/trunk/engines/sci

mthreepwood at users.sourceforge.net mthreepwood at users.sourceforge.net
Fri Dec 25 22:54:31 CET 2009


Revision: 46565
          http://scummvm.svn.sourceforge.net/scummvm/?rev=46565&view=rev
Author:   mthreepwood
Date:     2009-12-25 21:54:31 +0000 (Fri, 25 Dec 2009)

Log Message:
-----------
Silence a bunch of gcc warnings (and Merry Christmas, if you celebrate).

Modified Paths:
--------------
    scummvm/trunk/engines/sci/resource.cpp
    scummvm/trunk/engines/sci/sfx/softseq/adlib.cpp
    scummvm/trunk/engines/sci/sfx/softseq/amiga.cpp
    scummvm/trunk/engines/sci/sfx/softseq/pcjr.cpp

Modified: scummvm/trunk/engines/sci/resource.cpp
===================================================================
--- scummvm/trunk/engines/sci/resource.cpp	2009-12-25 21:51:02 UTC (rev 46564)
+++ scummvm/trunk/engines/sci/resource.cpp	2009-12-25 21:54:31 UTC (rev 46565)
@@ -1830,16 +1830,15 @@
 		_tracks->channelCount = 1;
 		_tracks->channels = new Channel[_tracks->channelCount];
 		channel = _tracks->channels;
-		switch (_soundVersion) {
-		case SCI_VERSION_0_EARLY:
+		
+		if (_soundVersion == SCI_VERSION_0_EARLY) {
 			channel->data = resource->data + 0x11;
 			channel->size = resource->size - 0x11;
-			break;
-		case SCI_VERSION_0_LATE:
+		} else {
 			channel->data = resource->data + 0x21;
 			channel->size = resource->size - 0x21;
-			break;
 		}
+
 		channel->number = 0;
 		channel->poly = 0;
 		channel->time = channel->prev = 0;
@@ -1982,7 +1981,10 @@
 		// Play channel 15 anytime (control channel)
 		channelMask |= 0x8000;
 		break;
+	default:
+		break;
 	}
+
 	return channelMask;
 }
 

Modified: scummvm/trunk/engines/sci/sfx/softseq/adlib.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/softseq/adlib.cpp	2009-12-25 21:51:02 UTC (rev 46564)
+++ scummvm/trunk/engines/sci/sfx/softseq/adlib.cpp	2009-12-25 21:54:31 UTC (rev 46565)
@@ -812,10 +812,9 @@
 }
 
 int MidiPlayer_Adlib::getPlayMask(SciVersion soundVersion) {
-	switch (soundVersion) {
-	case SCI_VERSION_0_EARLY:
+	if (soundVersion == SCI_VERSION_0_EARLY)
 		return 0x01;
-	}
+
 	return 0x04;
 }
 

Modified: scummvm/trunk/engines/sci/sfx/softseq/amiga.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/softseq/amiga.cpp	2009-12-25 21:51:02 UTC (rev 46564)
+++ scummvm/trunk/engines/sci/sfx/softseq/amiga.cpp	2009-12-25 21:54:31 UTC (rev 46565)
@@ -664,10 +664,9 @@
 }
 
 int MidiPlayer_Amiga::getPlayMask(SciVersion soundVersion) {
-	switch (soundVersion) {
-	case SCI_VERSION_0_EARLY:
+	if (soundVersion == SCI_VERSION_0_EARLY)
 		error("No amiga support for sci0early");
-	}
+
 	return 0x40;
 }
 

Modified: scummvm/trunk/engines/sci/sfx/softseq/pcjr.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/softseq/pcjr.cpp	2009-12-25 21:51:02 UTC (rev 46564)
+++ scummvm/trunk/engines/sci/sfx/softseq/pcjr.cpp	2009-12-25 21:54:31 UTC (rev 46565)
@@ -193,18 +193,16 @@
 }
 
 int MidiPlayer_PCJr::getPlayMask(SciVersion soundVersion) {
-	switch (soundVersion) {
-	case SCI_VERSION_0_EARLY:
+	if (soundVersion == SCI_VERSION_0_EARLY)
 		return 0x10; // FIXME: Not correct
-	}
+
 	return 0x10;
 }
 
 int MidiPlayer_PCSpeaker::getPlayMask(SciVersion soundVersion) {
-	switch (soundVersion) {
-	case SCI_VERSION_0_EARLY:
+	if (soundVersion == SCI_VERSION_0_EARLY)
 		return 0x02;
-	}
+
 	return 0x20;
 }
 


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