aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/game/parrot/parrot_trigger.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/titanic/game/parrot/parrot_trigger.cpp')
-rw-r--r--engines/titanic/game/parrot/parrot_trigger.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/engines/titanic/game/parrot/parrot_trigger.cpp b/engines/titanic/game/parrot/parrot_trigger.cpp
index 36e99ada33..b7287ebb6a 100644
--- a/engines/titanic/game/parrot/parrot_trigger.cpp
+++ b/engines/titanic/game/parrot/parrot_trigger.cpp
@@ -21,9 +21,15 @@
*/
#include "titanic/game/parrot/parrot_trigger.h"
+#include "titanic/npcs/parrot.h"
+#include "titanic/core/project_item.h"
namespace Titanic {
+BEGIN_MESSAGE_MAP(CParrotTrigger, CGameObject)
+ ON_MESSAGE(MouseButtonDownMsg)
+END_MESSAGE_MAP()
+
void CParrotTrigger::save(SimpleFile *file, int indent) {
file->writeNumberLine(1, indent);
file->writeNumberLine(_value, indent);
@@ -36,4 +42,11 @@ void CParrotTrigger::load(SimpleFile *file) {
CGameObject::load(file);
}
+bool CParrotTrigger::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
+ CTrueTalkTriggerActionMsg triggerMsg(_value, 0, 0);
+ triggerMsg.execute(getRoot(), CParrot::_type,
+ MSGFLAG_CLASS_DEF | MSGFLAG_BREAK_IF_HANDLED | MSGFLAG_SCAN);
+ return true;
+}
+
} // End of namespace Titanic