issue #1324: Reverted old interfaces.

This commit is contained in:
James Chen 2012-06-14 17:18:05 +08:00
parent 23574172ff
commit 7fe3f7357e
101 changed files with 1317 additions and 2289 deletions

View File

@ -48,12 +48,10 @@ CCAction::~CCAction()
CCLOGINFO("cocos2d: deallocing");
}
//cjh CCAction * CCAction::action()
// {
// CCAction * pRet = new CCAction();
// pRet->autorelease();
// return pRet;
// }
CCAction * CCAction::action()
{
return CCAction::create();
}
CCAction* CCAction::create()
{
@ -131,17 +129,10 @@ CCSpeed::~CCSpeed()
CC_SAFE_RELEASE(m_pInnerAction);
}
//cjh CCSpeed * CCSpeed::actionWithAction(CCActionInterval *pAction, float fSpeed)
// {
// CCSpeed *pRet = new CCSpeed();
// if (pRet && pRet->initWithAction(pAction, fSpeed))
// {
// pRet->autorelease();
// return pRet;
// }
// CC_SAFE_DELETE(pRet);
// return NULL;
// }
CCSpeed * CCSpeed::actionWithAction(CCActionInterval *pAction, float fSpeed)
{
return CCSpeed::create(pAction, fSpeed);
}
CCSpeed* CCSpeed::create(CCActionInterval* pAction, float fSpeed)
{
@ -230,17 +221,10 @@ CCFollow::~CCFollow()
CC_SAFE_RELEASE(m_pobFollowedNode);
}
//cjh CCFollow *CCFollow::actionWithTarget(CCNode *pFollowedNode, const CCRect& rect/* = CCRectZero*/)
// {
// CCFollow *pRet = new CCFollow();
// if (pRet && pRet->initWithTarget(pFollowedNode, rect))
// {
// pRet->autorelease();
// return pRet;
// }
// CC_SAFE_DELETE(pRet);
// return NULL;
// }
CCFollow *CCFollow::actionWithTarget(CCNode *pFollowedNode, const CCRect& rect/* = CCRectZero*/)
{
return CCFollow::create(pFollowedNode, rect);
}
CCFollow* CCFollow::create(CCNode *pFollowedNode, const CCRect& rect/* = CCRectZero*/)
{

View File

@ -94,7 +94,7 @@ public:
/** Allocates and initializes the action
@warning: This interface will be deprecated in future.
*/
//static CCAction* action();
static CCAction* action();
/** Create an action */
static CCAction* create();
@ -181,7 +181,7 @@ public:
/** creates the action
@warning: This interface will be deprecated in future.
*/
//static CCSpeed* actionWithAction(CCActionInterval *pAction, float fSpeed);
static CCSpeed* actionWithAction(CCActionInterval *pAction, float fSpeed);
/** create the action */
static CCSpeed* create(CCActionInterval* pAction, float fSpeed);
@ -230,7 +230,7 @@ public:
It will work with no boundary if @param rect is equal to CCRectZero.
@warning: This interface will be deprecated in future.
*/
//static CCFollow* actionWithTarget(CCNode *pFollowedNode, const CCRect& rect = CCRectZero);
static CCFollow* actionWithTarget(CCNode *pFollowedNode, const CCRect& rect = CCRectZero);
/** creates the action with a set boundary,
It will work with no boundary if @param rect is equal to CCRectZero.
*/

View File

@ -50,17 +50,10 @@ CCActionInterval * CCActionCamera::reverse()
//
// CCOrbitCamera
//
//cjh CCOrbitCamera * CCOrbitCamera::actionWithDuration(float t, float radius, float deltaRadius, float angleZ, float deltaAngleZ, float angleX, float deltaAngleX)
// {
// CCOrbitCamera * pRet = new CCOrbitCamera();
// if(pRet->initWithDuration(t, radius, deltaRadius, angleZ, deltaAngleZ, angleX, deltaAngleX))
// {
// pRet->autorelease();
// return pRet;
// }
// CC_SAFE_DELETE(pRet);
// return NULL;
// }
CCOrbitCamera * CCOrbitCamera::actionWithDuration(float t, float radius, float deltaRadius, float angleZ, float deltaAngleZ, float angleX, float deltaAngleX)
{
return CCOrbitCamera::create(t, radius, deltaRadius, angleZ, deltaAngleZ, angleX, deltaAngleX);
}
CCOrbitCamera * CCOrbitCamera::create(float t, float radius, float deltaRadius, float angleZ, float deltaAngleZ, float angleX, float deltaAngleX)
{

View File

@ -90,7 +90,7 @@ public:
/** creates a CCOrbitCamera action with radius, delta-radius, z, deltaZ, x, deltaX
@warning: This interface will be deprecated in future.
*/
//static CCOrbitCamera* actionWithDuration(float t, float radius, float deltaRadius, float angleZ, float deltaAngleZ, float angleX, float deltaAngleX);
static CCOrbitCamera* actionWithDuration(float t, float radius, float deltaRadius, float angleZ, float deltaAngleZ, float angleX, float deltaAngleX);
/** creates a CCOrbitCamera action with radius, delta-radius, z, deltaZ, x, deltaX */
static CCOrbitCamera* create(float t, float radius, float deltaRadius, float angleZ, float deltaAngleZ, float angleX, float deltaAngleX);

View File

@ -44,24 +44,10 @@ NS_CC_BEGIN;
/*
* Implementation of CCPointArray
*/
//cjh CCPointArray* CCPointArray::arrayWithCapacity(unsigned int capacity)
// {
// CCPointArray* ret = new CCPointArray();
// if (ret)
// {
// if (ret->initWithCapacity(capacity))
// {
// ret->autorelease();
// }
// else
// {
// delete ret;
// ret = NULL;
// }
// }
//
// return ret;
// }
CCPointArray* CCPointArray::arrayWithCapacity(unsigned int capacity)
{
return CCPointArray::create(capacity);
}
CCPointArray* CCPointArray::create(unsigned int capacity)
{
@ -213,23 +199,10 @@ CCPoint ccCardinalSplineAt(CCPoint &p0, CCPoint &p1, CCPoint &p2, CCPoint &p3, f
/* Implementation of CCCardinalSplineTo
*/
//cjh CCCardinalSplineTo* CCCardinalSplineTo::actionWithDuration(float duration, cocos2d::CCPointArray *points, float tension)
// {
// CCCardinalSplineTo *ret = new CCCardinalSplineTo();
// if (ret)
// {
// if (ret->initWithDuration(duration, points, tension))
// {
// ret->autorelease();
// }
// else
// {
// CC_SAFE_RELEASE_NULL(ret);
// }
// }
//
// return ret;
// }
CCCardinalSplineTo* CCCardinalSplineTo::actionWithDuration(float duration, cocos2d::CCPointArray *points, float tension)
{
return CCCardinalSplineTo::create(duration, points, tension);
}
CCCardinalSplineTo* CCCardinalSplineTo::create(float duration, cocos2d::CCPointArray *points, float tension)
{
@ -348,23 +321,10 @@ CCActionInterval* CCCardinalSplineTo::reverse()
/* CCCardinalSplineBy
*/
//cjh CCCardinalSplineBy* CCCardinalSplineBy::actionWithDuration(float duration, cocos2d::CCPointArray *points, float tension)
// {
// CCCardinalSplineBy *ret = new CCCardinalSplineBy();
// if (ret)
// {
// if (ret->initWithDuration(duration, points, tension))
// {
// ret->autorelease();
// }
// else
// {
// CC_SAFE_RELEASE_NULL(ret);
// }
// }
//
// return ret;
// }
CCCardinalSplineBy* CCCardinalSplineBy::actionWithDuration(float duration, cocos2d::CCPointArray *points, float tension)
{
return CCCardinalSplineBy::create(duration, points, tension);
}
CCCardinalSplineBy* CCCardinalSplineBy::create(float duration, cocos2d::CCPointArray *points, float tension)
{

View File

@ -52,7 +52,7 @@ public:
/** creates and initializes a Points array with capacity
@warning: This interface will be deprecated in future.
*/
//static CCPointArray* arrayWithCapacity(unsigned int capacity);
static CCPointArray* arrayWithCapacity(unsigned int capacity);
/** creates and initializes a Points array with capacity */
static CCPointArray* create(unsigned int capacity);
@ -110,7 +110,7 @@ public:
/** creates an action with a Cardinal Spline array of points and tension
@warning: This interface will be deprecated in future.
*/
//static CCCardinalSplineTo* actionWithDuration(float duration, CCPointArray* points, float tension);
static CCCardinalSplineTo* actionWithDuration(float duration, CCPointArray* points, float tension);
/** creates an action with a Cardinal Spline array of points and tension */
static CCCardinalSplineTo* create(float duration, CCPointArray* points, float tension);
@ -153,7 +153,7 @@ public:
/** creates an action with a Cardinal Spline array of points and tension
@warning: This interface will be deprecated in future.
*/
//static CCCardinalSplineBy* actionWithDuration(float duration, CCPointArray* points, float tension);
static CCCardinalSplineBy* actionWithDuration(float duration, CCPointArray* points, float tension);
/** creates an action with a Cardinal Spline array of points and tension */
static CCCardinalSplineBy* create(float duration, CCPointArray* points, float tension);
@ -177,7 +177,7 @@ public:
/** creates an action with a Cardinal Spline array of points and tension
@warning: This interface will be deprecated in future.
*/
//static CCCatmullRomTo* actionWithDuration(float dt, CCPointArray* points);
static CCCatmullRomTo* actionWithDuration(float dt, CCPointArray* points);
/** creates an action with a Cardinal Spline array of points and tension */
static CCCatmullRomTo* create(float dt, CCPointArray* points);
@ -196,7 +196,7 @@ public:
/** creates an action with a Cardinal Spline array of points and tension
@warning: This interface will be deprecated in future.
*/
//static CCCatmullRomBy* actionWithDuration(float dt, CCPointArray* points);
static CCCatmullRomBy* actionWithDuration(float dt, CCPointArray* points);
/** creates an action with a Cardinal Spline array of points and tension */
static CCCatmullRomBy* create(float dt, CCPointArray* points);

View File

@ -42,23 +42,10 @@ NS_CC_BEGIN
//
// EaseAction
//
//cjh CCActionEase* CCActionEase::actionWithAction(CCActionInterval *pAction)
// {
// CCActionEase *pRet = new CCActionEase();
// if (pRet)
// {
// if (pRet->initWithAction(pAction))
// {
// pRet->autorelease();
// }
// else
// {
// CC_SAFE_RELEASE_NULL(pRet);
// }
// }
//
// return pRet;
// }
CCActionEase* CCActionEase::actionWithAction(CCActionInterval *pAction)
{
return CCActionEase::create(pAction);
}
CCActionEase* CCActionEase::create(CCActionInterval *pAction)
{
@ -146,23 +133,10 @@ CCActionInterval* CCActionEase::reverse(void)
//
// EaseRateAction
//
//cjh CCEaseRateAction* CCEaseRateAction::actionWithAction(CCActionInterval *pAction, float fRate)
// {
// CCEaseRateAction *pRet = new CCEaseRateAction();
// if (pRet)
// {
// if (pRet->initWithAction(pAction, fRate))
// {
// pRet->autorelease();
// }
// else
// {
// CC_SAFE_RELEASE_NULL(pRet);
// }
// }
//
// return pRet;
// }
CCEaseRateAction* CCEaseRateAction::actionWithAction(CCActionInterval *pAction, float fRate)
{
return CCEaseRateAction::create(pAction, fRate);
}
CCEaseRateAction* CCEaseRateAction::create(CCActionInterval *pAction, float fRate)
{
@ -226,23 +200,10 @@ CCActionInterval* CCEaseRateAction::reverse(void)
//
// EeseIn
//
//cjh CCEaseIn* CCEaseIn::actionWithAction(CCActionInterval *pAction, float fRate)
// {
// CCEaseIn *pRet = new CCEaseIn();
// if (pRet)
// {
// if (pRet->initWithAction(pAction, fRate))
// {
// pRet->autorelease();
// }
// else
// {
// CC_SAFE_RELEASE_NULL(pRet);
// }
// }
//
// return pRet;
// }
CCEaseIn* CCEaseIn::actionWithAction(CCActionInterval *pAction, float fRate)
{
return CCEaseIn::create(pAction, fRate);
}
CCEaseIn* CCEaseIn::create(CCActionInterval *pAction, float fRate)
{
@ -296,23 +257,10 @@ CCActionInterval* CCEaseIn::reverse(void)
//
// EaseOut
//
//cjh CCEaseOut* CCEaseOut::actionWithAction(CCActionInterval *pAction, float fRate)
// {
// CCEaseOut *pRet = new CCEaseOut();
// if (pRet)
// {
// if (pRet->initWithAction(pAction, fRate))
// {
// pRet->autorelease();
// }
// else
// {
// CC_SAFE_RELEASE_NULL(pRet);
// }
// }
//
// return pRet;
// }
CCEaseOut* CCEaseOut::actionWithAction(CCActionInterval *pAction, float fRate)
{
return CCEaseOut::create(pAction, fRate);
}
CCEaseOut* CCEaseOut::create(CCActionInterval *pAction, float fRate)
{
@ -366,23 +314,10 @@ CCActionInterval* CCEaseOut::reverse()
//
// EaseInOut
//
//cjh CCEaseInOut* CCEaseInOut::actionWithAction(CCActionInterval *pAction, float fRate)
// {
// CCEaseInOut *pRet = new CCEaseInOut();
// if (pRet)
// {
// if (pRet->initWithAction(pAction, fRate))
// {
// pRet->autorelease();
// }
// else
// {
// CC_SAFE_RELEASE_NULL(pRet);
// }
// }
//
// return pRet;
// }
CCEaseInOut* CCEaseInOut::actionWithAction(CCActionInterval *pAction, float fRate)
{
return CCEaseInOut::create(pAction, fRate);
}
CCEaseInOut* CCEaseInOut::create(CCActionInterval *pAction, float fRate)
{
@ -445,23 +380,10 @@ CCActionInterval* CCEaseInOut::reverse(void)
//
// EaseExponentialIn
//
//cjh CCEaseExponentialIn* CCEaseExponentialIn::actionWithAction(CCActionInterval* pAction)
// {
// CCEaseExponentialIn *pRet = new CCEaseExponentialIn();
// if (pRet)
// {
// if (pRet->initWithAction(pAction))
// {
// pRet->autorelease();
// }
// else
// {
// CC_SAFE_RELEASE_NULL(pRet);
// }
// }
//
// return pRet;
// }
CCEaseExponentialIn* CCEaseExponentialIn::actionWithAction(CCActionInterval* pAction)
{
return CCEaseExponentialIn::create(pAction);
}
CCEaseExponentialIn* CCEaseExponentialIn::create(CCActionInterval* pAction)
{
@ -515,23 +437,10 @@ CCActionInterval* CCEaseExponentialIn::reverse(void)
//
// EaseExponentialOut
//
//cjh CCEaseExponentialOut* CCEaseExponentialOut::actionWithAction(CCActionInterval* pAction)
// {
// CCEaseExponentialOut *pRet = new CCEaseExponentialOut();
// if (pRet)
// {
// if (pRet->initWithAction(pAction))
// {
// pRet->autorelease();
// }
// else
// {
// CC_SAFE_RELEASE_NULL(pRet);
// }
// }
//
// return pRet;
// }
CCEaseExponentialOut* CCEaseExponentialOut::actionWithAction(CCActionInterval* pAction)
{
return CCEaseExponentialOut::create(pAction);
}
CCEaseExponentialOut* CCEaseExponentialOut::create(CCActionInterval* pAction)
{
@ -585,23 +494,10 @@ CCActionInterval* CCEaseExponentialOut::reverse(void)
//
// EaseExponentialInOut
//
//cjh CCEaseExponentialInOut* CCEaseExponentialInOut::actionWithAction(CCActionInterval *pAction)
// {
// CCEaseExponentialInOut *pRet = new CCEaseExponentialInOut();
// if (pRet)
// {
// if (pRet->initWithAction(pAction))
// {
// pRet->autorelease();
// }
// else
// {
// CC_SAFE_RELEASE_NULL(pRet);
// }
// }
//
// return pRet;
// }
CCEaseExponentialInOut* CCEaseExponentialInOut::actionWithAction(CCActionInterval *pAction)
{
return CCEaseExponentialInOut::create(pAction);
}
CCEaseExponentialInOut* CCEaseExponentialInOut::create(CCActionInterval *pAction)
{
@ -665,23 +561,10 @@ CCActionInterval* CCEaseExponentialInOut::reverse()
//
// EaseSineIn
//
//cjh CCEaseSineIn* CCEaseSineIn::actionWithAction(CCActionInterval* pAction)
// {
// CCEaseSineIn *pRet = new CCEaseSineIn();
// if (pRet)
// {
// if (pRet->initWithAction(pAction))
// {
// pRet->autorelease();
// }
// else
// {
// CC_SAFE_RELEASE_NULL(pRet);
// }
// }
//
// return pRet;
// }
CCEaseSineIn* CCEaseSineIn::actionWithAction(CCActionInterval* pAction)
{
return CCEaseSineIn::create(pAction);
}
CCEaseSineIn* CCEaseSineIn::create(CCActionInterval* pAction)
{
@ -735,23 +618,10 @@ CCActionInterval* CCEaseSineIn::reverse(void)
//
// EaseSineOut
//
//cjh CCEaseSineOut* CCEaseSineOut::actionWithAction(CCActionInterval* pAction)
// {
// CCEaseSineOut *pRet = new CCEaseSineOut();
// if (pRet)
// {
// if (pRet->initWithAction(pAction))
// {
// pRet->autorelease();
// }
// else
// {
// CC_SAFE_RELEASE_NULL(pRet);
// }
// }
//
// return pRet;
// }
CCEaseSineOut* CCEaseSineOut::actionWithAction(CCActionInterval* pAction)
{
return CCEaseSineOut::create(pAction);
}
CCEaseSineOut* CCEaseSineOut::create(CCActionInterval* pAction)
{
@ -805,23 +675,10 @@ CCActionInterval* CCEaseSineOut::reverse(void)
//
// EaseSineInOut
//
//cjh CCEaseSineInOut* CCEaseSineInOut::actionWithAction(CCActionInterval* pAction)
// {
// CCEaseSineInOut *pRet = new CCEaseSineInOut();
// if (pRet)
// {
// if (pRet->initWithAction(pAction))
// {
// pRet->autorelease();
// }
// else
// {
// CC_SAFE_RELEASE_NULL(pRet);
// }
// }
//
// return pRet;
// }
CCEaseSineInOut* CCEaseSineInOut::actionWithAction(CCActionInterval* pAction)
{
return CCEaseSineInOut::create(pAction);
}
CCEaseSineInOut* CCEaseSineInOut::create(CCActionInterval* pAction)
{
@ -876,23 +733,10 @@ CCActionInterval* CCEaseSineInOut::reverse()
// EaseElastic
//
//cjh CCEaseElastic* CCEaseElastic::actionWithAction(CCActionInterval *pAction, float fPeriod/* = 0.3f*/)
// {
// CCEaseElastic *pRet = new CCEaseElastic();
// if (pRet)
// {
// if (pRet->initWithAction(pAction, fPeriod))
// {
// pRet->autorelease();
// }
// else
// {
// CC_SAFE_RELEASE_NULL(pRet);
// }
// }
//
// return pRet;
// }
CCEaseElastic* CCEaseElastic::actionWithAction(CCActionInterval *pAction, float fPeriod/* = 0.3f*/)
{
return CCEaseElastic::create(pAction, fPeriod);
}
CCEaseElastic* CCEaseElastic::create(CCActionInterval *pAction, float fPeriod/* = 0.3f*/)
{
@ -954,23 +798,10 @@ CCActionInterval* CCEaseElastic::reverse(void)
//
// EaseElasticIn
//
//cjh CCEaseElasticIn* CCEaseElasticIn::actionWithAction(CCActionInterval *pAction, float fPeriod/* = 0.3f*/)
// {
// CCEaseElasticIn *pRet = new CCEaseElasticIn();
// if (pRet)
// {
// if (pRet->initWithAction(pAction, fPeriod))
// {
// pRet->autorelease();
// }
// else
// {
// CC_SAFE_RELEASE_NULL(pRet);
// }
// }
//
// return pRet;
// }
CCEaseElasticIn* CCEaseElasticIn::actionWithAction(CCActionInterval *pAction, float fPeriod/* = 0.3f*/)
{
return CCEaseElasticIn::create(pAction, fPeriod);
}
CCEaseElasticIn* CCEaseElasticIn::create(CCActionInterval *pAction, float fPeriod/* = 0.3f*/)
{
@ -1037,23 +868,10 @@ CCActionInterval* CCEaseElasticIn::reverse(void)
// EaseElasticOut
//
//cjh CCEaseElasticOut* CCEaseElasticOut::actionWithAction(CCActionInterval *pAction, float fPeriod/* = 0.3f*/)
// {
// CCEaseElasticOut *pRet = new CCEaseElasticOut();
// if (pRet)
// {
// if (pRet->initWithAction(pAction, fPeriod))
// {
// pRet->autorelease();
// }
// else
// {
// CC_SAFE_RELEASE_NULL(pRet);
// }
// }
//
// return pRet;
// }
CCEaseElasticOut* CCEaseElasticOut::actionWithAction(CCActionInterval *pAction, float fPeriod/* = 0.3f*/)
{
return CCEaseElasticOut::create(pAction, fPeriod);
}
CCEaseElasticOut* CCEaseElasticOut::create(CCActionInterval *pAction, float fPeriod/* = 0.3f*/)
{
@ -1119,23 +937,10 @@ CCActionInterval* CCEaseElasticOut::reverse(void)
// EaseElasticInOut
//
//cjh CCEaseElasticInOut* CCEaseElasticInOut::actionWithAction(CCActionInterval *pAction, float fPeriod/* = 0.3f*/)
// {
// CCEaseElasticInOut *pRet = new CCEaseElasticInOut();
// if (pRet)
// {
// if (pRet->initWithAction(pAction, fPeriod))
// {
// pRet->autorelease();
// }
// else
// {
// CC_SAFE_RELEASE_NULL(pRet);
// }
// }
//
// return pRet;
// }
CCEaseElasticInOut* CCEaseElasticInOut::actionWithAction(CCActionInterval *pAction, float fPeriod/* = 0.3f*/)
{
return CCEaseElasticInOut::create(pAction, fPeriod);
}
CCEaseElasticInOut* CCEaseElasticInOut::create(CCActionInterval *pAction, float fPeriod/* = 0.3f*/)
{
@ -1216,23 +1021,10 @@ CCActionInterval* CCEaseElasticInOut::reverse(void)
//
// EaseBounce
//
//cjh CCEaseBounce* CCEaseBounce::actionWithAction(CCActionInterval* pAction)
// {
// CCEaseBounce *pRet = new CCEaseBounce();
// if (pRet)
// {
// if (pRet->initWithAction(pAction))
// {
// pRet->autorelease();
// }
// else
// {
// CC_SAFE_RELEASE_NULL(pRet);
// }
// }
//
// return pRet;
// }
CCEaseBounce* CCEaseBounce::actionWithAction(CCActionInterval* pAction)
{
return CCEaseBounce::create(pAction);
}
CCEaseBounce* CCEaseBounce::create(CCActionInterval* pAction)
{
@ -1302,23 +1094,10 @@ CCActionInterval* CCEaseBounce::reverse()
//
// EaseBounceIn
//
//cjh CCEaseBounceIn* CCEaseBounceIn::actionWithAction(CCActionInterval* pAction)
// {
// CCEaseBounceIn *pRet = new CCEaseBounceIn();
// if (pRet)
// {
// if (pRet->initWithAction(pAction))
// {
// pRet->autorelease();
// }
// else
// {
// CC_SAFE_RELEASE_NULL(pRet);
// }
// }
//
// return pRet;
// }
CCEaseBounceIn* CCEaseBounceIn::actionWithAction(CCActionInterval* pAction)
{
return CCEaseBounceIn::create(pAction);
}
CCEaseBounceIn* CCEaseBounceIn::create(CCActionInterval* pAction)
{
@ -1373,23 +1152,10 @@ CCActionInterval* CCEaseBounceIn::reverse(void)
//
// EaseBounceOut
//
//cjh CCEaseBounceOut* CCEaseBounceOut::actionWithAction(CCActionInterval* pAction)
// {
// CCEaseBounceOut *pRet = new CCEaseBounceOut();
// if (pRet)
// {
// if (pRet->initWithAction(pAction))
// {
// pRet->autorelease();
// }
// else
// {
// CC_SAFE_RELEASE_NULL(pRet);
// }
// }
//
// return pRet;
// }
CCEaseBounceOut* CCEaseBounceOut::actionWithAction(CCActionInterval* pAction)
{
return CCEaseBounceOut::create(pAction);
}
CCEaseBounceOut* CCEaseBounceOut::create(CCActionInterval* pAction)
{
@ -1444,23 +1210,10 @@ CCActionInterval* CCEaseBounceOut::reverse(void)
//
// EaseBounceInOut
//
//cjh CCEaseBounceInOut* CCEaseBounceInOut::actionWithAction(CCActionInterval* pAction)
// {
// CCEaseBounceInOut *pRet = new CCEaseBounceInOut();
// if (pRet)
// {
// if (pRet->initWithAction(pAction))
// {
// pRet->autorelease();
// }
// else
// {
// CC_SAFE_RELEASE_NULL(pRet);
// }
// }
//
// return pRet;
// }
CCEaseBounceInOut* CCEaseBounceInOut::actionWithAction(CCActionInterval* pAction)
{
return CCEaseBounceInOut::create(pAction);
}
CCEaseBounceInOut* CCEaseBounceInOut::create(CCActionInterval* pAction)
{
@ -1525,23 +1278,10 @@ CCActionInterval* CCEaseBounceInOut::reverse()
//
// EaseBackIn
//
//cjh CCEaseBackIn* CCEaseBackIn::actionWithAction(CCActionInterval *pAction)
// {
// CCEaseBackIn *pRet = new CCEaseBackIn();
// if (pRet)
// {
// if (pRet->initWithAction(pAction))
// {
// pRet->autorelease();
// }
// else
// {
// CC_SAFE_RELEASE_NULL(pRet);
// }
// }
//
// return pRet;
// }
CCEaseBackIn* CCEaseBackIn::actionWithAction(CCActionInterval *pAction)
{
return CCEaseBackIn::create(pAction);
}
CCEaseBackIn* CCEaseBackIn::create(CCActionInterval *pAction)
{
@ -1596,23 +1336,10 @@ CCActionInterval* CCEaseBackIn::reverse(void)
//
// EaseBackOut
//
//cjh CCEaseBackOut* CCEaseBackOut::actionWithAction(CCActionInterval* pAction)
// {
// CCEaseBackOut *pRet = new CCEaseBackOut();
// if (pRet)
// {
// if (pRet->initWithAction(pAction))
// {
// pRet->autorelease();
// }
// else
// {
// CC_SAFE_RELEASE_NULL(pRet);
// }
// }
//
// return pRet;
// }
CCEaseBackOut* CCEaseBackOut::actionWithAction(CCActionInterval* pAction)
{
return CCEaseBackOut::create(pAction);
}
CCEaseBackOut* CCEaseBackOut::create(CCActionInterval* pAction)
{
@ -1669,23 +1396,10 @@ CCActionInterval* CCEaseBackOut::reverse(void)
//
// EaseBackInOut
//
//cjh CCEaseBackInOut* CCEaseBackInOut::actionWithAction(CCActionInterval* pAction)
// {
// CCEaseBackInOut *pRet = new CCEaseBackInOut();
// if (pRet)
// {
// if (pRet->initWithAction(pAction))
// {
// pRet->autorelease();
// }
// else
// {
// CC_SAFE_RELEASE_NULL(pRet);
// }
// }
//
// return pRet;
// }
CCEaseBackInOut* CCEaseBackInOut::actionWithAction(CCActionInterval* pAction)
{
return CCEaseBackInOut::create(pAction);
}
CCEaseBackInOut* CCEaseBackInOut::create(CCActionInterval* pAction)
{

View File

@ -54,7 +54,7 @@ public:
/** creates the action
@warning: This interface will be deprecated in future.
*/
//static CCActionEase* actionWithAction(CCActionInterval *pAction);
static CCActionEase* actionWithAction(CCActionInterval *pAction);
/** creates the action */
static CCActionEase* create(CCActionInterval *pAction);
@ -86,7 +86,7 @@ public:
/** Creates the action with the inner action and the rate parameter
@warning: This interface will be deprecated in future.
*/
//static CCEaseRateAction* actionWithAction(CCActionInterval* pAction, float fRate);
static CCEaseRateAction* actionWithAction(CCActionInterval* pAction, float fRate);
/** Creates the action with the inner action and the rate parameter */
static CCEaseRateAction* create(CCActionInterval* pAction, float fRate);
@ -108,7 +108,7 @@ public:
/** Creates the action with the inner action and the rate parameter
@warning: This interface will be deprecated in future.
*/
//static CCEaseIn* actionWithAction(CCActionInterval* pAction, float fRate);
static CCEaseIn* actionWithAction(CCActionInterval* pAction, float fRate);
/** Creates the action with the inner action and the rate parameter */
static CCEaseIn* create(CCActionInterval* pAction, float fRate);
@ -128,7 +128,7 @@ public:
/** Creates the action with the inner action and the rate parameter
@warning: This interface will be deprecated in future.
*/
//static CCEaseOut* actionWithAction(CCActionInterval* pAction, float fRate);
static CCEaseOut* actionWithAction(CCActionInterval* pAction, float fRate);
/** Creates the action with the inner action and the rate parameter */
static CCEaseOut* create(CCActionInterval* pAction, float fRate);
@ -148,7 +148,7 @@ public:
/** Creates the action with the inner action and the rate parameter
@warning: This interface will be deprecated in future.
*/
//static CCEaseInOut* actionWithAction(CCActionInterval* pAction, float fRate);
static CCEaseInOut* actionWithAction(CCActionInterval* pAction, float fRate);
/** Creates the action with the inner action and the rate parameter */
static CCEaseInOut* create(CCActionInterval* pAction, float fRate);
@ -168,7 +168,7 @@ public:
/** creates the action
@warning: This interface will be deprecated in future.
*/
//static CCEaseExponentialIn* actionWithAction(CCActionInterval* pAction);
static CCEaseExponentialIn* actionWithAction(CCActionInterval* pAction);
/** creates the action */
static CCEaseExponentialIn* create(CCActionInterval* pAction);
};
@ -187,7 +187,7 @@ public:
/** creates the action
@warning: This interface will be deprecated in future.
*/
//static CCEaseExponentialOut* actionWithAction(CCActionInterval* pAction);
static CCEaseExponentialOut* actionWithAction(CCActionInterval* pAction);
/** creates the action */
static CCEaseExponentialOut* create(CCActionInterval* pAction);
};
@ -206,7 +206,7 @@ public:
/** creates the action
@warning: This interface will be deprecated in future.
*/
//static CCEaseExponentialInOut* actionWithAction(CCActionInterval* pAction);
static CCEaseExponentialInOut* actionWithAction(CCActionInterval* pAction);
/** creates the action */
static CCEaseExponentialInOut* create(CCActionInterval* pAction);
@ -226,7 +226,7 @@ public:
/** creates the action
@warning: This interface will be deprecated in future.
*/
//static CCEaseSineIn* actionWithAction(CCActionInterval* pAction);
static CCEaseSineIn* actionWithAction(CCActionInterval* pAction);
/** creates the action */
static CCEaseSineIn* create(CCActionInterval* pAction);
};
@ -245,7 +245,7 @@ public:
/** creates the action
@warning: This interface will be deprecated in future.
*/
//static CCEaseSineOut* actionWithAction(CCActionInterval* pAction);
static CCEaseSineOut* actionWithAction(CCActionInterval* pAction);
/** creates the action */
static CCEaseSineOut* create(CCActionInterval* pAction);
};
@ -264,7 +264,7 @@ public:
/** creates the action
@warning: This interface will be deprecated in future.
*/
//static CCEaseSineInOut* actionWithAction(CCActionInterval* pAction);
static CCEaseSineInOut* actionWithAction(CCActionInterval* pAction);
/** creates the action */
static CCEaseSineInOut* create(CCActionInterval* pAction);
};
@ -291,7 +291,7 @@ public:
/** Creates the action with the inner action and the period in radians (default is 0.3)
@warning: This interface will be deprecated in future.
*/
//static CCEaseElastic* actionWithAction(CCActionInterval *pAction, float fPeriod = 0.3f);
static CCEaseElastic* actionWithAction(CCActionInterval *pAction, float fPeriod = 0.3f);
/** Creates the action with the inner action and the period in radians (default is 0.3) */
static CCEaseElastic* create(CCActionInterval *pAction, float fPeriod = 0.3f);
protected:
@ -314,7 +314,7 @@ public:
/** Creates the action with the inner action and the period in radians (default is 0.3)
@warning: This interface will be deprecated in future.
*/
//static CCEaseElasticIn* actionWithAction(CCActionInterval *pAction, float fPeriod = 0.3f);
static CCEaseElasticIn* actionWithAction(CCActionInterval *pAction, float fPeriod = 0.3f);
/** Creates the action with the inner action and the period in radians (default is 0.3) */
static CCEaseElasticIn* create(CCActionInterval *pAction, float fPeriod = 0.3f);
};
@ -335,7 +335,7 @@ public:
/** Creates the action with the inner action and the period in radians (default is 0.3)
@warning: This interface will be deprecated in future.
*/
//static CCEaseElasticOut* actionWithAction(CCActionInterval *pAction, float fPeriod = 0.3f);
static CCEaseElasticOut* actionWithAction(CCActionInterval *pAction, float fPeriod = 0.3f);
/** Creates the action with the inner action and the period in radians (default is 0.3) */
static CCEaseElasticOut* create(CCActionInterval *pAction, float fPeriod = 0.3f);
@ -357,7 +357,7 @@ public:
/** Creates the action with the inner action and the period in radians (default is 0.3)
@warning: This interface will be deprecated in future.
*/
//static CCEaseElasticInOut* actionWithAction(CCActionInterval *pAction, float fPeriod = 0.3f);
static CCEaseElasticInOut* actionWithAction(CCActionInterval *pAction, float fPeriod = 0.3f);
/** Creates the action with the inner action and the period in radians (default is 0.3) */
static CCEaseElasticInOut* create(CCActionInterval *pAction, float fPeriod = 0.3f);
@ -378,7 +378,7 @@ public:
/** creates the action
@warning: This interface will be deprecated in future.
*/
//static CCEaseBounce* actionWithAction(CCActionInterval* pAction);
static CCEaseBounce* actionWithAction(CCActionInterval* pAction);
/** creates the action */
static CCEaseBounce* create(CCActionInterval* pAction);
};
@ -399,7 +399,7 @@ public:
/** creates the action
@warning: This interface will be deprecated in future.
*/
//static CCEaseBounceIn* actionWithAction(CCActionInterval* pAction);
static CCEaseBounceIn* actionWithAction(CCActionInterval* pAction);
/** creates the action */
static CCEaseBounceIn* create(CCActionInterval* pAction);
};
@ -420,7 +420,7 @@ public:
/** creates the action
@warning: This interface will be deprecated in future.
*/
//static CCEaseBounceOut* actionWithAction(CCActionInterval* pAction);
static CCEaseBounceOut* actionWithAction(CCActionInterval* pAction);
/** creates the action */
static CCEaseBounceOut* create(CCActionInterval* pAction);
};
@ -441,7 +441,7 @@ public:
/** creates the action
@warning: This interface will be deprecated in future.
*/
//static CCEaseBounceInOut* actionWithAction(CCActionInterval* pAction);
static CCEaseBounceInOut* actionWithAction(CCActionInterval* pAction);
/** creates the action */
static CCEaseBounceInOut* create(CCActionInterval* pAction);
};
@ -462,7 +462,7 @@ public:
/** creates the action
@warning: This interface will be deprecated in future.
*/
//static CCEaseBackIn* actionWithAction(CCActionInterval* pAction);
static CCEaseBackIn* actionWithAction(CCActionInterval* pAction);
/** creates the action */
static CCEaseBackIn* create(CCActionInterval* pAction);
};
@ -483,7 +483,7 @@ public:
/** creates the action
@warning: This interface will be deprecated in future.
*/
//static CCEaseBackOut* actionWithAction(CCActionInterval* pAction);
static CCEaseBackOut* actionWithAction(CCActionInterval* pAction);
/** creates the action */
static CCEaseBackOut* create(CCActionInterval* pAction);
};
@ -504,7 +504,7 @@ public:
/** creates the action
@warning: This interface will be deprecated in future.
*/
//static CCEaseBackInOut* actionWithAction(CCActionInterval* pAction);
static CCEaseBackInOut* actionWithAction(CCActionInterval* pAction);
/** creates the action */
static CCEaseBackInOut* create(CCActionInterval* pAction);
};

View File

@ -30,23 +30,10 @@ THE SOFTWARE.
NS_CC_BEGIN
// implementation of CCGridAction
// CCGridAction* CCGridAction::actionWithSize(const ccGridSize& gridSize, float duration)
// {
// CCGridAction *pAction = new CCGridAction();
// if (pAction)
// {
// if (pAction->initWithSize(gridSize, duration))
// {
// pAction->autorelease();
// }
// else
// {
// CC_SAFE_DELETE(pAction);
// }
// }
//
// return pAction;
// }
CCGridAction* CCGridAction::actionWithSize(const ccGridSize& gridSize, float duration)
{
return CCGridAction::create(gridSize, duration);
}
CCGridAction* CCGridAction::create(const ccGridSize& gridSize, float duration)
{
@ -199,23 +186,10 @@ void CCTiledGrid3DAction::setTile(const ccGridSize& pos, const ccQuad3& coords)
// implementation CCAccelDeccelAmplitude
// CCAccelDeccelAmplitude* CCAccelDeccelAmplitude::actionWithAction(CCAction *pAction, float duration)
// {
// CCAccelDeccelAmplitude *pRet = new CCAccelDeccelAmplitude();
// if (pRet)
// {
// if (pRet->initWithAction(pAction, duration))
// {
// pRet->autorelease();
// }
// else
// {
// CC_SAFE_DELETE(pRet);
// }
// }
//
// return pRet;
// }
CCAccelDeccelAmplitude* CCAccelDeccelAmplitude::actionWithAction(CCAction *pAction, float duration)
{
return CCAccelDeccelAmplitude::create(pAction, duration);
}
CCAccelDeccelAmplitude* CCAccelDeccelAmplitude::create(CCAction *pAction, float duration)
{
@ -280,23 +254,10 @@ CCActionInterval* CCAccelDeccelAmplitude::reverse(void)
// implementation of AccelAmplitude
// CCAccelAmplitude* CCAccelAmplitude::actionWithAction(CCAction *pAction, float duration)
// {
// CCAccelAmplitude *pRet = new CCAccelAmplitude();
// if (pRet)
// {
// if (pRet->initWithAction(pAction, duration))
// {
// pRet->autorelease();
// }
// else
// {
// CC_SAFE_DELETE(pRet);
// }
// }
//
// return pRet;
// }
CCAccelAmplitude* CCAccelAmplitude::actionWithAction(CCAction *pAction, float duration)
{
return CCAccelAmplitude::create(pAction, duration);
}
CCAccelAmplitude* CCAccelAmplitude::create(CCAction *pAction, float duration)
{
@ -354,23 +315,10 @@ CCActionInterval* CCAccelAmplitude::reverse(void)
// DeccelAmplitude
// CCDeccelAmplitude* CCDeccelAmplitude::actionWithAction(CCAction *pAction, float duration)
// {
// CCDeccelAmplitude *pRet = new CCDeccelAmplitude();
// if (pRet)
// {
// if (pRet->initWithAction(pAction, duration))
// {
// pRet->autorelease();
// }
// else
// {
// CC_SAFE_DELETE(pRet);
// }
// }
//
// return pRet;
// }
CCDeccelAmplitude* CCDeccelAmplitude::actionWithAction(CCAction *pAction, float duration)
{
return CCDeccelAmplitude::create(pAction, duration);
}
CCDeccelAmplitude* CCDeccelAmplitude::create(CCAction *pAction, float duration)
{
@ -440,13 +388,10 @@ void CCStopGrid::startWithTarget(CCNode *pTarget)
}
}
// CCStopGrid* CCStopGrid::action(void)
// {
// CCStopGrid* pAction = new CCStopGrid();
// pAction->autorelease();
//
// return pAction;
// }
CCStopGrid* CCStopGrid::action(void)
{
return CCStopGrid::create();
}
CCStopGrid* CCStopGrid::create(void)
{
@ -457,23 +402,10 @@ CCStopGrid* CCStopGrid::create(void)
}
// implementation of CCReuseGrid
// CCReuseGrid* CCReuseGrid::actionWithTimes(int times)
// {
// CCReuseGrid *pAction = new CCReuseGrid();
// if (pAction)
// {
// if (pAction->initWithTimes(times))
// {
// pAction->autorelease();
// }
// else
// {
// CC_SAFE_DELETE(pAction);
// }
// }
//
// return pAction;
// }
CCReuseGrid* CCReuseGrid::actionWithTimes(int times)
{
return CCReuseGrid::create(times);
}
CCReuseGrid* CCReuseGrid::create(int times)
{

View File

@ -49,7 +49,7 @@ public:
/** creates the action with size and duration
@warning: This interface will be deprecated in future.
*/
//static CCGridAction* actionWithSize(const ccGridSize& gridSize, float duration);
static CCGridAction* actionWithSize(const ccGridSize& gridSize, float duration);
/** creates the action with size and duration */
static CCGridAction* create(const ccGridSize& gridSize, float duration);
protected:
@ -76,7 +76,7 @@ public:
/** creates the action with size and duration
@warning: This interface will be deprecated in future.
*/
//static CCGrid3DAction* actionWithSize(const ccGridSize& gridSize, float duration);
static CCGrid3DAction* actionWithSize(const ccGridSize& gridSize, float duration);
/** creates the action with size and duration */
static CCGrid3DAction* create(const ccGridSize& gridSize, float duration);
};
@ -99,7 +99,7 @@ public:
/** creates the action with size and duration
@warning: This interface will be deprecated in future.
*/
//static CCTiledGrid3DAction* actionWithSize(const ccGridSize& gridSize, float duration);
static CCTiledGrid3DAction* actionWithSize(const ccGridSize& gridSize, float duration);
/** creates the action with size and duration */
static CCTiledGrid3DAction* create(const ccGridSize& gridSize, float duration);
};
@ -125,7 +125,7 @@ public:
/** creates the action with an inner action that has the amplitude property, and a duration time
@warning: This interface will be deprecated in future.
*/
//static CCAccelDeccelAmplitude* actionWithAction(CCAction *pAction, float duration);
static CCAccelDeccelAmplitude* actionWithAction(CCAction *pAction, float duration);
/** creates the action with an inner action that has the amplitude property, and a duration time */
static CCAccelDeccelAmplitude* create(CCAction *pAction, float duration);
@ -155,7 +155,7 @@ public:
/** creates the action with an inner action that has the amplitude property, and a duration time
@warning: This interface will be deprecated in future.
*/
//static CCAccelAmplitude* actionWithAction(CCAction *pAction, float duration);
static CCAccelAmplitude* actionWithAction(CCAction *pAction, float duration);
/** creates the action with an inner action that has the amplitude property, and a duration time */
static CCAccelAmplitude* create(CCAction *pAction, float duration);
protected:
@ -184,7 +184,7 @@ public:
/** creates the action with an inner action that has the amplitude property, and a duration time
@warning: This interface will be deprecated in future.
*/
//static CCDeccelAmplitude* actionWithAction(CCAction *pAction, float duration);
static CCDeccelAmplitude* actionWithAction(CCAction *pAction, float duration);
/** creates the action with an inner action that has the amplitude property, and a duration time */
static CCDeccelAmplitude* create(CCAction *pAction, float duration);
@ -207,7 +207,7 @@ public:
/** Allocates and initializes the action
@warning: This interface will be deprecated in future.
*/
//static CCStopGrid* action(void);
static CCStopGrid* action(void);
/** Allocates and initializes the action */
static CCStopGrid* create(void);
};
@ -225,7 +225,7 @@ public:
/** creates an action with the number of times that the current grid will be reused
@warning: This interface will be deprecated in future.
*/
//static CCReuseGrid* actionWithTimes(int times);
static CCReuseGrid* actionWithTimes(int times);
/** creates an action with the number of times that the current grid will be reused */
static CCReuseGrid* create(int times);
protected:

View File

@ -31,24 +31,10 @@ THE SOFTWARE.
NS_CC_BEGIN
// implementation of CCWaves3D
// CCWaves3D* CCWaves3D::actionWithWaves(int wav, float amp, const ccGridSize& gridSize, float duration)
// {
// CCWaves3D *pAction = new CCWaves3D();
//
// if (pAction)
// {
// if (pAction->initWithWaves(wav, amp, gridSize, duration))
// {
// pAction->autorelease();
// }
// else
// {
// CC_SAFE_RELEASE_NULL(pAction);
// }
// }
//
// return pAction;
// }
CCWaves3D* CCWaves3D::actionWithWaves(int wav, float amp, const ccGridSize& gridSize, float duration)
{
return CCWaves3D::create(wav, amp, gridSize, duration);
}
CCWaves3D* CCWaves3D::create(int wav, float amp, const ccGridSize& gridSize, float duration)
{
@ -124,24 +110,10 @@ void CCWaves3D::update(float time)
// implementation of CCFlipX3D
// CCFlipX3D* CCFlipX3D::actionWithDuration(float duration)
// {
// CCFlipX3D *pAction = new CCFlipX3D();
//
// if (pAction)
// {
// if (pAction->initWithSize(ccg(1, 1), duration))
// {
// pAction->autorelease();
// }
// else
// {
// CC_SAFE_RELEASE_NULL(pAction);
// }
// }
//
// return pAction;
// }
CCFlipX3D* CCFlipX3D::actionWithDuration(float duration)
{
return CCFlipX3D::create(duration);
}
CCFlipX3D* CCFlipX3D::create(float duration)
{
@ -269,24 +241,10 @@ void CCFlipX3D::update(float time)
// implementation of FlipY3D
// CCFlipY3D* CCFlipY3D::actionWithDuration(float duration)
// {
// CCFlipY3D *pAction = new CCFlipY3D();
//
// if (pAction)
// {
// if (pAction->initWithSize(ccg(1, 1), duration))
// {
// pAction->autorelease();
// }
// else
// {
// CC_SAFE_RELEASE_NULL(pAction);
// }
// }
//
// return pAction;
// }
CCFlipY3D* CCFlipY3D::actionWithDuration(float duration)
{
return CCFlipY3D::create(duration);
}
CCFlipY3D* CCFlipY3D::create(float duration)
{
@ -397,24 +355,10 @@ void CCFlipY3D::update(float time)
// implementation of Lens3D
// CCLens3D* CCLens3D::actionWithPosition(const CCPoint& pos, float r, const ccGridSize& gridSize, float duration)
// {
// CCLens3D *pAction = new CCLens3D();
//
// if (pAction)
// {
// if (pAction->initWithPosition(pos, r, gridSize, duration))
// {
// pAction->autorelease();
// }
// else
// {
// CC_SAFE_RELEASE_NULL(pAction);
// }
// }
//
// return pAction;
// }
CCLens3D* CCLens3D::actionWithPosition(const CCPoint& pos, float r, const ccGridSize& gridSize, float duration)
{
return CCLens3D::create(pos, r, gridSize, duration);
}
CCLens3D* CCLens3D::create(const CCPoint& pos, float r, const ccGridSize& gridSize, float duration)
{
@ -527,24 +471,10 @@ void CCLens3D::update(float time)
// implementation of Ripple3D
// CCRipple3D* CCRipple3D::actionWithPosition(const CCPoint& pos, float r, int wav, float amp, const ccGridSize& gridSize, float duration)
// {
// CCRipple3D *pAction = new CCRipple3D();
//
// if (pAction)
// {
// if (pAction->initWithPosition(pos, r, wav, amp, gridSize, duration))
// {
// pAction->autorelease();
// }
// else
// {
// CC_SAFE_RELEASE_NULL(pAction);
// }
// }
//
// return pAction;
// }
CCRipple3D* CCRipple3D::actionWithPosition(const CCPoint& pos, float r, int wav, float amp, const ccGridSize& gridSize, float duration)
{
return CCRipple3D::create(pos, r, wav, amp, gridSize, duration);
}
CCRipple3D* CCRipple3D::create(const CCPoint& pos, float r, int wav, float amp, const ccGridSize& gridSize, float duration)
{
@ -635,24 +565,10 @@ void CCRipple3D::update(float time)
// implementation of Shaky3D
// CCShaky3D* CCShaky3D::actionWithRange(int range, bool shakeZ, const ccGridSize& gridSize, float duration)
// {
// CCShaky3D *pAction = new CCShaky3D();
//
// if (pAction)
// {
// if (pAction->initWithRange(range, shakeZ, gridSize, duration))
// {
// pAction->autorelease();
// }
// else
// {
// CC_SAFE_RELEASE_NULL(pAction);
// }
// }
//
// return pAction;
// }
CCShaky3D* CCShaky3D::actionWithRange(int range, bool shakeZ, const ccGridSize& gridSize, float duration)
{
return CCShaky3D::create(range, shakeZ, gridSize, duration);
}
CCShaky3D* CCShaky3D::create(int range, bool shakeZ, const ccGridSize& gridSize, float duration)
{
@ -733,24 +649,10 @@ void CCShaky3D::update(float time)
// implementation of Liquid
// CCLiquid* CCLiquid::actionWithWaves(int wav, float amp, const ccGridSize& gridSize, float duration)
// {
// CCLiquid *pAction = new CCLiquid();
//
// if (pAction)
// {
// if (pAction->initWithWaves(wav, amp, gridSize, duration))
// {
// pAction->autorelease();
// }
// else
// {
// CC_SAFE_RELEASE_NULL(pAction);
// }
// }
//
// return pAction;
// }
CCLiquid* CCLiquid::actionWithWaves(int wav, float amp, const ccGridSize& gridSize, float duration)
{
return CCLiquid::create(wav, amp, gridSize, duration);
}
CCLiquid* CCLiquid::create(int wav, float amp, const ccGridSize& gridSize, float duration)
{
@ -826,24 +728,10 @@ void CCLiquid::update(float time)
// implementation of Waves
// CCWaves* CCWaves::actionWithWaves(int wav, float amp, bool h, bool v, const ccGridSize& gridSize, float duration)
// {
// CCWaves *pAction = new CCWaves();
//
// if (pAction)
// {
// if (pAction->initWithWaves(wav, amp, h, v, gridSize, duration))
// {
// pAction->autorelease();
// }
// else
// {
// CC_SAFE_RELEASE_NULL(pAction);
// }
// }
//
// return pAction;
// }
CCWaves* CCWaves::actionWithWaves(int wav, float amp, bool h, bool v, const ccGridSize& gridSize, float duration)
{
return CCWaves::create(wav, amp, h, v, gridSize, duration);
}
CCWaves* CCWaves::create(int wav, float amp, bool h, bool v, const ccGridSize& gridSize, float duration)
{
@ -930,24 +818,10 @@ void CCWaves::update(float time)
// implementation of Twirl
// CCTwirl* CCTwirl::actionWithPosition(CCPoint pos, int t, float amp, const ccGridSize& gridSize, float duration)
// {
// CCTwirl *pAction = new CCTwirl();
//
// if (pAction)
// {
// if (pAction->initWithPosition(pos, t, amp, gridSize, duration))
// {
// pAction->autorelease();
// }
// else
// {
// CC_SAFE_RELEASE_NULL(pAction);
// }
// }
//
// return pAction;
// }
CCTwirl* CCTwirl::actionWithPosition(CCPoint pos, int t, float amp, const ccGridSize& gridSize, float duration)
{
return CCTwirl::create(pos, t, amp, gridSize, duration);
}
CCTwirl* CCTwirl::create(CCPoint pos, int t, float amp, const ccGridSize& gridSize, float duration)
{

View File

@ -50,7 +50,7 @@ public:
/** create the action
@warning: This interface will be deprecated in future.
*/
//static CCWaves3D* actionWithWaves(int wav, float amp, const ccGridSize& gridSize, float duration);
static CCWaves3D* actionWithWaves(int wav, float amp, const ccGridSize& gridSize, float duration);
/** create the action */
static CCWaves3D* create(int wav, float amp, const ccGridSize& gridSize, float duration);
protected:
@ -73,7 +73,7 @@ public:
/** creates the action with duration
@warning: This interface will be deprecated in future.
*/
//static CCFlipX3D* actionWithDuration(float duration);
static CCFlipX3D* actionWithDuration(float duration);
/** creates the action with duration */
static CCFlipX3D* create(float duration);
};
@ -89,7 +89,7 @@ public:
/** creates the action with duration
@warning: This interface will be deprecated in future.
*/
//static CCFlipY3D* actionWithDuration(float duration);
static CCFlipY3D* actionWithDuration(float duration);
/** creates the action with duration */
static CCFlipY3D* create(float duration);
};
@ -115,7 +115,7 @@ public:
/** creates the action with center position, radius, a grid size and duration
@warning: This interface will be deprecated in future.
*/
//static CCLens3D* actionWithPosition(const CCPoint& pos, float r, const ccGridSize& gridSize, float duration);
static CCLens3D* actionWithPosition(const CCPoint& pos, float r, const ccGridSize& gridSize, float duration);
/** creates the action with center position, radius, a grid size and duration */
static CCLens3D* create(const CCPoint& pos, float r, const ccGridSize& gridSize, float duration);
protected:
@ -153,8 +153,8 @@ public:
/** creates the action with radius, number of waves, amplitude, a grid size and duration
@warning: This interface will be deprecated in future.
*/
//static CCRipple3D* actionWithPosition(const CCPoint& pos, float r, int wav, float amp,
// const ccGridSize& gridSize, float duration);
static CCRipple3D* actionWithPosition(const CCPoint& pos, float r, int wav, float amp,
const ccGridSize& gridSize, float duration);
/** creates the action with radius, number of waves, amplitude, a grid size and duration */
static CCRipple3D* create(const CCPoint& pos, float r, int wav, float amp,
const ccGridSize& gridSize, float duration);
@ -180,7 +180,7 @@ public:
/** creates the action with a range, shake Z vertices, a grid and duration
@warning: This interface will be deprecated in future.
*/
//static CCShaky3D* actionWithRange(int range, bool shakeZ, const ccGridSize& gridSize, float duration);
static CCShaky3D* actionWithRange(int range, bool shakeZ, const ccGridSize& gridSize, float duration);
/** creates the action with a range, shake Z vertices, a grid and duration */
static CCShaky3D* create(int range, bool shakeZ, const ccGridSize& gridSize, float duration);
protected:
@ -207,7 +207,7 @@ public:
/** creates the action with amplitude, a grid and duration
@warning: This interface will be deprecated in future.
*/
//static CCLiquid* actionWithWaves(int wav, float amp, const ccGridSize& gridSize, float duration);
static CCLiquid* actionWithWaves(int wav, float amp, const ccGridSize& gridSize, float duration);
/** creates the action with amplitude, a grid and duration */
static CCLiquid* create(int wav, float amp, const ccGridSize& gridSize, float duration);
protected:
@ -236,8 +236,8 @@ public:
/** initializes the action with amplitude, horizontal sin, vertical sin, a grid and duration
@warning: This interface will be deprecated in future.
*/
// static CCWaves* actionWithWaves(int wav, float amp, bool h, bool v, const ccGridSize& gridSize,
// float duration);
static CCWaves* actionWithWaves(int wav, float amp, bool h, bool v, const ccGridSize& gridSize,
float duration);
/** initializes the action with amplitude, horizontal sin, vertical sin, a grid and duration */
static CCWaves* create(int wav, float amp, bool h, bool v, const ccGridSize& gridSize,
@ -275,8 +275,8 @@ public:
/** creates the action with center position, number of twirls, amplitude, a grid size and duration
@warning: This interface will be deprecated in future.
*/
// static CCTwirl* actionWithPosition(CCPoint pos, int t, float amp, const ccGridSize& gridSize,
// float duration);
static CCTwirl* actionWithPosition(CCPoint pos, int t, float amp, const ccGridSize& gridSize,
float duration);
/** creates the action with center position, number of twirls, amplitude, a grid size and duration */
static CCTwirl* create(CCPoint pos, int t, float amp, const ccGridSize& gridSize,

View File

@ -1,5 +1,5 @@
/****************************************************************************
Copyright (c) 2010-2011 cocos2d-x.org
Copyright (c) 2010-2012 cocos2d-x.org
Copyright (c) 2008-2010 Ricardo Quesada
Copyright (c) 2011 Zynga Inc.
@ -73,17 +73,13 @@ CCFiniteTimeAction * CCActionInstant::reverse() {
//
// Show
//
// CCShow* CCShow::action() {
// CCShow* pRet = new CCShow();
//
// if (pRet) {
// pRet->autorelease();
// }
//
// return pRet;
// }
CCShow* CCShow::action()
{
return CCShow::create();
}
CCShow* CCShow::create() {
CCShow* CCShow::create()
{
CCShow* pRet = new CCShow();
if (pRet) {
@ -121,17 +117,13 @@ CCObject* CCShow::copyWithZone(CCZone *pZone) {
//
// Hide
//
// CCHide * CCHide::action() {
// CCHide *pRet = new CCHide();
//
// if (pRet) {
// pRet->autorelease();
// }
//
// return pRet;
// }
CCHide * CCHide::action()
{
return CCHide::create();
}
CCHide * CCHide::create() {
CCHide * CCHide::create()
{
CCHide *pRet = new CCHide();
if (pRet) {
@ -169,17 +161,10 @@ CCObject* CCHide::copyWithZone(CCZone *pZone) {
//
// ToggleVisibility
//
// CCToggleVisibility * CCToggleVisibility::action()
// {
// CCToggleVisibility *pRet = new CCToggleVisibility();
//
// if (pRet)
// {
// pRet->autorelease();
// }
//
// return pRet;
// }
CCToggleVisibility * CCToggleVisibility::action()
{
return CCToggleVisibility::create();
}
CCToggleVisibility * CCToggleVisibility::create()
{
@ -219,19 +204,13 @@ CCObject* CCToggleVisibility::copyWithZone(CCZone *pZone)
//
// FlipX
//
// CCFlipX *CCFlipX::actionWithFlipX(bool x) {
// CCFlipX *pRet = new CCFlipX();
//
// if (pRet && pRet->initWithFlipX(x)) {
// pRet->autorelease();
// return pRet;
// }
//
// CC_SAFE_DELETE(pRet);
// return NULL;
// }
CCFlipX *CCFlipX::actionWithFlipX(bool x)
{
return CCFlipX::create(x);
}
CCFlipX *CCFlipX::create(bool x) {
CCFlipX *CCFlipX::create(bool x)
{
CCFlipX *pRet = new CCFlipX();
if (pRet && pRet->initWithFlipX(x)) {
@ -277,19 +256,13 @@ CCObject * CCFlipX::copyWithZone(CCZone *pZone) {
//
// FlipY
//
// CCFlipY * CCFlipY::actionWithFlipY(bool y) {
// CCFlipY *pRet = new CCFlipY();
//
// if (pRet && pRet->initWithFlipY(y)) {
// pRet->autorelease();
// return pRet;
// }
//
// CC_SAFE_DELETE(pRet);
// return NULL;
// }
CCFlipY * CCFlipY::actionWithFlipY(bool y)
{
return CCFlipY::create(y);
}
CCFlipY * CCFlipY::create(bool y) {
CCFlipY * CCFlipY::create(bool y)
{
CCFlipY *pRet = new CCFlipY();
if (pRet && pRet->initWithFlipY(y)) {
@ -335,19 +308,13 @@ CCObject* CCFlipY::copyWithZone(CCZone *pZone) {
//
// Place
//
// CCPlace* CCPlace::actionWithPosition(const CCPoint& pos) {
// CCPlace *pRet = new CCPlace();
//
// if (pRet && pRet->initWithPosition(pos)) {
// pRet->autorelease();
// return pRet;
// }
//
// CC_SAFE_DELETE(pRet);
// return NULL;
// }
CCPlace* CCPlace::actionWithPosition(const CCPoint& pos)
{
return CCPlace::create(pos);
}
CCPlace* CCPlace::create(const CCPoint& pos) {
CCPlace* CCPlace::create(const CCPoint& pos)
{
CCPlace *pRet = new CCPlace();
if (pRet && pRet->initWithPosition(pos)) {
@ -390,22 +357,13 @@ void CCPlace::update(float time) {
// CallFunc
//
// CCCallFunc * CCCallFunc::actionWithTarget(CCObject* pSelectorTarget,
// SEL_CallFunc selector) {
// CCCallFunc *pRet = new CCCallFunc();
//
// if (pRet && pRet->initWithTarget(pSelectorTarget)) {
// pRet->m_pCallFunc = selector;
// pRet->autorelease();
// return pRet;
// }
//
// CC_SAFE_DELETE(pRet);
// return NULL;
// }
CCCallFunc * CCCallFunc::actionWithTarget(CCObject* pSelectorTarget, SEL_CallFunc selector)
{
return CCCallFunc::create(pSelectorTarget, selector);
}
CCCallFunc * CCCallFunc::create(CCObject* pSelectorTarget,
SEL_CallFunc selector) {
CCCallFunc * CCCallFunc::create(CCObject* pSelectorTarget, SEL_CallFunc selector)
{
CCCallFunc *pRet = new CCCallFunc();
if (pRet && pRet->initWithTarget(pSelectorTarget)) {
@ -472,24 +430,17 @@ void CCCallFuncN::execute() {
}
}
// CCCallFuncN * CCCallFuncN::actionWithTarget(CCObject* pSelectorTarget,
// SEL_CallFuncN selector) {
// CCCallFuncN *pRet = new CCCallFuncN();
//
// if (pRet && pRet->initWithTarget(pSelectorTarget, selector)) {
// pRet->autorelease();
// return pRet;
// }
//
// CC_SAFE_DELETE(pRet);
// return NULL;
// }
CCCallFuncN * CCCallFuncN::actionWithTarget(CCObject* pSelectorTarget, SEL_CallFuncN selector)
{
return CCCallFuncN::create(pSelectorTarget, selector);
}
CCCallFuncN * CCCallFuncN::create(CCObject* pSelectorTarget,
SEL_CallFuncN selector) {
CCCallFuncN * CCCallFuncN::create(CCObject* pSelectorTarget, SEL_CallFuncN selector)
{
CCCallFuncN *pRet = new CCCallFuncN();
if (pRet && pRet->initWithTarget(pSelectorTarget, selector)) {
if (pRet && pRet->initWithTarget(pSelectorTarget, selector))
{
pRet->autorelease();
return pRet;
}
@ -529,21 +480,13 @@ CCObject * CCCallFuncN::copyWithZone(CCZone* zone) {
//
// CallFuncND
//
// CCCallFuncND * CCCallFuncND::actionWithTarget(CCObject* pSelectorTarget,
// SEL_CallFuncND selector, void* d) {
// CCCallFuncND* pRet = new CCCallFuncND();
//
// if (pRet && pRet->initWithTarget(pSelectorTarget, selector, d)) {
// pRet->autorelease();
// return pRet;
// }
//
// CC_SAFE_DELETE(pRet);
// return NULL;
// }
CCCallFuncND * CCCallFuncND::actionWithTarget(CCObject* pSelectorTarget, SEL_CallFuncND selector, void* d)
{
return CCCallFuncND::create(pSelectorTarget, selector, d);
}
CCCallFuncND * CCCallFuncND::create(CCObject* pSelectorTarget,
SEL_CallFuncND selector, void* d) {
CCCallFuncND * CCCallFuncND::create(CCObject* pSelectorTarget, SEL_CallFuncND selector, void* d)
{
CCCallFuncND* pRet = new CCCallFuncND();
if (pRet && pRet->initWithTarget(pSelectorTarget, selector, d)) {
@ -607,21 +550,13 @@ void CCCallFuncO::execute() {
}
}
// CCCallFuncO * CCCallFuncO::actionWithTarget(CCObject* pSelectorTarget,
// SEL_CallFuncO selector, CCObject* pObject) {
// CCCallFuncO *pRet = new CCCallFuncO();
//
// if (pRet && pRet->initWithTarget(pSelectorTarget, selector, pObject)) {
// pRet->autorelease();
// return pRet;
// }
//
// CC_SAFE_DELETE(pRet);
// return NULL;
// }
CCCallFuncO * CCCallFuncO::actionWithTarget(CCObject* pSelectorTarget, SEL_CallFuncO selector, CCObject* pObject)
{
return CCCallFuncO::create(pSelectorTarget, selector, pObject);
}
CCCallFuncO * CCCallFuncO::create(CCObject* pSelectorTarget,
SEL_CallFuncO selector, CCObject* pObject) {
CCCallFuncO * CCCallFuncO::create(CCObject* pSelectorTarget, SEL_CallFuncO selector, CCObject* pObject)
{
CCCallFuncO *pRet = new CCCallFuncO();
if (pRet && pRet->initWithTarget(pSelectorTarget, selector, pObject)) {

View File

@ -1,5 +1,5 @@
/****************************************************************************
Copyright (c) 2010-2011 cocos2d-x.org
Copyright (c) 2010-2012 cocos2d-x.org
Copyright (c) 2008-2010 Ricardo Quesada
Copyright (c) 2011 Zynga Inc.
@ -66,7 +66,7 @@ public:
/** Allocates and initializes the action
@warning: This interface will be deprecated in future.
*/
//static CCShow * action();
static CCShow * action();
/** Allocates and initializes the action */
static CCShow * create();
@ -91,7 +91,7 @@ public:
/** Allocates and initializes the action
@warning: This interface will be deprecated in future.
*/
//static CCHide * action();
static CCHide * action();
/** Allocates and initializes the action */
static CCHide * create();
@ -112,7 +112,7 @@ public:
/** Allocates and initializes the action
@warning: This interface will be deprecated in future.
*/
//static CCToggleVisibility * action();
static CCToggleVisibility * action();
/** Allocates and initializes the action */
static CCToggleVisibility * create();
@ -133,7 +133,7 @@ public:
/** create the action
@warning: This interface will be deprecated in future.
*/
//static CCFlipX * actionWithFlipX(bool x);
static CCFlipX * actionWithFlipX(bool x);
/** create the action */
static CCFlipX * create(bool x);
@ -164,7 +164,7 @@ public:
/** create the action
@warning: This interface will be deprecated in future.
*/
//static CCFlipY * actionWithFlipY(bool y);
static CCFlipY * actionWithFlipY(bool y);
/** create the action */
static CCFlipY * create(bool y);
@ -190,7 +190,7 @@ public:
/** creates a Place action with a position
@warning: This interface will be deprecated in future.
*/
//static CCPlace * actionWithPosition(const CCPoint& pos);
static CCPlace * actionWithPosition(const CCPoint& pos);
/** creates a Place action with a position */
static CCPlace * create(const CCPoint& pos);
/** Initializes a Place action with a position */
@ -224,7 +224,7 @@ public:
@warning: This interface will be deprecated in future.
typedef void (CCObject::*SEL_CallFunc)();
*/
//static CCCallFunc * actionWithTarget(CCObject* pSelectorTarget, SEL_CallFunc selector);
static CCCallFunc * actionWithTarget(CCObject* pSelectorTarget, SEL_CallFunc selector);
/** creates the action with the callback
@ -292,7 +292,7 @@ public:
@warning: This interface will be deprecated in future.
typedef void (CCObject::*SEL_CallFuncN)(CCNode*);
*/
//static CCCallFuncN * actionWithTarget(CCObject* pSelectorTarget, SEL_CallFuncN selector);
static CCCallFuncN * actionWithTarget(CCObject* pSelectorTarget, SEL_CallFuncN selector);
/** creates the action with the callback
@ -321,7 +321,7 @@ public:
/** creates the action with the callback and the data to pass as an argument
@warning: This interface will be deprecated in future.
*/
//static CCCallFuncND * actionWithTarget(CCObject* pSelectorTarget, SEL_CallFuncND selector, void* d);
static CCCallFuncND * actionWithTarget(CCObject* pSelectorTarget, SEL_CallFuncND selector, void* d);
/** creates the action with the callback and the data to pass as an argument */
static CCCallFuncND * create(CCObject* pSelectorTarget, SEL_CallFuncND selector, void* d);
@ -351,7 +351,7 @@ public:
@warning: This interface will be deprecated in future.
typedef void (CCObject::*SEL_CallFuncO)(CCObject*);
*/
//static CCCallFuncO * actionWithTarget(CCObject* pSelectorTarget, SEL_CallFuncO selector, CCObject* pObject);
static CCCallFuncO * actionWithTarget(CCObject* pSelectorTarget, SEL_CallFuncO selector, CCObject* pObject);
/** creates the action with the callback

View File

@ -38,14 +38,10 @@ NS_CC_BEGIN
//
// IntervalAction
//
// CCActionInterval* CCActionInterval::actionWithDuration(float d)
// {
// CCActionInterval *pAction = new CCActionInterval();
// pAction->initWithDuration(d);
// pAction->autorelease();
//
// return pAction;
// }
CCActionInterval* CCActionInterval::actionWithDuration(float d)
{
return CCActionInterval::create(d);
}
CCActionInterval* CCActionInterval::create(float d)
{
@ -155,14 +151,10 @@ CCActionInterval* CCActionInterval::reverse(void)
//
// Sequence
//
// CCSequence* CCSequence::actionOneTwo(CCFiniteTimeAction *pActionOne, CCFiniteTimeAction *pActionTwo)
// {
// CCSequence *pSequence = new CCSequence();
// pSequence->initOneTwo(pActionOne, pActionTwo);
// pSequence->autorelease();
//
// return pSequence;
// }
CCSequence* CCSequence::actionOneTwo(CCFiniteTimeAction *pActionOne, CCFiniteTimeAction *pActionTwo)
{
return CCSequence::create(pActionOne, pActionTwo);
}
CCSequence* CCSequence::create(CCFiniteTimeAction *pActionOne, CCFiniteTimeAction *pActionTwo)
{
@ -173,30 +165,30 @@ CCSequence* CCSequence::create(CCFiniteTimeAction *pActionOne, CCFiniteTimeActio
return pSequence;
}
// CCFiniteTimeAction* CCSequence::actions(CCFiniteTimeAction *pAction1, ...)
// {
// va_list params;
// va_start(params, pAction1);
//
// CCFiniteTimeAction *pNow;
// CCFiniteTimeAction *pPrev = pAction1;
//
// while (pAction1)
// {
// pNow = va_arg(params, CCFiniteTimeAction*);
// if (pNow)
// {
// pPrev = actionOneTwo(pPrev, pNow);
// }
// else
// {
// break;
// }
// }
//
// va_end(params);
// return pPrev;
// }
CCFiniteTimeAction* CCSequence::actions(CCFiniteTimeAction *pAction1, ...)
{
va_list params;
va_start(params, pAction1);
CCFiniteTimeAction *pNow;
CCFiniteTimeAction *pPrev = pAction1;
while (pAction1)
{
pNow = va_arg(params, CCFiniteTimeAction*);
if (pNow)
{
pPrev = actionOneTwo(pPrev, pNow);
}
else
{
break;
}
}
va_end(params);
return pPrev;
}
CCFiniteTimeAction* CCSequence::create(CCFiniteTimeAction *pAction1, ...)
{
@ -223,17 +215,10 @@ CCFiniteTimeAction* CCSequence::create(CCFiniteTimeAction *pAction1, ...)
return pPrev;
}
// CCFiniteTimeAction* CCSequence::actionWithArray(CCArray *actions)
// {
// CCFiniteTimeAction* prev = (CCFiniteTimeAction*)actions->objectAtIndex(0);
//
// for (unsigned int i = 1; i < actions->count(); ++i)
// {
// prev = actionOneTwo(prev, (CCFiniteTimeAction*)actions->objectAtIndex(i));
// }
//
// return prev;
// }
CCFiniteTimeAction* CCSequence::actionWithArray(CCArray *actions)
{
return CCSequence::create(actions);
}
CCFiniteTimeAction* CCSequence::create(CCArray *actions)
{
@ -368,14 +353,10 @@ CCActionInterval* CCSequence::reverse(void)
//
// Repeat
//
// CCRepeat* CCRepeat::actionWithAction(CCFiniteTimeAction *pAction, unsigned int times)
// {
// CCRepeat* pRepeat = new CCRepeat();
// pRepeat->initWithAction(pAction, times);
// pRepeat->autorelease();
//
// return pRepeat;
// }
CCRepeat* CCRepeat::actionWithAction(CCFiniteTimeAction *pAction, unsigned int times)
{
return CCRepeat::create(pAction, times);
}
CCRepeat* CCRepeat::create(CCFiniteTimeAction *pAction, unsigned int times)
{
@ -515,17 +496,10 @@ CCRepeatForever::~CCRepeatForever()
CC_SAFE_RELEASE(m_pInnerAction);
}
// CCRepeatForever *CCRepeatForever::actionWithAction(CCActionInterval *pAction)
// {
// CCRepeatForever *pRet = new CCRepeatForever();
// if (pRet && pRet->initWithAction(pAction))
// {
// pRet->autorelease();
// return pRet;
// }
// CC_SAFE_DELETE(pRet);
// return NULL;
// }
CCRepeatForever *CCRepeatForever::actionWithAction(CCActionInterval *pAction)
{
return CCRepeatForever::create(pAction);
}
CCRepeatForever *CCRepeatForever::create(CCActionInterval *pAction)
{
@ -598,30 +572,30 @@ CCActionInterval *CCRepeatForever::reverse()
//
// Spawn
//
// CCFiniteTimeAction* CCSpawn::actions(CCFiniteTimeAction *pAction1, ...)
// {
// va_list params;
// va_start(params, pAction1);
//
// CCFiniteTimeAction *pNow;
// CCFiniteTimeAction *pPrev = pAction1;
//
// while (pAction1)
// {
// pNow = va_arg(params, CCFiniteTimeAction*);
// if (pNow)
// {
// pPrev = actionOneTwo(pPrev, pNow);
// }
// else
// {
// break;
// }
// }
//
// va_end(params);
// return pPrev;
// }
CCFiniteTimeAction* CCSpawn::actions(CCFiniteTimeAction *pAction1, ...)
{
va_list params;
va_start(params, pAction1);
CCFiniteTimeAction *pNow;
CCFiniteTimeAction *pPrev = pAction1;
while (pAction1)
{
pNow = va_arg(params, CCFiniteTimeAction*);
if (pNow)
{
pPrev = actionOneTwo(pPrev, pNow);
}
else
{
break;
}
}
va_end(params);
return pPrev;
}
CCFiniteTimeAction* CCSpawn::create(CCFiniteTimeAction *pAction1, ...)
{
@ -648,17 +622,10 @@ CCFiniteTimeAction* CCSpawn::create(CCFiniteTimeAction *pAction1, ...)
return pPrev;
}
// CCFiniteTimeAction* CCSpawn::actionWithArray(CCArray *actions)
// {
// CCFiniteTimeAction* prev = (CCFiniteTimeAction*)actions->objectAtIndex(0);
//
// for (unsigned int i = 1; i < actions->count(); ++i)
// {
// prev = actionOneTwo(prev, (CCFiniteTimeAction*)actions->objectAtIndex(i));
// }
//
// return prev;
// }
CCFiniteTimeAction* CCSpawn::actionWithArray(CCArray *actions)
{
return CCSpawn::create(actions);
}
CCFiniteTimeAction* CCSpawn::create(CCArray *actions)
{
@ -672,14 +639,10 @@ CCFiniteTimeAction* CCSpawn::create(CCArray *actions)
return prev;
}
// CCSpawn* CCSpawn::actionOneTwo(CCFiniteTimeAction *pAction1, CCFiniteTimeAction *pAction2)
// {
// CCSpawn *pSpawn = new CCSpawn();
// pSpawn->initOneTwo(pAction1, pAction2);
// pSpawn->autorelease();
//
// return pSpawn;
// }
CCSpawn* CCSpawn::actionOneTwo(CCFiniteTimeAction *pAction1, CCFiniteTimeAction *pAction2)
{
return CCSpawn::create(pAction1, pAction2);
}
CCSpawn* CCSpawn::create(CCFiniteTimeAction *pAction1, CCFiniteTimeAction *pAction2)
{
@ -789,14 +752,10 @@ CCActionInterval* CCSpawn::reverse(void)
//
// RotateTo
//
// CCRotateTo* CCRotateTo::actionWithDuration(float duration, float fDeltaAngle)
// {
// CCRotateTo* pRotateTo = new CCRotateTo();
// pRotateTo->initWithDuration(duration, fDeltaAngle);
// pRotateTo->autorelease();
//
// return pRotateTo;
// }
CCRotateTo* CCRotateTo::actionWithDuration(float duration, float fDeltaAngle)
{
return CCRotateTo::create(duration, fDeltaAngle);
}
CCRotateTo* CCRotateTo::create(float duration, float fDeltaAngle)
{
@ -880,14 +839,10 @@ void CCRotateTo::update(float time)
//
// RotateBy
//
// CCRotateBy* CCRotateBy::actionWithDuration(float duration, float fDeltaAngle)
// {
// CCRotateBy *pRotateBy = new CCRotateBy();
// pRotateBy->initWithDuration(duration, fDeltaAngle);
// pRotateBy->autorelease();
//
// return pRotateBy;
// }
CCRotateBy* CCRotateBy::actionWithDuration(float duration, float fDeltaAngle)
{
return CCRotateBy::create(duration, fDeltaAngle);
}
CCRotateBy* CCRotateBy::create(float duration, float fDeltaAngle)
{
@ -955,14 +910,10 @@ CCActionInterval* CCRotateBy::reverse(void)
//
// MoveTo
//
// CCMoveTo* CCMoveTo::actionWithDuration(float duration, const CCPoint& position)
// {
// CCMoveTo *pMoveTo = new CCMoveTo();
// pMoveTo->initWithDuration(duration, position);
// pMoveTo->autorelease();
//
// return pMoveTo;
// }
CCMoveTo* CCMoveTo::actionWithDuration(float duration, const CCPoint& position)
{
return CCMoveTo::create(duration, position);
}
CCMoveTo* CCMoveTo::create(float duration, const CCPoint& position)
{
@ -1026,14 +977,10 @@ void CCMoveTo::update(float time)
//
// MoveBy
//
// CCMoveBy* CCMoveBy::actionWithDuration(float duration, const CCPoint& position)
// {
// CCMoveBy *pMoveBy = new CCMoveBy();
// pMoveBy->initWithDuration(duration, position);
// pMoveBy->autorelease();
//
// return pMoveBy;
// }
CCMoveBy* CCMoveBy::actionWithDuration(float duration, const CCPoint& position)
{
return CCMoveBy::create(duration, position);
}
CCMoveBy* CCMoveBy::create(float duration, const CCPoint& position)
{
@ -1093,23 +1040,10 @@ CCActionInterval* CCMoveBy::reverse(void)
//
// CCSkewTo
//
// CCSkewTo* CCSkewTo::actionWithDuration(float t, float sx, float sy)
// {
// CCSkewTo *pSkewTo = new CCSkewTo();
// if (pSkewTo)
// {
// if (pSkewTo->initWithDuration(t, sx, sy))
// {
// pSkewTo->autorelease();
// }
// else
// {
// CC_SAFE_DELETE(pSkewTo);
// }
// }
//
// return pSkewTo;
// }
CCSkewTo* CCSkewTo::actionWithDuration(float t, float sx, float sy)
{
return CCSkewTo::create(t, sx, sy);
}
CCSkewTo* CCSkewTo::create(float t, float sx, float sy)
{
@ -1237,23 +1171,10 @@ CCSkewTo::CCSkewTo()
//
// CCSkewBy
//
// CCSkewBy* CCSkewBy::actionWithDuration(float t, float sx, float sy)
// {
// CCSkewBy *pSkewBy = new CCSkewBy();
// if (pSkewBy)
// {
// if (pSkewBy->initWithDuration(t, sx, sy))
// {
// pSkewBy->autorelease();
// }
// else
// {
// CC_SAFE_DELETE(pSkewBy);
// }
// }
//
// return pSkewBy;
// }
CCSkewBy* CCSkewBy::actionWithDuration(float t, float sx, float sy)
{
return CCSkewBy::create(t, sx, sy);
}
CCSkewBy* CCSkewBy::create(float t, float sx, float sy)
{
@ -1305,14 +1226,10 @@ CCActionInterval* CCSkewBy::reverse()
//
// JumpBy
//
// CCJumpBy* CCJumpBy::actionWithDuration(float duration, const CCPoint& position, float height, unsigned int jumps)
// {
// CCJumpBy *pJumpBy = new CCJumpBy();
// pJumpBy->initWithDuration(duration, position, height, jumps);
// pJumpBy->autorelease();
//
// return pJumpBy;
// }
CCJumpBy* CCJumpBy::actionWithDuration(float duration, const CCPoint& position, float height, unsigned int jumps)
{
return CCJumpBy::create(duration, position, height, jumps);
}
CCJumpBy* CCJumpBy::create(float duration, const CCPoint& position, float height, unsigned int jumps)
{
@ -1388,14 +1305,10 @@ CCActionInterval* CCJumpBy::reverse(void)
//
// JumpTo
//
// CCJumpTo* CCJumpTo::actionWithDuration(float duration, const CCPoint& position, float height, int jumps)
// {
// CCJumpTo *pJumpTo = new CCJumpTo();
// pJumpTo->initWithDuration(duration, position, height, jumps);
// pJumpTo->autorelease();
//
// return pJumpTo;
// }
CCJumpTo* CCJumpTo::actionWithDuration(float duration, const CCPoint& position, float height, int jumps)
{
return CCJumpTo::create(duration, position, height, jumps);
}
CCJumpTo* CCJumpTo::create(float duration, const CCPoint& position, float height, int jumps)
{
@ -1450,14 +1363,10 @@ static inline float bezierat( float a, float b, float c, float d, float t )
//
// BezierBy
//
// CCBezierBy* CCBezierBy::actionWithDuration(float t, const ccBezierConfig& c)
// {
// CCBezierBy *pBezierBy = new CCBezierBy();
// pBezierBy->initWithDuration(t, c);
// pBezierBy->autorelease();
//
// return pBezierBy;
// }
CCBezierBy* CCBezierBy::actionWithDuration(float t, const ccBezierConfig& c)
{
return CCBezierBy::create(t, c);
}
CCBezierBy* CCBezierBy::create(float t, const ccBezierConfig& c)
{
@ -1543,14 +1452,10 @@ CCActionInterval* CCBezierBy::reverse(void)
//
// BezierTo
//
// CCBezierTo* CCBezierTo::actionWithDuration(float t, const ccBezierConfig& c)
// {
// CCBezierTo *pBezierTo = new CCBezierTo();
// pBezierTo->initWithDuration(t, c);
// pBezierTo->autorelease();
//
// return pBezierTo;
// }
CCBezierTo* CCBezierTo::actionWithDuration(float t, const ccBezierConfig& c)
{
return CCBezierTo::create(t, c);
}
CCBezierTo* CCBezierTo::create(float t, const ccBezierConfig& c)
{
@ -1596,14 +1501,10 @@ void CCBezierTo::startWithTarget(CCNode *pTarget)
//
// ScaleTo
//
// CCScaleTo* CCScaleTo::actionWithDuration(float duration, float s)
// {
// CCScaleTo *pScaleTo = new CCScaleTo();
// pScaleTo->initWithDuration(duration, s);
// pScaleTo->autorelease();
//
// return pScaleTo;
// }
CCScaleTo* CCScaleTo::actionWithDuration(float duration, float s)
{
return CCScaleTo::create(duration, s);
}
CCScaleTo* CCScaleTo::create(float duration, float s)
{
@ -1627,14 +1528,10 @@ bool CCScaleTo::initWithDuration(float duration, float s)
return false;
}
// CCScaleTo* CCScaleTo::actionWithDuration(float duration, float sx, float sy)
// {
// CCScaleTo *pScaleTo = new CCScaleTo();
// pScaleTo->initWithDuration(duration, sx, sy);
// pScaleTo->autorelease();
//
// return pScaleTo;
// }
CCScaleTo* CCScaleTo::actionWithDuration(float duration, float sx, float sy)
{
return CCScaleTo::create(duration, sx, sy);
}
CCScaleTo* CCScaleTo::create(float duration, float sx, float sy)
{
@ -1703,23 +1600,15 @@ void CCScaleTo::update(float time)
//
// ScaleBy
//
// CCScaleBy* CCScaleBy::actionWithDuration(float duration, float s)
// {
// CCScaleBy *pScaleBy = new CCScaleBy();
// pScaleBy->initWithDuration(duration, s);
// pScaleBy->autorelease();
//
// return pScaleBy;
// }
//
// CCScaleBy* CCScaleBy::actionWithDuration(float duration, float sx, float sy)
// {
// CCScaleBy *pScaleBy = new CCScaleBy();
// pScaleBy->initWithDuration(duration, sx, sy);
// pScaleBy->autorelease();
//
// return pScaleBy;
// }
CCScaleBy* CCScaleBy::actionWithDuration(float duration, float s)
{
return create(duration, s);
}
CCScaleBy* CCScaleBy::actionWithDuration(float duration, float sx, float sy)
{
return create(duration, sx, sy);
}
CCScaleBy* CCScaleBy::create(float duration, float s)
{
@ -1778,14 +1667,10 @@ CCActionInterval* CCScaleBy::reverse(void)
//
// Blink
//
// CCBlink* CCBlink::actionWithDuration(float duration, unsigned int uBlinks)
// {
// CCBlink *pBlink = new CCBlink();
// pBlink->initWithDuration(duration, uBlinks);
// pBlink->autorelease();
//
// return pBlink;
// }
CCBlink* CCBlink::actionWithDuration(float duration, unsigned int uBlinks)
{
return CCBlink::create(duration, uBlinks);
}
CCBlink* CCBlink::create(float duration, unsigned int uBlinks)
{
@ -1850,15 +1735,10 @@ CCActionInterval* CCBlink::reverse(void)
//
// FadeIn
//
// CCFadeIn* CCFadeIn::actionWithDuration(float d)
// {
// CCFadeIn* pAction = new CCFadeIn();
//
// pAction->initWithDuration(d);
// pAction->autorelease();
//
// return pAction;
// }
CCFadeIn* CCFadeIn::actionWithDuration(float d)
{
return CCFadeIn::create(d);
}
CCFadeIn* CCFadeIn::create(float d)
{
@ -1910,15 +1790,10 @@ CCActionInterval* CCFadeIn::reverse(void)
//
// FadeOut
//
// CCFadeOut* CCFadeOut::actionWithDuration(float d)
// {
// CCFadeOut* pAction = new CCFadeOut();
//
// pAction->initWithDuration(d);
// pAction->autorelease();
//
// return pAction;
// }
CCFadeOut* CCFadeOut::actionWithDuration(float d)
{
return CCFadeOut::create(d);
}
CCFadeOut* CCFadeOut::create(float d)
{
@ -1970,14 +1845,10 @@ CCActionInterval* CCFadeOut::reverse(void)
//
// FadeTo
//
// CCFadeTo* CCFadeTo::actionWithDuration(float duration, GLubyte opacity)
// {
// CCFadeTo *pFadeTo = new CCFadeTo();
// pFadeTo->initWithDuration(duration, opacity);
// pFadeTo->autorelease();
//
// return pFadeTo;
// }
CCFadeTo* CCFadeTo::actionWithDuration(float duration, GLubyte opacity)
{
return CCFadeTo::create(duration, opacity);
}
CCFadeTo* CCFadeTo::create(float duration, GLubyte opacity)
{
@ -2047,14 +1918,10 @@ void CCFadeTo::update(float time)
//
// TintTo
//
// CCTintTo* CCTintTo::actionWithDuration(float duration, GLubyte red, GLubyte green, GLubyte blue)
// {
// CCTintTo *pTintTo = new CCTintTo();
// pTintTo->initWithDuration(duration, red, green, blue);
// pTintTo->autorelease();
//
// return pTintTo;
// }
CCTintTo* CCTintTo::actionWithDuration(float duration, GLubyte red, GLubyte green, GLubyte blue)
{
return CCTintTo::create(duration, red, green, blue);
}
CCTintTo* CCTintTo::create(float duration, GLubyte red, GLubyte green, GLubyte blue)
{
@ -2124,14 +1991,10 @@ void CCTintTo::update(float time)
//
// TintBy
//
// CCTintBy* CCTintBy::actionWithDuration(float duration, GLshort deltaRed, GLshort deltaGreen, GLshort deltaBlue)
// {
// CCTintBy *pTintBy = new CCTintBy();
// pTintBy->initWithDuration(duration, deltaRed, deltaGreen, deltaBlue);
// pTintBy->autorelease();
//
// return pTintBy;
// }
CCTintBy* CCTintBy::actionWithDuration(float duration, GLshort deltaRed, GLshort deltaGreen, GLshort deltaBlue)
{
return CCTintBy::create(duration, deltaRed, deltaGreen, deltaBlue);
}
CCTintBy* CCTintBy::create(float duration, GLshort deltaRed, GLshort deltaGreen, GLshort deltaBlue)
{
@ -2212,15 +2075,10 @@ CCActionInterval* CCTintBy::reverse(void)
//
// DelayTime
//
// CCDelayTime* CCDelayTime::actionWithDuration(float d)
// {
// CCDelayTime* pAction = new CCDelayTime();
//
// pAction->initWithDuration(d);
// pAction->autorelease();
//
// return pAction;
// }
CCDelayTime* CCDelayTime::actionWithDuration(float d)
{
return CCDelayTime::create(d);
}
CCDelayTime* CCDelayTime::create(float d)
{
@ -2269,15 +2127,10 @@ CCActionInterval* CCDelayTime::reverse(void)
//
// ReverseTime
//
// CCReverseTime* CCReverseTime::actionWithAction(CCFiniteTimeAction *pAction)
// {
// // casting to prevent warnings
// CCReverseTime *pReverseTime = new CCReverseTime();
// pReverseTime->initWithAction(pAction);
// pReverseTime->autorelease();
//
// return pReverseTime;
// }
CCReverseTime* CCReverseTime::actionWithAction(CCFiniteTimeAction *pAction)
{
return CCReverseTime::create(pAction);
}
CCReverseTime* CCReverseTime::create(CCFiniteTimeAction *pAction)
{
@ -2369,14 +2222,10 @@ CCActionInterval* CCReverseTime::reverse(void)
//
// Animate
//
// CCAnimate* CCAnimate::actionWithAnimation(CCAnimation *pAnimation)
// {
// CCAnimate *pAnimate = new CCAnimate();
// pAnimate->initWithAnimation(pAnimation);
// pAnimate->autorelease();
//
// return pAnimate;
// }
CCAnimate* CCAnimate::actionWithAnimation(CCAnimation *pAnimation)
{
return CCAnimate::create(pAnimation);
}
CCAnimate* CCAnimate::create(CCAnimation *pAnimation)
{
@ -2570,13 +2419,10 @@ CCTargetedAction::~CCTargetedAction()
CC_SAFE_RELEASE(m_pAction);
}
// CCTargetedAction* CCTargetedAction::actionWithTarget(CCNode* pTarget, CCFiniteTimeAction* pAction)
// {
// CCTargetedAction* p = new CCTargetedAction();
// p->initWithTarget(pTarget, pAction);
// p->autorelease();
// return p;
// }
CCTargetedAction* CCTargetedAction::actionWithTarget(CCNode* pTarget, CCFiniteTimeAction* pAction)
{
return CCTargetedAction::create(pTarget, pAction);
}
CCTargetedAction* CCTargetedAction::create(CCNode* pTarget, CCFiniteTimeAction* pAction)
{

View File

@ -75,7 +75,7 @@ public:
/** creates the action
@warning: This interface will be deprecated in future.
*/
//static CCActionInterval* actionWithDuration(float d);
static CCActionInterval* actionWithDuration(float d);
/** creates the action */
static CCActionInterval* create(float d);
@ -110,15 +110,15 @@ public:
/** helper constructor to create an array of sequenceable actions
@warning: This interface will be deprecated in future.
*/
//static CCFiniteTimeAction* actions(CCFiniteTimeAction *pAction1, ...);
static CCFiniteTimeAction* actions(CCFiniteTimeAction *pAction1, ...);
/** helper contructor to create an array of sequenceable actions given an array
@warning: This interface will be deprecated in future.
*/
//static CCFiniteTimeAction* actionWithArray(CCArray *arrayOfActions);
static CCFiniteTimeAction* actionWithArray(CCArray *arrayOfActions);
/** creates the action
@warning: This interface will be deprecated in future.
*/
//static CCSequence* actionOneTwo(CCFiniteTimeAction *pActionOne, CCFiniteTimeAction *pActionTwo);
static CCSequence* actionOneTwo(CCFiniteTimeAction *pActionOne, CCFiniteTimeAction *pActionTwo);
/** helper constructor to create an array of sequenceable actions */
static CCFiniteTimeAction* create(CCFiniteTimeAction *pAction1, ...);
@ -170,7 +170,7 @@ public:
/** creates a CCRepeat action. Times is an unsigned integer between 1 and pow(2,30)
@warning: This interface will be deprecated in future.
*/
//static CCRepeat* actionWithAction(CCFiniteTimeAction *pAction, unsigned int times);
static CCRepeat* actionWithAction(CCFiniteTimeAction *pAction, unsigned int times);
/** creates a CCRepeat action. Times is an unsigned integer between 1 and pow(2,30) */
static CCRepeat* create(CCFiniteTimeAction *pAction, unsigned int times);
@ -222,7 +222,7 @@ public:
/** creates the action
@warning: This interface will be deprecated in future.
*/
//static CCRepeatForever* actionWithAction(CCActionInterval *pAction);
static CCRepeatForever* actionWithAction(CCActionInterval *pAction);
/** creates the action */
static CCRepeatForever* create(CCActionInterval *pAction);
protected:
@ -250,17 +250,17 @@ public:
/** helper constructor to create an array of spawned actions
@warning: This interface will be deprecated in future.
*/
//static CCFiniteTimeAction* actions(CCFiniteTimeAction *pAction1, ...);
static CCFiniteTimeAction* actions(CCFiniteTimeAction *pAction1, ...);
/** helper contructor to create an array of spawned actions given an array
@warning: This interface will be deprecated in future.
*/
//static CCFiniteTimeAction* actionWithArray(CCArray *arrayOfActions);
static CCFiniteTimeAction* actionWithArray(CCArray *arrayOfActions);
/** creates the Spawn action
@warning: This interface will be deprecated in future.
*/
//static CCSpawn* actionOneTwo(CCFiniteTimeAction *pAction1, CCFiniteTimeAction *pAction2);
static CCSpawn* actionOneTwo(CCFiniteTimeAction *pAction1, CCFiniteTimeAction *pAction2);
/** helper constructor to create an array of spawned actions */
static CCFiniteTimeAction* create(CCFiniteTimeAction *pAction1, ...);
@ -294,7 +294,7 @@ public:
/** creates the action
@warning: This interface will be deprecated in future.
*/
//static CCRotateTo* actionWithDuration(float duration, float fDeltaAngle);
static CCRotateTo* actionWithDuration(float duration, float fDeltaAngle);
/** creates the action */
static CCRotateTo* create(float duration, float fDeltaAngle);
protected:
@ -320,7 +320,7 @@ public:
/** creates the action
@warning: This interface will be deprecated in future.
*/
//static CCRotateBy* actionWithDuration(float duration, float fDeltaAngle);
static CCRotateBy* actionWithDuration(float duration, float fDeltaAngle);
/** creates the action */
static CCRotateBy* create(float duration, float fDeltaAngle);
protected:
@ -344,7 +344,7 @@ public:
/** creates the action
@warning: This interface will be deprecated in future.
*/
//static CCMoveTo* actionWithDuration(float duration, const CCPoint& position);
static CCMoveTo* actionWithDuration(float duration, const CCPoint& position);
/** creates the action */
static CCMoveTo* create(float duration, const CCPoint& position);
protected:
@ -371,7 +371,7 @@ public:
/** creates the action
@warning: This interface will be deprecated in future.
*/
//static CCMoveBy* actionWithDuration(float duration, const CCPoint& position);
static CCMoveBy* actionWithDuration(float duration, const CCPoint& position);
/** creates the action */
static CCMoveBy* create(float duration, const CCPoint& position);
};
@ -392,7 +392,7 @@ public:
/** creates the action
@warning: This interface will be deprecated in future.
*/
//static CCSkewTo* actionWithDuration(float t, float sx, float sy);
static CCSkewTo* actionWithDuration(float t, float sx, float sy);
/** creates the action */
static CCSkewTo* create(float t, float sx, float sy);
@ -421,7 +421,7 @@ public:
/** creates the action
@warning: This interface will be deprecated in future.
*/
//static CCSkewBy* actionWithDuration(float t, float deltaSkewX, float deltaSkewY);
static CCSkewBy* actionWithDuration(float t, float deltaSkewX, float deltaSkewY);
/** creates the action */
static CCSkewBy* create(float t, float deltaSkewX, float deltaSkewY);
};
@ -443,7 +443,7 @@ public:
/** creates the action
@warning: This interface will be deprecated in future.
*/
//static CCJumpBy* actionWithDuration(float duration, const CCPoint& position, float height, unsigned int jumps);
static CCJumpBy* actionWithDuration(float duration, const CCPoint& position, float height, unsigned int jumps);
/** creates the action */
static CCJumpBy* create(float duration, const CCPoint& position, float height, unsigned int jumps);
protected:
@ -465,7 +465,7 @@ public:
/** creates the action
@warning: This interface will be deprecated in future.
*/
// static CCJumpTo* actionWithDuration(float duration, const CCPoint& position, float height, int jumps);
static CCJumpTo* actionWithDuration(float duration, const CCPoint& position, float height, int jumps);
/** creates the action */
static CCJumpTo* create(float duration, const CCPoint& position, float height, int jumps);
};
@ -498,7 +498,7 @@ public:
/** creates the action with a duration and a bezier configuration
@warning: This interface will be deprecated in future.
*/
//static CCBezierBy* actionWithDuration(float t, const ccBezierConfig& c);
static CCBezierBy* actionWithDuration(float t, const ccBezierConfig& c);
/** creates the action with a duration and a bezier configuration */
static CCBezierBy* create(float t, const ccBezierConfig& c);
protected:
@ -519,7 +519,7 @@ public:
/** creates the action with a duration and a bezier configuration
@warning: This interface will be deprecated in future.
*/
//static CCBezierTo* actionWithDuration(float t, const ccBezierConfig& c);
static CCBezierTo* actionWithDuration(float t, const ccBezierConfig& c);
/** creates the action with a duration and a bezier configuration */
static CCBezierTo* create(float t, const ccBezierConfig& c);
@ -545,12 +545,12 @@ public:
/** creates the action with the same scale factor for X and Y
@warning: This interface will be deprecated in future.
*/
//static CCScaleTo* actionWithDuration(float duration, float s);
static CCScaleTo* actionWithDuration(float duration, float s);
/** creates the action with and X factor and a Y factor
@warning: This interface will be deprecated in future.
*/
//static CCScaleTo* actionWithDuration(float duration, float sx, float sy);
static CCScaleTo* actionWithDuration(float duration, float sx, float sy);
/** creates the action with the same scale factor for X and Y */
static CCScaleTo* create(float duration, float s);
@ -581,12 +581,12 @@ public:
/** creates the action with the same scale factor for X and Y
@warning: This interface will be deprecated in future.
*/
//static CCScaleBy* actionWithDuration(float duration, float s);
static CCScaleBy* actionWithDuration(float duration, float s);
/** creates the action with and X factor and a Y factor
@warning: This interface will be deprecated in future.
*/
//static CCScaleBy* actionWithDuration(float duration, float sx, float sy);
static CCScaleBy* actionWithDuration(float duration, float sx, float sy);
/** creates the action with the same scale factor for X and Y */
static CCScaleBy* create(float duration, float s);
@ -611,7 +611,7 @@ public:
/** creates the action
@warning: This interface will be deprecated in future.
*/
//static CCBlink* actionWithDuration(float duration, unsigned int uBlinks);
static CCBlink* actionWithDuration(float duration, unsigned int uBlinks);
/** creates the action */
static CCBlink* create(float duration, unsigned int uBlinks);
protected:
@ -632,7 +632,7 @@ public:
/** creates the action
@warning: This interface will be deprecated in future.
*/
//static CCFadeIn* actionWithDuration(float d);
static CCFadeIn* actionWithDuration(float d);
/** creates the action */
static CCFadeIn* create(float d);
};
@ -651,7 +651,7 @@ public:
/** creates the action
@warning: This interface will be deprecated in future.
*/
//static CCFadeOut* actionWithDuration(float d);
static CCFadeOut* actionWithDuration(float d);
/** creates the action */
static CCFadeOut* create(float d);
@ -674,7 +674,7 @@ public:
/** creates an action with duration and opacity
@warning: This interface will be deprecated in future.
*/
//static CCFadeTo* actionWithDuration(float duration, GLubyte opacity);
static CCFadeTo* actionWithDuration(float duration, GLubyte opacity);
/** creates an action with duration and opacity */
static CCFadeTo* create(float duration, GLubyte opacity);
protected:
@ -700,7 +700,7 @@ public:
/** creates an action with duration and color
@warning: This interface will be deprecated in future.
*/
//static CCTintTo* actionWithDuration(float duration, GLubyte red, GLubyte green, GLubyte blue);
static CCTintTo* actionWithDuration(float duration, GLubyte red, GLubyte green, GLubyte blue);
/** creates an action with duration and color */
static CCTintTo* create(float duration, GLubyte red, GLubyte green, GLubyte blue);
protected:
@ -726,7 +726,7 @@ public:
/** creates an action with duration and color
@warning: This interface will be deprecated in future.
*/
// static CCTintBy* actionWithDuration(float duration, GLshort deltaRed, GLshort deltaGreen, GLshort deltaBlue);
static CCTintBy* actionWithDuration(float duration, GLshort deltaRed, GLshort deltaGreen, GLshort deltaBlue);
/** creates an action with duration and color */
static CCTintBy* create(float duration, GLshort deltaRed, GLshort deltaGreen, GLshort deltaBlue);
protected:
@ -752,7 +752,7 @@ public:
/** creates the action
@warning: This interface will be deprecated in future.
*/
//static CCDelayTime* actionWithDuration(float d);
static CCDelayTime* actionWithDuration(float d);
/** creates the action */
static CCDelayTime* create(float d);
@ -784,7 +784,7 @@ public:
/** creates the action
@warning: This interface will be deprecated in future.
*/
//static CCReverseTime* actionWithAction(CCFiniteTimeAction *pAction);
static CCReverseTime* actionWithAction(CCFiniteTimeAction *pAction);
/** creates the action */
static CCReverseTime* create(CCFiniteTimeAction *pAction);
protected:
@ -813,7 +813,7 @@ public:
/** creates the action with an Animation and will restore the original frame when the animation is over
@warning: This interface will be deprecated in future.
*/
//static CCAnimate* actionWithAnimation(CCAnimation *pAnimation);
static CCAnimate* actionWithAnimation(CCAnimation *pAnimation);
/** creates the action with an Animation and will restore the original frame when the animation is over */
static CCAnimate* create(CCAnimation *pAnimation);
CC_SYNTHESIZE_RETAIN(CCAnimation*, m_pAnimation, Animation)
@ -835,7 +835,7 @@ public:
/** Create an action with the specified action and forced target
@warning: This interface will be deprecated in future.
*/
//static CCTargetedAction* actionWithTarget(CCNode* pTarget, CCFiniteTimeAction* pAction);
static CCTargetedAction* actionWithTarget(CCNode* pTarget, CCFiniteTimeAction* pAction);
/** Create an action with the specified action and forced target */
static CCTargetedAction* create(CCNode* pTarget, CCFiniteTimeAction* pAction);

View File

@ -27,24 +27,10 @@ THE SOFTWARE.
NS_CC_BEGIN
// CCPageTurn3D* CCPageTurn3D::actionWithSize(const ccGridSize& gridSize, float time)
// {
// CCPageTurn3D *pAction = new CCPageTurn3D();
//
// if (pAction)
// {
// if (pAction->initWithSize(gridSize, time))
// {
// pAction->autorelease();
// }
// else
// {
// CC_SAFE_RELEASE_NULL(pAction);
// }
// }
//
// return pAction;
// }
CCPageTurn3D* CCPageTurn3D::actionWithSize(const ccGridSize& gridSize, float time)
{
return CCPageTurn3D::create(gridSize, time);
}
CCPageTurn3D* CCPageTurn3D::create(const ccGridSize& gridSize, float time)
{

View File

@ -46,7 +46,7 @@ public:
/** create the action
@warning: This interface will be deprecated in future.
*/
//static CCPageTurn3D* actionWithSize(const ccGridSize& gridSize, float time);
static CCPageTurn3D* actionWithSize(const ccGridSize& gridSize, float time);
/** create the action */
static CCPageTurn3D* create(const ccGridSize& gridSize, float time);
};

View File

@ -32,14 +32,10 @@ NS_CC_BEGIN
// implementation of CCProgressTo
// CCProgressTo* CCProgressTo::actionWithDuration(float duration, float fPercent)
// {
// CCProgressTo *pProgressTo = new CCProgressTo();
// pProgressTo->initWithDuration(duration, fPercent);
// pProgressTo->autorelease();
//
// return pProgressTo;
// }
CCProgressTo* CCProgressTo::actionWithDuration(float duration, float fPercent)
{
return CCProgressTo::create(duration, fPercent);
}
CCProgressTo* CCProgressTo::create(float duration, float fPercent)
{
@ -105,14 +101,10 @@ void CCProgressTo::update(float time)
// implementation of CCProgressFromTo
// CCProgressFromTo* CCProgressFromTo::actionWithDuration(float duration, float fFromPercentage, float fToPercentage)
// {
// CCProgressFromTo *pProgressFromTo = new CCProgressFromTo();
// pProgressFromTo->initWithDuration(duration, fFromPercentage, fToPercentage);
// pProgressFromTo->autorelease();
//
// return pProgressFromTo;
// }
CCProgressFromTo* CCProgressFromTo::actionWithDuration(float duration, float fFromPercentage, float fToPercentage)
{
return CCProgressFromTo::create(duration, fFromPercentage, fToPercentage);
}
CCProgressFromTo* CCProgressFromTo::create(float duration, float fFromPercentage, float fToPercentage)
{

View File

@ -47,7 +47,7 @@ public:
/** Creates and initializes with a duration and a percent
@warning: This interface will be deprecated in future.
*/
//static CCProgressTo* actionWithDuration(float duration, float fPercent);
static CCProgressTo* actionWithDuration(float duration, float fPercent);
/** Creates and initializes with a duration and a percent */
static CCProgressTo* create(float duration, float fPercent);
protected:
@ -74,7 +74,7 @@ public:
/** Creates and initializes the action with a duration, a "from" percentage and a "to" percentage
@warning: This interface will be deprecated in future.
*/
//static CCProgressFromTo* actionWithDuration(float duration, float fFromPercentage, float fToPercentage);
static CCProgressFromTo* actionWithDuration(float duration, float fFromPercentage, float fToPercentage);
/** Creates and initializes the action with a duration, a "from" percentage and a "to" percentage */
static CCProgressFromTo* create(float duration, float fFromPercentage, float fToPercentage);
protected:

View File

@ -41,24 +41,10 @@ struct Tile
// implementation of ShakyTiles3D
// CCShakyTiles3D* CCShakyTiles3D::actionWithRange(int nRange, bool bShakeZ,const ccGridSize& gridSize, float duration)
// {
// CCShakyTiles3D *pAction = new CCShakyTiles3D();
//
// if (pAction)
// {
// if (pAction->initWithRange(nRange, bShakeZ, gridSize, duration))
// {
// pAction->autorelease();
// }
// else
// {
// CC_SAFE_RELEASE_NULL(pAction);
// }
// }
//
// return pAction;
// }
CCShakyTiles3D* CCShakyTiles3D::actionWithRange(int nRange, bool bShakeZ,const ccGridSize& gridSize, float duration)
{
return CCShakyTiles3D::create(nRange, bShakeZ, gridSize, duration);
}
CCShakyTiles3D* CCShakyTiles3D::create(int nRange, bool bShakeZ,const ccGridSize& gridSize, float duration)
{
@ -153,24 +139,10 @@ void CCShakyTiles3D::update(float time)
// implementation of CCShatteredTiles3D
// CCShatteredTiles3D* CCShatteredTiles3D::actionWithRange(int nRange, bool bShatterZ, const ccGridSize& gridSize, float duration)
// {
// CCShatteredTiles3D *pAction = new CCShatteredTiles3D();
//
// if (pAction)
// {
// if (pAction->initWithRange(nRange, bShatterZ, gridSize, duration))
// {
// pAction->autorelease();
// }
// else
// {
// CC_SAFE_RELEASE_NULL(pAction);
// }
// }
//
// return pAction;
// }
CCShatteredTiles3D* CCShatteredTiles3D::actionWithRange(int nRange, bool bShatterZ, const ccGridSize& gridSize, float duration)
{
return CCShatteredTiles3D::create(nRange, bShatterZ, gridSize, duration);
}
CCShatteredTiles3D* CCShatteredTiles3D::create(int nRange, bool bShatterZ, const ccGridSize& gridSize, float duration)
{
@ -271,24 +243,10 @@ void CCShatteredTiles3D::update(float time)
// implementation of CCShuffleTiles
// CCShuffleTiles* CCShuffleTiles::actionWithSeed(int s, const ccGridSize& gridSize, float duration)
// {
// CCShuffleTiles *pAction = new CCShuffleTiles();
//
// if (pAction)
// {
// if (pAction->initWithSeed(s, gridSize, duration))
// {
// pAction->autorelease();
// }
// else
// {
// CC_SAFE_RELEASE_NULL(pAction);
// }
// }
//
// return pAction;
// }
CCShuffleTiles* CCShuffleTiles::actionWithSeed(int s, const ccGridSize& gridSize, float duration)
{
return CCShuffleTiles::create(s, gridSize, duration);
}
CCShuffleTiles* CCShuffleTiles::create(int s, const ccGridSize& gridSize, float duration)
{
@ -454,24 +412,10 @@ void CCShuffleTiles::update(float time)
// implementation of CCFadeOutTRTiles
// CCFadeOutTRTiles* CCFadeOutTRTiles::actionWithSize(const ccGridSize& gridSize, float time)
// {
// CCFadeOutTRTiles *pAction = new CCFadeOutTRTiles();
//
// if (pAction)
// {
// if (pAction->initWithSize(gridSize, time))
// {
// pAction->autorelease();
// }
// else
// {
// CC_SAFE_RELEASE_NULL(pAction);
// }
// }
//
// return pAction;
// }
CCFadeOutTRTiles* CCFadeOutTRTiles::actionWithSize(const ccGridSize& gridSize, float time)
{
return CCFadeOutTRTiles::create( gridSize, time);
}
CCFadeOutTRTiles* CCFadeOutTRTiles::create(const ccGridSize& gridSize, float time)
{
@ -561,24 +505,10 @@ void CCFadeOutTRTiles::update(float time)
}
// implementation of CCFadeOutBLTiles
// CCFadeOutBLTiles* CCFadeOutBLTiles::actionWithSize(const ccGridSize& gridSize, float time)
// {
// CCFadeOutBLTiles *pAction = new CCFadeOutBLTiles();
//
// if (pAction)
// {
// if (pAction->initWithSize(gridSize, time))
// {
// pAction->autorelease();
// }
// else
// {
// CC_SAFE_RELEASE_NULL(pAction);
// }
// }
//
// return pAction;
// }
CCFadeOutBLTiles* CCFadeOutBLTiles::actionWithSize(const ccGridSize& gridSize, float time)
{
return CCFadeOutBLTiles::create(gridSize, time);
}
CCFadeOutBLTiles* CCFadeOutBLTiles::create(const ccGridSize& gridSize, float time)
{
@ -612,24 +542,10 @@ float CCFadeOutBLTiles::testFunc(const ccGridSize& pos, float time)
// implementation of CCFadeOutUpTiles
// CCFadeOutUpTiles* CCFadeOutUpTiles::actionWithSize(const ccGridSize& gridSize, float time)
// {
// CCFadeOutUpTiles *pAction = new CCFadeOutUpTiles();
//
// if (pAction)
// {
// if (pAction->initWithSize(gridSize, time))
// {
// pAction->autorelease();
// }
// else
// {
// CC_SAFE_RELEASE_NULL(pAction);
// }
// }
//
// return pAction;
// }
CCFadeOutUpTiles* CCFadeOutUpTiles::actionWithSize(const ccGridSize& gridSize, float time)
{
return CCFadeOutUpTiles::create(gridSize, time);
}
CCFadeOutUpTiles* CCFadeOutUpTiles::create(const ccGridSize& gridSize, float time)
{
@ -675,24 +591,10 @@ void CCFadeOutUpTiles::transformTile(const ccGridSize& pos, float distance)
}
// implementation of CCFadeOutDownTiles
// CCFadeOutDownTiles* CCFadeOutDownTiles::actionWithSize(const ccGridSize& gridSize, float time)
// {
// CCFadeOutDownTiles *pAction = new CCFadeOutDownTiles();
//
// if (pAction)
// {
// if (pAction->initWithSize(gridSize, time))
// {
// pAction->autorelease();
// }
// else
// {
// CC_SAFE_RELEASE_NULL(pAction);
// }
// }
//
// return pAction;
// }
CCFadeOutDownTiles* CCFadeOutDownTiles::actionWithSize(const ccGridSize& gridSize, float time)
{
return CCFadeOutDownTiles::create(gridSize, time);
}
CCFadeOutDownTiles* CCFadeOutDownTiles::create(const ccGridSize& gridSize, float time)
{
@ -725,19 +627,10 @@ float CCFadeOutDownTiles::testFunc(const ccGridSize& pos, float time)
}
// implementation of TurnOffTiles
// CCTurnOffTiles* CCTurnOffTiles::actionWithSize(const ccGridSize& size, float d)
// {
// CCTurnOffTiles* pAction = new CCTurnOffTiles();
// if (pAction->initWithSize(size, d))
// {
// pAction->autorelease();
// }
// else
// {
// CC_SAFE_RELEASE_NULL(pAction);
// }
// return pAction;
// }
CCTurnOffTiles* CCTurnOffTiles::actionWithSize(const ccGridSize& size, float d)
{
return CCTurnOffTiles::create( size, d);
}
CCTurnOffTiles* CCTurnOffTiles::create(const ccGridSize& size, float d)
{
@ -753,24 +646,10 @@ CCTurnOffTiles* CCTurnOffTiles::create(const ccGridSize& size, float d)
return pAction;
}
// CCTurnOffTiles* CCTurnOffTiles::actionWithSeed(int s, const ccGridSize& gridSize, float duration)
// {
// CCTurnOffTiles *pAction = new CCTurnOffTiles();
//
// if (pAction)
// {
// if (pAction->initWithSeed(s, gridSize, duration))
// {
// pAction->autorelease();
// }
// else
// {
// CC_SAFE_RELEASE_NULL(pAction);
// }
// }
//
// return pAction;
// }
CCTurnOffTiles* CCTurnOffTiles::actionWithSeed(int s, const ccGridSize& gridSize, float duration)
{
return CCTurnOffTiles::create(s, gridSize, duration);
}
CCTurnOffTiles* CCTurnOffTiles::create(int s, const ccGridSize& gridSize, float duration)
{
@ -902,24 +781,10 @@ void CCTurnOffTiles::update(float time)
// implementation of CCWavesTiles3D
// CCWavesTiles3D* CCWavesTiles3D::actionWithWaves(int wav, float amp, const ccGridSize& gridSize, float duration)
// {
// CCWavesTiles3D *pAction = new CCWavesTiles3D();
//
// if (pAction)
// {
// if (pAction->initWithWaves(wav, amp, gridSize, duration))
// {
// pAction->autorelease();
// }
// else
// {
// CC_SAFE_RELEASE_NULL(pAction);
// }
// }
//
// return pAction;
// }
CCWavesTiles3D* CCWavesTiles3D::actionWithWaves(int wav, float amp, const ccGridSize& gridSize, float duration)
{
return CCWavesTiles3D::create(wav, amp, gridSize, duration);
}
CCWavesTiles3D* CCWavesTiles3D::create(int wav, float amp, const ccGridSize& gridSize, float duration)
{
@ -999,24 +864,10 @@ void CCWavesTiles3D::update(float time)
// implementation of CCJumpTiles3D
// CCJumpTiles3D* CCJumpTiles3D::actionWithJumps(int j, float amp, const ccGridSize& gridSize, float duration)
// {
// CCJumpTiles3D *pAction = new CCJumpTiles3D();
//
// if (pAction)
// {
// if (pAction->initWithJumps(j, amp, gridSize, duration))
// {
// pAction->autorelease();
// }
// else
// {
// CC_SAFE_RELEASE_NULL(pAction);
// }
// }
//
// return pAction;
// }
CCJumpTiles3D* CCJumpTiles3D::actionWithJumps(int j, float amp, const ccGridSize& gridSize, float duration)
{
return CCJumpTiles3D::create(j, amp, gridSize, duration);
}
CCJumpTiles3D* CCJumpTiles3D::create(int j, float amp, const ccGridSize& gridSize, float duration)
{
@ -1107,24 +958,10 @@ void CCJumpTiles3D::update(float time)
// implementation of CCSplitRows
// CCSplitRows* CCSplitRows::actionWithRows(int nRows, float duration)
// {
// CCSplitRows *pAction = new CCSplitRows();
//
// if (pAction)
// {
// if (pAction->initWithRows(nRows, duration))
// {
// pAction->autorelease();
// }
// else
// {
// CC_SAFE_RELEASE_NULL(pAction);
// }
// }
//
// return pAction;
// }
CCSplitRows* CCSplitRows::actionWithRows(int nRows, float duration)
{
return CCSplitRows::create(nRows, duration);
}
CCSplitRows* CCSplitRows::create(int nRows, float duration)
{
@ -1205,24 +1042,10 @@ void CCSplitRows::update(float time)
// implementation of CCSplitCols
// CCSplitCols* CCSplitCols::actionWithCols(int nCols, float duration)
// {
// CCSplitCols *pAction = new CCSplitCols();
//
// if (pAction)
// {
// if (pAction->initWithCols(nCols, duration))
// {
// pAction->autorelease();
// }
// else
// {
// CC_SAFE_RELEASE_NULL(pAction);
// }
// }
//
// return pAction;
// }
CCSplitCols* CCSplitCols::actionWithCols(int nCols, float duration)
{
return CCSplitCols::create(nCols, duration);
}
CCSplitCols* CCSplitCols::create(int nCols, float duration)
{

View File

@ -43,12 +43,10 @@ public:
/** creates the action with a range, whether or not to shake Z vertices, a grid size, and duration
@warning: This interface will be deprecated in future.
*/
//static CCShakyTiles3D* actionWithRange(int nRange, bool bShakeZ, const ccGridSize& gridSize,
// float duration);
static CCShakyTiles3D* actionWithRange(int nRange, bool bShakeZ, const ccGridSize& gridSize, float duration);
/** creates the action with a range, whether or not to shake Z vertices, a grid size, and duration */
static CCShakyTiles3D* create(int nRange, bool bShakeZ, const ccGridSize& gridSize,
float duration);
static CCShakyTiles3D* create(int nRange, bool bShakeZ, const ccGridSize& gridSize, float duration);
protected:
int m_nRandrange;
@ -70,8 +68,8 @@ public:
/** creates the action with a range, whether of not to shatter Z vertices, a grid size and duration
@warning: This interface will be deprecated in future.
*/
//static CCShatteredTiles3D* actionWithRange(int nRange, bool bShatterZ, const ccGridSize& gridSize,
// float duration);
static CCShatteredTiles3D* actionWithRange(int nRange, bool bShatterZ, const ccGridSize& gridSize,
float duration);
/** creates the action with a range, whether of not to shatter Z vertices, a grid size and duration */
static CCShatteredTiles3D* create(int nRange, bool bShatterZ, const ccGridSize& gridSize,
@ -104,7 +102,7 @@ public:
/** creates the action with a random seed, the grid size and the duration
@warning: This interface will be deprecated in future.
*/
//static CCShuffleTiles* actionWithSeed(int s, const ccGridSize& gridSize, float duration);
static CCShuffleTiles* actionWithSeed(int s, const ccGridSize& gridSize, float duration);
/** creates the action with a random seed, the grid size and the duration */
static CCShuffleTiles* create(int s, const ccGridSize& gridSize, float duration);
protected:
@ -130,7 +128,7 @@ public:
/** creates the action with the grid size and the duration
@warning: This interface will be deprecated in future.
*/
//static CCFadeOutTRTiles* actionWithSize(const ccGridSize& gridSize, float time);
static CCFadeOutTRTiles* actionWithSize(const ccGridSize& gridSize, float time);
/** creates the action with the grid size and the duration */
static CCFadeOutTRTiles* create(const ccGridSize& gridSize, float time);
@ -148,7 +146,7 @@ public:
/** creates the action with the grid size and the duration
@warning: This interface will be deprecated in future.
*/
//static CCFadeOutBLTiles* actionWithSize(const ccGridSize& gridSize, float time);
static CCFadeOutBLTiles* actionWithSize(const ccGridSize& gridSize, float time);
/** creates the action with the grid size and the duration */
static CCFadeOutBLTiles* create(const ccGridSize& gridSize, float time);
@ -167,7 +165,7 @@ public:
/** creates the action with the grid size and the duration
@warning: This interface will be deprecated in future.
*/
//static CCFadeOutUpTiles* actionWithSize(const ccGridSize& gridSize, float time);
static CCFadeOutUpTiles* actionWithSize(const ccGridSize& gridSize, float time);
/** creates the action with the grid size and the duration */
static CCFadeOutUpTiles* create(const ccGridSize& gridSize, float time);
@ -185,7 +183,7 @@ public:
/** creates the action with the grid size and the duration
@warning: This interface will be deprecated in future.
*/
//static CCFadeOutDownTiles* actionWithSize(const ccGridSize& gridSize, float time);
static CCFadeOutDownTiles* actionWithSize(const ccGridSize& gridSize, float time);
/** creates the action with the grid size and the duration */
static CCFadeOutDownTiles* create(const ccGridSize& gridSize, float time);
@ -212,11 +210,11 @@ public:
/** creates the action with the grid size and the duration
@warning: This interface will be deprecated in future.
*/
//static CCTurnOffTiles* actionWithSize(const ccGridSize& size, float d);
static CCTurnOffTiles* actionWithSize(const ccGridSize& size, float d);
/** creates the action with a random seed, the grid size and the duration
@warning: This interface will be deprecated in future.
*/
//static CCTurnOffTiles* actionWithSeed(int s, const ccGridSize& gridSize, float duration);
static CCTurnOffTiles* actionWithSeed(int s, const ccGridSize& gridSize, float duration);
/** creates the action with the grid size and the duration */
static CCTurnOffTiles* create(const ccGridSize& size, float d);
@ -251,7 +249,7 @@ public:
/** creates the action with a number of waves, the waves amplitude, the grid size and the duration
@warning: This interface will be deprecated in future.
*/
//static CCWavesTiles3D* actionWithWaves(int wav, float amp, const ccGridSize& gridSize, float duration);
static CCWavesTiles3D* actionWithWaves(int wav, float amp, const ccGridSize& gridSize, float duration);
/** creates the action with a number of waves, the waves amplitude, the grid size and the duration */
static CCWavesTiles3D* create(int wav, float amp, const ccGridSize& gridSize, float duration);
protected:
@ -283,7 +281,7 @@ public:
/** creates the action with the number of jumps, the sin amplitude, the grid size and the duration
@warning: This interface will be deprecated in future.
*/
//static CCJumpTiles3D* actionWithJumps(int j, float amp, const ccGridSize& gridSize, float duration);
static CCJumpTiles3D* actionWithJumps(int j, float amp, const ccGridSize& gridSize, float duration);
/** creates the action with the number of jumps, the sin amplitude, the grid size and the duration */
static CCJumpTiles3D* create(int j, float amp, const ccGridSize& gridSize, float duration);
protected:
@ -307,7 +305,7 @@ public:
/** creates the action with the number of rows to split and the duration
@warning: This interface will be deprecated in future.
*/
//static CCSplitRows* actionWithRows(int nRows, float duration);
static CCSplitRows* actionWithRows(int nRows, float duration);
/** creates the action with the number of rows to split and the duration */
static CCSplitRows* create(int nRows, float duration);
protected:
@ -330,7 +328,7 @@ public:
/** creates the action with the number of columns to split and the duration
@warning: This interface will be deprecated in future.
*/
//static CCSplitCols* actionWithCols(int nCols, float duration);
static CCSplitCols* actionWithCols(int nCols, float duration);
/** creates the action with the number of columns to split and the duration */
static CCSplitCols* create(int nCols, float duration);
protected:

View File

@ -27,19 +27,10 @@ THE SOFTWARE.
NS_CC_BEGIN
// CCActionTween* CCActionTween::actionWithDuration(float aDuration, const char* key, float from, float to)
// {
// CCActionTween* pRet = new CCActionTween();
// if (pRet && pRet->initWithDuration(aDuration, key, from, to))
// {
// pRet->autorelease();
// }
// else
// {
// CC_SAFE_DELETE(pRet);
// }
// return pRet;
// }
CCActionTween* CCActionTween::actionWithDuration(float aDuration, const char* key, float from, float to)
{
return CCActionTween::create(aDuration, key, from, to);
}
CCActionTween* CCActionTween::create(float aDuration, const char* key, float from, float to)
{

View File

@ -60,7 +60,7 @@ public:
/** creates an initializes the action with the property name (key), and the from and to parameters.
@warning: This interface will be deprecated in future.
*/
//static CCActionTween* actionWithDuration(float aDuration, const char* key, float from, float to);
static CCActionTween* actionWithDuration(float aDuration, const char* key, float from, float to);
/** creates an initializes the action with the property name (key), and the from and to parameters. */
static CCActionTween* create(float aDuration, const char* key, float from, float to);
/** initializes the action with the property name (key), and the from and to parameters. */

View File

@ -60,11 +60,11 @@ CCAtlasNode::~CCAtlasNode()
CC_SAFE_RELEASE(m_pTextureAtlas);
}
// CCAtlasNode * CCAtlasNode::atlasWithTileFile(const char *tile, unsigned int tileWidth, unsigned int tileHeight,
// unsigned int itemsToRender)
// {
// return CCAtlasNode::create(tile, tileWidth, tileHeight, itemsToRender);
// }
CCAtlasNode * CCAtlasNode::atlasWithTileFile(const char *tile, unsigned int tileWidth, unsigned int tileHeight,
unsigned int itemsToRender)
{
return CCAtlasNode::create(tile, tileWidth, tileHeight, itemsToRender);
}
CCAtlasNode * CCAtlasNode::create(const char *tile, unsigned int tileWidth, unsigned int tileHeight,
unsigned int itemsToRender)

View File

@ -79,8 +79,8 @@ public:
/** creates a CCAtlasNode with an Atlas file the width and height of each item and the quantity of items to render
@warning: This interface will be deprecated in future.
*/
// static CCAtlasNode * atlasWithTileFile(const char* tile,unsigned int tileWidth, unsigned int tileHeight,
// unsigned int itemsToRender);
static CCAtlasNode * atlasWithTileFile(const char* tile,unsigned int tileWidth, unsigned int tileHeight,
unsigned int itemsToRender);
/** creates a CCAtlasNode with an Atlas file the width and height of each item and the quantity of items to render*/
static CCAtlasNode * create(const char* tile,unsigned int tileWidth, unsigned int tileHeight,

View File

@ -437,10 +437,10 @@ CCRect CCNode::boundingBox()
return CCRectApplyAffineTransform(rect, nodeToParentTransform());
}
// CCNode * CCNode::node(void)
// {
// return CCNode::create();
// }
CCNode * CCNode::node(void)
{
return CCNode::create();
}
CCNode * CCNode::create(void)
{

View File

@ -300,7 +300,7 @@ public:
The node will be created as "autorelease".
@warning: This interface will be deprecated in future.
*/
//static CCNode * node(void);
static CCNode * node(void);
/** allocates and initializes a node.
The node will be created as "autorelease".

View File

@ -40,10 +40,10 @@ CCArray::CCArray(unsigned int capacity)
initWithCapacity(capacity);
}
// CCArray* CCArray::array()
// {
// return CCArray::create();
// }
CCArray* CCArray::array()
{
return CCArray::create();
}
CCArray* CCArray::create()
{
@ -61,10 +61,10 @@ CCArray* CCArray::create()
return pArray;
}
// CCArray* CCArray::arrayWithObject(CCObject* pObject)
// {
// return CCArray::createWithObject(pObject);
// }
CCArray* CCArray::arrayWithObject(CCObject* pObject)
{
return CCArray::createWithObject(pObject);
}
CCArray* CCArray::createWithObject(CCObject* pObject)
{
@ -82,31 +82,31 @@ CCArray* CCArray::createWithObject(CCObject* pObject)
return pArray;
}
// CCArray* CCArray::arrayWithObjects(CCObject* pObject, ...)
// {
// va_list args;
// va_start(args,pObject);
//
// CCArray* pArray = create();
// if (pArray && pObject)
// {
// pArray->addObject(pObject);
// CCObject *i = va_arg(args, CCObject*);
// while(i)
// {
// pArray->addObject(i);
// i = va_arg(args, CCObject*);
// }
// }
// else
// {
// CC_SAFE_DELETE(pArray);
// }
//
// va_end(args);
//
// return pArray;
// }
CCArray* CCArray::arrayWithObjects(CCObject* pObject, ...)
{
va_list args;
va_start(args,pObject);
CCArray* pArray = create();
if (pArray && pObject)
{
pArray->addObject(pObject);
CCObject *i = va_arg(args, CCObject*);
while(i)
{
pArray->addObject(i);
i = va_arg(args, CCObject*);
}
}
else
{
CC_SAFE_DELETE(pArray);
}
va_end(args);
return pArray;
}
CCArray* CCArray::create(CCObject* pObject, ...)
{
@ -134,10 +134,10 @@ CCArray* CCArray::create(CCObject* pObject, ...)
return pArray;
}
// CCArray* CCArray::arrayWithCapacity(unsigned int capacity)
// {
// return CCArray::create(capacity);
// }
CCArray* CCArray::arrayWithCapacity(unsigned int capacity)
{
return CCArray::create(capacity);
}
CCArray* CCArray::create(unsigned int capacity)
{
@ -155,10 +155,10 @@ CCArray* CCArray::create(unsigned int capacity)
return pArray;
}
// CCArray* CCArray::arrayWithArray(CCArray* otherArray)
// {
// return CCArray::create(otherArray);
// }
CCArray* CCArray::arrayWithArray(CCArray* otherArray)
{
return CCArray::create(otherArray);
}
CCArray* CCArray::create(CCArray* otherArray)
{
@ -167,10 +167,10 @@ CCArray* CCArray::create(CCArray* otherArray)
return pRet;
}
// CCArray* CCArray::arrayWithContentsOfFile(const char* pFileName)
// {
// return CCArray::createWithContentsOfFile(pFileName);
// }
CCArray* CCArray::arrayWithContentsOfFile(const char* pFileName)
{
return CCArray::createWithContentsOfFile(pFileName);
}
CCArray* CCArray::createWithContentsOfFile(const char* pFileName)
{
@ -184,10 +184,10 @@ CCArray* CCArray::createWithContentsOfFile(const char* pFileName)
extern CCArray* ccFileUtils_arrayWithContentsOfFileThreadSafe(const char* pFileName);
// CCArray* CCArray::arrayWithContentsOfFileThreadSafe(const char* pFileName)
// {
// return CCArray::createWithContentsOfFileThreadSafe(pFileName);
// }
CCArray* CCArray::arrayWithContentsOfFileThreadSafe(const char* pFileName)
{
return CCArray::createWithContentsOfFileThreadSafe(pFileName);
}
CCArray* CCArray::createWithContentsOfFileThreadSafe(const char* pFileName)
{

View File

@ -113,37 +113,37 @@ public:
/** Create an array
@warning: This interface will be deprecated in future.
*/
//static CCArray* array();
static CCArray* array();
/** Create an array with one object
@warning: This interface will be deprecated in future.
*/
//static CCArray* arrayWithObject(CCObject* pObject);
static CCArray* arrayWithObject(CCObject* pObject);
/** Create an array with some objects
@warning: This interface will be deprecated in future.
*/
//static CCArray* arrayWithObjects(CCObject* pObject, ...);
static CCArray* arrayWithObjects(CCObject* pObject, ...);
/** Create an array with capacity
@warning: This interface will be deprecated in future.
*/
//static CCArray* arrayWithCapacity(unsigned int capacity);
static CCArray* arrayWithCapacity(unsigned int capacity);
/** Create an array with an existing array
@warning: This interface will be deprecated in future.
*/
//static CCArray* arrayWithArray(CCArray* otherArray);
static CCArray* arrayWithArray(CCArray* otherArray);
/**
@brief Generate a CCArray pointer by file
@param pFileName The file name of *.plist file
@return The CCArray pointer generated from the file
@warning: This interface will be deprecated in future.
*/
//static CCArray* arrayWithContentsOfFile(const char* pFileName);
static CCArray* arrayWithContentsOfFile(const char* pFileName);
/*
@brief The same meaning as arrayWithContentsOfFile(), but it doesn't call autorelease, so the
invoker should call release().
@warning: This interface will be deprecated in future.
*/
//static CCArray* arrayWithContentsOfFileThreadSafe(const char* pFileName);
static CCArray* arrayWithContentsOfFileThreadSafe(const char* pFileName);
/** Create an array */
static CCArray* create();

View File

@ -292,10 +292,10 @@ CCObject* CCDictionary::copyWithZone(CCZone* pZone)
return pNewDict;
}
// CCDictionary* CCDictionary::dictionary()
// {
// return CCDictionary::create();
// }
CCDictionary* CCDictionary::dictionary()
{
return CCDictionary::create();
}
CCDictionary* CCDictionary::create()
{
@ -307,10 +307,10 @@ CCDictionary* CCDictionary::create()
return pRet;
}
// CCDictionary* CCDictionary::dictionaryWithDictionary(CCDictionary* srcDict)
// {
// return CCDictionary::createWithDictionary(srcDict);
// }
CCDictionary* CCDictionary::dictionaryWithDictionary(CCDictionary* srcDict)
{
return CCDictionary::createWithDictionary(srcDict);
}
CCDictionary* CCDictionary::createWithDictionary(CCDictionary* srcDict)
{
@ -321,20 +321,20 @@ CCDictionary* CCDictionary::createWithDictionary(CCDictionary* srcDict)
extern CCDictionary* ccFileUtils_dictionaryWithContentsOfFileThreadSafe(const char *pFileName);
// CCDictionary* CCDictionary::dictionaryWithContentsOfFileThreadSafe(const char *pFileName)
// {
// return CCDictionary::createWithContentsOfFileThreadSafe(pFileName);
// }
CCDictionary* CCDictionary::dictionaryWithContentsOfFileThreadSafe(const char *pFileName)
{
return CCDictionary::createWithContentsOfFileThreadSafe(pFileName);
}
CCDictionary* CCDictionary::createWithContentsOfFileThreadSafe(const char *pFileName)
{
return ccFileUtils_dictionaryWithContentsOfFileThreadSafe(pFileName);
}
// CCDictionary* CCDictionary::dictionaryWithContentsOfFile(const char *pFileName)
// {
// return CCDictionary::createWithContentsOfFile(pFileName);
// }
CCDictionary* CCDictionary::dictionaryWithContentsOfFile(const char *pFileName)
{
return CCDictionary::createWithContentsOfFile(pFileName);
}
CCDictionary* CCDictionary::createWithContentsOfFile(const char *pFileName)
{

View File

@ -137,23 +137,23 @@ public:
/* static functions */
//@warning: This interface will be deprecated in future.
//static CCDictionary* dictionary();
static CCDictionary* dictionary();
//static CCDictionary* dictionaryWithDictionary(CCDictionary* srcDict);
static CCDictionary* dictionaryWithDictionary(CCDictionary* srcDict);
/**
@brief Generate a CCDictionary pointer by file
@param pFileName The file name of *.plist file
@return The CCDictionary pointer generated from the file
@warning: This interface will be deprecated in future.
*/
//static CCDictionary* dictionaryWithContentsOfFile(const char *pFileName);
static CCDictionary* dictionaryWithContentsOfFile(const char *pFileName);
/*
@brief The same meaning as dictionaryWithContentsOfFile(), but it doesn't call autorelease, so the
invoker should call release().
@warning: This interface will be deprecated in future.
*/
//static CCDictionary* dictionaryWithContentsOfFileThreadSafe(const char *pFileName);
static CCDictionary* dictionaryWithContentsOfFileThreadSafe(const char *pFileName);
static CCDictionary* create();

View File

@ -13,10 +13,10 @@ public:
int getValue() const {return m_nValue;}
// @warning: This interface will be deprecated in future.
// static CCInteger* integerWithInt(int v)
// {
// return CCInteger::create(v);
// }
static CCInteger* integerWithInt(int v)
{
return CCInteger::create(v);
}
static CCInteger* create(int v)
{

View File

@ -145,10 +145,10 @@ bool CCString::isEqual(const CCObject* pObject)
return bRet;
}
// CCString* CCString::stringWithCString(const char* pStr)
// {
// return CCString::create(pStr);
// }
CCString* CCString::stringWithCString(const char* pStr)
{
return CCString::create(pStr);
}
CCString* CCString::create(const char* pStr)
{
@ -157,10 +157,10 @@ CCString* CCString::create(const char* pStr)
return pRet;
}
// CCString* CCString::stringWithData(unsigned char* pData, unsigned long nLen)
// {
// return CCString::createWithData(pData, nLen);
// }
CCString* CCString::stringWithData(unsigned char* pData, unsigned long nLen)
{
return CCString::createWithData(pData, nLen);
}
CCString* CCString::createWithData(unsigned char* pData, unsigned long nLen)
{
@ -179,16 +179,16 @@ CCString* CCString::createWithData(unsigned char* pData, unsigned long nLen)
return pRet;
}
// CCString* CCString::stringWithFormat(const char* format, ...)
// {
// CCString* pRet = CCString::create("");
// va_list ap;
// va_start(ap, format);
// pRet->initWithFormatAndValist(format, ap);
// va_end(ap);
//
// return pRet;
// }
CCString* CCString::stringWithFormat(const char* format, ...)
{
CCString* pRet = CCString::create("");
va_list ap;
va_start(ap, format);
pRet->initWithFormatAndValist(format, ap);
va_end(ap);
return pRet;
}
CCString* CCString::createWithFormat(const char* format, ...)
{
@ -201,10 +201,10 @@ CCString* CCString::createWithFormat(const char* format, ...)
return pRet;
}
// CCString* CCString::stringWithContentsOfFile(const char* pszFileName)
// {
// return CCString::createWithContentsOfFile(pszFileName);
// }
CCString* CCString::stringWithContentsOfFile(const char* pszFileName)
{
return CCString::createWithContentsOfFile(pszFileName);
}
CCString* CCString::createWithContentsOfFile(const char* pszFileName)
{

View File

@ -76,7 +76,7 @@ public:
* it means that you needn't do a release operation unless you retain it.
@warning: This interface will be deprecated in future.
*/
//static CCString* stringWithCString(const char* pStr);
static CCString* stringWithCString(const char* pStr);
/** create a string with format, it's similar with the c function 'sprintf', the default buffer size is (1024*100) bytes,
* if you want to change it, you should modify the kMaxStringLen macro in CCString.cpp file.
@ -84,21 +84,21 @@ public:
* it means that you needn't do a release operation unless you retain it.
@warning: This interface will be deprecated in future.
*/
//static CCString* stringWithFormat(const char* format, ...);
static CCString* stringWithFormat(const char* format, ...);
/** create a string with binary data
* @return A CCString pointer which is an autorelease object pointer,
* it means that you needn't do a release operation unless you retain it.
@warning: This interface will be deprecated in future.
*/
//static CCString* stringWithData(unsigned char* pData, unsigned long nLen);
static CCString* stringWithData(unsigned char* pData, unsigned long nLen);
/** create a string with a file,
* @return A CCString pointer which is an autorelease object pointer,
* it means that you needn't do a release operation unless you retain it.
@warning: This interface will be deprecated in future.
*/
//static CCString* stringWithContentsOfFile(const char* pszFileName);
static CCString* stringWithContentsOfFile(const char* pszFileName);
/** create a string with c string
* @return A CCString pointer which is an autorelease object pointer,

View File

@ -39,10 +39,10 @@ THE SOFTWARE.
NS_CC_BEGIN
// implementation of CCGridBase
// CCGridBase* CCGridBase::gridWithSize(const ccGridSize& gridSize)
// {
// return CCGridBase::create(gridSize);
// }
CCGridBase* CCGridBase::gridWithSize(const ccGridSize& gridSize)
{
return CCGridBase::create(gridSize);
}
CCGridBase* CCGridBase::create(const ccGridSize& gridSize)
{
@ -63,10 +63,10 @@ CCGridBase* CCGridBase::create(const ccGridSize& gridSize)
return pGridBase;
}
// CCGridBase* CCGridBase::gridWithSize(const ccGridSize& gridSize, CCTexture2D *texture, bool flipped)
// {
// return CCGridBase::create(gridSize, texture, flipped);
// }
CCGridBase* CCGridBase::gridWithSize(const ccGridSize& gridSize, CCTexture2D *texture, bool flipped)
{
return CCGridBase::create(gridSize, texture, flipped);
}
CCGridBase* CCGridBase::create(const ccGridSize& gridSize, CCTexture2D *texture, bool flipped)
{

View File

@ -79,11 +79,11 @@ public:
/** create one Grid
@warning: This interface will be deprecated in future.
*/
//static CCGridBase* gridWithSize(const ccGridSize& gridSize, CCTexture2D *texture, bool flipped);
static CCGridBase* gridWithSize(const ccGridSize& gridSize, CCTexture2D *texture, bool flipped);
/** create one Grid
@warning: This interface will be deprecated in future.
*/
//static CCGridBase* gridWithSize(const ccGridSize& gridSize);
static CCGridBase* gridWithSize(const ccGridSize& gridSize);
/** create one Grid */
static CCGridBase* create(const ccGridSize& gridSize, CCTexture2D *texture, bool flipped);

View File

@ -122,10 +122,10 @@ bool CCControlButton::initWithLabelAndBackgroundSprite(CCNode* node, CCScale9Spr
return false;
}
// CCControlButton* CCControlButton::buttonWithLabelAndBackgroundSprite(CCNode* label, CCScale9Sprite* backgroundSprite)
// {
// return CCControlButton::create(label, backgroundSprite);
// }
CCControlButton* CCControlButton::buttonWithLabelAndBackgroundSprite(CCNode* label, CCScale9Sprite* backgroundSprite)
{
return CCControlButton::create(label, backgroundSprite);
}
CCControlButton* CCControlButton::create(CCNode* label, CCScale9Sprite* backgroundSprite)
{
@ -141,10 +141,10 @@ bool CCControlButton::initWithTitleAndFontNameAndFontSize(string title, const ch
return initWithLabelAndBackgroundSprite(label, CCScale9Sprite::create());
}
// CCControlButton* CCControlButton::buttonWithTitleAndFontNameAndFontSize(string title, const char * fontName, float fontSize)
// {
// return CCControlButton::create(title, fontName, fontSize);
// }
CCControlButton* CCControlButton::buttonWithTitleAndFontNameAndFontSize(string title, const char * fontName, float fontSize)
{
return CCControlButton::create(title, fontName, fontSize);
}
CCControlButton* CCControlButton::create(string title, const char * fontName, float fontSize)
{
@ -160,10 +160,10 @@ bool CCControlButton::initWithBackgroundSprite(CCScale9Sprite* sprite)
return initWithLabelAndBackgroundSprite(label, sprite);
}
// CCControlButton* CCControlButton::buttonWithBackgroundSprite(CCScale9Sprite* sprite)
// {
// return CCControlButton::create(sprite);
// }
CCControlButton* CCControlButton::buttonWithBackgroundSprite(CCScale9Sprite* sprite)
{
return CCControlButton::create(sprite);
}
CCControlButton* CCControlButton::create(CCScale9Sprite* sprite)
{

View File

@ -95,19 +95,19 @@ protected:
public:
virtual bool initWithLabelAndBackgroundSprite(CCNode* label, CCScale9Sprite* backgroundSprite);
//@warning: This interface will be deprecated in future.
//static CCControlButton* buttonWithLabelAndBackgroundSprite(CCNode* label, CCScale9Sprite* backgroundSprite);
static CCControlButton* buttonWithLabelAndBackgroundSprite(CCNode* label, CCScale9Sprite* backgroundSprite);
static CCControlButton* create(CCNode* label, CCScale9Sprite* backgroundSprite);
virtual bool initWithTitleAndFontNameAndFontSize(std::string title, const char * fontName, float fontSize);
//@warning: This interface will be deprecated in future.
//static CCControlButton* buttonWithTitleAndFontNameAndFontSize(std::string title, const char * fontName, float fontSize);
static CCControlButton* buttonWithTitleAndFontNameAndFontSize(std::string title, const char * fontName, float fontSize);
static CCControlButton* create(std::string title, const char * fontName, float fontSize);
virtual bool initWithBackgroundSprite(CCScale9Sprite* sprite);
//@warning: This interface will be deprecated in future.
//static CCControlButton* buttonWithBackgroundSprite(CCScale9Sprite* sprite);
static CCControlButton* buttonWithBackgroundSprite(CCScale9Sprite* sprite);
static CCControlButton* create(CCScale9Sprite* sprite);

View File

@ -87,10 +87,10 @@ bool CCControlColourPicker::init()
return false;
}
// CCControlColourPicker* CCControlColourPicker::colourPicker()
// {
// return CCControlColourPicker::create();
// }
CCControlColourPicker* CCControlColourPicker::colourPicker()
{
return CCControlColourPicker::create();
}
CCControlColourPicker* CCControlColourPicker::create()
{

View File

@ -53,7 +53,7 @@ protected:
public:
//@warning: This interface will be deprecated in future.
//static CCControlColourPicker* colourPicker();
static CCControlColourPicker* colourPicker();
static CCControlColourPicker* create();

View File

@ -38,10 +38,10 @@ CCControlHuePicker::~CCControlHuePicker()
}
// CCControlHuePicker* CCControlHuePicker::pickerWithTargetAndPos(CCNode* target, CCPoint pos)
// {
// return CCControlHuePicker::create(target, pos);
// }
CCControlHuePicker* CCControlHuePicker::pickerWithTargetAndPos(CCNode* target, CCPoint pos)
{
return CCControlHuePicker::create(target, pos);
}
CCControlHuePicker* CCControlHuePicker::create(CCNode* target, CCPoint pos)
{

View File

@ -55,7 +55,7 @@ public:
virtual ~CCControlHuePicker();
virtual bool initWithTargetAndPos(CCNode* target, CCPoint pos);
//@warning: This interface will be deprecated in future.
//static CCControlHuePicker* pickerWithTargetAndPos(CCNode* target, CCPoint pos);
static CCControlHuePicker* pickerWithTargetAndPos(CCNode* target, CCPoint pos);
static CCControlHuePicker* create(CCNode* target, CCPoint pos);
protected:
void updateSliderPosition(CCPoint location);

View File

@ -58,10 +58,10 @@ bool CCControlSaturationBrightnessPicker::initWithTargetAndPos(CCNode* target, C
return false;
}
// CCControlSaturationBrightnessPicker* CCControlSaturationBrightnessPicker::pickerWithTargetAndPos(CCNode* target, CCPoint pos)
// {
// return CCControlSaturationBrightnessPicker::create(target, pos);
// }
CCControlSaturationBrightnessPicker* CCControlSaturationBrightnessPicker::pickerWithTargetAndPos(CCNode* target, CCPoint pos)
{
return CCControlSaturationBrightnessPicker::create(target, pos);
}
CCControlSaturationBrightnessPicker* CCControlSaturationBrightnessPicker::create(CCNode* target, CCPoint pos)
{

View File

@ -58,7 +58,7 @@ public:
virtual bool initWithTargetAndPos(CCNode* target, CCPoint pos);
//@warning: This interface will be deprecated in future.
//static CCControlSaturationBrightnessPicker* pickerWithTargetAndPos(CCNode* target, CCPoint pos);
static CCControlSaturationBrightnessPicker* pickerWithTargetAndPos(CCNode* target, CCPoint pos);
static CCControlSaturationBrightnessPicker* create(CCNode* target, CCPoint pos);
virtual void updateWithHSV(HSV hsv);
virtual void updateDraggerWithHSV(HSV hsv);

View File

@ -38,10 +38,10 @@ CCControlSlider::~CCControlSlider()
}
// CCControlSlider* CCControlSlider::sliderWithFiles(const char* bgFile, const char* progressFile, const char* thumbFile)
// {
// return CCControlSlider::create(bgFile, progressFile, thumbFile);
// }
CCControlSlider* CCControlSlider::sliderWithFiles(const char* bgFile, const char* progressFile, const char* thumbFile)
{
return CCControlSlider::create(bgFile, progressFile, thumbFile);
}
CCControlSlider* CCControlSlider::create(const char* bgFile, const char* progressFile, const char* thumbFile)
{
@ -61,10 +61,10 @@ CCControlSlider* CCControlSlider::create(const char* bgFile, const char* progres
return CCControlSlider::create(backgroundSprite, progressSprite, thumbMenuItem);
}
// CCControlSlider* CCControlSlider::sliderWithSprites(CCSprite * backgroundSprite, CCSprite* pogressSprite, CCMenuItem* thumbItem)
// {
// return CCControlSlider::create(backgroundSprite, pogressSprite, thumbItem);
// }
CCControlSlider* CCControlSlider::sliderWithSprites(CCSprite * backgroundSprite, CCSprite* pogressSprite, CCMenuItem* thumbItem)
{
return CCControlSlider::create(backgroundSprite, pogressSprite, thumbItem);
}
CCControlSlider* CCControlSlider::create(CCSprite * backgroundSprite, CCSprite* pogressSprite, CCMenuItem* thumbItem)
{

View File

@ -77,7 +77,7 @@ public:
* thumb image filename.
@warning: This interface will be deprecated in future.
*/
//static CCControlSlider* sliderWithFiles(const char* bgFile, const char* progressFile, const char* thumbFile);
static CCControlSlider* sliderWithFiles(const char* bgFile, const char* progressFile, const char* thumbFile);
/**
* Creates a slider with a given background sprite and a progress bar and a
@ -85,7 +85,7 @@ public:
*@warning: This interface will be deprecated in future.
* @see initWithBackgroundSprite:progressSprite:thumbMenuItem:
*/
//static CCControlSlider* sliderWithSprites(CCSprite * backgroundSprite, CCSprite* pogressSprite, CCMenuItem* thumbItem);
static CCControlSlider* sliderWithSprites(CCSprite * backgroundSprite, CCSprite* pogressSprite, CCMenuItem* thumbItem);
/**

View File

@ -273,10 +273,10 @@ bool CCControlSwitch::initWithMaskSprite(CCSprite *maskSprite, CCSprite * onSpri
return initWithMaskSprite(maskSprite, onSprite, offSprite, thumbSprite, NULL, NULL);
}
// CCControlSwitch* CCControlSwitch::switchWithMaskSprite(CCSprite *maskSprite, CCSprite * onSprite, CCSprite * offSprite, CCSprite * thumbSprite)
// {
// return CCControlSwitch::create(maskSprite, onSprite, offSprite, thumbSprite);
// }
CCControlSwitch* CCControlSwitch::switchWithMaskSprite(CCSprite *maskSprite, CCSprite * onSprite, CCSprite * offSprite, CCSprite * thumbSprite)
{
return CCControlSwitch::create(maskSprite, onSprite, offSprite, thumbSprite);
}
CCControlSwitch* CCControlSwitch::create(CCSprite *maskSprite, CCSprite * onSprite, CCSprite * offSprite, CCSprite * thumbSprite)
{
@ -322,10 +322,10 @@ bool CCControlSwitch::initWithMaskSprite(CCSprite *maskSprite, CCSprite * onSpri
return false;
}
// CCControlSwitch* CCControlSwitch::switchWithMaskSprite(CCSprite *maskSprite, CCSprite * onSprite, CCSprite * offSprite, CCSprite * thumbSprite, CCLabelTTF* onLabel, CCLabelTTF* offLabel)
// {
// return CCControlSwitch::create(maskSprite, onSprite, offSprite, thumbSprite, onLabel, offLabel);
// }
CCControlSwitch* CCControlSwitch::switchWithMaskSprite(CCSprite *maskSprite, CCSprite * onSprite, CCSprite * offSprite, CCSprite * thumbSprite, CCLabelTTF* onLabel, CCLabelTTF* offLabel)
{
return CCControlSwitch::create(maskSprite, onSprite, offSprite, thumbSprite, onLabel, offLabel);
}
CCControlSwitch* CCControlSwitch::create(CCSprite *maskSprite, CCSprite * onSprite, CCSprite * offSprite, CCSprite * thumbSprite, CCLabelTTF* onLabel, CCLabelTTF* offLabel)
{

View File

@ -49,7 +49,7 @@ public:
/** Creates a switch with a mask sprite, on/off sprites for on/off states and a thumb sprite.
@warning: This interface will be deprecated in future.
*/
//static CCControlSwitch* switchWithMaskSprite(CCSprite *maskSprite, CCSprite * onSprite, CCSprite * offSprite, CCSprite * thumbSprite);
static CCControlSwitch* switchWithMaskSprite(CCSprite *maskSprite, CCSprite * onSprite, CCSprite * offSprite, CCSprite * thumbSprite);
/** Creates a switch with a mask sprite, on/off sprites for on/off states and a thumb sprite. */
static CCControlSwitch* create(CCSprite *maskSprite, CCSprite * onSprite, CCSprite * offSprite, CCSprite * thumbSprite);
@ -61,7 +61,7 @@ public:
/** Creates a switch with a mask sprite, on/off sprites for on/off states, a thumb sprite and an on/off labels.
@warning: This interface will be deprecated in future.
*/
//static CCControlSwitch* switchWithMaskSprite(CCSprite *maskSprite, CCSprite * onSprite, CCSprite * offSprite, CCSprite * thumbSprite, CCLabelTTF* onLabel, CCLabelTTF* offLabel);
static CCControlSwitch* switchWithMaskSprite(CCSprite *maskSprite, CCSprite * onSprite, CCSprite * offSprite, CCSprite * thumbSprite, CCLabelTTF* onLabel, CCLabelTTF* offLabel);
/** Creates a switch with a mask sprite, on/off sprites for on/off states, a thumb sprite and an on/off labels. */
static CCControlSwitch* create(CCSprite *maskSprite, CCSprite * onSprite, CCSprite * offSprite, CCSprite * thumbSprite, CCLabelTTF* onLabel, CCLabelTTF* offLabel);

View File

@ -16,31 +16,31 @@ enum
//
//CCMenu
//
// CCMenuPassive* CCMenuPassive::node()
// {
// return CCMenuPassive::create();
// }
CCMenuPassive* CCMenuPassive::node()
{
return CCMenuPassive::create();
}
CCMenuPassive* CCMenuPassive::create()
{
return create(NULL, NULL);
}
// CCMenuPassive * CCMenuPassive::menuWithItems(CCNode* item, ...)
// {
// va_list args;
// va_start(args,item);
// CCMenuPassive *pRet = new CCMenuPassive();
// if (pRet && pRet->initWithItems(item, args))
// {
// pRet->autorelease();
// va_end(args);
// return pRet;
// }
// va_end(args);
// CC_SAFE_DELETE(pRet);
// return NULL;
// }
CCMenuPassive * CCMenuPassive::menuWithItems(CCNode* item, ...)
{
va_list args;
va_start(args,item);
CCMenuPassive *pRet = new CCMenuPassive();
if (pRet && pRet->initWithItems(item, args))
{
pRet->autorelease();
va_end(args);
return pRet;
}
va_end(args);
CC_SAFE_DELETE(pRet);
return NULL;
}
CCMenuPassive * CCMenuPassive::create(CCNode* item, ...)
{
@ -58,10 +58,10 @@ CCMenuPassive * CCMenuPassive::create(CCNode* item, ...)
return NULL;
}
// CCMenuPassive* CCMenuPassive::menuWithItem(CCNode* item)
// {
// return CCMenuPassive::createWithItem(item);
// }
CCMenuPassive* CCMenuPassive::menuWithItem(CCNode* item)
{
return CCMenuPassive::createWithItem(item);
}
CCMenuPassive* CCMenuPassive::createWithItem(CCNode* item)
{

View File

@ -20,19 +20,19 @@ public:
/** creates an empty CCMenu
@warning: This interface will be deprecated in future.
*/
//static CCMenuPassive* node();
static CCMenuPassive* node();
/** creates a CCMenu with it's items
@warning: This interface will be deprecated in future.
*/
//static CCMenuPassive* menuWithItems(CCNode* item, ...);
static CCMenuPassive* menuWithItems(CCNode* item, ...);
/** creates a CCMenu with it's item, then use addChild() to add
* other items. It is used for script, it can't init with undetermined
* number of variables.
@warning: This interface will be deprecated in future.
*/
//static CCMenuPassive* menuWithItem(CCNode* item);
static CCMenuPassive* menuWithItem(CCNode* item);
/** creates an empty CCMenu */
static CCMenuPassive* create();

View File

@ -194,10 +194,10 @@ bool CCScale9Sprite::initWithFile(const char* file, CCRect rect, CCRect capInse
return pReturn;
}
// CCScale9Sprite* CCScale9Sprite::spriteWithFile(const char* file, CCRect rect, CCRect capInsets)
// {
// return CCScale9Sprite::create(file, rect, capInsets);
// }
CCScale9Sprite* CCScale9Sprite::spriteWithFile(const char* file, CCRect rect, CCRect capInsets)
{
return CCScale9Sprite::create(file, rect, capInsets);
}
CCScale9Sprite* CCScale9Sprite::create(const char* file, CCRect rect, CCRect capInsets)
{
@ -217,10 +217,10 @@ bool CCScale9Sprite::initWithFile(const char* file, CCRect rect)
return pReturn;
}
// CCScale9Sprite* CCScale9Sprite::spriteWithFile(const char* file, CCRect rect)
// {
// return CCScale9Sprite::create(file, rect);
// }
CCScale9Sprite* CCScale9Sprite::spriteWithFile(const char* file, CCRect rect)
{
return CCScale9Sprite::create(file, rect);
}
CCScale9Sprite* CCScale9Sprite::create(const char* file, CCRect rect)
{
@ -241,10 +241,10 @@ bool CCScale9Sprite::initWithFile(CCRect capInsets, const char* file)
return pReturn;
}
// CCScale9Sprite* CCScale9Sprite::spriteWithFile(CCRect capInsets, const char* file)
// {
// return CCScale9Sprite::create(capInsets, file);
// }
CCScale9Sprite* CCScale9Sprite::spriteWithFile(CCRect capInsets, const char* file)
{
return CCScale9Sprite::create(capInsets, file);
}
CCScale9Sprite* CCScale9Sprite::create(CCRect capInsets, const char* file)
{
@ -265,10 +265,10 @@ bool CCScale9Sprite::initWithFile(const char* file)
}
// CCScale9Sprite* CCScale9Sprite::spriteWithFile(const char* file)
// {
// return CCScale9Sprite::create(file);
// }
CCScale9Sprite* CCScale9Sprite::spriteWithFile(const char* file)
{
return CCScale9Sprite::create(file);
}
CCScale9Sprite* CCScale9Sprite::create(const char* file)
{
@ -291,10 +291,10 @@ bool CCScale9Sprite::initWithSpriteFrame(CCSpriteFrame* spriteFrame, CCRect capI
return pReturn;
}
// CCScale9Sprite* CCScale9Sprite::spriteWithSpriteFrame(CCSpriteFrame* spriteFrame, CCRect capInsets)
// {
// return CCScale9Sprite::createWithSpriteFrame(spriteFrame, capInsets);
// }
CCScale9Sprite* CCScale9Sprite::spriteWithSpriteFrame(CCSpriteFrame* spriteFrame, CCRect capInsets)
{
return CCScale9Sprite::createWithSpriteFrame(spriteFrame, capInsets);
}
CCScale9Sprite* CCScale9Sprite::createWithSpriteFrame(CCSpriteFrame* spriteFrame, CCRect capInsets)
{
@ -314,10 +314,10 @@ bool CCScale9Sprite::initWithSpriteFrame(CCSpriteFrame* spriteFrame)
}
// CCScale9Sprite* CCScale9Sprite::spriteWithSpriteFrame(CCSpriteFrame* spriteFrame)
// {
// return CCScale9Sprite::createWithSpriteFrame(spriteFrame);
// }
CCScale9Sprite* CCScale9Sprite::spriteWithSpriteFrame(CCSpriteFrame* spriteFrame)
{
return CCScale9Sprite::createWithSpriteFrame(spriteFrame);
}
CCScale9Sprite* CCScale9Sprite::createWithSpriteFrame(CCSpriteFrame* spriteFrame)
{
@ -340,10 +340,10 @@ bool CCScale9Sprite::initWithSpriteFrameName(const char* spriteFrameName, CCRect
return pReturn;
}
// CCScale9Sprite* CCScale9Sprite::spriteWithSpriteFrameName(const char* spriteFrameName, CCRect capInsets)
// {
// return CCScale9Sprite::createWithSpriteFrameName(spriteFrameName, capInsets);
// }
CCScale9Sprite* CCScale9Sprite::spriteWithSpriteFrameName(const char* spriteFrameName, CCRect capInsets)
{
return CCScale9Sprite::createWithSpriteFrameName(spriteFrameName, capInsets);
}
CCScale9Sprite* CCScale9Sprite::createWithSpriteFrameName(const char* spriteFrameName, CCRect capInsets)
{
@ -364,10 +364,10 @@ bool CCScale9Sprite::initWithSpriteFrameName(const char* spriteFrameName)
return pReturn;
}
// CCScale9Sprite* CCScale9Sprite::spriteWithSpriteFrameName(const char* spriteFrameName)
// {
// return CCScale9Sprite::createWithSpriteFrameName(spriteFrameName);
// }
CCScale9Sprite* CCScale9Sprite::spriteWithSpriteFrameName(const char* spriteFrameName)
{
return CCScale9Sprite::createWithSpriteFrameName(spriteFrameName);
}
CCScale9Sprite* CCScale9Sprite::createWithSpriteFrameName(const char* spriteFrameName)
{
@ -394,10 +394,10 @@ CCScale9Sprite* CCScale9Sprite::resizableSpriteWithCapInsets(CCRect capInsets)
return NULL;
}
// CCScale9Sprite* CCScale9Sprite::node()
// {
// return CCScale9Sprite::create();
// }
CCScale9Sprite* CCScale9Sprite::node()
{
return CCScale9Sprite::create();
}
CCScale9Sprite* CCScale9Sprite::create()
{

View File

@ -103,7 +103,7 @@ public:
* @see initWithFile:rect:centerRegion:
@warning: This interface will be deprecated in future.
*/
//static CCScale9Sprite* spriteWithFile(const char* file, CCRect rect, CCRect capInsets);
static CCScale9Sprite* spriteWithFile(const char* file, CCRect rect, CCRect capInsets);
/**
* Creates a 9-slice sprite with a texture file, a delimitation zone and
@ -134,7 +134,7 @@ public:
* @see initWithFile:rect:
@warning: This interface will be deprecated in future.
*/
//static CCScale9Sprite* spriteWithFile(const char* file, CCRect rect);
static CCScale9Sprite* spriteWithFile(const char* file, CCRect rect);
/**
* Creates a 9-slice sprite with a texture file and a delimitation zone. The
@ -163,7 +163,7 @@ public:
* @see initWithFile:capInsets:
@warning: This interface will be deprecated in future.
*/
//static CCScale9Sprite* spriteWithFile(CCRect capInsets, const char* file);
static CCScale9Sprite* spriteWithFile(CCRect capInsets, const char* file);
/**
* Creates a 9-slice sprite with a texture file. The whole texture will be
* broken down into a 3×3 grid of equal blocks.
@ -191,7 +191,7 @@ public:
* @see initWithFile:
@warning: This interface will be deprecated in future.
*/
//static CCScale9Sprite* spriteWithFile(const char* file);
static CCScale9Sprite* spriteWithFile(const char* file);
/**
* Creates a 9-slice sprite with a texture file. The whole texture will be
@ -222,7 +222,7 @@ public:
* @see initWithSpriteFrame:centerRegion:
@warning: This interface will be deprecated in future.
*/
//static CCScale9Sprite* spriteWithSpriteFrame(CCSpriteFrame* spriteFrame, CCRect capInsets);
static CCScale9Sprite* spriteWithSpriteFrame(CCSpriteFrame* spriteFrame, CCRect capInsets);
/**
* Creates a 9-slice sprite with an sprite frame and the centre of its zone.
@ -252,7 +252,7 @@ public:
* @see initWithSpriteFrame:
@warning: This interface will be deprecated in future.
*/
//static CCScale9Sprite* spriteWithSpriteFrame(CCSpriteFrame* spriteFrame);
static CCScale9Sprite* spriteWithSpriteFrame(CCSpriteFrame* spriteFrame);
/**
* Creates a 9-slice sprite with an sprite frame.
@ -285,7 +285,7 @@ public:
* @see initWithSpriteFrameName:centerRegion:
@warning: This interface will be deprecated in future.
*/
//static CCScale9Sprite* spriteWithSpriteFrameName(const char*spriteFrameName, CCRect capInsets);
static CCScale9Sprite* spriteWithSpriteFrameName(const char*spriteFrameName, CCRect capInsets);
/**
* Creates a 9-slice sprite with an sprite frame name and the centre of its
@ -317,7 +317,7 @@ public:
* @see initWithSpriteFrameName:
@warning: This interface will be deprecated in future.
*/
//static CCScale9Sprite* spriteWithSpriteFrameName(const char*spriteFrameName);
static CCScale9Sprite* spriteWithSpriteFrameName(const char*spriteFrameName);
/**
* Creates a 9-slice sprite with an sprite frame name.
@ -340,7 +340,7 @@ public:
CCScale9Sprite* resizableSpriteWithCapInsets(CCRect capInsets);
//static CCScale9Sprite* node();
static CCScale9Sprite* node();
static CCScale9Sprite* create();

View File

@ -35,10 +35,10 @@ NS_CC_EXT_BEGIN
/******************************************
**************Public Functions*************
*******************************************/
// CCListView* CCListView::viewWithMode(CCListViewMode mode)
// {
// return CCListView::create(mode);
// }
CCListView* CCListView::viewWithMode(CCListViewMode mode)
{
return CCListView::create(mode);
}
CCListView* CCListView::create(CCListViewMode mode)
{

View File

@ -122,7 +122,7 @@ public:
CCListView(void);
// @warning: This interface will be deprecated in future.
//static CCListView* viewWithMode(CCListViewMode mode);
static CCListView* viewWithMode(CCListViewMode mode);
static CCListView* create(CCListViewMode mode);

View File

@ -41,10 +41,10 @@ THE SOFTWARE.
NS_CC_BEGIN
//CCLabelAtlas - Creation & Init
// CCLabelAtlas* CCLabelAtlas::labelWithString(const char *label, const char *charMapFile, unsigned int itemWidth, int unsigned itemHeight, unsigned int startCharMap)
// {
// return CCLabelAtlas::create(label, charMapFile, itemWidth, itemHeight, startCharMap);
// }
CCLabelAtlas* CCLabelAtlas::labelWithString(const char *label, const char *charMapFile, unsigned int itemWidth, int unsigned itemHeight, unsigned int startCharMap)
{
return CCLabelAtlas::create(label, charMapFile, itemWidth, itemHeight, startCharMap);
}
CCLabelAtlas* CCLabelAtlas::create(const char *label, const char *charMapFile, unsigned int itemWidth, int unsigned itemHeight, unsigned int startCharMap)
{
@ -70,10 +70,10 @@ bool CCLabelAtlas::initWithString(const char *label, const char *charMapFile, un
return false;
}
// CCLabelAtlas* CCLabelAtlas::labelWithString(const char *string, const char *fntFile)
// {
// return CCLabelAtlas::create(string, fntFile);
// }
CCLabelAtlas* CCLabelAtlas::labelWithString(const char *string, const char *fntFile)
{
return CCLabelAtlas::create(string, fntFile);
}
CCLabelAtlas* CCLabelAtlas::create(const char *string, const char *fntFile)
{

View File

@ -54,13 +54,13 @@ public:
/** creates the CCLabelAtlas with a string, a char map file(the atlas), the width and height of each element and the starting char of the atlas
@warning: This interface will be deprecated in future.
*/
//static CCLabelAtlas * labelWithString(const char *label, const char *charMapFile, unsigned int itemWidth, unsigned int itemHeight, unsigned int startCharMap);
static CCLabelAtlas * labelWithString(const char *label, const char *charMapFile, unsigned int itemWidth, unsigned int itemHeight, unsigned int startCharMap);
/** creates the CCLabelAtlas with a string and a configuration file
@warning: This interface will be deprecated in future.
@since v2.0
*/
//static CCLabelAtlas* labelWithString(const char *sring, const char *fntFile);
static CCLabelAtlas* labelWithString(const char *sring, const char *fntFile);
/** creates the CCLabelAtlas with a string, a char map file(the atlas), the width and height of each element and the starting char of the atlas */
static CCLabelAtlas * create(const char *label, const char *charMapFile, unsigned int itemWidth, unsigned int itemHeight, unsigned int startCharMap);

View File

@ -405,10 +405,10 @@ typedef struct _KerningHashElement
//BitmapFontConfiguration
//
// CCBMFontConfiguration * CCBMFontConfiguration::configurationWithFNTFile(const char *FNTfile)
// {
// return CCBMFontConfiguration::create(FNTfile);
// }
CCBMFontConfiguration * CCBMFontConfiguration::configurationWithFNTFile(const char *FNTfile)
{
return CCBMFontConfiguration::create(FNTfile);
}
CCBMFontConfiguration * CCBMFontConfiguration::create(const char *FNTfile)
{
@ -718,10 +718,10 @@ void CCLabelBMFont::purgeCachedData()
FNTConfigRemoveCache();
}
// CCLabelBMFont *CCLabelBMFont::labelWithString(const char *str, const char *fntFile, float width/* = kCCLabelAutomaticWidth*/, CCTextAlignment alignment/* = kCCTextAlignmentLeft*/, CCPoint imageOffset/* = CCPointZero*/)
// {
// return CCLabelBMFont::create(str, fntFile, width, alignment, imageOffset);
// }
CCLabelBMFont *CCLabelBMFont::labelWithString(const char *str, const char *fntFile, float width/* = kCCLabelAutomaticWidth*/, CCTextAlignment alignment/* = kCCTextAlignmentLeft*/, CCPoint imageOffset/* = CCPointZero*/)
{
return CCLabelBMFont::create(str, fntFile, width, alignment, imageOffset);
}
//LabelBMFont - Creation & Init
CCLabelBMFont *CCLabelBMFont::create(const char *str, const char *fntFile, float width/* = kCCLabelAutomaticWidth*/, CCTextAlignment alignment/* = kCCTextAlignmentLeft*/, CCPoint imageOffset/* = CCPointZero*/)

View File

@ -106,7 +106,7 @@ public:
/** allocates a CCBMFontConfiguration with a FNT file
@warning: This interface will be deprecated in future.
*/
//static CCBMFontConfiguration * configurationWithFNTFile(const char *FNTfile);
static CCBMFontConfiguration * configurationWithFNTFile(const char *FNTfile);
/** allocates a CCBMFontConfiguration with a FNT file */
static CCBMFontConfiguration * create(const char *FNTfile);
@ -196,7 +196,7 @@ public:
/** creates a bitmap font altas with an initial string and the FNT file
@warning: This interface will be deprecated in future.
*/
//static CCLabelBMFont * labelWithString(const char *str, const char *fntFile, float width = kCCLabelAutomaticWidth, CCTextAlignment alignment = kCCTextAlignmentLeft, CCPoint imageOffset = CCPointZero);
static CCLabelBMFont * labelWithString(const char *str, const char *fntFile, float width = kCCLabelAutomaticWidth, CCTextAlignment alignment = kCCTextAlignmentLeft, CCPoint imageOffset = CCPointZero);
/** creates a bitmap font altas with an initial string and the FNT file */
static CCLabelBMFont * create(const char *str, const char *fntFile, float width = kCCLabelAutomaticWidth, CCTextAlignment alignment = kCCTextAlignmentLeft, CCPoint imageOffset = CCPointZero);

View File

@ -53,30 +53,30 @@ CCLabelTTF::~CCLabelTTF()
CC_SAFE_DELETE(m_pFontName);
}
// CCLabelTTF * CCLabelTTF::labelWithString(const char *string, const char *fontName, float fontSize)
// {
// return CCLabelTTF::create(string, fontName, fontSize);
// }
CCLabelTTF * CCLabelTTF::labelWithString(const char *string, const char *fontName, float fontSize)
{
return CCLabelTTF::create(string, fontName, fontSize);
}
CCLabelTTF * CCLabelTTF::create(const char *string, const char *fontName, float fontSize)
{
return CCLabelTTF::create(string, CCSizeZero, kCCTextAlignmentCenter, kCCVerticalTextAlignmentTop, fontName, fontSize);
}
// CCLabelTTF * CCLabelTTF::labelWithString(const char *string, const CCSize& dimensions, CCTextAlignment hAlignment, const char *fontName, float fontSize)
// {
// return CCLabelTTF::create(string, dimensions, hAlignment, kCCVerticalTextAlignmentTop, fontName, fontSize);
// }
CCLabelTTF * CCLabelTTF::labelWithString(const char *string, const CCSize& dimensions, CCTextAlignment hAlignment, const char *fontName, float fontSize)
{
return CCLabelTTF::create(string, dimensions, hAlignment, kCCVerticalTextAlignmentTop, fontName, fontSize);
}
CCLabelTTF * CCLabelTTF::create(const char *string, const CCSize& dimensions, CCTextAlignment hAlignment, const char *fontName, float fontSize)
{
return CCLabelTTF::create(string, dimensions, hAlignment, kCCVerticalTextAlignmentTop, fontName, fontSize);
}
// CCLabelTTF* CCLabelTTF::labelWithString(const char *string, const cocos2d::CCSize &dimensions, CCTextAlignment hAlignment, CCVerticalTextAlignment vAlignment, const char *fontName, float fontSize)
// {
// return CCLabelTTF::create(string, dimensions, hAlignment, vAlignment, fontName, fontSize);
// }
CCLabelTTF* CCLabelTTF::labelWithString(const char *string, const cocos2d::CCSize &dimensions, CCTextAlignment hAlignment, CCVerticalTextAlignment vAlignment, const char *fontName, float fontSize)
{
return CCLabelTTF::create(string, dimensions, hAlignment, vAlignment, fontName, fontSize);
}
CCLabelTTF* CCLabelTTF::create(const char *string, const cocos2d::CCSize &dimensions, CCTextAlignment hAlignment, CCVerticalTextAlignment vAlignment, const char *fontName, float fontSize)
{

View File

@ -46,20 +46,20 @@ public:
/** creates a CCLabelTTF with a font name and font size in points
@warning: This interface will be deprecated in future.
*/
//static CCLabelTTF * labelWithString(const char *string, const char *fontName, float fontSize);
static CCLabelTTF * labelWithString(const char *string, const char *fontName, float fontSize);
/** creates a CCLabelTTF from a fontname, horizontal alignment, dimension in points, and font size in points.
@warning: This interface will be deprecated in future.
@since v1.0
*/
//static CCLabelTTF * labelWithString(const char *string, const CCSize& dimensions, CCTextAlignment hAlignment,
// const char *fontName, float fontSize);
static CCLabelTTF * labelWithString(const char *string, const CCSize& dimensions, CCTextAlignment hAlignment,
const char *fontName, float fontSize);
/** creates a CCLabel from a fontname, alignment, dimension in points and font size in points
@warning: This interface will be deprecated in future.
*/
//static CCLabelTTF * labelWithString(const char *string, const CCSize& dimensions, CCTextAlignment hAlignment,
// CCVerticalTextAlignment vAlignment, const char *fontName, float fontSize);
static CCLabelTTF * labelWithString(const char *string, const CCSize& dimensions, CCTextAlignment hAlignment,
CCVerticalTextAlignment vAlignment, const char *fontName, float fontSize);
/** creates a CCLabelTTF with a font name and font size in points*/
static CCLabelTTF * create(const char *string, const char *fontName, float fontSize);

View File

@ -73,10 +73,10 @@ bool CCLayer::init()
return bRet;
}
// CCLayer *CCLayer::node()
// {
// return CCLayer::create();
// }
CCLayer *CCLayer::node()
{
return CCLayer::create();
}
CCLayer *CCLayer::create()
{
@ -426,10 +426,10 @@ void CCLayerColor::setBlendFunc(ccBlendFunc var)
m_tBlendFunc = var;
}
// CCLayerColor * CCLayerColor::layerWithColor(const ccColor4B& color, GLfloat width, GLfloat height)
// {
// return CCLayerColor::create(color,width,height);
// }
CCLayerColor * CCLayerColor::layerWithColor(const ccColor4B& color, GLfloat width, GLfloat height)
{
return CCLayerColor::create(color,width,height);
}
CCLayerColor * CCLayerColor::create(const ccColor4B& color, GLfloat width, GLfloat height)
{
@ -443,10 +443,10 @@ CCLayerColor * CCLayerColor::create(const ccColor4B& color, GLfloat width, GLflo
return NULL;
}
// CCLayerColor * CCLayerColor::layerWithColor(const ccColor4B& color)
// {
// return CCLayerColor::create(color);
// }
CCLayerColor * CCLayerColor::layerWithColor(const ccColor4B& color)
{
return CCLayerColor::create(color);
}
CCLayerColor * CCLayerColor::create(const ccColor4B& color)
{
@ -558,10 +558,10 @@ void CCLayerColor::draw()
//
// CCLayerGradient
//
// CCLayerGradient* CCLayerGradient::layerWithColor(const ccColor4B& start, const ccColor4B& end)
// {
// return CCLayerGradient::create(start, end);
// }
CCLayerGradient* CCLayerGradient::layerWithColor(const ccColor4B& start, const ccColor4B& end)
{
return CCLayerGradient::create(start, end);
}
CCLayerGradient* CCLayerGradient::create(const ccColor4B& start, const ccColor4B& end)
{
@ -575,10 +575,10 @@ CCLayerGradient* CCLayerGradient::create(const ccColor4B& start, const ccColor4B
return NULL;
}
// CCLayerGradient* CCLayerGradient::layerWithColor(const ccColor4B& start, const ccColor4B& end, const CCPoint& v)
// {
// return CCLayerGradient::create(start, end, v);
// }
CCLayerGradient* CCLayerGradient::layerWithColor(const ccColor4B& start, const ccColor4B& end, const CCPoint& v)
{
return CCLayerGradient::create(start, end, v);
}
CCLayerGradient* CCLayerGradient::create(const ccColor4B& start, const ccColor4B& end, const CCPoint& v)
{
@ -745,22 +745,22 @@ CCLayerMultiplex::~CCLayerMultiplex()
CC_SAFE_RELEASE(m_pLayers);
}
// CCLayerMultiplex * CCLayerMultiplex::layerWithLayers(CCLayer * layer, ...)
// {
// va_list args;
// va_start(args,layer);
//
// CCLayerMultiplex * pMultiplexLayer = new CCLayerMultiplex();
// if(pMultiplexLayer && pMultiplexLayer->initWithLayers(layer, args))
// {
// pMultiplexLayer->autorelease();
// va_end(args);
// return pMultiplexLayer;
// }
// va_end(args);
// CC_SAFE_DELETE(pMultiplexLayer);
// return NULL;
// }
CCLayerMultiplex * CCLayerMultiplex::layerWithLayers(CCLayer * layer, ...)
{
va_list args;
va_start(args,layer);
CCLayerMultiplex * pMultiplexLayer = new CCLayerMultiplex();
if(pMultiplexLayer && pMultiplexLayer->initWithLayers(layer, args))
{
pMultiplexLayer->autorelease();
va_end(args);
return pMultiplexLayer;
}
va_end(args);
CC_SAFE_DELETE(pMultiplexLayer);
return NULL;
}
CCLayerMultiplex * CCLayerMultiplex::create(CCLayer * layer, ...)
{
@ -779,12 +779,12 @@ CCLayerMultiplex * CCLayerMultiplex::create(CCLayer * layer, ...)
return NULL;
}
// CCLayerMultiplex * CCLayerMultiplex::layerWithLayer(CCLayer* layer)
// {
// return CCLayerMultiplex::create(layer);
// }
CCLayerMultiplex * CCLayerMultiplex::layerWithLayer(CCLayer* layer)
{
return CCLayerMultiplex::createWithLayer(layer);
}
CCLayerMultiplex * CCLayerMultiplex::create(CCLayer* layer)
CCLayerMultiplex * CCLayerMultiplex::createWithLayer(CCLayer* layer)
{
CCLayerMultiplex * pMultiplexLayer = new CCLayerMultiplex();
pMultiplexLayer->initWithLayer(layer);

View File

@ -55,7 +55,7 @@ public:
bool init();
// @warning: This interface will be deprecated in future.
//static CCLayer *node(void);
static CCLayer *node(void);
/** create one layer */
static CCLayer *create(void);
@ -120,22 +120,22 @@ private:
// for the subclass of CCLayer, each has to implement the static "node" method
// @warning: This interface will be deprecated in future.
//#define LAYER_NODE_FUNC(layer) \
// static layer* node() \
// { \
// layer *pRet = new layer(); \
// if (pRet && pRet->init()) \
// { \
// pRet->autorelease(); \
// return pRet; \
// } \
// else \
// { \
// delete pRet; \
// pRet = NULL; \
// return NULL; \
// } \
// }
#define LAYER_NODE_FUNC(layer) \
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 "node" method
@ -157,22 +157,22 @@ private:
}
// @warning: This interface will be deprecated in future.
//#define LAYER_NODE_FUNC_PARAM(layer,__PARAMTYPE__,__PARAM__) \
// 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_NODE_FUNC_PARAM(layer,__PARAMTYPE__,__PARAM__) \
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__) \
@ -217,11 +217,11 @@ public:
/** creates a CCLayer with color, width and height in Points
@warning: This interface will be deprecated in future.
*/
//static CCLayerColor * layerWithColor(const ccColor4B& color, GLfloat width, GLfloat height);
static CCLayerColor * layerWithColor(const ccColor4B& color, GLfloat width, GLfloat height);
/** creates a CCLayer with color. Width and height are the window size.
@warning: This interface will be deprecated in future.
*/
//static CCLayerColor * layerWithColor(const ccColor4B& color);
static CCLayerColor * layerWithColor(const ccColor4B& color);
/** creates a CCLayer with color, width and height in Points */
static CCLayerColor * create(const ccColor4B& color, GLfloat width, GLfloat height);
@ -287,12 +287,12 @@ public:
/** Creates a full-screen CCLayer with a gradient between start and end.
@warning: This interface will be deprecated in future.
*/
//static CCLayerGradient* layerWithColor(const ccColor4B& start, const ccColor4B& end);
static CCLayerGradient* layerWithColor(const ccColor4B& start, const ccColor4B& end);
/** Creates a full-screen CCLayer with a gradient between start and end in the direction of v.
@warning: This interface will be deprecated in future.
*/
//static CCLayerGradient* layerWithColor(const ccColor4B& start, const ccColor4B& end, const CCPoint& v);
static CCLayerGradient* layerWithColor(const ccColor4B& start, const ccColor4B& end, const CCPoint& v);
/** Creates a full-screen CCLayer with a gradient between start and end. */
static CCLayerGradient* create(const ccColor4B& start, const ccColor4B& end);
@ -340,14 +340,14 @@ public:
/** creates a CCLayerMultiplex with one or more layers using a variable argument list.
@warning: This interface will be deprecated in future.
*/
//static CCLayerMultiplex * layerWithLayers(CCLayer* layer, ... );
static CCLayerMultiplex * layerWithLayers(CCLayer* layer, ... );
/**
* lua script can not init with undetermined number of variables
* so add these functinons to be used with lua.
@warning: This interface will be deprecated in future.
*/
//static CCLayerMultiplex * layerWithLayer(CCLayer* layer);
static CCLayerMultiplex * layerWithLayer(CCLayer* layer);
/** creates a CCLayerMultiplex with one or more layers using a variable argument list. */
static CCLayerMultiplex * create(CCLayer* layer, ... );
@ -356,7 +356,7 @@ public:
* lua script can not init with undetermined number of variables
* so add these functinons to be used with lua.
*/
static CCLayerMultiplex * create(CCLayer* layer);
static CCLayerMultiplex * createWithLayer(CCLayer* layer);
void addLayer(CCLayer* layer);
bool initWithLayer(CCLayer* layer);

View File

@ -54,10 +54,10 @@ bool CCScene::init()
return bRet;
}
// CCScene *CCScene::node()
// {
// return CCScene::create();
// }
CCScene *CCScene::node()
{
return CCScene::create();
}
CCScene *CCScene::create()
{

View File

@ -47,7 +47,7 @@ public:
CCScene();
virtual ~CCScene();
bool init();
//static CCScene *node(void);
static CCScene *node(void);
static CCScene *create(void);
};
@ -55,38 +55,38 @@ NS_CC_END
// for the subclass of CCScene, each has to implement the static "node" method
// @warning: This interface will be deprecated in future.
// #define SCENE_NODE_FUNC(scene) \
// static scene* node() \
// { \
// scene *pRet = new scene(); \
// if (pRet && pRet->init()) \
// { \
// pRet->autorelease(); \
// return pRet; \
// } \
// else \
// { \
// delete pRet; \
// pRet = NULL; \
// return NULL; \
// } \
// };
#define SCENE_NODE_FUNC(scene) \
static scene* node() \
{ \
scene *pRet = new scene(); \
if (pRet && pRet->init()) \
{ \
pRet->autorelease(); \
return pRet; \
} \
else \
{ \
delete pRet; \
pRet = NULL; \
return NULL; \
} \
};
// @warning: This interface will be deprecated in future.
// #define SCENE_FUNC_PARAM(__TYPE__,__PARAMTYPE__,__PARAM__) \
// static cocos2d::CCScene* node(__PARAMTYPE__ __PARAM__) \
// { \
// cocos2d::CCScene * scene = NULL; \
// do \
// { \
// scene = cocos2d::CCScene::node(); \
// CC_BREAK_IF(! scene); \
// __TYPE__ *layer = __TYPE__::node(__PARAM__); \
// CC_BREAK_IF(! layer); \
// scene->addChild(layer); \
// } while (0); \
// return scene; \
// }
#define SCENE_FUNC_PARAM(__TYPE__,__PARAMTYPE__,__PARAM__) \
static cocos2d::CCScene* node(__PARAMTYPE__ __PARAM__) \
{ \
cocos2d::CCScene * scene = NULL; \
do \
{ \
scene = cocos2d::CCScene::node(); \
CC_BREAK_IF(! scene); \
__TYPE__ *layer = __TYPE__::node(__PARAM__); \
CC_BREAK_IF(! layer); \
scene->addChild(layer); \
} while (0); \
return scene; \
}
// for the subclass of CCScene, each has to implement the static "node" method
#define SCENE_CREATE_FUNC(scene) \

View File

@ -51,10 +51,10 @@ CCTransitionScene::~CCTransitionScene()
m_pOutScene->release();
}
// CCTransitionScene * CCTransitionScene::transitionWithDuration(float t, CCScene *scene)
// {
// return CCTransitionScene::create(t,scene);
// }
CCTransitionScene * CCTransitionScene::transitionWithDuration(float t, CCScene *scene)
{
return CCTransitionScene::create(t,scene);
}
CCTransitionScene * CCTransitionScene::create(float t, CCScene *scene)
{
@ -204,10 +204,10 @@ CCTransitionSceneOriented::~CCTransitionSceneOriented()
{
}
// CCTransitionSceneOriented * CCTransitionSceneOriented::transitionWithDuration(float t, CCScene *scene, tOrientation orientation)
// {
// return CCTransitionSceneOriented::create(t,scene,orientation);
// }
CCTransitionSceneOriented * CCTransitionSceneOriented::transitionWithDuration(float t, CCScene *scene, tOrientation orientation)
{
return CCTransitionSceneOriented::create(t,scene,orientation);
}
CCTransitionSceneOriented * CCTransitionSceneOriented::create(float t, CCScene *scene, tOrientation orientation)
{
@ -648,10 +648,10 @@ void CCTransitionFlipX::onEnter()
m_pOutScene->runAction(outA);
}
// CCTransitionFlipX* CCTransitionFlipX::transitionWithDuration(float t, CCScene* s, tOrientation o)
// {
// return CCTransitionFlipX::create(t, s, o);
// }
CCTransitionFlipX* CCTransitionFlipX::transitionWithDuration(float t, CCScene* s, tOrientation o)
{
return CCTransitionFlipX::create(t, s, o);
}
CCTransitionFlipX* CCTransitionFlipX::create(float t, CCScene* s, tOrientation o)
{
@ -718,10 +718,10 @@ void CCTransitionFlipY::onEnter()
}
// CCTransitionFlipY* CCTransitionFlipY::transitionWithDuration(float t, CCScene* s, tOrientation o)
// {
// return CCTransitionFlipY::create(t, s, o);
// }
CCTransitionFlipY* CCTransitionFlipY::transitionWithDuration(float t, CCScene* s, tOrientation o)
{
return CCTransitionFlipY::create(t, s, o);
}
CCTransitionFlipY* CCTransitionFlipY::create(float t, CCScene* s, tOrientation o)
{
@ -866,10 +866,10 @@ void CCTransitionZoomFlipX::onEnter()
m_pOutScene->runAction(outA);
}
// CCTransitionZoomFlipX* CCTransitionZoomFlipX::transitionWithDuration(float t, CCScene* s, tOrientation o)
// {
// return CCTransitionZoomFlipX::create(t, s, o);
// }
CCTransitionZoomFlipX* CCTransitionZoomFlipX::transitionWithDuration(float t, CCScene* s, tOrientation o)
{
return CCTransitionZoomFlipX::create(t, s, o);
}
CCTransitionZoomFlipX* CCTransitionZoomFlipX::create(float t, CCScene* s, tOrientation o)
{
@ -945,10 +945,10 @@ void CCTransitionZoomFlipY::onEnter()
m_pOutScene->runAction(outA);
}
// CCTransitionZoomFlipY* CCTransitionZoomFlipY::transitionWithDuration(float t, CCScene* s, tOrientation o)
// {
// return CCTransitionZoomFlipY::create(t, s, o);
// }
CCTransitionZoomFlipY* CCTransitionZoomFlipY::transitionWithDuration(float t, CCScene* s, tOrientation o)
{
return CCTransitionZoomFlipY::create(t, s, o);
}
CCTransitionZoomFlipY* CCTransitionZoomFlipY::create(float t, CCScene* s, tOrientation o)
{
@ -1026,10 +1026,10 @@ void CCTransitionZoomFlipAngular::onEnter()
m_pOutScene->runAction(outA);
}
// CCTransitionZoomFlipAngular* CCTransitionZoomFlipAngular::transitionWithDuration(float t, CCScene* s, tOrientation o)
// {
// return CCTransitionZoomFlipAngular::create(t, s, o);
// }
CCTransitionZoomFlipAngular* CCTransitionZoomFlipAngular::transitionWithDuration(float t, CCScene* s, tOrientation o)
{
return CCTransitionZoomFlipAngular::create(t, s, o);
}
CCTransitionZoomFlipAngular* CCTransitionZoomFlipAngular::create(float t, CCScene* s, tOrientation o)
{
@ -1050,10 +1050,10 @@ CCTransitionFade::~CCTransitionFade()
{
}
// CCTransitionFade * CCTransitionFade::transitionWithDuration(float duration, CCScene *scene, const ccColor3B& color)
// {
// return CCTransitionFade::create(duration, scene, color);
// }
CCTransitionFade * CCTransitionFade::transitionWithDuration(float duration, CCScene *scene, const ccColor3B& color)
{
return CCTransitionFade::create(duration, scene, color);
}
CCTransitionFade * CCTransitionFade::create(float duration, CCScene *scene, const ccColor3B& color)
{

View File

@ -129,7 +129,7 @@ public:
/** creates a base transition with duration and incoming scene
@warning: This interface will be deprecated in future.
*/
//static CCTransitionScene * transitionWithDuration(float t, CCScene *scene);
static CCTransitionScene * transitionWithDuration(float t, CCScene *scene);
/** creates a base transition with duration and incoming scene */
static CCTransitionScene * create(float t, CCScene *scene);
@ -165,7 +165,7 @@ public:
/** creates a base transition with duration and incoming scene
@warning: This interface will be deprecated in future.
*/
// static CCTransitionSceneOriented * transitionWithDuration(float t,CCScene* scene, tOrientation orientation);
static CCTransitionSceneOriented * transitionWithDuration(float t,CCScene* scene, tOrientation orientation);
/** creates a base transition with duration and incoming scene */
static CCTransitionSceneOriented * create(float t,CCScene* scene, tOrientation orientation);
@ -378,7 +378,7 @@ public:
virtual void onEnter();
// @warning: This interface will be deprecated in future.
//static CCTransitionFlipX* transitionWithDuration(float t, CCScene* s, tOrientation o = kOrientationRightOver);
static CCTransitionFlipX* transitionWithDuration(float t, CCScene* s, tOrientation o = kOrientationRightOver);
static CCTransitionFlipX* create(float t, CCScene* s, tOrientation o = kOrientationRightOver);
};
@ -395,7 +395,7 @@ public:
virtual void onEnter();
//@warning: This interface will be deprecated in future.
//static CCTransitionFlipY* transitionWithDuration(float t, CCScene* s, tOrientation o = kOrientationUpOver);
static CCTransitionFlipY* transitionWithDuration(float t, CCScene* s, tOrientation o = kOrientationUpOver);
static CCTransitionFlipY* create(float t, CCScene* s, tOrientation o = kOrientationUpOver);
};
@ -412,7 +412,7 @@ public:
virtual void onEnter();
//@warning: This interface will be deprecated in future.
//static CCTransitionFlipAngular* transitionWithDuration(float t, CCScene* s, tOrientation o = kOrientationRightOver);
static CCTransitionFlipAngular* transitionWithDuration(float t, CCScene* s, tOrientation o = kOrientationRightOver);
static CCTransitionFlipAngular* create(float t, CCScene* s, tOrientation o = kOrientationRightOver);
};
@ -429,7 +429,7 @@ public:
virtual void onEnter();
//@warning: This interface will be deprecated in future.
//static CCTransitionZoomFlipX* transitionWithDuration(float t, CCScene* s, tOrientation o = kOrientationRightOver);
static CCTransitionZoomFlipX* transitionWithDuration(float t, CCScene* s, tOrientation o = kOrientationRightOver);
static CCTransitionZoomFlipX* create(float t, CCScene* s, tOrientation o = kOrientationRightOver);
};
@ -446,7 +446,7 @@ public:
virtual void onEnter();
//@warning: This interface will be deprecated in future.
//static CCTransitionZoomFlipY* transitionWithDuration(float t, CCScene* s, tOrientation o = kOrientationUpOver);
static CCTransitionZoomFlipY* transitionWithDuration(float t, CCScene* s, tOrientation o = kOrientationUpOver);
static CCTransitionZoomFlipY* create(float t, CCScene* s, tOrientation o = kOrientationUpOver);
};
@ -463,7 +463,7 @@ public:
virtual void onEnter();
//@warning: This interface will be deprecated in future.
//static CCTransitionZoomFlipAngular* transitionWithDuration(float t, CCScene* s, tOrientation o = kOrientationRightOver);
static CCTransitionZoomFlipAngular* transitionWithDuration(float t, CCScene* s, tOrientation o = kOrientationRightOver);
static CCTransitionZoomFlipAngular* create(float t, CCScene* s, tOrientation o = kOrientationRightOver);
};
@ -484,7 +484,7 @@ public:
* Example: FadeTransition::transitionWithDuration(2, scene, ccc3(255,0,0); // red color
@warning: This interface will be deprecated in future.
*/
//static CCTransitionFade* transitionWithDuration(float duration,CCScene* scene, const ccColor3B& color = ccBLACK);
static CCTransitionFade* transitionWithDuration(float duration,CCScene* scene, const ccColor3B& color = ccBLACK);
/** creates the transition with a duration and with an RGB color
* Example: FadeTransition::create(2, scene, ccc3(255,0,0); // red color

View File

@ -40,10 +40,10 @@ CCTransitionPageTurn::~CCTransitionPageTurn()
{
}
// CCTransitionPageTurn * CCTransitionPageTurn::transitionWithDuration(float t, CCScene *scene, bool backwards)
// {
// return CCTransitionPageTurn::create(t,scene,backwards);
// }
CCTransitionPageTurn * CCTransitionPageTurn::transitionWithDuration(float t, CCScene *scene, bool backwards)
{
return CCTransitionPageTurn::create(t,scene,backwards);
}
/** creates a base transition with duration and incoming scene */
CCTransitionPageTurn * CCTransitionPageTurn::create(float t, CCScene *scene, bool backwards)

View File

@ -56,7 +56,7 @@ public:
* scene is being turned from left over the outgoing scene.
@warning: This interface will be deprecated in future.
*/
//static CCTransitionPageTurn* transitionWithDuration(float t,CCScene* scene,bool backwards);
static CCTransitionPageTurn* transitionWithDuration(float t,CCScene* scene,bool backwards);
/**
* Creates a base transition with duration and incoming scene.

View File

@ -46,31 +46,31 @@ enum
//CCMenu
//
// CCMenu* CCMenu::node()
// {
// return CCMenu::create();
// }
CCMenu* CCMenu::node()
{
return CCMenu::create();
}
CCMenu* CCMenu::create()
{
return CCMenu::create(NULL, NULL);
}
// CCMenu * CCMenu::menuWithItems(CCMenuItem* item, ...)
// {
// va_list args;
// va_start(args,item);
// CCMenu *pRet = new CCMenu();
// if (pRet && pRet->initWithItems(item, args))
// {
// pRet->autorelease();
// va_end(args);
// return pRet;
// }
// va_end(args);
// CC_SAFE_DELETE(pRet);
// return NULL;
// }
CCMenu * CCMenu::menuWithItems(CCMenuItem* item, ...)
{
va_list args;
va_start(args,item);
CCMenu *pRet = new CCMenu();
if (pRet && pRet->initWithItems(item, args))
{
pRet->autorelease();
va_end(args);
return pRet;
}
va_end(args);
CC_SAFE_DELETE(pRet);
return NULL;
}
CCMenu * CCMenu::create(CCMenuItem* item, ...)
{
@ -88,10 +88,10 @@ CCMenu * CCMenu::create(CCMenuItem* item, ...)
return NULL;
}
// CCMenu* CCMenu::menuWithArray(CCArray* pArrayOfItems)
// {
// return CCMenu::create(pArrayOfItems);
// }
CCMenu* CCMenu::menuWithArray(CCArray* pArrayOfItems)
{
return CCMenu::create(pArrayOfItems);
}
CCMenu* CCMenu::create(CCArray* pArrayOfItems)
{
@ -108,10 +108,10 @@ CCMenu* CCMenu::create(CCArray* pArrayOfItems)
return pRet;
}
// CCMenu* CCMenu::menuWithItem(CCMenuItem* item)
// {
// return CCMenu::createWithItem(item);
// }
CCMenu* CCMenu::menuWithItem(CCMenuItem* item)
{
return CCMenu::createWithItem(item);
}
CCMenu* CCMenu::createWithItem(CCMenuItem* item)
{

View File

@ -65,24 +65,24 @@ public:
/** creates an empty CCMenu
@warning: This interface will be deprecated in future.
*/
//static CCMenu* node();
static CCMenu* node();
/** creates a CCMenu with it's items
@warning: This interface will be deprecated in future.
*/
//static CCMenu* menuWithItems(CCMenuItem* item, ...);
static CCMenu* menuWithItems(CCMenuItem* item, ...);
/** creates a CCMenu with a NSArray of CCMenuItem objects
@warning: This interface will be deprecated in future.
*/
//static CCMenu* menuWithArray(CCArray* pArrayOfItems);
static CCMenu* menuWithArray(CCArray* pArrayOfItems);
/** creates a CCMenu with it's item, then use addChild() to add
* other items. It is used for script, it can't init with undetermined
* number of variables.
@warning: This interface will be deprecated in future.
*/
//static CCMenu* menuWithItem(CCMenuItem* item);
static CCMenu* menuWithItem(CCMenuItem* item);
/** creates an empty CCMenu */
static CCMenu* create();

View File

@ -48,10 +48,10 @@ const unsigned int kDisableTag = 0x3;
//
// CCMenuItem
//
// CCMenuItem * CCMenuItem::itemWithTarget(CCObject *rec, SEL_MenuHandler selector)
// {
// return CCMenuItem::create(rec, selector);
// }
CCMenuItem * CCMenuItem::itemWithTarget(CCObject *rec, SEL_MenuHandler selector)
{
return CCMenuItem::create(rec, selector);
}
CCMenuItem * CCMenuItem::create(CCObject *rec, SEL_MenuHandler selector)
{
@ -179,10 +179,10 @@ void CCMenuItemLabel::setLabel(CCNode* var)
m_pLabel = var;
}
// CCMenuItemLabel * CCMenuItemLabel::itemWithLabel(CCNode*label, CCObject* target, SEL_MenuHandler selector)
// {
// return CCMenuItemLabel::create(label, target, selector);
// }
CCMenuItemLabel * CCMenuItemLabel::itemWithLabel(CCNode*label, CCObject* target, SEL_MenuHandler selector)
{
return CCMenuItemLabel::create(label, target, selector);
}
CCMenuItemLabel * CCMenuItemLabel::create(CCNode*label, CCObject* target, SEL_MenuHandler selector)
{
@ -192,10 +192,10 @@ CCMenuItemLabel * CCMenuItemLabel::create(CCNode*label, CCObject* target, SEL_Me
return pRet;
}
// CCMenuItemLabel* CCMenuItemLabel::itemWithLabel(CCNode *label)
// {
// return CCMenuItemLabel::create(label);
// }
CCMenuItemLabel* CCMenuItemLabel::itemWithLabel(CCNode *label)
{
return CCMenuItemLabel::create(label);
}
CCMenuItemLabel* CCMenuItemLabel::create(CCNode *label)
{
@ -311,20 +311,20 @@ const ccColor3B& CCMenuItemLabel::getColor()
//
//CCMenuItemAtlasFont
//
// CCMenuItemAtlasFont * CCMenuItemAtlasFont::itemWithString(const char *value, const char *charMapFile, int itemWidth, int itemHeight, char startCharMap)
// {
// return CCMenuItemAtlasFont::create(value, charMapFile, itemWidth, itemHeight, startCharMap);
// }
CCMenuItemAtlasFont * CCMenuItemAtlasFont::itemWithString(const char *value, const char *charMapFile, int itemWidth, int itemHeight, char startCharMap)
{
return CCMenuItemAtlasFont::create(value, charMapFile, itemWidth, itemHeight, startCharMap);
}
CCMenuItemAtlasFont * CCMenuItemAtlasFont::create(const char *value, const char *charMapFile, int itemWidth, int itemHeight, char startCharMap)
{
return CCMenuItemAtlasFont::create(value, charMapFile, itemWidth, itemHeight, startCharMap, NULL, NULL);
}
// CCMenuItemAtlasFont * CCMenuItemAtlasFont::itemWithString(const char *value, const char *charMapFile, int itemWidth, int itemHeight, char startCharMap, CCObject* target, SEL_MenuHandler selector)
// {
// return CCMenuItemAtlasFont::create(value, charMapFile, itemWidth, itemHeight, startCharMap, target, selector);
// }
CCMenuItemAtlasFont * CCMenuItemAtlasFont::itemWithString(const char *value, const char *charMapFile, int itemWidth, int itemHeight, char startCharMap, CCObject* target, SEL_MenuHandler selector)
{
return CCMenuItemAtlasFont::create(value, charMapFile, itemWidth, itemHeight, startCharMap, target, selector);
}
CCMenuItemAtlasFont * CCMenuItemAtlasFont::create(const char *value, const char *charMapFile, int itemWidth, int itemHeight, char startCharMap, CCObject* target, SEL_MenuHandler selector)
{
@ -374,10 +374,10 @@ const char * CCMenuItemFont::fontName()
return _fontName.c_str();
}
// CCMenuItemFont * CCMenuItemFont::itemWithString(const char *value, CCObject* target, SEL_MenuHandler selector)
// {
// return CCMenuItemFont::create(value, target, selector);
// }
CCMenuItemFont * CCMenuItemFont::itemWithString(const char *value, CCObject* target, SEL_MenuHandler selector)
{
return CCMenuItemFont::create(value, target, selector);
}
CCMenuItemFont * CCMenuItemFont::create(const char *value, CCObject* target, SEL_MenuHandler selector)
{
@ -387,10 +387,10 @@ CCMenuItemFont * CCMenuItemFont::create(const char *value, CCObject* target, SEL
return pRet;
}
// CCMenuItemFont * CCMenuItemFont::itemWithString(const char *value)
// {
// return CCMenuItemFont::create(value);
// }
CCMenuItemFont * CCMenuItemFont::itemWithString(const char *value)
{
return CCMenuItemFont::create(value);
}
CCMenuItemFont * CCMenuItemFont::create(const char *value)
{
@ -567,30 +567,30 @@ const ccColor3B& CCMenuItemSprite::getColor()
return dynamic_cast<CCRGBAProtocol*>(m_pNormalImage)->getColor();
}
// CCMenuItemSprite * CCMenuItemSprite::itemWithNormalSprite(CCNode* normalSprite, CCNode* selectedSprite, CCNode* disabledSprite)
// {
// return CCMenuItemSprite::create(normalSprite, selectedSprite, disabledSprite);
// }
CCMenuItemSprite * CCMenuItemSprite::itemWithNormalSprite(CCNode* normalSprite, CCNode* selectedSprite, CCNode* disabledSprite)
{
return CCMenuItemSprite::create(normalSprite, selectedSprite, disabledSprite);
}
CCMenuItemSprite * CCMenuItemSprite::create(CCNode* normalSprite, CCNode* selectedSprite, CCNode* disabledSprite)
{
return CCMenuItemSprite::create(normalSprite, selectedSprite, disabledSprite, NULL, NULL);
}
// CCMenuItemSprite * CCMenuItemSprite::itemWithNormalSprite(CCNode* normalSprite, CCNode* selectedSprite, CCObject* target, SEL_MenuHandler selector)
// {
// return CCMenuItemSprite::create(normalSprite, selectedSprite, target, selector);
// }
CCMenuItemSprite * CCMenuItemSprite::itemWithNormalSprite(CCNode* normalSprite, CCNode* selectedSprite, CCObject* target, SEL_MenuHandler selector)
{
return CCMenuItemSprite::create(normalSprite, selectedSprite, target, selector);
}
CCMenuItemSprite * CCMenuItemSprite::create(CCNode* normalSprite, CCNode* selectedSprite, CCObject* target, SEL_MenuHandler selector)
{
return CCMenuItemSprite::create(normalSprite, selectedSprite, NULL, target, selector);
}
// CCMenuItemSprite * CCMenuItemSprite::itemWithNormalSprite(CCNode *normalSprite, CCNode *selectedSprite, CCNode *disabledSprite, CCObject *target, SEL_MenuHandler selector)
// {
// return CCMenuItemSprite::create(normalSprite, selectedSprite, disabledSprite, target, selector);
// }
CCMenuItemSprite * CCMenuItemSprite::itemWithNormalSprite(CCNode *normalSprite, CCNode *selectedSprite, CCNode *disabledSprite, CCObject *target, SEL_MenuHandler selector)
{
return CCMenuItemSprite::create(normalSprite, selectedSprite, disabledSprite, target, selector);
}
CCMenuItemSprite * CCMenuItemSprite::create(CCNode *normalSprite, CCNode *selectedSprite, CCNode *disabledSprite, CCObject *target, SEL_MenuHandler selector)
{
@ -687,30 +687,30 @@ void CCMenuItemSprite::updateImagesVisibility()
}
}
// CCMenuItemImage * CCMenuItemImage::itemWithNormalImage(const char *normalImage, const char *selectedImage)
// {
// CCMenuItemImage::create(normalImage, selectedImage);
// }
CCMenuItemImage * CCMenuItemImage::itemWithNormalImage(const char *normalImage, const char *selectedImage)
{
return CCMenuItemImage::create(normalImage, selectedImage);
}
CCMenuItemImage * CCMenuItemImage::create(const char *normalImage, const char *selectedImage)
{
return CCMenuItemImage::create(normalImage, selectedImage, NULL, NULL, NULL);
}
// CCMenuItemImage * CCMenuItemImage::itemWithNormalImage(const char *normalImage, const char *selectedImage, CCObject* target, SEL_MenuHandler selector)
// {
// return CCMenuItemImage::create(normalImage, selectedImage, target, selector);
// }
CCMenuItemImage * CCMenuItemImage::itemWithNormalImage(const char *normalImage, const char *selectedImage, CCObject* target, SEL_MenuHandler selector)
{
return CCMenuItemImage::create(normalImage, selectedImage, target, selector);
}
CCMenuItemImage * CCMenuItemImage::create(const char *normalImage, const char *selectedImage, CCObject* target, SEL_MenuHandler selector)
{
return CCMenuItemImage::create(normalImage, selectedImage, NULL, target, selector);
}
// CCMenuItemImage * CCMenuItemImage::itemWithNormalImage(const char *normalImage, const char *selectedImage, const char *disabledImage, CCObject* target, SEL_MenuHandler selector)
// {
// return CCMenuItemImage::create(normalImage, selectedImage, disabledImage, target, selector);
// }
CCMenuItemImage * CCMenuItemImage::itemWithNormalImage(const char *normalImage, const char *selectedImage, const char *disabledImage, CCObject* target, SEL_MenuHandler selector)
{
return CCMenuItemImage::create(normalImage, selectedImage, disabledImage, target, selector);
}
CCMenuItemImage * CCMenuItemImage::create(const char *normalImage, const char *selectedImage, const char *disabledImage, CCObject* target, SEL_MenuHandler selector)
{
@ -724,10 +724,10 @@ CCMenuItemImage * CCMenuItemImage::create(const char *normalImage, const char *s
return NULL;
}
// CCMenuItemImage * CCMenuItemImage::itemWithNormalImage(const char *normalImage, const char *selectedImage, const char *disabledImage)
// {
// return CCMenuItemImage::create(normalImage, selectedImage, disabledImage);
// }
CCMenuItemImage * CCMenuItemImage::itemWithNormalImage(const char *normalImage, const char *selectedImage, const char *disabledImage)
{
return CCMenuItemImage::create(normalImage, selectedImage, disabledImage);
}
CCMenuItemImage * CCMenuItemImage::create(const char *normalImage, const char *selectedImage, const char *disabledImage)
{
@ -791,16 +791,16 @@ CCArray* CCMenuItemToggle::getSubItems()
return m_pSubItems;
}
// CCMenuItemToggle * CCMenuItemToggle::itemWithTarget(CCObject* target, SEL_MenuHandler selector, CCMenuItem* item, ...)
// {
// va_list args;
// va_start(args, item);
// CCMenuItemToggle *pRet = new CCMenuItemToggle();
// pRet->initWithTarget(target, selector, item, args);
// pRet->autorelease();
// va_end(args);
// return pRet;
// }
CCMenuItemToggle * CCMenuItemToggle::itemWithTarget(CCObject* target, SEL_MenuHandler selector, CCMenuItem* item, ...)
{
va_list args;
va_start(args, item);
CCMenuItemToggle *pRet = new CCMenuItemToggle();
pRet->initWithTarget(target, selector, item, args);
pRet->autorelease();
va_end(args);
return pRet;
}
CCMenuItemToggle * CCMenuItemToggle::create(CCObject* target, SEL_MenuHandler selector, CCMenuItem* item, ...)
{
@ -831,10 +831,10 @@ bool CCMenuItemToggle::initWithTarget(CCObject* target, SEL_MenuHandler selector
return true;
}
// CCMenuItemToggle* CCMenuItemToggle::itemWithItem(CCMenuItem *item)
// {
// return CCMenuItemToggle::create(item);
// }
CCMenuItemToggle* CCMenuItemToggle::itemWithItem(CCMenuItem *item)
{
return CCMenuItemToggle::create(item);
}
CCMenuItemToggle* CCMenuItemToggle::create(CCMenuItem *item)
{

View File

@ -62,7 +62,7 @@ public:
/** Creates a CCMenuItem with a target/selector
@warning: This interface will be deprecated in future.
*/
//static CCMenuItem * itemWithTarget(CCObject *rec, SEL_MenuHandler selector);
static CCMenuItem * itemWithTarget(CCObject *rec, SEL_MenuHandler selector);
/** Creates a CCMenuItem with a target/selector */
static CCMenuItem * create(CCObject *rec, SEL_MenuHandler selector);
/** Initializes a CCMenuItem with a target/selector */
@ -110,11 +110,11 @@ public:
/** creates a CCMenuItemLabel with a Label, target and selector
@warning: This interface will be deprecated in future.
*/
//static CCMenuItemLabel * itemWithLabel(CCNode*label, CCObject* target, SEL_MenuHandler selector);
static CCMenuItemLabel * itemWithLabel(CCNode*label, CCObject* target, SEL_MenuHandler selector);
/** creates a CCMenuItemLabel with a Label. Target and selector will be nill
@warning: This interface will be deprecated in future.
*/
//static CCMenuItemLabel* itemWithLabel(CCNode *label);
static CCMenuItemLabel* itemWithLabel(CCNode *label);
/** creates a CCMenuItemLabel with a Label, target and selector */
static CCMenuItemLabel * create(CCNode*label, CCObject* target, SEL_MenuHandler selector);
@ -156,11 +156,11 @@ public:
/** creates a menu item from a string and atlas with a target/selector
@warning: This interface will be deprecated in future.
*/
//static CCMenuItemAtlasFont* itemWithString(const char *value, const char *charMapFile, int itemWidth, int itemHeight, char startCharMap);
static CCMenuItemAtlasFont* itemWithString(const char *value, const char *charMapFile, int itemWidth, int itemHeight, char startCharMap);
/** creates a menu item from a string and atlas. Use it with MenuItemToggle
@warning: This interface will be deprecated in future.
*/
//static CCMenuItemAtlasFont* itemWithString(const char *value, const char *charMapFile, int itemWidth, int itemHeight, char startCharMap, CCObject* target, SEL_MenuHandler selector);
static CCMenuItemAtlasFont* itemWithString(const char *value, const char *charMapFile, int itemWidth, int itemHeight, char startCharMap, CCObject* target, SEL_MenuHandler selector);
/** creates a menu item from a string and atlas with a target/selector */
static CCMenuItemAtlasFont* create(const char *value, const char *charMapFile, int itemWidth, int itemHeight, char startCharMap);
@ -189,11 +189,11 @@ public:
/** creates a menu item from a string without target/selector. To be used with CCMenuItemToggle
@warning: This interface will be deprecated in future.
*/
//static CCMenuItemFont * itemWithString(const char *value);
static CCMenuItemFont * itemWithString(const char *value);
/** creates a menu item from a string with a target/selector
@warning: This interface will be deprecated in future.
*/
//static CCMenuItemFont * itemWithString(const char *value, CCObject* target, SEL_MenuHandler selector);
static CCMenuItemFont * itemWithString(const char *value, CCObject* target, SEL_MenuHandler selector);
/** creates a menu item from a string without target/selector. To be used with CCMenuItemToggle */
static CCMenuItemFont * create(const char *value);
@ -252,15 +252,15 @@ public:
/** creates a menu item with a normal, selected and disabled image
@warning: This interface will be deprecated in future.
*/
//static CCMenuItemSprite * itemWithNormalSprite(CCNode* normalSprite, CCNode* selectedSprite, CCNode* disabledSprite = NULL);
static CCMenuItemSprite * itemWithNormalSprite(CCNode* normalSprite, CCNode* selectedSprite, CCNode* disabledSprite = NULL);
/** creates a menu item with a normal and selected image with target/selector
@warning: This interface will be deprecated in future.
*/
//static CCMenuItemSprite * itemWithNormalSprite(CCNode* normalSprite, CCNode* selectedSprite, CCObject* target, SEL_MenuHandler selector);
static CCMenuItemSprite * itemWithNormalSprite(CCNode* normalSprite, CCNode* selectedSprite, CCObject* target, SEL_MenuHandler selector);
/** creates a menu item with a normal,selected and disabled image with target/selector
@warning: This interface will be deprecated in future.
*/
//static CCMenuItemSprite * itemWithNormalSprite(CCNode* normalSprite, CCNode* selectedSprite, CCNode* disabledSprite, CCObject* target, SEL_MenuHandler selector);
static CCMenuItemSprite * itemWithNormalSprite(CCNode* normalSprite, CCNode* selectedSprite, CCNode* disabledSprite, CCObject* target, SEL_MenuHandler selector);
/** creates a menu item with a normal, selected and disabled image*/
static CCMenuItemSprite * create(CCNode* normalSprite, CCNode* selectedSprite, CCNode* disabledSprite = NULL);
@ -306,19 +306,19 @@ public:
/** creates a menu item with a normal and selected image
@warning: This interface will be deprecated in future.
*/
//static CCMenuItemImage* itemWithNormalImage(const char *normalImage, const char *selectedImage);
static CCMenuItemImage* itemWithNormalImage(const char *normalImage, const char *selectedImage);
/** creates a menu item with a normal,selected and disabled image
@warning: This interface will be deprecated in future.
*/
//static CCMenuItemImage* itemWithNormalImage(const char *normalImage, const char *selectedImage, const char *disabledImage);
static CCMenuItemImage* itemWithNormalImage(const char *normalImage, const char *selectedImage, const char *disabledImage);
/** creates a menu item with a normal and selected image with target/selector
@warning: This interface will be deprecated in future.
*/
//static CCMenuItemImage* itemWithNormalImage(const char *normalImage, const char *selectedImage, CCObject* target, SEL_MenuHandler selector);
static CCMenuItemImage* itemWithNormalImage(const char *normalImage, const char *selectedImage, CCObject* target, SEL_MenuHandler selector);
/** creates a menu item with a normal,selected and disabled image with target/selector
@warning: This interface will be deprecated in future.
*/
//static CCMenuItemImage* itemWithNormalImage(const char *normalImage, const char *selectedImage, const char *disabledImage, CCObject* target, SEL_MenuHandler selector);
static CCMenuItemImage* itemWithNormalImage(const char *normalImage, const char *selectedImage, const char *disabledImage, CCObject* target, SEL_MenuHandler selector);
/** creates a menu item with a normal and selected image*/
static CCMenuItemImage* create(const char *normalImage, const char *selectedImage);
@ -366,7 +366,7 @@ public:
/** creates a menu item from a list of items with a target/selector
@warning: This interface will be deprecated in future.
*/
//static CCMenuItemToggle* itemWithTarget(CCObject* target, SEL_MenuHandler selector, CCMenuItem* item, ...);
static CCMenuItemToggle* itemWithTarget(CCObject* target, SEL_MenuHandler selector, CCMenuItem* item, ...);
/** creates a menu item from a list of items with a target/selector */
static CCMenuItemToggle* create(CCObject* target, SEL_MenuHandler selector, CCMenuItem* item, ...);
@ -378,7 +378,7 @@ public:
/** creates a menu item with a item
@warning: This interface will be deprecated in future.
*/
//static CCMenuItemToggle* itemWithItem(CCMenuItem *item);
static CCMenuItemToggle* itemWithItem(CCMenuItem *item);
/** creates a menu item with a item */
static CCMenuItemToggle* create(CCMenuItem *item);

View File

@ -66,10 +66,10 @@ CCMotionStreak::~CCMotionStreak()
CC_SAFE_FREE(m_pTexCoords);
}
// CCMotionStreak* CCMotionStreak::streakWithFade(float fade, float minSeg, float stroke, ccColor3B color, const char* path)
// {
// return CCMotionStreak::create(fade, minSeg, stroke, color, path);
// }
CCMotionStreak* CCMotionStreak::streakWithFade(float fade, float minSeg, float stroke, ccColor3B color, const char* path)
{
return CCMotionStreak::create(fade, minSeg, stroke, color, path);
}
CCMotionStreak* CCMotionStreak::create(float fade, float minSeg, float stroke, ccColor3B color, const char* path)
{
@ -84,10 +84,10 @@ CCMotionStreak* CCMotionStreak::create(float fade, float minSeg, float stroke, c
return NULL;
}
// CCMotionStreak* CCMotionStreak::streakWithFade(float fade, float minSeg, float stroke, ccColor3B color, CCTexture2D* texture)
// {
// return CCMotionStreak::create(fade, minSeg, stroke, color, texture);
// }
CCMotionStreak* CCMotionStreak::streakWithFade(float fade, float minSeg, float stroke, ccColor3B color, CCTexture2D* texture)
{
return CCMotionStreak::create(fade, minSeg, stroke, color, texture);
}
CCMotionStreak* CCMotionStreak::create(float fade, float minSeg, float stroke, ccColor3B color, CCTexture2D* texture)
{

View File

@ -44,11 +44,11 @@ public:
/** creates and initializes a motion streak with fade in seconds, minimum segments, stroke's width, color, texture filename
@warning: This interface will be deprecated in future.
*/
//static CCMotionStreak* streakWithFade(float fade, float minSeg, float stroke, ccColor3B color, const char* path);
static CCMotionStreak* streakWithFade(float fade, float minSeg, float stroke, ccColor3B color, const char* path);
/** creates and initializes a motion streak with fade in seconds, minimum segments, stroke's width, color, texture
@warning: This interface will be deprecated in future.
*/
//static CCMotionStreak* streakWithFade(float fade, float minSeg, float stroke, ccColor3B color, CCTexture2D* texture);
static CCMotionStreak* streakWithFade(float fade, float minSeg, float stroke, ccColor3B color, CCTexture2D* texture);
/** creates and initializes a motion streak with fade in seconds, minimum segments, stroke's width, color, texture filename */
static CCMotionStreak* create(float fade, float minSeg, float stroke, ccColor3B color, const char* path);

View File

@ -56,10 +56,10 @@ CCProgressTimer::CCProgressTimer()
,m_bReverseDirection(false)
{}
// CCProgressTimer* CCProgressTimer::progressWithSprite(CCSprite* sp)
// {
// return CCProgressTimer::create(sp);
// }
CCProgressTimer* CCProgressTimer::progressWithSprite(CCSprite* sp)
{
return CCProgressTimer::create(sp);
}
CCProgressTimer* CCProgressTimer::create(CCSprite* sp)
{

View File

@ -82,7 +82,7 @@ public:
/** Creates a progress timer with the sprite as the shape the timer goes through
@warning: This interface will be deprecated in future.
*/
//static CCProgressTimer* progressWithSprite(CCSprite* sp);
static CCProgressTimer* progressWithSprite(CCSprite* sp);
/** Creates a progress timer with the sprite as the shape the timer goes through */
static CCProgressTimer* create(CCSprite* sp);
protected:

View File

@ -73,10 +73,10 @@ void CCRenderTexture::setSprite(CCSprite* var)
m_pSprite = var;
}
// CCRenderTexture * CCRenderTexture::renderTextureWithWidthAndHeight(int w, int h, CCTexture2DPixelFormat eFormat)
// {
// return CCRenderTexture::create(w, h, eFormat);
// }
CCRenderTexture * CCRenderTexture::renderTextureWithWidthAndHeight(int w, int h, CCTexture2DPixelFormat eFormat)
{
return CCRenderTexture::create(w, h, eFormat);
}
CCRenderTexture * CCRenderTexture::create(int w, int h, CCTexture2DPixelFormat eFormat)
{
@ -91,10 +91,10 @@ CCRenderTexture * CCRenderTexture::create(int w, int h, CCTexture2DPixelFormat e
return NULL;
}
// CCRenderTexture * CCRenderTexture::renderTextureWithWidthAndHeight(int w ,int h, CCTexture2DPixelFormat eFormat, GLuint uDepthStencilFormat)
// {
// return CCRenderTexture::create(w, h, eFormat, uDepthStencilFormat);
// }
CCRenderTexture * CCRenderTexture::renderTextureWithWidthAndHeight(int w ,int h, CCTexture2DPixelFormat eFormat, GLuint uDepthStencilFormat)
{
return CCRenderTexture::create(w, h, eFormat, uDepthStencilFormat);
}
CCRenderTexture * CCRenderTexture::create(int w ,int h, CCTexture2DPixelFormat eFormat, GLuint uDepthStencilFormat)
{
@ -109,10 +109,10 @@ CCRenderTexture * CCRenderTexture::create(int w ,int h, CCTexture2DPixelFormat e
return NULL;
}
// CCRenderTexture * CCRenderTexture::renderTextureWithWidthAndHeight(int w, int h)
// {
// return CCRenderTexture::create(w, h);
// }
CCRenderTexture * CCRenderTexture::renderTextureWithWidthAndHeight(int w, int h)
{
return CCRenderTexture::create(w, h);
}
CCRenderTexture * CCRenderTexture::create(int w, int h)
{

View File

@ -61,17 +61,17 @@ public:
/** initializes a RenderTexture object with width and height in Points and a pixel format( only RGB and RGBA formats are valid ) and depthStencil format
@warning: This interface will be deprecated in future.
*/
//static CCRenderTexture * renderTextureWithWidthAndHeight(int w ,int h, CCTexture2DPixelFormat eFormat, GLuint uDepthStencilFormat);
static CCRenderTexture * renderTextureWithWidthAndHeight(int w ,int h, CCTexture2DPixelFormat eFormat, GLuint uDepthStencilFormat);
/** creates a RenderTexture object with width and height in Points and a pixel format, only RGB and RGBA formats are valid
@warning: This interface will be deprecated in future.
*/
//static CCRenderTexture * renderTextureWithWidthAndHeight(int w, int h, CCTexture2DPixelFormat eFormat);
static CCRenderTexture * renderTextureWithWidthAndHeight(int w, int h, CCTexture2DPixelFormat eFormat);
/** creates a RenderTexture object with width and height in Points, pixel format is RGBA8888
@warning: This interface will be deprecated in future.
*/
//static CCRenderTexture * renderTextureWithWidthAndHeight(int w, int h);
static CCRenderTexture * renderTextureWithWidthAndHeight(int w, int h);
/** initializes a RenderTexture object with width and height in Points and a pixel format( only RGB and RGBA formats are valid ) and depthStencil format*/
static CCRenderTexture * create(int w ,int h, CCTexture2DPixelFormat eFormat, GLuint uDepthStencilFormat);

View File

@ -58,10 +58,10 @@ CCParticleBatchNode::~CCParticleBatchNode()
/*
* creation with CCTexture2D
*/
// CCParticleBatchNode* CCParticleBatchNode::batchNodeWithTexture(CCTexture2D *tex, unsigned int capacity/* = kCCParticleDefaultCapacity*/)
// {
// return CCParticleBatchNode::createWithTexture(tex, capacity);
// }
CCParticleBatchNode* CCParticleBatchNode::batchNodeWithTexture(CCTexture2D *tex, unsigned int capacity/* = kCCParticleDefaultCapacity*/)
{
return CCParticleBatchNode::createWithTexture(tex, capacity);
}
CCParticleBatchNode* CCParticleBatchNode::createWithTexture(CCTexture2D *tex, unsigned int capacity/* = kCCParticleDefaultCapacity*/)
{
@ -78,10 +78,10 @@ CCParticleBatchNode* CCParticleBatchNode::createWithTexture(CCTexture2D *tex, un
/*
* creation with File Image
*/
// CCParticleBatchNode* CCParticleBatchNode::batchNodeWithFile(const char* imageFile, unsigned int capacity/* = kCCParticleDefaultCapacity*/)
// {
// return CCParticleBatchNode::create(imageFile, capacity);
// }
CCParticleBatchNode* CCParticleBatchNode::batchNodeWithFile(const char* imageFile, unsigned int capacity/* = kCCParticleDefaultCapacity*/)
{
return CCParticleBatchNode::create(imageFile, capacity);
}
CCParticleBatchNode* CCParticleBatchNode::create(const char* imageFile, unsigned int capacity/* = kCCParticleDefaultCapacity*/)
{

View File

@ -68,12 +68,12 @@ public:
/** initializes the particle system with CCTexture2D, a capacity of particles, which particle system to use
@warning: This interface will be deprecated in future.
*/
//static CCParticleBatchNode* batchNodeWithTexture(CCTexture2D *tex, unsigned int capacity = kCCParticleDefaultCapacity);
static CCParticleBatchNode* batchNodeWithTexture(CCTexture2D *tex, unsigned int capacity = kCCParticleDefaultCapacity);
/** initializes the particle system with the name of a file on disk (for a list of supported formats look at the CCTexture2D class), a capacity of particles
@warning: This interface will be deprecated in future.
*/
//static CCParticleBatchNode* batchNodeWithFile(const char* fileImage, unsigned int capacity = kCCParticleDefaultCapacity);
static CCParticleBatchNode* batchNodeWithFile(const char* fileImage, unsigned int capacity = kCCParticleDefaultCapacity);
/** initializes the particle system with CCTexture2D, a capacity of particles, which particle system to use */
static CCParticleBatchNode* createWithTexture(CCTexture2D *tex, unsigned int capacity = kCCParticleDefaultCapacity);

View File

@ -130,10 +130,10 @@ CCParticleSystem::CCParticleSystem()
m_tBlendFunc.dst = CC_BLEND_DST;
}
// implementation CCParticleSystem
// CCParticleSystem * CCParticleSystem::particleWithFile(const char *plistFile)
// {
// return CCParticleSystem::create(plistFile);
// }
CCParticleSystem * CCParticleSystem::particleWithFile(const char *plistFile)
{
return CCParticleSystem::create(plistFile);
}
CCParticleSystem * CCParticleSystem::create(const char *plistFile)
{

View File

@ -359,7 +359,7 @@ public:
@warning: This interface will be deprecated in future.
@since v0.99.3
*/
//static CCParticleSystem * particleWithFile(const char *plistFile);
static CCParticleSystem * particleWithFile(const char *plistFile);
/** creates an initializes a CCParticleSystem from a plist file.
This plist files can be creted manually or with Particle Designer:

View File

@ -103,10 +103,10 @@ CCParticleSystemQuad::~CCParticleSystemQuad()
}
// implementation CCParticleSystemQuad
// CCParticleSystemQuad * CCParticleSystemQuad::particleWithFile(const char *plistFile)
// {
// return CCParticleSystemQuad::create(plistFile);
// }
CCParticleSystemQuad * CCParticleSystemQuad::particleWithFile(const char *plistFile)
{
return CCParticleSystemQuad::create(plistFile);
}
CCParticleSystemQuad * CCParticleSystemQuad::create(const char *plistFile)
{

View File

@ -65,7 +65,7 @@ public:
This plist files can be creted manually or with Particle Designer:
@warning: This interface will be deprecated in future.
*/
//static CCParticleSystemQuad * particleWithFile(const char *plistFile);
static CCParticleSystemQuad * particleWithFile(const char *plistFile);
/** creates an initializes a CCParticleSystemQuad from a plist file.
This plist files can be creted manually or with Particle Designer:

View File

@ -81,10 +81,10 @@ CCObject* CCAnimationFrame::copyWithZone(CCZone* pZone)
// implementation of CCAnimation
// CCAnimation* CCAnimation::animation(void)
// {
// return CCAnimation::create();
// }
CCAnimation* CCAnimation::animation(void)
{
return CCAnimation::create();
}
CCAnimation* CCAnimation::create(void)
{
@ -95,10 +95,10 @@ CCAnimation* CCAnimation::create(void)
return pAnimation;
}
// CCAnimation* CCAnimation::animationWithSpriteFrames(CCArray *frames, float delay/* = 0.0f*/)
// {
// return CCAnimation::createWithSpriteFrames(frames, delay);
// }
CCAnimation* CCAnimation::animationWithSpriteFrames(CCArray *frames, float delay/* = 0.0f*/)
{
return CCAnimation::createWithSpriteFrames(frames, delay);
}
CCAnimation* CCAnimation::createWithSpriteFrames(CCArray *frames, float delay/* = 0.0f*/)
{
@ -109,10 +109,10 @@ CCAnimation* CCAnimation::createWithSpriteFrames(CCArray *frames, float delay/*
return pAnimation;
}
// CCAnimation* CCAnimation::animationWithAnimationFrames(CCArray* arrayOfAnimationFrameNames, float delayPerUnit, unsigned int loops)
// {
// return CCAnimation::createWithAnimationFrames(arrayOfAnimationFrameNames, delayPerUnit, loops);
// }
CCAnimation* CCAnimation::animationWithAnimationFrames(CCArray* arrayOfAnimationFrameNames, float delayPerUnit, unsigned int loops)
{
return CCAnimation::createWithAnimationFrames(arrayOfAnimationFrameNames, delayPerUnit, loops);
}
CCAnimation* CCAnimation::createWithAnimationFrames(CCArray* arrayOfAnimationFrameNames, float delayPerUnit, unsigned int loops)
{

View File

@ -87,20 +87,20 @@ public:
@warning: This interface will be deprecated in future.
@since v0.99.5
*/
//static CCAnimation* animation(void);
static CCAnimation* animation(void);
/* Creates an animation with an array of CCSpriteFrame and a delay between frames in seconds.
The frames will be added with one "delay unit".
@warning: This interface will be deprecated in future.
@since v0.99.5
*/
//static CCAnimation* animationWithSpriteFrames(CCArray* arrayOfSpriteFrameNames, float delay = 0.0f);
static CCAnimation* animationWithSpriteFrames(CCArray* arrayOfSpriteFrameNames, float delay = 0.0f);
/* Creates an animation with an array of CCAnimationFrame, the delay per units in seconds and and how many times it should be executed.
@warning: This interface will be deprecated in future.
@since v2.0
*/
//static CCAnimation* animationWithAnimationFrames(CCArray *arrayOfAnimationFrameNames, float delayPerUnit, unsigned int loops);
static CCAnimation* animationWithAnimationFrames(CCArray *arrayOfAnimationFrameNames, float delayPerUnit, unsigned int loops);
/** Creates an animation
@since v0.99.5

View File

@ -58,10 +58,10 @@ NS_CC_BEGIN
#define RENDER_IN_SUBPIXEL(__A__) ( (int)(__A__))
#endif
// CCSprite* CCSprite::spriteWithTexture(CCTexture2D *pTexture)
// {
// return CCSprite::createWithTexture(pTexture);
// }
CCSprite* CCSprite::spriteWithTexture(CCTexture2D *pTexture)
{
return CCSprite::createWithTexture(pTexture);
}
CCSprite* CCSprite::createWithTexture(CCTexture2D *pTexture)
{
@ -75,10 +75,10 @@ CCSprite* CCSprite::createWithTexture(CCTexture2D *pTexture)
return NULL;
}
// CCSprite* CCSprite::spriteWithTexture(CCTexture2D *pTexture, const CCRect& rect)
// {
// return CCSprite::createWithTexture(pTexture, rect);
// }
CCSprite* CCSprite::spriteWithTexture(CCTexture2D *pTexture, const CCRect& rect)
{
return CCSprite::createWithTexture(pTexture, rect);
}
CCSprite* CCSprite::createWithTexture(CCTexture2D *pTexture, const CCRect& rect)
{
@ -92,10 +92,10 @@ CCSprite* CCSprite::createWithTexture(CCTexture2D *pTexture, const CCRect& rect)
return NULL;
}
// CCSprite* CCSprite::spriteWithFile(const char *pszFileName)
// {
// CCSprite::create(pszFileName);
// }
CCSprite* CCSprite::spriteWithFile(const char *pszFileName)
{
return CCSprite::create(pszFileName);
}
CCSprite* CCSprite::create(const char *pszFileName)
{
@ -109,10 +109,10 @@ CCSprite* CCSprite::create(const char *pszFileName)
return NULL;
}
// CCSprite* CCSprite::spriteWithFile(const char *pszFileName, const CCRect& rect)
// {
// return CCSprite::create(pszFileName, rect);
// }
CCSprite* CCSprite::spriteWithFile(const char *pszFileName, const CCRect& rect)
{
return CCSprite::create(pszFileName, rect);
}
CCSprite* CCSprite::create(const char *pszFileName, const CCRect& rect)
{
@ -126,10 +126,10 @@ CCSprite* CCSprite::create(const char *pszFileName, const CCRect& rect)
return NULL;
}
// CCSprite* CCSprite::spriteWithSpriteFrame(CCSpriteFrame *pSpriteFrame)
// {
// return CCSprite::createWithSpriteFrame(pSpriteFrame);
// }
CCSprite* CCSprite::spriteWithSpriteFrame(CCSpriteFrame *pSpriteFrame)
{
return CCSprite::createWithSpriteFrame(pSpriteFrame);
}
CCSprite* CCSprite::createWithSpriteFrame(CCSpriteFrame *pSpriteFrame)
{
@ -143,10 +143,10 @@ CCSprite* CCSprite::createWithSpriteFrame(CCSpriteFrame *pSpriteFrame)
return NULL;
}
// CCSprite* CCSprite::spriteWithSpriteFrameName(const char *pszSpriteFrameName)
// {
// return CCSprite::createWithSpriteFrameName(pszSpriteFrameName);
// }
CCSprite* CCSprite::spriteWithSpriteFrameName(const char *pszSpriteFrameName)
{
return CCSprite::createWithSpriteFrameName(pszSpriteFrameName);
}
CCSprite* CCSprite::createWithSpriteFrameName(const char *pszSpriteFrameName)
{
@ -158,10 +158,10 @@ CCSprite* CCSprite::createWithSpriteFrameName(const char *pszSpriteFrameName)
return createWithSpriteFrame(pFrame);
}
// CCSprite* CCSprite::node()
// {
// return CCSprite::create();
// }
CCSprite* CCSprite::node()
{
return CCSprite::create();
}
CCSprite* CCSprite::create()
{

View File

@ -125,13 +125,13 @@ public:
The offset will be (0,0).
@warning: This interface will be deprecated in future.
*/
//static CCSprite* spriteWithTexture(CCTexture2D *pTexture);
static CCSprite* spriteWithTexture(CCTexture2D *pTexture);
/** Creates an sprite with a texture and a rect.
The offset will be (0,0).
@warning: This interface will be deprecated in future.
*/
//static CCSprite* spriteWithTexture(CCTexture2D *pTexture, const CCRect& rect);
static CCSprite* spriteWithTexture(CCTexture2D *pTexture, const CCRect& rect);
/** Creates an sprite with a texture.
The rect used will be the size of the texture.
@ -147,7 +147,7 @@ public:
/** Creates an sprite with an sprite frame.
@warning: This interface will be deprecated in future.
*/
// static CCSprite* spriteWithSpriteFrame(CCSpriteFrame *pSpriteFrame);
static CCSprite* spriteWithSpriteFrame(CCSpriteFrame *pSpriteFrame);
/** Creates an sprite with an sprite frame name.
An CCSpriteFrame will be fetched from the CCSpriteFrameCache by name.
@ -155,7 +155,7 @@ public:
@warning: This interface will be deprecated in future.
@since v0.9
*/
//static CCSprite* spriteWithSpriteFrameName(const char *pszSpriteFrameName);
static CCSprite* spriteWithSpriteFrameName(const char *pszSpriteFrameName);
/** Creates an sprite with an sprite frame. */
static CCSprite* createWithSpriteFrame(CCSpriteFrame *pSpriteFrame);
@ -172,13 +172,13 @@ public:
@warning: This interface will be deprecated in future.
The offset will be (0,0).
*/
//static CCSprite* spriteWithFile(const char *pszFileName);
static CCSprite* spriteWithFile(const char *pszFileName);
/** Creates an sprite with an image filename and a rect.
The offset will be (0,0).
@warning: This interface will be deprecated in future.
*/
//static CCSprite* spriteWithFile(const char *pszFileName, const CCRect& rect);
static CCSprite* spriteWithFile(const char *pszFileName, const CCRect& rect);
/** Creates an sprite with an image filename.
The rect used will be the size of the image.
@ -194,7 +194,7 @@ public:
/** Creates an sprite.
@warning: This interface will be deprecated in future.
*/
//static CCSprite* node();
static CCSprite* node();
/** Creates an sprite.
*/
static CCSprite* create();

View File

@ -46,10 +46,10 @@ NS_CC_BEGIN
* creation with CCTexture2D
*/
// CCSpriteBatchNode* CCSpriteBatchNode::batchNodeWithTexture(CCTexture2D* tex, unsigned int capacity/* = kDefaultSpriteBatchCapacity*/)
// {
// return CCSpriteBatchNode::createWithTexture(tex, capacity);
// }
CCSpriteBatchNode* CCSpriteBatchNode::batchNodeWithTexture(CCTexture2D* tex, unsigned int capacity/* = kDefaultSpriteBatchCapacity*/)
{
return CCSpriteBatchNode::createWithTexture(tex, capacity);
}
CCSpriteBatchNode* CCSpriteBatchNode::createWithTexture(CCTexture2D* tex, unsigned int capacity/* = kDefaultSpriteBatchCapacity*/)
{
@ -63,10 +63,10 @@ CCSpriteBatchNode* CCSpriteBatchNode::createWithTexture(CCTexture2D* tex, unsign
/*
* creation with File Image
*/
// CCSpriteBatchNode* CCSpriteBatchNode::batchNodeWithFile(const char *fileImage, unsigned int capacity/* = kDefaultSpriteBatchCapacity*/)
// {
// return CCSpriteBatchNode::create(fileImage, capacity);
// }
CCSpriteBatchNode* CCSpriteBatchNode::batchNodeWithFile(const char *fileImage, unsigned int capacity/* = kDefaultSpriteBatchCapacity*/)
{
return CCSpriteBatchNode::create(fileImage, capacity);
}
CCSpriteBatchNode* CCSpriteBatchNode::create(const char *fileImage, unsigned int capacity/* = kDefaultSpriteBatchCapacity*/)
{

View File

@ -80,14 +80,14 @@ public:
The capacity will be increased in 33% in runtime if it run out of space.
@warning: This interface will be deprecated in future.
*/
//static CCSpriteBatchNode* batchNodeWithTexture(CCTexture2D* tex, unsigned int capacity = kDefaultSpriteBatchCapacity);
static CCSpriteBatchNode* batchNodeWithTexture(CCTexture2D* tex, unsigned int capacity = kDefaultSpriteBatchCapacity);
/** creates a CCSpriteBatchNode with a file image (.png, .jpeg, .pvr, etc) and capacity of children.
The capacity will be increased in 33% in runtime if it run out of space.
The file will be loaded using the TextureMgr.
@warning: This interface will be deprecated in future.
*/
//static CCSpriteBatchNode* batchNodeWithFile(const char* fileImage, unsigned int capacity = kDefaultSpriteBatchCapacity);
static CCSpriteBatchNode* batchNodeWithFile(const char* fileImage, unsigned int capacity = kDefaultSpriteBatchCapacity);
/** creates a CCSpriteBatchNode with a texture2d and capacity of children.
The capacity will be increased in 33% in runtime if it run out of space.

View File

@ -31,10 +31,10 @@ NS_CC_BEGIN
// implementation of CCSpriteFrame
// CCSpriteFrame* CCSpriteFrame::frameWithTexture(CCTexture2D *pobTexture, const CCRect& rect)
// {
// return CCSpriteFrame::create(pobTexture, rect);
// }
CCSpriteFrame* CCSpriteFrame::frameWithTexture(CCTexture2D *pobTexture, const CCRect& rect)
{
return CCSpriteFrame::create(pobTexture, rect);
}
CCSpriteFrame* CCSpriteFrame::create(CCTexture2D *pobTexture, const CCRect& rect)
{
@ -45,10 +45,10 @@ CCSpriteFrame* CCSpriteFrame::create(CCTexture2D *pobTexture, const CCRect& rect
return pSpriteFrame;
}
// CCSpriteFrame* CCSpriteFrame::frameWithTextureFilename(const char* filename, const CCRect& rect)
// {
// return createWithTextureFilename(filename, rect);
// }
CCSpriteFrame* CCSpriteFrame::frameWithTextureFilename(const char* filename, const CCRect& rect)
{
return createWithTextureFilename(filename, rect);
}
CCSpriteFrame* CCSpriteFrame::createWithTextureFilename(const char* filename, const CCRect& rect)
{
@ -59,10 +59,10 @@ CCSpriteFrame* CCSpriteFrame::createWithTextureFilename(const char* filename, co
return pSpriteFrame;
}
// CCSpriteFrame* CCSpriteFrame::frameWithTexture(CCTexture2D* pobTexture, const CCRect& rect, bool rotated, const CCPoint& offset, const CCSize& originalSize)
// {
// return CCSpriteFrame::create(pobTexture, rect, rotated, offset, originalSize);
// }
CCSpriteFrame* CCSpriteFrame::frameWithTexture(CCTexture2D* pobTexture, const CCRect& rect, bool rotated, const CCPoint& offset, const CCSize& originalSize)
{
return CCSpriteFrame::create(pobTexture, rect, rotated, offset, originalSize);
}
CCSpriteFrame* CCSpriteFrame::create(CCTexture2D* pobTexture, const CCRect& rect, bool rotated, const CCPoint& offset, const CCSize& originalSize)
{
@ -73,10 +73,10 @@ CCSpriteFrame* CCSpriteFrame::create(CCTexture2D* pobTexture, const CCRect& rect
return pSpriteFrame;
}
// CCSpriteFrame* CCSpriteFrame::frameWithTextureFilename(const char* filename, const CCRect& rect, bool rotated, const CCPoint& offset, const CCSize& originalSize)
// {
// return CCSpriteFrame::createWithTextureFilename(filename, rect, rotated, offset, originalSize);
// }
CCSpriteFrame* CCSpriteFrame::frameWithTextureFilename(const char* filename, const CCRect& rect, bool rotated, const CCPoint& offset, const CCSize& originalSize)
{
return CCSpriteFrame::createWithTextureFilename(filename, rect, rotated, offset, originalSize);
}
CCSpriteFrame* CCSpriteFrame::createWithTextureFilename(const char* filename, const CCRect& rect, bool rotated, const CCPoint& offset, const CCSize& originalSize)
{

View File

@ -94,25 +94,25 @@ public:
@warning: This interface will be deprecated in future.
It is assumed that the frame was not trimmed.
*/
//static CCSpriteFrame* frameWithTexture(CCTexture2D* pobTexture, const CCRect& rect);
static CCSpriteFrame* frameWithTexture(CCTexture2D* pobTexture, const CCRect& rect);
/** Create a CCSpriteFrame with a texture filename, rect in points.
It is assumed that the frame was not trimmed.
@warning: This interface will be deprecated in future.
*/
//static CCSpriteFrame* frameWithTextureFilename(const char* filename, const CCRect& rect);
static CCSpriteFrame* frameWithTextureFilename(const char* filename, const CCRect& rect);
/** Create a CCSpriteFrame with a texture, rect, rotated, offset and originalSize in pixels.
The originalSize is the size in points of the frame before being trimmed.
@warning: This interface will be deprecated in future.
*/
//static CCSpriteFrame* frameWithTexture(CCTexture2D* pobTexture, const CCRect& rect, bool rotated, const CCPoint& offset, const CCSize& originalSize);
static CCSpriteFrame* frameWithTexture(CCTexture2D* pobTexture, const CCRect& rect, bool rotated, const CCPoint& offset, const CCSize& originalSize);
/** Create a CCSpriteFrame with a texture filename, rect, rotated, offset and originalSize in pixels.
The originalSize is the size in pixels of the frame before being trimmed.
@warning: This interface will be deprecated in future.
*/
//static CCSpriteFrame* frameWithTextureFilename(const char* filename, const CCRect& rect, bool rotated, const CCPoint& offset, const CCSize& originalSize);
static CCSpriteFrame* frameWithTextureFilename(const char* filename, const CCRect& rect, bool rotated, const CCPoint& offset, const CCSize& originalSize);
/** Create a CCSpriteFrame with a texture, rect in points.
It is assumed that the frame was not trimmed.

View File

@ -65,10 +65,10 @@ CCParallaxNode::~CCParallaxNode()
}
}
// CCParallaxNode * CCParallaxNode::node()
// {
// return CCParallaxNode::create();
// }
CCParallaxNode * CCParallaxNode::node()
{
return CCParallaxNode::create();
}
CCParallaxNode * CCParallaxNode::create()
{

View File

@ -51,7 +51,7 @@ public:
CCParallaxNode();
virtual ~CCParallaxNode();
//@warning: This interface will be deprecated in future.
//static CCParallaxNode * node();
static CCParallaxNode * node();
static CCParallaxNode * create();
virtual void addChild(CCNode * child, unsigned int z, const CCPoint& parallaxRatio, const CCPoint& positionOffset);
// super methods

View File

@ -38,10 +38,10 @@ NS_CC_BEGIN
// CCTMXLayer - init & alloc & dealloc
// CCTMXLayer * CCTMXLayer::layerWithTilesetInfo(CCTMXTilesetInfo *tilesetInfo, CCTMXLayerInfo *layerInfo, CCTMXMapInfo *mapInfo)
// {
// return CCTMXLayer::create(tilesetInfo, layerInfo, mapInfo);
// }
CCTMXLayer * CCTMXLayer::layerWithTilesetInfo(CCTMXTilesetInfo *tilesetInfo, CCTMXLayerInfo *layerInfo, CCTMXMapInfo *mapInfo)
{
return CCTMXLayer::create(tilesetInfo, layerInfo, mapInfo);
}
CCTMXLayer * CCTMXLayer::create(CCTMXTilesetInfo *tilesetInfo, CCTMXLayerInfo *layerInfo, CCTMXMapInfo *mapInfo)
{

View File

@ -86,7 +86,7 @@ public:
/** creates a CCTMXLayer with an tileset info, a layer info and a map info
@warning: This interface will be deprecated in future.
*/
//static CCTMXLayer * layerWithTilesetInfo(CCTMXTilesetInfo *tilesetInfo, CCTMXLayerInfo *layerInfo, CCTMXMapInfo *mapInfo);
static CCTMXLayer * layerWithTilesetInfo(CCTMXTilesetInfo *tilesetInfo, CCTMXLayerInfo *layerInfo, CCTMXMapInfo *mapInfo);
/** creates a CCTMXLayer with an tileset info, a layer info and a map info */
static CCTMXLayer * create(CCTMXTilesetInfo *tilesetInfo, CCTMXLayerInfo *layerInfo, CCTMXMapInfo *mapInfo);

View File

@ -32,10 +32,10 @@ THE SOFTWARE.
NS_CC_BEGIN
// implementation CCTMXTiledMap
// CCTMXTiledMap * CCTMXTiledMap::tiledMapWithTMXFile(const char *tmxFile)
// {
// return CCTMXTiledMap::create(tmxFile);
// }
CCTMXTiledMap * CCTMXTiledMap::tiledMapWithTMXFile(const char *tmxFile)
{
return CCTMXTiledMap::create(tmxFile);
}
CCTMXTiledMap * CCTMXTiledMap::create(const char *tmxFile)
{
@ -49,10 +49,10 @@ CCTMXTiledMap * CCTMXTiledMap::create(const char *tmxFile)
return NULL;
}
// CCTMXTiledMap* CCTMXTiledMap::tiledMapWithXML(const char* tmxString, const char* resourcePath)
// {
// return CCTMXTiledMap::create(tmxString, resourcePath);
// }
CCTMXTiledMap* CCTMXTiledMap::tiledMapWithXML(const char* tmxString, const char* resourcePath)
{
return CCTMXTiledMap::create(tmxString, resourcePath);
}
CCTMXTiledMap* CCTMXTiledMap::create(const char* tmxString, const char* resourcePath)
{

View File

@ -119,12 +119,12 @@ public:
/** creates a TMX Tiled Map with a TMX file.
@warning: This interface will be deprecated in future.
*/
//static CCTMXTiledMap* tiledMapWithTMXFile(const char *tmxFile);
static CCTMXTiledMap* tiledMapWithTMXFile(const char *tmxFile);
/** initializes a TMX Tiled Map with a TMX formatted XML string and a path to TMX resources
@warning: This interface will be deprecated in future.
*/
//static CCTMXTiledMap* tiledMapWithXML(const char* tmxString, const char* resourcePath);
static CCTMXTiledMap* tiledMapWithXML(const char* tmxString, const char* resourcePath);
/** creates a TMX Tiled Map with a TMX file.*/
static CCTMXTiledMap* create(const char *tmxFile);

View File

@ -36,10 +36,10 @@ NS_CC_BEGIN
// implementation CCTileMapAtlas
// CCTileMapAtlas * CCTileMapAtlas::tileMapAtlasWithTileFile(const char *tile, const char *mapFile, int tileWidth, int tileHeight)
// {
// return CCTileMapAtlas::create(tile, mapFile, tileWidth, tileHeight);
// }
CCTileMapAtlas * CCTileMapAtlas::tileMapAtlasWithTileFile(const char *tile, const char *mapFile, int tileWidth, int tileHeight)
{
return CCTileMapAtlas::create(tile, mapFile, tileWidth, tileHeight);
}
CCTileMapAtlas * CCTileMapAtlas::create(const char *tile, const char *mapFile, int tileWidth, int tileHeight)
{

Some files were not shown because too many files have changed in this diff Show More