fixed #1606: Updated some invocations of CCSequence for TestCpp project.

This commit is contained in:
James Chen 2012-12-10 14:12:56 +08:00
parent 839288671e
commit 21f88534cf
22 changed files with 186 additions and 197 deletions

View File

@ -265,7 +265,7 @@ void RemoveTest::onEnter()
CCMoveBy* pMove = CCMoveBy::create(2, ccp(200, 0));
CCCallFunc* pCallback = CCCallFunc::create(this, callfunc_selector(RemoveTest::stopAction));
CCActionInterval* pSequence = (CCActionInterval*) CCSequence::create(pMove, pCallback, NULL);
CCActionInterval* pSequence = CCSequence::create(pMove, pCallback, NULL);
pSequence->setTag(kTagSequence);
CCSprite* pChild = CCSprite::create(s_pPathGrossini);

View File

@ -32,18 +32,18 @@ void SpriteEase::onEnter()
CCDelayTime *delay = CCDelayTime::create(0.25f);
CCFiniteTimeAction* seq1 = CCSequence::create(move, delay, move_back, CCCA(delay), NULL);
CCFiniteTimeAction* seq2 = CCSequence::create(move_ease_in, CCCA(delay), move_ease_in_back, CCCA(delay), NULL);
CCFiniteTimeAction* seq3 = CCSequence::create(move_ease_out, CCCA(delay), move_ease_out_back, CCCA(delay), NULL);
CCSequence* seq1 = CCSequence::create(move, delay, move_back, CCCA(delay), NULL);
CCSequence* seq2 = CCSequence::create(move_ease_in, CCCA(delay), move_ease_in_back, CCCA(delay), NULL);
CCSequence* seq3 = CCSequence::create(move_ease_out, CCCA(delay), move_ease_out_back, CCCA(delay), NULL);
CCAction *a2 = m_grossini->runAction(CCRepeatForever::create((CCActionInterval*)seq1));
CCAction *a2 = m_grossini->runAction(CCRepeatForever::create(seq1));
a2->setTag(1);
CCAction *a1 = m_tamara->runAction(CCRepeatForever::create((CCActionInterval*)seq2));
CCAction *a1 = m_tamara->runAction(CCRepeatForever::create(seq2));
a1->setTag(1);
CCAction *a = m_kathia->runAction(CCRepeatForever::create((CCActionInterval*)seq3));
CCAction *a = m_kathia->runAction(CCRepeatForever::create(seq3));
a->setTag(1);
schedule(schedule_selector(SpriteEase::testStopAction), 6.25f);
@ -87,13 +87,13 @@ void SpriteEaseInOut::onEnter()
CCDelayTime *delay = CCDelayTime::create(0.25f);
CCFiniteTimeAction* seq1 = CCSequence::create( move_ease_inout1, delay, move_ease_inout_back1, CCCA(delay), NULL);
CCFiniteTimeAction* seq2 = CCSequence::create( move_ease_inout2, CCCA(delay), move_ease_inout_back2, CCCA(delay), NULL);
CCFiniteTimeAction* seq3 = CCSequence::create( move_ease_inout3, CCCA(delay), move_ease_inout_back3, CCCA(delay), NULL);
CCSequence* seq1 = CCSequence::create( move_ease_inout1, delay, move_ease_inout_back1, CCCA(delay), NULL);
CCSequence* seq2 = CCSequence::create( move_ease_inout2, CCCA(delay), move_ease_inout_back2, CCCA(delay), NULL);
CCSequence* seq3 = CCSequence::create( move_ease_inout3, CCCA(delay), move_ease_inout_back3, CCCA(delay), NULL);
m_tamara->runAction(CCRepeatForever::create((CCActionInterval*)seq1));
m_kathia->runAction(CCRepeatForever::create((CCActionInterval*)seq2));
m_grossini->runAction(CCRepeatForever::create((CCActionInterval*)seq3));
m_tamara->runAction(CCRepeatForever::create(seq1));
m_kathia->runAction(CCRepeatForever::create(seq2));
m_grossini->runAction(CCRepeatForever::create(seq3));
}
@ -123,14 +123,14 @@ void SpriteEaseExponential::onEnter()
CCDelayTime *delay = CCDelayTime::create(0.25f);
CCFiniteTimeAction* seq1 = CCSequence::create(move, delay, move_back, CCCA(delay), NULL);
CCFiniteTimeAction* seq2 = CCSequence::create(move_ease_in, CCCA(delay), move_ease_in_back, CCCA(delay), NULL);
CCFiniteTimeAction* seq3 = CCSequence::create(move_ease_out, CCCA(delay), move_ease_out_back, CCCA(delay), NULL);
CCSequence* seq1 = CCSequence::create(move, delay, move_back, CCCA(delay), NULL);
CCSequence* seq2 = CCSequence::create(move_ease_in, CCCA(delay), move_ease_in_back, CCCA(delay), NULL);
CCSequence* seq3 = CCSequence::create(move_ease_out, CCCA(delay), move_ease_out_back, CCCA(delay), NULL);
m_grossini->runAction( CCRepeatForever::create((CCActionInterval*)seq1));
m_tamara->runAction( CCRepeatForever::create((CCActionInterval*)seq2));
m_kathia->runAction( CCRepeatForever::create((CCActionInterval*)seq3));
m_grossini->runAction( CCRepeatForever::create(seq1));
m_tamara->runAction( CCRepeatForever::create(seq2));
m_kathia->runAction( CCRepeatForever::create(seq3));
}
@ -156,13 +156,13 @@ void SpriteEaseExponentialInOut::onEnter()
CCDelayTime *delay = CCDelayTime::create(0.25f);
CCFiniteTimeAction* seq1 = CCSequence::create( move, delay, move_back, CCCA(delay), NULL);
CCFiniteTimeAction* seq2 = CCSequence::create( move_ease, delay, move_ease_back, CCCA(delay), NULL);
CCSequence* seq1 = CCSequence::create( move, delay, move_back, CCCA(delay), NULL);
CCSequence* seq2 = CCSequence::create( move_ease, delay, move_ease_back, CCCA(delay), NULL);
this->positionForTwo();
m_grossini->runAction( CCRepeatForever::create((CCActionInterval*)seq1));
m_tamara->runAction( CCRepeatForever::create((CCActionInterval*)seq2));
m_grossini->runAction( CCRepeatForever::create(seq1));
m_tamara->runAction( CCRepeatForever::create(seq2));
}
@ -192,14 +192,14 @@ void SpriteEaseSine::onEnter()
CCDelayTime *delay = CCDelayTime::create(0.25f);
CCFiniteTimeAction* seq1 = CCSequence::create(move, delay, move_back, CCCA(delay), NULL);
CCFiniteTimeAction* seq2 = CCSequence::create(move_ease_in, CCCA(delay), move_ease_in_back, CCCA(delay), NULL);
CCFiniteTimeAction* seq3 = CCSequence::create(move_ease_out, CCCA(delay), move_ease_out_back, CCCA(delay), NULL);
CCSequence* seq1 = CCSequence::create(move, delay, move_back, CCCA(delay), NULL);
CCSequence* seq2 = CCSequence::create(move_ease_in, CCCA(delay), move_ease_in_back, CCCA(delay), NULL);
CCSequence* seq3 = CCSequence::create(move_ease_out, CCCA(delay), move_ease_out_back, CCCA(delay), NULL);
m_grossini->runAction( CCRepeatForever::create((CCActionInterval*)seq1));
m_tamara->runAction( CCRepeatForever::create((CCActionInterval*)seq2));
m_kathia->runAction( CCRepeatForever::create((CCActionInterval*)seq3));
m_grossini->runAction( CCRepeatForever::create(seq1));
m_tamara->runAction( CCRepeatForever::create(seq2));
m_kathia->runAction( CCRepeatForever::create(seq3));
}
@ -226,13 +226,13 @@ void SpriteEaseSineInOut::onEnter()
CCDelayTime *delay = CCDelayTime::create(0.25f);
CCFiniteTimeAction* seq1 = CCSequence::create(move, delay, move_back, CCCA(delay), NULL);
CCFiniteTimeAction* seq2 = CCSequence::create(move_ease, CCCA(delay), move_ease_back, CCCA(delay), NULL);
CCSequence* seq1 = CCSequence::create(move, delay, move_back, CCCA(delay), NULL);
CCSequence* seq2 = CCSequence::create(move_ease, CCCA(delay), move_ease_back, CCCA(delay), NULL);
this->positionForTwo();
m_grossini->runAction( CCRepeatForever::create((CCActionInterval*)seq1));
m_tamara->runAction( CCRepeatForever::create((CCActionInterval*)seq2));
m_grossini->runAction( CCRepeatForever::create(seq1));
m_tamara->runAction( CCRepeatForever::create(seq2));
}
@ -261,13 +261,13 @@ void SpriteEaseElastic::onEnter()
CCDelayTime *delay = CCDelayTime::create(0.25f);
CCFiniteTimeAction* seq1 = CCSequence::create(move, delay, move_back, CCCA(delay), NULL);
CCFiniteTimeAction* seq2 = CCSequence::create(move_ease_in, CCCA(delay), move_ease_in_back, CCCA(delay), NULL);
CCFiniteTimeAction* seq3 = CCSequence::create(move_ease_out, CCCA(delay), move_ease_out_back, CCCA(delay), NULL);
CCSequence* seq1 = CCSequence::create(move, delay, move_back, CCCA(delay), NULL);
CCSequence* seq2 = CCSequence::create(move_ease_in, CCCA(delay), move_ease_in_back, CCCA(delay), NULL);
CCSequence* seq3 = CCSequence::create(move_ease_out, CCCA(delay), move_ease_out_back, CCCA(delay), NULL);
m_grossini->runAction( CCRepeatForever::create((CCActionInterval*)seq1));
m_tamara->runAction( CCRepeatForever::create((CCActionInterval*)seq2));
m_kathia->runAction( CCRepeatForever::create((CCActionInterval*)seq3));
m_grossini->runAction( CCRepeatForever::create(seq1));
m_tamara->runAction( CCRepeatForever::create(seq2));
m_kathia->runAction( CCRepeatForever::create(seq3));
}
@ -299,13 +299,13 @@ void SpriteEaseElasticInOut::onEnter()
CCDelayTime *delay = CCDelayTime::create(0.25f);
CCFiniteTimeAction* seq1 = CCSequence::create(move_ease_inout1, delay, move_ease_inout_back1, CCCA(delay), NULL);
CCFiniteTimeAction* seq2 = CCSequence::create(move_ease_inout2, CCCA(delay), move_ease_inout_back2, CCCA(delay), NULL);
CCFiniteTimeAction* seq3 = CCSequence::create(move_ease_inout3, CCCA(delay), move_ease_inout_back3, CCCA(delay), NULL);
CCSequence* seq1 = CCSequence::create(move_ease_inout1, delay, move_ease_inout_back1, CCCA(delay), NULL);
CCSequence* seq2 = CCSequence::create(move_ease_inout2, CCCA(delay), move_ease_inout_back2, CCCA(delay), NULL);
CCSequence* seq3 = CCSequence::create(move_ease_inout3, CCCA(delay), move_ease_inout_back3, CCCA(delay), NULL);
m_tamara->runAction( CCRepeatForever::create((CCActionInterval*)seq1));
m_kathia->runAction( CCRepeatForever::create((CCActionInterval*)seq2));
m_grossini->runAction( CCRepeatForever::create((CCActionInterval*)seq3));
m_tamara->runAction( CCRepeatForever::create(seq1));
m_kathia->runAction( CCRepeatForever::create(seq2));
m_grossini->runAction( CCRepeatForever::create(seq3));
}
@ -336,13 +336,13 @@ void SpriteEaseBounce::onEnter()
CCDelayTime *delay = CCDelayTime::create(0.25f);
CCFiniteTimeAction* seq1 = CCSequence::create(move, delay, move_back, CCCA(delay), NULL);
CCFiniteTimeAction* seq2 = CCSequence::create(move_ease_in, CCCA(delay), move_ease_in_back, CCCA(delay), NULL);
CCFiniteTimeAction* seq3 = CCSequence::create(move_ease_out, CCCA(delay), move_ease_out_back, CCCA(delay), NULL);
CCSequence* seq1 = CCSequence::create(move, delay, move_back, CCCA(delay), NULL);
CCSequence* seq2 = CCSequence::create(move_ease_in, CCCA(delay), move_ease_in_back, CCCA(delay), NULL);
CCSequence* seq3 = CCSequence::create(move_ease_out, CCCA(delay), move_ease_out_back, CCCA(delay), NULL);
m_grossini->runAction( CCRepeatForever::create((CCActionInterval*)seq1));
m_tamara->runAction( CCRepeatForever::create((CCActionInterval*)seq2));
m_kathia->runAction( CCRepeatForever::create((CCActionInterval*)seq3));
m_grossini->runAction( CCRepeatForever::create(seq1));
m_tamara->runAction( CCRepeatForever::create(seq2));
m_kathia->runAction( CCRepeatForever::create(seq3));
}
@ -370,13 +370,13 @@ void SpriteEaseBounceInOut::onEnter()
CCDelayTime *delay = CCDelayTime::create(0.25f);
CCFiniteTimeAction* seq1 = CCSequence::create(move, delay, move_back, CCCA(delay), NULL);
CCFiniteTimeAction* seq2 = CCSequence::create(move_ease, CCCA(delay), move_ease_back, CCCA(delay), NULL);
CCSequence* seq1 = CCSequence::create(move, delay, move_back, CCCA(delay), NULL);
CCSequence* seq2 = CCSequence::create(move_ease, CCCA(delay), move_ease_back, CCCA(delay), NULL);
this->positionForTwo();
m_grossini->runAction( CCRepeatForever::create((CCActionInterval*)seq1));
m_tamara->runAction( CCRepeatForever::create((CCActionInterval*)seq2));
m_grossini->runAction( CCRepeatForever::create(seq1));
m_tamara->runAction( CCRepeatForever::create(seq2));
}
@ -406,13 +406,13 @@ void SpriteEaseBack::onEnter()
CCDelayTime *delay = CCDelayTime::create(0.25f);
CCFiniteTimeAction* seq1 = CCSequence::create(move, delay, move_back, CCCA(delay), NULL);
CCFiniteTimeAction* seq2 = CCSequence::create(move_ease_in, CCCA(delay), move_ease_in_back, CCCA(delay), NULL);
CCFiniteTimeAction* seq3 = CCSequence::create(move_ease_out, CCCA(delay), move_ease_out_back, CCCA(delay), NULL);
CCSequence* seq1 = CCSequence::create(move, delay, move_back, CCCA(delay), NULL);
CCSequence* seq2 = CCSequence::create(move_ease_in, CCCA(delay), move_ease_in_back, CCCA(delay), NULL);
CCSequence* seq3 = CCSequence::create(move_ease_out, CCCA(delay), move_ease_out_back, CCCA(delay), NULL);
m_grossini->runAction(CCRepeatForever::create((CCActionInterval*)seq1));
m_tamara->runAction(CCRepeatForever::create((CCActionInterval*)seq2));
m_kathia->runAction(CCRepeatForever::create((CCActionInterval*)seq3));
m_grossini->runAction(CCRepeatForever::create(seq1));
m_tamara->runAction(CCRepeatForever::create(seq2));
m_kathia->runAction(CCRepeatForever::create(seq3));
}
@ -439,13 +439,13 @@ void SpriteEaseBackInOut::onEnter()
CCDelayTime *delay = CCDelayTime::create(0.25f);
CCFiniteTimeAction* seq1 = CCSequence::create(move, delay, move_back, CCCA(delay), NULL);
CCFiniteTimeAction* seq2 = CCSequence::create(move_ease, CCCA(delay), move_ease_back, CCCA(delay), NULL);
CCSequence* seq1 = CCSequence::create(move, delay, move_back, CCCA(delay), NULL);
CCSequence* seq2 = CCSequence::create(move_ease, CCCA(delay), move_ease_back, CCCA(delay), NULL);
this->positionForTwo();
m_grossini->runAction( CCRepeatForever::create((CCActionInterval*)seq1));
m_tamara->runAction( CCRepeatForever::create((CCActionInterval*)seq2));
m_grossini->runAction( CCRepeatForever::create(seq1));
m_tamara->runAction( CCRepeatForever::create(seq2));
}
@ -472,10 +472,10 @@ void SpeedTest::onEnter()
CCActionInterval *rot1 = CCRotateBy::create(4, 360*2);
CCActionInterval *rot2 = rot1->reverse();
CCFiniteTimeAction* seq3_1 = CCSequence::create(jump2, jump1, NULL);
CCFiniteTimeAction* seq3_2 = CCSequence::create( rot1, rot2, NULL);
CCFiniteTimeAction* spawn = CCSpawn::create(seq3_1, seq3_2, NULL);
CCSpeed* action = CCSpeed::create(CCRepeatForever::create((CCActionInterval*)spawn), 1.0f);
CCSequence* seq3_1 = CCSequence::create(jump2, jump1, NULL);
CCSequence* seq3_2 = CCSequence::create( rot1, rot2, NULL);
CCSpawn* spawn = CCSpawn::create(seq3_1, seq3_2, NULL);
CCSpeed* action = CCSpeed::create(CCRepeatForever::create(spawn), 1.0f);
action->setTag(kTagAction1);
CCAction* action2 = (CCAction*)(action->copy()->autorelease());

