aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/carry
diff options
context:
space:
mode:
authorPaul Gilbert2016-08-26 07:47:31 -0400
committerPaul Gilbert2016-08-26 07:47:31 -0400
commit41ee7dd3717e8ff5451314fe62468ae64e8879c3 (patch)
treea4ccef80ac473336728b371e0e321e97213b7242 /engines/titanic/carry
parente40caf40a17e50d9cab698eb9b806302e106f179 (diff)
downloadscummvm-rg350-41ee7dd3717e8ff5451314fe62468ae64e8879c3.tar.gz
scummvm-rg350-41ee7dd3717e8ff5451314fe62468ae64e8879c3.tar.bz2
scummvm-rg350-41ee7dd3717e8ff5451314fe62468ae64e8879c3.zip
TITANIC: Implemented more game classes
Diffstat (limited to 'engines/titanic/carry')
-rw-r--r--engines/titanic/carry/nose.cpp25
-rw-r--r--engines/titanic/carry/nose.h3
2 files changed, 28 insertions, 0 deletions
diff --git a/engines/titanic/carry/nose.cpp b/engines/titanic/carry/nose.cpp
index 4f3afe24ac..a08d02a88c 100644
--- a/engines/titanic/carry/nose.cpp
+++ b/engines/titanic/carry/nose.cpp
@@ -21,9 +21,15 @@
*/
#include "titanic/carry/nose.h"
+#include "titanic/game/head_slot.h"
namespace Titanic {
+BEGIN_MESSAGE_MAP(CNose, CHeadPiece)
+ ON_MESSAGE(ChangeSeasonMsg)
+ ON_MESSAGE(UseWithOtherMsg)
+END_MESSAGE_MAP()
+
CNose::CNose() : CHeadPiece() {
}
@@ -37,4 +43,23 @@ void CNose::load(SimpleFile *file) {
CHeadPiece::load(file);
}
+bool CNose::ChangeSeasonMsg(CChangeSeasonMsg *msg) {
+ // WORKAROUND: Redundant code in original skipped
+ return true;
+}
+
+bool CNose::UseWithOtherMsg(CUseWithOtherMsg *msg) {
+ CHeadSlot *slot = dynamic_cast<CHeadSlot *>(msg->_other);
+ if (!slot)
+ return CCarry::UseWithOtherMsg(msg);
+
+ petMoveToHiddenRoom();
+ _flag = false;
+ CAddHeadPieceMsg addMsg(getName());
+ if (addMsg._value != "NULL")
+ addMsg.execute("NoseSlot");
+
+ return true;
+}
+
} // End of namespace Titanic
diff --git a/engines/titanic/carry/nose.h b/engines/titanic/carry/nose.h
index b688da231a..6e5be30df2 100644
--- a/engines/titanic/carry/nose.h
+++ b/engines/titanic/carry/nose.h
@@ -28,6 +28,9 @@
namespace Titanic {
class CNose : public CHeadPiece {
+ DECLARE_MESSAGE_MAP;
+ bool ChangeSeasonMsg(CChangeSeasonMsg *msg);
+ bool UseWithOtherMsg(CUseWithOtherMsg *msg);
public:
CLASSDEF;
CNose();