aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorMatthew Hoops2009-12-25 21:54:31 +0000
committerMatthew Hoops2009-12-25 21:54:31 +0000
commitff00963a8b4dc6a8db9534d166406f37b12692c0 (patch)
tree49e3615cacfc1c3ad0e40445739d3b25c6284d6f /engines/sci
parent9255d43a16e1c3e65e46d198ec606fcef07ff71a (diff)
downloadscummvm-rg350-ff00963a8b4dc6a8db9534d166406f37b12692c0.tar.gz
scummvm-rg350-ff00963a8b4dc6a8db9534d166406f37b12692c0.tar.bz2
scummvm-rg350-ff00963a8b4dc6a8db9534d166406f37b12692c0.zip
Silence a bunch of gcc warnings (and Merry Christmas, if you celebrate).
svn-id: r46565
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/resource.cpp12
-rw-r--r--engines/sci/sfx/softseq/adlib.cpp5
-rw-r--r--engines/sci/sfx/softseq/amiga.cpp5
-rw-r--r--engines/sci/sfx/softseq/pcjr.cpp10
4 files changed, 15 insertions, 17 deletions
diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp
index 3eb1eb3672..b02c05c2bf 100644
--- a/engines/sci/resource.cpp
+++ b/engines/sci/resource.cpp
@@ -1830,16 +1830,15 @@ SoundResource::SoundResource(uint32 resNumber, ResourceManager *resMan, SciVersi
_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 @@ int SoundResource::getChannelFilterMask(int hardwareMask) {
// Play channel 15 anytime (control channel)
channelMask |= 0x8000;
break;
+ default:
+ break;
}
+
return channelMask;
}
diff --git a/engines/sci/sfx/softseq/adlib.cpp b/engines/sci/sfx/softseq/adlib.cpp
index b14fdfdb1f..7eda6a09a2 100644
--- a/engines/sci/sfx/softseq/adlib.cpp
+++ b/engines/sci/sfx/softseq/adlib.cpp
@@ -812,10 +812,9 @@ int MidiPlayer_Adlib::open(ResourceManager *resMan) {
}
int MidiPlayer_Adlib::getPlayMask(SciVersion soundVersion) {
- switch (soundVersion) {
- case SCI_VERSION_0_EARLY:
+ if (soundVersion == SCI_VERSION_0_EARLY)
return 0x01;
- }
+
return 0x04;
}
diff --git a/engines/sci/sfx/softseq/amiga.cpp b/engines/sci/sfx/softseq/amiga.cpp
index bc401da21e..cab1b26722 100644
--- a/engines/sci/sfx/softseq/amiga.cpp
+++ b/engines/sci/sfx/softseq/amiga.cpp
@@ -664,10 +664,9 @@ MidiPlayer *MidiPlayer_Amiga_create() {
}
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;
}
diff --git a/engines/sci/sfx/softseq/pcjr.cpp b/engines/sci/sfx/softseq/pcjr.cpp
index 3049263594..a80a188751 100644
--- a/engines/sci/sfx/softseq/pcjr.cpp
+++ b/engines/sci/sfx/softseq/pcjr.cpp
@@ -193,18 +193,16 @@ void MidiDriver_PCJr::close() {
}
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;
}