aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/game
diff options
context:
space:
mode:
authorPaul Gilbert2017-01-29 20:36:15 -0500
committerPaul Gilbert2017-01-29 20:36:15 -0500
commit1948b62a80f056050f94c8a56f00de58f42394b2 (patch)
treedf0c434c0cb48cccc2f402d70c7bc7aa1e62bde2 /engines/titanic/game
parentfd69ac2943fe8efcc9a894bbb7a48c4d3e9427c6 (diff)
downloadscummvm-rg350-1948b62a80f056050f94c8a56f00de58f42394b2.tar.gz
scummvm-rg350-1948b62a80f056050f94c8a56f00de58f42394b2.tar.bz2
scummvm-rg350-1948b62a80f056050f94c8a56f00de58f42394b2.zip
TITANIC: Cleanup of music room object classes
Diffstat (limited to 'engines/titanic/game')
-rw-r--r--engines/titanic/game/music_console_button.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/engines/titanic/game/music_console_button.cpp b/engines/titanic/game/music_console_button.cpp
index 639aebd9c9..872202891c 100644
--- a/engines/titanic/game/music_console_button.cpp
+++ b/engines/titanic/game/music_console_button.cpp
@@ -60,6 +60,7 @@ bool CMusicConsoleButton::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
if (CMusicRoom::_musicHandler->checkInstrument(SNAKE)
&& CMusicRoom::_musicHandler->checkInstrument(PIANO)
&& CMusicRoom::_musicHandler->checkInstrument(BASS)) {
+ // All three instruments have the correct settings
CCorrectMusicPlayedMsg correctMsg;
correctMsg.execute(findRoom());
}
@@ -70,6 +71,7 @@ bool CMusicConsoleButton::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
bool CMusicConsoleButton::LeaveViewMsg(CLeaveViewMsg *msg) {
if (_isActive) {
+ // Stop playing the active music
CStopMusicMsg stopMsg(this);
stopMsg.execute(this);
stopMovie();
@@ -83,8 +85,6 @@ bool CMusicConsoleButton::SetMusicControlsMsg(CSetMusicControlsMsg *msg) {
CMusicRoom *musicRoom = getMusicRoom();
CQueryMusicControlSettingMsg queryMsg;
- queryMsg.execute("Bells Mute Control");
- musicRoom->setMuteControl(BELLS, queryMsg._value == 1);
queryMsg.execute("Bells Pitch Control");
musicRoom->setPitchControl(BELLS, queryMsg._value);
queryMsg.execute("Bells Speed Control");
@@ -93,9 +93,9 @@ bool CMusicConsoleButton::SetMusicControlsMsg(CSetMusicControlsMsg *msg) {
musicRoom->setInversionControl(BELLS, queryMsg._value == 1);
queryMsg.execute("Bells Direction Control");
musicRoom->setDirectionControl(BELLS, queryMsg._value == 1);
+ queryMsg.execute("Bells Mute Control");
+ musicRoom->setMuteControl(BELLS, queryMsg._value == 1);
- queryMsg.execute("Snake Mute Control");
- musicRoom->setMuteControl(SNAKE, queryMsg._value == 1);
queryMsg.execute("Snake Pitch Control");
musicRoom->setPitchControl(SNAKE, queryMsg._value);
queryMsg.execute("Snake Speed Control");
@@ -104,9 +104,9 @@ bool CMusicConsoleButton::SetMusicControlsMsg(CSetMusicControlsMsg *msg) {
musicRoom->setInversionControl(SNAKE, queryMsg._value == 1);
queryMsg.execute("Snake Direction Control");
musicRoom->setDirectionControl(SNAKE, queryMsg._value == 1);
+ queryMsg.execute("Snake Mute Control");
+ musicRoom->setMuteControl(SNAKE, queryMsg._value == 1);
- queryMsg.execute("Piano Mute Control");
- musicRoom->setMuteControl(PIANO, queryMsg._value == 1);
queryMsg.execute("Piano Pitch Control");
musicRoom->setPitchControl(PIANO, queryMsg._value);
queryMsg.execute("Piano Speed Control");
@@ -115,9 +115,9 @@ bool CMusicConsoleButton::SetMusicControlsMsg(CSetMusicControlsMsg *msg) {
musicRoom->setInversionControl(PIANO, queryMsg._value == 1);
queryMsg.execute("Piano Direction Control");
musicRoom->setDirectionControl(PIANO, queryMsg._value == 1);
+ queryMsg.execute("Piano Mute Control");
+ musicRoom->setMuteControl(PIANO, queryMsg._value == 1);
- queryMsg.execute("Bass Mute Control");
- musicRoom->setMuteControl(BASS, queryMsg._value == 1);
queryMsg.execute("Bass Pitch Control");
musicRoom->setPitchControl(BASS, queryMsg._value);
queryMsg.execute("Bass Speed Control");
@@ -126,6 +126,8 @@ bool CMusicConsoleButton::SetMusicControlsMsg(CSetMusicControlsMsg *msg) {
musicRoom->setInversionControl(BASS, queryMsg._value == 1);
queryMsg.execute("Bass Direction Control");
musicRoom->setDirectionControl(BASS, queryMsg._value == 1);
+ queryMsg.execute("Bass Mute Control");
+ musicRoom->setMuteControl(BASS, queryMsg._value == 1);
return true;
}