diff options
author | Paul Gilbert | 2016-08-17 18:42:03 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-08-17 18:42:03 -0400 |
commit | 75f6d1fa5b4a413818457fd9d373054405dd7129 (patch) | |
tree | d2f8b142c265568e1b9c02bc1a45890b09e5fa11 /engines | |
parent | 540570d3c7c12eff07d97c48b3ce150048ef0ee9 (diff) | |
download | scummvm-rg350-75f6d1fa5b4a413818457fd9d373054405dd7129.tar.gz scummvm-rg350-75f6d1fa5b4a413818457fd9d373054405dd7129.tar.bz2 scummvm-rg350-75f6d1fa5b4a413818457fd9d373054405dd7129.zip |
TITANIC: Implemented CBridgeDoor class
Diffstat (limited to 'engines')
-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; |