From 996811181063d1920454e0e09115b49e33bc8f5d Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Fri, 26 Aug 2016 22:15:58 -0400 Subject: TITANIC: Implemented other parrot related game classes --- engines/titanic/carry/perch.cpp | 13 +++++++++++++ engines/titanic/carry/perch.h | 2 ++ 2 files changed, 15 insertions(+) (limited to 'engines/titanic/carry') diff --git a/engines/titanic/carry/perch.cpp b/engines/titanic/carry/perch.cpp index 281b3fce53..4f0e76bdb0 100644 --- a/engines/titanic/carry/perch.cpp +++ b/engines/titanic/carry/perch.cpp @@ -24,6 +24,10 @@ namespace Titanic { +BEGIN_MESSAGE_MAP(CPerch, CCentralCore) + ON_MESSAGE(UseWithOtherMsg) +END_MESSAGE_MAP() + void CPerch::save(SimpleFile *file, int indent) { file->writeNumberLine(1, indent); CCentralCore::save(file, indent); @@ -34,4 +38,13 @@ void CPerch::load(SimpleFile *file) { CCentralCore::load(file); } +bool CPerch::UseWithOtherMsg(CUseWithOtherMsg *msg) { + if (msg->_other->isEquals("SpeechCentre")) { + CShowTextMsg textMsg("This does not reach."); + textMsg.execute("PET"); + } + + return CCentralCore::UseWithOtherMsg(msg); +} + } // End of namespace Titanic diff --git a/engines/titanic/carry/perch.h b/engines/titanic/carry/perch.h index d23868d909..8941c8ea4d 100644 --- a/engines/titanic/carry/perch.h +++ b/engines/titanic/carry/perch.h @@ -28,6 +28,8 @@ namespace Titanic { class CPerch : public CCentralCore { + DECLARE_MESSAGE_MAP; + bool UseWithOtherMsg(CUseWithOtherMsg *msg); public: CLASSDEF; -- cgit v1.2.3