aboutsummaryrefslogtreecommitdiff
path: root/engines/toon/toon.cpp
diff options
context:
space:
mode:
authorSylvain Dupont2010-10-29 22:00:31 +0000
committerSylvain Dupont2010-10-29 22:00:31 +0000
commitecd3e29fe0854c632e5a7688b171e24561c70fc2 (patch)
tree6599b8cf395eae74566213c90e658f7f989ed802 /engines/toon/toon.cpp
parentc9442e26ad70fa18dbcee3814ca586e2bc45bdf8 (diff)
downloadscummvm-rg350-ecd3e29fe0854c632e5a7688b171e24561c70fc2.tar.gz
scummvm-rg350-ecd3e29fe0854c632e5a7688b171e24561c70fc2.tar.bz2
scummvm-rg350-ecd3e29fe0854c632e5a7688b171e24561c70fc2.zip
TOON: Stops all Sfx/voice when exiting a room
Caused crashs when exiting when a sfx or voice was still playing Bug found by Thomas svn-id: r53928
Diffstat (limited to 'engines/toon/toon.cpp')
-rw-r--r--engines/toon/toon.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/engines/toon/toon.cpp b/engines/toon/toon.cpp
index c47c2c18df..7a6a2fc87a 100644
--- a/engines/toon/toon.cpp
+++ b/engines/toon/toon.cpp
@@ -1572,11 +1572,17 @@ void ToonEngine::exitScene() {
_gameState->_mouseState = -1;
}
+ _audioManager->killAllAmbientSFX();
+ _audioManager->stopAllSfxs();
+ _audioManager->stopCurrentVoice();
+ _currentTextLine = 0;
+ _currentTextLineId = -1;
+ _currentTextLineCharacterId = 0;
+
char temp[256];
strcpy(temp, createRoomFilename(Common::String::printf("%s.pak", _gameState->_locations[_gameState->_currentScene]._name).c_str()).c_str());
resources()->closePackage(temp);
- _audioManager->killAllAmbientSFX();
_drew->stopWalk();
_flux->stopWalk();