diff options
Diffstat (limited to 'engines/titanic')
-rw-r--r-- | engines/titanic/game/bridge_door.cpp | 25 | ||||
-rw-r--r-- | engines/titanic/game/bridge_door.h | 4 |
2 files changed, 29 insertions, 0 deletions
diff --git a/engines/titanic/game/bridge_door.cpp b/engines/titanic/game/bridge_door.cpp index 57cdbd23ad..bfa30fd650 100644 --- a/engines/titanic/game/bridge_door.cpp +++ b/engines/titanic/game/bridge_door.cpp @@ -24,6 +24,12 @@ namespace Titanic { +BEGIN_MESSAGE_MAP(CBridgeDoor, CGameObject) + ON_MESSAGE(MouseButtonDownMsg) + ON_MESSAGE(StatusChangeMsg) + ON_MESSAGE(MovieEndMsg) +END_MESSAGE_MAP() + void CBridgeDoor::save(SimpleFile *file, int indent) { file->writeNumberLine(1, indent); CGameObject::save(file, indent); @@ -34,4 +40,23 @@ void CBridgeDoor::load(SimpleFile *file) { CGameObject::load(file); } +bool CBridgeDoor::MouseButtonDownMsg(CMouseButtonDownMsg *msg) { + setVisible(true); + playMovie(0, 6, 0); + changeView("Titania.Node 12.N"); + + return true; +} + +bool CBridgeDoor::StatusChangeMsg(CStatusChangeMsg *msg) { + setVisible(true); + playMovie(7, 0, MOVIE_NOTIFY_OBJECT); + return true; +} + +bool CBridgeDoor::MovieEndMsg(CMovieEndMsg *msg) { + setVisible(false); + return true; +} + } // End of namespace Titanic diff --git a/engines/titanic/game/bridge_door.h b/engines/titanic/game/bridge_door.h index c1872a29be..010a8b8bc0 100644 --- a/engines/titanic/game/bridge_door.h +++ b/engines/titanic/game/bridge_door.h @@ -28,6 +28,10 @@ namespace Titanic { class CBridgeDoor : public CGameObject { + DECLARE_MESSAGE_MAP; + bool MouseButtonDownMsg(CMouseButtonDownMsg *msg); + bool StatusChangeMsg(CStatusChangeMsg *msg); + bool MovieEndMsg(CMovieEndMsg *msg); public: CLASSDEF; |