aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/game/wheel_hotspot.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2016-08-28 14:39:59 -0400
committerPaul Gilbert2016-08-28 14:39:59 -0400
commit4933b59e8e039ae346f650c044e5fe0ba6310ead (patch)
tree805e33ea6fa6109e42d8f8b267ed2b6e5c2a00e2 /engines/titanic/game/wheel_hotspot.cpp
parent1760fb3e0d25704685e9b44f0792536da962082d (diff)
downloadscummvm-rg350-4933b59e8e039ae346f650c044e5fe0ba6310ead.tar.gz
scummvm-rg350-4933b59e8e039ae346f650c044e5fe0ba6310ead.tar.bz2
scummvm-rg350-4933b59e8e039ae346f650c044e5fe0ba6310ead.zip
TITANIC: Implemented remaining game classes
Diffstat (limited to 'engines/titanic/game/wheel_hotspot.cpp')
-rw-r--r--engines/titanic/game/wheel_hotspot.cpp40
1 files changed, 40 insertions, 0 deletions
diff --git a/engines/titanic/game/wheel_hotspot.cpp b/engines/titanic/game/wheel_hotspot.cpp
index f9af594cd5..544e6f5470 100644
--- a/engines/titanic/game/wheel_hotspot.cpp
+++ b/engines/titanic/game/wheel_hotspot.cpp
@@ -24,6 +24,11 @@
namespace Titanic {
+BEGIN_MESSAGE_MAP(CWheelHotSpot, CBackground)
+ ON_MESSAGE(MouseButtonDownMsg)
+ ON_MESSAGE(SignalObject)
+END_MESSAGE_MAP()
+
void CWheelHotSpot::save(SimpleFile *file, int indent) {
file->writeNumberLine(1, indent);
file->writeNumberLine(_fieldE0, indent);
@@ -40,4 +45,39 @@ void CWheelHotSpot::load(SimpleFile *file) {
CBackground::load(file);
}
+bool CWheelHotSpot::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
+ if (_fieldE0) {
+ CActMsg actMsg;
+
+ switch (_fieldE4) {
+ case 1:
+ actMsg._action = "Stop";
+ actMsg.execute("CaptainsWheel");
+ break;
+
+ case 2:
+ actMsg._action = "Cruise";
+ actMsg.execute("CaptainsWheel");
+ break;
+
+ case 3:
+ actMsg._action = "Go";
+ actMsg.execute("CaptainsWheel");
+ break;
+
+ default:
+ break;
+ }
+ } else if (_fieldE4 == 3) {
+ petDisplayMessage("Go where?");
+ }
+
+ return true;
+}
+
+bool CWheelHotSpot::SignalObject(CSignalObject *msg) {
+ _fieldE0 = msg->_numValue != 0;
+ return true;
+}
+
} // End of namespace Titanic