aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/messages/pet_messages.h
diff options
context:
space:
mode:
Diffstat (limited to 'engines/titanic/messages/pet_messages.h')
-rw-r--r--engines/titanic/messages/pet_messages.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/engines/titanic/messages/pet_messages.h b/engines/titanic/messages/pet_messages.h
index 7e39056742..f7d9c301a6 100644
--- a/engines/titanic/messages/pet_messages.h
+++ b/engines/titanic/messages/pet_messages.h
@@ -42,18 +42,16 @@ MESSAGE1(CPETStarFieldLockMsg, int, value, 0);
MESSAGE0(CPETStereoFieldOnOffMsg);
MESSAGE2(CPETTargetMsg, CString, name, "", int, numValue, -1);
-#define PET_MESSAGE(NAME) MSGTARGET(NAME); \
+#define PET_MESSAGE(NAME) \
class NAME: public CPETTargetMsg { \
public: \
NAME() : CPETTargetMsg() {} \
NAME(const CString &name, int num) : CPETTargetMsg(name, num) {} \
CLASSDEF \
static bool isSupportedBy(const CTreeItem *item) { \
- return dynamic_cast<const NAME##Target *>(item) != nullptr; } \
- virtual bool perform(CTreeItem *treeItem) { \
- NAME##Target *dest = dynamic_cast<NAME##Target *>(treeItem); \
- return dest != nullptr && dest->handleMessage(*this); \
- } }
+ return supports(item, _type); \
+ } \
+}
PET_MESSAGE(CPETDownMsg);
PET_MESSAGE(CPETUpMsg);