diff options
author | Alejandro Marzini | 2010-08-16 00:21:07 +0000 |
---|---|---|
committer | Alejandro Marzini | 2010-08-16 00:21:07 +0000 |
commit | b0409d673921163085d2e2fa440911080a7cf884 (patch) | |
tree | 81b1bb895db6baed7881ca5cbc7ff3a830286189 /engines/scumm/scumm.cpp | |
parent | 503578ac1087b91dcb912fd7918454de73538b34 (diff) | |
parent | b49761b6eae3a0aadefef4c4ffee6a7b583cc3ac (diff) | |
download | scummvm-rg350-b0409d673921163085d2e2fa440911080a7cf884.tar.gz scummvm-rg350-b0409d673921163085d2e2fa440911080a7cf884.tar.bz2 scummvm-rg350-b0409d673921163085d2e2fa440911080a7cf884.zip |
Merge trunk, from r51777 to r52105
svn-id: r52108
Diffstat (limited to 'engines/scumm/scumm.cpp')
-rw-r--r-- | engines/scumm/scumm.cpp | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index ab7be02c48..50901b8f9e 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -214,7 +214,6 @@ ScummEngine::ScummEngine(OSystem *syst, const DetectorResult &dr) _opcode = 0; vm.numNestedScripts = 0; _lastCodePtr = NULL; - _resultVarNumber = 0; _scummStackPos = 0; memset(_vmStack, 0, sizeof(_vmStack)); _fileOffset = 0; @@ -631,6 +630,10 @@ ScummEngine_v5::ScummEngine_v5(OSystem *syst, const DetectorResult &dr) _flashlight.xStrips = 7; _flashlight.yStrips = 7; _flashlight.buffer = NULL; + + memset(_saveLoadVarsFilename, 0, sizeof(_saveLoadVarsFilename)); + + _resultVarNumber = 0; } ScummEngine_v4::ScummEngine_v4(OSystem *syst, const DetectorResult &dr) @@ -1642,9 +1645,11 @@ void ScummEngine::setupMusic(int midi) { _musicType = MDT_NONE; break; case MT_PCSPK: - case MT_PCJR: _musicType = MDT_PCSPK; break; + case MT_PCJR: + _musicType = MDT_PCJR; + break; //case MT_CMS: #if 1 _musicType = MDT_ADLIB; @@ -1658,6 +1663,12 @@ void ScummEngine::setupMusic(int midi) { case MT_ADLIB: _musicType = MDT_ADLIB; break; + case MT_C64: + _musicType = MDT_C64; + break; + case MT_APPLEIIGS: + _musicType = MDT_APPLEIIGS; + break; default: _musicType = MDT_MIDI; break; @@ -1706,7 +1717,7 @@ void ScummEngine::setupMusic(int midi) { * automatically when samples need to be generated */ if (!_mixer->isReady()) { warning("Sound mixer initialization failed"); - if (_musicType == MDT_ADLIB || _musicType == MDT_PCSPK || _musicType == MDT_CMS) { + if (_musicType == MDT_ADLIB || _musicType == MDT_PCSPK || _musicType == MDT_PCJR || _musicType == MDT_CMS) { dev = 0; _musicType = MDT_NONE; warning("MIDI driver depends on sound mixer, switching to null MIDI driver"); @@ -1740,7 +1751,7 @@ void ScummEngine::setupMusic(int midi) { _musicEngine = new Player_V1(this, _mixer, MidiDriver::getMusicType(dev) != MT_PCSPK); } else if (_game.version <= 2) { _musicEngine = new Player_V2(this, _mixer, MidiDriver::getMusicType(dev) != MT_PCSPK); - } else if ((_musicType == MDT_PCSPK) && (_game.version > 2 && _game.version <= 4)) { + } else if ((_musicType == MDT_PCSPK || _musicType == MDT_PCJR) && (_game.version > 2 && _game.version <= 4)) { _musicEngine = new Player_V2(this, _mixer, MidiDriver::getMusicType(dev) != MT_PCSPK); } else if (_musicType == MDT_CMS) { _musicEngine = new Player_V2CMS(this, _mixer); |