aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic
diff options
context:
space:
mode:
authorPaul Gilbert2017-10-15 21:14:33 -0400
committerPaul Gilbert2017-10-15 21:14:33 -0400
commitff9c0a9a8906e54845d9dd917007a6c29bf1aaf7 (patch)
tree42a15ba2c04fed9e31771117e2a4121bf0b31773 /engines/titanic
parent3e52288a2de05366f25624b5f7f77b13639e4882 (diff)
downloadscummvm-rg350-ff9c0a9a8906e54845d9dd917007a6c29bf1aaf7.tar.gz
scummvm-rg350-ff9c0a9a8906e54845d9dd917007a6c29bf1aaf7.tar.bz2
scummvm-rg350-ff9c0a9a8906e54845d9dd917007a6c29bf1aaf7.zip
TITANIC: Fix crash exiting game when music room music is active
Diffstat (limited to 'engines/titanic')
-rw-r--r--engines/titanic/game_manager.h2
-rw-r--r--engines/titanic/sound/music_room_handler.cpp5
2 files changed, 2 insertions, 5 deletions
diff --git a/engines/titanic/game_manager.h b/engines/titanic/game_manager.h
index 89c40d0356..c319e18e22 100644
--- a/engines/titanic/game_manager.h
+++ b/engines/titanic/game_manager.h
@@ -81,8 +81,8 @@ public:
CInputHandler _inputHandler;
CInputTranslator _inputTranslator;
CTreeItem *_dragItem;
- CMusicRoom _musicRoom;
CSound _sound;
+ CMusicRoom _musicRoom;
public:
CGameManager(CProjectItem *project, CGameView *gameView, Audio::Mixer *mixer);
~CGameManager();
diff --git a/engines/titanic/sound/music_room_handler.cpp b/engines/titanic/sound/music_room_handler.cpp
index 680dfed5ec..2265e46bb2 100644
--- a/engines/titanic/sound/music_room_handler.cpp
+++ b/engines/titanic/sound/music_room_handler.cpp
@@ -239,14 +239,11 @@ void CMusicRoomHandler::updateAudio() {
// Reaching end of music
_audioBuffer->finalize();
}
-bool flag = false;
+
void CMusicRoomHandler::updateInstruments() {
uint currentTicks = g_system->getMillis();
if (_active && _soundStartTicks) {
- if (!flag) {
- flag = true; warning("STARTING TICKS %d", currentTicks);//***DEBUG***/
- }
for (MusicInstrument instrument = BELLS; instrument <= BASS;
instrument = (MusicInstrument)((int)instrument + 1)) {
MusicRoomInstrument &ins1 = _array1[instrument];