diff options
author | Max Horn | 2006-04-23 21:56:09 +0000 |
---|---|---|
committer | Max Horn | 2006-04-23 21:56:09 +0000 |
commit | e0a5a2b89e3414f944e24d86a9bf2c8b20526a78 (patch) | |
tree | 911927e0bbea537b2ab929e016f5ab5e87b35d03 /engines/scumm/he/sound_he.cpp | |
parent | 1a7b4a7d7c654fca8efad976ffb81bde0d16c15a (diff) | |
download | scummvm-rg350-e0a5a2b89e3414f944e24d86a9bf2c8b20526a78.tar.gz scummvm-rg350-e0a5a2b89e3414f944e24d86a9bf2c8b20526a78.tar.bz2 scummvm-rg350-e0a5a2b89e3414f944e24d86a9bf2c8b20526a78.zip |
Fix access to .he3/.he4 files
svn-id: r22118
Diffstat (limited to 'engines/scumm/he/sound_he.cpp')
-rw-r--r-- | engines/scumm/he/sound_he.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/engines/scumm/he/sound_he.cpp b/engines/scumm/he/sound_he.cpp index 4ad1d4884b..e626d78ef9 100644 --- a/engines/scumm/he/sound_he.cpp +++ b/engines/scumm/he/sound_he.cpp @@ -282,7 +282,7 @@ void SoundHE::setOverrideFreq(int freq) { void SoundHE::setupHEMusicFile() { int i, total_size; Common::File musicFile; - Common::String buf(_vm->generateFilename(4)); + Common::String buf(_vm->generateFilename(-4)); if (musicFile.open(buf) == true) { musicFile.seek(4, SEEK_SET); @@ -475,7 +475,7 @@ void SoundHE::playHESound(int soundID, int heOffset, int heChannel, int heFlags) if (soundID > _vm->_numSounds) { int music_offs; Common::File musicFile; - Common::String buf(_vm->generateFilename(4)); + Common::String buf(_vm->generateFilename(-4)); if (musicFile.open(buf) == false) { warning("playHESound: Can't open music file %s", buf.c_str()); @@ -634,6 +634,7 @@ void SoundHE::startHETalkSound(uint32 offset) { if (ConfMan.getBool("speech_mute")) return; + assert(_sfxFile); if (!_sfxFile->isOpen()) { error("startHETalkSound: Speech file is not open"); return; |