From 9c7c46bfde46f9b6994822a9ea8db6f5b68dd607 Mon Sep 17 00:00:00 2001 From: Vladimir Menshakov Date: Wed, 15 Jun 2011 00:32:49 +0400 Subject: DREAMWEB: fixed final scene, better sound channel handling --- engines/dreamweb/dreamgen.cpp | 1 + engines/dreamweb/dreamweb.cpp | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index 2591c36564..bcca8ae2aa 100644 --- a/engines/dreamweb/dreamgen.cpp +++ b/engines/dreamweb/dreamgen.cpp @@ -5734,6 +5734,7 @@ loadspeech2: context.al = 50+12; playchannel1(context); notloadspeech2: + vsync(context); context._cmp(context.data.byte(kCh1playing), 255); if (!context.flags.z()) goto notloadspeech2; context.ax = context.pop(); diff --git a/engines/dreamweb/dreamweb.cpp b/engines/dreamweb/dreamweb.cpp index 789db03615..7d035c916d 100644 --- a/engines/dreamweb/dreamweb.cpp +++ b/engines/dreamweb/dreamweb.cpp @@ -516,10 +516,15 @@ void DreamWebEngine::soundHandler() { playSound(1, ch1, 1); } } - if (!_mixer->isSoundHandleActive(_channelHandle[0])) + if (!_mixer->isSoundHandleActive(_channelHandle[0])) { _context.data.byte(dreamgen::kCh0playing) = 255; - if (!_mixer->isSoundHandleActive(_channelHandle[1])) + _channel0 = 0; + } + if (!_mixer->isSoundHandleActive(_channelHandle[1])) { _context.data.byte(dreamgen::kCh1playing) = 255; + _channel1 = 0; + } + } void DreamWebEngine::loadSounds(uint bank, const Common::String &filename) { -- cgit v1.2.3