diff options
author | Torbjörn Andersson | 2009-09-13 21:38:47 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2009-09-13 21:38:47 +0000 |
commit | 9cc0dc3d9126245afda5e3e3605ecdae18c84767 (patch) | |
tree | ba2bb18fa5b3b1ef28351aa46378e0334debd40e /engines | |
parent | b21b200a95cfb20c8af825cc51f1fad4369c48fc (diff) | |
download | scummvm-rg350-9cc0dc3d9126245afda5e3e3605ecdae18c84767.tar.gz scummvm-rg350-9cc0dc3d9126245afda5e3e3605ecdae18c84767.tar.bz2 scummvm-rg350-9cc0dc3d9126245afda5e3e3605ecdae18c84767.zip |
Fixed bug #2847910, "Loss of background audio loop". It would probably be safe
to backport this to the 1.0 branch, but I'm not 100% sure, and it's getting
pretty late here. (On the other hand, the missing sound effects are pretty
faint, at least in the cases I've seen, so we haven't been missing much. That's
probably why it's gone unnoticed until now.)
svn-id: r44073
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sword1/control.cpp | 5 | ||||
-rw-r--r-- | engines/sword1/sound.cpp | 10 |
2 files changed, 14 insertions, 1 deletions
diff --git a/engines/sword1/control.cpp b/engines/sword1/control.cpp index 09d2197f2a..e5f3b9a04c 100644 --- a/engines/sword1/control.cpp +++ b/engines/sword1/control.cpp @@ -416,7 +416,10 @@ uint8 Control::runPanel(void) { _system->copyRectToScreen(_screenBuf, 640, 0, 0, 640, 480); free(_screenBuf); _mouse->controlPanel(false); - _music->startMusic(Logic::_scriptVars[CURRENT_MUSIC], 1); + if (retVal == CONTROL_NOTHING_DONE) { + _music->startMusic(Logic::_scriptVars[CURRENT_MUSIC], 1); + _sound->newScreen(Logic::_scriptVars[SCREEN]); + } _panelShown = false; return retVal; } diff --git a/engines/sword1/sound.cpp b/engines/sword1/sound.cpp index 6ad946b28d..69db0ca40f 100644 --- a/engines/sword1/sound.cpp +++ b/engines/sword1/sound.cpp @@ -226,6 +226,16 @@ void Sound::newScreen(uint32 screen) { closeCowSystem(); initCowSystem(); } + + // Start the room's looping sounds. + for (uint16 cnt = 0; cnt < TOTAL_FX_PER_ROOM; cnt++) { + uint16 fxNo = _roomsFixedFx[screen][cnt]; + if (fxNo) { + if (_fxList[fxNo].type == FX_LOOP) + addToQueue(fxNo); + } else + break; + } } void Sound::quitScreen(void) { |