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
This commit is contained in:
Torbjörn Andersson 2009-09-13 21:38:47 +00:00
parent b21b200a95
commit 9cc0dc3d91
3 changed files with 17 additions and 1 deletions

3
NEWS
View File

@ -19,6 +19,9 @@ For a more comprehensive changelog for the latest experimental SVN code, see:
- Added support for music and sound effects in the the Amiga version of
The Secret of Monkey Island.
Broken Sword 1:
- Fixed missing background sound effects in some rooms.
1.0.0 (2009-10-XX)
New Ports:
- Added MotoEZX and MotoMAGX ports.

View File

@ -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;
}

View File

@ -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) {