diff options
author | Paul Gilbert | 2017-08-01 21:25:52 -0400 |
---|---|---|
committer | Paul Gilbert | 2017-08-01 21:25:52 -0400 |
commit | 8864cfc0fa88463ba21dd0b10df091a30b39daba (patch) | |
tree | eff203177eb76216705a050404b6b54588b534c7 /engines/titanic | |
parent | f4f15667a5a7cdde12f5aa7ccf1b7384277bffc4 (diff) | |
download | scummvm-rg350-8864cfc0fa88463ba21dd0b10df091a30b39daba.tar.gz scummvm-rg350-8864cfc0fa88463ba21dd0b10df091a30b39daba.tar.bz2 scummvm-rg350-8864cfc0fa88463ba21dd0b10df091a30b39daba.zip |
TITANIC: Fix sound effects on the Promenade Deck
Diffstat (limited to 'engines/titanic')
-rw-r--r-- | engines/titanic/game/fan_noises.cpp | 6 | ||||
-rw-r--r-- | engines/titanic/sound/auto_sound_player.cpp | 14 | ||||
-rw-r--r-- | engines/titanic/sound/auto_sound_player.h | 4 | ||||
-rw-r--r-- | engines/titanic/sound/bird_song.cpp | 2 |
4 files changed, 14 insertions, 12 deletions
diff --git a/engines/titanic/game/fan_noises.cpp b/engines/titanic/game/fan_noises.cpp index 982991c261..7ddf919eca 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 4a3a1fe7f8..2ada8c7470 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 9f4d11ee06..0dfc440011 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 53a25e2dbe..36b4aa58d3 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() |