diff options
author | Robert Göffringmann | 2003-05-03 02:59:45 +0000 |
---|---|---|
committer | Robert Göffringmann | 2003-05-03 02:59:45 +0000 |
commit | 180582765563cd2c2f0dd81a3e189c865ac0741d (patch) | |
tree | 2f0db1b24d5e651344ed36a738e0e368edfd358d /sky/sky.cpp | |
parent | 54a166582f457ff352477637b0b62fe632c301c6 (diff) | |
download | scummvm-rg350-180582765563cd2c2f0dd81a3e189c865ac0741d.tar.gz scummvm-rg350-180582765563cd2c2f0dd81a3e189c865ac0741d.tar.bz2 scummvm-rg350-180582765563cd2c2f0dd81a3e189c865ac0741d.zip |
changed structure of musicdriver, added General Midi music support.
mapping table mt32->gm needs a lot of changes.
svn-id: r7273
Diffstat (limited to 'sky/sky.cpp')
-rw-r--r-- | sky/sky.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/sky/sky.cpp b/sky/sky.cpp index d364351e77..0f311940ff 100644 --- a/sky/sky.cpp +++ b/sky/sky.cpp @@ -66,6 +66,7 @@ SkyState::SkyState(GameDetector *detector, OSystem *syst) _debugMode = detector->_debugMode; _debugLevel = detector->_debugLevel; _language = detector->_language; + _detector = detector; } SkyState::~SkyState() { @@ -107,7 +108,24 @@ void SkyState::initialise(void) { _skySound = new SkySound(_mixer); _skyDisk = new SkyDisk(_gameDataPath); - _skyMusic = new SkyMusic(_mixer, _skyDisk); + + // FIXME: This is *ugly* (and maybe even incorrect?) + // We need to know if we have to use adlib for midi or not. + + if (_detector->_midi_driver == MD_ADLIB) { + _skyMusic = new SkyAdlibMusic(_mixer, _skyDisk); + } else { + if (_detector->_midi_driver == MD_AUTO) { +#if defined (_WIN32_WCE) || defined(UNIX) || defined(X11_BACKEND) + _skyMusic = new SkyAdlibMusic(_mixer, _skyDisk); +#else + _skyMusic = new SkyGmMusic(_detector->createMidi(), _skyDisk); +#endif + } else { + _skyMusic = new SkyGmMusic(_detector->createMidi(), _skyDisk); + } + } + _gameVersion = _skyDisk->determineGameVersion(); _skyText = getSkyText(); |