diff options
| author | James Brown | 2002-10-18 11:45:57 +0000 |
|---|---|---|
| committer | James Brown | 2002-10-18 11:45:57 +0000 |
| commit | 80ce915f3da1173eb86af153d79a12aac556f564 (patch) | |
| tree | 4b23ee8da447cd1e5ff6a4cc3e82ddc2d0924897 /scumm/sound.cpp | |
| parent | d0565061a08d93b5fe545740bb37dbc83c12ddfe (diff) | |
| download | scummvm-rg350-80ce915f3da1173eb86af153d79a12aac556f564.tar.gz scummvm-rg350-80ce915f3da1173eb86af153d79a12aac556f564.tar.bz2 scummvm-rg350-80ce915f3da1173eb86af153d79a12aac556f564.zip | |
Fix Wait:forActorDraw and the 'infinite mouth movement' problem in The Dig.
Code assumed that the actor always starts talking in the same room it finishes talking in - this doesn't apply for several cutscene
sequences in The Dig. Also added the usual talkChannel fallback code in for The Dig.
svn-id: r5186
Diffstat (limited to 'scumm/sound.cpp')
| -rw-r--r-- | scumm/sound.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/scumm/sound.cpp b/scumm/sound.cpp index 7f4b303833..d5fd792e98 100644 --- a/scumm/sound.cpp +++ b/scumm/sound.cpp @@ -416,9 +416,9 @@ void Sound::processSfxQueues() { act = _scumm->_vars[_scumm->VAR_TALK_ACTOR]; if (_talkChannel < 0) finished = false; - else if (_scumm->_mixer->_channels[_talkChannel] == NULL) + else if (_scumm->_mixer->_channels[_talkChannel] == NULL) { finished = true; - else + } else finished = false; @@ -1044,17 +1044,17 @@ void Sound::bundleMusicHandler(Scumm * scumm) { } } -void Sound::playBundleSound(char *sound) { +int Sound::playBundleSound(char *sound) { byte * ptr; if (_scumm->_bundle->openVoiceFile("digvoice.bun", _scumm->getGameDataPath()) == false) { - return; + return -1; } ptr = (byte *)malloc(1000000); if (_scumm->_bundle->decompressVoiceSampleByName(sound, ptr) == 0) { delete ptr; - return; + return -1; } int rate = 22050; @@ -1064,7 +1064,7 @@ void Sound::playBundleSound(char *sound) { if (tag != MKID_BE('iMUS')) { warning("Decompression of bundle sound failed"); free(ptr); - return; + return -1; } ptr += 12; @@ -1094,12 +1094,12 @@ void Sound::playBundleSound(char *sound) { if (size < 0) { warning("Decompression sound failed (no size field)"); free(ptr); - return; + return -1; } byte * final = (byte *)malloc(size); memcpy(final, ptr, size); - _scumm->_mixer->playRaw(NULL, final, size, rate, SoundMixer::FLAG_UNSIGNED | SoundMixer::FLAG_AUTOFREE); + return _scumm->_mixer->playRaw(NULL, final, size, rate, SoundMixer::FLAG_UNSIGNED | SoundMixer::FLAG_AUTOFREE); } int Sound::playSfxSound(void *sound, uint32 size, uint rate, bool isUnsigned) { |
