issue #116: remove __super

This commit is contained in:
Ming 2010-09-02 06:54:42 +00:00
parent 73d6ecb232
commit 59afd38192
27 changed files with 256 additions and 330 deletions

View File

@ -153,7 +153,7 @@ NSObject *CCSpeed::copyWithZone(NSZone *pZone)
pRet = new CCSpeed();
pZone = pNewZone = new NSZone(pRet);
}
__super::copyWithZone(pZone);
CCAction::copyWithZone(pZone);
pRet->initWithAction( (CCIntervalAction*)(m_pOther->copy()->autorelease()) , m_fSpeed );
@ -163,14 +163,14 @@ NSObject *CCSpeed::copyWithZone(NSZone *pZone)
void CCSpeed::startWithTarget(CCNode* pTarget)
{
__super::startWithTarget(pTarget);
CCAction::startWithTarget(pTarget);
m_pOther->startWithTarget(pTarget);
}
void CCSpeed::stop()
{
m_pOther->stop();
__super::stop();
CCAction::stop();
}
void CCSpeed::step(ccTime dt)
@ -280,7 +280,7 @@ NSObject *CCFollow::copyWithZone(NSZone *pZone)
pRet = new CCFollow();
pZone = pNewZone = new NSZone(pRet);
}
__super::copyWithZone(pZone);
CCAction::copyWithZone(pZone);
// copy member data
pRet->m_nTag = m_nTag;
CCX_SAFE_DELETE(pNewZone);
@ -315,7 +315,7 @@ bool CCFollow::isDone()
void CCFollow::stop()
{
m_pTarget = NULL;
__super::stop();
CCAction::stop();
}
}//namespace cocos2d

View File

