diff options
author | Paul Gilbert | 2016-10-29 21:48:10 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-10-29 21:48:10 -0400 |
commit | 64e4aac26a7a3863708b1d01ce2bb7394861d538 (patch) | |
tree | e4fd8f6519f5529ceab69c55eb66f5ce4eb3c5b5 /engines | |
parent | 2e2e0df346eb668aba5f7a3376a20c4619984fed (diff) | |
download | scummvm-rg350-64e4aac26a7a3863708b1d01ce2bb7394861d538.tar.gz scummvm-rg350-64e4aac26a7a3863708b1d01ce2bb7394861d538.tar.bz2 scummvm-rg350-64e4aac26a7a3863708b1d01ce2bb7394861d538.zip |
TITANIC: Fix pressing buttons in Service Elevator
Diffstat (limited to 'engines')
-rw-r--r-- | engines/titanic/game/transport/service_elevator.cpp | 8 | ||||
-rw-r--r-- | engines/titanic/sound/sound.cpp | 2 | ||||
-rw-r--r-- | engines/titanic/sound/sound.h | 2 | ||||
-rw-r--r-- | engines/titanic/sound/sound_manager.cpp | 6 | ||||
-rw-r--r-- | engines/titanic/sound/sound_manager.h | 8 |
5 files changed, 14 insertions, 12 deletions
diff --git a/engines/titanic/game/transport/service_elevator.cpp b/engines/titanic/game/transport/service_elevator.cpp index 066a418dbb..0e88e135d3 100644 --- a/engines/titanic/game/transport/service_elevator.cpp +++ b/engines/titanic/game/transport/service_elevator.cpp @@ -207,10 +207,10 @@ bool CServiceElevator::ServiceElevatorFloorRequestMsg(CServiceElevatorFloorReque if (doorbot && _v3 == 0) { _soundHandle1 = playSound("z#415.wav", 50); - addTimer(1, 1000, 500); + _timerId = addTimer(1, 1000, 500); } else if (doorbot && _v3 == 1) { _soundHandle1 = playSound("z#417.wav", 50); - addTimer(1, 1000, 500); + _timerId = addTimer(1, 1000, 500); } else if (_fieldDC == _v3) { switch (_v3) { case 0: @@ -226,7 +226,7 @@ bool CServiceElevator::ServiceElevatorFloorRequestMsg(CServiceElevatorFloorReque break; } - addTimer(1, 1000, 500); + _timerId = addTimer(1, 1000, 500); } else { switch (_v3) { case 0: @@ -242,7 +242,7 @@ bool CServiceElevator::ServiceElevatorFloorRequestMsg(CServiceElevatorFloorReque break; } - addTimer(0, 1000, 500); + _timerId = addTimer(0, 1000, 500); } return true; diff --git a/engines/titanic/sound/sound.cpp b/engines/titanic/sound/sound.cpp index e48c8760c5..fb8cc299df 100644 --- a/engines/titanic/sound/sound.cpp +++ b/engines/titanic/sound/sound.cpp @@ -57,7 +57,7 @@ void CSound::preEnterView(CViewItem *newView, bool isNewRoom) { _soundManager.setListenerPosition(xp, yp, zp, cosVal, sinVal, 0, isNewRoom); } -bool CSound::isActive(int handle) const { +bool CSound::isActive(int handle) { if (handle != 0 && handle != -1) return _soundManager.isActive(handle); diff --git a/engines/titanic/sound/sound.h b/engines/titanic/sound/sound.h index 21f2a93f24..c767a3d75f 100644 --- a/engines/titanic/sound/sound.h +++ b/engines/titanic/sound/sound.h @@ -115,7 +115,7 @@ public: /** * Returns true if a sound with the specified handle is active */ - bool isActive(int handle) const; + bool isActive(int handle); /** * Sets the volume for a sound diff --git a/engines/titanic/sound/sound_manager.cpp b/engines/titanic/sound/sound_manager.cpp index c1a46e5103..5f8e53caf3 100644 --- a/engines/titanic/sound/sound_manager.cpp +++ b/engines/titanic/sound/sound_manager.cpp @@ -311,7 +311,9 @@ void QSoundManager::setPolarPosition(int handle, double range, double azimuth, d } } -bool QSoundManager::isActive(int handle) const { +bool QSoundManager::isActive(int handle) { + resetChannel(10); + for (uint idx = 0; idx < _slots.size(); ++idx) { if (_slots[idx]._handle == handle) return true; @@ -320,7 +322,7 @@ bool QSoundManager::isActive(int handle) const { return false; } -bool QSoundManager::isActive(const CWaveFile *waveFile) const { +bool QSoundManager::isActive(const CWaveFile *waveFile) { return _sounds.contains(waveFile); } diff --git a/engines/titanic/sound/sound_manager.h b/engines/titanic/sound/sound_manager.h index a3074a8e57..ff556346de 100644 --- a/engines/titanic/sound/sound_manager.h +++ b/engines/titanic/sound/sound_manager.h @@ -123,12 +123,12 @@ public: /** * Returns true if the given sound is currently active */ - virtual bool isActive(int handle) const = 0; + virtual bool isActive(int handle) = 0; /** * Returns true if the given sound is currently active */ - virtual bool isActive(const CWaveFile *waveFile) const { return false; } + virtual bool isActive(const CWaveFile *waveFile) { return false; } /** * Handles regularly updating the mixer @@ -395,12 +395,12 @@ public: /** * Returns true if the given sound is currently active */ - virtual bool isActive(int handle) const; + virtual bool isActive(int handle); /** * Returns true if the given sound is currently active */ - virtual bool isActive(const CWaveFile *waveFile) const; + virtual bool isActive(const CWaveFile *waveFile); /** * Handles regularly updating the mixer |