[Scummvm-git-logs] scummvm master -> 64e4aac26a7a3863708b1d01ce2bb7394861d538

dreammaster dreammaster at scummvm.org
Sun Oct 30 02:48:18 CET 2016


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
64e4aac26a TITANIC: Fix pressing buttons in Service Elevator


Commit: 64e4aac26a7a3863708b1d01ce2bb7394861d538
    https://github.com/scummvm/scummvm/commit/64e4aac26a7a3863708b1d01ce2bb7394861d538
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2016-10-29T21:48:10-04:00

Commit Message:
TITANIC: Fix pressing buttons in Service Elevator

Changed paths:
    engines/titanic/game/transport/service_elevator.cpp
    engines/titanic/sound/sound.cpp
    engines/titanic/sound/sound.h
    engines/titanic/sound/sound_manager.cpp
    engines/titanic/sound/sound_manager.h



diff --git a/engines/titanic/game/transport/service_elevator.cpp b/engines/titanic/game/transport/service_elevator.cpp
index 066a418..0e88e13 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 e48c876..fb8cc29 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 21f2a93..c767a3d 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 c1a46e5..5f8e53c 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 a3074a8..ff55634 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





More information about the Scummvm-git-logs mailing list