[Scummvm-git-logs] scummvm master -> 8864cfc0fa88463ba21dd0b10df091a30b39daba

dreammaster dreammaster at scummvm.org
Wed Aug 2 03:25:56 CEST 2017


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:
8864cfc0fa TITANIC: Fix sound effects on the Promenade Deck


Commit: 8864cfc0fa88463ba21dd0b10df091a30b39daba
    https://github.com/scummvm/scummvm/commit/8864cfc0fa88463ba21dd0b10df091a30b39daba
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-08-01T21:25:52-04:00

Commit Message:
TITANIC: Fix sound effects on the Promenade Deck

Changed paths:
    engines/titanic/game/fan_noises.cpp
    engines/titanic/sound/auto_sound_player.cpp
    engines/titanic/sound/auto_sound_player.h
    engines/titanic/sound/bird_song.cpp


diff --git a/engines/titanic/game/fan_noises.cpp b/engines/titanic/game/fan_noises.cpp
index 982991c..7ddf919 100644
--- a/engines/titanic/game/fan_noises.cpp
+++ b/engines/titanic/game/fan_noises.cpp
@@ -138,9 +138,10 @@ bool CFanNoises::StatusChangeMsg(CStatusChangeMsg *msg) {
 			}
 
 			switch (oldState) {
-			case 1:
+			case 0:
 			case 2:
-				_soundHandle = playSound("b#60.wav", _soundPercent, _soundBalance);
+				_soundHandle = playSound("b#60.wav", _soundPercent, _soundBalance, true);
+				_startFlag = true;
 				break;
 			default:
 				break;
@@ -157,6 +158,7 @@ bool CFanNoises::StatusChangeMsg(CStatusChangeMsg *msg) {
 
 			if (oldState == 1) {
 				_soundHandle = playSound("b#58.wav", _soundPercent, _soundBalance, true);
+				_startFlag = true;
 			}
 			break;
 
diff --git a/engines/titanic/sound/auto_sound_player.cpp b/engines/titanic/sound/auto_sound_player.cpp
index 4a3a1fe..2ada8c7 100644
--- a/engines/titanic/sound/auto_sound_player.cpp
+++ b/engines/titanic/sound/auto_sound_player.cpp
@@ -33,13 +33,13 @@ BEGIN_MESSAGE_MAP(CAutoSoundPlayer, CGameObject)
 END_MESSAGE_MAP()
 
 CAutoSoundPlayer::CAutoSoundPlayer() : CGameObject(),
-	_fieldBC(0), _volume(70), _balance(0), _repeated(false), _soundHandle(-1),
-	_stopSeconds(0), _startSeconds(-1), _active(false), _fieldE8(0) {
+	_unused(0), _volume(70), _balance(0), _repeated(false), _soundHandle(-1),
+	_stopSeconds(0), _startSeconds(-1), _active(false), _isVectorSound(false) {
 }
 
 void CAutoSoundPlayer::save(SimpleFile *file, int indent) {
 	file->writeNumberLine(1, indent);
-	file->writeNumberLine(_fieldBC, indent);
+	file->writeNumberLine(_unused, indent);
 	file->writeQuotedLine(_filename, indent);
 	file->writeNumberLine(_volume, indent);
 	file->writeNumberLine(_balance, indent);
@@ -48,14 +48,14 @@ void CAutoSoundPlayer::save(SimpleFile *file, int indent) {
 	file->writeNumberLine(_stopSeconds, indent);
 	file->writeNumberLine(_startSeconds, indent);
 	file->writeNumberLine(_active, indent);
-	file->writeNumberLine(_fieldE8, indent);
+	file->writeNumberLine(_isVectorSound, indent);
 
 	CGameObject::save(file, indent);
 }
 
 void CAutoSoundPlayer::load(SimpleFile *file) {
 	file->readNumber();
-	_fieldBC = file->readNumber();
+	_unused = file->readNumber();
 	_filename = file->readString();
 	_volume = file->readNumber();
 	_balance = file->readNumber();
@@ -64,7 +64,7 @@ void CAutoSoundPlayer::load(SimpleFile *file) {
 	_stopSeconds = file->readNumber();
 	_startSeconds = file->readNumber();
 	_active = file->readNumber();
-	_fieldE8 = file->readNumber();
+	_isVectorSound = file->readNumber();
 
 	CGameObject::load(file);
 }
@@ -74,7 +74,7 @@ bool CAutoSoundPlayer::TurnOn(CTurnOn *msg) {
 		CProximity prox;
 		prox._balance = _balance;
 		prox._repeated = _repeated;
-		if (_fieldE8)
+		if (_isVectorSound)
 			prox._positioningMode = POSMODE_VECTOR;
 		prox._channelVolume = (_startSeconds == -1) ? _volume : 0;
 
diff --git a/engines/titanic/sound/auto_sound_player.h b/engines/titanic/sound/auto_sound_player.h
index 9f4d11e..0dfc440 100644
--- a/engines/titanic/sound/auto_sound_player.h
+++ b/engines/titanic/sound/auto_sound_player.h
@@ -35,7 +35,7 @@ class CAutoSoundPlayer : public CGameObject {
 	bool SetVolumeMsg(CSetVolumeMsg *msg);
 	bool LoadSuccessMsg(CLoadSuccessMsg *msg);
 public:
-	int _fieldBC;
+	int _unused;
 	CString _filename;
 	int _volume;
 	int _balance;
@@ -44,7 +44,7 @@ public:
 	int _stopSeconds;
 	int _startSeconds;
 	bool _active;
-	int _fieldE8;
+	bool _isVectorSound;
 public:
 	CLASSDEF;
 	CAutoSoundPlayer();
diff --git a/engines/titanic/sound/bird_song.cpp b/engines/titanic/sound/bird_song.cpp
index 53a25e2..36b4aa5 100644
--- a/engines/titanic/sound/bird_song.cpp
+++ b/engines/titanic/sound/bird_song.cpp
@@ -24,7 +24,7 @@
 
 namespace Titanic {
 
-BEGIN_MESSAGE_MAP(CBirdSong, CAutoSoundPlayer)
+BEGIN_MESSAGE_MAP(CBirdSong, CRoomAutoSoundPlayer)
 	ON_MESSAGE(TurnOn)
 	ON_MESSAGE(SignalObject)
 END_MESSAGE_MAP()





More information about the Scummvm-git-logs mailing list