diff options
Diffstat (limited to 'engines/titanic/moves')
-rw-r--r-- | engines/titanic/moves/enter_bomb_room.cpp | 10 | ||||
-rw-r--r-- | engines/titanic/moves/enter_bomb_room.h | 2 | ||||
-rw-r--r-- | engines/titanic/moves/enter_bridge.cpp | 17 | ||||
-rw-r--r-- | engines/titanic/moves/enter_bridge.h | 5 |
4 files changed, 29 insertions, 5 deletions
diff --git a/engines/titanic/moves/enter_bomb_room.cpp b/engines/titanic/moves/enter_bomb_room.cpp index 55b838d026..9956c669ee 100644 --- a/engines/titanic/moves/enter_bomb_room.cpp +++ b/engines/titanic/moves/enter_bomb_room.cpp @@ -24,6 +24,10 @@ namespace Titanic { +BEGIN_MESSAGE_MAP(CEnterBombRoom, CMovePlayerTo) + ON_MESSAGE(MouseButtonDownMsg) +END_MESSAGE_MAP() + CEnterBombRoom::CEnterBombRoom() : CMovePlayerTo(), _fieldC8(0) { } @@ -37,4 +41,10 @@ void CEnterBombRoom::load(SimpleFile *file) { CMovePlayerTo::load(file); } +bool CEnterBombRoom::MouseButtonDownMsg(CMouseButtonDownMsg *msg) { + changeView("Titania.Node 2.SE"); + changeView(_destination); + return true; +} + } // End of namespace Titanic diff --git a/engines/titanic/moves/enter_bomb_room.h b/engines/titanic/moves/enter_bomb_room.h index 7fe8287eae..ccdd51f37b 100644 --- a/engines/titanic/moves/enter_bomb_room.h +++ b/engines/titanic/moves/enter_bomb_room.h @@ -28,6 +28,8 @@ namespace Titanic { class CEnterBombRoom : public CMovePlayerTo { + DECLARE_MESSAGE_MAP; + bool MouseButtonDownMsg(CMouseButtonDownMsg *msg); protected: int _fieldC8; public: diff --git a/engines/titanic/moves/enter_bridge.cpp b/engines/titanic/moves/enter_bridge.cpp index 2600ee699f..fb44fe2e02 100644 --- a/engines/titanic/moves/enter_bridge.cpp +++ b/engines/titanic/moves/enter_bridge.cpp @@ -24,20 +24,31 @@ namespace Titanic { +BEGIN_MESSAGE_MAP(CEnterBridge, CGameObject) + ON_MESSAGE(EnterRoomMsg) +END_MESSAGE_MAP() + void CEnterBridge::save(SimpleFile *file, int indent) { file->writeNumberLine(1, indent); - file->writeNumberLine(_value, indent); + file->writeNumberLine(_flag, indent); CGameObject::save(file, indent); } void CEnterBridge::load(SimpleFile *file) { file->readNumber(); - _value = file->readNumber(); + _flag = file->readNumber(); CGameObject::load(file); } bool CEnterBridge::EnterRoomMsg(CEnterRoomMsg *msg) { - warning("CEnterBridge::handlEvent"); + if (_flag) { + CActMsg actMsg("Disable"); + actMsg.execute("ShipAnnouncements"); + + setState1C(false); + _flag = false; + } + return true; } diff --git a/engines/titanic/moves/enter_bridge.h b/engines/titanic/moves/enter_bridge.h index a2410a6f1f..837c0e9f7d 100644 --- a/engines/titanic/moves/enter_bridge.h +++ b/engines/titanic/moves/enter_bridge.h @@ -29,12 +29,13 @@ namespace Titanic { class CEnterBridge : public CGameObject { + DECLARE_MESSAGE_MAP; bool EnterRoomMsg(CEnterRoomMsg *msg); private: - int _value; + bool _flag; public: CLASSDEF; - CEnterBridge() : CGameObject(), _value(1) {} + CEnterBridge() : CGameObject(), _flag(true) {} /** * Save the data for the class to file |