aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2007-10-28 03:34:10 +0000
committerPaul Gilbert2007-10-28 03:34:10 +0000
commit641ff5e9b744922f2631689df19a62d9fad5af08 (patch)
treea932a6e2efdf327af2884aefed7ffe2d2e2f8305
parent5f1ef918209682bb7affb9f0c288b56163d3bc5f (diff)
downloadscummvm-rg350-641ff5e9b744922f2631689df19a62d9fad5af08.tar.gz
scummvm-rg350-641ff5e9b744922f2631689df19a62d9fad5af08.tar.bz2
scummvm-rg350-641ff5e9b744922f2631689df19a62d9fad5af08.zip
Sound is now paused when displaying menu dialogs
svn-id: r29272
-rw-r--r--engines/lure/game.cpp11
-rw-r--r--engines/lure/surface.cpp3
2 files changed, 12 insertions, 2 deletions
diff --git a/engines/lure/game.cpp b/engines/lure/game.cpp
index b4b983bf8f..aaeca3a8bd 100644
--- a/engines/lure/game.cpp
+++ b/engines/lure/game.cpp
@@ -839,6 +839,7 @@ void Game::doShowCredits() {
Mouse &mouse = Mouse::getReference();
Screen &screen = Screen::getReference();
+ Sound.pause();
mouse.cursorOff();
Palette p(CREDITS_RESOURCE_ID - 1);
Surface *s = Surface::getScreen(CREDITS_RESOURCE_ID);
@@ -851,16 +852,21 @@ void Game::doShowCredits() {
screen.resetPalette();
screen.update();
mouse.cursorOn();
+ Sound.resume();
}
void Game::doQuit() {
+ Sound.pause();
if (getYN())
Events::getReference().quitFlag = true;
+ Sound.resume();
}
void Game::doRestart() {
+ Sound.pause();
if (getYN())
setState(GS_RESTART);
+ Sound.resume();
}
void Game::doTextSpeed() {
@@ -878,8 +884,9 @@ void Game::doSound() {
_soundFlag = !_soundFlag;
menu.getMenu(2).entries()[2] = sl.getString(_soundFlag ? S_SOUND_ON : S_SOUND_OFF);
- // Stop all currently playing sounds
- Sound.killSounds();
+ if (!_soundFlag)
+ // Stop all currently playing sounds
+ Sound.killSounds();
}
void Game::handleBootParam(int value) {
diff --git a/engines/lure/surface.cpp b/engines/lure/surface.cpp
index e2a987ab5d..31d1ecf107 100644
--- a/engines/lure/surface.cpp
+++ b/engines/lure/surface.cpp
@@ -719,6 +719,7 @@ bool SaveRestoreDialog::show(bool saveDialog) {
s->copyTo(&screen.screen(), SAVE_DIALOG_X, SAVE_DIALOG_Y);
screen.update();
mouse.pushCursorNum(CURSOR_ARROW);
+ Sound.pause();
bool abortFlag = false;
bool doneFlag = false;
@@ -801,6 +802,8 @@ bool SaveRestoreDialog::show(bool saveDialog) {
doneFlag = true;
}
+ Sound.resume();
+
if (doneFlag) {
// Handle save or restore
if (saveDialog)