aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/carry
diff options
context:
space:
mode:
authorPaul Gilbert2016-08-22 19:25:36 -0400
committerPaul Gilbert2016-08-22 19:25:36 -0400
commit65bc8cb83c01cc1e7e6c8c093b8f42080800718d (patch)
tree2b53d3e66b85ea775ab5131f2971764d93232183 /engines/titanic/carry
parentf238ed18ec24debf7f1b8713abf1ce3ebbeeaec3 (diff)
downloadscummvm-rg350-65bc8cb83c01cc1e7e6c8c093b8f42080800718d.tar.gz
scummvm-rg350-65bc8cb83c01cc1e7e6c8c093b8f42080800718d.tar.bz2
scummvm-rg350-65bc8cb83c01cc1e7e6c8c093b8f42080800718d.zip
TITANIC: Implemented more game classes
Diffstat (limited to 'engines/titanic/carry')
-rw-r--r--engines/titanic/carry/hammer.cpp23
-rw-r--r--engines/titanic/carry/hammer.h3
2 files changed, 26 insertions, 0 deletions
diff --git a/engines/titanic/carry/hammer.cpp b/engines/titanic/carry/hammer.cpp
index d3b912184c..88c766d564 100644
--- a/engines/titanic/carry/hammer.cpp
+++ b/engines/titanic/carry/hammer.cpp
@@ -24,6 +24,11 @@
namespace Titanic {
+BEGIN_MESSAGE_MAP(CHammer, CCarry)
+ ON_MESSAGE(PuzzleSolvedMsg)
+ ON_MESSAGE(UseWithOtherMsg)
+END_MESSAGE_MAP()
+
CHammer::CHammer() : CCarry() {
}
@@ -37,4 +42,22 @@ void CHammer::load(SimpleFile *file) {
CCarry::load(file);
}
+bool CHammer::PuzzleSolvedMsg(CPuzzleSolvedMsg *msg) {
+ _fieldE0 = 1;
+ return true;
+}
+
+bool CHammer::UseWithOtherMsg(CUseWithOtherMsg *msg) {
+ CString name = msg->_other->getName();
+ if (name == "LongStickDispenser") {
+ CPuzzleSolvedMsg solvedMsg;
+ solvedMsg.execute("LongStickDispenser");
+ } else if (name == "Bomb") {
+ CActMsg actMsg("Hit");
+ actMsg.execute("Bomb");
+ }
+
+ return CCarry::UseWithOtherMsg(msg);
+}
+
} // End of namespace Titanic
diff --git a/engines/titanic/carry/hammer.h b/engines/titanic/carry/hammer.h
index a455d71434..8cc86f3db1 100644
--- a/engines/titanic/carry/hammer.h
+++ b/engines/titanic/carry/hammer.h
@@ -28,6 +28,9 @@
namespace Titanic {
class CHammer : public CCarry {
+ DECLARE_MESSAGE_MAP;
+ bool PuzzleSolvedMsg(CPuzzleSolvedMsg *msg);
+ bool UseWithOtherMsg(CUseWithOtherMsg *msg);
public:
CLASSDEF;
CHammer();