mirror of https://github.com/axmolengine/axmol.git
Remove macros
This commit is contained in:
parent
e757d55a29
commit
487b252a82
|
@ -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
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue