diff options
Diffstat (limited to 'engines/titanic/carry/key.cpp')
-rw-r--r-- | engines/titanic/carry/key.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/engines/titanic/carry/key.cpp b/engines/titanic/carry/key.cpp index 6e947464f1..187ff1b6c3 100644 --- a/engines/titanic/carry/key.cpp +++ b/engines/titanic/carry/key.cpp @@ -24,6 +24,11 @@ namespace Titanic { +BEGIN_MESSAGE_MAP(CKey, CCarry) + ON_MESSAGE(PuzzleSolvedMsg) + ON_MESSAGE(UseWithOtherMsg) +END_MESSAGE_MAP() + CKey::CKey() : CCarry() { } @@ -37,4 +42,19 @@ void CKey::load(SimpleFile *file) { CCarry::load(file); } +bool CKey::PuzzleSolvedMsg(CPuzzleSolvedMsg *msg) { + _fieldE0 = 1; + setVisible(true); + return true; +} + +bool CKey::UseWithOtherMsg(CUseWithOtherMsg *msg) { + if (msg->_other->getName() == "1stClassPhono") { + CActMsg actMsg("Unlock"); + actMsg.execute(msg->_other); + } + + return true; +} + } // End of namespace Titanic |