diff options
author | Filippos Karapetis | 2010-09-02 21:50:00 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-09-02 21:50:00 +0000 |
commit | d87fa1c8903ba21a2ce5d5946947a50af841700a (patch) | |
tree | 072dac53a41b62c101e687170e25183f3da6d539 /engines/sci/sound | |
parent | 3606e51e76a82d8f73c9ea4f4c6996896b9f5594 (diff) | |
download | scummvm-rg350-d87fa1c8903ba21a2ce5d5946947a50af841700a.tar.gz scummvm-rg350-d87fa1c8903ba21a2ce5d5946947a50af841700a.tar.bz2 scummvm-rg350-d87fa1c8903ba21a2ce5d5946947a50af841700a.zip |
SCI: Show a warning window regarding GM in some games.
Sierra has released a patch adding after market General MIDI support for 8 SCI1
games (LSL1, LSL5, Hoyle 3, SQ1, SQ4, Eco1 floppy, Longbow and Fairy Tales). If
the user has selected the General MIDI music driver in one of these games and
no associated MIDI patch is found, show an informational dialog on game startup
in order to inform the user to download Sierra's MIDI patch, together with some
short instructions.
svn-id: r52500
Diffstat (limited to 'engines/sci/sound')
-rw-r--r-- | engines/sci/sound/music.cpp | 3 | ||||
-rw-r--r-- | engines/sci/sound/music.h | 2 | ||||
-rw-r--r-- | engines/sci/sound/soundcmd.cpp | 5 | ||||
-rw-r--r-- | engines/sci/sound/soundcmd.h | 3 |
4 files changed, 12 insertions, 1 deletions
diff --git a/engines/sci/sound/music.cpp b/engines/sci/sound/music.cpp index 74dca191a8..fe1d4fdbbb 100644 --- a/engines/sci/sound/music.cpp +++ b/engines/sci/sound/music.cpp @@ -67,8 +67,9 @@ void SciMusic::init() { // Default to MIDI in SCI2.1+ games, as many don't have AdLib support. Common::Platform platform = g_sci->getPlatform(); uint32 dev = MidiDriver::detectDevice((getSciVersion() >= SCI_VERSION_2_1) ? (MDT_PCSPK | MDT_PCJR | MDT_ADLIB | MDT_MIDI | MDT_PREFER_GM) : (MDT_PCSPK | MDT_PCJR | MDT_ADLIB | MDT_MIDI)); + _musicType = MidiDriver::getMusicType(dev); - switch (MidiDriver::getMusicType(dev)) { + switch (_musicType) { case MT_ADLIB: // FIXME: There's no Amiga sound option, so we hook it up to AdLib if (g_sci->getPlatform() == Common::kPlatformAmiga || platform == Common::kPlatformMacintosh) diff --git a/engines/sci/sound/music.h b/engines/sci/sound/music.h index dfef49e3bf..b10f64aa18 100644 --- a/engines/sci/sound/music.h +++ b/engines/sci/sound/music.h @@ -155,6 +155,7 @@ public: void soundSetSoundOn(bool soundOnFlag); uint16 soundGetVoices(); uint32 soundGetTempo() const { return _dwTempo; } + MusicType soundGetMusicType() const { return _musicType; } bool soundIsActive(MusicEntry *pSnd) { assert(pSnd->pStreamAud != 0); @@ -218,6 +219,7 @@ private: MusicEntry *_usedChannel[16]; MidiCommandQueue _queuedCommands; + MusicType _musicType; int _driverFirstChannel; }; diff --git a/engines/sci/sound/soundcmd.cpp b/engines/sci/sound/soundcmd.cpp index c85d4c90a6..84aedc8515 100644 --- a/engines/sci/sound/soundcmd.cpp +++ b/engines/sci/sound/soundcmd.cpp @@ -696,4 +696,9 @@ void SoundCommandParser::pauseAll(bool pause) { _music->pauseAll(pause); } +MusicType SoundCommandParser::getMusicType() const { + assert(_music); + return _music->soundGetMusicType(); +} + } // End of namespace Sci diff --git a/engines/sci/sound/soundcmd.h b/engines/sci/sound/soundcmd.h index 4f006c20d8..61371d903f 100644 --- a/engines/sci/sound/soundcmd.h +++ b/engines/sci/sound/soundcmd.h @@ -27,6 +27,7 @@ #define SCI_SOUNDCMD_H #include "common/list.h" +#include "sound/mididrv.h" // for MusicType #include "sci/engine/state.h" namespace Sci { @@ -67,6 +68,8 @@ public: void processPlaySound(reg_t obj); void processStopSound(reg_t obj, bool sampleFinishedPlaying); + MusicType getMusicType() const; + /** * Synchronizes the current state of the music list to the rest of the engine, so that * the changes that the sound thread makes to the music are registered with the engine |