aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/moves
diff options
context:
space:
mode:
Diffstat (limited to 'engines/titanic/moves')
-rw-r--r--engines/titanic/moves/trip_down_canal.cpp14
-rw-r--r--engines/titanic/moves/trip_down_canal.h2
2 files changed, 16 insertions, 0 deletions
diff --git a/engines/titanic/moves/trip_down_canal.cpp b/engines/titanic/moves/trip_down_canal.cpp
index c8051dda03..e9818fa96d 100644
--- a/engines/titanic/moves/trip_down_canal.cpp
+++ b/engines/titanic/moves/trip_down_canal.cpp
@@ -24,6 +24,10 @@
namespace Titanic {
+BEGIN_MESSAGE_MAP(CTripDownCanal, CMovePlayerTo)
+ ON_MESSAGE(MouseButtonDownMsg)
+END_MESSAGE_MAP()
+
CTripDownCanal::CTripDownCanal() : CMovePlayerTo() {
}
@@ -37,4 +41,14 @@ void CTripDownCanal::load(SimpleFile *file) {
CMovePlayerTo::load(file);
}
+bool CTripDownCanal::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
+ if (stateGetSeason() == SEASON_WINTER) {
+ petDisplayMessage("Sadly, the Grand Canal transport system is closed for the winter.");
+ } else if (getGameManager()) {
+ changeView(_destination);
+ }
+
+ return true;
+}
+
} // End of namespace Titanic
diff --git a/engines/titanic/moves/trip_down_canal.h b/engines/titanic/moves/trip_down_canal.h
index 736caf4131..f43fb05de1 100644
--- a/engines/titanic/moves/trip_down_canal.h
+++ b/engines/titanic/moves/trip_down_canal.h
@@ -28,6 +28,8 @@
namespace Titanic {
class CTripDownCanal : public CMovePlayerTo {
+ DECLARE_MESSAGE_MAP;
+ bool MouseButtonDownMsg(CMouseButtonDownMsg *msg);
public:
CLASSDEF;
CTripDownCanal();