[Scummvm-cvs-logs] scummvm master -> 631be5b6585e28b5e60aa0ff3be9f8e35d4316a2
eriktorbjorn
eriktorbjorn at telia.com
Sun Jun 28 16:42:41 CEST 2015
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
a1929c6887 SAGA: Use the new "Miles" drivers for AdLib and MT-32
7615f926d5 SAGA: Tweak music timing in IHNM intro
631be5b658 NEWS: Add note about SAGA AdLib music.
Commit: a1929c688717beaf3babb73f309b8f32db49f919
https://github.com/scummvm/scummvm/commit/a1929c688717beaf3babb73f309b8f32db49f919
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2015-06-28T16:08:49+02:00
Commit Message:
SAGA: Use the new "Miles" drivers for AdLib and MT-32
Note that this breaks the IHNM demo, as provided on the ScummVM web
page, since it doesn't have the sample.ad and sample.opl files
needed, but I have a feeling that this is a packaging error on
our part.
I don't have the original release of ITE, so I can't test that.
Changed paths:
engines/saga/music.cpp
engines/saga/music.h
diff --git a/engines/saga/music.cpp b/engines/saga/music.cpp
index d20882c..bc583ed 100644
--- a/engines/saga/music.cpp
+++ b/engines/saga/music.cpp
@@ -31,6 +31,7 @@
#include "audio/mididrv.h"
#include "audio/midiparser.h"
#include "audio/midiparser_qt.h"
+#include "audio/miles.h"
#include "audio/decoders/raw.h"
#include "common/config-manager.h"
#include "common/file.h"
@@ -42,24 +43,43 @@ namespace Saga {
#define MUSIC_SUNSPOT 26
MusicDriver::MusicDriver() : _isGM(false) {
-
- MidiPlayer::createDriver();
-
MidiDriver::DeviceHandle dev = MidiDriver::detectDevice(MDT_MIDI | MDT_ADLIB | MDT_PREFER_GM);
_driverType = MidiDriver::getMusicType(dev);
+ switch (_driverType) {
+ case MT_ADLIB:
+ _milesAudioMode = true;
+ _driver = Audio::MidiDriver_Miles_AdLib_create("SAMPLE.AD", "SAMPLE.OPL");
+ break;
+ case MT_MT32:
+ _milesAudioMode = true;
+ _driver = Audio::MidiDriver_Miles_MT32_create("");
+ break;
+ default:
+ _milesAudioMode = false;
+ MidiPlayer::createDriver();
+ break;
+ }
+
int retValue = _driver->open();
if (retValue == 0) {
- if (_nativeMT32)
- _driver->sendMT32Reset();
- else
- _driver->sendGMReset();
+ if (_driverType != MT_ADLIB) {
+ if (_driverType == MT_MT32 || _nativeMT32)
+ _driver->sendMT32Reset();
+ else
+ _driver->sendGMReset();
+ }
_driver->setTimerCallback(this, &timerCallback);
}
}
void MusicDriver::send(uint32 b) {
+ if (_milesAudioMode) {
+ _driver->send(b);
+ return;
+ }
+
if ((b & 0xF0) == 0xC0 && !_isGM && !_nativeMT32) {
// Remap MT32 instruments to General Midi
b = (b & 0xFFFF00FF) | MidiDriver::_mt32ToGm[(b >> 8) & 0xFF] << 8;
diff --git a/engines/saga/music.h b/engines/saga/music.h
index 2106fb6..c6664f7 100644
--- a/engines/saga/music.h
+++ b/engines/saga/music.h
@@ -61,6 +61,7 @@ public:
protected:
MusicType _driverType;
bool _isGM;
+ bool _milesAudioMode;
};
class Music {
Commit: 7615f926d55cb7c9bf08d72be69f66f0d88479b6
https://github.com/scummvm/scummvm/commit/7615f926d55cb7c9bf08d72be69f66f0d88479b6
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2015-06-28T16:38:47+02:00
Commit Message:
SAGA: Tweak music timing in IHNM intro
This wasn't a regression. The music has always been cut off at an
awkward point.
Changed paths:
engines/saga/introproc_ihnm.cpp
engines/saga/music.h
diff --git a/engines/saga/introproc_ihnm.cpp b/engines/saga/introproc_ihnm.cpp
index fc28d23..dc3f55e 100644
--- a/engines/saga/introproc_ihnm.cpp
+++ b/engines/saga/introproc_ihnm.cpp
@@ -68,7 +68,7 @@ int Scene::IHNMStartProc() {
// Play the title music
_vm->_music->play(1, MUSIC_NORMAL);
// Play title screen
- playTitle(2, 17);
+ playTitle(2, _vm->_music->isAdlib() ? 20 : 27);
}
}
} else {
@@ -150,7 +150,7 @@ bool Scene::checkKey() {
break;
case Common::EVENT_KEYDOWN:
// Don't react to modifier keys alone. The original did
- // non, and the user may want to change scaler without
+ // not, and the user may want to change scaler without
// terminating the intro.
if (event.kbd.ascii)
res = true;
diff --git a/engines/saga/music.h b/engines/saga/music.h
index c6664f7..2e7cc4c 100644
--- a/engines/saga/music.h
+++ b/engines/saga/music.h
@@ -80,6 +80,8 @@ public:
void setVolume(int volume, int time = 1);
int getVolume() { return _currentVolume; }
+ bool isAdlib() const { return _player->isAdlib(); }
+
Common::Array<int32> _songTable;
private:
Commit: 631be5b6585e28b5e60aa0ff3be9f8e35d4316a2
https://github.com/scummvm/scummvm/commit/631be5b6585e28b5e60aa0ff3be9f8e35d4316a2
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2015-06-28T16:40:30+02:00
Commit Message:
NEWS: Add note about SAGA AdLib music.
Changed paths:
NEWS
diff --git a/NEWS b/NEWS
index 2c57bff..33d6e07 100644
--- a/NEWS
+++ b/NEWS
@@ -32,6 +32,9 @@ For a more comprehensive changelog of the latest experimental code, see:
head scene (bug #6728). It may have been happening in other scenes as
well.
+ SAGA:
+ - Improved AdLib music support.
+
SCI:
- Handling of music priority has been greatly improved.
- A lot of fixes for original game script bugs that also occurred when
More information about the Scummvm-git-logs
mailing list