aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2007-12-26 01:09:46 +0000
committerJohannes Schickel2007-12-26 01:09:46 +0000
commit35e72866ec5472adccdbe16e55fef1fc5d059205 (patch)
tree1e1828ce120e6df5e23d5afb8484827307089471
parenta65b5a6d5c8c5815c8b015bf5550a8166b1aa7cf (diff)
downloadscummvm-rg350-35e72866ec5472adccdbe16e55fef1fc5d059205.tar.gz
scummvm-rg350-35e72866ec5472adccdbe16e55fef1fc5d059205.tar.bz2
scummvm-rg350-35e72866ec5472adccdbe16e55fef1fc5d059205.zip
Simplification of GM vs MT-32 detection.
svn-id: r29997
-rw-r--r--engines/kyra/kyra.cpp3
-rw-r--r--engines/kyra/sound.cpp10
-rw-r--r--engines/kyra/sound.h3
3 files changed, 11 insertions, 5 deletions
diff --git a/engines/kyra/kyra.cpp b/engines/kyra/kyra.cpp
index 61027555a5..e1ead2a873 100644
--- a/engines/kyra/kyra.cpp
+++ b/engines/kyra/kyra.cpp
@@ -116,9 +116,6 @@ int KyraEngine::init() {
assert(_sound);
soundMidiPc->hasNativeMT32(native_mt32);
- // C55 appears to be XMIDI for General MIDI instruments
- soundMidiPc->setUseC55(_flags.gameID == GI_KYRA2 && !native_mt32);
-
// Unlike some SCUMM games, it's not that the MIDI sounds are
// missing. It's just that at least at the time of writing they
// are decidedly inferior to the Adlib ones.
diff --git a/engines/kyra/sound.cpp b/engines/kyra/sound.cpp
index 6812554869..71ae8a446d 100644
--- a/engines/kyra/sound.cpp
+++ b/engines/kyra/sound.cpp
@@ -131,6 +131,16 @@ SoundMidiPC::~SoundMidiPC() {
close();
}
+void SoundMidiPC::hasNativeMT32(bool nativeMT32) {
+ _nativeMT32 = nativeMT32;
+
+ // C55 appears to be XMIDI for General MIDI instruments
+ if (!_nativeMT32 && _vm->game() == GI_KYRA2)
+ _useC55 = true;
+ else
+ _useC55 = false;
+}
+
void SoundMidiPC::setVolume(int volume) {
if (volume < 0)
volume = 0;
diff --git a/engines/kyra/sound.h b/engines/kyra/sound.h
index 126ffca760..d221f37ece 100644
--- a/engines/kyra/sound.h
+++ b/engines/kyra/sound.h
@@ -322,9 +322,8 @@ public:
MidiChannel *getPercussionChannel() { return 0; }
void setPassThrough(bool b) { _passThrough = b; }
- void setUseC55(bool b) { _useC55 = b; }
- void hasNativeMT32(bool nativeMT32) { _nativeMT32 = nativeMT32; }
+ void hasNativeMT32(bool nativeMT32);
bool isMT32() { return _nativeMT32; }
private: