aboutsummaryrefslogtreecommitdiff
path: root/saga/music.cpp
diff options
context:
space:
mode:
authorTorbjörn Andersson2004-11-19 07:41:59 +0000
committerTorbjörn Andersson2004-11-19 07:41:59 +0000
commitd173491acc2133497bc22b9728686b6b997ae505 (patch)
tree2614cd995173fc58d891c9b1f9519c58c496d219 /saga/music.cpp
parentea79c9c5e77c01d0b81174ae8f60029775a3e718 (diff)
downloadscummvm-rg350-d173491acc2133497bc22b9728686b6b997ae505.tar.gz
scummvm-rg350-d173491acc2133497bc22b9728686b6b997ae505.tar.bz2
scummvm-rg350-d173491acc2133497bc22b9728686b6b997ae505.zip
Added music to the partial IHNM intro. I think I picked the correct tune,
but I can't be absolutely sure. I'm also not sure if I'm using the correct music data. I'm fairly sure that the MUSICGM.RES file is the appropriate choice for "General MIDI", but I have no way of verifying that the MUSICFM.RES is really the right choice for MT-32. (Is either of them a good choice for Adlib, or are they both equally bad?) svn-id: r15831
Diffstat (limited to 'saga/music.cpp')
-rw-r--r--saga/music.cpp21
1 files changed, 18 insertions, 3 deletions
diff --git a/saga/music.cpp b/saga/music.cpp
index d8ab563e65..bb44ca9916 100644
--- a/saga/music.cpp
+++ b/saga/music.cpp
@@ -452,9 +452,24 @@ int Music::play(uint32 music_rn, uint16 flags) {
_player->setGM(true);
parser = MidiParser::createParser_SMF();
} else {
- // Load XMI resource data
+ // Load MIDI/XMI resource data
- rsc_ctxt = GAME_GetFileContext(GAME_RESOURCEFILE, 0);
+ bool isGM = false;
+
+ if (GAME_GetGameType() == GID_ITE) {
+ rsc_ctxt = GAME_GetFileContext(GAME_RESOURCEFILE, 0);
+ } else {
+ // TODO: Someone else will have to verify that the "FM"
+ // music is really the appropriate choice for MT-32. Is
+ // either of them the best choice for Adlib, or will
+ // they both sound equally wimpy?
+ if (!hasNativeMT32()) {
+ isGM = true;
+ rsc_ctxt = GAME_GetFileContext(GAME_MUSICFILE_GM, 0);
+ } else {
+ rsc_ctxt = GAME_GetFileContext(GAME_MUSICFILE_FM, 0);
+ }
+ }
if (RSC_LoadResource(rsc_ctxt, music_rn, &resource_data,
&resource_size) != SUCCESS ) {
@@ -462,7 +477,7 @@ int Music::play(uint32 music_rn, uint16 flags) {
return FAILURE;
}
- _player->setGM(false);
+ _player->setGM(isGM);
parser = MidiParser::createParser_XMIDI();
}