diff options
author | vanfanel | 2015-11-11 17:56:12 +0100 |
---|---|---|
committer | vanfanel | 2015-11-11 17:56:12 +0100 |
commit | 99739a13fe844c807d3cdd87e67e207e888fd48a (patch) | |
tree | 6afbf4763326277efbf528f0bb9e587bf7a01788 /engines/scumm | |
parent | 37e157a11c3fc731dfdcf6ec6b6a5a448550219b (diff) | |
parent | 7e44493fe8877a3c6a65f83b9ed84a5f59169005 (diff) | |
download | scummvm-rg350-99739a13fe844c807d3cdd87e67e207e888fd48a.tar.gz scummvm-rg350-99739a13fe844c807d3cdd87e67e207e888fd48a.tar.bz2 scummvm-rg350-99739a13fe844c807d3cdd87e67e207e888fd48a.zip |
Merge branch 'master' into dispmanx
Diffstat (limited to 'engines/scumm')
-rw-r--r-- | engines/scumm/POTFILES | 1 | ||||
-rw-r--r-- | engines/scumm/debugger.cpp | 2 | ||||
-rw-r--r-- | engines/scumm/detection_tables.h | 5 | ||||
-rw-r--r-- | engines/scumm/help.cpp | 16 | ||||
-rw-r--r-- | engines/scumm/imuse_digi/dimuse.cpp | 3 | ||||
-rw-r--r-- | engines/scumm/imuse_digi/dimuse_track.cpp | 9 | ||||
-rw-r--r-- | engines/scumm/input.cpp | 9 | ||||
-rw-r--r-- | engines/scumm/players/player_ad.cpp | 48 | ||||
-rw-r--r-- | engines/scumm/players/player_ad.h | 20 | ||||
-rw-r--r-- | engines/scumm/players/player_towns.cpp | 69 | ||||
-rw-r--r-- | engines/scumm/players/player_towns.h | 4 | ||||
-rw-r--r-- | engines/scumm/scumm-md5.h | 25 | ||||
-rw-r--r-- | engines/scumm/scumm.cpp | 5 | ||||
-rw-r--r-- | engines/scumm/scumm.h | 1 | ||||
-rw-r--r-- | engines/scumm/smush/smush_player.cpp | 5 | ||||
-rw-r--r-- | engines/scumm/string.cpp | 7 |
16 files changed, 114 insertions, 115 deletions
diff --git a/engines/scumm/POTFILES b/engines/scumm/POTFILES index 6d10537d3c..246f14d3f0 100644 --- a/engines/scumm/POTFILES +++ b/engines/scumm/POTFILES @@ -1,5 +1,6 @@ engines/scumm/dialogs.cpp engines/scumm/help.cpp +engines/scumm/input.cpp engines/scumm/scumm.cpp engines/scumm/players/player_v3m.cpp engines/scumm/players/player_v5m.cpp diff --git a/engines/scumm/debugger.cpp b/engines/scumm/debugger.cpp index 2b718b2cfe..0ebea94608 100644 --- a/engines/scumm/debugger.cpp +++ b/engines/scumm/debugger.cpp @@ -256,7 +256,7 @@ bool ScummDebugger::Cmd_Hide(int argc, const char **argv) { bool ScummDebugger::Cmd_Script(int argc, const char** argv) { int scriptnum; - if (argc < 2) { + if (argc < 3) { debugPrintf("Syntax: script <scriptnum> <command>\n"); return true; } diff --git a/engines/scumm/detection_tables.h b/engines/scumm/detection_tables.h index 6eab5c752f..5a994cb699 100644 --- a/engines/scumm/detection_tables.h +++ b/engines/scumm/detection_tables.h @@ -306,9 +306,9 @@ static const GameSettings gameVariantsTable[] = { // Humongous Entertainment Scumm Version 7.2 {"airport", "", 0, GID_HEGAME, 6, 72, MDT_NONE, GF_USE_KEY, UNK, GUIO3(GUIO_NOLAUNCHLOAD, GUIO_NOMIDI, GUIO_NOASPECT)}, + {"farm", "", 0, GID_HEGAME, 6, 72, MDT_NONE, GF_USE_KEY, UNK, GUIO3(GUIO_NOLAUNCHLOAD, GUIO_NOMIDI, GUIO_NOASPECT)}, // Changed o_getResourceSize to cover all resource types - {"farm", "", 0, GID_HEGAME, 6, 73, MDT_NONE, GF_USE_KEY, UNK, GUIO3(GUIO_NOLAUNCHLOAD, GUIO_NOMIDI, GUIO_NOASPECT)}, {"puttzoo", "", 0, GID_PUTTZOO, 6, 73, MDT_NONE, GF_USE_KEY, UNK, GUIO3(GUIO_NOLAUNCHLOAD, GUIO_NOMIDI, GUIO_NOASPECT)}, {"puttzoo", "HE 72", 0, GID_PUTTZOO, 6, 72, MDT_NONE, GF_USE_KEY, UNK, GUIO3(GUIO_NOLAUNCHLOAD, GUIO_NOMIDI, GUIO_NOASPECT)}, {"puttzoo", "HE 98.5", 0, GID_PUTTZOO, 6, 98, MDT_NONE, GF_USE_KEY | GF_HE_985, UNK, GUIO3(GUIO_NOLAUNCHLOAD, GUIO_NOMIDI, GUIO_NOASPECT)}, @@ -812,6 +812,7 @@ static const GameFilenamePattern gameFilenamesTable[] = { { "pajama3", "PyjamaHG", kGenHEPC, Common::FR_FRA, UNK, 0 }, { "pajama3", "PyjamaSKS", kGenHEPC, Common::DE_DEU, UNK, 0 }, { "pajama3", "PyjamaSKS", kGenHEMac, Common::DE_DEU, Common::kPlatformMacintosh, 0 }, + { "pajama3", "SamLDM", kGenHEPC, Common::IT_ITA, Common::kPlatformWindows, 0 }, { "pajama3", "UKPajamaEAT", kGenHEPC, Common::RU_RUS, UNK, 0 }, { "puttcircus", "puttcircus", kGenHEPC, UNK_LANG, UNK, 0 }, @@ -830,6 +831,7 @@ static const GameFilenamePattern gameFilenamesTable[] = { { "puttrace", "500demo", kGenHEPC, Common::NL_NLD, Common::kPlatformWindows, 0 }, { "puttrace", "course", kGenHEPC, Common::FR_FRA, UNK, 0 }, { "puttrace", "CourseDemo", kGenHEPC, Common::FR_FRA, UNK, 0 }, + { "puttrace", "GasGasEG", kGenHEPC, Common::IT_ITA, Common::kPlatformWindows, 0 }, { "puttrace", "racedemo", kGenHEPC, UNK_LANG, Common::kPlatformWindows, 0 }, { "puttrace", "RaceDemo", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, { "puttrace", "Rennen", kGenHEPC, Common::DE_DEU, UNK, 0 }, @@ -926,6 +928,7 @@ static const GameFilenamePattern gameFilenamesTable[] = { { "spyfox2", "Sf2demo", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, { "spyfox2", "Spy Fox 2", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, { "spyfox2", "Spy Fox 2 - Demo", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, + { "spyfox2", "SPyFoxMCR", kGenHEPC, Common::IT_ITA, Common::kPlatformWindows, 0 }, { "spyfox2", "SpyFoxOR", kGenHEPC, Common::DE_DEU, UNK, 0 }, { "spyfox2", "SpyFoxOR", kGenHEMac, Common::DE_DEU, Common::kPlatformMacintosh, 0 }, { "spyfox2", "SPYFoxORE", kGenHEPC, Common::FR_FRA, UNK, 0 }, diff --git a/engines/scumm/help.cpp b/engines/scumm/help.cpp index cfb23a392a..2281e954ef 100644 --- a/engines/scumm/help.cpp +++ b/engines/scumm/help.cpp @@ -36,6 +36,8 @@ int ScummHelp::numPages(byte gameId) { case GID_MANIAC: case GID_ZAK: return 4; + case GID_INDY4: + return 5; case GID_INDY3: return 6; case GID_LOOM: @@ -43,7 +45,6 @@ int ScummHelp::numPages(byte gameId) { case GID_MONKEY_VGA: case GID_MONKEY: case GID_MONKEY2: - case GID_INDY4: case GID_TENTACLE: case GID_SAMNMAX: case GID_DIG: @@ -287,10 +288,19 @@ void ScummHelp::updateStrings(byte gameId, byte version, Common::Platform platfo ADD_BIND("F3", "Melissa"); ADD_BIND("F4", "Leslie"); } + if (gameId == GID_INDY4) { + ADD_BIND("i", _("Toggle Inventory/IQ Points display")); + ADD_BIND("f", _("Toggle Keyboard/Mouse Fighting (*)")); + ADD_LINE; + ADD_TEXT(_("* Keyboard Fighting is always on,")); + ADD_TEXT(_(" so despite the in-game message this")); + ADD_TEXT(_(" actually toggles Mouse Fighting Off/On")); + } break; case 5: switch (gameId) { case GID_INDY3: + case GID_INDY4: title = _("Fighting controls (numpad):"); ADD_BIND("7", _("Step back")); ADD_BIND("4", _("Step back")); @@ -301,7 +311,9 @@ void ScummHelp::updateStrings(byte gameId, byte version, Common::Platform platfo ADD_BIND("9", _("Punch high")); ADD_BIND("6", _("Punch middle")); ADD_BIND("3", _("Punch low")); - ADD_LINE; + if (gameId == GID_INDY4) { + ADD_BIND("0", _("Sucker punch")); + } ADD_LINE; ADD_TEXT(_("These are for Indy on left.")); ADD_TEXT(_("When Indy is on the right,")); diff --git a/engines/scumm/imuse_digi/dimuse.cpp b/engines/scumm/imuse_digi/dimuse.cpp index db260dce42..3f61946bf2 100644 --- a/engines/scumm/imuse_digi/dimuse.cpp +++ b/engines/scumm/imuse_digi/dimuse.cpp @@ -201,8 +201,7 @@ void IMuseDigital::saveOrLoad(Serializer *ser) { track->stream = Audio::makeQueuingAudioStream(freq, (track->mixerFlags & kFlagStereo) != 0); - _mixer->playStream(track->getType(), &track->mixChanHandle, track->stream, -1, track->getVol(), track->getPan(), - DisposeAfterUse::YES, false, (track->mixerFlags & kFlagStereo) != 0); + _mixer->playStream(track->getType(), &track->mixChanHandle, track->stream, -1, track->getVol(), track->getPan()); _mixer->pauseHandle(track->mixChanHandle, true); } } diff --git a/engines/scumm/imuse_digi/dimuse_track.cpp b/engines/scumm/imuse_digi/dimuse_track.cpp index 34926fa34e..b7abdd074e 100644 --- a/engines/scumm/imuse_digi/dimuse_track.cpp +++ b/engines/scumm/imuse_digi/dimuse_track.cpp @@ -110,8 +110,7 @@ void IMuseDigital::startSound(int soundId, const char *soundName, int soundType, track->souStreamUsed = (input != 0); if (track->souStreamUsed) { - _mixer->playStream(track->getType(), &track->mixChanHandle, input, -1, track->getVol(), track->getPan(), - DisposeAfterUse::YES, false, (track->mixerFlags & kFlagStereo) != 0); + _mixer->playStream(track->getType(), &track->mixChanHandle, input, -1, track->getVol(), track->getPan()); } else { strcpy(track->soundName, soundName); track->soundDesc = _sound->openSound(soundId, soundName, soundType, volGroupId, -1); @@ -167,8 +166,7 @@ void IMuseDigital::startSound(int soundId, const char *soundName, int soundType, } track->stream = Audio::makeQueuingAudioStream(freq, track->mixerFlags & kFlagStereo); - _mixer->playStream(track->getType(), &track->mixChanHandle, track->stream, -1, track->getVol(), track->getPan(), - DisposeAfterUse::YES, false, (track->mixerFlags & kFlagStereo) != 0); + _mixer->playStream(track->getType(), &track->mixChanHandle, track->stream, -1, track->getVol(), track->getPan()); } track->used = true; @@ -368,8 +366,7 @@ Track *IMuseDigital::cloneToFadeOutTrack(Track *track, int fadeDelay) { // Create an appendable output buffer fadeTrack->stream = Audio::makeQueuingAudioStream(_sound->getFreq(fadeTrack->soundDesc), track->mixerFlags & kFlagStereo); - _mixer->playStream(track->getType(), &fadeTrack->mixChanHandle, fadeTrack->stream, -1, fadeTrack->getVol(), fadeTrack->getPan(), - DisposeAfterUse::YES, false, (track->mixerFlags & kFlagStereo) != 0); + _mixer->playStream(track->getType(), &fadeTrack->mixChanHandle, fadeTrack->stream, -1, fadeTrack->getVol(), fadeTrack->getPan()); fadeTrack->used = true; debug(5, "cloneToFadeOutTrack() - end of func, soundId %d, fade soundId %d", track->soundId, fadeTrack->soundId); diff --git a/engines/scumm/input.cpp b/engines/scumm/input.cpp index 86048af57c..3ce053f6bc 100644 --- a/engines/scumm/input.cpp +++ b/engines/scumm/input.cpp @@ -23,6 +23,7 @@ #include "common/config-manager.h" #include "common/events.h" #include "common/system.h" +#include "common/translation.h" #include "gui/message.h" #include "gui/gui-manager.h" @@ -568,9 +569,9 @@ void ScummEngine::processKeyboard(Common::KeyState lastKeyHit) { lastKeyHit.hasFlags(Common::KBD_CTRL)) { _snapScroll ^= 1; if (_snapScroll) { - messageDialog("Snap scroll on"); + messageDialog(_("Snap scroll on")); } else { - messageDialog("Snap scroll off"); + messageDialog(_("Snap scroll off")); } if (VAR_CAMERA_FAST_X != 0xFF) @@ -583,7 +584,7 @@ void ScummEngine::processKeyboard(Common::KeyState lastKeyHit) { vol--; // Display the music volume - ValueDisplayDialog dlg("Music volume: ", 0, 16, vol, ']', '['); + ValueDisplayDialog dlg(_("Music volume: "), 0, 16, vol, ']', '['); vol = runDialog(dlg); vol *= 16; @@ -600,7 +601,7 @@ void ScummEngine::processKeyboard(Common::KeyState lastKeyHit) { _defaultTalkDelay++; // Display the talk speed - ValueDisplayDialog dlg("Subtitle speed: ", 0, 9, 9 - _defaultTalkDelay, '+', '-'); + ValueDisplayDialog dlg(_("Subtitle speed: "), 0, 9, 9 - _defaultTalkDelay, '+', '-'); _defaultTalkDelay = 9 - runDialog(dlg); // Save the new talkspeed value to ConfMan diff --git a/engines/scumm/players/player_ad.cpp b/engines/scumm/players/player_ad.cpp index adcda68e10..4d4be2c3c2 100644 --- a/engines/scumm/players/player_ad.cpp +++ b/engines/scumm/players/player_ad.cpp @@ -27,6 +27,7 @@ #include "scumm/saveload.h" #include "audio/fmopl.h" +#include "audio/mixer.h" #include "common/textconsole.h" #include "common/config-manager.h" @@ -35,26 +36,19 @@ namespace Scumm { #define AD_CALLBACK_FREQUENCY 472 -Player_AD::Player_AD(ScummEngine *scumm, Audio::Mixer *mixer) - : _vm(scumm), _mixer(mixer), _rate(mixer->getOutputRate()) { +Player_AD::Player_AD(ScummEngine *scumm) + : _vm(scumm) { _opl2 = OPL::Config::create(); - if (!_opl2->init(_rate)) { + if (!_opl2->init()) { error("Could not initialize OPL2 emulator"); } - _samplesPerCallback = _rate / AD_CALLBACK_FREQUENCY; - _samplesPerCallbackRemainder = _rate % AD_CALLBACK_FREQUENCY; - _samplesTillCallback = 0; - _samplesTillCallbackRemainder = 0; - memset(_registerBackUpTable, 0, sizeof(_registerBackUpTable)); writeReg(0x01, 0x00); writeReg(0xBD, 0x00); writeReg(0x08, 0x00); writeReg(0x01, 0x20); - _mixer->playStream(Audio::Mixer::kPlainSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true); - _engineMusicTimer = 0; _soundPlaying = -1; @@ -78,11 +72,11 @@ Player_AD::Player_AD(ScummEngine *scumm, Audio::Mixer *mixer) _musicVolume = _sfxVolume = 255; _isSeeking = false; + + _opl2->start(new Common::Functor0Mem<void, Player_AD>(this, &Player_AD::onTimer), AD_CALLBACK_FREQUENCY); } Player_AD::~Player_AD() { - _mixer->stopHandle(_soundHandle); - stopAllSounds(); Common::StackLock lock(_mutex); delete _opl2; @@ -244,36 +238,14 @@ void Player_AD::saveLoadWithSerializer(Serializer *ser) { } } -int Player_AD::readBuffer(int16 *buffer, const int numSamples) { +void Player_AD::onTimer() { Common::StackLock lock(_mutex); - int len = numSamples; - - while (len > 0) { - if (!_samplesTillCallback) { - if (_curOffset) { - updateMusic(); - } - - updateSfx(); - - _samplesTillCallback = _samplesPerCallback; - _samplesTillCallbackRemainder += _samplesPerCallbackRemainder; - if (_samplesTillCallbackRemainder >= AD_CALLBACK_FREQUENCY) { - ++_samplesTillCallback; - _samplesTillCallbackRemainder -= AD_CALLBACK_FREQUENCY; - } - } - - const int samplesToRead = MIN(len, _samplesTillCallback); - _opl2->readBuffer(buffer, samplesToRead); - - buffer += samplesToRead; - len -= samplesToRead; - _samplesTillCallback -= samplesToRead; + if (_curOffset) { + updateMusic(); } - return numSamples; + updateSfx(); } void Player_AD::setupVolume() { diff --git a/engines/scumm/players/player_ad.h b/engines/scumm/players/player_ad.h index 63a8503f47..63fda3cc7c 100644 --- a/engines/scumm/players/player_ad.h +++ b/engines/scumm/players/player_ad.h @@ -26,7 +26,6 @@ #include "scumm/music.h" #include "audio/audiostream.h" -#include "audio/mixer.h" #include "common/mutex.h" @@ -41,9 +40,9 @@ class ScummEngine; /** * Sound output for v3/v4 AdLib data. */ -class Player_AD : public MusicEngine, public Audio::AudioStream { +class Player_AD : public MusicEngine { public: - Player_AD(ScummEngine *scumm, Audio::Mixer *mixer); + Player_AD(ScummEngine *scumm); virtual ~Player_AD(); // MusicEngine API @@ -56,18 +55,12 @@ public: virtual void saveLoadWithSerializer(Serializer *ser); - // AudioStream API - virtual int readBuffer(int16 *buffer, const int numSamples); - virtual bool isStereo() const { return false; } - virtual bool endOfData() const { return false; } - virtual int getRate() const { return _rate; } + // Timer callback + void onTimer(); private: ScummEngine *const _vm; Common::Mutex _mutex; - Audio::Mixer *const _mixer; - const int _rate; - Audio::SoundHandle _soundHandle; void setupVolume(); int _musicVolume; @@ -75,11 +68,6 @@ private: OPL::OPL *_opl2; - int _samplesPerCallback; - int _samplesPerCallbackRemainder; - int _samplesTillCallback; - int _samplesTillCallbackRemainder; - int _soundPlaying; int32 _engineMusicTimer; diff --git a/engines/scumm/players/player_towns.cpp b/engines/scumm/players/player_towns.cpp index 5b8ca04021..d540fc4f6b 100644 --- a/engines/scumm/players/player_towns.cpp +++ b/engines/scumm/players/player_towns.cpp @@ -202,23 +202,24 @@ Player_Towns_v1::Player_Towns_v1(ScummEngine *vm, Audio::Mixer *mixer) : Player_ memset(_soundOverride, 0, _numSoundMax * sizeof(SoundOvrParameters)); } - _driver = new TownsEuphonyDriver(mixer); + _player = new EuphonyPlayer(mixer); + _intf = new TownsAudioInterface(mixer, 0); } Player_Towns_v1::~Player_Towns_v1() { - delete _driver; + delete _intf; + delete _player; delete[] _soundOverride; } bool Player_Towns_v1::init() { - if (!_driver) + if (!_player) return false; - if (!_driver->init()) + if (!_player->init()) return false; - _driver->reserveSoundEffectChannels(8); - _intf = _driver->intf(); + _player->driver()->reserveSoundEffectChannels(8); // Treat all 6 fm channels and all 8 pcm channels as sound effect channels // since music seems to exist as CD audio only in the games which use this @@ -231,7 +232,7 @@ bool Player_Towns_v1::init() { } void Player_Towns_v1::setMusicVolume(int vol) { - _driver->setMusicVolume(vol); + _player->driver()->setMusicVolume(vol); } void Player_Towns_v1::startSound(int sound) { @@ -254,7 +255,9 @@ void Player_Towns_v1::startSound(int sound) { uint16 len = READ_LE_UINT16(ptr) + 2; playPcmTrack(sound, ptr + 6, velocity, 64, note ? note : (len > 50 ? ptr[50] : 60), READ_LE_UINT16(ptr + 10)); - } else if (type == 1) { + // WORKAROUND for bug #1873 INDY3 FMTOWNS: Music in Venice is distorted + // The resource for sound 40 accidently sets the sound type to 255 instead of 1. + } else if (type == 1 || (_vm->_game.id == GID_INDY3 && sound == 40)) { playEuphonyTrack(sound, ptr + 6); } else if (type == 2) { @@ -275,7 +278,7 @@ void Player_Towns_v1::stopSound(int sound) { if (sound != 0 && sound == _eupCurrentSound) { _eupCurrentSound = 0; _eupLooping = false; - _driver->stopParser(); + _player->stop(); } stopPcmTrack(sound); @@ -288,7 +291,7 @@ void Player_Towns_v1::stopAllSounds() { _eupCurrentSound = 0; _eupLooping = false; - _driver->stopParser(); + _player->stop(); stopPcmTrack(0); } @@ -297,7 +300,7 @@ int Player_Towns_v1::getSoundStatus(int sound) const { if (sound == _cdaCurrentSound) return _vm->_sound->pollCD(); if (sound == _eupCurrentSound) - return _driver->parserIsPlaying() ? 1 : 0; + return _player->isPlaying() ? 1 : 0; return Player_Towns::getSoundStatus(sound); } @@ -306,7 +309,7 @@ int32 Player_Towns_v1::doCommand(int numargs, int args[]) { switch (args[0]) { case 2: - _driver->intf()->callback(73, 0); + _player->driver()->cdaToggle(0); break; case 3: @@ -344,7 +347,7 @@ int32 Player_Towns_v1::doCommand(int numargs, int args[]) { void Player_Towns_v1::setVolumeCD(int left, int right) { _cdaVolLeft = left & 0xff; _cdaVolRight = right & 0xff; - _driver->setOutputVolume(1, left >> 1, right >> 1); + _player->driver()->setOutputVolume(1, left >> 1, right >> 1); } void Player_Towns_v1::setSoundVolume(int sound, int left, int right) { @@ -373,7 +376,7 @@ void Player_Towns_v1::saveLoadWithSerializer(Serializer *ser) { ser->saveLoadEntries(this, cdEntries); - if (!_eupLooping && !_driver->parserIsPlaying()) + if (!_eupLooping && !_player->isPlaying()) _eupCurrentSound = 0; static const SaveLoadEntry eupEntries[] = { @@ -409,7 +412,9 @@ void Player_Towns_v1::restoreAfterLoad() { if (_vm->_game.version != 3) ptr += 2; - if (ptr[7] == 1) { + // WORKAROUND for bug #1873 INDY3 FMTOWNS: Music in Venice is distorted + // The resource for sound 40 accidently sets the sound type to 255 instead of 1. + if (ptr[7] == 1 || (_vm->_game.id == GID_INDY3 && _eupCurrentSound == 40)) { setSoundVolume(_eupCurrentSound, _eupVolLeft, _eupVolRight); playEuphonyTrack(_eupCurrentSound, ptr); } @@ -439,10 +444,10 @@ void Player_Towns_v1::restartLoopingSounds() { c++; } - _driver->playSoundEffect(i + 0x3f, _pcmCurrentSound[i].note, _pcmCurrentSound[i].velo, ptr); + _player->driver()->playSoundEffect(i + 0x3f, _pcmCurrentSound[i].note, _pcmCurrentSound[i].velo, ptr); } - _driver->intf()->callback(73, 1); + _player->driver()->cdaToggle(1); } void Player_Towns_v1::startSoundEx(int sound, int velo, int pan, int note) { @@ -492,9 +497,9 @@ void Player_Towns_v1::stopSoundSuspendLooping(int sound) { } else { for (int i = 1; i < 9; i++) { if (sound == _pcmCurrentSound[i].index) { - if (!_driver->soundEffectIsPlaying(i + 0x3f)) + if (!_player->driver()->soundEffectIsPlaying(i + 0x3f)) continue; - _driver->stopSoundEffect(i + 0x3f); + _player->driver()->stopSoundEffect(i + 0x3f); if (_pcmCurrentSound[i].looping) _pcmCurrentSound[i].paused = 1; else @@ -510,23 +515,23 @@ void Player_Towns_v1::playEuphonyTrack(int sound, const uint8 *data) { const uint8 *trackData = src + 150; for (int i = 0; i < 32; i++) - _driver->configChan_enable(i, *src++); + _player->configPart_enable(i, *src++); for (int i = 0; i < 32; i++) - _driver->configChan_setMode(i, 0xff); + _player->configPart_setType(i, 0xff); for (int i = 0; i < 32; i++) - _driver->configChan_remap(i, *src++); + _player->configPart_remap(i, *src++); for (int i = 0; i < 32; i++) - _driver->configChan_adjustVolume(i, *src++); + _player->configPart_adjustVolume(i, *src++); for (int i = 0; i < 32; i++) - _driver->configChan_setTranspose(i, *src++); + _player->configPart_setTranspose(i, *src++); src += 8; for (int i = 0; i < 6; i++) - _driver->assignChannel(i, *src++); + _player->driver()->assignPartToChannel(i, *src++); for (int i = 0; i < data[14]; i++) { - _driver->loadInstrument(i, i, pos + i * 48); - _driver->intf()->callback(4, i, i); + _player->driver()->loadInstrument(i, i, pos + i * 48); + _player->driver()->setInstrument(i, i); } _eupVolLeft = _soundOverride[sound].vLeft; @@ -537,18 +542,18 @@ void Player_Towns_v1::playEuphonyTrack(int sound, const uint8 *data) { lvl >>= 2; for (int i = 0; i < 6; i++) - _driver->chanVolume(i, lvl); + _player->driver()->channelVolume(i, lvl); uint32 trackSize = READ_LE_UINT32(src); src += 4; uint8 startTick = *src++; - _driver->setMusicTempo(*src++); - _driver->startMusicTrack(trackData, trackSize, startTick); + _player->setTempo(*src++); + _player->startTrack(trackData, trackSize, startTick); _eupLooping = (*src != 1) ? 1 : 0; - _driver->setMusicLoop(_eupLooping != 0); - _driver->continueParsing(); + _player->setLoopStatus(_eupLooping != 0); + _player->resume(); _eupCurrentSound = sound; } diff --git a/engines/scumm/players/player_towns.h b/engines/scumm/players/player_towns.h index 3736524ee2..576d17e392 100644 --- a/engines/scumm/players/player_towns.h +++ b/engines/scumm/players/player_towns.h @@ -104,8 +104,6 @@ public: void saveLoadWithSerializer(Serializer *ser); void restoreAfterLoad(); - TownsEuphonyDriver *driver() { return _driver; } - private: void restartLoopingSounds(); void startSoundEx(int sound, int velo, int pan, int note); @@ -137,7 +135,7 @@ private: uint8 _cdaCurrentSoundTemp; uint8 _cdaNumLoopsTemp; - TownsEuphonyDriver *_driver; + EuphonyPlayer *_player; }; class Player_Towns_v2 : public Player_Towns { diff --git a/engines/scumm/scumm-md5.h b/engines/scumm/scumm-md5.h index 5be18fb990..c85073b877 100644 --- a/engines/scumm/scumm-md5.h +++ b/engines/scumm/scumm-md5.h @@ -1,5 +1,5 @@ /* - This file was generated by the md5table tool on Sun Dec 7 23:09:10 2014 + This file was generated by the md5table tool on Thu Aug 27 23:44:49 2015 DO NOT EDIT MANUALLY! */ @@ -27,6 +27,7 @@ static const MD5Table md5table[] = { { "0557df19f046a84c2fdc63507c6616cb", "farm", "HE 72", "Demo", -1, Common::NL_NLD, Common::kPlatformWindows }, { "055ffe4f47753e47594ac67823220c54", "puttrace", "HE 99", "", -1, Common::DE_DEU, Common::kPlatformUnknown }, { "057c9b456dedcc4d71b991a3072a20b3", "monkey", "SEGA", "", 9465, Common::JA_JPN, Common::kPlatformSegaCD }, + { "05d3143827ab4f5d2521a1a47dab8ff2", "puttrace", "HE 98", "", -1, Common::IT_ITA, Common::kPlatformUnknown }, { "06b187468113f9ae5a400b148a847fac", "atlantis", "Floppy", "Floppy", 12075, Common::EN_ANY, Common::kPlatformMacintosh }, { "06c3cf4f31daad8b1cd93153491db9e6", "pajama3", "", "", 79382, Common::NL_NLD, Common::kPlatformUnknown }, { "07433205acdca3bc553d0e731588b35f", "airport", "", "", -1, Common::EN_ANY, Common::kPlatformWindows }, @@ -67,6 +68,7 @@ static const MD5Table md5table[] = { { "114acdc2659a273c220f86ee9edb24c1", "maniac", "V2", "V2", -1, Common::FR_FRA, Common::kPlatformDOS }, { "11ddf1fde76e3156eb3a38da213f484e", "monkey2", "", "", -1, Common::IT_ITA, Common::kPlatformAmiga }, { "11e6e244078ff09b0f3832e35420e0a7", "catalog", "", "Demo", -1, Common::EN_ANY, Common::kPlatformWindows }, + { "12cdc256eae5a461bcc9a49975999841", "atlantis", "Floppy", "Demo", -1, Common::EN_ANY, Common::kPlatformDOS }, { "132bff65e6367c09cc69318ce1b59333", "monkey2", "", "", 11155, Common::EN_ANY, Common::kPlatformAmiga }, { "1387d16aa620dc1c2d1fd87f8a9e7a09", "puttcircus", "", "Demo", -1, Common::FR_FRA, Common::kPlatformWindows }, { "13d2a86a7290813a1c386490447d72db", "fbear", "HE 62", "", -1, Common::EN_ANY, Common::kPlatform3DO }, @@ -119,6 +121,7 @@ static const MD5Table md5table[] = { { "22c9eb04455440131ffc157aeb8d40a8", "fbear", "HE 70", "Demo", -1, Common::EN_ANY, Common::kPlatformWindows }, { "22de86b2f7ec6e5db745ed1123310b44", "spyfox2", "", "Demo", 15832, Common::FR_FRA, Common::kPlatformWindows }, { "22f4ea88a09da12df9308ba30bcb7d0f", "loom", "EGA", "EGA", -1, Common::EN_ANY, Common::kPlatformDOS }, + { "2328be0317008ef047eed7912a4b0850", "pajama2", "HE 98.5", "", -1, Common::EN_GRB, Common::kPlatformWindows }, { "23394c8d29cc63c61313959431a12476", "spyfox", "HE 100", "Updated", -1, Common::EN_ANY, Common::kPlatformWindows }, { "24942a4200d99bdb4bdb78f9c7e07027", "pajama3", "", "Mini Game", 13911, Common::NL_NLD, Common::kPlatformWindows }, { "254fede2f15dbb32a23760d601b01816", "zak", "V1", "", -1, Common::EN_ANY, Common::kPlatformC64 }, @@ -164,6 +167,7 @@ static const MD5Table md5table[] = { { "3686cf8f89e102ececf4366e1d2c8126", "monkey2", "", "", 11135, Common::EN_ANY, Common::kPlatformDOS }, { "36a6750e03fb505fc19fc2bf3e4dbe91", "pajama2", "", "Demo", 58749, Common::EN_ANY, Common::kPlatformUnknown }, { "3769b56c9a22f5521d74525ee459f88d", "puttrace", "HE 99", "Demo", 13108, Common::DE_DEU, Common::kPlatformWindows }, + { "3785fd25f7e02b5782bfc5072d8f77c8", "spyfox2", "", "", -1, Common::IT_ITA, Common::kPlatformUnknown }, { "37aed3f91c1ef959e0bd265f9b13781f", "pajama", "HE 100", "Updated", -1, Common::EN_USA, Common::kPlatformUnknown }, { "37f56ceb13e401a7ac7d9e6b37fecaf7", "loom", "EGA", "EGA", 5748, Common::EN_ANY, Common::kPlatformDOS }, { "37ff1b308999c4cca7319edfcc1280a0", "puttputt", "HE 70", "Demo", 8269, Common::EN_ANY, Common::kPlatformWindows }, @@ -176,7 +180,7 @@ static const MD5Table md5table[] = { { "3a03dab514e4038df192d8a8de469788", "atlantis", "Floppy", "Floppy", -1, Common::EN_ANY, Common::kPlatformAmiga }, { "3a0c35f3c147b98a2bdf8d400cfc4ab5", "indy3", "FM-TOWNS", "", -1, Common::JA_JPN, Common::kPlatformFMTowns }, { "3a3e592b074f595489f7f11e150c398d", "puttzoo", "HE 99", "Updated", -1, Common::EN_USA, Common::kPlatformWindows }, - { "3a5d13675e9a23aedac0bac7730f0ac1", "samnmax", "", "CD", -1, Common::FR_FRA, Common::kPlatformMacintosh }, + { "3a5d13675e9a23aedac0bac7730f0ac1", "samnmax", "", "CD", 228446581, Common::FR_FRA, Common::kPlatformMacintosh }, { "3a5ec90d556d4920976c5578bfbfaf79", "maniac", "NES", "", -1, Common::DE_DEU, Common::kPlatformNES }, { "3ae7f002d9256b8bdf76aaf8a3a069f8", "freddi", "HE 100", "", 34837, Common::EN_GRB, Common::kPlatformWii }, { "3af61c5edf8e15b43dbafd285b2e9777", "puttcircus", "", "Demo", -1, Common::HE_ISR, Common::kPlatformWindows }, @@ -189,6 +193,7 @@ static const MD5Table md5table[] = { { "3df6ead57930488bc61e6e41901d0e97", "fbear", "HE 62", "", -1, Common::EN_ANY, Common::kPlatformMacintosh }, { "3e48298920fab9b7aec5a971e1bd1fab", "pajama3", "", "Demo", -1, Common::EN_GRB, Common::kPlatformWindows }, { "3e861421f494711bc6f619d4aba60285", "airport", "", "", 93231, Common::RU_RUS, Common::kPlatformWindows }, + { "403d2ec4d60d3cdae925e6cbf67716d6", "ft", "", "", 489436643, Common::FR_FRA, Common::kPlatformMacintosh }, { "40564ec47da48a67787d1f9bd043902a", "maniac", "V2 Demo", "V2 Demo", 1988, Common::EN_ANY, Common::kPlatformDOS }, { "4167a92a1d46baa4f4127d918d561f88", "tentacle", "", "CD", 7932, Common::EN_ANY, Common::kPlatformUnknown }, { "41958e24d03181ff9a381a66d048a581", "ft", "", "", -1, Common::PT_BRA, Common::kPlatformUnknown }, @@ -250,6 +255,7 @@ static const MD5Table md5table[] = { { "55f4e9402bec2bded383843123f37c5c", "pajama2", "HE 98.5", "", -1, Common::DE_DEU, Common::kPlatformWindows }, { "566165a7338fa11029e7c14d94fa70d0", "freddi", "HE 73", "Demo", 9800, Common::EN_ANY, Common::kPlatformWindows }, { "56b5922751be7ffd771b38dda56b028b", "freddi", "HE 100", "", 34837, Common::NL_NLD, Common::kPlatformWii }, + { "56e8c37a0a08c3a7076f82417461a877", "indy3", "EGA", "EGA", -1, Common::EN_ANY, Common::kPlatformDOS }, { "5719fc8a13b4638b78d9d8d12f091f94", "puttrace", "HE 99", "", -1, Common::FR_FRA, Common::kPlatformWindows }, { "5798972220cd458be2626d54c80f71d7", "atlantis", "Floppy", "Floppy", -1, Common::IT_ITA, Common::kPlatformAmiga }, { "57a17febe2183f521250e55d55b83e60", "PuttTime", "HE 99", "", -1, Common::FR_FRA, Common::kPlatformWindows }, @@ -266,7 +272,7 @@ static const MD5Table md5table[] = { { "5c21fc49aee8f46e58fef21579e614a1", "thinker1", "", "", -1, Common::EN_USA, Common::kPlatformUnknown }, { "5c9cecbd2952ccec14c9ecebf5822a34", "puttzoo", "HE 100", "", -1, Common::EN_ANY, Common::kPlatformIOS }, { "5d88b9d6a88e6f8e90cded9d01b7f082", "loom", "VGA", "VGA", 8307, Common::EN_ANY, Common::kPlatformDOS }, - { "5dda73606533d66a4c3f4f9ea6e842af", "farm", "", "", 87061, Common::RU_RUS, Common::kPlatformWindows }, + { "5dda73606533d66a4c3f4f9ea6e842af", "farm", "HE 73", "", 87061, Common::RU_RUS, Common::kPlatformWindows }, { "5e8fb66971a60e523e5afbc4c129c0e8", "socks", "HE 85", "", -1, Common::EN_USA, Common::kPlatformUnknown }, { "5ebb57234b2fe5c5dff641e00184ad81", "freddi", "HE 73", "", -1, Common::FR_FRA, Common::kPlatformWindows }, { "5fbe557049892eb4b709d90916ec97ca", "indy3", "EGA", "EGA", 5361, Common::EN_ANY, Common::kPlatformDOS }, @@ -282,6 +288,7 @@ static const MD5Table md5table[] = { { "62b8c16b6db226ba95aaa8be73f9885c", "indy3", "EGA", "EGA", -1, Common::ES_ESP, Common::kPlatformAmiga }, { "632d2fddb8ba97723fa15334763ae857", "thinker1", "", "", 33270, Common::EN_ANY, Common::kPlatformWindows }, { "63fdcdc95cdeea00060883aed38e5504", "PuttTime", "HE 85", "", -1, Common::EN_ANY, Common::kPlatformUnknown }, + { "64a22be96d679018696e5c8d3ca8b71d", "freddi", "HE 73", "", 26375, Common::JA_JPN, Common::kPlatformWindows }, { "6508fd55530e6915507e1cc37f7f045d", "indy3", "EGA", "EGA", -1, Common::EN_ANY, Common::kPlatformDOS }, { "65563295c3a06493351870f20a1630cf", "spyozon", "HE CUP", "Preview", 5235008, Common::UNK_LANG, Common::kPlatformUnknown }, { "659942b9a6b519f123a13cca3c333a13", "jungle", "", "", -1, Common::EN_ANY, Common::kPlatformMacintosh }, @@ -376,6 +383,7 @@ static const MD5Table md5table[] = { { "8368f552b1e3eba559f8d559bcc4cadb", "freddi3", "", "", -1, Common::UNK_LANG, Common::kPlatformUnknown }, { "839a658f7d22de00787ebc945348cdb6", "dog", "", "", 19681, Common::DE_DEU, Common::kPlatformWindows }, { "83cedbe26aa8b58988e984e3d34cac8e", "freddi3", "HE 99", "", -1, Common::DE_DEU, Common::kPlatformUnknown }, + { "83e7a9205567dceb456ee35eeaf26ffa", "pajama3", "", "", -1, Common::IT_ITA, Common::kPlatformUnknown }, { "84e3c23a49ded8a6f9197735c8eb3de7", "PuttTime", "HE 85", "", -1, Common::DE_DEU, Common::kPlatformWindows }, { "8539c0ff89868e55a08e652ac44daaae", "water", "HE 98.5", "", -1, Common::NL_NLD, Common::kPlatformUnknown }, { "861e59ed72a1cd0e6d454f7ee7e2bf3d", "comi", "", "", -1, Common::RU_RUS, Common::kPlatformWindows }, @@ -458,7 +466,7 @@ static const MD5Table md5table[] = { { "a194f15f51ee62badab74b9e7da97693", "baseball2001", "", "Demo", 20507, Common::EN_ANY, Common::kPlatformUnknown }, { "a197a87ae77f3b3333f09a7a2c448fe2", "freddi", "HE 99", "Updated", -1, Common::EN_ANY, Common::kPlatformWindows }, { "a22af0ad0e3126d19d22707b0267a37d", "balloon", "HE 80", "", -1, Common::NL_NLD, Common::kPlatformWindows }, - { "a2386da005672cbd5136f4f27a626c5f", "farm", "", "", 87061, Common::NL_NLD, Common::kPlatformWindows }, + { "a2386da005672cbd5136f4f27a626c5f", "farm", "HE 73", "", 87061, Common::NL_NLD, Common::kPlatformWindows }, { "a28135a7ade38cc0208b04507c46efd1", "spyfox", "HE 99", "", -1, Common::DE_DEU, Common::kPlatformUnknown }, { "a2bb6aa0537402c1b3c2ea899ccef64b", "lost", "HE 99", "Demo", 15540, Common::EN_ANY, Common::kPlatformWindows }, { "a3036878840720fbefa41e6965fa4a0a", "samnmax", "Floppy", "Floppy", -1, Common::EN_ANY, Common::kPlatformDOS }, @@ -473,7 +481,7 @@ static const MD5Table md5table[] = { { "a654fb60c3b67d6317a7894ffd9f25c5", "pajama3", "", "Demo", -1, Common::EN_USA, Common::kPlatformUnknown }, { "a71014c53a6d18c66ef2ea0ee42328e9", "PuttTime", "HE 99", "Mini Game", 18458, Common::NL_NLD, Common::kPlatformWindows }, { "a7cacad9c40c4dc9e1812abf6c8af9d5", "puttcircus", "", "Demo", -1, Common::EN_ANY, Common::kPlatformUnknown }, - { "a85856675429fe88051744f755b72f93", "farm", "", "", -1, Common::EN_ANY, Common::kPlatformWindows }, + { "a85856675429fe88051744f755b72f93", "farm", "HE 73", "", -1, Common::EN_ANY, Common::kPlatformWindows }, { "a86f9c49355579c30d4a55b477c0d869", "baseball2001", "", "", -1, Common::EN_ANY, Common::kPlatformUnknown }, { "a8fcc3084ad5e3e569722755f205b1ef", "pajama3", "", "Mini Game", 13911, Common::DE_DEU, Common::kPlatformWindows }, { "a9543ef0d79bcb47cd76ec197ad0a967", "puttmoon", "", "", -1, Common::EN_ANY, Common::kPlatform3DO }, @@ -637,13 +645,13 @@ static const MD5Table md5table[] = { { "ecc4340c2b801f5af8da4e00c0e432d9", "puttcircus", "", "", -1, Common::NL_NLD, Common::kPlatformUnknown }, { "ed2b074bc3166087a747acb2a3c6abb0", "freddi3", "HE 98.5", "Demo", -1, Common::DE_DEU, Common::kPlatformUnknown }, { "ed361270102e355afe5236954216aba2", "lost", "", "", -1, Common::EN_USA, Common::kPlatformUnknown }, - { "ede149fda3edfc1dbd7347e0737cb583", "tentacle", "", "CD", -1, Common::FR_FRA, Common::kPlatformMacintosh }, + { "ede149fda3edfc1dbd7347e0737cb583", "tentacle", "", "CD", 282830409, Common::FR_FRA, Common::kPlatformMacintosh }, { "edfdb24a499d92c59f824c52987c0eec", "atlantis", "Floppy", "Floppy", -1, Common::FR_FRA, Common::kPlatformDOS }, { "ee41f6afbc5b26fa475754b56fe92048", "puttputt", "HE 61", "", 8032, Common::JA_JPN, Common::kPlatform3DO }, { "ee785fe2569bc9965526e774f7ab86f1", "spyfox", "HE 99", "", -1, Common::FR_FRA, Common::kPlatformMacintosh }, { "ee8cfeb76e55d43a01c25e0865a9db76", "puttrace", "HE 98", "Demo", 13135, Common::NL_NLD, Common::kPlatformMacintosh }, { "eea4d9ac2fb6f145945a308e8866915b", "maniac", "C64", "", -1, Common::EN_ANY, Common::kPlatformC64 }, - { "eeb606c2d2ec877a712a9f20c10bcdda", "farm", "", "", 87034, Common::NL_NLD, Common::kPlatformMacintosh }, + { "eeb606c2d2ec877a712a9f20c10bcdda", "farm", "HE 73", "", 87034, Common::NL_NLD, Common::kPlatformMacintosh }, { "ef347474f3c7be3b29584eaa133cca05", "samnmax", "Floppy", "Floppy", -1, Common::FR_FRA, Common::kPlatformDOS }, { "ef71a322b6530ac45b1a070f7c0795f7", "moonbase", "Demo", "Demo", -1, Common::EN_ANY, Common::kPlatformWindows }, { "ef74d9071d4e564b037cb44bd6774de7", "fbear", "HE 62", "", -1, Common::HE_ISR, Common::kPlatformDOS }, @@ -651,6 +659,7 @@ static const MD5Table md5table[] = { { "f049e38c1f8302b5db6170f1872af89a", "monkey", "CD", "CD", 8955, Common::ES_ESP, Common::kPlatformDOS }, { "f06e66fd45b2f8b0f4a2833ff4476050", "fbpack", "", "", -1, Common::HE_ISR, Common::kPlatformDOS }, { "f08145577e4f13584cc90b3d6e9caa55", "pajama3", "", "Demo", -1, Common::NL_NLD, Common::kPlatformUnknown }, + { "f0ccc12a8704bf57706b42a37f877128", "tentacle", "Floppy", "Floppy", -1, Common::EN_ANY, Common::kPlatformDOS }, { "f1b0e0d587b85052de5534a3847e68fe", "water", "HE 99", "Updated", -1, Common::EN_ANY, Common::kPlatformUnknown }, { "f237bf8a5ef9af78b2a6a4f3901da341", "pajama", "", "Demo", 18354, Common::EN_ANY, Common::kPlatformUnknown }, { "f27b1ba0eadaf2a6617b2b58192d1dbf", "samnmax", "Floppy", "Floppy", -1, Common::DE_DEU, Common::kPlatformDOS }, @@ -671,7 +680,7 @@ static const MD5Table md5table[] = { { "faa89ab5e67ba4eebb4399f584f7490c", "pajama3", "", "Mini Game", 13911, Common::FR_FRA, Common::kPlatformWindows }, { "fb66aa42de21675116346213f176a366", "monkey", "VGA", "VGA", -1, Common::IT_ITA, Common::kPlatformAmiga }, { "fbb697d89d2beca87360a145f467bdae", "PuttTime", "HE 90", "Demo", -1, Common::DE_DEU, Common::kPlatformUnknown }, - { "fbbbb38a81fc9d6a61d509278390a290", "farm", "", "", -1, Common::EN_ANY, Common::kPlatformMacintosh }, + { "fbbbb38a81fc9d6a61d509278390a290", "farm", "HE 73", "", -1, Common::EN_ANY, Common::kPlatformMacintosh }, { "fbdd947d21e8f5bac6d6f7a316af1c5a", "spyfox", "", "Demo", 15693, Common::EN_ANY, Common::kPlatformUnknown }, { "fc53ce0e5f6562b1c1e1b4b8203acafb", "samnmax", "Floppy", "Floppy", -1, Common::ES_ESP, Common::kPlatformDOS }, { "fc6b6148e80d67939d9a18697c0f626a", "monkey", "EGA", "EGA", 8367, Common::DE_DEU, Common::kPlatformDOS }, diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index 7d927b0cda..24d676a1ff 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -316,6 +316,7 @@ ScummEngine::ScummEngine(OSystem *syst, const DetectorResult &dr) _NES_lastTalkingActor = 0; _NES_talkColor = 0; _keepText = false; + _msgCount = 0; _costumeLoader = NULL; _costumeRenderer = NULL; _2byteFontPtr = 0; @@ -1904,7 +1905,7 @@ void ScummEngine::setupMusic(int midi) { // EGA/VGA. However, we support multi MIDI for that game and we cannot // support this with the Player_AD code at the moment. The reason here // is that multi MIDI is supported internally by our iMuse output. - _musicEngine = new Player_AD(this, _mixer); + _musicEngine = new Player_AD(this); } else if (_game.version >= 3 && _game.heversion <= 62) { MidiDriver *nativeMidiDriver = 0; MidiDriver *adlibMidiDriver = 0; @@ -2612,7 +2613,7 @@ bool ScummEngine::startManiac() { if (path.hasPrefix(currentPath)) { path.erase(0, currentPath.size() + 1); if (path.equalsIgnoreCase("maniac")) { - maniacTarget = dom.getVal("gameid"); + maniacTarget = iter->_key; break; } } diff --git a/engines/scumm/scumm.h b/engines/scumm/scumm.h index 30b4d61880..6e0adc3ff3 100644 --- a/engines/scumm/scumm.h +++ b/engines/scumm/scumm.h @@ -1182,6 +1182,7 @@ protected: byte _charsetBuffer[512]; bool _keepText; + byte _msgCount; int _nextLeft, _nextTop; diff --git a/engines/scumm/smush/smush_player.cpp b/engines/scumm/smush/smush_player.cpp index 7617fc541f..05c7ff2d9a 100644 --- a/engines/scumm/smush/smush_player.cpp +++ b/engines/scumm/smush/smush_player.cpp @@ -115,6 +115,11 @@ public: if (data_end[-2] == '\r' && data_end[-1] == '\n' && data_end[0] == '\r' && data_end[1] == '\n') { break; } + // In the Steam Mac version of The Dig, LF-LF is used + // instead of CR-LF + if (data_end[-2] == '\n' && data_end[-1] == '\n') { + break; + } // In Russian Full Throttle strings are finished with // just one pair of CR-LF if (data_end[-2] == '\r' && data_end[-1] == '\n' && data_end[0] == '#') { diff --git a/engines/scumm/string.cpp b/engines/scumm/string.cpp index d60c4c6a50..3049fbcf62 100644 --- a/engines/scumm/string.cpp +++ b/engines/scumm/string.cpp @@ -283,6 +283,7 @@ bool ScummEngine::handleNextCharsetCode(Actor *a, int *code) { switch (c) { case 1: c = 13; // new line + _msgCount = _screenWidth; endLoop = true; break; case 2: @@ -293,6 +294,7 @@ bool ScummEngine::handleNextCharsetCode(Actor *a, int *code) { case 3: _haveMsg = (_game.version >= 7) ? 1 : 0xFF; _keepText = false; + _msgCount = 0; endLoop = true; break; case 8: @@ -573,6 +575,9 @@ void ScummEngine::CHARSET_1() { #endif restoreCharsetBg(); } + _msgCount = 0; + } else if (_game.version <= 2) { + _talkDelay += _msgCount * _defaultTalkDelay; } if (_game.version > 3) { @@ -600,6 +605,7 @@ void ScummEngine::CHARSET_1() { // End of text reached, set _haveMsg accordingly _haveMsg = (_game.version >= 7) ? 2 : 1; _keepText = false; + _msgCount = 0; break; } @@ -648,6 +654,7 @@ void ScummEngine::CHARSET_1() { } if (_game.version <= 3) { _charset->printChar(c, false); + _msgCount += 1; } else { if (_game.features & GF_16BIT_COLOR) { // HE games which use sprites for subtitles |