From 487b252a82a5107b5c922df2037c463423fda9d5 Mon Sep 17 00:00:00 2001 From: folecr Date: Mon, 27 Aug 2012 08:43:34 -0700 Subject: [PATCH] Remove macros --- .../layers_scenes_transitions_nodes/CCLayer.h | 75 ------------------- 1 file changed, 75 deletions(-) diff --git a/cocos2dx/layers_scenes_transitions_nodes/CCLayer.h b/cocos2dx/layers_scenes_transitions_nodes/CCLayer.h index 756c448fd9..4e07194dcd 100644 --- a/cocos2dx/layers_scenes_transitions_nodes/CCLayer.h +++ b/cocos2dx/layers_scenes_transitions_nodes/CCLayer.h @@ -136,81 +136,6 @@ private: int excuteScriptTouchHandler(int nEventType, CCSet *pTouches); }; - -// for the subclass of CCLayer, each has to implement the static "node" method -// @deprecated: This interface will be deprecated sooner or later. -#define LAYER_NODE_FUNC(layer) \ - CC_DEPRECATED_ATTRIBUTE static layer* node() \ - { \ - layer *pRet = new layer(); \ - if (pRet && pRet->init()) \ - { \ - pRet->autorelease(); \ - return pRet; \ - } \ - else \ - { \ - delete pRet; \ - pRet = NULL; \ - return NULL; \ - } \ -} - - -// for the subclass of CCLayer, each has to implement the static "create" method -#define LAYER_CREATE_FUNC(layer) \ - static layer* create() \ - { \ - layer *pRet = new layer(); \ - if (pRet && pRet->init()) \ - { \ - pRet->autorelease(); \ - return pRet; \ - } \ - else \ - { \ - delete pRet; \ - pRet = NULL; \ - return NULL; \ - } \ -} - -// @deprecated: This interface will be deprecated sooner or later. -#define LAYER_NODE_FUNC_PARAM(layer,__PARAMTYPE__,__PARAM__) \ - CC_DEPRECATED_ATTRIBUTE static layer* node(__PARAMTYPE__ __PARAM__) \ - { \ - layer *pRet = new layer(); \ - if (pRet && pRet->init(__PARAM__)) \ - { \ - pRet->autorelease(); \ - return pRet; \ - } \ - else \ - { \ - delete pRet; \ - pRet = NULL; \ - return NULL; \ - } \ - } - - -#define LAYER_CREATE_FUNC_PARAM(layer,__PARAMTYPE__,__PARAM__) \ - static layer* create(__PARAMTYPE__ __PARAM__) \ - { \ - layer *pRet = new layer(); \ - if (pRet && pRet->init(__PARAM__)) \ - { \ - pRet->autorelease(); \ - return pRet; \ - } \ - else \ - { \ - delete pRet; \ - pRet = NULL; \ - return NULL; \ - } \ - } - // // CCLayerColor //