View File

@ -598,7 +598,7 @@ void ActionBezier::onEnter()
CCActionInterval* bezierForward = CCBezierBy::create(3, bezier);
CCActionInterval* bezierBack = bezierForward->reverse();
CCAction* rep = CCRepeatForever::create((CCActionInterval*)CCSequence::create( bezierForward, bezierBack, NULL));
CCAction* rep = CCRepeatForever::create(CCSequence::create( bezierForward, bezierBack, NULL));
// sprite 2
@ -1028,7 +1028,7 @@ void ActionRotateToRepeat::onEnter()
CCActionInterval* act1 = CCRotateTo::create(1, 90);
CCActionInterval* act2 = CCRotateTo::create(1, 0);
CCActionInterval* seq = (CCActionInterval*)(CCSequence::create(act1, act2, NULL));
CCActionInterval* seq = CCSequence::create(act1, act2, NULL);
CCAction* rep1 = CCRepeatForever::create(seq);
CCActionInterval* rep2 = CCRepeat::create((CCFiniteTimeAction*)(seq->copy()->autorelease()), 10);
@ -1162,7 +1162,7 @@ void ActionReverseSequence2::onEnter()
tog1->autorelease();
tog2->autorelease();
CCFiniteTimeAction* seq = CCSequence::create( move1, tog1, move2, tog2, move1->reverse(), NULL);
CCActionInterval* action = CCRepeat::create((CCActionInterval*)(CCSequence::create( seq, seq->reverse(), NULL)), 3);
CCActionInterval* action = CCRepeat::create(CCSequence::create( seq, seq->reverse(), NULL), 3);
@ -1172,8 +1172,7 @@ void ActionReverseSequence2::onEnter()
CCActionInterval* move_tamara = CCMoveBy::create(1, ccp(100,0));
CCActionInterval* move_tamara2 = CCMoveBy::create(1, ccp(50,0));
CCActionInstant* hide = new CCHide();
hide->autorelease();
CCActionInstant* hide = CCHide::create();
CCFiniteTimeAction* seq_tamara = CCSequence::create( move_tamara, hide, move_tamara2, NULL);
CCFiniteTimeAction* seq_back = seq_tamara->reverse();
m_tamara->runAction( CCSequence::create( seq_tamara, seq_back, NULL));
@ -1200,7 +1199,7 @@ void ActionRepeat::onEnter()
CCSequence::create( CCPlace::create(ccp(60,60)), a1, NULL) ,
3);
CCAction* action2 = CCRepeatForever::create(
(CCActionInterval*)(CCSequence::create((CCActionInterval*)(a1->copy()->autorelease()), a1->reverse(), NULL))
CCSequence::create((CCActionInterval*)(a1->copy()->autorelease()), a1->reverse(), NULL)
);
m_kathia->runAction(action1);
@ -1224,31 +1223,31 @@ void ActionOrbit::onEnter()
centerSprites(3);
CCActionInterval* orbit1 = CCOrbitCamera::create(2,1, 0, 0, 180, 0, 0);
CCFiniteTimeAction* action1 = CCSequence::create(
CCSequence* action1 = CCSequence::create(
orbit1,
orbit1->reverse(),
NULL);
CCActionInterval* orbit2 = CCOrbitCamera::create(2,1, 0, 0, 180, -45, 0);
CCFiniteTimeAction* action2 = CCSequence::create(
CCSequence* action2 = CCSequence::create(
orbit2,
orbit2->reverse(),
NULL);
CCActionInterval* orbit3 = CCOrbitCamera::create(2,1, 0, 0, 180, 90, 0);
CCFiniteTimeAction* action3 = CCSequence::create(
CCSequence* action3 = CCSequence::create(
orbit3,
orbit3->reverse(),
NULL);
m_kathia->runAction(CCRepeatForever::create((CCActionInterval*)action1));
m_tamara->runAction(CCRepeatForever::create((CCActionInterval*)action2));
m_grossini->runAction(CCRepeatForever::create((CCActionInterval*)action3));
m_kathia->runAction(CCRepeatForever::create(action1));
m_tamara->runAction(CCRepeatForever::create(action2));
m_grossini->runAction(CCRepeatForever::create(action3));
CCActionInterval* move = CCMoveBy::create(3, ccp(100,-100));
CCActionInterval* move_back = move->reverse();
CCFiniteTimeAction* seq = CCSequence::create(move, move_back, NULL);
CCAction* rfe = CCRepeatForever::create((CCActionInterval*)seq);
CCSequence* seq = CCSequence::create(move, move_back, NULL);
CCAction* rfe = CCRepeatForever::create(seq);
m_kathia->runAction(rfe);
m_tamara->runAction((CCAction*)(rfe->copy()->autorelease()));
m_grossini->runAction((CCAction*)(rfe->copy()->autorelease()));
@ -1274,8 +1273,8 @@ void ActionFollow::onEnter()
m_grossini->setPosition(ccp(-200, s.height / 2));
CCActionInterval* move = CCMoveBy::create(2, ccp(s.width * 3, 0));
CCActionInterval* move_back = move->reverse();
CCFiniteTimeAction* seq = CCSequence::create(move, move_back, NULL);
CCAction* rep = CCRepeatForever::create((CCActionInterval*)seq);
CCSequence* seq = CCSequence::create(move, move_back, NULL);
CCAction* rep = CCRepeatForever::create(seq);
m_grossini->runAction(rep);

View File

@ -34,10 +34,10 @@ bool Bug1159Layer::init()
sprite_a->setPosition(ccp(0.0f, s.height/2));
addChild(sprite_a);
sprite_a->runAction(CCRepeatForever::create((CCActionInterval*) CCSequence::create(
CCMoveTo::create(1.0f, ccp(1024.0f, 384.0f)),
CCMoveTo::create(1.0f, ccp(0.0f, 384.0f)),
NULL)));
sprite_a->runAction(CCRepeatForever::create(CCSequence::create(
CCMoveTo::create(1.0f, ccp(1024.0f, 384.0f)),
CCMoveTo::create(1.0f, ccp(0.0f, 384.0f)),
NULL)));
CCLayerColor *sprite_b = CCLayerColor::create(ccc4(0, 0, 255, 255), 400, 400);
sprite_b->setAnchorPoint(ccp(0.5f, 0.5f));

View File

@ -29,12 +29,12 @@ MainLayer::MainLayer()
sprite->runAction( CCJumpTo::create(4, ccp(300,48), 100, 4) );
layer->runAction( CCRepeatForever::create(
(CCActionInterval*)( CCSequence::create(
CCFadeIn::create(1),
CCFadeOut::create(1),
NULL) )
) );
layer->runAction( CCRepeatForever::create(
CCSequence::create(
CCFadeIn::create(1),
CCFadeOut::create(1),
NULL)
));
}
void MainLayer::ccTouchesEnded(CCSet *pTouches, CCEvent *pEvent)

View File

@ -217,7 +217,7 @@ CCAction* BasicTest::actionRotate()
CCAction* BasicTest::actionScale()
{
CCScaleBy *scale = CCScaleBy::create(1.33f, 1.5f);
return CCRepeatForever::create((CCActionInterval*)CCSequence::create(scale, scale->reverse(), NULL));
return CCRepeatForever::create(CCSequence::create(scale, scale->reverse(), NULL));
}
CCDrawNode* BasicTest::shape()

View File

@ -37,7 +37,7 @@ void Effect1::onEnter()
CCActionInterval* orbit = CCOrbitCamera::create(5, 1, 2, 0, 180, 0, -90);
CCActionInterval* orbit_back = orbit->reverse();
target->runAction( CCRepeatForever::create( (CCActionInterval *)(CCSequence::create( orbit, orbit_back, NULL) ) ) );
target->runAction( CCRepeatForever::create( CCSequence::create( orbit, orbit_back, NULL) ) );
target->runAction( CCSequence::create(lens, delay, reuse, waves, NULL) );
}
@ -79,7 +79,7 @@ void Effect2::onEnter()
// id orbit_back = [orbit reverse];
//
// [target runAction: [RepeatForever::create: [Sequence actions: orbit, orbit_back, nil]]];
target->runAction( (CCActionInterval *)(CCSequence::create( shaky, delay, reuse, shuffle, delay->copy()->autorelease(), turnoff, turnon, NULL) ) );
target->runAction(CCSequence::create( shaky, delay, reuse, shuffle, delay->copy()->autorelease(), turnoff, turnon, NULL) );
}
std::string Effect2::title()
@ -109,7 +109,7 @@ void Effect3::onEnter()
// moving background. Testing issue #244
CCActionInterval* move = CCMoveBy::create(3, ccp(200,0) );
bg->runAction(CCRepeatForever::create( (CCActionInterval *)(CCSequence::create(move, move->reverse(), NULL) ) ) );
bg->runAction(CCRepeatForever::create( CCSequence::create(move, move->reverse(), NULL) ));
}
std::string Effect3::title()
@ -155,7 +155,7 @@ void Effect4::onEnter()
CCLens3D* lens = CCLens3D::create(ccp(100,180), 150, ccg(32,24), 10);
CCActionInterval* move = CCJumpBy::create(5, ccp(380,0), 100, 4);
CCActionInterval* move_back = move->reverse();
CCActionInterval* seq = (CCActionInterval *)(CCSequence::create( move, move_back, NULL));
CCActionInterval* seq = CCSequence::create( move, move_back, NULL);
/* In cocos2d-iphone, the type of action's target is 'id', so it supports using the instance of 'CCLens3D' as its target.
While in cocos2d-x, the target of action only supports CCNode or its subclass,
@ -189,13 +189,13 @@ void Effect5::onEnter()
CCActionInterval* effect = CCLiquid::create(1, 20, ccg(32,24), 2);
CCActionInterval* stopEffect = (CCActionInterval *)( CCSequence::create(
CCActionInterval* stopEffect = CCSequence::create(
effect,
CCDelayTime::create(2),
CCStopGrid::create(),
// [DelayTime::create:2],
// [[effect copy] autorelease],
NULL) );
NULL);
CCNode* bg = getChildByTag(kTagBackground);
bg->runAction(stopEffect);
@ -222,7 +222,7 @@ void Issue631::onEnter()
{
EffectAdvanceTextLayer::onEnter();
CCActionInterval* effect = (CCActionInterval*)(CCSequence::create( CCDelayTime::create(2.0f), CCShaky3D::create(16, false, ccg(5, 5), 5.0f), NULL));
CCActionInterval* effect = CCSequence::create( CCDelayTime::create(2.0f), CCShaky3D::create(16, false, ccg(5, 5), 5.0f), NULL);
// cleanup
CCNode* bg = getChildByTag(kTagBackground);
@ -339,14 +339,14 @@ void EffectAdvanceTextLayer::onEnter(void)
grossini->setPosition( ccp(VisibleRect::left().x+VisibleRect::getVisibleRect().size.width/3.0f, VisibleRect::bottom().y+ 200) );
CCActionInterval* sc = CCScaleBy::create(2, 5);
CCActionInterval* sc_back = sc->reverse();
grossini->runAction( CCRepeatForever::create( (CCActionInterval*)(CCSequence::create(sc, sc_back, NULL)) ) );
grossini->runAction( CCRepeatForever::create(CCSequence::create(sc, sc_back, NULL) ) );
CCSprite* tamara = CCSprite::create("Images/grossinis_sister1.png");
bg->addChild(tamara, 1, kTagSprite2);
tamara->setPosition( ccp(VisibleRect::left().x+2*VisibleRect::getVisibleRect().size.width/3.0f,VisibleRect::bottom().y+200) );
CCActionInterval* sc2 = CCScaleBy::create(2, 5);
CCActionInterval* sc2_back = sc2->reverse();
tamara->runAction( CCRepeatForever::create( (CCActionInterval*)(CCSequence::create(sc2, sc2_back, NULL)) ) );
tamara->runAction( CCRepeatForever::create(CCSequence::create(sc2, sc2_back, NULL) ) );
CCLabelTTF* label = CCLabelTTF::create(title().c_str(), "Marker Felt", 28);

View File

@ -63,7 +63,7 @@ public:
CCActionInterval* flipx_back = flipx->reverse();
CCDelayTime* delay = CCDelayTime::create(2);
return (CCActionInterval*)(CCSequence::create(flipx, delay, flipx_back, NULL));
return CCSequence::create(flipx, delay, flipx_back, NULL);
}
};
@ -76,7 +76,7 @@ public:
CCActionInterval* flipy_back = flipy->reverse();
CCDelayTime* delay = CCDelayTime::create(2);
return (CCActionInterval*)(CCSequence::create(flipy, delay, flipy_back, NULL));
return CCSequence::create(flipy, delay, flipy_back, NULL);
}
};
@ -162,7 +162,7 @@ public:
CCActionInterval* shuffle_back = shuffle->reverse();
CCDelayTime* delay = CCDelayTime::create(2);
return (CCActionInterval*)(CCSequence::create(shuffle, delay, shuffle_back, NULL));
return CCSequence::create(shuffle, delay, shuffle_back, NULL);
}
};
@ -176,7 +176,7 @@ public:
CCActionInterval* back = fadeout->reverse();
CCDelayTime* delay = CCDelayTime::create(0.5f);
return (CCActionInterval*)(CCSequence::create(fadeout, delay, back, NULL));
return CCSequence::create(fadeout, delay, back, NULL);
}
};
@ -190,7 +190,7 @@ public:
CCActionInterval* back = fadeout->reverse();
CCDelayTime* delay = CCDelayTime::create(0.5f);
return (CCActionInterval*)(CCSequence::create(fadeout, delay, back, NULL));
return CCSequence::create(fadeout, delay, back, NULL);
}
};
@ -204,7 +204,7 @@ public:
CCActionInterval* back = fadeout->reverse();
CCDelayTime* delay = CCDelayTime::create(0.5f);
return (CCActionInterval*)(CCSequence::create(fadeout, delay, back, NULL));
return CCSequence::create(fadeout, delay, back, NULL);
}
};
@ -217,7 +217,7 @@ public:
CCActionInterval* back = fadeout->reverse();
CCDelayTime* delay = CCDelayTime::create(0.5f);
return (CCActionInterval*)(CCSequence::create(fadeout, delay, back, NULL));
return CCSequence::create(fadeout, delay, back, NULL);
}
};
@ -230,7 +230,7 @@ public:
CCActionInterval* back = fadeout->reverse();
CCDelayTime* delay = CCDelayTime::create(0.5f);
return (CCActionInterval*)(CCSequence::create(fadeout, delay, back, NULL));
return CCSequence::create(fadeout, delay, back, NULL);
}
};
@ -356,14 +356,14 @@ TextLayer::TextLayer(void)
grossini->setPosition( ccp(VisibleRect::left().x+VisibleRect::getVisibleRect().size.width/3,VisibleRect::center().y) );
CCActionInterval* sc = CCScaleBy::create(2, 5);
CCActionInterval* sc_back = sc->reverse();
grossini->runAction( CCRepeatForever::create((CCActionInterval*)(CCSequence::create(sc, sc_back, NULL)) ) );
grossini->runAction( CCRepeatForever::create(CCSequence::create(sc, sc_back, NULL) ) );
CCSprite* tamara = CCSprite::create(s_pPathSister1);
node->addChild(tamara, 1);
tamara->setPosition( ccp(VisibleRect::left().x+2*VisibleRect::getVisibleRect().size.width/3,VisibleRect::center().y) );
CCActionInterval* sc2 = CCScaleBy::create(2, 5);
CCActionInterval* sc2_back = sc2->reverse();
tamara->runAction( CCRepeatForever::create((CCActionInterval*)(CCSequence::create(sc2, sc2_back, NULL))) );
tamara->runAction( CCRepeatForever::create(CCSequence::create(sc2, sc2_back, NULL)) );
CCLabelTTF* label = CCLabelTTF::create((effectsList[actionIdx]).c_str(), "Marker Felt", 32);

View File

@ -55,10 +55,7 @@ IntervalLayer::IntervalLayer()
CCJumpBy* jump = CCJumpBy::create(3, ccp(s.width-80,0), 50, 4);
addChild(sprite);
sprite->runAction( CCRepeatForever::create(
(CCActionInterval*)(CCSequence::create(jump, jump->reverse(), NULL ))
)
);
sprite->runAction( CCRepeatForever::create(CCSequence::create(jump, jump->reverse(), NULL) ));
// pause button
CCMenuItem* item1 = CCMenuItemFont::create("Pause", this, menu_selector(IntervalLayer::onPause) );
CCMenu* menu = CCMenu::create(item1, NULL);

View File

@ -329,8 +329,8 @@ LabelAtlasColorTest::LabelAtlasColorTest()
CCActionInterval* fade = CCFadeOut::create(1.0f);
CCActionInterval* fade_in = fade->reverse();
CCFiniteTimeAction* seq = CCSequence::create(fade, fade_in, NULL);
CCAction* repeat = CCRepeatForever::create( (CCActionInterval*)seq );
CCSequence* seq = CCSequence::create(fade, fade_in, NULL);
CCAction* repeat = CCRepeatForever::create( seq );
label2->runAction( repeat );
m_time = 0;
@ -425,8 +425,8 @@ Atlas3::Atlas3()
addChild(label1, 0, kTagBitmapAtlas1);
CCActionInterval* fade = CCFadeOut::create(1.0f);
CCActionInterval* fade_in = fade->reverse();
CCFiniteTimeAction* seq = CCSequence::create(fade, fade_in, NULL);
CCAction* repeat = CCRepeatForever::create((CCActionInterval*)seq);
CCSequence* seq = CCSequence::create(fade, fade_in, NULL);
CCAction* repeat = CCRepeatForever::create(seq);
label1->runAction(repeat);
@ -519,16 +519,16 @@ Atlas4::Atlas4()
CCActionInterval* scale = CCScaleBy::create(2, 1.5f);
CCActionInterval* scale_back = scale->reverse();
CCFiniteTimeAction* scale_seq = CCSequence::create(scale, scale_back,NULL);
CCAction* scale_4ever = CCRepeatForever::create((CCActionInterval*)scale_seq);
CCSequence* scale_seq = CCSequence::create(scale, scale_back,NULL);
CCAction* scale_4ever = CCRepeatForever::create(scale_seq);
CCActionInterval* jump = CCJumpBy::create(0.5f, CCPointZero, 60, 1);
CCAction* jump_4ever = CCRepeatForever::create(jump);
CCActionInterval* fade_out = CCFadeOut::create(1);
CCActionInterval* fade_in = CCFadeIn::create(1);
CCFiniteTimeAction* seq = CCSequence::create(fade_out, fade_in, NULL);
CCAction* fade_4ever = CCRepeatForever::create((CCActionInterval*)seq);
CCSequence* seq = CCSequence::create(fade_out, fade_in, NULL);
CCAction* fade_4ever = CCRepeatForever::create(seq);
BChar->runAction(rot_4ever);
BChar->runAction(scale_4ever);
@ -1352,8 +1352,8 @@ LabelTTFA8Test::LabelTTFA8Test()
CCFadeOut *fadeOut = CCFadeOut::create(2);
CCFadeIn *fadeIn = CCFadeIn::create(2);
CCFiniteTimeAction *seq = CCSequence::create(fadeOut, fadeIn, NULL);
CCRepeatForever *forever = CCRepeatForever::create((CCActionInterval *)seq);
CCSequence *seq = CCSequence::create(fadeOut, fadeIn, NULL);
CCRepeatForever *forever = CCRepeatForever::create(seq);
label1->runAction(forever);
}

View File

@ -219,12 +219,12 @@ void LayerTest2::onEnter()
CCActionInterval* actionTint = CCTintBy::create(2, -255, -127, 0);
CCActionInterval* actionTintBack = actionTint->reverse();
CCActionInterval* seq1 = (CCActionInterval*)CCSequence::create( actionTint, actionTintBack, NULL);
CCActionInterval* seq1 = CCSequence::create( actionTint, actionTintBack, NULL);
layer1->runAction(seq1);
CCActionInterval* actionFade = CCFadeOut::create(2.0f);
CCActionInterval* actionFadeBack = actionFade->reverse();
CCActionInterval* seq2 = (CCActionInterval*)CCSequence::create(actionFade, actionFadeBack, NULL);
CCActionInterval* seq2 = CCSequence::create(actionFade, actionFadeBack, NULL);
layer2->runAction(seq2);
}
@ -357,7 +357,7 @@ void LayerIgnoreAnchorPointPos::onEnter()
CCMoveBy *move = CCMoveBy::create(2, ccp(100,2));
CCMoveBy * back = (CCMoveBy *)move->reverse();
CCSequence *seq = (CCSequence *)CCSequence::create(move, back, NULL);
CCSequence *seq = CCSequence::create(move, back, NULL);
l->runAction(CCRepeatForever::create(seq));
this->addChild(l, 0, kLayerIgnoreAnchorPoint);
@ -454,7 +454,7 @@ void LayerIgnoreAnchorPointScale::onEnter()
CCScaleBy *scale = CCScaleBy::create(2, 2);
CCScaleBy* back = (CCScaleBy*)scale->reverse();
CCSequence *seq = (CCSequence*)CCSequence::create(scale, back, NULL);
CCSequence *seq = CCSequence::create(scale, back, NULL);
l->runAction(CCRepeatForever::create(seq));

View File

@ -70,8 +70,8 @@ MenuLayerMainMenu::MenuLayerMainMenu()
CCActionInterval* color_action = CCTintBy::create(0.5f, 0, -255, -255);
CCActionInterval* color_back = color_action->reverse();
CCFiniteTimeAction* seq = CCSequence::create(color_action, color_back, NULL);
item8->runAction(CCRepeatForever::create((CCActionInterval*)seq));
CCSequence* seq = CCSequence::create(color_action, color_back, NULL);
item8->runAction(CCRepeatForever::create(seq));
CCMenu* menu = CCMenu::create( item1, item2, item3, item4, item5, item6, item7, item8, NULL);
menu->alignItemsVertically();
@ -327,10 +327,8 @@ MenuLayer3::MenuLayer3()
item3->setPosition( ccp(s.width/2, s.height/2 - 100) );
CCJumpBy* jump = CCJumpBy::create(3, ccp(400,0), 50, 4);
item2->runAction( CCRepeatForever::create(
(CCActionInterval*)(CCSequence::create( jump, jump->reverse(), NULL))
)
);
item2->runAction( CCRepeatForever::create(CCSequence::create( jump, jump->reverse(), NULL)));
CCActionInterval* spin1 = CCRotateBy::create(3, 360);
CCActionInterval* spin2 = (CCActionInterval*)(spin1->copy()->autorelease());
CCActionInterval* spin3 = (CCActionInterval*)(spin1->copy()->autorelease());
@ -515,7 +513,7 @@ void MenuLayerPriorityTest::disableMenuCallback(CCObject* pSender)
CCDelayTime *wait = CCDelayTime::create(5);
CCCallFunc *enable = CCCallFunc::create(this, callfunc_selector(MenuLayerPriorityTest::enableMenuCallback));
CCFiniteTimeAction* seq = CCSequence::create(wait, enable, NULL);
CCSequence* seq = CCSequence::create(wait, enable, NULL);
m_pMenu1->runAction(seq);
}

View File

@ -43,10 +43,10 @@ void MotionStreakTest1::onEnter()
CCAction* action1 = CCRepeatForever::create(a1);
CCActionInterval* motion = CCMoveBy::create(2, ccp(100,0) );
m_root->runAction( CCRepeatForever::create((CCActionInterval*)(CCSequence::create(motion, motion->reverse(), NULL)) ) );
m_root->runAction( CCRepeatForever::create(CCSequence::create(motion, motion->reverse(), NULL) ) );
m_root->runAction( action1 );
CCActionInterval *colorAction = CCRepeatForever::create((CCActionInterval *)CCSequence::create(
CCActionInterval *colorAction = CCRepeatForever::create(CCSequence::create(
CCTintTo::create(0.2f, 255, 0, 0),
CCTintTo::create(0.2f, 0, 255, 0),
CCTintTo::create(0.2f, 0, 0, 255),

View File

@ -186,15 +186,13 @@ void Test2::onEnter()
CCActionInterval* a1 = CCRotateBy::create(2, 360);
CCActionInterval* a2 = CCScaleBy::create(2, 2);
CCAction* action1 = CCRepeatForever::create(
(CCActionInterval*)(CCSequence::create(a1, a2, a2->reverse(), NULL))
);
CCAction* action1 = CCRepeatForever::create( CCSequence::create(a1, a2, a2->reverse(), NULL) );
CCAction* action2 = CCRepeatForever::create(
(CCActionInterval*)(CCSequence::create(
(CCActionInterval*)(a1->copy()->autorelease()),
(CCActionInterval*)(a2->copy()->autorelease()),
a2->reverse(),
NULL) )
CCSequence::create(
(CCActionInterval*)(a1->copy()->autorelease()),
(CCActionInterval*)(a2->copy()->autorelease()),
a2->reverse(),
NULL)
);
sp2->setAnchorPoint(ccp(0,0));
@ -266,9 +264,7 @@ Test5::Test5()
CCRotateBy* rot = CCRotateBy::create(2, 360);
CCActionInterval* rot_back = rot->reverse();
CCAction* forever = CCRepeatForever::create(
(CCActionInterval*)(CCSequence::create(rot, rot_back, NULL))
);
CCAction* forever = CCRepeatForever::create(CCSequence::create(rot, rot_back, NULL));
CCAction* forever2 = (CCAction*)(forever->copy()->autorelease());
forever->setTag(101);
forever2->setTag(102);
@ -323,8 +319,7 @@ Test6::Test6()
CCActionInterval* rot = CCRotateBy::create(2, 360);
CCActionInterval* rot_back = rot->reverse();
CCAction* forever1 = CCRepeatForever::create(
(CCActionInterval*)(CCSequence::create(rot, rot_back, NULL)));
CCAction* forever1 = CCRepeatForever::create(CCSequence::create(rot, rot_back, NULL));
CCAction* forever11 = (CCAction*)(forever1->copy()->autorelease());
CCAction* forever2 = (CCAction*)(forever1->copy()->autorelease());
@ -437,8 +432,8 @@ StressTest2::StressTest2()
CCActionInterval* move = CCMoveBy::create(3, ccp(350,0));
CCActionInterval* move_ease_inout3 = CCEaseInOut::create((CCActionInterval*)(move->copy()->autorelease()), 2.0f);
CCActionInterval* move_ease_inout_back3 = move_ease_inout3->reverse();
CCFiniteTimeAction* seq3 = CCSequence::create( move_ease_inout3, move_ease_inout_back3, NULL);
sp1->runAction( CCRepeatForever::create((CCActionInterval*)seq3) );
CCSequence* seq3 = CCSequence::create( move_ease_inout3, move_ease_inout_back3, NULL);
sp1->runAction( CCRepeatForever::create(seq3) );
sublayer->addChild(sp1, 1);
CCParticleFire* fire = CCParticleFire::create();
@ -527,8 +522,8 @@ NodeToWorld::NodeToWorld()
CCActionInterval* move = CCMoveBy::create(3, ccp(200,0));
CCActionInterval* move_back = move->reverse();
CCFiniteTimeAction* seq = CCSequence::create( move, move_back, NULL);
CCAction* fe2 = CCRepeatForever::create((CCActionInterval*)seq);
CCSequence* seq = CCSequence::create( move, move_back, NULL);
CCAction* fe2 = CCRepeatForever::create(seq);
back->runAction(fe2);
}

View File

@ -68,8 +68,8 @@ Parallax1::Parallax1()
CCActionInterval* goDown = goUp->reverse();
CCActionInterval* go = CCMoveBy::create(8, ccp(-1000,0) );
CCActionInterval* goBack = go->reverse();
CCFiniteTimeAction* seq = CCSequence::create(goUp, go, goDown, goBack, NULL);
voidNode->runAction( (CCRepeatForever::create((CCActionInterval*) seq) ));
CCSequence* seq = CCSequence::create(goUp, go, goDown, goBack, NULL);
voidNode->runAction( (CCRepeatForever::create(seq) ));
addChild( voidNode );
}

View File

@ -622,8 +622,8 @@ void ParallaxParticle::onEnter()
CCActionInterval* move = CCMoveBy::create(4, ccp(300,0));
CCActionInterval* move_back = move->reverse();
CCFiniteTimeAction* seq = CCSequence::create( move, move_back, NULL);
p->runAction(CCRepeatForever::create((CCActionInterval*)seq));
CCSequence* seq = CCSequence::create( move, move_back, NULL);
p->runAction(CCRepeatForever::create(seq));
}
std::string ParallaxParticle::title()
@ -1117,8 +1117,8 @@ void ParticleDemo::onEnter(void)
CCActionInterval* move = CCMoveBy::create(4, ccp(300,0) );
CCActionInterval* move_back = move->reverse();
CCFiniteTimeAction* seq = CCSequence::create( move, move_back, NULL);
m_background->runAction( CCRepeatForever::create((CCActionInterval*)seq) );
CCSequence* seq = CCSequence::create( move, move_back, NULL);
m_background->runAction( CCRepeatForever::create(seq) );
scheduleUpdate();

View File

@ -416,12 +416,12 @@ void performanceActions(CCSprite* pSprite)
float period = 0.5f + (rand() % 1000) / 500.0f;
CCRotateBy* rot = CCRotateBy::create(period, 360.0f * CCRANDOM_0_1());
CCActionInterval* rot_back = rot->reverse();
CCAction *permanentRotation = CCRepeatForever::create((CCActionInterval *)CCSequence::create(rot, rot_back, NULL));
CCAction *permanentRotation = CCRepeatForever::create(CCSequence::create(rot, rot_back, NULL));
pSprite->runAction(permanentRotation);
float growDuration = 0.5f + (rand() % 1000) / 500.0f;
CCActionInterval *grow = CCScaleBy::create(growDuration, 0.5f, 0.5f);
CCAction *permanentScaleLoop = CCRepeatForever::create((CCActionInterval *)CCSequence::create(grow, grow->reverse(), NULL));
CCAction *permanentScaleLoop = CCRepeatForever::create(CCSequence::create(grow, grow->reverse(), NULL));
pSprite->runAction(permanentScaleLoop);
}
@ -436,7 +436,7 @@ void performanceActions20(CCSprite* pSprite)
float period = 0.5f + (rand() % 1000) / 500.0f;
CCRotateBy* rot = CCRotateBy::create(period, 360.0f * CCRANDOM_0_1());
CCActionInterval* rot_back = rot->reverse();
CCAction *permanentRotation = CCRepeatForever::create((CCActionInterval *)CCSequence::create(rot, rot_back, NULL));
CCAction *permanentRotation = CCRepeatForever::create(CCSequence::create(rot, rot_back, NULL));
pSprite->runAction(permanentRotation);
float growDuration = 0.5f + (rand() % 1000) / 500.0f;

View File

@ -916,8 +916,8 @@ void SchedulerTimeScale::onEnter()
CCActionInterval *rot1 = CCRotateBy::create(4, 360*2);
CCActionInterval *rot2 = rot1->reverse();
CCFiniteTimeAction* seq3_1 = CCSequence::create(jump2, jump1, NULL);
CCFiniteTimeAction* seq3_2 = CCSequence::create(rot1, rot2, NULL);
CCSequence* seq3_1 = CCSequence::create(jump2, jump1, NULL);
CCSequence* seq3_2 = CCSequence::create(rot1, rot2, NULL);
CCFiniteTimeAction* spawn = CCSpawn::create(seq3_1, seq3_2, NULL);
CCRepeat* action = CCRepeat::create(spawn, 50);
@ -1010,8 +1010,8 @@ void TwoSchedulers::onEnter()
CCActionInterval *jump1 = CCJumpBy::create(4, ccp(0,0), 100, 4);
CCActionInterval *jump2 = jump1->reverse();
CCFiniteTimeAction* seq = CCSequence::create(jump2, jump1, NULL);
CCRepeatForever* action = CCRepeatForever::create((CCActionInterval *)seq);
CCSequence* seq = CCSequence::create(jump2, jump1, NULL);
CCRepeatForever* action = CCRepeatForever::create(seq);
//
// Center

View File

@ -1 +1 @@
d5652fa016340526f06bc8b58ec78bef1c779a36
b7746fdbd6cb5580fd339b86c93a81167b14e96c

View File

@ -321,7 +321,7 @@ void TextFieldTTFActionTest::onEnter()
m_nCharLimit = 12;
m_pTextFieldAction = CCRepeatForever::create(
(CCActionInterval*)CCSequence::create(
CCSequence::create(
CCFadeOut::create(0.25),
CCFadeIn::create(0.25),
0

View File

@ -328,8 +328,8 @@ void TextureMipMap::onEnter()
scale2->autorelease();
CCActionInterval* sc_back2 = scale2->reverse();
img0->runAction(CCRepeatForever::create((CCActionInterval*)(CCSequence::create(scale1, sc_back, NULL))));
img1->runAction(CCRepeatForever::create((CCActionInterval*)(CCSequence::create(scale2, sc_back2, NULL))));
img0->runAction(CCRepeatForever::create(CCSequence::create(scale1, sc_back, NULL)));
img1->runAction(CCRepeatForever::create(CCSequence::create(scale2, sc_back2, NULL)));
CCTextureCache::sharedTextureCache()->dumpCachedTextureInfo();
}
@ -379,8 +379,8 @@ void TexturePVRMipMap::onEnter()
scale2->autorelease();
CCActionInterval* sc_back2 = scale2->reverse();
imgMipMap->runAction(CCRepeatForever::create((CCActionInterval*)(CCSequence::create(scale1, sc_back, NULL))));
img->runAction(CCRepeatForever::create((CCActionInterval*)(CCSequence::create(scale2, sc_back2, NULL))));
imgMipMap->runAction(CCRepeatForever::create(CCSequence::create(scale1, sc_back, NULL)));
img->runAction(CCRepeatForever::create(CCSequence::create(scale2, sc_back2, NULL)));
}
CCTextureCache::sharedTextureCache()->dumpCachedTextureInfo();
}
@ -423,8 +423,8 @@ void TexturePVRMipMap2::onEnter()
scale2->autorelease();
CCActionInterval* sc_back2 = scale2->reverse();
imgMipMap->runAction(CCRepeatForever::create((CCActionInterval*)(CCSequence::create(scale1, sc_back, NULL))));
img->runAction(CCRepeatForever::create((CCActionInterval*)(CCSequence::create(scale2, sc_back2, NULL))));
imgMipMap->runAction(CCRepeatForever::create(CCSequence::create(scale1, sc_back, NULL)));
img->runAction(CCRepeatForever::create(CCSequence::create(scale2, sc_back2, NULL)));
CCTextureCache::sharedTextureCache()->dumpCachedTextureInfo();
}
@ -1321,7 +1321,7 @@ void TextureAlias::onEnter()
// scale them to show
CCScaleBy* sc = CCScaleBy::create(3, 8.0f);
CCScaleBy* sc_back = (CCScaleBy*) (sc->reverse());
CCRepeatForever* scaleforever = CCRepeatForever::create((CCActionInterval*) (CCSequence::create(sc, sc_back, NULL)));
CCRepeatForever* scaleforever = CCRepeatForever::create(CCSequence::create(sc, sc_back, NULL));
CCRepeatForever* scaleToo = (CCRepeatForever*) (scaleforever->copy());
scaleToo->autorelease();
@ -1420,8 +1420,8 @@ void TexturePixelFormat::onEnter()
CCFadeOut* fadeout = CCFadeOut::create(2);
CCFadeIn* fadein = CCFadeIn::create(2);
CCFiniteTimeAction* seq = CCSequence::create(CCDelayTime::create(2), fadeout, fadein, NULL);
CCRepeatForever* seq_4ever = CCRepeatForever::create((CCActionInterval*) seq);
CCSequence* seq = CCSequence::create(CCDelayTime::create(2), fadeout, fadein, NULL);
CCRepeatForever* seq_4ever = CCRepeatForever::create(seq);
CCRepeatForever* seq_4ever2 = (CCRepeatForever*) (seq_4ever->copy()); seq_4ever2->autorelease();
CCRepeatForever* seq_4ever3 = (CCRepeatForever*) (seq_4ever->copy()); seq_4ever3->autorelease();
CCRepeatForever* seq_4ever4 = (CCRepeatForever*) (seq_4ever->copy()); seq_4ever4->autorelease();
@ -1516,7 +1516,7 @@ void TextureAsync::onEnter()
CCScaleBy* scale = CCScaleBy::create(0.3f, 2);
CCScaleBy* scale_back = (CCScaleBy*)scale->reverse();
CCSequence* seq = (CCSequence*)CCSequence::create(scale, scale_back, NULL);
CCSequence* seq = CCSequence::create(scale, scale_back, NULL);
label->runAction(CCRepeatForever::create(seq));
scheduleOnce(schedule_selector(TextureAsync::loadImages), 1.0f);
@ -1603,7 +1603,7 @@ void TextureGlClamp::onEnter()
sprite->runAction(rotate);
CCScaleBy* scale = CCScaleBy::create(2, 0.04f);
CCScaleBy* scaleBack = (CCScaleBy*) (scale->reverse());
CCFiniteTimeAction* seq = CCSequence::create(scale, scaleBack, NULL);
CCSequence* seq = CCSequence::create(scale, scaleBack, NULL);
sprite->runAction(seq);
}
@ -1640,7 +1640,7 @@ void TextureGlRepeat::onEnter()
sprite->runAction(rotate);
CCScaleBy* scale = CCScaleBy::create(2, 0.04f);
CCScaleBy* scaleBack = (CCScaleBy*) (scale->reverse());
CCFiniteTimeAction* seq = CCSequence::create(scale, scaleBack, NULL);
CCSequence* seq = CCSequence::create(scale, scaleBack, NULL);
sprite->runAction(seq);
}

View File

@ -35,9 +35,9 @@ TileMapTest::TileMapTest()
CCScaleBy *scale = CCScaleBy::create(4, 0.8f);
CCActionInterval *scaleBack = scale->reverse();
CCFiniteTimeAction* seq = CCSequence::create(scale, scaleBack, NULL);
CCSequence* seq = CCSequence::create(scale, scaleBack, NULL);
map->runAction(CCRepeatForever::create((CCActionInterval *)seq));
map->runAction(CCRepeatForever::create(seq));
}
std::string TileMapTest::title()
@ -339,7 +339,7 @@ TMXReadWriteTest::TMXReadWriteTest()
CCActionInterval* fadein = CCFadeIn::create(2);
CCActionInterval* scaleback = CCScaleTo::create(1, 1);
CCActionInstant* finish = CCCallFuncN::create(this, callfuncN_selector(TMXReadWriteTest::removeSprite));
CCFiniteTimeAction* seq0 = CCSequence::create(move, rotate, scale, opacity, fadein, scaleback, finish, NULL);
CCSequence* seq0 = CCSequence::create(move, rotate, scale, opacity, fadein, scaleback, finish, NULL);
CCActionInterval* seq1 = (CCActionInterval*)(seq0->copy()->autorelease());
CCActionInterval* seq2 = (CCActionInterval*)(seq0->copy()->autorelease());
CCActionInterval* seq3 = (CCActionInterval*)(seq0->copy()->autorelease());
@ -818,8 +818,8 @@ TMXIsoZorder::TMXIsoZorder()
CCActionInterval* move = CCMoveBy::create(10, ccp(300,250));
CCActionInterval* back = move->reverse();
CCFiniteTimeAction* seq = CCSequence::create(move, back,NULL);
m_tamara->runAction( CCRepeatForever::create((CCActionInterval*) seq) );
CCSequence* seq = CCSequence::create(move, back,NULL);
m_tamara->runAction( CCRepeatForever::create(seq) );
schedule( schedule_selector(TMXIsoZorder::repositionSprite) );
}
@ -884,8 +884,8 @@ TMXOrthoZorder::TMXOrthoZorder()
CCActionInterval* move = CCMoveBy::create(10, ccp(400,450));
CCActionInterval* back = move->reverse();
CCFiniteTimeAction* seq = CCSequence::create(move, back,NULL);
m_tamara->runAction( CCRepeatForever::create((CCActionInterval*)seq));
CCSequence* seq = CCSequence::create(move, back,NULL);
m_tamara->runAction( CCRepeatForever::create(seq));
schedule( schedule_selector(TMXOrthoZorder::repositionSprite));
}
@ -946,8 +946,8 @@ TMXIsoVertexZ::TMXIsoVertexZ()
CCActionInterval* move = CCMoveBy::create(10, ccpMult( ccp(300,250), 1/CC_CONTENT_SCALE_FACTOR() ) );
CCActionInterval* back = move->reverse();
CCFiniteTimeAction* seq = CCSequence::create(move, back,NULL);
m_tamara->runAction( CCRepeatForever::create((CCActionInterval*) seq) );
CCSequence* seq = CCSequence::create(move, back,NULL);
m_tamara->runAction( CCRepeatForever::create(seq) );
schedule( schedule_selector(TMXIsoVertexZ::repositionSprite));
@ -1016,8 +1016,8 @@ TMXOrthoVertexZ::TMXOrthoVertexZ()
CCActionInterval* move = CCMoveBy::create(10, ccpMult( ccp(400,450), 1/CC_CONTENT_SCALE_FACTOR()));
CCActionInterval* back = move->reverse();
CCFiniteTimeAction* seq = CCSequence::create(move, back,NULL);
m_tamara->runAction( CCRepeatForever::create((CCActionInterval*)seq));
CCSequence* seq = CCSequence::create(move, back,NULL);
m_tamara->runAction( CCRepeatForever::create(seq));
schedule(schedule_selector(TMXOrthoVertexZ::repositionSprite));