diff options
author | Paul Gilbert | 2017-07-16 21:45:09 -0400 |
---|---|---|
committer | Paul Gilbert | 2017-07-16 21:45:09 -0400 |
commit | c55132baea3adf06d00f2fe011f855dbe65b166f (patch) | |
tree | 3b7bc83807a4eb8773374737ac4a149827842101 /engines/titanic | |
parent | 679c0e72b146a72340fd6b2ae5aac157831bae13 (diff) | |
download | scummvm-rg350-c55132baea3adf06d00f2fe011f855dbe65b166f.tar.gz scummvm-rg350-c55132baea3adf06d00f2fe011f855dbe65b166f.tar.bz2 scummvm-rg350-c55132baea3adf06d00f2fe011f855dbe65b166f.zip |
TITANIC: Renamings for Gondolier Mixer
Diffstat (limited to 'engines/titanic')
-rw-r--r-- | engines/titanic/game/gondolier/gondolier_base.cpp | 12 | ||||
-rw-r--r-- | engines/titanic/game/gondolier/gondolier_base.h | 4 | ||||
-rw-r--r-- | engines/titanic/game/gondolier/gondolier_mixer.cpp | 40 | ||||
-rw-r--r-- | engines/titanic/game/gondolier/gondolier_mixer.h | 2 |
4 files changed, 29 insertions, 29 deletions
diff --git a/engines/titanic/game/gondolier/gondolier_base.cpp b/engines/titanic/game/gondolier/gondolier_base.cpp index 8b753ec264..f5f9791fa8 100644 --- a/engines/titanic/game/gondolier/gondolier_base.cpp +++ b/engines/titanic/game/gondolier/gondolier_base.cpp @@ -31,9 +31,9 @@ END_MESSAGE_MAP() bool CGondolierBase::_chestOpen; bool CGondolierBase::_puzzleSolved; int CGondolierBase::_volume1; -int CGondolierBase::_v4; +int CGondolierBase::_slider1; int CGondolierBase::_volume2; -int CGondolierBase::_v7; +int CGondolierBase::_slider2; bool CGondolierBase::_rightSliderHooked; bool CGondolierBase::_leftSliderHooked; bool CGondolierBase::_priorLeftSliderHooked; @@ -44,10 +44,10 @@ void CGondolierBase::save(SimpleFile *file, int indent) { file->writeNumberLine(_chestOpen, indent); file->writeNumberLine(_puzzleSolved, indent); file->writeNumberLine(_volume1, indent); - file->writeNumberLine(_v4, indent); + file->writeNumberLine(_slider1, indent); file->writeNumberLine(_rightSliderHooked, indent); file->writeNumberLine(_volume2, indent); - file->writeNumberLine(_v7, indent); + file->writeNumberLine(_slider2, indent); file->writeNumberLine(_leftSliderHooked, indent); file->writeNumberLine(_priorLeftSliderHooked, indent); file->writeNumberLine(_priorRightSliderHooked, indent); @@ -60,10 +60,10 @@ void CGondolierBase::load(SimpleFile *file) { _chestOpen = file->readNumber(); _puzzleSolved = file->readNumber(); _volume1 = file->readNumber(); - _v4 = file->readNumber(); + _slider1 = file->readNumber(); _rightSliderHooked = file->readNumber(); _volume2 = file->readNumber(); - _v7 = file->readNumber(); + _slider2 = file->readNumber(); _leftSliderHooked = file->readNumber(); _priorLeftSliderHooked = file->readNumber(); _priorRightSliderHooked = file->readNumber(); diff --git a/engines/titanic/game/gondolier/gondolier_base.h b/engines/titanic/game/gondolier/gondolier_base.h index 3b5df9f371..8574a8655c 100644 --- a/engines/titanic/game/gondolier/gondolier_base.h +++ b/engines/titanic/game/gondolier/gondolier_base.h @@ -34,9 +34,9 @@ protected: static bool _chestOpen; static bool _puzzleSolved; static int _volume1; - static int _v4; + static int _slider1; static int _volume2; - static int _v7; + static int _slider2; static bool _leftSliderHooked; static bool _rightSliderHooked; static bool _priorLeftSliderHooked; diff --git a/engines/titanic/game/gondolier/gondolier_mixer.cpp b/engines/titanic/game/gondolier/gondolier_mixer.cpp index 205d1f42da..e4110ec8f4 100644 --- a/engines/titanic/game/gondolier/gondolier_mixer.cpp +++ b/engines/titanic/game/gondolier/gondolier_mixer.cpp @@ -38,7 +38,7 @@ END_MESSAGE_MAP() CGondolierMixer::CGondolierMixer() : CGondolierBase(), _soundName1("c#0.wav"), _soundName2("c#1.wav"), _soundHandle1(-1), _soundHandle2(-1), _fieldC4(0), _fieldC8(0), - _fieldE4(false) { + _soundActive(false) { } void CGondolierMixer::save(SimpleFile *file, int indent) { @@ -49,7 +49,7 @@ void CGondolierMixer::save(SimpleFile *file, int indent) { file->writeNumberLine(_fieldC8, indent); file->writeQuotedLine(_soundName1, indent); file->writeQuotedLine(_soundName2, indent); - file->writeNumberLine(_fieldE4, indent); + file->writeNumberLine(_soundActive, indent); CGondolierBase::save(file, indent); } @@ -62,7 +62,7 @@ void CGondolierMixer::load(SimpleFile *file) { _fieldC8 = file->readNumber(); _soundName1 = file->readString(); _soundName2 = file->readString(); - _fieldE4 = file->readNumber(); + _soundActive = file->readNumber(); CGondolierBase::load(file); } @@ -90,13 +90,13 @@ bool CGondolierMixer::LeaveRoomMsg(CLeaveRoomMsg *msg) { bool CGondolierMixer::TurnOn(CTurnOn *msg) { if (!_puzzleSolved) { if (_soundHandle1 == -1) { - _soundHandle1 = playSound(_soundName1, _volume1 * _v4 / 10, 0, true); - _fieldE4 = true; + _soundHandle1 = playSound(_soundName1, _volume1 * _slider1 / 10, 0, true); + _soundActive = true; } if (_soundHandle2 == -1) { - _soundHandle2 = playSound(_soundName1, _volume2 * _v7 / 10, 0, true); - _fieldE4 = true; + _soundHandle2 = playSound(_soundName1, _volume2 * _slider2 / 10, 0, true); + _soundActive = true; } } @@ -109,7 +109,7 @@ bool CGondolierMixer::TurnOff(CTurnOff *msg) { stopSound(_soundHandle1, 2); _soundHandle1 = -1; - _fieldE4 = false; + _soundActive = false; } if (_soundHandle2 != -1) { @@ -117,7 +117,7 @@ bool CGondolierMixer::TurnOff(CTurnOff *msg) { stopSound(_soundHandle2, 2); _soundHandle2 = -1; - _fieldE4 = false; + _soundActive = false; } return true; @@ -128,9 +128,9 @@ bool CGondolierMixer::SetVolumeMsg(CSetVolumeMsg *msg) { _volume1 = _volume2 = msg->_volume; if (_soundHandle1 != -1 && isSoundActive(_soundHandle1)) - setSoundVolume(_soundHandle1, msg->_volume * _v4 / 10, 2); + setSoundVolume(_soundHandle1, msg->_volume * _slider1 / 10, 2); if (_soundHandle2 != -1 && isSoundActive(_soundHandle2)) - setSoundVolume(_soundHandle2, msg->_volume * _v7 / 10, 2); + setSoundVolume(_soundHandle2, msg->_volume * _slider2 / 10, 2); } return true; @@ -139,28 +139,28 @@ bool CGondolierMixer::SetVolumeMsg(CSetVolumeMsg *msg) { bool CGondolierMixer::SignalObject(CSignalObject *msg) { if (!_puzzleSolved) { if (msg->_strValue == "Fly") { - _v4 = CLIP(msg->_numValue, 0, 10); + _slider1 = CLIP(msg->_numValue, 0, 10); if (!_leftSliderHooked) { - _v7 = 10 - _v4; + _slider2 = 10 - _slider1; CStatusChangeMsg statusMsg; - statusMsg._newStatus = _v7; + statusMsg._newStatus = _slider2; statusMsg.execute("GondolierRightLever"); } } if (msg->_strValue == "Tos") { - _v7 = CLIP(msg->_numValue, 0, 10); + _slider2 = CLIP(msg->_numValue, 0, 10); if (!_rightSliderHooked) { - _v4 = 10 - _v7; + _slider1 = 10 - _slider2; CStatusChangeMsg statusMsg; - statusMsg._newStatus = _v4; + statusMsg._newStatus = _slider1; statusMsg.execute("GondolierLeftLever"); } } - if (!_v4 && !_v7 && _rightSliderHooked && _leftSliderHooked) { + if (!_slider1 && !_slider2 && _rightSliderHooked && _leftSliderHooked) { _puzzleSolved = true; CStatusChangeMsg statusMsg; statusMsg._newStatus = 1; @@ -181,8 +181,8 @@ bool CGondolierMixer::SignalObject(CSignalObject *msg) { } bool CGondolierMixer::LoadSuccessMsg(CLoadSuccessMsg *msg) { - if (_fieldE4) { - _fieldE4 = 0; + if (_soundActive) { + _soundActive = 0; _soundHandle1 = _soundHandle2 = -1; CTurnOn onMsg; onMsg.execute(this); diff --git a/engines/titanic/game/gondolier/gondolier_mixer.h b/engines/titanic/game/gondolier/gondolier_mixer.h index 167650f5bb..d1a0b18f21 100644 --- a/engines/titanic/game/gondolier/gondolier_mixer.h +++ b/engines/titanic/game/gondolier/gondolier_mixer.h @@ -44,7 +44,7 @@ private: int _fieldC8; CString _soundName1; CString _soundName2; - bool _fieldE4; + bool _soundActive; public: CLASSDEF; CGondolierMixer(); |