diff options
author | Paul Gilbert | 2016-04-06 23:28:42 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-04-06 23:28:42 -0400 |
commit | 51dc36a9a52f95815b4b1109b080d070247bf247 (patch) | |
tree | d53d8c288a593fd897536f943debbd2d7b46275e /engines/titanic/messages/pet_messages.h | |
parent | 51df4d98d3a066e092f34cf7968c436a3e430df2 (diff) | |
download | scummvm-rg350-51dc36a9a52f95815b4b1109b080d070247bf247.tar.gz scummvm-rg350-51dc36a9a52f95815b4b1109b080d070247bf247.tar.bz2 scummvm-rg350-51dc36a9a52f95815b4b1109b080d070247bf247.zip |
TITANIC: Furhter in-progress message handling conversion
Diffstat (limited to 'engines/titanic/messages/pet_messages.h')
-rw-r--r-- | engines/titanic/messages/pet_messages.h | 10 |
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); |