aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/moves
diff options
context:
space:
mode:
authorPaul Gilbert2016-08-19 23:41:19 -0400
committerPaul Gilbert2016-08-19 23:41:19 -0400
commit3c2c82fcd593e7b358f359de69070b6dd0e92150 (patch)
tree53251f5642b35626c606633cfe7baa1ce87b1fea /engines/titanic/moves
parent449d8a02e05754e889e13ff721ff2c0cb995c486 (diff)
downloadscummvm-rg350-3c2c82fcd593e7b358f359de69070b6dd0e92150.tar.gz
scummvm-rg350-3c2c82fcd593e7b358f359de69070b6dd0e92150.tar.bz2
scummvm-rg350-3c2c82fcd593e7b358f359de69070b6dd0e92150.zip
TITANIC: Implemented more game classes
Diffstat (limited to 'engines/titanic/moves')
-rw-r--r--engines/titanic/moves/enter_bomb_room.cpp10
-rw-r--r--engines/titanic/moves/enter_bomb_room.h2
-rw-r--r--engines/titanic/moves/enter_bridge.cpp17
-rw-r--r--engines/titanic/moves/enter_bridge.h5
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