diff options
author | Paul Gilbert | 2016-04-13 17:37:14 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-07-10 16:11:00 -0400 |
commit | 5cd3dd0d69dead3ca795468716353f9d7d4da7a8 (patch) | |
tree | a675bef4c0c80c61902d3e8ab21a54aafc0b70b2 /engines/titanic/carry/plug_in.cpp | |
parent | c096bfa5d89f43e68fffbe390e73bad08e4f1745 (diff) | |
download | scummvm-rg350-5cd3dd0d69dead3ca795468716353f9d7d4da7a8.tar.gz scummvm-rg350-5cd3dd0d69dead3ca795468716353f9d7d4da7a8.tar.bz2 scummvm-rg350-5cd3dd0d69dead3ca795468716353f9d7d4da7a8.zip |
TITANIC: Adding CCarry descendent msg handlers
Diffstat (limited to 'engines/titanic/carry/plug_in.cpp')
-rw-r--r-- | engines/titanic/carry/plug_in.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/engines/titanic/carry/plug_in.cpp b/engines/titanic/carry/plug_in.cpp index ff8d9b158f..e4fe54dd27 100644 --- a/engines/titanic/carry/plug_in.cpp +++ b/engines/titanic/carry/plug_in.cpp @@ -24,6 +24,10 @@ namespace Titanic { +BEGIN_MESSAGE_MAP(CPlugIn, CCarry) + ON_MESSAGE(UseWithOtherMsg) +END_MESSAGE_MAP() + CPlugIn::CPlugIn() : CCarry(), _field12C(0) { } @@ -37,4 +41,28 @@ void CPlugIn::load(SimpleFile *file) { CCarry::load(file); } +bool CPlugIn::UseWithOtherMsg(CUseWithOtherMsg *msg) { + CGameObject *other = msg->_other; + CString otherName = other->getName(); + + if (otherName == "PET") { + return CCarry::UseWithOtherMsg(msg); + } else if (otherName == "DatasideTransporter") { + CString name = getName(); + if (name == "DatasideTransporter") { + // TODO + if (name != "SendYourself") { + // TODO + } + } else { + // TODO + } + } else { + CShowTextMsg textMsg("This item is incorrectly calibrated."); + textMsg.execute("PET"); + } + + return true; +} + } // End of namespace Titanic |