diff options
author | Filippos Karapetis | 2010-10-28 13:00:21 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-10-28 13:00:21 +0000 |
commit | a7b5133903ef4a50a52b5d6ecd5264ec6e69b62c (patch) | |
tree | a2e6cef6408687fe657b1a70a99d813b964082ed /engines/sci/sound | |
parent | 3a4647dc50aebfa89dd495d12573198b46b78893 (diff) | |
download | scummvm-rg350-a7b5133903ef4a50a52b5d6ecd5264ec6e69b62c.tar.gz scummvm-rg350-a7b5133903ef4a50a52b5d6ecd5264ec6e69b62c.tar.bz2 scummvm-rg350-a7b5133903ef4a50a52b5d6ecd5264ec6e69b62c.zip |
SCI: Improved the description of the "map_instrument" console command a bit. Also, the dynamic mappings are now checked before the static ones
svn-id: r53903
Diffstat (limited to 'engines/sci/sound')
-rw-r--r-- | engines/sci/sound/drivers/midi.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/engines/sci/sound/drivers/midi.cpp b/engines/sci/sound/drivers/midi.cpp index d119be32b3..52ddb5ab8a 100644 --- a/engines/sci/sound/drivers/midi.cpp +++ b/engines/sci/sound/drivers/midi.cpp @@ -628,12 +628,6 @@ void MidiPlayer_Midi::readMt32DrvData() { byte MidiPlayer_Midi::lookupGmInstrument(const char *iname) { int i = 0; - while (Mt32MemoryTimbreMaps[i].name) { - if (scumm_strnicmp(iname, Mt32MemoryTimbreMaps[i].name, 10) == 0) - return getGmInstrument(Mt32MemoryTimbreMaps[i]); - i++; - } - if (Mt32dynamicMappings != NULL) { const Mt32ToGmMapList::iterator end = Mt32dynamicMappings->end(); for (Mt32ToGmMapList::iterator it = Mt32dynamicMappings->begin(); it != end; ++it) { @@ -642,18 +636,18 @@ byte MidiPlayer_Midi::lookupGmInstrument(const char *iname) { } } + while (Mt32MemoryTimbreMaps[i].name) { + if (scumm_strnicmp(iname, Mt32MemoryTimbreMaps[i].name, 10) == 0) + return getGmInstrument(Mt32MemoryTimbreMaps[i]); + i++; + } + return MIDI_UNMAPPED; } byte MidiPlayer_Midi::lookupGmRhythmKey(const char *iname) { int i = 0; - while (Mt32MemoryTimbreMaps[i].name) { - if (scumm_strnicmp(iname, Mt32MemoryTimbreMaps[i].name, 10) == 0) - return Mt32MemoryTimbreMaps[i].gmRhythmKey; - i++; - } - if (Mt32dynamicMappings != NULL) { const Mt32ToGmMapList::iterator end = Mt32dynamicMappings->end(); for (Mt32ToGmMapList::iterator it = Mt32dynamicMappings->begin(); it != end; ++it) { @@ -662,6 +656,12 @@ byte MidiPlayer_Midi::lookupGmRhythmKey(const char *iname) { } } + while (Mt32MemoryTimbreMaps[i].name) { + if (scumm_strnicmp(iname, Mt32MemoryTimbreMaps[i].name, 10) == 0) + return Mt32MemoryTimbreMaps[i].gmRhythmKey; + i++; + } + return MIDI_UNMAPPED; } |