@ -31,7 +31,7 @@ namespace cocos2d{
//
void CCCameraAction::startWithTarget(CCNode *pTarget)
{
__super::startWithTarget(pTarget);
CCIntervalAction::startWithTarget(pTarget);
CCCamera *camera = pTarget->getCamera();
camera->getCenterXYZ(&m_fCenterXOrig, &m_fCenterYOrig, &m_fCenterZOrig);
@ -66,7 +66,7 @@ namespace cocos2d{
pZone = pNewZone = new NSZone(pRet);
}
__super::copyWithZone(pZone);
CCIntervalAction::copyWithZone(pZone);
pRet->initWithDuration(m_fDuration, m_fRadius, m_fDeltaRadius, m_fAngleZ, m_fDeltaAngleZ, m_fAngleX, m_fDeltaAngleX);
@ -76,7 +76,7 @@ namespace cocos2d{
CCOrbitCamera * CCOrbitCamera::initWithDuration(float t, float radius, float deltaRadius, float angleZ, float deltaAngleZ, float angleX, float deltaAngleX)
{
if ( __super::initWithDuration(t) )
if ( CCIntervalAction::initWithDuration(t) )
{
m_fRadius = radius;
m_fDeltaRadius = deltaRadius;
@ -94,7 +94,7 @@ namespace cocos2d{
void CCOrbitCamera::startWithTarget(CCNode *pTarget)
{
__super::startWithTarget(pTarget);
CCIntervalAction::startWithTarget(pTarget);
float r, zenith, azimuth;
this->sphericalRadius(&r, &zenith, &azimuth);
if( _isnan(m_fRadius) )

View File

@ -62,7 +62,7 @@ namespace cocos2d {
{
assert(pAction != NULL);
if (__super::initWithDuration(pAction->getDuration()))
if (CCIntervalAction::initWithDuration(pAction->getDuration()))
{
m_pOther = pAction;
pAction->retain();
@ -88,7 +88,7 @@ namespace cocos2d {
pZone = pNewZone = new NSZone(pCopy);
}
__super::copyWithZone(pZone);
CCIntervalAction::copyWithZone(pZone);
pCopy->initWithAction((CCIntervalAction *)(m_pOther->copy()->autorelease()));
@ -103,14 +103,14 @@ namespace cocos2d {
void CCEaseAction::startWithTarget(CCNode *pTarget)
{
__super::startWithTarget(pTarget);
CCIntervalAction::startWithTarget(pTarget);
m_pOther->startWithTarget(m_pTarget);
}
void CCEaseAction::stop(void)
{
m_pOther->stop();
__super::stop();
CCIntervalAction::stop();
}
void CCEaseAction::update(cocos2d::ccTime time)
@ -146,7 +146,7 @@ namespace cocos2d {
bool CCEaseRateAction::initWithAction(cocos2d::CCIntervalAction *pAction, float fRate)
{
if (__super::initWithAction(pAction))
if (CCEaseAction::initWithAction(pAction))
{
m_fRate = fRate;
return true;
@ -170,10 +170,6 @@ namespace cocos2d {
pZone = pNewZone = new NSZone(pCopy);
}
//__super::copyWithZone(pZone);
pCopy->initWithAction((CCIntervalAction*)(m_pOther->copy()->autorelease()), m_fRate);
CCX_SAFE_DELETE(pNewZone);
@ -225,10 +221,6 @@ namespace cocos2d {
pZone = pNewZone = new NSZone(pCopy);
}
//__super::copyWithZone(pZone);
pCopy->initWithAction((CCIntervalAction*)(m_pOther->copy()->autorelease()), m_fRate);
CCX_SAFE_DELETE(pNewZone);
@ -276,10 +268,6 @@ namespace cocos2d {
pZone = pNewZone = new NSZone(pCopy);
}
//__super::copyWithZone(pZone);
pCopy->initWithAction((CCIntervalAction*)(m_pOther->copy()->autorelease()), m_fRate);
CCX_SAFE_DELETE(pNewZone);
@ -327,9 +315,6 @@ namespace cocos2d {
pZone = pNewZone = new NSZone(pCopy);
}
//__super::copyWithZone(pZone);
pCopy->initWithAction((CCIntervalAction*)(m_pOther->copy()->autorelease()), m_fRate);
CCX_SAFE_DELETE(pNewZone);
@ -399,9 +384,6 @@ namespace cocos2d {
pZone = pNewZone = new NSZone(pCopy);
}
//__super::copyWithZone(pZone);
pCopy->initWithAction((CCIntervalAction *)(m_pOther->copy()->autorelease()));
CCX_SAFE_DELETE(pNewZone);
@ -454,9 +436,6 @@ namespace cocos2d {
pZone = pNewZone = new NSZone(pCopy);
}
//__super::copyWithZone(pZone);
pCopy->initWithAction((CCIntervalAction *)(m_pOther->copy()->autorelease()));
CCX_SAFE_DELETE(pNewZone);
@ -509,9 +488,6 @@ namespace cocos2d {
pZone = pNewZone = new NSZone(pCopy);
}
//__super::copyWithZone(pZone);
pCopy->initWithAction((CCIntervalAction *)(m_pOther->copy()->autorelease()));
CCX_SAFE_DELETE(pNewZone);
@ -569,9 +545,6 @@ namespace cocos2d {
pZone = pNewZone = new NSZone(pCopy);
}
//__super::copyWithZone(pZone);
pCopy->initWithAction((CCIntervalAction *)(m_pOther->copy()->autorelease()));
CCX_SAFE_DELETE(pNewZone);
@ -624,9 +597,6 @@ namespace cocos2d {
pZone = pNewZone = new NSZone(pCopy);
}
//__super::copyWithZone(pZone);
pCopy->initWithAction((CCIntervalAction *)(m_pOther->copy()->autorelease()));
CCX_SAFE_DELETE(pNewZone);
@ -679,9 +649,6 @@ namespace cocos2d {
pZone = pNewZone = new NSZone(pCopy);
}
//__super::copyWithZone(pZone);
pCopy->initWithAction((CCIntervalAction *)(m_pOther->copy()->autorelease()));
CCX_SAFE_DELETE(pNewZone);
@ -739,7 +706,7 @@ namespace cocos2d {
bool CCEaseElastic::initWithAction(cocos2d::CCIntervalAction *pAction, float fPeriod)
{
if (__super::initWithAction(pAction))
if (CCEaseAction::initWithAction(pAction))
{
m_fPeriod = fPeriod;
return true;
@ -763,9 +730,6 @@ namespace cocos2d {
pZone = pNewZone = new NSZone(pCopy);
}
//__super::copyWithZone(pZone);
pCopy->initWithAction((CCIntervalAction *)(m_pOther->copy()->autorelease()), m_fPeriod);
CCX_SAFE_DELETE(pNewZone);
@ -833,9 +797,6 @@ namespace cocos2d {
pZone = pNewZone = new NSZone(pCopy);
}
//__super::copyWithZone(pZone);
pCopy->initWithAction((CCIntervalAction *)(m_pOther->copy()->autorelease()), m_fPeriod);
CCX_SAFE_DELETE(pNewZone);
@ -918,9 +879,6 @@ namespace cocos2d {
pZone = pNewZone = new NSZone(pCopy);
}
//__super::copyWithZone(pZone);
pCopy->initWithAction((CCIntervalAction *)(m_pOther->copy()->autorelease()), m_fPeriod);
CCX_SAFE_DELETE(pNewZone);
@ -1002,9 +960,6 @@ namespace cocos2d {
pZone = pNewZone = new NSZone(pCopy);
}
//__super::copyWithZone(pZone);
pCopy->initWithAction((CCIntervalAction *)(m_pOther->copy()->autorelease()), m_fPeriod);
CCX_SAFE_DELETE(pNewZone);
@ -1084,9 +1039,6 @@ namespace cocos2d {
pZone = pNewZone = new NSZone(pCopy);
}
//__super::copyWithZone(pZone);
pCopy->initWithAction((CCIntervalAction *)(m_pOther->copy()->autorelease()));
CCX_SAFE_DELETE(pNewZone);
@ -1150,9 +1102,6 @@ namespace cocos2d {
pZone = pNewZone = new NSZone(pCopy);
}
//__super::copyWithZone(pZone);
pCopy->initWithAction((CCIntervalAction *)(m_pOther->copy()->autorelease()));
CCX_SAFE_DELETE(pNewZone);
@ -1206,9 +1155,6 @@ namespace cocos2d {
pZone = pNewZone = new NSZone(pCopy);
}
//__super::copyWithZone(pZone);
pCopy->initWithAction((CCIntervalAction *)(m_pOther->copy()->autorelease()));
CCX_SAFE_DELETE(pNewZone);
@ -1262,9 +1208,6 @@ namespace cocos2d {
pZone = pNewZone = new NSZone(pCopy);
}
//__super::copyWithZone(pZone);
pCopy->initWithAction((CCIntervalAction *)(m_pOther->copy()->autorelease()));
CCX_SAFE_DELETE(pNewZone);
@ -1323,9 +1266,6 @@ namespace cocos2d {
pZone = pNewZone = new NSZone(pCopy);
}
//__super::copyWithZone(pZone);
pCopy->initWithAction((CCIntervalAction *)(m_pOther->copy()->autorelease()));
CCX_SAFE_DELETE(pNewZone);
@ -1379,9 +1319,6 @@ namespace cocos2d {
pZone = pNewZone = new NSZone(pCopy);
}
//__super::copyWithZone(pZone);
pCopy->initWithAction((CCIntervalAction *)(m_pOther->copy()->autorelease()));
CCX_SAFE_DELETE(pNewZone);
@ -1437,9 +1374,6 @@ namespace cocos2d {
pZone = pNewZone = new NSZone(pCopy);
}
//__super::copyWithZone(pZone);
pCopy->initWithAction((CCIntervalAction *)(m_pOther->copy()->autorelease()));
CCX_SAFE_DELETE(pNewZone);

View File

@ -49,7 +49,7 @@ namespace cocos2d
bool CCWaves3D::initWithWaves(int wav, float amp, cocos2d::ccGridSize gridSize, cocos2d::ccTime duration)
{
if (__super::initWithSize(gridSize, duration))
if (CCGrid3DAction::initWithSize(gridSize, duration))
{
m_nWaves = wav;
m_fAmplitude = amp;
@ -76,7 +76,7 @@ namespace cocos2d
pZone = pNewZone = new NSZone(pCopy);
}
__super::copyWithZone(pZone);
CCGrid3DAction::copyWithZone(pZone);
pCopy->initWithWaves(m_nWaves, m_fAmplitude, m_sGridSize, m_fDuration);
@ -123,7 +123,7 @@ namespace cocos2d
bool CCFlipX3D::initWithDuration(cocos2d::ccTime duration)
{
return __super::initWithSize(ccg(1, 1), duration);
return CCGrid3DAction::initWithSize(ccg(1, 1), duration);
}
bool CCFlipX3D::initWithSize(cocos2d::ccGridSize gridSize, cocos2d::ccTime duration)
@ -136,7 +136,7 @@ namespace cocos2d
return false;
}
return __super::initWithSize(gridSize, duration);
return CCGrid3DAction::initWithSize(gridSize, duration);
}
NSObject* CCFlipX3D::copyWithZone(cocos2d::NSZone *pZone)
@ -154,7 +154,7 @@ namespace cocos2d
pZone = pNewZone = new NSZone(pCopy);
}
__super::copyWithZone(pZone);
CCGrid3DAction::copyWithZone(pZone);
pCopy->initWithSize(m_sGridSize, m_fDuration);
@ -262,7 +262,7 @@ namespace cocos2d
pZone = pNewZone = new NSZone(pCopy);
}
__super::copyWithZone(pZone);
CCFlipX3D::copyWithZone(pZone);
pCopy->initWithSize(m_sGridSize, m_fDuration);
@ -358,7 +358,7 @@ namespace cocos2d
bool CCLens3D::initWithPosition(cocos2d::CGPoint pos, float r, cocos2d::ccGridSize gridSize, cocos2d::ccTime duration)
{
if (__super::initWithSize(gridSize, duration))
if (CCGrid3DAction::initWithSize(gridSize, duration))
{
m_position = pos;
m_fRadius = r;
@ -386,8 +386,7 @@ namespace cocos2d
pZone = pNewZone = new NSZone(pCopy);
}
__super::copyWithZone(pZone);
CCGrid3DAction::copyWithZone(pZone);
pCopy->initWithPosition(m_position, m_fRadius, m_sGridSize, m_fDuration);
@ -460,7 +459,7 @@ namespace cocos2d
bool CCRipple3D::initWithPosition(cocos2d::CGPoint pos, float r, int wav, float amp, cocos2d::ccGridSize gridSize, cocos2d::ccTime duration)
{
if (__super::initWithSize(gridSize, duration))
if (CCGrid3DAction::initWithSize(gridSize, duration))
{
m_position = pos;
m_fRadius = r;
@ -489,8 +488,7 @@ namespace cocos2d
pZone = pNewZone = new NSZone(pCopy);
}
__super::copyWithZone(pZone);
CCGrid3DAction::copyWithZone(pZone);
pCopy->initWithPosition(m_position, m_fRadius, m_nWaves, m_fAmplitude, m_sGridSize, m_fDuration);
@ -545,7 +543,7 @@ namespace cocos2d
bool CCShaky3D::initWithRange(int range, bool shakeZ, cocos2d::ccGridSize gridSize, cocos2d::ccTime duration)
{
if (__super::initWithSize(gridSize, duration))
if (CCGrid3DAction::initWithSize(gridSize, duration))
{
m_nRandrange = range;
m_bShakeZ = shakeZ;
@ -571,7 +569,7 @@ namespace cocos2d
pZone = pNewZone = new NSZone(pCopy);
}
__super::copyWithZone(pZone);
CCGrid3DAction::copyWithZone(pZone);
pCopy->initWithRange(m_nRandrange, m_bShakeZ, m_sGridSize, m_fDuration);
@ -623,7 +621,7 @@ namespace cocos2d
bool CCLiquid::initWithWaves(int wav, float amp, cocos2d::ccGridSize gridSize, cocos2d::ccTime duration)
{
if (__super::initWithSize(gridSize, duration))
if (CCGrid3DAction::initWithSize(gridSize, duration))
{
m_nWaves = wav;
m_fAmplitude = amp;
@ -650,7 +648,7 @@ namespace cocos2d
pZone = pNewZone = new NSZone(pCopy);
}
__super::copyWithZone(pZone);
CCGrid3DAction::copyWithZone(pZone);
pCopy->initWithWaves(m_nWaves, m_fAmplitude, m_sGridSize, m_fDuration);
@ -697,7 +695,7 @@ namespace cocos2d
bool CCWaves::initWithWaves(int wav, float amp, bool h, bool v, cocos2d::ccGridSize gridSize, cocos2d::ccTime duration)
{
if (__super::initWithSize(gridSize, duration))
if (CCGrid3DAction::initWithSize(gridSize, duration))
{
m_nWaves = wav;
m_fAmplitude = amp;
@ -726,7 +724,7 @@ namespace cocos2d
pZone = pNewZone = new NSZone(pCopy);
}
__super::copyWithZone(pZone);
CCGrid3DAction::copyWithZone(pZone);
pCopy->initWithWaves(m_nWaves, m_fAmplitude, m_bHorizontal, m_bVertical, m_sGridSize, m_fDuration);
@ -782,7 +780,7 @@ namespace cocos2d
bool CCTwirl::initWithPosition(cocos2d::CGPoint pos, int t, float amp, cocos2d::ccGridSize gridSize, cocos2d::ccTime duration)
{
if (__super::initWithSize(gridSize, duration))
if (CCGrid3DAction::initWithSize(gridSize, duration))
{
m_position = pos;
m_nTwirls = t;
@ -810,7 +808,7 @@ namespace cocos2d
pZone = pNewZone = new NSZone(pCopy);
}
__super::copyWithZone(pZone);
CCGrid3DAction::copyWithZone(pZone);
pCopy->initWithPosition(m_position, m_nTwirls, m_fAmplitude, m_sGridSize, m_fDuration);

View File

@ -49,7 +49,7 @@ namespace cocos2d
bool CCGridAction::initWithSize(cocos2d::ccGridSize gridSize, cocos2d::ccTime duration)
{
if (__super::initWithDuration(duration))
if (CCIntervalAction::initWithDuration(duration))
{
m_sGridSize = gridSize;
@ -61,7 +61,7 @@ namespace cocos2d
void CCGridAction::startWithTarget(CCNode *pTarget)
{
__super::startWithTarget(pTarget);
CCIntervalAction::startWithTarget(pTarget);
CCGridBase *newgrid = grid();
@ -120,7 +120,7 @@ namespace cocos2d
pZone = pNewZone = new NSZone(pCopy);
}
__super::copyWithZone(pZone);
CCIntervalAction::copyWithZone(pZone);
pCopy->initWithSize(m_sGridSize, m_fDuration);
@ -200,7 +200,7 @@ namespace cocos2d
bool CCAccelDeccelAmplitude::initWithAction(cocos2d::CCAction *pAction, cocos2d::ccTime duration)
{
if (__super::initWithDuration(duration))
if (CCIntervalAction::initWithDuration(duration))
{
m_fRate = 1.0f;
m_pOther = (CCIntervalAction*)(pAction);
@ -219,7 +219,7 @@ namespace cocos2d
void CCAccelDeccelAmplitude::startWithTarget(CCNode *pTarget)
{
__super::startWithTarget(pTarget);
CCIntervalAction::startWithTarget(pTarget);
m_pOther->startWithTarget(pTarget);
}
@ -263,7 +263,7 @@ namespace cocos2d
bool CCAccelAmplitude::initWithAction(cocos2d::CCAction *pAction, cocos2d::ccTime duration)
{
if (__super::initWithDuration(duration))
if (CCIntervalAction::initWithDuration(duration))
{
m_fRate = 1.0f;
m_pOther = (CCIntervalAction*)(pAction);
@ -282,7 +282,7 @@ namespace cocos2d
void CCAccelAmplitude::startWithTarget(CCNode *pTarget)
{
__super::startWithTarget(pTarget);
CCIntervalAction::startWithTarget(pTarget);
m_pOther->startWithTarget(pTarget);
}
@ -319,7 +319,7 @@ namespace cocos2d
bool CCDeccelAmplitude::initWithAction(cocos2d::CCAction *pAction, cocos2d::ccTime duration)
{
if (__super::initWithDuration(duration))
if (CCIntervalAction::initWithDuration(duration))
{
m_fRate = 1.0f;
m_pOther = (CCIntervalAction*)(pAction);
@ -338,7 +338,7 @@ namespace cocos2d
void CCDeccelAmplitude::startWithTarget(CCNode *pTarget)
{
__super::startWithTarget(pTarget);
CCIntervalAction::startWithTarget(pTarget);
m_pOther->startWithTarget(pTarget);
}
@ -357,7 +357,7 @@ namespace cocos2d
void CCStopGrid::startWithTarget(CCNode *pTarget)
{
__super::startWithTarget(pTarget);
CCInstantAction::startWithTarget(pTarget);
CCGridBase *pGrid = m_pTarget->getGrid();
if (pGrid && pGrid->isActive())
@ -403,7 +403,7 @@ namespace cocos2d
void CCReuseGrid::startWithTarget(CCNode *pTarget)
{
__super::startWithTarget(pTarget);
CCInstantAction::startWithTarget(pTarget);
if (m_pTarget->getGrid() && m_pTarget->getGrid()->isActive())
{

View File

@ -48,7 +48,7 @@ namespace cocos2d {
pRet = new CCInstantAction();
pZone = pNewZone = new NSZone(pRet);
}
__super::copyWithZone(pZone);
CCFiniteTimeAction::copyWithZone(pZone);
CCX_SAFE_DELETE(pNewZone);
return pRet;
}
@ -80,7 +80,7 @@ namespace cocos2d {
}
void CCShow::startWithTarget(CCNode *pTarget)
{
__super::startWithTarget(pTarget);
CCInstantAction::startWithTarget(pTarget);
pTarget->setIsVisible(true);
}
CCFiniteTimeAction *CCShow::reverse()
@ -98,7 +98,7 @@ namespace cocos2d {
}
void CCHide::startWithTarget(CCNode *pTarget)
{
__super::startWithTarget(pTarget);
CCInstantAction::startWithTarget(pTarget);
pTarget->setIsVisible(false);
}
@ -118,7 +118,7 @@ namespace cocos2d {
}
void CCToggleVisibility::startWithTarget(CCNode *pTarget)
{
__super::startWithTarget(pTarget);
CCInstantAction::startWithTarget(pTarget);
pTarget->setIsVisible(! pTarget->getIsVisible());
}
//
@ -138,7 +138,7 @@ namespace cocos2d {
}
void CCFlipX::startWithTarget(CCNode *pTarget)
{
__super::startWithTarget(pTarget);
CCInstantAction::startWithTarget(pTarget);
((CCSprite*)(pTarget))->setFlipX(m_bFlipX);
}
@ -160,7 +160,7 @@ namespace cocos2d {
pRet = new CCFlipX();
pZone = pNewZone = new NSZone(pRet);
}
__super::copyWithZone(pZone);
CCInstantAction::copyWithZone(pZone);
pRet->initWithFlipX(m_bFlipX);
CCX_SAFE_DELETE(pNewZone);
return pRet;
@ -184,7 +184,7 @@ namespace cocos2d {
void CCFlipY::startWithTarget(CCNode *pTarget)
{
__super::startWithTarget(pTarget);
CCInstantAction::startWithTarget(pTarget);
((CCSprite*)(pTarget))->setFlipY(m_bFlipY);
}
@ -206,7 +206,7 @@ namespace cocos2d {
pRet = new CCFlipY();
pZone = pNewZone = new NSZone(pRet);
}
__super::copyWithZone(pZone);
CCInstantAction::copyWithZone(pZone);
pRet->initWithFlipY(m_bFlipY);
CCX_SAFE_DELETE(pNewZone);
return pRet;
@ -241,7 +241,7 @@ namespace cocos2d {
pRet = new CCPlace();
pZone = pNewZone = new NSZone(pRet);
}
__super::copyWithZone(pZone);
CCInstantAction::copyWithZone(pZone);
pRet->initWithPosition(m_tPosition);
CCX_SAFE_DELETE(pNewZone);
return pRet;
@ -249,7 +249,7 @@ namespace cocos2d {
void CCPlace::startWithTarget(CCNode *pTarget)
{
__super::startWithTarget(pTarget);
CCInstantAction::startWithTarget(pTarget);
m_pTarget->setPosition(m_tPosition);
}
@ -284,7 +284,7 @@ namespace cocos2d {
pRet = new CCCallFunc();
pZone = pNewZone = new NSZone(pRet);
}
__super::copyWithZone(pZone);
CCInstantAction::copyWithZone(pZone);
pRet->initWithTarget(m_pSelectorTarget);
pRet->m_pCallFunc = m_pCallFunc;
CCX_SAFE_DELETE(pNewZone);
@ -292,7 +292,7 @@ namespace cocos2d {
}
void CCCallFunc::startWithTarget(CCNode *pTarget)
{
__super::startWithTarget(pTarget);
CCInstantAction::startWithTarget(pTarget);
this->execute();
}
void CCCallFunc::execute()
@ -334,7 +334,7 @@ namespace cocos2d {
CCCallFuncND * CCCallFuncND::initWithTarget(SelectorProtocol* pSelectorTarget, SEL_CallFuncND selector, void* d)
{
if( __super::initWithTarget(pSelectorTarget) )
if( CCCallFunc::initWithTarget(pSelectorTarget) )
{
m_pData = d;
m_pCallFuncND = selector;
@ -353,7 +353,7 @@ namespace cocos2d {
pRet = new CCCallFuncND();
zone = pNewZone = new NSZone(pRet);
}
__super::copyWithZone(zone);
CCCallFunc::copyWithZone(zone);
pRet->initWithTarget(m_pSelectorTarget, m_pCallFuncND, m_pData);
CCX_SAFE_DELETE(pNewZone);
return pRet;

View File

@ -81,7 +81,7 @@ NSObject* CCIntervalAction::copyWithZone(NSZone *pZone)
}
__super::copyWithZone(pZone);
CCFiniteTimeAction::copyWithZone(pZone);
CCX_SAFE_DELETE(pNewZone);
@ -127,7 +127,7 @@ CGFloat CCIntervalAction::getAmplitudeRate(void)
void CCIntervalAction::startWithTarget(CCNode *pTarget)
{
__super::startWithTarget(pTarget);
CCFiniteTimeAction::startWithTarget(pTarget);
m_elapsed = 0.0f;
m_bFirstTick = true;
}
@ -187,7 +187,7 @@ bool CCSequence::initOneTwo(cocos2d::CCFiniteTimeAction *pActionOne, cocos2d::CC
assert(pActionTwo != NULL);
ccTime d = pActionOne->getDuration() + pActionTwo->getDuration();
__super::initWithDuration(d);
CCIntervalAction::initWithDuration(d);
m_pActions[0] = pActionOne;
pActionOne->retain();
@ -213,7 +213,7 @@ NSObject* CCSequence::copyWithZone(NSZone *pZone)
pZone = pNewZone = new NSZone(pCopy);
}
__super::copyWithZone(pZone);
CCIntervalAction::copyWithZone(pZone);
pCopy->initOneTwo((CCFiniteTimeAction*)(m_pActions[0]->copy()->autorelease()),
(CCFiniteTimeAction*)(m_pActions[1]->copy()->autorelease()));
@ -230,7 +230,7 @@ CCSequence::~CCSequence(void)
void CCSequence::startWithTarget(CCNode *pTarget)
{
__super::startWithTarget(pTarget);
CCIntervalAction::startWithTarget(pTarget);
m_split = m_pActions[0]->getDuration() / m_fDuration;
m_last = -1;
}
@ -239,7 +239,7 @@ void CCSequence::stop(void)
{
m_pActions[0]->stop();
m_pActions[1]->stop();
__super::stop();
CCIntervalAction::stop();
}
void CCSequence::update(cocos2d::ccTime time)
@ -315,7 +315,7 @@ bool CCRepeat::initWithAction(cocos2d::CCFiniteTimeAction *pAction, unsigned int
{
ccTime d = pAction->getDuration() * times;
if (__super::initWithDuration(d))
if (CCIntervalAction::initWithDuration(d))
{
m_uTimes = times;
m_pOther = pAction;
@ -345,7 +345,7 @@ NSObject* CCRepeat::copyWithZone(cocos2d::NSZone *pZone)
pZone = pNewZone = new NSZone(pCopy);
}
__super::copyWithZone(pZone);
CCIntervalAction::copyWithZone(pZone);
pCopy->initWithAction((CCFiniteTimeAction*)(m_pOther->copy()->autorelease()), m_uTimes);
@ -361,14 +361,14 @@ CCRepeat::~CCRepeat(void)
void CCRepeat::startWithTarget(CCNode *pTarget)
{
m_uTotal = 0;
__super::startWithTarget(pTarget);
CCIntervalAction::startWithTarget(pTarget);
m_pOther->startWithTarget(pTarget);
}
void CCRepeat::stop(void)
{
m_pOther->stop();
__super::stop();
CCIntervalAction::stop();
}
// issue #80. Instead of hooking step:, hook update: since it can be called by any
@ -461,7 +461,7 @@ NSObject* CCRepeatForever::copyWithZone(NSZone *pZone)
pRet = new CCRepeatForever();
pZone = pNewZone = new NSZone(pRet);
}
__super::copyWithZone(pZone);
CCIntervalAction::copyWithZone(pZone);
// win32 : use the m_pOther's copy object.
pRet->initWithAction((CCIntervalAction*)(m_pOther->copy()->autorelease()));
CCX_SAFE_DELETE(pNewZone);
@ -470,7 +470,7 @@ NSObject* CCRepeatForever::copyWithZone(NSZone *pZone)
void CCRepeatForever::startWithTarget(CCNode* pTarget)
{
__super::startWithTarget(pTarget);
CCIntervalAction::startWithTarget(pTarget);
m_pOther->startWithTarget(pTarget);
}
@ -543,7 +543,7 @@ bool CCSpawn:: initOneTwo(CCFiniteTimeAction *pAction1, CCFiniteTimeAction *pAct
// __super::initWithDuration(fmaxf(d1, d2));
float maxd = (d1 >= d2 || _isnan(d2)) ? d1 : d2;
__super::initWithDuration(maxd);
CCIntervalAction::initWithDuration(maxd);
m_pOne = pAction1;
m_pTwo = pAction2;
@ -578,7 +578,7 @@ NSObject* CCSpawn::copyWithZone(cocos2d::NSZone *pZone)
pZone = pNewZone = new NSZone(pCopy);
}
__super::copyWithZone(pZone);
CCIntervalAction::copyWithZone(pZone);
pCopy->initOneTwo((CCFiniteTimeAction*)(m_pOne->copy()->autorelease()),
(CCFiniteTimeAction*)(m_pTwo->copy()->autorelease()));
@ -595,7 +595,7 @@ CCSpawn::~CCSpawn(void)
void CCSpawn::startWithTarget(CCNode *pTarget)
{
__super::startWithTarget(pTarget);
CCIntervalAction::startWithTarget(pTarget);
m_pOne->startWithTarget(pTarget);
m_pTwo->startWithTarget(pTarget);
}
@ -604,7 +604,7 @@ void CCSpawn::stop(void)
{
m_pOne->stop();
m_pTwo->stop();
__super::stop();
CCIntervalAction::stop();
}
void CCSpawn::update(cocos2d::ccTime time)
@ -632,7 +632,7 @@ CCRotateTo* CCRotateTo::actionWithDuration(cocos2d::ccTime duration, float fDelt
bool CCRotateTo::initWithDuration(cocos2d::ccTime duration, float fDeltaAngle)
{
if (__super::initWithDuration(duration))
if (CCIntervalAction::initWithDuration(duration))
{
m_fDstAngle = fDeltaAngle;
return true;
@ -656,7 +656,7 @@ NSObject* CCRotateTo::copyWithZone(cocos2d::NSZone *pZone)
pZone = pNewZone = new NSZone(pCopy);
}
__super::copyWithZone(pZone);
CCIntervalAction::copyWithZone(pZone);
pCopy->initWithDuration(m_fDuration, m_fDstAngle);
@ -667,7 +667,7 @@ NSObject* CCRotateTo::copyWithZone(cocos2d::NSZone *pZone)
void CCRotateTo::startWithTarget(CCNode *pTarget)
{
__super::startWithTarget(pTarget);
CCIntervalAction::startWithTarget(pTarget);
m_fStartAngle = pTarget->getRotation();
@ -711,7 +711,7 @@ CCRotateBy* CCRotateBy::actionWithDuration(cocos2d::ccTime duration, float fDelt
bool CCRotateBy::initWithDuration(cocos2d::ccTime duration, float fDeltaAngle)
{
if (__super::initWithDuration(duration))
if (CCIntervalAction::initWithDuration(duration))
{
m_fAngle = fDeltaAngle;
return true;
@ -735,7 +735,7 @@ NSObject* CCRotateBy::copyWithZone(cocos2d::NSZone *pZone)
pZone = pNewZone = new NSZone(pCopy);
}
__super::copyWithZone(pZone);
CCIntervalAction::copyWithZone(pZone);
pCopy->initWithDuration(m_fDuration, m_fAngle);
@ -745,7 +745,7 @@ NSObject* CCRotateBy::copyWithZone(cocos2d::NSZone *pZone)
void CCRotateBy::startWithTarget(CCNode *pTarget)
{
__super::startWithTarget(pTarget);
CCIntervalAction::startWithTarget(pTarget);
m_fStartAngle = pTarget->getRotation();
}
@ -774,7 +774,7 @@ CCMoveTo* CCMoveTo::actionWithDuration(cocos2d::ccTime duration, cocos2d::CGPoin
bool CCMoveTo::initWithDuration(cocos2d::ccTime duration, cocos2d::CGPoint position)
{
if (__super::initWithDuration(duration))
if (CCIntervalAction::initWithDuration(duration))
{
m_endPosition = position;
return true;
@ -798,7 +798,7 @@ NSObject* CCMoveTo::copyWithZone(cocos2d::NSZone *pZone)
pZone = pNewZone = new NSZone(pCopy);
}
__super::copyWithZone(pZone);
CCIntervalAction::copyWithZone(pZone);
pCopy->initWithDuration(m_fDuration, m_endPosition);
@ -808,7 +808,7 @@ NSObject* CCMoveTo::copyWithZone(cocos2d::NSZone *pZone)
void CCMoveTo::startWithTarget(CCNode *pTarget)
{
__super::startWithTarget(pTarget);
CCIntervalAction::startWithTarget(pTarget);
m_startPosition = pTarget->getPosition();
m_delta = ccpSub(m_endPosition, m_startPosition);
}
@ -857,7 +857,7 @@ NSObject* CCMoveBy::copyWithZone(cocos2d::NSZone *pZone)
pZone = pNewZone = new NSZone(pCopy);
}
__super::copyWithZone(pZone);
CCMoveTo::copyWithZone(pZone);
pCopy->initWithDuration(m_fDuration, m_delta);
@ -868,7 +868,7 @@ NSObject* CCMoveBy::copyWithZone(cocos2d::NSZone *pZone)
void CCMoveBy::startWithTarget(CCNode *pTarget)
{
CGPoint dTmp = m_delta;
__super::startWithTarget(pTarget);
CCMoveTo::startWithTarget(pTarget);
m_delta = dTmp;
}
@ -891,7 +891,7 @@ CCJumpBy* CCJumpBy::actionWithDuration(cocos2d::ccTime duration, cocos2d::CGPoin
bool CCJumpBy::initWithDuration(cocos2d::ccTime duration, cocos2d::CGPoint position, cocos2d::ccTime height, int jumps)
{
if (__super::initWithDuration(duration))
if (CCIntervalAction::initWithDuration(duration))
{
m_delta = position;
m_height = height;
@ -918,7 +918,7 @@ NSObject* CCJumpBy::copyWithZone(cocos2d::NSZone *pZone)
pZone = pNewZone = new NSZone(pCopy);
}
__super::copyWithZone(pZone);
CCIntervalAction::copyWithZone(pZone);
pCopy->initWithDuration(m_fDuration, m_delta, m_height, m_nJumps);
@ -928,7 +928,7 @@ NSObject* CCJumpBy::copyWithZone(cocos2d::NSZone *pZone)
void CCJumpBy::startWithTarget(CCNode *pTarget)
{
__super::startWithTarget(pTarget);
CCIntervalAction::startWithTarget(pTarget);
m_startPosition = pTarget->getPosition();
}
@ -975,7 +975,7 @@ NSObject* CCJumpTo::copyWithZone(NSZone* pZone)
pZone = pNewZone = new NSZone(pCopy);
}
__super::copyWithZone(pZone);
CCJumpBy::copyWithZone(pZone);
pCopy->initWithDuration(m_fDuration, m_delta, m_height, m_nJumps);
@ -985,7 +985,7 @@ NSObject* CCJumpTo::copyWithZone(NSZone* pZone)
void CCJumpTo::startWithTarget(CCNode *pTarget)
{
__super::startWithTarget(pTarget);
CCJumpBy::startWithTarget(pTarget);
m_delta = ccp(m_delta.x - m_startPosition.x, m_delta.y - m_startPosition.y);
}
@ -1015,7 +1015,7 @@ CCBezierBy* CCBezierBy::actionWithDuration(cocos2d::ccTime t, cocos2d::ccBezierC
bool CCBezierBy::initWithDuration(cocos2d::ccTime t, cocos2d::ccBezierConfig c)
{
if (__super::initWithDuration(t))
if (CCIntervalAction::initWithDuration(t))
{
m_sConfig = c;
return true;
@ -1026,7 +1026,7 @@ bool CCBezierBy::initWithDuration(cocos2d::ccTime t, cocos2d::ccBezierConfig c)
void CCBezierBy::startWithTarget(CCNode *pTarget)
{
__super::startWithTarget(pTarget);
CCIntervalAction::startWithTarget(pTarget);
m_startPosition = pTarget->getPosition();
}
@ -1045,7 +1045,7 @@ NSObject* CCBezierBy::copyWithZone(cocos2d::NSZone *pZone)
pZone = pNewZone = new NSZone(pCopy);
}
__super::copyWithZone(pZone);
CCIntervalAction::copyWithZone(pZone);
pCopy->initWithDuration(m_fDuration, m_sConfig);
@ -1109,7 +1109,7 @@ NSObject* CCBezierTo::copyWithZone(cocos2d::NSZone *pZone)
pZone = pNewZone = new NSZone(pCopy);
}
__super::copyWithZone(pZone);
CCBezierBy::copyWithZone(pZone);
pCopy->initWithDuration(m_fDuration, m_sConfig);
@ -1119,7 +1119,7 @@ NSObject* CCBezierTo::copyWithZone(cocos2d::NSZone *pZone)
void CCBezierTo::startWithTarget(CCNode *pTarget)
{
__super::startWithTarget(pTarget);
CCBezierBy::startWithTarget(pTarget);
m_sConfig.controlPoint_1 = ccpSub(m_sConfig.controlPoint_1, m_startPosition);
m_sConfig.controlPoint_2 = ccpSub(m_sConfig.controlPoint_2, m_startPosition);
m_sConfig.endPosition = ccpSub(m_sConfig.endPosition, m_startPosition);
@ -1139,7 +1139,7 @@ CCScaleTo* CCScaleTo::actionWithDuration(cocos2d::ccTime duration, float s)
bool CCScaleTo::initWithDuration(cocos2d::ccTime duration, float s)
{
if (__super::initWithDuration(duration))
if (CCIntervalAction::initWithDuration(duration))
{
m_fEndScaleX = s;
m_fEndScaleY = s;
@ -1161,7 +1161,7 @@ CCScaleTo* CCScaleTo::actionWithDuration(cocos2d::ccTime duration, float sx, flo
bool CCScaleTo::initWithDuration(cocos2d::ccTime duration, float sx, float sy)
{
if (__super::initWithDuration(duration))
if (CCIntervalAction::initWithDuration(duration))
{
m_fEndScaleX = sx;
m_fEndScaleY = sy;
@ -1187,7 +1187,7 @@ NSObject* CCScaleTo::copyWithZone(cocos2d::NSZone *pZone)
pZone = pNewZone = new NSZone(pCopy);
}
__super::copyWithZone(pZone);
CCIntervalAction::copyWithZone(pZone);
pCopy->initWithDuration(m_fDuration, m_fEndScaleX, m_fEndScaleY);
@ -1198,7 +1198,7 @@ NSObject* CCScaleTo::copyWithZone(cocos2d::NSZone *pZone)
void CCScaleTo::startWithTarget(CCNode *pTarget)
{
__super::startWithTarget(pTarget);
CCIntervalAction::startWithTarget(pTarget);
m_fStartScaleX = pTarget->getScaleX();
m_fStartScaleY = pTarget->getScaleY();
m_fDeltaX = m_fEndScaleX - m_fStartScaleX;
@ -1247,7 +1247,7 @@ NSObject* CCScaleBy::copyWithZone(cocos2d::NSZone *pZone)
pZone = pNewZone = new NSZone(pCopy);
}
__super::copyWithZone(pZone);
CCScaleTo::copyWithZone(pZone);
pCopy->initWithDuration(m_fDuration, m_fEndScaleX, m_fEndScaleY);
@ -1258,7 +1258,7 @@ NSObject* CCScaleBy::copyWithZone(cocos2d::NSZone *pZone)
void CCScaleBy::startWithTarget(CCNode *pTarget)
{
__super::startWithTarget(pTarget);
CCScaleTo::startWithTarget(pTarget);
m_fDeltaX = m_fStartScaleX * m_fEndScaleX - m_fStartScaleX;
m_fDeltaY = m_fStartScaleY * m_fEndScaleY - m_fStartScaleY;
}
@ -1282,7 +1282,7 @@ CCBlink* CCBlink::actionWithDuration(cocos2d::ccTime duration, unsigned int uBli
bool CCBlink::initWithDuration(cocos2d::ccTime duration, unsigned int uBlinks)
{
if (__super::initWithDuration(duration))
if (CCIntervalAction::initWithDuration(duration))
{
m_nTimes = uBlinks;
return true;
@ -1307,7 +1307,7 @@ NSObject* CCBlink::copyWithZone(cocos2d::NSZone *pZone)
pZone = pNewZone = new NSZone(pCopy);
}
__super::copyWithZone(pZone);
CCIntervalAction::copyWithZone(pZone);
pCopy->initWithDuration(m_fDuration, (unsigned int)m_nTimes);
@ -1356,7 +1356,7 @@ NSObject* CCFadeIn::copyWithZone(cocos2d::NSZone *pZone)
pZone = pNewZone = new NSZone(pCopy);
}
__super::copyWithZone(pZone);
CCIntervalAction::copyWithZone(pZone);
CCX_SAFE_DELETE(pNewZone);
@ -1406,7 +1406,7 @@ NSObject* CCFadeOut::copyWithZone(cocos2d::NSZone *pZone)
pZone = pNewZone = new NSZone(pCopy);
}
__super::copyWithZone(pZone);
CCIntervalAction::copyWithZone(pZone);
CCX_SAFE_DELETE(pNewZone);
@ -1442,7 +1442,7 @@ CCFadeTo* CCFadeTo::actionWithDuration(cocos2d::ccTime duration, GLubyte opacity
bool CCFadeTo::initWithDuration(cocos2d::ccTime duration, GLubyte opacity)
{
if (__super::initWithDuration(duration))
if (CCIntervalAction::initWithDuration(duration))
{
m_toOpacity = opacity;
return true;
@ -1466,7 +1466,7 @@ NSObject* CCFadeTo::copyWithZone(cocos2d::NSZone *pZone)
pZone = pNewZone = new NSZone(pCopy);
}
__super::copyWithZone(pZone);
CCIntervalAction::copyWithZone(pZone);
pCopy->initWithDuration(m_fDuration, m_toOpacity);
@ -1476,7 +1476,7 @@ NSObject* CCFadeTo::copyWithZone(cocos2d::NSZone *pZone)
void CCFadeTo::startWithTarget(CCNode *pTarget)
{
__super::startWithTarget(pTarget);
CCIntervalAction::startWithTarget(pTarget);
CCRGBAProtocol *pRGBAProtocol = pTarget->convertToRGBAProtocol();
if (pRGBAProtocol)
@ -1510,7 +1510,7 @@ CCTintTo* CCTintTo::actionWithDuration(cocos2d::ccTime duration, GLubyte red, GL
bool CCTintTo::initWithDuration(cocos2d::ccTime duration, GLubyte red, GLubyte green, GLubyte blue)
{
if (__super::initWithDuration(duration))
if (CCIntervalAction::initWithDuration(duration))
{
m_to = ccc3(red, green, blue);
return true;
@ -1534,7 +1534,7 @@ NSObject* CCTintTo::copyWithZone(cocos2d::NSZone *pZone)
pZone = pNewZone = new NSZone(pCopy);
}
__super::copyWithZone(pZone);
CCIntervalAction::copyWithZone(pZone);
pCopy->initWithDuration(m_fDuration, m_to.r, m_to.g, m_to.b);
@ -1544,7 +1544,7 @@ NSObject* CCTintTo::copyWithZone(cocos2d::NSZone *pZone)
void CCTintTo::startWithTarget(CCNode *pTarget)
{
__super::startWithTarget(pTarget);
CCIntervalAction::startWithTarget(pTarget);
CCRGBAProtocol *pRGBAProtocol = m_pTarget->convertToRGBAProtocol();
if (pRGBAProtocol)
{
@ -1578,7 +1578,7 @@ CCTintBy* CCTintBy::actionWithDuration(cocos2d::ccTime duration, GLshort deltaRe
bool CCTintBy::initWithDuration(cocos2d::ccTime duration, GLshort deltaRed, GLshort deltaGreen, GLshort deltaBlue)
{
if (__super::initWithDuration(duration))
if (CCIntervalAction::initWithDuration(duration))
{
m_deltaR = deltaRed;
m_deltaG = deltaGreen;
@ -1605,7 +1605,7 @@ NSObject* CCTintBy::copyWithZone(cocos2d::NSZone *pZone)
pZone = pNewZone = new NSZone(pCopy);
}
__super::copyWithZone(pZone);
CCIntervalAction::copyWithZone(pZone);
pCopy->initWithDuration(m_fDuration, (GLubyte)m_deltaR, (GLubyte)m_deltaG, (GLubyte)m_deltaB);
@ -1615,7 +1615,7 @@ NSObject* CCTintBy::copyWithZone(cocos2d::NSZone *pZone)
void CCTintBy::startWithTarget(CCNode *pTarget)
{
__super::startWithTarget(pTarget);
CCIntervalAction::startWithTarget(pTarget);
CCRGBAProtocol *pRGBAProtocol = pTarget->convertToRGBAProtocol();
if (pRGBAProtocol)
@ -1672,7 +1672,7 @@ NSObject* CCDelayTime::copyWithZone(cocos2d::NSZone *pZone)
}
__super::copyWithZone(pZone);
CCIntervalAction::copyWithZone(pZone);
CCX_SAFE_DELETE(pNewZone);
@ -1704,7 +1704,7 @@ CCReverseTime* CCReverseTime::actionWithAction(cocos2d::CCFiniteTimeAction *pAct
bool CCReverseTime::initWithAction(cocos2d::CCFiniteTimeAction *pAction)
{
if (__super::initWithDuration(pAction->getDuration()))
if (CCIntervalAction::initWithDuration(pAction->getDuration()))
{
m_pOther = pAction;
pAction->retain();
@ -1730,7 +1730,7 @@ NSObject* CCReverseTime::copyWithZone(cocos2d::NSZone *pZone)
pZone = pNewZone = new NSZone(pCopy);
}
__super::copyWithZone(pZone);
CCIntervalAction::copyWithZone(pZone);
pCopy->initWithAction((CCFiniteTimeAction*)(m_pOther->copy()->autorelease()));
@ -1745,14 +1745,14 @@ CCReverseTime::~CCReverseTime(void)
void CCReverseTime::startWithTarget(CCNode *pTarget)
{
__super::startWithTarget(pTarget);
CCIntervalAction::startWithTarget(pTarget);
m_pOther->startWithTarget(pTarget);
}
void CCReverseTime::stop(void)
{
m_pOther->stop();
__super::stop();
CCIntervalAction::stop();
}
void CCReverseTime::update(cocos2d::ccTime time)
@ -1797,7 +1797,7 @@ bool CCAnimate::initWithAnimation(cocos2d::CCAnimation *pAnimation, bool bRestor
{
assert(pAnimation);
if (__super::initWithDuration(pAnimation->getFrames()->count() * pAnimation->getDelay()))
if (CCIntervalAction::initWithDuration(pAnimation->getFrames()->count() * pAnimation->getDelay()))
{
m_bRestoreOriginalFrame = bRestoreOriginalFrame;
m_pAnimation = pAnimation;
@ -1823,7 +1823,7 @@ bool CCAnimate::initWithDuration(cocos2d::ccTime duration, cocos2d::CCAnimation
{
assert(pAnimation != NULL);
if (__super::initWithDuration(duration))
if (CCIntervalAction::initWithDuration(duration))
{
m_bRestoreOriginalFrame = bRestoreOriginalFrame;
m_pAnimation = pAnimation;
@ -1851,7 +1851,7 @@ NSObject* CCAnimate::copyWithZone(cocos2d::NSZone *pZone)
pZone = pNewZone = new NSZone(pCopy);
}
__super::copyWithZone(pZone);
CCIntervalAction::copyWithZone(pZone);
pCopy->initWithDuration(m_fDuration, m_pAnimation, m_bRestoreOriginalFrame);
@ -1867,7 +1867,7 @@ CCAnimate::~CCAnimate(void)
void CCAnimate::startWithTarget(CCNode *pTarget)
{
__super::startWithTarget(pTarget);
CCIntervalAction::startWithTarget(pTarget);
CCSprite *pSprite = (CCSprite*)(pTarget);
CCX_SAFE_RELEASE(m_pOrigFrame);
@ -1886,7 +1886,7 @@ void CCAnimate::stop(void)
((CCSprite*)(m_pTarget))->setDisplayFrame(m_pOrigFrame);
}
__super::stop();
CCIntervalAction::stop();
}
void CCAnimate::update(cocos2d::ccTime time)

View File

@ -41,7 +41,7 @@ namespace cocos2d
bool CCProgressTo::initWithDuration(cocos2d::ccTime duration, float fPercent)
{
if (__super::initWithDuration(duration))
if (CCIntervalAction::initWithDuration(duration))
{
m_fTo = fPercent;
@ -66,7 +66,7 @@ namespace cocos2d
pZone = pNewZone = new NSZone(pCopy);
}
__super::copyWithZone(pZone);
CCIntervalAction::copyWithZone(pZone);
pCopy->initWithDuration(m_fDuration, m_fTo);
@ -76,7 +76,7 @@ namespace cocos2d
void CCProgressTo::startWithTarget(CCNode *pTarget)
{
__super::startWithTarget(pTarget);
CCIntervalAction::startWithTarget(pTarget);
m_fFrom = ((kProgressTimerCast)(pTarget))->getPercentage();
// XXX: Is this correct ?
@ -105,7 +105,7 @@ namespace cocos2d
bool CCProgressFromTo::initWithDuration(cocos2d::ccTime duration, float fFromPercentage, float fToPercentage)
{
if (__super::initWithDuration(duration))
if (CCIntervalAction::initWithDuration(duration))
{
m_fTo = fToPercentage;
m_fFrom = fFromPercentage;
@ -131,7 +131,7 @@ namespace cocos2d
pZone = pNewZone = new NSZone(pCopy);
}
__super::copyWithZone(pZone);
CCIntervalAction::copyWithZone(pZone);
pCopy->initWithDuration(m_fDuration, m_fFrom, m_fTo);
@ -146,7 +146,7 @@ namespace cocos2d
void CCProgressFromTo::startWithTarget(CCNode *pTarget)
{
__super::startWithTarget(pTarget);
CCIntervalAction::startWithTarget(pTarget);
}
void CCProgressFromTo::update(cocos2d::ccTime time)

View File

@ -59,7 +59,7 @@ namespace cocos2d
bool CCShakyTiles3D::initWithRange(int nRange, bool bShakeZ, cocos2d::ccGridSize gridSize, cocos2d::ccTime duration)
{
if (__super::initWithSize(gridSize, duration))
if (CCTiledGrid3DAction::initWithSize(gridSize, duration))
{
m_nRandrange = nRange;
m_bShakeZ = bShakeZ;
@ -85,8 +85,7 @@ namespace cocos2d
pZone = pNewZone = new NSZone(pCopy);
}
__super::copyWithZone(pZone);
CCTiledGrid3DAction::copyWithZone(pZone);
pCopy->initWithRange(m_nRandrange, m_bShakeZ, m_sGridSize, m_fDuration);
@ -152,7 +151,7 @@ namespace cocos2d
bool CCShatteredTiles3D::initWithRange(int nRange, bool bShatterZ, cocos2d::ccGridSize gridSize, cocos2d::ccTime duration)
{
if (__super::initWithSize(gridSize, duration))
if (CCTiledGrid3DAction::initWithSize(gridSize, duration))
{
m_bOnce = false;
m_nRandrange = nRange;
@ -179,7 +178,7 @@ namespace cocos2d
}
//copy super class's member
__super::copyWithZone(pZone);
CCTiledGrid3DAction::copyWithZone(pZone);
pCopy->initWithRange(m_nRandrange, m_bShatterZ, m_sGridSize, m_fDuration);
@ -250,7 +249,7 @@ namespace cocos2d
bool CCShuffleTiles::initWithSeed(int s, cocos2d::ccGridSize gridSize, cocos2d::ccTime duration)
{
if (__super::initWithSize(gridSize, duration))
if (CCTiledGrid3DAction::initWithSize(gridSize, duration))
{
m_nSeed = s;
m_pTilesOrder = NULL;
@ -276,7 +275,7 @@ namespace cocos2d
pZone = pNewZone = new NSZone(pCopy);
}
__super::copyWithZone(pZone);
CCTiledGrid3DAction::copyWithZone(pZone);
pCopy->initWithSeed(m_nSeed, m_sGridSize, m_fDuration);
@ -343,7 +342,7 @@ namespace cocos2d
void CCShuffleTiles::startWithTarget(CCNode *pTarget)
{
__super::startWithTarget(pTarget);
CCTiledGrid3DAction::startWithTarget(pTarget);
if (m_nSeed != -1)
{
@ -625,7 +624,7 @@ namespace cocos2d
bool CCTurnOffTiles::initWithSeed(int s, cocos2d::ccGridSize gridSize, cocos2d::ccTime duration)
{
if (__super::initWithSize(gridSize, duration))
if (CCTiledGrid3DAction::initWithSize(gridSize, duration))
{
m_nSeed = s;
m_pTilesOrder = NULL;
@ -650,7 +649,7 @@ namespace cocos2d
pZone = pNewZone = new NSZone(pCopy);
}
__super::copyWithZone(pZone);
CCTiledGrid3DAction::copyWithZone(pZone);
pCopy->initWithSeed(m_nSeed, m_sGridSize, m_fDuration);
@ -695,7 +694,7 @@ namespace cocos2d
{
int i;
__super::startWithTarget(pTarget);
CCTiledGrid3DAction::startWithTarget(pTarget);
if (m_nSeed != -1)
{
@ -758,7 +757,7 @@ namespace cocos2d
bool CCWavesTiles3D::initWithWaves(int wav, float amp, cocos2d::ccGridSize gridSize, cocos2d::ccTime duration)
{
if (__super::initWithSize(gridSize, duration))
if (CCTiledGrid3DAction::initWithSize(gridSize, duration))
{
m_nWaves = wav;
m_fAmplitude = amp;
@ -784,7 +783,7 @@ namespace cocos2d
pZone = pNewZone = new NSZone(pCopy);
}
__super::copyWithZone(pZone);
CCTiledGrid3DAction::copyWithZone(pZone);
pCopy->initWithWaves(m_nWaves, m_fAmplitude, m_sGridSize, m_fDuration);
@ -836,7 +835,7 @@ namespace cocos2d
bool CCJumpTiles3D::initWithJumps(int j, float amp, cocos2d::ccGridSize gridSize, cocos2d::ccTime duration)
{
if (__super::initWithSize(gridSize, duration))
if (CCTiledGrid3DAction::initWithSize(gridSize, duration))
{
m_nJumps = j;
m_fAmplitude = amp;
@ -862,7 +861,7 @@ namespace cocos2d
pZone = pNewZone = new NSZone(pCopy);
}
__super::copyWithZone(pZone);
CCTiledGrid3DAction::copyWithZone(pZone);
pCopy->initWithJumps(m_nJumps, m_fAmplitude, m_sGridSize, m_fDuration);
CCX_SAFE_DELETE(pNewZone);
@ -927,7 +926,7 @@ namespace cocos2d
{
m_nRows = nRows;
return __super::initWithSize(ccg(1, nRows), duration);
return CCTiledGrid3DAction::initWithSize(ccg(1, nRows), duration);
}
NSObject* CCSplitRows::copyWithZone(cocos2d::NSZone *pZone)
@ -944,7 +943,7 @@ namespace cocos2d
pZone = pNewZone = new NSZone(pCopy);
}
__super::copyWithZone(pZone);
CCTiledGrid3DAction::copyWithZone(pZone);
pCopy->initWithRows(m_nRows, m_fDuration);
@ -954,7 +953,7 @@ namespace cocos2d
void CCSplitRows::startWithTarget(CCNode *pTarget)
{
__super::startWithTarget(pTarget);
CCTiledGrid3DAction::startWithTarget(pTarget);
m_winSize = CCDirector::getSharedDirector()->getWinSize();
}
@ -1005,7 +1004,7 @@ namespace cocos2d
bool CCSplitCols::initWithCols(int nCols, cocos2d::ccTime duration)
{
m_nCols = nCols;
return __super::initWithSize(ccg(nCols, 1), duration);
return CCTiledGrid3DAction::initWithSize(ccg(nCols, 1), duration);
}
NSObject* CCSplitCols::copyWithZone(cocos2d::NSZone *pZone)
@ -1022,7 +1021,7 @@ namespace cocos2d
pZone = pNewZone = new NSZone(pCopy);
}
__super::copyWithZone(pZone);
CCTiledGrid3DAction::copyWithZone(pZone);
pCopy->initWithCols(m_nCols, m_fDuration);
CCX_SAFE_DELETE(pNewZone);
@ -1031,7 +1030,7 @@ namespace cocos2d
void CCSplitCols::startWithTarget(CCNode *pTarget)
{
__super::startWithTarget(pTarget);
CCTiledGrid3DAction::startWithTarget(pTarget);
m_winSize = CCDirector::getSharedDirector()->getWinSize();
}

View File

@ -363,7 +363,7 @@ namespace cocos2d{
m_pConfiguration->retain();
NSAssert( m_pConfiguration, "Error creating config for BitmapFontAtlas");
if (__super::initWithFile(m_pConfiguration->m_sAtlasName.c_str(), strlen(theString)))
if (CCSpriteSheet::initWithFile(m_pConfiguration->m_sAtlasName.c_str(), strlen(theString)))
{
m_cOpacity = 255;
m_tColor = ccWHITE;
@ -543,7 +543,7 @@ namespace cocos2d{
{
if( ! CGPoint::CGPointEqualToPoint(point, m_tAnchorPoint) )
{
__super::setAnchorPoint(point);
CCSpriteSheet::setAnchorPoint(point);
this->createFontChars();
}
}
@ -552,7 +552,7 @@ namespace cocos2d{
#if CC_BITMAPFONTATLAS_DEBUG_DRAW
void CCBitmapFontAtlas::draw()
{
__super::draw();
CCSpriteSheet::draw();
CGSize s = this->getContentSize();
CGPoint vertices[4]={
ccp(0,0),ccp(s.width,0),

View File

@ -52,7 +52,7 @@ namespace cocos2d{
CCLabel * CCLabel::initWithString(const char *label, CGSize dimensions, UITextAlignment alignment, const char *fontName, float fontSize)
{
if (__super::init())
if (CCSprite::init())
{
m_tDimensions = dimensions;
m_eAlignment = alignment;
@ -65,7 +65,7 @@ namespace cocos2d{
}
CCLabel * CCLabel::initWithString(const char *label, const char *fontName, float fontSize)
{
if (__super::init())
if (CCSprite::init())
{
m_tDimensions = CGSizeZero;
m_sFontName = fontName;
@ -102,5 +102,3 @@ namespace cocos2d{
return ret;
}
}// namespace cocos2d

View File

@ -39,7 +39,7 @@ namespace cocos2d{
}
CCLabelAtlas * CCLabelAtlas::initWithString(const char *label, const char *charMapFile, int itemWidth, int itemHeight, char startCharMap)
{
if (__super::initWithTileFile(charMapFile, itemWidth, itemHeight, strlen(label)))
if (CCAtlasNode::initWithTileFile(charMapFile, itemWidth, itemHeight, strlen(label)))
{
m_cMapStartChar = startCharMap;
this->setString(label);

View File

@ -147,7 +147,7 @@ void CCLayer::onEnter()
}
// then iterate over all the children
__super::onEnter();
CCNode::onEnter();
/** @todo UIAccelerometer
if( isAccelerometerEnabled )
[[UIAccelerometer sharedAccelerometer] setDelegate:self];*/
@ -164,7 +164,7 @@ void CCLayer::onExit()
if( isAccelerometerEnabled )
[[UIAccelerometer sharedAccelerometer] setDelegate:nil];
*/
__super::onExit();
CCNode::onExit();
}
bool CCLayer::ccTouchBegan(CCTouch *pTouch, UIEvent *pEvent)
@ -270,7 +270,7 @@ void CCColorLayer::setContentSize(CGSize size)
m_pSquareVertices[6] = size.width;
m_pSquareVertices[7] = size.height;
__super::setContentSize(size);
CCLayer::setContentSize(size);
}
void CCColorLayer::changeWidthAndHeight(GLfloat w ,GLfloat h)

View File

@ -53,7 +53,7 @@ CCPageTurnTransition * CCPageTurnTransition::initWithDuration(ccTime t, CCScene
// XXX: needed before [super init]
m_bBack = backwards;
if( __super::initWithDuration(t, scene) )
if( CCTransitionScene::initWithDuration(t, scene) )
{
// do something
}
@ -67,7 +67,7 @@ void CCPageTurnTransition::sceneOrder()
void CCPageTurnTransition::onEnter()
{
__super::onEnter();
CCTransitionScene::onEnter();
CGSize s = CCDirector::getSharedDirector()->getWinSize();
int x,y;
if( s.width > s.height)

View File

@ -61,7 +61,7 @@ CCProgressTimerType CCRadialCCWTransition::radialType()
void CCRadialCCWTransition::onEnter()
{
__super::onEnter();
CCTransitionScene::onEnter();
// create a transparent color layer
// in which we are going to add our rendertextures
CGSize size = CCDirector::getSharedDirector()->getWinSize();
@ -111,7 +111,7 @@ void CCRadialCCWTransition::onExit()
{
// remove our layer and release all containing objects
this->removeChildByTag(kSceneRadial, false);
__super::onExit();
CCTransitionScene::onExit();
}
CCRadialCCWTransition* CCRadialCCWTransition::transitionWithDuration(ccTime t, CCScene* scene)
@ -138,4 +138,3 @@ CCRadialCWTransition* CCRadialCWTransition::transitionWithDuration(ccTime t, CCS
}
}//namespace cocos2d

View File

@ -73,7 +73,7 @@ CCTransitionScene * CCTransitionScene::initWithDuration(ccTime t, CCScene *scene
{
NSAssert( scene != NULL, "Argument scene must be non-nil");
if (__super::init())
if (CCScene::init())
{
m_fDuration = t;
@ -160,7 +160,7 @@ void CCTransitionScene::hideOutShowIn()
// custom onEnter
void CCTransitionScene::onEnter()
{
__super::onEnter();
CCScene::onEnter();
m_pInScene->onEnter();
// outScene should not receive the onEnter callback
}
@ -168,7 +168,7 @@ void CCTransitionScene::onEnter()
// custom onExit
void CCTransitionScene::onExit()
{
__super::onExit();
CCScene::onExit();
m_pOutScene->onExit();
// inScene should not receive the onExit callback
@ -179,7 +179,7 @@ void CCTransitionScene::onExit()
// custom cleanup
void CCTransitionScene::cleanup()
{
__super::cleanup();
CCScene::cleanup();
if( m_bIsSendCleanupToScene )
m_pOutScene->cleanup();
@ -205,7 +205,7 @@ CCOrientedTransitionScene * CCOrientedTransitionScene::transitionWithDuration(cc
CCOrientedTransitionScene * CCOrientedTransitionScene::initWithDuration(ccTime t, CCScene *scene, tOrientation orientation)
{
if ( __super::initWithDuration(t, scene) )
if ( CCTransitionScene::initWithDuration(t, scene) )
{
m_eOrientation = orientation;
}
@ -224,7 +224,7 @@ CCRotoZoomTransition::~CCRotoZoomTransition()
void CCRotoZoomTransition:: onEnter()
{
__super::onEnter();
CCTransitionScene::onEnter();
m_pInScene->setScale(0.001f);
m_pOutScene->setScale(1.0f);
@ -271,7 +271,7 @@ CCJumpZoomTransition::~CCJumpZoomTransition()
void CCJumpZoomTransition::onEnter()
{
__super::onEnter();
CCTransitionScene::onEnter();
CGSize s = CCDirector::getSharedDirector()->getWinSize();
m_pInScene->setScale(0.5f);
@ -315,7 +315,7 @@ CCMoveInLTransition::~CCMoveInLTransition()
void CCMoveInLTransition::onEnter()
{
__super::onEnter();
CCTransitionScene::onEnter();
this->initScenes();
CCIntervalAction *a = this->action();
@ -423,7 +423,7 @@ CCSlideInLTransition::~CCSlideInLTransition()
void CCSlideInLTransition::onEnter()
{
__super::onEnter();
CCTransitionScene::onEnter();
this->initScenes();
CCIntervalAction *in = this->action();
@ -569,7 +569,7 @@ CCShrinkGrowTransition::~CCShrinkGrowTransition()
void CCShrinkGrowTransition::onEnter()
{
__super::onEnter();
CCTransitionScene::onEnter();
m_pInScene->setScale(0.001f);
m_pOutScene->setScale(1.0f);
@ -611,7 +611,7 @@ CCFlipXTransition::~CCFlipXTransition()
void CCFlipXTransition::onEnter()
{
__super::onEnter();
CCOrientedTransitionScene::onEnter();
CCIntervalAction *inA, *outA;
m_pInScene->setIsVisible(false);
@ -676,7 +676,7 @@ CCFlipYTransition::~CCFlipYTransition()
void CCFlipYTransition::onEnter()
{
__super::onEnter();
CCOrientedTransitionScene::onEnter();
CCIntervalAction *inA, *outA;
m_pInScene->setIsVisible(false);
@ -741,7 +741,7 @@ CCFlipAngularTransition::~CCFlipAngularTransition()
void CCFlipAngularTransition::onEnter()
{
__super::onEnter();
CCOrientedTransitionScene::onEnter();
CCIntervalAction *inA, *outA;
m_pInScene->setIsVisible(false);
@ -805,7 +805,7 @@ CCZoomFlipXTransition::~CCZoomFlipXTransition()
void CCZoomFlipXTransition::onEnter()
{
__super::onEnter();
CCOrientedTransitionScene::onEnter();
CCIntervalAction *inA, *outA;
m_pInScene->setIsVisible(false);
@ -878,7 +878,7 @@ CCZoomFlipYTransition::~CCZoomFlipYTransition()
void CCZoomFlipYTransition::onEnter()
{
__super::onEnter();
CCOrientedTransitionScene::onEnter();
CCIntervalAction *inA, *outA;
m_pInScene->setIsVisible(false);
@ -952,7 +952,7 @@ CCZoomFlipAngularTransition::~CCZoomFlipAngularTransition()
void CCZoomFlipAngularTransition::onEnter()
{
__super::onEnter();
CCOrientedTransitionScene::onEnter();
CCIntervalAction *inA, *outA;
m_pInScene->setIsVisible(false);
@ -1036,7 +1036,7 @@ CCFadeTransition * CCFadeTransition::transitionWithDuration(ccTime duration, CCS
CCFadeTransition * CCFadeTransition::initWithDuration(ccTime duration, CCScene *scene, ccColor3B color)
{
if (__super::initWithDuration(duration, scene))
if (CCTransitionScene::initWithDuration(duration, scene))
{
m_tColor.r = color.r;
m_tColor.g = color.g;
@ -1053,7 +1053,7 @@ CCFadeTransition * CCFadeTransition::initWithDuration(ccTime t, CCScene *scene)
void CCFadeTransition :: onEnter()
{
__super::onEnter();
CCTransitionScene::onEnter();
CCColorLayer* l = CCColorLayer::layerWithColor(m_tColor);
m_pInScene->setIsVisible(false);
@ -1074,7 +1074,7 @@ void CCFadeTransition :: onEnter()
void CCFadeTransition::onExit()
{
__super::onExit();
CCTransitionScene::onExit();
this->removeChildByTag(kSceneFade, false);
}
@ -1096,7 +1096,7 @@ void CCCrossFadeTransition:: draw()
void CCCrossFadeTransition::onEnter()
{
__super::onEnter();
CCTransitionScene::onEnter();
// create a transparent color layer
// in which we are going to add our rendertextures
@ -1165,7 +1165,7 @@ void CCCrossFadeTransition::onExit()
{
// remove our layer and release all containing objects
this->removeChildByTag(kSceneFade, false);
__super::onExit();
CCTransitionScene::onExit();
}
CCCrossFadeTransition* CCCrossFadeTransition::transitionWithDuration(ccTime d, CCScene* s)
@ -1196,7 +1196,7 @@ void CCTurnOffTilesTransition::sceneOrder()
void CCTurnOffTilesTransition::onEnter()
{
__super::onEnter();
CCTransitionScene::onEnter();
CGSize s = CCDirector::getSharedDirector()->getWinSize();
float aspect = s.width / s.height;
int x = (int)(12 * aspect);
@ -1237,7 +1237,7 @@ CCSplitColsTransition::~CCSplitColsTransition()
void CCSplitColsTransition::onEnter()
{
__super::onEnter();
CCTransitionScene::onEnter();
m_pInScene->setIsVisible(false);
CCIntervalAction* split = action();
@ -1312,7 +1312,7 @@ void CCFadeTRTransition::sceneOrder()
void CCFadeTRTransition::onEnter()
{
__super::onEnter();
CCTransitionScene::onEnter();
CGSize s = CCDirector::getSharedDirector()->getWinSize();
float aspect = s.width / s.height;

View File

@ -60,7 +60,7 @@ namespace cocos2d{
CCMenu * CCMenu::initWithItems(CCMenuItem* item, va_list args)
{
if (__super::init())
if (CCLayer::init())
{
this->m_bIsTouchEnabled = true;
@ -113,14 +113,14 @@ namespace cocos2d{
*/
CCNode * CCMenu::addChild(CCNode * child, int zOrder)
{
return __super::addChild(child, zOrder);
return CCLayer::addChild(child, zOrder);
}
CCNode * CCMenu::addChild(CCNode * child, int zOrder, int tag)
{
// we can not use RTTI, so we do not known the type of object
/*NSAssert( dynamic_cast<CCMenuItem*>(child) != NULL, L"Menu only supports MenuItem objects as children");*/
return __super::addChild(child, zOrder, tag);
return CCLayer::addChild(child, zOrder, tag);
}
//Menu - Events

View File

@ -127,7 +127,7 @@ namespace cocos2d{
}
CCMenuItemLabel * CCMenuItemLabel::initWithLabel(CCNode* label, SelectorProtocol* target, SEL_MunuHandler selector)
{
__super::initWithTarget(target, selector);
CCMenuItem::initWithTarget(target, selector);
m_fOriginalScale = 1.0f;
m_tColorBackup = ccWHITE;
m_tDisabledColor = ccc3(126,126,126);
@ -151,7 +151,7 @@ namespace cocos2d{
{
this->stopAllActions();
this->setScale( m_fOriginalScale );
__super::activate();
CCMenuItem::activate();
}
}
void CCMenuItemLabel::selected()
@ -159,7 +159,7 @@ namespace cocos2d{
// subclass to change the default action
if(m_bIsEnabled)
{
__super::selected();
CCMenuItem::selected();
this->stopActionByTag(kZoomActionTag);
m_fOriginalScale = this->getScale();
CCAction *zoomAction = CCScaleTo::actionWithDuration(0.1f, m_fOriginalScale * 1.2f);
@ -172,7 +172,7 @@ namespace cocos2d{
// subclass to change the default action
if(m_bIsEnabled)
{
__super::unselected();
CCMenuItem::unselected();
this->stopActionByTag(kZoomActionTag);
CCAction *zoomAction = CCScaleTo::actionWithDuration(0.1f, m_fOriginalScale);
zoomAction->setTag(kZoomActionTag);
@ -193,7 +193,7 @@ namespace cocos2d{
m_pLabel->convertToRGBAProtocol()->setColor(m_tColorBackup);
}
}
__super::setIsEnabled(enabled);
CCMenuItem::setIsEnabled(enabled);
}
void CCMenuItemLabel::draw()
{
@ -237,7 +237,7 @@ namespace cocos2d{
CCLabelAtlas *label = new CCLabelAtlas();
label->initWithString(value, charMapFile, itemWidth, itemHeight, startCharMap);
label->autorelease();
if (__super::initWithLabel(label, target, selector))
if (CCMenuItemLabel::initWithLabel(label, target, selector))
{
// do something ?
}
@ -285,7 +285,7 @@ namespace cocos2d{
{
NSAssert( strlen(value) != 0, "Value lenght must be greater than 0");
CCLabel *label = CCLabel::labelWithString(value, _fontName.c_str(), (float)_fontSize);
if (__super::initWithLabel(label, target, selector))
if (CCMenuItemLabel::initWithLabel(label, target, selector))
{
// do something ?
}
@ -335,7 +335,7 @@ namespace cocos2d{
}
CCMenuItemSprite * CCMenuItemSprite::initFromNormalSprite(CCNode* normalSprite, CCNode* selectedSprite, CCNode* disabledSprite, SelectorProtocol* target, SEL_MunuHandler selector)
{
__super::initWithTarget(target, selector);
CCMenuItem::initWithTarget(target, selector);
this->m_pNormalImage = normalSprite;
this->m_pSelectedImage = selectedSprite;
this->m_pDisabledImage = disabledSprite;
@ -460,7 +460,7 @@ namespace cocos2d{
}
CCMenuItemToggle * CCMenuItemToggle::initWithTarget(SelectorProtocol* target, SEL_MunuHandler selector, CCMenuItem* item, va_list args)
{
__super::initWithTarget(target, selector);
CCMenuItem::initWithTarget(target, selector);
this->m_pSubItems = new NSMutableArray<CCMenuItem*>();
int z = 0;
CCMenuItem *i = item;
@ -497,12 +497,12 @@ namespace cocos2d{
}
void CCMenuItemToggle::selected()
{
__super::selected();
CCMenuItem::selected();
m_pSubItems->getObjectAtIndex(m_uSelectedIndex)->selected();
}
void CCMenuItemToggle::unselected()
{
__super::unselected();
CCMenuItem::unselected();
m_pSubItems->getObjectAtIndex(m_uSelectedIndex)->unselected();
}
void CCMenuItemToggle::activate()
@ -513,11 +513,11 @@ namespace cocos2d{
unsigned int newIndex = (m_uSelectedIndex + 1) % m_pSubItems->count();
this->setSelectedIndex(newIndex);
}
__super::activate();
CCMenuItem::activate();
}
void CCMenuItemToggle::setIsEnabled(bool enabled)
{
__super::setIsEnabled(enabled);
CCMenuItem::setIsEnabled(enabled);
if(m_pSubItems && m_pSubItems->count() > 0)
{

View File

@ -31,7 +31,7 @@ namespace cocos2d {
//
bool CCParticleFire::initWithTotalParticles(int numberOfParticles)
{
if( __super::initWithTotalParticles(numberOfParticles) )
if( CCQuadParticleSystem::initWithTotalParticles(numberOfParticles) )
{
// duration
m_fDuration = kCCParticleDurationInfinity;
@ -103,7 +103,7 @@ namespace cocos2d {
//
bool CCParticleFireworks::initWithTotalParticles(int numberOfParticles)
{
if( __super::initWithTotalParticles(numberOfParticles) )
if( CCQuadParticleSystem::initWithTotalParticles(numberOfParticles) )
{
// duration
m_fDuration= kCCParticleDurationInfinity;
@ -173,7 +173,7 @@ namespace cocos2d {
//
bool CCParticleSun::initWithTotalParticles(int numberOfParticles)
{
if( __super::initWithTotalParticles(numberOfParticles) )
if( CCQuadParticleSystem::initWithTotalParticles(numberOfParticles) )
{
// additive
this->setIsBlendAdditive(true);
@ -246,7 +246,7 @@ namespace cocos2d {
//
bool CCParticleGalaxy::initWithTotalParticles(int numberOfParticles)
{
if( __super::initWithTotalParticles(numberOfParticles) )
if( CCQuadParticleSystem::initWithTotalParticles(numberOfParticles) )
{
// duration
m_fDuration = kCCParticleDurationInfinity;
@ -322,7 +322,7 @@ namespace cocos2d {
//
bool CCParticleFlower::initWithTotalParticles(int numberOfParticles)
{
if( __super::initWithTotalParticles(numberOfParticles) )
if( CCQuadParticleSystem::initWithTotalParticles(numberOfParticles) )
{
// duration
m_fDuration = kCCParticleDurationInfinity;
@ -397,7 +397,7 @@ namespace cocos2d {
//
bool CCParticleMeteor::initWithTotalParticles(int numberOfParticles)
{
if( __super::initWithTotalParticles(numberOfParticles) )
if( CCQuadParticleSystem::initWithTotalParticles(numberOfParticles) )
{
// duration
m_fDuration = kCCParticleDurationInfinity;
@ -473,7 +473,7 @@ namespace cocos2d {
//
bool CCParticleSpiral::initWithTotalParticles(int numberOfParticles)
{
if( __super::initWithTotalParticles(numberOfParticles) )
if( CCQuadParticleSystem::initWithTotalParticles(numberOfParticles) )
{
// duration
m_fDuration = kCCParticleDurationInfinity;
@ -549,7 +549,7 @@ namespace cocos2d {
//
bool CCParticleExplosion::initWithTotalParticles(int numberOfParticles)
{
if( __super::initWithTotalParticles(numberOfParticles) )
if( CCQuadParticleSystem::initWithTotalParticles(numberOfParticles) )
{
// duration
m_fDuration = 0.1f;
@ -624,7 +624,7 @@ namespace cocos2d {
//
bool CCParticleSmoke::initWithTotalParticles(int numberOfParticles)
{
if( __super::initWithTotalParticles(numberOfParticles) )
if( CCQuadParticleSystem::initWithTotalParticles(numberOfParticles) )
{
// duration
m_fDuration = kCCParticleDurationInfinity;
@ -695,7 +695,7 @@ namespace cocos2d {
//
bool CCParticleSnow::initWithTotalParticles(int numberOfParticles)
{
if( __super::initWithTotalParticles(numberOfParticles) )
if( CCQuadParticleSystem::initWithTotalParticles(numberOfParticles) )
{
// duration
m_fDuration = kCCParticleDurationInfinity;
@ -770,7 +770,7 @@ namespace cocos2d {
//
bool CCParticleRain::initWithTotalParticles(int numberOfParticles)
{
if( __super::initWithTotalParticles(numberOfParticles) )
if( CCQuadParticleSystem::initWithTotalParticles(numberOfParticles) )
{
// duration
m_fDuration = kCCParticleDurationInfinity;

View File

@ -28,7 +28,7 @@ namespace cocos2d {
//implementation CCPointParticleSystem
bool CCPointParticleSystem::initWithTotalParticles(int numberOfParticles)
{
if( __super::initWithTotalParticles(numberOfParticles) )
if( CCParticleSystem::initWithTotalParticles(numberOfParticles) )
{
m_pVertices = new ccPointSprite[m_nTotalParticles];
@ -139,22 +139,22 @@ namespace cocos2d {
void CCPointParticleSystem::setStartSpin(float var)
{
NSAssert(var == 0, "PointParticleSystem doesn't support spinning");
__super::setStartSpin(var);
CCParticleSystem::setStartSpin(var);
}
void CCPointParticleSystem::setStartSpinVar(float var)
{
NSAssert(var == 0, "PointParticleSystem doesn't support spinning");
__super::setStartSpinVar(var);
CCParticleSystem::setStartSpinVar(var);
}
void CCPointParticleSystem::setEndSpin(float var)
{
NSAssert(var == 0, "PointParticleSystem doesn't support spinning");
__super::setEndSpin(var);
CCParticleSystem::setEndSpin(var);
}
void CCPointParticleSystem::setEndSpinVar(float var)
{
NSAssert(var == 0, "PointParticleSystem doesn't support spinning");
__super::setEndSpinVar(var);
CCParticleSystem::setEndSpinVar(var);
}
//
// SIZE > 64 IS NOT SUPPORTED
@ -162,13 +162,13 @@ namespace cocos2d {
void CCPointParticleSystem::setStartSize(float size)
{
NSAssert(size >= 0 && size <= CC_MAX_PARTICLE_SIZE, "PointParticleSystem only supports 0 <= size <= 64");
__super::setStartSize(size);
CCParticleSystem::setStartSize(size);
}
void CCPointParticleSystem::setEndSize(float size)
{
NSAssert( (size == kCCParticleStartSizeEqualToEndSize) ||
( size >= 0 && size <= CC_MAX_PARTICLE_SIZE), "PointParticleSystem only supports 0 <= size <= 64");
__super::setEndSize(size);
CCParticleSystem::setEndSize(size);
}
}// namespace cocos2d

View File

@ -31,7 +31,7 @@ namespace cocos2d {
bool CCQuadParticleSystem::initWithTotalParticles(int numberOfParticles)
{
// base initialization
if( __super::initWithTotalParticles(numberOfParticles) )
if( CCParticleSystem::initWithTotalParticles(numberOfParticles) )
{
// allocating data space
m_pQuads = new ccV2F_C4F_T2F_Quad[m_nTotalParticles];
@ -110,7 +110,7 @@ namespace cocos2d {
// Only update the texture if is different from the current one
if( !m_pTexture || texture->getName() != m_pTexture->getName() )
{
__super::setTexture(texture);
CCParticleSystem::setTexture(texture);
}
// convert to Tex coords

View File

@ -589,18 +589,18 @@ void CCSprite::draw(void)
CCNode* CCSprite::addChild(CCNode* pChild)
{
return __super::addChild(pChild);
return CCNode::addChild(pChild);
}
CCNode* CCSprite::addChild(CCNode *pChild, int zOrder)
{
return __super::addChild(pChild, zOrder);
return CCNode::addChild(pChild, zOrder);
}
CCNode* CCSprite::addChild(CCNode *pChild, int zOrder, int tag)
{
assert(pChild != NULL);
CCNode* pRet = __super::addChild(pChild, zOrder, tag);
CCNode* pRet = CCNode::addChild(pChild, zOrder, tag);
if (m_bUsesSpriteSheet)
{
@ -633,7 +633,7 @@ void CCSprite::reorderChild(CCNode *pChild, int zOrder)
}
else
{
__super::reorderChild(pChild, zOrder);
CCNode::reorderChild(pChild, zOrder);
}
}
@ -644,7 +644,7 @@ void CCSprite::removeChild(CCNode *pChild, bool bCleanup)
m_pobSpriteSheet->removeSpriteFromAtlas((CCSprite*)(pChild));
}
__super::removeChild(pChild, bCleanup);
CCNode::removeChild(pChild, bCleanup);
}
@ -661,7 +661,7 @@ void CCSprite::removeAllChildrenWithCleanup(bool bCleanup)
}
}
__super::removeAllChildrenWithCleanup(bCleanup);
CCNode::removeAllChildrenWithCleanup(bCleanup);
m_bHasChildren = false;
}
@ -698,57 +698,57 @@ void CCSprite::setDirtyRecursively(bool bValue)
void CCSprite::setPosition(CGPoint pos)
{
__super::setPosition(pos);
CCNode::setPosition(pos);
SET_DIRTY_RECURSIVELY();
}
void CCSprite::setRotation(float fRotation)
{
__super::setRotation(fRotation);
CCNode::setRotation(fRotation);
SET_DIRTY_RECURSIVELY();
}
void CCSprite::setScaleX(float fScaleX)
{
__super::setScaleX(fScaleX);
CCNode::setScaleX(fScaleX);
SET_DIRTY_RECURSIVELY();
}
void CCSprite::setScaleY(float fScaleY)
{
__super::setScaleY(fScaleY);
CCNode::setScaleY(fScaleY);
SET_DIRTY_RECURSIVELY();
}
void CCSprite::setScale(float fScale)
{
__super::setScale(fScale);
CCNode::setScale(fScale);
SET_DIRTY_RECURSIVELY();
}
void CCSprite::setVertexZ(float fVertexZ)
{
__super::setVertexZ(fVertexZ);
CCNode::setVertexZ(fVertexZ);
SET_DIRTY_RECURSIVELY();
}
void CCSprite::setAnchorPoint(CGPoint anchor)
{
__super::setAnchorPoint(anchor);
CCNode::setAnchorPoint(anchor);
SET_DIRTY_RECURSIVELY();
}
void CCSprite::setIsRelativeAnchorPoint(bool bRelative)
{
assert(! m_bUsesSpriteSheet);
__super::setIsRelativeAnchorPoint(bRelative);
CCNode::setIsRelativeAnchorPoint(bRelative);
}
void CCSprite::setIsVisible(bool bVisible)
{
if (bVisible != m_bIsVisible)
{
__super::setIsVisible(bVisible);
CCNode::setIsVisible(bVisible);
if (m_bUsesSpriteSheet && m_bRecursiveDirty)
{
m_bDirty = m_bRecursiveDirty = true;

View File

@ -154,12 +154,12 @@ CCSprite* CCSpriteSheet::createSpriteWithRect(CGRect rect)
// override add child
CCNode* CCSpriteSheet::addChild(CCNode *child)
{
return __super::addChild(child);
return CCNode::addChild(child);
}
CCNode* CCSpriteSheet::addChild(CCNode *child, int zOrder)
{
return __super::addChild(child, zOrder);
return CCNode::addChild(child, zOrder);
}
CCNode* CCSpriteSheet::addChild(CCNode *child, int zOrder, int tag)
@ -170,7 +170,7 @@ CCNode* CCSpriteSheet::addChild(CCNode *child, int zOrder, int tag)
// check CCSprite is using the same texture id
assert(pSprite->getTexture()->getName() == m_pobTextureAtlas->getTexture()->getName());
CCNode *pRet = __super::addChild(child, zOrder, tag);
CCNode *pRet = CCNode::addChild(child, zOrder, tag);
unsigned int uIndex = atlasIndexForChild(pSprite, zOrder);
insertChild(pSprite, uIndex);
@ -212,7 +212,7 @@ void CCSpriteSheet::removeChild(CCNode *child, bool cleanup)
// cleanup before removing
removeSpriteFromAtlas(pSprite);
__super::removeChild(pSprite, cleanup);
CCNode::removeChild(pSprite, cleanup);
}
void CCSpriteSheet::removeChildAtIndex(unsigned int uIndex, bool bDoCleanup)
@ -240,7 +240,7 @@ void CCSpriteSheet::removeAllChildrenWithCleanup(bool bCleanup)
}
}
__super::removeAllChildrenWithCleanup(bCleanup);
CCNode::removeAllChildrenWithCleanup(bCleanup);
m_pobDescendants->removeAllObjects();
m_pobTextureAtlas->removeAllQuads();
@ -649,7 +649,7 @@ CCSpriteSheet * CCSpriteSheet::addSpriteWithoutQuad(CCSprite*child, unsigned int
m_pobDescendants->insertObjectAtIndex(child, i);
// IMPORTANT: Call super, and not self. Avoid adding it to the texture atlas array
__super::addChild(child, z, aTag);
CCNode::addChild(child, z, aTag);
return this;
}
}//namespace cocos2d

View File

@ -84,7 +84,7 @@ namespace cocos2d {
float y = pos.y * ratio.y + offset.y;
child->setPosition(ccp(x,y));
return (CCParallaxNode*)__super::addChild(child, z, child->getTag());
return (CCParallaxNode*)CCNode::addChild(child, z, child->getTag());
}
void CCParallaxNode::removeChild(CCNode* child, bool cleanup)
{
@ -97,12 +97,12 @@ namespace cocos2d {
break;
}
}
__super::removeChild(child, cleanup);
CCNode::removeChild(child, cleanup);
}
void CCParallaxNode::removeAllChildrenWithCleanup(bool cleanup)
{
ccArrayRemoveAllObjects(m_pParallaxArray);
__super::removeAllChildrenWithCleanup(cleanup);
CCNode::removeAllChildrenWithCleanup(cleanup);
}
CGPoint CCParallaxNode::absolutePosition()
{
@ -137,9 +137,7 @@ namespace cocos2d {
}
m_tLastPosition = pos;
}
__super::visit();
CCNode::visit();
}
}// namespace cocos2d

View File

@ -55,7 +55,7 @@ namespace cocos2d {
texture = CCTextureCache::sharedTextureCache()->addImage(tilesetInfo->m_sSourceImage.c_str());
}
if (__super::initWithTexture(texture, (unsigned int)capacity))
if (CCSpriteSheet::initWithTexture(texture, (unsigned int)capacity))
{
// layerInfo
m_sLayerName = layerInfo->m_sName;
@ -460,7 +460,7 @@ namespace cocos2d {
unsigned int zz = (unsigned int) m_pAtlasIndexArray->arr[atlasIndex];
m_pTiles[zz] = 0;
ccCArrayRemoveValueAtIndex(m_pAtlasIndexArray, atlasIndex);
__super::removeChild(sprite, cleanup);
CCSpriteSheet::removeChild(sprite, cleanup);
}
void CCTMXLayer::removeTileAt(CGPoint pos)
{
@ -484,7 +484,7 @@ namespace cocos2d {
CCSprite *sprite = (CCSprite*)getChildByTag(z);
if( sprite )
{
__super::removeChild(sprite, true);
CCSpriteSheet::removeChild(sprite, true);
}
else
{
@ -609,7 +609,7 @@ namespace cocos2d {
glAlphaFunc(GL_GREATER, m_fAlphaFuncValue);
}
__super::draw();
CCSpriteSheet::draw();
if( m_bUseAutomaticVertexZ )
{

View File

@ -46,7 +46,7 @@ namespace cocos2d {
{
this->loadTGAfile(mapFile);
this->calculateItemsToRender();
if( __super::initWithTileFile(tile, tileWidth, tileHeight, m_nItemsToRender) )
if( CCAtlasNode::initWithTileFile(tile, tileWidth, tileHeight, m_nItemsToRender) )
{
m_pPosToAtlasIndex = new StringToIntegerDictionary();
this->updateAtlasValues();

View File

@ -84,7 +84,7 @@ CCTouchHandler::~CCTouchHandler(void)
// implementation of CCStandardTouchHandler
CCTouchHandler* CCStandardTouchHandler::initWithDelegate(CCTouchDelegate *pDelegate, int nPriority)
{
if (__super::initWithDelegate(pDelegate, nPriority))
if (CCTouchHandler::initWithDelegate(pDelegate, nPriority))
{
/*
* we can not do this in c++
@ -140,7 +140,7 @@ CCTargetedTouchHandler* CCTargetedTouchHandler::handlerWithDelegate(CCTouchDeleg
CCTouchHandler* CCTargetedTouchHandler::initWithDelegate(CCTouchDelegate *pDelegate, int nPriority, bool bSwallow)
{
if (__super::initWithDelegate(pDelegate, nPriority))
if (CCTouchHandler::initWithDelegate(pDelegate, nPriority))
{
m_pClaimedTouches = new NSMutableSet();
m_bSwallowsTouches = bSwallow;