From 8bb595453b7bce6e219acc94c105a1f76e5ff734 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Sun, 11 Nov 2012 13:56:06 +0100 Subject: SCUMM: Added support for Macintosh music in Monkey Island 1 This is based on the old Mac0-to-General MIDI conversion that we used to do (and which this patch removes), as well as the code for playing the Monkey Island 2 and Fate of Atlantis Macintosh music. I'm not sure how accurate it is, particularly in tempo and volume, but at this point it seems to work pretty well. Looping music is perhaps a bit off, but it was before as well. There is an annoying drawn out note in the music when you're following the shopkeeper, but that appears to have been there in the original as well. --- engines/scumm/scumm.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'engines/scumm/scumm.cpp') diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index 2c79fb8de0..67ca071a76 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -62,6 +62,7 @@ #include "scumm/player_v2a.h" #include "scumm/player_v3a.h" #include "scumm/player_v4a.h" +#include "scumm/player_v5m.h" #include "scumm/resource.h" #include "scumm/he/resource_he.h" #include "scumm/scumm_v0.h" @@ -1819,6 +1820,8 @@ void ScummEngine::setupMusic(int midi) { #endif } else if (_game.platform == Common::kPlatformAmiga && _game.version <= 4) { _musicEngine = new Player_V4A(this, _mixer); + } else if (_game.platform == Common::kPlatformMacintosh && _game.id == GID_MONKEY) { + _musicEngine = new Player_V5M(this, _mixer); } else if (_game.id == GID_MANIAC && _game.version == 1) { _musicEngine = new Player_V1(this, _mixer, MidiDriver::getMusicType(dev) != MT_PCSPK); } else if (_game.version <= 2) { -- cgit v1.2.3 From b1d10e6a62ef49994e78b3e2c86b27050f2f0938 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Tue, 13 Nov 2012 22:49:12 +0100 Subject: SCUMM: Add support for Mac Loom music and sound It turns out that playing the Mac Loom music isn't particularly different from playing the Monkey Island 1 music, except the data layout is a bit different and there's no per-note volume. --- engines/scumm/scumm.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'engines/scumm/scumm.cpp') diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index 67ca071a76..4ca4df44ab 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -61,6 +61,7 @@ #include "scumm/player_v2cms.h" #include "scumm/player_v2a.h" #include "scumm/player_v3a.h" +#include "scumm/player_v3m.h" #include "scumm/player_v4a.h" #include "scumm/player_v5m.h" #include "scumm/resource.h" @@ -1820,6 +1821,8 @@ void ScummEngine::setupMusic(int midi) { #endif } else if (_game.platform == Common::kPlatformAmiga && _game.version <= 4) { _musicEngine = new Player_V4A(this, _mixer); + } else if (_game.platform == Common::kPlatformMacintosh && _game.id == GID_LOOM) { + _musicEngine = new Player_V3M(this, _mixer); } else if (_game.platform == Common::kPlatformMacintosh && _game.id == GID_MONKEY) { _musicEngine = new Player_V5M(this, _mixer); } else if (_game.id == GID_MANIAC && _game.version == 1) { -- cgit v1.2.3 From 0dcd4ba5a7bf40e03b11a475c1a6082002f486aa Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Wed, 14 Nov 2012 21:20:40 +0100 Subject: SCUMM: Move Mac player initialization to its own function Apparently we cannot (portably) call virtual functions from the constructor, so initialization has been moved to a separate function. --- engines/scumm/scumm.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'engines/scumm/scumm.cpp') diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index 4ca4df44ab..888a7ff2f7 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -1823,8 +1823,10 @@ void ScummEngine::setupMusic(int midi) { _musicEngine = new Player_V4A(this, _mixer); } else if (_game.platform == Common::kPlatformMacintosh && _game.id == GID_LOOM) { _musicEngine = new Player_V3M(this, _mixer); + ((Player_V3M *)_musicEngine)->init(); } else if (_game.platform == Common::kPlatformMacintosh && _game.id == GID_MONKEY) { _musicEngine = new Player_V5M(this, _mixer); + ((Player_V5M *)_musicEngine)->init(); } else if (_game.id == GID_MANIAC && _game.version == 1) { _musicEngine = new Player_V1(this, _mixer, MidiDriver::getMusicType(dev) != MT_PCSPK); } else if (_game.version <= 2) { -- cgit v1.2.3