diff options
author | Travis Howell | 2007-02-17 01:23:52 +0000 |
---|---|---|
committer | Travis Howell | 2007-02-17 01:23:52 +0000 |
commit | dadaf08b29990f833dc99eecd9399d43ed7a6ccc (patch) | |
tree | 8ea1dd8f82ee018ccb5e1a5f52e41a5be3242c52 /engines | |
parent | 7b7c27bc0c586da6ca504e0e039a2a3bd892cc57 (diff) | |
download | scummvm-rg350-dadaf08b29990f833dc99eecd9399d43ed7a6ccc.tar.gz scummvm-rg350-dadaf08b29990f833dc99eecd9399d43ed7a6ccc.tar.bz2 scummvm-rg350-dadaf08b29990f833dc99eecd9399d43ed7a6ccc.zip |
Reduce amount of attempts to open various speech filenames.
svn-id: r25644
Diffstat (limited to 'engines')
-rw-r--r-- | engines/scumm/sound.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/engines/scumm/sound.cpp b/engines/scumm/sound.cpp index 2042933643..ca9736bf57 100644 --- a/engines/scumm/sound.cpp +++ b/engines/scumm/sound.cpp @@ -924,17 +924,7 @@ BaseScummFile *Sound::openSfxFile() { } basename[1] = "monster."; - for (uint j = 0; j < 2 && !file->isOpen(); ++j) { - for (int i = 0; extensions[i].ext; ++i) { - tmp = basename[j] + extensions[i].ext; - if (_vm->openFile(*file, tmp)) { - _soundMode = extensions[i].mode; - break; - } - } - } - - if (!file->isOpen()) { + if (_vm->_game.heversion >= 60) { if ((_vm->_game.heversion <= 61 && _vm->_game.platform == Common::kPlatformMacintosh) || (_vm->_game.heversion >= 70)) { tmp = _vm->generateFilename(-2); } else { @@ -944,6 +934,16 @@ BaseScummFile *Sound::openSfxFile() { if (file->open(tmp) && _vm->_game.heversion <= 73) file->setEnc(0x69); _soundMode = kVOCMode; + } else if (_vm->_game.version >= 5 && _vm->_game.version <= 7) { + for (uint j = 0; j < 2 && !file->isOpen(); ++j) { + for (int i = 0; extensions[i].ext; ++i) { + tmp = basename[j] + extensions[i].ext; + if (_vm->openFile(*file, tmp)) { + _soundMode = extensions[i].mode; + break; + } + } + } } if (_soundMode != kVOCMode) { |