diff options
author | Matthew Hoops | 2012-09-20 11:48:00 -0400 |
---|---|---|
committer | Matthew Hoops | 2012-09-20 11:48:00 -0400 |
commit | fc6ab89b504e15ea14208301acd727893d113381 (patch) | |
tree | 1fbd064e2f69b175d0f25ed31c9a149312d7f4a5 /engines/scumm | |
parent | 4522d182d44134d48ed0de86863f21a128f5f593 (diff) | |
download | scummvm-rg350-fc6ab89b504e15ea14208301acd727893d113381.tar.gz scummvm-rg350-fc6ab89b504e15ea14208301acd727893d113381.tar.bz2 scummvm-rg350-fc6ab89b504e15ea14208301acd727893d113381.zip |
SCUMM: Add support for Indy4 Mac 68k sound
Diffstat (limited to 'engines/scumm')
-rw-r--r-- | engines/scumm/detection.cpp | 9 | ||||
-rw-r--r-- | engines/scumm/imuse/imuse_part.cpp | 2 | ||||
-rw-r--r-- | engines/scumm/scumm.cpp | 2 | ||||
-rw-r--r-- | engines/scumm/scumm.h | 11 | ||||
-rw-r--r-- | engines/scumm/sound.cpp | 2 |
5 files changed, 22 insertions, 4 deletions
diff --git a/engines/scumm/detection.cpp b/engines/scumm/detection.cpp index 5404c7f8b1..156d1fbee4 100644 --- a/engines/scumm/detection.cpp +++ b/engines/scumm/detection.cpp @@ -242,6 +242,10 @@ static Common::String generateFilenameForDetection(const char *pattern, Filename return result; } +bool ScummEngine::isMacM68kV5() const { + return _game.platform == Common::kPlatformMacintosh && _game.version == 5 && !(_game.features & GF_MAC_CONTAINER); +} + struct DetectorDesc { Common::FSNode node; Common::String md5; @@ -473,6 +477,11 @@ static void computeGameSettingsFromMD5(const Common::FSList &fslist, const GameF if (dr.language == UNK_LANG) { dr.language = detectLanguage(fslist, dr.game.id); } + + // HACK: Detect between 68k and PPC versions + if (dr.game.platform == Common::kPlatformMacintosh && dr.game.version >= 5 && dr.game.heversion == 0 && strstr(gfp->pattern, "Data")) + dr.game.features |= GF_MAC_CONTAINER; + break; } } diff --git a/engines/scumm/imuse/imuse_part.cpp b/engines/scumm/imuse/imuse_part.cpp index d4e4740451..bb319df784 100644 --- a/engines/scumm/imuse/imuse_part.cpp +++ b/engines/scumm/imuse/imuse_part.cpp @@ -372,7 +372,7 @@ void Part::set_instrument(uint b) { // We emulate this by introducing a special instrument, which sets // the instrument via sysEx_customInstrument. This seems to be // exclusively used for special sound effects like the "spit" sound. - if (g_scumm->_game.id == GID_MONKEY2 && g_scumm->_game.platform == Common::kPlatformMacintosh) { + if (g_scumm->isMacM68kV5()) { _instrument.macSfx(b); } else { _instrument.program((byte)b, _player->isMT32()); diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index 7b37517ac0..2150bbc4f1 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -1839,7 +1839,7 @@ void ScummEngine::setupMusic(int midi) { bool multi_midi = ConfMan.getBool("multi_midi") && _sound->_musicType != MDT_NONE && _sound->_musicType != MDT_PCSPK && (midi & MDT_ADLIB); bool useOnlyNative = false; - if (_game.platform == Common::kPlatformMacintosh && _game.id == GID_MONKEY2) { + if (isMacM68kV5()) { // We setup this driver as native MIDI driver to avoid playback // of the Mac music via a selected MIDI device. nativeMidiDriver = new MacM68kDriver(_mixer); diff --git a/engines/scumm/scumm.h b/engines/scumm/scumm.h index c8cf096a19..555b7087a1 100644 --- a/engines/scumm/scumm.h +++ b/engines/scumm/scumm.h @@ -150,7 +150,13 @@ enum GameFeatures { GF_HE_985 = 1 << 14, /** HE games with 16 bit color */ - GF_16BIT_COLOR = 1 << 15 + GF_16BIT_COLOR = 1 << 15, + + /** + * SCUMM v5-v7 Mac games stored in a container file + * Used to differentiate between m68k and PPC versions of Indy4 + */ + GF_MAC_CONTAINER = 1 << 16 }; /* SCUMM Debug Channels */ @@ -713,6 +719,9 @@ public: bool openFile(BaseScummFile &file, const Common::String &filename, bool resourceFile = false); + /** Is this game a Mac m68k v5 game? */ + bool isMacM68kV5() const; + protected: int _resourceHeaderSize; byte _resourceMapper[128]; diff --git a/engines/scumm/sound.cpp b/engines/scumm/sound.cpp index 15701f166d..32152420a5 100644 --- a/engines/scumm/sound.cpp +++ b/engines/scumm/sound.cpp @@ -250,7 +250,7 @@ void Sound::playSound(int soundID) { // Support for sampled sound effects in Monkey Island 1 and 2 else if (_vm->_game.platform != Common::kPlatformFMTowns // The Macintosh version of MI2 just ignores SBL effects. - && (_vm->_game.platform != Common::kPlatformMacintosh && _vm->_game.id != GID_MONKEY2) + && !_vm->isMacM68kV5() && READ_BE_UINT32(ptr) == MKTAG('S','B','L',' ')) { debugC(DEBUG_SOUND, "Using SBL sound effect"); |