From 9258d171aa5dfdb42b46fc12a172f3d2b0935d31 Mon Sep 17 00:00:00 2001 From: Ming Date: Fri, 3 Sep 2010 03:09:47 +0000 Subject: [PATCH] issue #119 --- cocos2dx/include/selector_protocol.h | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/cocos2dx/include/selector_protocol.h b/cocos2dx/include/selector_protocol.h index 8da5df23c4..5d29323f66 100644 --- a/cocos2dx/include/selector_protocol.h +++ b/cocos2dx/include/selector_protocol.h @@ -55,11 +55,17 @@ typedef void (SelectorProtocol::*SEL_CallFuncN)(CCNode*); typedef void (SelectorProtocol::*SEL_CallFuncND)(CCNode*, void*); typedef void (SelectorProtocol::*SEL_MunuHandler)(NSObject*); -#define schedule_selector(_SELECTOR) (SEL_SCHEDULE)(*((SEL_SCHEDULE*)(&(&_SELECTOR))) ) -#define callfunc_selector(_SELECTOR) (SEL_CallFunc)(*((SEL_CallFunc*)(&(&_SELECTOR))) ) -#define callfuncN_selector(_SELECTOR) (SEL_CallFuncN)(*((SEL_CallFuncN*)(&(&_SELECTOR))) ) -#define callfuncND_selector(_SELECTOR) (SEL_CallFuncND)(*((SEL_CallFuncND*)(&(&_SELECTOR))) ) -#define menu_selector(_SELECTOR) (SEL_MunuHandler)(*((SEL_MunuHandler*)(&(&_SELECTOR))) ) +// #define schedule_selector(_SELECTOR) (SEL_SCHEDULE)(*((SEL_SCHEDULE*)(&(&_SELECTOR))) ) +// #define callfunc_selector(_SELECTOR) (SEL_CallFunc)(*((SEL_CallFunc*)(&(&_SELECTOR))) ) +// #define callfuncN_selector(_SELECTOR) (SEL_CallFuncN)(*((SEL_CallFuncN*)(&(&_SELECTOR))) ) +// #define callfuncND_selector(_SELECTOR) (SEL_CallFuncND)(*((SEL_CallFuncND*)(&(&_SELECTOR))) ) +// #define menu_selector(_SELECTOR) (SEL_MunuHandler)(*((SEL_MunuHandler*)(&(&_SELECTOR))) + + #define schedule_selector(_SELECTOR) (SEL_SCHEDULE)(&_SELECTOR) + #define callfunc_selector(_SELECTOR) (SEL_CallFunc)(&_SELECTOR) + #define callfuncN_selector(_SELECTOR) (SEL_CallFuncN)(&_SELECTOR) + #define callfuncND_selector(_SELECTOR) (SEL_CallFuncND)(&_SELECTOR) + #define menu_selector(_SELECTOR) (SEL_MunuHandler)(&_SELECTOR) }//namespace cocos2d #endif // __COCOA_SELECTOR_PROTOCOL_H__