diff options
author | Paul Gilbert | 2017-09-09 11:01:45 -0400 |
---|---|---|
committer | Paul Gilbert | 2017-09-09 11:01:45 -0400 |
commit | 8fb2371f6fde6f82608b1f40e446cce2f5f8bf26 (patch) | |
tree | 53fec3bca4a2da39d4b70ea9881b04df21c23e71 /engines/titanic | |
parent | b5ae92701482665b447e63b074e61b103b3730d7 (diff) | |
download | scummvm-rg350-8fb2371f6fde6f82608b1f40e446cce2f5f8bf26.tar.gz scummvm-rg350-8fb2371f6fde6f82608b1f40e446cce2f5f8bf26.tar.bz2 scummvm-rg350-8fb2371f6fde6f82608b1f40e446cce2f5f8bf26.zip |
TITANIC: Fix play/stop operation for 1st Class Restaurant Phonograph
Diffstat (limited to 'engines/titanic')
-rw-r--r-- | engines/titanic/game/stop_phonograph_button.cpp | 19 | ||||
-rw-r--r-- | engines/titanic/game/stop_phonograph_button.h | 2 |
2 files changed, 8 insertions, 13 deletions
diff --git a/engines/titanic/game/stop_phonograph_button.cpp b/engines/titanic/game/stop_phonograph_button.cpp index 51a7db34ce..fb3451238c 100644 --- a/engines/titanic/game/stop_phonograph_button.cpp +++ b/engines/titanic/game/stop_phonograph_button.cpp @@ -26,7 +26,7 @@ namespace Titanic { BEGIN_MESSAGE_MAP(CStopPhonographButton, CBackground) ON_MESSAGE(MouseButtonDownMsg) - ON_MESSAGE(MouseButtonUpMsg) + ON_MESSAGE(TimerMsg) END_MESSAGE_MAP() void CStopPhonographButton::save(SimpleFile *file, int indent) { @@ -45,17 +45,7 @@ bool CStopPhonographButton::MouseButtonDownMsg(CMouseButtonDownMsg *msg) { if (!queryMsg._value) { playMovie(0, 1, 0); - } - - return true; -} - -bool CStopPhonographButton::MouseButtonUpMsg(CMouseButtonUpMsg *msg) { - CQueryPhonographState queryMsg; - queryMsg.execute(getParent()); - - if (!queryMsg._value) { - playMovie(1, 0, 0); + addTimer(200); CPhonographStopMsg stopMsg; stopMsg.execute(getParent()); @@ -64,4 +54,9 @@ bool CStopPhonographButton::MouseButtonUpMsg(CMouseButtonUpMsg *msg) { return true; } +bool CStopPhonographButton::TimerMsg(CTimerMsg *msg) { + playMovie(1, 0, 0); + return true; +} + } // End of namespace Titanic diff --git a/engines/titanic/game/stop_phonograph_button.h b/engines/titanic/game/stop_phonograph_button.h index 9388e6eda0..07a19cc103 100644 --- a/engines/titanic/game/stop_phonograph_button.h +++ b/engines/titanic/game/stop_phonograph_button.h @@ -30,7 +30,7 @@ namespace Titanic { class CStopPhonographButton : public CBackground { DECLARE_MESSAGE_MAP; bool MouseButtonDownMsg(CMouseButtonDownMsg *msg); - bool MouseButtonUpMsg(CMouseButtonUpMsg *msg); + bool TimerMsg(CTimerMsg *msg); public: CLASSDEF; |