mirror of https://github.com/axmolengine/axmol.git
Merge branch 'gles20' of git://github.com/cocos2d/cocos2d-x into gles20
This commit is contained in:
commit
18f4eb65a5
|
@ -47,8 +47,9 @@ local.properties
|
|||
# Ignore python compiled files
|
||||
*.pyc
|
||||
|
||||
# Ignore files build by airplay
|
||||
# Ignore files build by airplay and marmalade
|
||||
build_*_xcode/
|
||||
build_*_vc10/
|
||||
|
||||
# Ignore files build by xcode
|
||||
*.mode*v*
|
||||
|
|
16
AUTHORS
16
AUTHORS
|
@ -12,6 +12,12 @@ Developers:
|
|||
Rolando Abarca
|
||||
Javascript Binding and testjs
|
||||
|
||||
chenium
|
||||
fix a bug that CCRenderTexture can not work when coming to foreground on Android
|
||||
|
||||
9re(Taro Kobayashi)
|
||||
add Japanese language support
|
||||
|
||||
mingulov
|
||||
improve the speed of accessing to files from apk
|
||||
|
||||
|
@ -36,6 +42,7 @@ Developers:
|
|||
edbartley
|
||||
update MSVS and MAC projects to use project-relative path
|
||||
CCControl* should not respond to touches if the control is not visible
|
||||
Some improvements for CCScrollView and CCTableView.
|
||||
|
||||
Weeds
|
||||
use fontconfig to enhance font rendering on linux
|
||||
|
@ -111,7 +118,7 @@ Developers:
|
|||
|
||||
Mat Hopwood( Marmalade official engineer )
|
||||
Marmalade support for gles20 branch
|
||||
|
||||
|
||||
Carlos Sessa
|
||||
implement the accelerometer module for Android port
|
||||
|
||||
|
@ -149,6 +156,13 @@ Developers:
|
|||
johnangel
|
||||
OpenGL framebuffer access violation fix.
|
||||
|
||||
Peter Farkas (fape)
|
||||
contributes Marmalade port for gles20 branch
|
||||
add Hungarian language support
|
||||
|
||||
Tomoaki Shimizu (tks2shimizu)
|
||||
Adding randomObject to CCDictionary.
|
||||
|
||||
Retired Core Developers:
|
||||
WenSheng Yang
|
||||
Author of windows port, CCTextField,
|
||||
|
|
33
CHANGELOG
33
CHANGELOG
|
@ -1,3 +1,36 @@
|
|||
cocos2d-2.1beta3-x-2.1.0 @Dec.5 2012
|
||||
[all platforms]
|
||||
Bug #1556: set a default texture for CCParticleFire, CCParticleFireworks, etc
|
||||
Feature #1555: update to cocos2d-iphone v2.1 beta3
|
||||
Feature #1564: update tests to cocos2d-iphone v2.1beta3
|
||||
Feature #1572: add sample game WatermelonWithMe
|
||||
Feature #1573: add sample game CocosDragonJS
|
||||
Refactor #1545: remove the usage of NODE_FUNC and CREATE_FUNC
|
||||
Refactor #1565: remove VS2008 support
|
||||
Refactor #1576: update CCBReader to latest version of CocosBuilder
|
||||
Refactor #1589: add CCBReader::setCCBRootPath()
|
||||
[iOS]
|
||||
Bug #1548: update libcurl header files to 7.26.0 on iOS
|
||||
[android]
|
||||
Bug #1551: add error handler when reading image data using libjpeg
|
||||
Refactor #1558: improve the speed of accessing to files from apk
|
||||
[marmalade]
|
||||
Bug #1559: fix a bug that if a file in resource directory doesn't exist, it will not search from root directory
|
||||
Bug #1571: add box2d rope to marmalade project
|
||||
Bug #1590: JPEG and File fixes for marmalade
|
||||
Feature #1557: Marmalade support
|
||||
Refactor #1574: update marmalade languages
|
||||
Refactor #1575: update samples/TestCpp to compatible with marmalade
|
||||
Refactor #1578: create cocos2dx-ext marmalade project
|
||||
Refactor #1591: add TestLua marmalade project
|
||||
[javascript binding]
|
||||
Bug #1577: fix a bug that touch events lost on Win32 when using JSBinding
|
||||
Bug #1586: fix a crash in WatermelonWithMe
|
||||
Bug #1588: rescheduleCallback support for JSBinding
|
||||
Refactor #1570: improve the debugger for JSBinding
|
||||
[lua binding]
|
||||
Bug #1587: remove lua script handler in CCCallFunc's destructor
|
||||
|
||||
cocos2d-2.0-x-2.0.4 @Nov.2 2012
|
||||
[all platforms]
|
||||
Bug #1473: fix a bug that CCScale9Sprite does not support rotated spriteframe in atlas
|
||||
|
|
|
@ -86,10 +86,10 @@ namespace CocosDenshion
|
|||
s_pEngine=0;
|
||||
}
|
||||
|
||||
for( SoundFxMap::iterator it = g_pSoundFxMap->begin(); it!=g_pSoundFxMap->end(); it++ ) {
|
||||
if( it->second.data != 0 ) free( it->second.data ) ;
|
||||
}
|
||||
if( g_pSoundFxMap ) {
|
||||
for( SoundFxMap::iterator it = g_pSoundFxMap->begin(); it!=g_pSoundFxMap->end(); it++ )
|
||||
if( it->second.data != 0 ) free( it->second.data ) ;
|
||||
|
||||
delete g_pSoundFxMap ;
|
||||
g_pSoundFxMap = 0 ;
|
||||
}
|
||||
|
|
|
@ -45,15 +45,17 @@ cd ".\Release.win32\"
|
|||
|
||||
set CC_TEST_BIN=TestCpp.exe
|
||||
|
||||
set CC_TEST_RES=..\samples\TestCpp\Resources\*.*
|
||||
set CC_HELLOWORLD_RES=..\samples\HelloCpp\Resources\*.*
|
||||
set CC_HELLOLUA_RES=..\samples\HelloLua\Resources\*.*
|
||||
set CC_TESTJS_RES=..\samples\TestJavascript\Resources\*.*
|
||||
set CC_TEST_RES=..\samples\TestCpp\Resources
|
||||
set CC_HELLOWORLD_RES=..\samples\HelloCpp\Resources
|
||||
set CC_TESTLUA_RES=..\samples\TestLua\Resources
|
||||
set CC_SIMPLEGAME_RES=..\samples\SimpleGame\Resources
|
||||
set CC_HELLOLUA_RES=..\samples\HelloLua\Resources
|
||||
set CC_JSB_SOURCES=..\scripting\javascript\bindings\js
|
||||
set CC_TESTJS_RES=..\samples\TestJavascript\cocos2d-js-tests\tests
|
||||
set CC_DRAGONJS_RES=..\samples\TestJavascript\cocos2d-js-tests\games\CocosDragonJS\Published files iOS
|
||||
set CC_MOONWARRIORS_RES=..\samples\TestJavascript\cocos2d-js-tests\games\MoonWarriors
|
||||
set CC_WATERMELONWITHME_RES=..\samples\TestJavascript\cocos2d-js-tests\games\WatermelonWithMe
|
||||
|
||||
if not exist "%CC_TEST_BIN%" (
|
||||
echo Can't find the binary "TestCpp.exe", is there build error?
|
||||
goto ERROR
|
||||
)
|
||||
|
||||
echo./*
|
||||
echo.* Run cocos2d-win32 tests.exe and view Cocos2d-x Application Wizard for Visual Studio User Guide.
|
||||
|
@ -62,7 +64,18 @@ echo.
|
|||
xcopy /E /Y /Q "%CC_TEST_RES%" .
|
||||
xcopy /E /Y /Q "%CC_HELLOWORLD_RES%" .
|
||||
xcopy /E /Y /Q "%CC_HELLOLUA_RES%" .
|
||||
xcopy /E /Y /Q "%CC_TESTLUA_RES%" .
|
||||
xcopy /E /Y /Q "%CC_SIMPLEGAME_RES%" .
|
||||
xcopy /E /Y /Q "%CC_JSB_SOURCES%" .
|
||||
xcopy /E /Y /Q "%CC_TESTJS_RES%" .
|
||||
xcopy /E /Y /Q "%CC_MOONWARRIORS_RES%" .
|
||||
xcopy /E /Y /Q "%CC_WATERMELONWITHME_RES%" .
|
||||
xcopy /E /Y /Q "%CC_DRAGONJS_RES%" .
|
||||
|
||||
if not exist "%CC_TEST_BIN%" (
|
||||
echo Can't find the binary "TestCpp.exe", is there build error?
|
||||
goto ERROR
|
||||
)
|
||||
|
||||
call "%CC_TEST_BIN%"
|
||||
start http://www.cocos2d-x.org/projects/cocos2d-x/wiki/Cocos2d-x_Application_Wizard_for_Visual_Studio_User_Guide
|
||||
|
|
|
@ -48,11 +48,6 @@ CCAction::~CCAction()
|
|||
CCLOGINFO("cocos2d: deallocing");
|
||||
}
|
||||
|
||||
CCAction * CCAction::action()
|
||||
{
|
||||
return CCAction::create();
|
||||
}
|
||||
|
||||
CCAction* CCAction::create()
|
||||
{
|
||||
CCAction * pRet = new CCAction();
|
||||
|
@ -129,11 +124,6 @@ CCSpeed::~CCSpeed()
|
|||
CC_SAFE_RELEASE(m_pInnerAction);
|
||||
}
|
||||
|
||||
CCSpeed * CCSpeed::actionWithAction(CCActionInterval *pAction, float fSpeed)
|
||||
{
|
||||
return CCSpeed::create(pAction, fSpeed);
|
||||
}
|
||||
|
||||
CCSpeed* CCSpeed::create(CCActionInterval* pAction, float fSpeed)
|
||||
{
|
||||
CCSpeed *pRet = new CCSpeed();
|
||||
|
@ -221,11 +211,6 @@ CCFollow::~CCFollow()
|
|||
CC_SAFE_RELEASE(m_pobFollowedNode);
|
||||
}
|
||||
|
||||
CCFollow *CCFollow::actionWithTarget(CCNode *pFollowedNode, const CCRect& rect/* = CCRectZero*/)
|
||||
{
|
||||
return CCFollow::create(pFollowedNode, rect);
|
||||
}
|
||||
|
||||
CCFollow* CCFollow::create(CCNode *pFollowedNode, const CCRect& rect/* = CCRectZero*/)
|
||||
{
|
||||
CCFollow *pRet = new CCFollow();
|
||||
|
|
|
@ -97,11 +97,6 @@ public:
|
|||
inline void setTag(int nTag) { m_nTag = nTag; }
|
||||
|
||||
public:
|
||||
/** Allocates and initializes the action
|
||||
@deprecated: Please use create() instead. This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCAction* action();
|
||||
|
||||
/** Create an action */
|
||||
static CCAction* create();
|
||||
protected:
|
||||
|
@ -184,11 +179,6 @@ public:
|
|||
}
|
||||
|
||||
public:
|
||||
/** creates the action
|
||||
@deprecated: Please use create(CCActionInterval* float) instead. This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCSpeed* actionWithAction(CCActionInterval *pAction, float fSpeed);
|
||||
|
||||
/** create the action */
|
||||
static CCSpeed* create(CCActionInterval* pAction, float fSpeed);
|
||||
protected:
|
||||
|
@ -232,11 +222,6 @@ public:
|
|||
virtual void stop(void);
|
||||
|
||||
public:
|
||||
/** creates the action with a set boundary,
|
||||
It will work with no boundary if @param rect is equal to CCRectZero.
|
||||
@deprecated: Please use create(CCNode*, const CCRect&) instead. This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCFollow* actionWithTarget(CCNode *pFollowedNode, const CCRect& rect = CCRectZero);
|
||||
/** creates the action with a set boundary,
|
||||
It will work with no boundary if @param rect is equal to CCRectZero.
|
||||
*/
|
||||
|
|
|
@ -50,10 +50,6 @@ CCActionInterval * CCActionCamera::reverse()
|
|||
//
|
||||
// CCOrbitCamera
|
||||
//
|
||||
CCOrbitCamera * CCOrbitCamera::actionWithDuration(float t, float radius, float deltaRadius, float angleZ, float deltaAngleZ, float angleX, float deltaAngleX)
|
||||
{
|
||||
return CCOrbitCamera::create(t, radius, deltaRadius, angleZ, deltaAngleZ, angleX, deltaAngleX);
|
||||
}
|
||||
|
||||
CCOrbitCamera * CCOrbitCamera::create(float t, float radius, float deltaRadius, float angleZ, float deltaAngleZ, float angleX, float deltaAngleX)
|
||||
{
|
||||
|
|
|
@ -94,10 +94,6 @@ public:
|
|||
, m_fRadDeltaX(0.0)
|
||||
{}
|
||||
~CCOrbitCamera(){}
|
||||
/** creates a CCOrbitCamera action with radius, delta-radius, z, deltaZ, x, deltaX
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCOrbitCamera* actionWithDuration(float t, float radius, float deltaRadius, float angleZ, float deltaAngleZ, float angleX, float deltaAngleX);
|
||||
|
||||
/** creates a CCOrbitCamera action with radius, delta-radius, z, deltaZ, x, deltaX */
|
||||
static CCOrbitCamera* create(float t, float radius, float deltaRadius, float angleZ, float deltaAngleZ, float angleX, float deltaAngleX);
|
||||
|
|
|
@ -44,10 +44,6 @@ NS_CC_BEGIN;
|
|||
/*
|
||||
* Implementation of CCPointArray
|
||||
*/
|
||||
CCPointArray* CCPointArray::arrayWithCapacity(unsigned int capacity)
|
||||
{
|
||||
return CCPointArray::create(capacity);
|
||||
}
|
||||
|
||||
CCPointArray* CCPointArray::create(unsigned int capacity)
|
||||
{
|
||||
|
@ -199,10 +195,6 @@ CCPoint ccCardinalSplineAt(CCPoint &p0, CCPoint &p1, CCPoint &p2, CCPoint &p3, f
|
|||
|
||||
/* Implementation of CCCardinalSplineTo
|
||||
*/
|
||||
CCCardinalSplineTo* CCCardinalSplineTo::actionWithDuration(float duration, cocos2d::CCPointArray *points, float tension)
|
||||
{
|
||||
return CCCardinalSplineTo::create(duration, points, tension);
|
||||
}
|
||||
|
||||
CCCardinalSplineTo* CCCardinalSplineTo::create(float duration, cocos2d::CCPointArray *points, float tension)
|
||||
{
|
||||
|
@ -327,11 +319,6 @@ CCActionInterval* CCCardinalSplineTo::reverse()
|
|||
/* CCCardinalSplineBy
|
||||
*/
|
||||
|
||||
CCCardinalSplineBy* CCCardinalSplineBy::actionWithDuration(float duration, cocos2d::CCPointArray *points, float tension)
|
||||
{
|
||||
return CCCardinalSplineBy::create(duration, points, tension);
|
||||
}
|
||||
|
||||
CCCardinalSplineBy* CCCardinalSplineBy::create(float duration, cocos2d::CCPointArray *points, float tension)
|
||||
{
|
||||
CCCardinalSplineBy *ret = new CCCardinalSplineBy();
|
||||
|
@ -411,10 +398,6 @@ void CCCardinalSplineBy::startWithTarget(cocos2d::CCNode *pTarget)
|
|||
|
||||
/* CCCatmullRomTo
|
||||
*/
|
||||
CCCatmullRomTo* CCCatmullRomTo::actionWithDuration(float dt, cocos2d::CCPointArray *points)
|
||||
{
|
||||
return CCCatmullRomTo::create(dt, points);
|
||||
}
|
||||
|
||||
CCCatmullRomTo* CCCatmullRomTo::create(float dt, cocos2d::CCPointArray *points)
|
||||
{
|
||||
|
@ -446,10 +429,6 @@ bool CCCatmullRomTo::initWithDuration(float dt, cocos2d::CCPointArray *points)
|
|||
|
||||
/* CCCatmullRomBy
|
||||
*/
|
||||
CCCatmullRomBy* CCCatmullRomBy::actionWithDuration(float dt, cocos2d::CCPointArray *points)
|
||||
{
|
||||
return CCCatmullRomBy::create(dt, points);
|
||||
}
|
||||
|
||||
CCCatmullRomBy* CCCatmullRomBy::create(float dt, cocos2d::CCPointArray *points)
|
||||
{
|
||||
|
|
|
@ -55,10 +55,6 @@ NS_CC_BEGIN;
|
|||
class CC_DLL CCPointArray : public CCNode
|
||||
{
|
||||
public:
|
||||
/** creates and initializes a Points array with capacity
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCPointArray* arrayWithCapacity(unsigned int capacity);
|
||||
|
||||
/** creates and initializes a Points array with capacity */
|
||||
static CCPointArray* create(unsigned int capacity);
|
||||
|
@ -114,10 +110,6 @@ private:
|
|||
class CC_DLL CCCardinalSplineTo : public CCActionInterval
|
||||
{
|
||||
public:
|
||||
/** creates an action with a Cardinal Spline array of points and tension
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCCardinalSplineTo* actionWithDuration(float duration, CCPointArray* points, float tension);
|
||||
|
||||
/** creates an action with a Cardinal Spline array of points and tension */
|
||||
static CCCardinalSplineTo* create(float duration, CCPointArray* points, float tension);
|
||||
|
@ -158,10 +150,6 @@ protected:
|
|||
class CC_DLL CCCardinalSplineBy : public CCCardinalSplineTo
|
||||
{
|
||||
public:
|
||||
/** creates an action with a Cardinal Spline array of points and tension
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCCardinalSplineBy* actionWithDuration(float duration, CCPointArray* points, float tension);
|
||||
|
||||
/** creates an action with a Cardinal Spline array of points and tension */
|
||||
static CCCardinalSplineBy* create(float duration, CCPointArray* points, float tension);
|
||||
|
@ -183,10 +171,6 @@ protected:
|
|||
class CC_DLL CCCatmullRomTo : public CCCardinalSplineTo
|
||||
{
|
||||
public:
|
||||
/** creates an action with a Cardinal Spline array of points and tension
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCCatmullRomTo* actionWithDuration(float dt, CCPointArray* points);
|
||||
|
||||
/** creates an action with a Cardinal Spline array of points and tension */
|
||||
static CCCatmullRomTo* create(float dt, CCPointArray* points);
|
||||
|
@ -203,10 +187,6 @@ public:
|
|||
class CC_DLL CCCatmullRomBy : public CCCardinalSplineBy
|
||||
{
|
||||
public:
|
||||
/** creates an action with a Cardinal Spline array of points and tension
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCCatmullRomBy* actionWithDuration(float dt, CCPointArray* points);
|
||||
|
||||
/** creates an action with a Cardinal Spline array of points and tension */
|
||||
static CCCatmullRomBy* create(float dt, CCPointArray* points);
|
||||
|
|
|
@ -42,10 +42,6 @@ NS_CC_BEGIN
|
|||
//
|
||||
// EaseAction
|
||||
//
|
||||
CCActionEase* CCActionEase::actionWithAction(CCActionInterval *pAction)
|
||||
{
|
||||
return CCActionEase::create(pAction);
|
||||
}
|
||||
|
||||
CCActionEase* CCActionEase::create(CCActionInterval *pAction)
|
||||
{
|
||||
|
@ -133,10 +129,6 @@ CCActionInterval* CCActionEase::reverse(void)
|
|||
//
|
||||
// EaseRateAction
|
||||
//
|
||||
CCEaseRateAction* CCEaseRateAction::actionWithAction(CCActionInterval *pAction, float fRate)
|
||||
{
|
||||
return CCEaseRateAction::create(pAction, fRate);
|
||||
}
|
||||
|
||||
CCEaseRateAction* CCEaseRateAction::create(CCActionInterval *pAction, float fRate)
|
||||
{
|
||||
|
@ -200,10 +192,6 @@ CCActionInterval* CCEaseRateAction::reverse(void)
|
|||
//
|
||||
// EeseIn
|
||||
//
|
||||
CCEaseIn* CCEaseIn::actionWithAction(CCActionInterval *pAction, float fRate)
|
||||
{
|
||||
return CCEaseIn::create(pAction, fRate);
|
||||
}
|
||||
|
||||
CCEaseIn* CCEaseIn::create(CCActionInterval *pAction, float fRate)
|
||||
{
|
||||
|
@ -257,11 +245,6 @@ CCActionInterval* CCEaseIn::reverse(void)
|
|||
//
|
||||
// EaseOut
|
||||
//
|
||||
CCEaseOut* CCEaseOut::actionWithAction(CCActionInterval *pAction, float fRate)
|
||||
{
|
||||
return CCEaseOut::create(pAction, fRate);
|
||||
}
|
||||
|
||||
CCEaseOut* CCEaseOut::create(CCActionInterval *pAction, float fRate)
|
||||
{
|
||||
CCEaseOut *pRet = new CCEaseOut();
|
||||
|
@ -314,11 +297,6 @@ CCActionInterval* CCEaseOut::reverse()
|
|||
//
|
||||
// EaseInOut
|
||||
//
|
||||
CCEaseInOut* CCEaseInOut::actionWithAction(CCActionInterval *pAction, float fRate)
|
||||
{
|
||||
return CCEaseInOut::create(pAction, fRate);
|
||||
}
|
||||
|
||||
CCEaseInOut* CCEaseInOut::create(CCActionInterval *pAction, float fRate)
|
||||
{
|
||||
CCEaseInOut *pRet = new CCEaseInOut();
|
||||
|
@ -380,11 +358,6 @@ CCActionInterval* CCEaseInOut::reverse(void)
|
|||
//
|
||||
// EaseExponentialIn
|
||||
//
|
||||
CCEaseExponentialIn* CCEaseExponentialIn::actionWithAction(CCActionInterval* pAction)
|
||||
{
|
||||
return CCEaseExponentialIn::create(pAction);
|
||||
}
|
||||
|
||||
CCEaseExponentialIn* CCEaseExponentialIn::create(CCActionInterval* pAction)
|
||||
{
|
||||
CCEaseExponentialIn *pRet = new CCEaseExponentialIn();
|
||||
|
@ -437,11 +410,6 @@ CCActionInterval* CCEaseExponentialIn::reverse(void)
|
|||
//
|
||||
// EaseExponentialOut
|
||||
//
|
||||
CCEaseExponentialOut* CCEaseExponentialOut::actionWithAction(CCActionInterval* pAction)
|
||||
{
|
||||
return CCEaseExponentialOut::create(pAction);
|
||||
}
|
||||
|
||||
CCEaseExponentialOut* CCEaseExponentialOut::create(CCActionInterval* pAction)
|
||||
{
|
||||
CCEaseExponentialOut *pRet = new CCEaseExponentialOut();
|
||||
|
@ -494,10 +462,6 @@ CCActionInterval* CCEaseExponentialOut::reverse(void)
|
|||
//
|
||||
// EaseExponentialInOut
|
||||
//
|
||||
CCEaseExponentialInOut* CCEaseExponentialInOut::actionWithAction(CCActionInterval *pAction)
|
||||
{
|
||||
return CCEaseExponentialInOut::create(pAction);
|
||||
}
|
||||
|
||||
CCEaseExponentialInOut* CCEaseExponentialInOut::create(CCActionInterval *pAction)
|
||||
{
|
||||
|
@ -561,10 +525,6 @@ CCActionInterval* CCEaseExponentialInOut::reverse()
|
|||
//
|
||||
// EaseSineIn
|
||||
//
|
||||
CCEaseSineIn* CCEaseSineIn::actionWithAction(CCActionInterval* pAction)
|
||||
{
|
||||
return CCEaseSineIn::create(pAction);
|
||||
}
|
||||
|
||||
CCEaseSineIn* CCEaseSineIn::create(CCActionInterval* pAction)
|
||||
{
|
||||
|
@ -618,10 +578,6 @@ CCActionInterval* CCEaseSineIn::reverse(void)
|
|||
//
|
||||
// EaseSineOut
|
||||
//
|
||||
CCEaseSineOut* CCEaseSineOut::actionWithAction(CCActionInterval* pAction)
|
||||
{
|
||||
return CCEaseSineOut::create(pAction);
|
||||
}
|
||||
|
||||
CCEaseSineOut* CCEaseSineOut::create(CCActionInterval* pAction)
|
||||
{
|
||||
|
@ -675,10 +631,6 @@ CCActionInterval* CCEaseSineOut::reverse(void)
|
|||
//
|
||||
// EaseSineInOut
|
||||
//
|
||||
CCEaseSineInOut* CCEaseSineInOut::actionWithAction(CCActionInterval* pAction)
|
||||
{
|
||||
return CCEaseSineInOut::create(pAction);
|
||||
}
|
||||
|
||||
CCEaseSineInOut* CCEaseSineInOut::create(CCActionInterval* pAction)
|
||||
{
|
||||
|
@ -733,11 +685,6 @@ CCActionInterval* CCEaseSineInOut::reverse()
|
|||
// EaseElastic
|
||||
//
|
||||
|
||||
CCEaseElastic* CCEaseElastic::actionWithAction(CCActionInterval *pAction, float fPeriod/* = 0.3f*/)
|
||||
{
|
||||
return CCEaseElastic::create(pAction, fPeriod);
|
||||
}
|
||||
|
||||
CCEaseElastic* CCEaseElastic::create(CCActionInterval *pAction)
|
||||
{
|
||||
return CCEaseElastic::create(pAction, 0.3f);
|
||||
|
@ -803,10 +750,6 @@ CCActionInterval* CCEaseElastic::reverse(void)
|
|||
//
|
||||
// EaseElasticIn
|
||||
//
|
||||
CCEaseElasticIn* CCEaseElasticIn::actionWithAction(CCActionInterval *pAction, float fPeriod/* = 0.3f*/)
|
||||
{
|
||||
return CCEaseElasticIn::create(pAction, fPeriod);
|
||||
}
|
||||
|
||||
CCEaseElasticIn* CCEaseElasticIn::create(CCActionInterval *pAction)
|
||||
{
|
||||
|
@ -878,11 +821,6 @@ CCActionInterval* CCEaseElasticIn::reverse(void)
|
|||
// EaseElasticOut
|
||||
//
|
||||
|
||||
CCEaseElasticOut* CCEaseElasticOut::actionWithAction(CCActionInterval *pAction, float fPeriod/* = 0.3f*/)
|
||||
{
|
||||
return CCEaseElasticOut::create(pAction, fPeriod);
|
||||
}
|
||||
|
||||
CCEaseElasticOut* CCEaseElasticOut::create(CCActionInterval *pAction)
|
||||
{
|
||||
return CCEaseElasticOut::create(pAction, 0.3f);
|
||||
|
@ -952,11 +890,6 @@ CCActionInterval* CCEaseElasticOut::reverse(void)
|
|||
// EaseElasticInOut
|
||||
//
|
||||
|
||||
CCEaseElasticInOut* CCEaseElasticInOut::actionWithAction(CCActionInterval *pAction, float fPeriod/* = 0.3f*/)
|
||||
{
|
||||
return CCEaseElasticInOut::create(pAction, fPeriod);
|
||||
}
|
||||
|
||||
CCEaseElasticInOut* CCEaseElasticInOut::create(CCActionInterval *pAction)
|
||||
{
|
||||
return CCEaseElasticInOut::create(pAction, 0.3f);
|
||||
|
@ -1041,10 +974,6 @@ CCActionInterval* CCEaseElasticInOut::reverse(void)
|
|||
//
|
||||
// EaseBounce
|
||||
//
|
||||
CCEaseBounce* CCEaseBounce::actionWithAction(CCActionInterval* pAction)
|
||||
{
|
||||
return CCEaseBounce::create(pAction);
|
||||
}
|
||||
|
||||
CCEaseBounce* CCEaseBounce::create(CCActionInterval* pAction)
|
||||
{
|
||||
|
@ -1114,10 +1043,6 @@ CCActionInterval* CCEaseBounce::reverse()
|
|||
//
|
||||
// EaseBounceIn
|
||||
//
|
||||
CCEaseBounceIn* CCEaseBounceIn::actionWithAction(CCActionInterval* pAction)
|
||||
{
|
||||
return CCEaseBounceIn::create(pAction);
|
||||
}
|
||||
|
||||
CCEaseBounceIn* CCEaseBounceIn::create(CCActionInterval* pAction)
|
||||
{
|
||||
|
@ -1172,10 +1097,6 @@ CCActionInterval* CCEaseBounceIn::reverse(void)
|
|||
//
|
||||
// EaseBounceOut
|
||||
//
|
||||
CCEaseBounceOut* CCEaseBounceOut::actionWithAction(CCActionInterval* pAction)
|
||||
{
|
||||
return CCEaseBounceOut::create(pAction);
|
||||
}
|
||||
|
||||
CCEaseBounceOut* CCEaseBounceOut::create(CCActionInterval* pAction)
|
||||
{
|
||||
|
@ -1230,10 +1151,6 @@ CCActionInterval* CCEaseBounceOut::reverse(void)
|
|||
//
|
||||
// EaseBounceInOut
|
||||
//
|
||||
CCEaseBounceInOut* CCEaseBounceInOut::actionWithAction(CCActionInterval* pAction)
|
||||
{
|
||||
return CCEaseBounceInOut::create(pAction);
|
||||
}
|
||||
|
||||
CCEaseBounceInOut* CCEaseBounceInOut::create(CCActionInterval* pAction)
|
||||
{
|
||||
|
@ -1298,10 +1215,6 @@ CCActionInterval* CCEaseBounceInOut::reverse()
|
|||
//
|
||||
// EaseBackIn
|
||||
//
|
||||
CCEaseBackIn* CCEaseBackIn::actionWithAction(CCActionInterval *pAction)
|
||||
{
|
||||
return CCEaseBackIn::create(pAction);
|
||||
}
|
||||
|
||||
CCEaseBackIn* CCEaseBackIn::create(CCActionInterval *pAction)
|
||||
{
|
||||
|
@ -1356,10 +1269,6 @@ CCActionInterval* CCEaseBackIn::reverse(void)
|
|||
//
|
||||
// EaseBackOut
|
||||
//
|
||||
CCEaseBackOut* CCEaseBackOut::actionWithAction(CCActionInterval* pAction)
|
||||
{
|
||||
return CCEaseBackOut::create(pAction);
|
||||
}
|
||||
|
||||
CCEaseBackOut* CCEaseBackOut::create(CCActionInterval* pAction)
|
||||
{
|
||||
|
@ -1416,10 +1325,6 @@ CCActionInterval* CCEaseBackOut::reverse(void)
|
|||
//
|
||||
// EaseBackInOut
|
||||
//
|
||||
CCEaseBackInOut* CCEaseBackInOut::actionWithAction(CCActionInterval* pAction)
|
||||
{
|
||||
return CCEaseBackInOut::create(pAction);
|
||||
}
|
||||
|
||||
CCEaseBackInOut* CCEaseBackInOut::create(CCActionInterval* pAction)
|
||||
{
|
||||
|
|
|
@ -57,10 +57,6 @@ public:
|
|||
virtual CCActionInterval* reverse(void);
|
||||
|
||||
public:
|
||||
/** creates the action
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCActionEase* actionWithAction(CCActionInterval *pAction);
|
||||
|
||||
/** creates the action */
|
||||
static CCActionEase* create(CCActionInterval *pAction);
|
||||
|
@ -90,10 +86,6 @@ public:
|
|||
virtual CCActionInterval* reverse(void);
|
||||
|
||||
public:
|
||||
/** Creates the action with the inner action and the rate parameter
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCEaseRateAction* actionWithAction(CCActionInterval* pAction, float fRate);
|
||||
|
||||
/** Creates the action with the inner action and the rate parameter */
|
||||
static CCEaseRateAction* create(CCActionInterval* pAction, float fRate);
|
||||
|
@ -113,10 +105,6 @@ public:
|
|||
virtual CCActionInterval* reverse(void);
|
||||
virtual CCObject* copyWithZone(CCZone* pZone);
|
||||
public:
|
||||
/** Creates the action with the inner action and the rate parameter
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCEaseIn* actionWithAction(CCActionInterval* pAction, float fRate);
|
||||
|
||||
/** Creates the action with the inner action and the rate parameter */
|
||||
static CCEaseIn* create(CCActionInterval* pAction, float fRate);
|
||||
|
@ -134,10 +122,6 @@ public:
|
|||
virtual CCObject* copyWithZone(CCZone* pZone);
|
||||
|
||||
public:
|
||||
/** Creates the action with the inner action and the rate parameter
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCEaseOut* actionWithAction(CCActionInterval* pAction, float fRate);
|
||||
|
||||
/** Creates the action with the inner action and the rate parameter */
|
||||
static CCEaseOut* create(CCActionInterval* pAction, float fRate);
|
||||
|
@ -155,10 +139,6 @@ public:
|
|||
virtual CCActionInterval* reverse(void);
|
||||
|
||||
public:
|
||||
/** Creates the action with the inner action and the rate parameter
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCEaseInOut* actionWithAction(CCActionInterval* pAction, float fRate);
|
||||
|
||||
/** Creates the action with the inner action and the rate parameter */
|
||||
static CCEaseInOut* create(CCActionInterval* pAction, float fRate);
|
||||
|
@ -176,10 +156,6 @@ public:
|
|||
virtual CCObject* copyWithZone(CCZone* pZone);
|
||||
|
||||
public:
|
||||
/** creates the action
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCEaseExponentialIn* actionWithAction(CCActionInterval* pAction);
|
||||
/** creates the action */
|
||||
static CCEaseExponentialIn* create(CCActionInterval* pAction);
|
||||
};
|
||||
|
@ -196,10 +172,6 @@ public:
|
|||
virtual CCObject* copyWithZone(CCZone* pZone);
|
||||
|
||||
public:
|
||||
/** creates the action
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCEaseExponentialOut* actionWithAction(CCActionInterval* pAction);
|
||||
/** creates the action */
|
||||
static CCEaseExponentialOut* create(CCActionInterval* pAction);
|
||||
};
|
||||
|
@ -216,10 +188,6 @@ public:
|
|||
virtual CCActionInterval* reverse();
|
||||
|
||||
public:
|
||||
/** creates the action
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCEaseExponentialInOut* actionWithAction(CCActionInterval* pAction);
|
||||
|
||||
/** creates the action */
|
||||
static CCEaseExponentialInOut* create(CCActionInterval* pAction);
|
||||
|
@ -237,10 +205,6 @@ public:
|
|||
virtual CCObject* copyWithZone(CCZone* pZone);
|
||||
|
||||
public:
|
||||
/** creates the action
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCEaseSineIn* actionWithAction(CCActionInterval* pAction);
|
||||
/** creates the action */
|
||||
static CCEaseSineIn* create(CCActionInterval* pAction);
|
||||
};
|
||||
|
@ -257,10 +221,7 @@ public:
|
|||
virtual CCObject* copyWithZone(CCZone* pZone);
|
||||
|
||||
public:
|
||||
/** creates the action
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCEaseSineOut* actionWithAction(CCActionInterval* pAction);
|
||||
|
||||
/** creates the action */
|
||||
static CCEaseSineOut* create(CCActionInterval* pAction);
|
||||
};
|
||||
|
@ -277,10 +238,7 @@ public:
|
|||
virtual CCActionInterval* reverse();
|
||||
|
||||
public:
|
||||
/** creates the action
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCEaseSineInOut* actionWithAction(CCActionInterval* pAction);
|
||||
|
||||
/** creates the action */
|
||||
static CCEaseSineInOut* create(CCActionInterval* pAction);
|
||||
};
|
||||
|
@ -305,10 +263,7 @@ public:
|
|||
virtual CCObject* copyWithZone(CCZone* pZone);
|
||||
|
||||
public:
|
||||
/** Creates the action with the inner action and the period in radians (default is 0.3)
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCEaseElastic* actionWithAction(CCActionInterval *pAction, float fPeriod = 0.3f);
|
||||
|
||||
/** Creates the action with the inner action and the period in radians (default is 0.3) */
|
||||
static CCEaseElastic* create(CCActionInterval *pAction, float fPeriod);
|
||||
static CCEaseElastic* create(CCActionInterval *pAction);
|
||||
|
@ -330,10 +285,7 @@ public:
|
|||
virtual CCObject* copyWithZone(CCZone* pZone);
|
||||
|
||||
public:
|
||||
/** Creates the action with the inner action and the period in radians (default is 0.3)
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCEaseElasticIn* actionWithAction(CCActionInterval *pAction, float fPeriod = 0.3f);
|
||||
|
||||
/** Creates the action with the inner action and the period in radians (default is 0.3) */
|
||||
static CCEaseElasticIn* create(CCActionInterval *pAction, float fPeriod);
|
||||
static CCEaseElasticIn* create(CCActionInterval *pAction);
|
||||
|
@ -353,10 +305,6 @@ public:
|
|||
virtual CCObject* copyWithZone(CCZone* pZone);
|
||||
|
||||
public:
|
||||
/** Creates the action with the inner action and the period in radians (default is 0.3)
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCEaseElasticOut* actionWithAction(CCActionInterval *pAction, float fPeriod = 0.3f);
|
||||
|
||||
/** Creates the action with the inner action and the period in radians (default is 0.3) */
|
||||
static CCEaseElasticOut* create(CCActionInterval *pAction, float fPeriod);
|
||||
|
@ -377,10 +325,6 @@ public:
|
|||
virtual CCObject* copyWithZone(CCZone* pZone);
|
||||
|
||||
public:
|
||||
/** Creates the action with the inner action and the period in radians (default is 0.3)
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCEaseElasticInOut* actionWithAction(CCActionInterval *pAction, float fPeriod = 0.3f);
|
||||
|
||||
/** Creates the action with the inner action and the period in radians (default is 0.3) */
|
||||
static CCEaseElasticInOut* create(CCActionInterval *pAction, float fPeriod);
|
||||
|
@ -400,10 +344,7 @@ public:
|
|||
virtual CCActionInterval* reverse();
|
||||
|
||||
public:
|
||||
/** creates the action
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCEaseBounce* actionWithAction(CCActionInterval* pAction);
|
||||
|
||||
/** creates the action */
|
||||
static CCEaseBounce* create(CCActionInterval* pAction);
|
||||
};
|
||||
|
@ -422,10 +363,7 @@ public:
|
|||
virtual CCObject* copyWithZone(CCZone* pZone);
|
||||
|
||||
public:
|
||||
/** creates the action
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCEaseBounceIn* actionWithAction(CCActionInterval* pAction);
|
||||
|
||||
/** creates the action */
|
||||
static CCEaseBounceIn* create(CCActionInterval* pAction);
|
||||
};
|
||||
|
@ -444,10 +382,7 @@ public:
|
|||
virtual CCObject* copyWithZone(CCZone* pZone);
|
||||
|
||||
public:
|
||||
/** creates the action
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCEaseBounceOut* actionWithAction(CCActionInterval* pAction);
|
||||
|
||||
/** creates the action */
|
||||
static CCEaseBounceOut* create(CCActionInterval* pAction);
|
||||
};
|
||||
|
@ -466,10 +401,7 @@ public:
|
|||
virtual CCActionInterval* reverse();
|
||||
|
||||
public:
|
||||
/** creates the action
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCEaseBounceInOut* actionWithAction(CCActionInterval* pAction);
|
||||
|
||||
/** creates the action */
|
||||
static CCEaseBounceInOut* create(CCActionInterval* pAction);
|
||||
};
|
||||
|
@ -488,10 +420,7 @@ public:
|
|||
virtual CCObject* copyWithZone(CCZone* pZone);
|
||||
|
||||
public:
|
||||
/** creates the action
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCEaseBackIn* actionWithAction(CCActionInterval* pAction);
|
||||
|
||||
/** creates the action */
|
||||
static CCEaseBackIn* create(CCActionInterval* pAction);
|
||||
};
|
||||
|
@ -510,10 +439,7 @@ public:
|
|||
virtual CCObject* copyWithZone(CCZone* pZone);
|
||||
|
||||
public:
|
||||
/** creates the action
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCEaseBackOut* actionWithAction(CCActionInterval* pAction);
|
||||
|
||||
/** creates the action */
|
||||
static CCEaseBackOut* create(CCActionInterval* pAction);
|
||||
};
|
||||
|
@ -532,10 +458,7 @@ public:
|
|||
virtual CCActionInterval* reverse();
|
||||
|
||||
public:
|
||||
/** creates the action
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCEaseBackInOut* actionWithAction(CCActionInterval* pAction);
|
||||
|
||||
/** creates the action */
|
||||
static CCEaseBackInOut* create(CCActionInterval* pAction);
|
||||
};
|
||||
|
|
|
@ -30,11 +30,6 @@ THE SOFTWARE.
|
|||
NS_CC_BEGIN
|
||||
// implementation of CCGridAction
|
||||
|
||||
CCGridAction* CCGridAction::actionWithSize(const ccGridSize& gridSize, float duration)
|
||||
{
|
||||
return CCGridAction::create(gridSize, duration);
|
||||
}
|
||||
|
||||
CCGridAction* CCGridAction::create(const ccGridSize& gridSize, float duration)
|
||||
{
|
||||
CCGridAction *pAction = new CCGridAction();
|
||||
|
@ -186,11 +181,6 @@ void CCTiledGrid3DAction::setTile(const ccGridSize& pos, const ccQuad3& coords)
|
|||
|
||||
// implementation CCAccelDeccelAmplitude
|
||||
|
||||
CCAccelDeccelAmplitude* CCAccelDeccelAmplitude::actionWithAction(CCAction *pAction, float duration)
|
||||
{
|
||||
return CCAccelDeccelAmplitude::create(pAction, duration);
|
||||
}
|
||||
|
||||
CCAccelDeccelAmplitude* CCAccelDeccelAmplitude::create(CCAction *pAction, float duration)
|
||||
{
|
||||
CCAccelDeccelAmplitude *pRet = new CCAccelDeccelAmplitude();
|
||||
|
@ -254,11 +244,6 @@ CCActionInterval* CCAccelDeccelAmplitude::reverse(void)
|
|||
|
||||
// implementation of AccelAmplitude
|
||||
|
||||
CCAccelAmplitude* CCAccelAmplitude::actionWithAction(CCAction *pAction, float duration)
|
||||
{
|
||||
return CCAccelAmplitude::create(pAction, duration);
|
||||
}
|
||||
|
||||
CCAccelAmplitude* CCAccelAmplitude::create(CCAction *pAction, float duration)
|
||||
{
|
||||
CCAccelAmplitude *pRet = new CCAccelAmplitude();
|
||||
|
@ -315,11 +300,6 @@ CCActionInterval* CCAccelAmplitude::reverse(void)
|
|||
|
||||
// DeccelAmplitude
|
||||
|
||||
CCDeccelAmplitude* CCDeccelAmplitude::actionWithAction(CCAction *pAction, float duration)
|
||||
{
|
||||
return CCDeccelAmplitude::create(pAction, duration);
|
||||
}
|
||||
|
||||
CCDeccelAmplitude* CCDeccelAmplitude::create(CCAction *pAction, float duration)
|
||||
{
|
||||
CCDeccelAmplitude *pRet = new CCDeccelAmplitude();
|
||||
|
@ -388,11 +368,6 @@ void CCStopGrid::startWithTarget(CCNode *pTarget)
|
|||
}
|
||||
}
|
||||
|
||||
CCStopGrid* CCStopGrid::action(void)
|
||||
{
|
||||
return CCStopGrid::create();
|
||||
}
|
||||
|
||||
CCStopGrid* CCStopGrid::create(void)
|
||||
{
|
||||
CCStopGrid* pAction = new CCStopGrid();
|
||||
|
@ -402,11 +377,6 @@ CCStopGrid* CCStopGrid::create(void)
|
|||
}
|
||||
// implementation of CCReuseGrid
|
||||
|
||||
CCReuseGrid* CCReuseGrid::actionWithTimes(int times)
|
||||
{
|
||||
return CCReuseGrid::create(times);
|
||||
}
|
||||
|
||||
CCReuseGrid* CCReuseGrid::create(int times)
|
||||
{
|
||||
CCReuseGrid *pAction = new CCReuseGrid();
|
||||
|
|
|
@ -51,10 +51,6 @@ public:
|
|||
virtual CCGridBase* getGrid(void);
|
||||
|
||||
public:
|
||||
/** creates the action with size and duration
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCGridAction* actionWithSize(const ccGridSize& gridSize, float duration);
|
||||
/** creates the action with size and duration */
|
||||
static CCGridAction* create(const ccGridSize& gridSize, float duration);
|
||||
protected:
|
||||
|
@ -78,10 +74,6 @@ public:
|
|||
void setVertex(const ccGridSize& pos, const ccVertex3F& vertex);
|
||||
|
||||
public:
|
||||
/** creates the action with size and duration
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCGrid3DAction* actionWithSize(const ccGridSize& gridSize, float duration);
|
||||
/** creates the action with size and duration */
|
||||
static CCGrid3DAction* create(const ccGridSize& gridSize, float duration);
|
||||
};
|
||||
|
@ -101,10 +93,6 @@ public:
|
|||
virtual CCGridBase* getGrid(void);
|
||||
|
||||
public:
|
||||
/** creates the action with size and duration
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCTiledGrid3DAction* actionWithSize(const ccGridSize& gridSize, float duration);
|
||||
/** creates the action with size and duration */
|
||||
static CCTiledGrid3DAction* create(const ccGridSize& gridSize, float duration);
|
||||
};
|
||||
|
@ -127,10 +115,6 @@ public:
|
|||
inline void setRate(float fRate) { m_fRate = fRate; }
|
||||
|
||||
public:
|
||||
/** creates the action with an inner action that has the amplitude property, and a duration time
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCAccelDeccelAmplitude* actionWithAction(CCAction *pAction, float duration);
|
||||
/** creates the action with an inner action that has the amplitude property, and a duration time */
|
||||
static CCAccelDeccelAmplitude* create(CCAction *pAction, float duration);
|
||||
|
||||
|
@ -157,10 +141,6 @@ public:
|
|||
virtual CCActionInterval* reverse(void);
|
||||
|
||||
public:
|
||||
/** creates the action with an inner action that has the amplitude property, and a duration time
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCAccelAmplitude* actionWithAction(CCAction *pAction, float duration);
|
||||
/** creates the action with an inner action that has the amplitude property, and a duration time */
|
||||
static CCAccelAmplitude* create(CCAction *pAction, float duration);
|
||||
protected:
|
||||
|
@ -186,10 +166,6 @@ public:
|
|||
virtual CCActionInterval* reverse(void);
|
||||
|
||||
public:
|
||||
/** creates the action with an inner action that has the amplitude property, and a duration time
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCDeccelAmplitude* actionWithAction(CCAction *pAction, float duration);
|
||||
/** creates the action with an inner action that has the amplitude property, and a duration time */
|
||||
static CCDeccelAmplitude* create(CCAction *pAction, float duration);
|
||||
|
||||
|
@ -209,10 +185,6 @@ public:
|
|||
virtual void startWithTarget(CCNode *pTarget);
|
||||
|
||||
public:
|
||||
/** Allocates and initializes the action
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCStopGrid* action(void);
|
||||
/** Allocates and initializes the action */
|
||||
static CCStopGrid* create(void);
|
||||
};
|
||||
|
@ -227,10 +199,6 @@ public:
|
|||
virtual void startWithTarget(CCNode *pTarget);
|
||||
|
||||
public:
|
||||
/** creates an action with the number of times that the current grid will be reused
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCReuseGrid* actionWithTimes(int times);
|
||||
/** creates an action with the number of times that the current grid will be reused */
|
||||
static CCReuseGrid* create(int times);
|
||||
protected:
|
||||
|
|
|
@ -31,11 +31,6 @@ THE SOFTWARE.
|
|||
NS_CC_BEGIN
|
||||
// implementation of CCWaves3D
|
||||
|
||||
CCWaves3D* CCWaves3D::actionWithWaves(int wav, float amp, const ccGridSize& gridSize, float duration)
|
||||
{
|
||||
return CCWaves3D::create(wav, amp, gridSize, duration);
|
||||
}
|
||||
|
||||
CCWaves3D* CCWaves3D::create(int wav, float amp, const ccGridSize& gridSize, float duration)
|
||||
{
|
||||
CCWaves3D *pAction = new CCWaves3D();
|
||||
|
@ -110,11 +105,6 @@ void CCWaves3D::update(float time)
|
|||
|
||||
// implementation of CCFlipX3D
|
||||
|
||||
CCFlipX3D* CCFlipX3D::actionWithDuration(float duration)
|
||||
{
|
||||
return CCFlipX3D::create(duration);
|
||||
}
|
||||
|
||||
CCFlipX3D* CCFlipX3D::create(float duration)
|
||||
{
|
||||
CCFlipX3D *pAction = new CCFlipX3D();
|
||||
|
@ -241,11 +231,6 @@ void CCFlipX3D::update(float time)
|
|||
|
||||
// implementation of FlipY3D
|
||||
|
||||
CCFlipY3D* CCFlipY3D::actionWithDuration(float duration)
|
||||
{
|
||||
return CCFlipY3D::create(duration);
|
||||
}
|
||||
|
||||
CCFlipY3D* CCFlipY3D::create(float duration)
|
||||
{
|
||||
CCFlipY3D *pAction = new CCFlipY3D();
|
||||
|
@ -355,11 +340,6 @@ void CCFlipY3D::update(float time)
|
|||
|
||||
// implementation of Lens3D
|
||||
|
||||
CCLens3D* CCLens3D::actionWithPosition(const CCPoint& pos, float r, const ccGridSize& gridSize, float duration)
|
||||
{
|
||||
return CCLens3D::create(pos, r, gridSize, duration);
|
||||
}
|
||||
|
||||
CCLens3D* CCLens3D::create(const CCPoint& pos, float r, const ccGridSize& gridSize, float duration)
|
||||
{
|
||||
CCLens3D *pAction = new CCLens3D();
|
||||
|
@ -472,11 +452,6 @@ void CCLens3D::update(float time)
|
|||
|
||||
// implementation of Ripple3D
|
||||
|
||||
CCRipple3D* CCRipple3D::actionWithPosition(const CCPoint& pos, float r, int wav, float amp, const ccGridSize& gridSize, float duration)
|
||||
{
|
||||
return CCRipple3D::create(pos, r, wav, amp, gridSize, duration);
|
||||
}
|
||||
|
||||
CCRipple3D* CCRipple3D::create(const CCPoint& pos, float r, int wav, float amp, const ccGridSize& gridSize, float duration)
|
||||
{
|
||||
CCRipple3D *pAction = new CCRipple3D();
|
||||
|
@ -566,11 +541,6 @@ void CCRipple3D::update(float time)
|
|||
|
||||
// implementation of Shaky3D
|
||||
|
||||
CCShaky3D* CCShaky3D::actionWithRange(int range, bool shakeZ, const ccGridSize& gridSize, float duration)
|
||||
{
|
||||
return CCShaky3D::create(range, shakeZ, gridSize, duration);
|
||||
}
|
||||
|
||||
CCShaky3D* CCShaky3D::create(int range, bool shakeZ, const ccGridSize& gridSize, float duration)
|
||||
{
|
||||
CCShaky3D *pAction = new CCShaky3D();
|
||||
|
@ -650,11 +620,6 @@ void CCShaky3D::update(float time)
|
|||
|
||||
// implementation of Liquid
|
||||
|
||||
CCLiquid* CCLiquid::actionWithWaves(int wav, float amp, const ccGridSize& gridSize, float duration)
|
||||
{
|
||||
return CCLiquid::create(wav, amp, gridSize, duration);
|
||||
}
|
||||
|
||||
CCLiquid* CCLiquid::create(int wav, float amp, const ccGridSize& gridSize, float duration)
|
||||
{
|
||||
CCLiquid *pAction = new CCLiquid();
|
||||
|
@ -729,11 +694,6 @@ void CCLiquid::update(float time)
|
|||
|
||||
// implementation of Waves
|
||||
|
||||
CCWaves* CCWaves::actionWithWaves(int wav, float amp, bool h, bool v, const ccGridSize& gridSize, float duration)
|
||||
{
|
||||
return CCWaves::create(wav, amp, h, v, gridSize, duration);
|
||||
}
|
||||
|
||||
CCWaves* CCWaves::create(int wav, float amp, bool h, bool v, const ccGridSize& gridSize, float duration)
|
||||
{
|
||||
CCWaves *pAction = new CCWaves();
|
||||
|
@ -819,11 +779,6 @@ void CCWaves::update(float time)
|
|||
|
||||
// implementation of Twirl
|
||||
|
||||
CCTwirl* CCTwirl::actionWithPosition(CCPoint pos, int t, float amp, const ccGridSize& gridSize, float duration)
|
||||
{
|
||||
return CCTwirl::create(pos, t, amp, gridSize, duration);
|
||||
}
|
||||
|
||||
CCTwirl* CCTwirl::create(CCPoint pos, int t, float amp, const ccGridSize& gridSize, float duration)
|
||||
{
|
||||
CCTwirl *pAction = new CCTwirl();
|
||||
|
|
|
@ -53,10 +53,6 @@ public:
|
|||
virtual void update(float time);
|
||||
|
||||
public:
|
||||
/** create the action
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCWaves3D* actionWithWaves(int wav, float amp, const ccGridSize& gridSize, float duration);
|
||||
/** create the action */
|
||||
static CCWaves3D* create(int wav, float amp, const ccGridSize& gridSize, float duration);
|
||||
protected:
|
||||
|
@ -76,10 +72,6 @@ public:
|
|||
virtual void update(float time);
|
||||
|
||||
public:
|
||||
/** creates the action with duration
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCFlipX3D* actionWithDuration(float duration);
|
||||
/** creates the action with duration */
|
||||
static CCFlipX3D* create(float duration);
|
||||
};
|
||||
|
@ -92,10 +84,6 @@ public:
|
|||
virtual CCObject* copyWithZone(CCZone* pZone);
|
||||
|
||||
public:
|
||||
/** creates the action with duration
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCFlipY3D* actionWithDuration(float duration);
|
||||
/** creates the action with duration */
|
||||
static CCFlipY3D* create(float duration);
|
||||
};
|
||||
|
@ -118,10 +106,6 @@ public:
|
|||
virtual void update(float time);
|
||||
|
||||
public:
|
||||
/** creates the action with center position, radius, a grid size and duration
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCLens3D* actionWithPosition(const CCPoint& pos, float r, const ccGridSize& gridSize, float duration);
|
||||
/** creates the action with center position, radius, a grid size and duration */
|
||||
static CCLens3D* create(const CCPoint& pos, float r, const ccGridSize& gridSize, float duration);
|
||||
protected:
|
||||
|
@ -156,11 +140,6 @@ public:
|
|||
virtual void update(float time);
|
||||
|
||||
public:
|
||||
/** creates the action with radius, number of waves, amplitude, a grid size and duration
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCRipple3D* actionWithPosition(const CCPoint& pos, float r, int wav, float amp,
|
||||
const ccGridSize& gridSize, float duration);
|
||||
/** creates the action with radius, number of waves, amplitude, a grid size and duration */
|
||||
static CCRipple3D* create(const CCPoint& pos, float r, int wav, float amp,
|
||||
const ccGridSize& gridSize, float duration);
|
||||
|
@ -183,10 +162,6 @@ public:
|
|||
virtual void update(float time);
|
||||
|
||||
public:
|
||||
/** creates the action with a range, shake Z vertices, a grid and duration
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCShaky3D* actionWithRange(int range, bool shakeZ, const ccGridSize& gridSize, float duration);
|
||||
/** creates the action with a range, shake Z vertices, a grid and duration */
|
||||
static CCShaky3D* create(int range, bool shakeZ, const ccGridSize& gridSize, float duration);
|
||||
protected:
|
||||
|
@ -210,10 +185,6 @@ public:
|
|||
virtual void update(float time);
|
||||
|
||||
public:
|
||||
/** creates the action with amplitude, a grid and duration
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCLiquid* actionWithWaves(int wav, float amp, const ccGridSize& gridSize, float duration);
|
||||
/** creates the action with amplitude, a grid and duration */
|
||||
static CCLiquid* create(int wav, float amp, const ccGridSize& gridSize, float duration);
|
||||
protected:
|
||||
|
@ -239,11 +210,6 @@ public:
|
|||
virtual void update(float time);
|
||||
|
||||
public:
|
||||
/** initializes the action with amplitude, horizontal sin, vertical sin, a grid and duration
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCWaves* actionWithWaves(int wav, float amp, bool h, bool v, const ccGridSize& gridSize,
|
||||
float duration);
|
||||
|
||||
/** initializes the action with amplitude, horizontal sin, vertical sin, a grid and duration */
|
||||
static CCWaves* create(int wav, float amp, bool h, bool v, const ccGridSize& gridSize,
|
||||
|
@ -278,12 +244,6 @@ public:
|
|||
virtual void update(float time);
|
||||
|
||||
public:
|
||||
/** creates the action with center position, number of twirls, amplitude, a grid size and duration
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCTwirl* actionWithPosition(CCPoint pos, int t, float amp, const ccGridSize& gridSize,
|
||||
float duration);
|
||||
|
||||
/** creates the action with center position, number of twirls, amplitude, a grid size and duration */
|
||||
static CCTwirl* create(CCPoint pos, int t, float amp, const ccGridSize& gridSize,
|
||||
float duration);
|
||||
|
|
|
@ -74,10 +74,6 @@ CCFiniteTimeAction * CCActionInstant::reverse() {
|
|||
//
|
||||
// Show
|
||||
//
|
||||
CCShow* CCShow::action()
|
||||
{
|
||||
return CCShow::create();
|
||||
}
|
||||
|
||||
CCShow* CCShow::create()
|
||||
{
|
||||
|
@ -118,11 +114,6 @@ CCObject* CCShow::copyWithZone(CCZone *pZone) {
|
|||
//
|
||||
// Hide
|
||||
//
|
||||
CCHide * CCHide::action()
|
||||
{
|
||||
return CCHide::create();
|
||||
}
|
||||
|
||||
CCHide * CCHide::create()
|
||||
{
|
||||
CCHide *pRet = new CCHide();
|
||||
|
@ -162,11 +153,6 @@ CCObject* CCHide::copyWithZone(CCZone *pZone) {
|
|||
//
|
||||
// ToggleVisibility
|
||||
//
|
||||
CCToggleVisibility * CCToggleVisibility::action()
|
||||
{
|
||||
return CCToggleVisibility::create();
|
||||
}
|
||||
|
||||
CCToggleVisibility * CCToggleVisibility::create()
|
||||
{
|
||||
CCToggleVisibility *pRet = new CCToggleVisibility();
|
||||
|
@ -205,10 +191,6 @@ CCObject* CCToggleVisibility::copyWithZone(CCZone *pZone)
|
|||
//
|
||||
// FlipX
|
||||
//
|
||||
CCFlipX *CCFlipX::actionWithFlipX(bool x)
|
||||
{
|
||||
return CCFlipX::create(x);
|
||||
}
|
||||
|
||||
CCFlipX *CCFlipX::create(bool x)
|
||||
{
|
||||
|
@ -257,10 +239,6 @@ CCObject * CCFlipX::copyWithZone(CCZone *pZone) {
|
|||
//
|
||||
// FlipY
|
||||
//
|
||||
CCFlipY * CCFlipY::actionWithFlipY(bool y)
|
||||
{
|
||||
return CCFlipY::create(y);
|
||||
}
|
||||
|
||||
CCFlipY * CCFlipY::create(bool y)
|
||||
{
|
||||
|
@ -309,10 +287,6 @@ CCObject* CCFlipY::copyWithZone(CCZone *pZone) {
|
|||
//
|
||||
// Place
|
||||
//
|
||||
CCPlace* CCPlace::actionWithPosition(const CCPoint& pos)
|
||||
{
|
||||
return CCPlace::create(pos);
|
||||
}
|
||||
|
||||
CCPlace* CCPlace::create(const CCPoint& pos)
|
||||
{
|
||||
|
@ -357,12 +331,6 @@ void CCPlace::update(float time) {
|
|||
//
|
||||
// CallFunc
|
||||
//
|
||||
|
||||
CCCallFunc * CCCallFunc::actionWithTarget(CCObject* pSelectorTarget, SEL_CallFunc selector)
|
||||
{
|
||||
return CCCallFunc::create(pSelectorTarget, selector);
|
||||
}
|
||||
|
||||
CCCallFunc * CCCallFunc::create(CCObject* pSelectorTarget, SEL_CallFunc selector)
|
||||
{
|
||||
CCCallFunc *pRet = new CCCallFunc();
|
||||
|
@ -406,6 +374,15 @@ bool CCCallFunc::initWithTarget(CCObject* pSelectorTarget) {
|
|||
return true;
|
||||
}
|
||||
|
||||
CCCallFunc::~CCCallFunc(void)
|
||||
{
|
||||
if (m_nScriptHandler)
|
||||
{
|
||||
cocos2d::CCScriptEngineManager::sharedManager()->getScriptEngine()->removeScriptHandler(m_nScriptHandler);
|
||||
}
|
||||
CC_SAFE_RELEASE(m_pSelectorTarget);
|
||||
}
|
||||
|
||||
CCObject * CCCallFunc::copyWithZone(CCZone *pZone) {
|
||||
CCZone* pNewZone = NULL;
|
||||
CCCallFunc* pRet = NULL;
|
||||
|
@ -451,11 +428,6 @@ void CCCallFuncN::execute() {
|
|||
}
|
||||
}
|
||||
|
||||
CCCallFuncN * CCCallFuncN::actionWithTarget(CCObject* pSelectorTarget, SEL_CallFuncN selector)
|
||||
{
|
||||
return CCCallFuncN::create(pSelectorTarget, selector);
|
||||
}
|
||||
|
||||
CCCallFuncN * CCCallFuncN::create(CCObject* pSelectorTarget, SEL_CallFuncN selector)
|
||||
{
|
||||
CCCallFuncN *pRet = new CCCallFuncN();
|
||||
|
@ -515,10 +487,6 @@ CCObject * CCCallFuncN::copyWithZone(CCZone* zone) {
|
|||
//
|
||||
// CallFuncND
|
||||
//
|
||||
CCCallFuncND * CCCallFuncND::actionWithTarget(CCObject* pSelectorTarget, SEL_CallFuncND selector, void* d)
|
||||
{
|
||||
return CCCallFuncND::create(pSelectorTarget, selector, d);
|
||||
}
|
||||
|
||||
CCCallFuncND * CCCallFuncND::create(CCObject* pSelectorTarget, SEL_CallFuncND selector, void* d)
|
||||
{
|
||||
|
@ -585,11 +553,6 @@ void CCCallFuncO::execute() {
|
|||
}
|
||||
}
|
||||
|
||||
CCCallFuncO * CCCallFuncO::actionWithTarget(CCObject* pSelectorTarget, SEL_CallFuncO selector, CCObject* pObject)
|
||||
{
|
||||
return CCCallFuncO::create(pSelectorTarget, selector, pObject);
|
||||
}
|
||||
|
||||
CCCallFuncO * CCCallFuncO::create(CCObject* pSelectorTarget, SEL_CallFuncO selector, CCObject* pObject)
|
||||
{
|
||||
CCCallFuncO *pRet = new CCCallFuncO();
|
||||
|
|
|
@ -68,11 +68,6 @@ public:
|
|||
virtual CCFiniteTimeAction * reverse(void);
|
||||
virtual CCObject* copyWithZone(CCZone *pZone);
|
||||
public:
|
||||
//override static method
|
||||
/** Allocates and initializes the action
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCShow * action();
|
||||
|
||||
/** Allocates and initializes the action */
|
||||
static CCShow * create();
|
||||
|
@ -93,11 +88,6 @@ public:
|
|||
virtual CCFiniteTimeAction * reverse(void);
|
||||
virtual CCObject* copyWithZone(CCZone *pZone);
|
||||
public:
|
||||
//override static method
|
||||
/** Allocates and initializes the action
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCHide * action();
|
||||
|
||||
/** Allocates and initializes the action */
|
||||
static CCHide * create();
|
||||
|
@ -114,11 +104,6 @@ public:
|
|||
virtual void update(float time);
|
||||
virtual CCObject* copyWithZone(CCZone *pZone);
|
||||
public:
|
||||
//override static method
|
||||
/** Allocates and initializes the action
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCToggleVisibility * action();
|
||||
|
||||
/** Allocates and initializes the action */
|
||||
static CCToggleVisibility * create();
|
||||
|
@ -136,11 +121,6 @@ public:
|
|||
{}
|
||||
virtual ~CCFlipX(){}
|
||||
|
||||
/** create the action
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCFlipX * actionWithFlipX(bool x);
|
||||
|
||||
/** create the action */
|
||||
static CCFlipX * create(bool x);
|
||||
|
||||
|
@ -166,11 +146,6 @@ public:
|
|||
:m_bFlipY(false)
|
||||
{}
|
||||
virtual ~CCFlipY(){}
|
||||
|
||||
/** create the action
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCFlipY * actionWithFlipY(bool y);
|
||||
|
||||
/** create the action */
|
||||
static CCFlipY * create(bool y);
|
||||
|
@ -193,10 +168,7 @@ class CC_DLL CCPlace : public CCActionInstant //<NSCopying>
|
|||
public:
|
||||
CCPlace(){}
|
||||
virtual ~CCPlace(){}
|
||||
/** creates a Place action with a position
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCPlace * actionWithPosition(const CCPoint& pos);
|
||||
|
||||
/** creates a Place action with a position */
|
||||
static CCPlace * create(const CCPoint& pos);
|
||||
/** Initializes a Place action with a position */
|
||||
|
@ -219,15 +191,7 @@ public:
|
|||
, m_nScriptHandler(0)
|
||||
{
|
||||
}
|
||||
virtual ~CCCallFunc()
|
||||
{
|
||||
CC_SAFE_RELEASE(m_pSelectorTarget);
|
||||
}
|
||||
/** creates the action with the callback
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
typedef void (CCObject::*SEL_CallFunc)();
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCCallFunc * actionWithTarget(CCObject* pSelectorTarget, SEL_CallFunc selector);
|
||||
virtual ~CCCallFunc();
|
||||
|
||||
/** creates the action with the callback
|
||||
|
||||
|
@ -294,12 +258,6 @@ public:
|
|||
return id;
|
||||
}
|
||||
|
||||
/** creates the action with the callback
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
typedef void (CCObject::*SEL_CallFuncN)(CCNode*);
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCCallFuncN * actionWithTarget(CCObject* pSelectorTarget, SEL_CallFuncN selector);
|
||||
|
||||
/** creates the action with the callback
|
||||
|
||||
typedef void (CCObject::*SEL_CallFuncN)(CCNode*);
|
||||
|
@ -332,11 +290,6 @@ public:
|
|||
return id;
|
||||
}
|
||||
|
||||
/** creates the action with the callback and the data to pass as an argument
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCCallFuncND * actionWithTarget(CCObject* pSelectorTarget, SEL_CallFuncND selector, void* d);
|
||||
|
||||
/** creates the action with the callback and the data to pass as an argument */
|
||||
static CCCallFuncND * create(CCObject* pSelectorTarget, SEL_CallFuncND selector, void* d);
|
||||
|
||||
|
@ -368,12 +321,6 @@ public:
|
|||
return id;
|
||||
}
|
||||
|
||||
/** creates the action with the callback
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
typedef void (CCObject::*SEL_CallFuncO)(CCObject*);
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCCallFuncO * actionWithTarget(CCObject* pSelectorTarget, SEL_CallFuncO selector, CCObject* pObject);
|
||||
|
||||
/** creates the action with the callback
|
||||
|
||||
typedef void (CCObject::*SEL_CallFuncO)(CCObject*);
|
||||
|
|
|
@ -38,11 +38,6 @@ NS_CC_BEGIN
|
|||
//
|
||||
// IntervalAction
|
||||
//
|
||||
CCActionInterval* CCActionInterval::actionWithDuration(float d)
|
||||
{
|
||||
return CCActionInterval::create(d);
|
||||
}
|
||||
|
||||
CCActionInterval* CCActionInterval::create(float d)
|
||||
{
|
||||
CCActionInterval *pAction = new CCActionInterval();
|
||||
|
@ -151,10 +146,6 @@ CCActionInterval* CCActionInterval::reverse(void)
|
|||
//
|
||||
// Sequence
|
||||
//
|
||||
CCSequence* CCSequence::actionOneTwo(CCFiniteTimeAction *pActionOne, CCFiniteTimeAction *pActionTwo)
|
||||
{
|
||||
return CCSequence::createWithTwoActions(pActionOne, pActionTwo);
|
||||
}
|
||||
|
||||
CCSequence* CCSequence::createWithTwoActions(CCFiniteTimeAction *pActionOne, CCFiniteTimeAction *pActionTwo)
|
||||
{
|
||||
|
@ -165,18 +156,6 @@ CCSequence* CCSequence::createWithTwoActions(CCFiniteTimeAction *pActionOne, CCF
|
|||
return pSequence;
|
||||
}
|
||||
|
||||
CCFiniteTimeAction* CCSequence::actions(CCFiniteTimeAction *pAction1, ...)
|
||||
{
|
||||
va_list params;
|
||||
va_start(params, pAction1);
|
||||
|
||||
CCFiniteTimeAction *pRet = CCSequence::create(pAction1, params);
|
||||
|
||||
va_end(params);
|
||||
|
||||
return pRet;
|
||||
}
|
||||
|
||||
CCFiniteTimeAction* CCSequence::create(CCFiniteTimeAction *pAction1, ...)
|
||||
{
|
||||
va_list params;
|
||||
|
@ -210,11 +189,6 @@ CCFiniteTimeAction* CCSequence::create(CCFiniteTimeAction *pAction1, va_list arg
|
|||
return pPrev;
|
||||
}
|
||||
|
||||
CCFiniteTimeAction* CCSequence::actionWithArray(CCArray* arrayOfActions)
|
||||
{
|
||||
return CCSequence::create(arrayOfActions);
|
||||
}
|
||||
|
||||
CCFiniteTimeAction* CCSequence::create(CCArray* arrayOfActions)
|
||||
{
|
||||
CCFiniteTimeAction* prev = (CCFiniteTimeAction*)arrayOfActions->objectAtIndex(0);
|
||||
|
@ -354,10 +328,6 @@ CCActionInterval* CCSequence::reverse(void)
|
|||
//
|
||||
// Repeat
|
||||
//
|
||||
CCRepeat* CCRepeat::actionWithAction(CCFiniteTimeAction *pAction, unsigned int times)
|
||||
{
|
||||
return CCRepeat::create(pAction, times);
|
||||
}
|
||||
|
||||
CCRepeat* CCRepeat::create(CCFiniteTimeAction *pAction, unsigned int times)
|
||||
{
|
||||
|
@ -497,11 +467,6 @@ CCRepeatForever::~CCRepeatForever()
|
|||
CC_SAFE_RELEASE(m_pInnerAction);
|
||||
}
|
||||
|
||||
CCRepeatForever *CCRepeatForever::actionWithAction(CCActionInterval *pAction)
|
||||
{
|
||||
return CCRepeatForever::create(pAction);
|
||||
}
|
||||
|
||||
CCRepeatForever *CCRepeatForever::create(CCActionInterval *pAction)
|
||||
{
|
||||
CCRepeatForever *pRet = new CCRepeatForever();
|
||||
|
@ -573,17 +538,6 @@ CCActionInterval *CCRepeatForever::reverse()
|
|||
//
|
||||
// Spawn
|
||||
//
|
||||
CCFiniteTimeAction* CCSpawn::actions(CCFiniteTimeAction *pAction1, ...)
|
||||
{
|
||||
va_list params;
|
||||
va_start(params, pAction1);
|
||||
|
||||
CCFiniteTimeAction *pRet = CCSpawn::create(pAction1, params);
|
||||
|
||||
va_end(params);
|
||||
|
||||
return pRet;
|
||||
}
|
||||
|
||||
CCFiniteTimeAction* CCSpawn::create(CCFiniteTimeAction *pAction1, ...)
|
||||
{
|
||||
|
@ -618,11 +572,6 @@ CCFiniteTimeAction* CCSpawn::create(CCFiniteTimeAction *pAction1, va_list args)
|
|||
return pPrev;
|
||||
}
|
||||
|
||||
CCFiniteTimeAction* CCSpawn::actionWithArray(CCArray *arrayOfActions)
|
||||
{
|
||||
return CCSpawn::create(arrayOfActions);
|
||||
}
|
||||
|
||||
CCFiniteTimeAction* CCSpawn::create(CCArray *arrayOfActions)
|
||||
{
|
||||
CCFiniteTimeAction* prev = (CCFiniteTimeAction*)arrayOfActions->objectAtIndex(0);
|
||||
|
@ -635,11 +584,6 @@ CCFiniteTimeAction* CCSpawn::create(CCArray *arrayOfActions)
|
|||
return prev;
|
||||
}
|
||||
|
||||
CCSpawn* CCSpawn::actionOneTwo(CCFiniteTimeAction *pAction1, CCFiniteTimeAction *pAction2)
|
||||
{
|
||||
return CCSpawn::createWithTwoActions(pAction1, pAction2);
|
||||
}
|
||||
|
||||
CCSpawn* CCSpawn::createWithTwoActions(CCFiniteTimeAction *pAction1, CCFiniteTimeAction *pAction2)
|
||||
{
|
||||
CCSpawn *pSpawn = new CCSpawn();
|
||||
|
@ -748,10 +692,6 @@ CCActionInterval* CCSpawn::reverse(void)
|
|||
//
|
||||
// RotateTo
|
||||
//
|
||||
CCRotateTo* CCRotateTo::actionWithDuration(float fDuration, float fDeltaAngle)
|
||||
{
|
||||
return CCRotateTo::create(fDuration, fDeltaAngle);
|
||||
}
|
||||
|
||||
CCRotateTo* CCRotateTo::create(float fDuration, float fDeltaAngle)
|
||||
{
|
||||
|
@ -872,10 +812,6 @@ void CCRotateTo::update(float time)
|
|||
//
|
||||
// RotateBy
|
||||
//
|
||||
CCRotateBy* CCRotateBy::actionWithDuration(float fDuration, float fDeltaAngle)
|
||||
{
|
||||
return CCRotateBy::create(fDuration, fDeltaAngle);
|
||||
}
|
||||
|
||||
CCRotateBy* CCRotateBy::create(float fDuration, float fDeltaAngle)
|
||||
{
|
||||
|
@ -966,10 +902,6 @@ CCActionInterval* CCRotateBy::reverse(void)
|
|||
//
|
||||
// MoveTo
|
||||
//
|
||||
CCMoveTo* CCMoveTo::actionWithDuration(float duration, const CCPoint& position)
|
||||
{
|
||||
return CCMoveTo::create(duration, position);
|
||||
}
|
||||
|
||||
CCMoveTo* CCMoveTo::create(float duration, const CCPoint& position)
|
||||
{
|
||||
|
@ -1033,10 +965,6 @@ void CCMoveTo::update(float time)
|
|||
//
|
||||
// MoveBy
|
||||
//
|
||||
CCMoveBy* CCMoveBy::actionWithDuration(float duration, const CCPoint& position)
|
||||
{
|
||||
return CCMoveBy::create(duration, position);
|
||||
}
|
||||
|
||||
CCMoveBy* CCMoveBy::create(float duration, const CCPoint& position)
|
||||
{
|
||||
|
@ -1096,11 +1024,6 @@ CCActionInterval* CCMoveBy::reverse(void)
|
|||
//
|
||||
// CCSkewTo
|
||||
//
|
||||
CCSkewTo* CCSkewTo::actionWithDuration(float t, float sx, float sy)
|
||||
{
|
||||
return CCSkewTo::create(t, sx, sy);
|
||||
}
|
||||
|
||||
CCSkewTo* CCSkewTo::create(float t, float sx, float sy)
|
||||
{
|
||||
CCSkewTo *pSkewTo = new CCSkewTo();
|
||||
|
@ -1227,11 +1150,6 @@ CCSkewTo::CCSkewTo()
|
|||
//
|
||||
// CCSkewBy
|
||||
//
|
||||
CCSkewBy* CCSkewBy::actionWithDuration(float t, float sx, float sy)
|
||||
{
|
||||
return CCSkewBy::create(t, sx, sy);
|
||||
}
|
||||
|
||||
CCSkewBy* CCSkewBy::create(float t, float sx, float sy)
|
||||
{
|
||||
CCSkewBy *pSkewBy = new CCSkewBy();
|
||||
|
@ -1282,10 +1200,6 @@ CCActionInterval* CCSkewBy::reverse()
|
|||
//
|
||||
// JumpBy
|
||||
//
|
||||
CCJumpBy* CCJumpBy::actionWithDuration(float duration, const CCPoint& position, float height, unsigned int jumps)
|
||||
{
|
||||
return CCJumpBy::create(duration, position, height, jumps);
|
||||
}
|
||||
|
||||
CCJumpBy* CCJumpBy::create(float duration, const CCPoint& position, float height, unsigned int jumps)
|
||||
{
|
||||
|
@ -1361,10 +1275,6 @@ CCActionInterval* CCJumpBy::reverse(void)
|
|||
//
|
||||
// JumpTo
|
||||
//
|
||||
CCJumpTo* CCJumpTo::actionWithDuration(float duration, const CCPoint& position, float height, int jumps)
|
||||
{
|
||||
return CCJumpTo::create(duration, position, height, jumps);
|
||||
}
|
||||
|
||||
CCJumpTo* CCJumpTo::create(float duration, const CCPoint& position, float height, int jumps)
|
||||
{
|
||||
|
@ -1419,10 +1329,6 @@ static inline float bezierat( float a, float b, float c, float d, float t )
|
|||
//
|
||||
// BezierBy
|
||||
//
|
||||
CCBezierBy* CCBezierBy::actionWithDuration(float t, const ccBezierConfig& c)
|
||||
{
|
||||
return CCBezierBy::create(t, c);
|
||||
}
|
||||
|
||||
CCBezierBy* CCBezierBy::create(float t, const ccBezierConfig& c)
|
||||
{
|
||||
|
@ -1508,10 +1414,6 @@ CCActionInterval* CCBezierBy::reverse(void)
|
|||
//
|
||||
// BezierTo
|
||||
//
|
||||
CCBezierTo* CCBezierTo::actionWithDuration(float t, const ccBezierConfig& c)
|
||||
{
|
||||
return CCBezierTo::create(t, c);
|
||||
}
|
||||
|
||||
CCBezierTo* CCBezierTo::create(float t, const ccBezierConfig& c)
|
||||
{
|
||||
|
@ -1568,11 +1470,6 @@ void CCBezierTo::startWithTarget(CCNode *pTarget)
|
|||
//
|
||||
// ScaleTo
|
||||
//
|
||||
CCScaleTo* CCScaleTo::actionWithDuration(float duration, float s)
|
||||
{
|
||||
return CCScaleTo::create(duration, s);
|
||||
}
|
||||
|
||||
CCScaleTo* CCScaleTo::create(float duration, float s)
|
||||
{
|
||||
CCScaleTo *pScaleTo = new CCScaleTo();
|
||||
|
@ -1595,11 +1492,6 @@ bool CCScaleTo::initWithDuration(float duration, float s)
|
|||
return false;
|
||||
}
|
||||
|
||||
CCScaleTo* CCScaleTo::actionWithDuration(float duration, float sx, float sy)
|
||||
{
|
||||
return CCScaleTo::create(duration, sx, sy);
|
||||
}
|
||||
|
||||
CCScaleTo* CCScaleTo::create(float duration, float sx, float sy)
|
||||
{
|
||||
CCScaleTo *pScaleTo = new CCScaleTo();
|
||||
|
@ -1667,15 +1559,6 @@ void CCScaleTo::update(float time)
|
|||
//
|
||||
// ScaleBy
|
||||
//
|
||||
CCScaleBy* CCScaleBy::actionWithDuration(float duration, float s)
|
||||
{
|
||||
return create(duration, s);
|
||||
}
|
||||
|
||||
CCScaleBy* CCScaleBy::actionWithDuration(float duration, float sx, float sy)
|
||||
{
|
||||
return create(duration, sx, sy);
|
||||
}
|
||||
|
||||
CCScaleBy* CCScaleBy::create(float duration, float s)
|
||||
{
|
||||
|
@ -1734,10 +1617,6 @@ CCActionInterval* CCScaleBy::reverse(void)
|
|||
//
|
||||
// Blink
|
||||
//
|
||||
CCBlink* CCBlink::actionWithDuration(float duration, unsigned int uBlinks)
|
||||
{
|
||||
return CCBlink::create(duration, uBlinks);
|
||||
}
|
||||
|
||||
CCBlink* CCBlink::create(float duration, unsigned int uBlinks)
|
||||
{
|
||||
|
@ -1814,10 +1693,6 @@ CCActionInterval* CCBlink::reverse(void)
|
|||
//
|
||||
// FadeIn
|
||||
//
|
||||
CCFadeIn* CCFadeIn::actionWithDuration(float d)
|
||||
{
|
||||
return CCFadeIn::create(d);
|
||||
}
|
||||
|
||||
CCFadeIn* CCFadeIn::create(float d)
|
||||
{
|
||||
|
@ -1869,10 +1744,6 @@ CCActionInterval* CCFadeIn::reverse(void)
|
|||
//
|
||||
// FadeOut
|
||||
//
|
||||
CCFadeOut* CCFadeOut::actionWithDuration(float d)
|
||||
{
|
||||
return CCFadeOut::create(d);
|
||||
}
|
||||
|
||||
CCFadeOut* CCFadeOut::create(float d)
|
||||
{
|
||||
|
@ -1924,10 +1795,6 @@ CCActionInterval* CCFadeOut::reverse(void)
|
|||
//
|
||||
// FadeTo
|
||||
//
|
||||
CCFadeTo* CCFadeTo::actionWithDuration(float duration, GLubyte opacity)
|
||||
{
|
||||
return CCFadeTo::create(duration, opacity);
|
||||
}
|
||||
|
||||
CCFadeTo* CCFadeTo::create(float duration, GLubyte opacity)
|
||||
{
|
||||
|
@ -1997,11 +1864,6 @@ void CCFadeTo::update(float time)
|
|||
//
|
||||
// TintTo
|
||||
//
|
||||
CCTintTo* CCTintTo::actionWithDuration(float duration, GLubyte red, GLubyte green, GLubyte blue)
|
||||
{
|
||||
return CCTintTo::create(duration, red, green, blue);
|
||||
}
|
||||
|
||||
CCTintTo* CCTintTo::create(float duration, GLubyte red, GLubyte green, GLubyte blue)
|
||||
{
|
||||
CCTintTo *pTintTo = new CCTintTo();
|
||||
|
@ -2070,10 +1932,6 @@ void CCTintTo::update(float time)
|
|||
//
|
||||
// TintBy
|
||||
//
|
||||
CCTintBy* CCTintBy::actionWithDuration(float duration, GLshort deltaRed, GLshort deltaGreen, GLshort deltaBlue)
|
||||
{
|
||||
return CCTintBy::create(duration, deltaRed, deltaGreen, deltaBlue);
|
||||
}
|
||||
|
||||
CCTintBy* CCTintBy::create(float duration, GLshort deltaRed, GLshort deltaGreen, GLshort deltaBlue)
|
||||
{
|
||||
|
@ -2154,11 +2012,6 @@ CCActionInterval* CCTintBy::reverse(void)
|
|||
//
|
||||
// DelayTime
|
||||
//
|
||||
CCDelayTime* CCDelayTime::actionWithDuration(float d)
|
||||
{
|
||||
return CCDelayTime::create(d);
|
||||
}
|
||||
|
||||
CCDelayTime* CCDelayTime::create(float d)
|
||||
{
|
||||
CCDelayTime* pAction = new CCDelayTime();
|
||||
|
@ -2206,10 +2059,6 @@ CCActionInterval* CCDelayTime::reverse(void)
|
|||
//
|
||||
// ReverseTime
|
||||
//
|
||||
CCReverseTime* CCReverseTime::actionWithAction(CCFiniteTimeAction *pAction)
|
||||
{
|
||||
return CCReverseTime::create(pAction);
|
||||
}
|
||||
|
||||
CCReverseTime* CCReverseTime::create(CCFiniteTimeAction *pAction)
|
||||
{
|
||||
|
@ -2301,11 +2150,6 @@ CCActionInterval* CCReverseTime::reverse(void)
|
|||
//
|
||||
// Animate
|
||||
//
|
||||
CCAnimate* CCAnimate::actionWithAnimation(CCAnimation *pAnimation)
|
||||
{
|
||||
return CCAnimate::create(pAnimation);
|
||||
}
|
||||
|
||||
CCAnimate* CCAnimate::create(CCAnimation *pAnimation)
|
||||
{
|
||||
CCAnimate *pAnimate = new CCAnimate();
|
||||
|
@ -2498,11 +2342,6 @@ CCTargetedAction::~CCTargetedAction()
|
|||
CC_SAFE_RELEASE(m_pAction);
|
||||
}
|
||||
|
||||
CCTargetedAction* CCTargetedAction::actionWithTarget(CCNode* pTarget, CCFiniteTimeAction* pAction)
|
||||
{
|
||||
return CCTargetedAction::create(pTarget, pAction);
|
||||
}
|
||||
|
||||
CCTargetedAction* CCTargetedAction::create(CCNode* pTarget, CCFiniteTimeAction* pAction)
|
||||
{
|
||||
CCTargetedAction* p = new CCTargetedAction();
|
||||
|
|
|
@ -77,10 +77,6 @@ public:
|
|||
virtual CCActionInterval* reverse(void);
|
||||
|
||||
public:
|
||||
/** creates the action
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCActionInterval* actionWithDuration(float d);
|
||||
|
||||
/** creates the action */
|
||||
static CCActionInterval* create(float d);
|
||||
|
@ -112,18 +108,6 @@ public:
|
|||
virtual CCActionInterval* reverse(void);
|
||||
|
||||
public:
|
||||
/** helper constructor to create an array of sequenceable actions
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCFiniteTimeAction* actions(CCFiniteTimeAction *pAction1, ...);
|
||||
/** helper constructor to create an array of sequenceable actions given an array
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCFiniteTimeAction* actionWithArray(CCArray *arrayOfActions);
|
||||
/** creates the action
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCSequence* actionOneTwo(CCFiniteTimeAction *pActionOne, CCFiniteTimeAction *pActionTwo);
|
||||
|
||||
/** helper constructor to create an array of sequenceable actions */
|
||||
static CCFiniteTimeAction* create(CCFiniteTimeAction *pAction1, ...);
|
||||
|
@ -174,10 +158,6 @@ public:
|
|||
}
|
||||
|
||||
public:
|
||||
/** creates a CCRepeat action. Times is an unsigned integer between 1 and pow(2,30)
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCRepeat* actionWithAction(CCFiniteTimeAction *pAction, unsigned int times);
|
||||
|
||||
/** creates a CCRepeat action. Times is an unsigned integer between 1 and pow(2,30) */
|
||||
static CCRepeat* create(CCFiniteTimeAction *pAction, unsigned int times);
|
||||
|
@ -226,10 +206,7 @@ public:
|
|||
}
|
||||
|
||||
public:
|
||||
/** creates the action
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCRepeatForever* actionWithAction(CCActionInterval *pAction);
|
||||
|
||||
/** creates the action */
|
||||
static CCRepeatForever* create(CCActionInterval *pAction);
|
||||
protected:
|
||||
|
@ -254,20 +231,6 @@ public:
|
|||
virtual CCActionInterval* reverse(void);
|
||||
|
||||
public:
|
||||
/** helper constructor to create an array of spawned actions
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCFiniteTimeAction* actions(CCFiniteTimeAction *pAction1, ...);
|
||||
|
||||
/** helper constructor to create an array of spawned actions given an array
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCFiniteTimeAction* actionWithArray(CCArray *arrayOfActions);
|
||||
|
||||
/** creates the Spawn action
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCSpawn* actionOneTwo(CCFiniteTimeAction *pAction1, CCFiniteTimeAction *pAction2);
|
||||
|
||||
/** helper constructor to create an array of spawned actions */
|
||||
static CCFiniteTimeAction* create(CCFiniteTimeAction *pAction1, ...);
|
||||
|
@ -293,10 +256,6 @@ protected:
|
|||
class CC_DLL CCRotateTo : public CCActionInterval
|
||||
{
|
||||
public:
|
||||
/** creates the action
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCRotateTo* actionWithDuration(float fDuration, float fDeltaAngle);
|
||||
/** creates the action */
|
||||
static CCRotateTo* create(float fDuration, float fDeltaAngle);
|
||||
/** initializes the action */
|
||||
|
@ -325,10 +284,6 @@ protected:
|
|||
class CC_DLL CCRotateBy : public CCActionInterval
|
||||
{
|
||||
public:
|
||||
/** creates the action
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCRotateBy* actionWithDuration(float fDuration, float fDeltaAngle);
|
||||
/** creates the action */
|
||||
static CCRotateBy* create(float fDuration, float fDeltaAngle);
|
||||
/** initializes the action */
|
||||
|
@ -362,10 +317,6 @@ public:
|
|||
virtual void update(float time);
|
||||
|
||||
public:
|
||||
/** creates the action
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCMoveTo* actionWithDuration(float duration, const CCPoint& position);
|
||||
/** creates the action */
|
||||
static CCMoveTo* create(float duration, const CCPoint& position);
|
||||
protected:
|
||||
|
@ -389,10 +340,6 @@ public:
|
|||
virtual CCActionInterval* reverse(void);
|
||||
|
||||
public:
|
||||
/** creates the action
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCMoveBy* actionWithDuration(float duration, const CCPoint& position);
|
||||
/** creates the action */
|
||||
static CCMoveBy* create(float duration, const CCPoint& position);
|
||||
};
|
||||
|
@ -410,10 +357,6 @@ public:
|
|||
virtual void update(float time);
|
||||
|
||||
public:
|
||||
/** creates the action
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCSkewTo* actionWithDuration(float t, float sx, float sy);
|
||||
|
||||
/** creates the action */
|
||||
static CCSkewTo* create(float t, float sx, float sy);
|
||||
|
@ -439,10 +382,7 @@ public:
|
|||
virtual CCActionInterval* reverse(void);
|
||||
|
||||
public:
|
||||
/** creates the action
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCSkewBy* actionWithDuration(float t, float deltaSkewX, float deltaSkewY);
|
||||
|
||||
/** creates the action */
|
||||
static CCSkewBy* create(float t, float deltaSkewX, float deltaSkewY);
|
||||
};
|
||||
|
@ -461,10 +401,6 @@ public:
|
|||
virtual CCActionInterval* reverse(void);
|
||||
|
||||
public:
|
||||
/** creates the action
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCJumpBy* actionWithDuration(float duration, const CCPoint& position, float height, unsigned int jumps);
|
||||
/** creates the action */
|
||||
static CCJumpBy* create(float duration, const CCPoint& position, float height, unsigned int jumps);
|
||||
protected:
|
||||
|
@ -483,10 +419,6 @@ public:
|
|||
virtual CCObject* copyWithZone(CCZone* pZone);
|
||||
|
||||
public:
|
||||
/** creates the action
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCJumpTo* actionWithDuration(float duration, const CCPoint& position, float height, int jumps);
|
||||
/** creates the action */
|
||||
static CCJumpTo* create(float duration, const CCPoint& position, float height, int jumps);
|
||||
};
|
||||
|
@ -516,10 +448,6 @@ public:
|
|||
virtual CCActionInterval* reverse(void);
|
||||
|
||||
public:
|
||||
/** creates the action with a duration and a bezier configuration
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCBezierBy* actionWithDuration(float t, const ccBezierConfig& c);
|
||||
/** creates the action with a duration and a bezier configuration */
|
||||
static CCBezierBy* create(float t, const ccBezierConfig& c);
|
||||
protected:
|
||||
|
@ -537,10 +465,6 @@ public:
|
|||
virtual CCObject* copyWithZone(CCZone* pZone);
|
||||
|
||||
public:
|
||||
/** creates the action with a duration and a bezier configuration
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCBezierTo* actionWithDuration(float t, const ccBezierConfig& c);
|
||||
|
||||
/** creates the action with a duration and a bezier configuration */
|
||||
static CCBezierTo* create(float t, const ccBezierConfig& c);
|
||||
|
@ -567,15 +491,6 @@ public:
|
|||
virtual void update(float time);
|
||||
|
||||
public:
|
||||
/** creates the action with the same scale factor for X and Y
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCScaleTo* actionWithDuration(float duration, float s);
|
||||
|
||||
/** creates the action with and X factor and a Y factor
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCScaleTo* actionWithDuration(float duration, float sx, float sy);
|
||||
|
||||
/** creates the action with the same scale factor for X and Y */
|
||||
static CCScaleTo* create(float duration, float s);
|
||||
|
@ -603,15 +518,6 @@ public:
|
|||
virtual CCObject* copyWithZone(CCZone* pZone);
|
||||
|
||||
public:
|
||||
/** creates the action with the same scale factor for X and Y
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCScaleBy* actionWithDuration(float duration, float s);
|
||||
|
||||
/** creates the action with and X factor and a Y factor
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCScaleBy* actionWithDuration(float duration, float sx, float sy);
|
||||
|
||||
/** creates the action with the same scale factor for X and Y */
|
||||
static CCScaleBy* create(float duration, float s);
|
||||
|
@ -633,10 +539,7 @@ public:
|
|||
virtual CCActionInterval* reverse(void);
|
||||
|
||||
public:
|
||||
/** creates the action
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCBlink* actionWithDuration(float duration, unsigned int uBlinks);
|
||||
|
||||
/** creates the action */
|
||||
static CCBlink* create(float duration, unsigned int uBlinks);
|
||||
|
||||
|
@ -659,10 +562,6 @@ public:
|
|||
virtual CCObject* copyWithZone(CCZone* pZone);
|
||||
|
||||
public:
|
||||
/** creates the action
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCFadeIn* actionWithDuration(float d);
|
||||
/** creates the action */
|
||||
static CCFadeIn* create(float d);
|
||||
};
|
||||
|
@ -678,10 +577,6 @@ public:
|
|||
virtual CCObject* copyWithZone(CCZone* pZone);
|
||||
|
||||
public:
|
||||
/** creates the action
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCFadeOut* actionWithDuration(float d);
|
||||
|
||||
/** creates the action */
|
||||
static CCFadeOut* create(float d);
|
||||
|
@ -701,10 +596,6 @@ public:
|
|||
virtual void update(float time);
|
||||
|
||||
public:
|
||||
/** creates an action with duration and opacity
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCFadeTo* actionWithDuration(float duration, GLubyte opacity);
|
||||
/** creates an action with duration and opacity */
|
||||
static CCFadeTo* create(float duration, GLubyte opacity);
|
||||
protected:
|
||||
|
@ -727,10 +618,6 @@ public:
|
|||
virtual void update(float time);
|
||||
|
||||
public:
|
||||
/** creates an action with duration and color
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCTintTo* actionWithDuration(float duration, GLubyte red, GLubyte green, GLubyte blue);
|
||||
/** creates an action with duration and color */
|
||||
static CCTintTo* create(float duration, GLubyte red, GLubyte green, GLubyte blue);
|
||||
protected:
|
||||
|
@ -753,10 +640,6 @@ public:
|
|||
virtual CCActionInterval* reverse(void);
|
||||
|
||||
public:
|
||||
/** creates an action with duration and color
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCTintBy* actionWithDuration(float duration, GLshort deltaRed, GLshort deltaGreen, GLshort deltaBlue);
|
||||
/** creates an action with duration and color */
|
||||
static CCTintBy* create(float duration, GLshort deltaRed, GLshort deltaGreen, GLshort deltaBlue);
|
||||
protected:
|
||||
|
@ -779,10 +662,6 @@ public:
|
|||
virtual CCObject* copyWithZone(CCZone* pZone);
|
||||
|
||||
public:
|
||||
/** creates the action
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCDelayTime* actionWithDuration(float d);
|
||||
|
||||
/** creates the action */
|
||||
static CCDelayTime* create(float d);
|
||||
|
@ -811,10 +690,6 @@ public:
|
|||
virtual CCActionInterval* reverse(void);
|
||||
|
||||
public:
|
||||
/** creates the action
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCReverseTime* actionWithAction(CCFiniteTimeAction *pAction);
|
||||
/** creates the action */
|
||||
static CCReverseTime* create(CCFiniteTimeAction *pAction);
|
||||
protected:
|
||||
|
@ -840,10 +715,6 @@ public:
|
|||
virtual CCActionInterval* reverse(void);
|
||||
|
||||
public:
|
||||
/** creates the action with an Animation and will restore the original frame when the animation is over
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCAnimate* actionWithAnimation(CCAnimation *pAnimation);
|
||||
/** creates the action with an Animation and will restore the original frame when the animation is over */
|
||||
static CCAnimate* create(CCAnimation *pAnimation);
|
||||
CC_SYNTHESIZE_RETAIN(CCAnimation*, m_pAnimation, Animation)
|
||||
|
@ -862,10 +733,7 @@ class CC_DLL CCTargetedAction : public CCActionInterval
|
|||
public:
|
||||
CCTargetedAction();
|
||||
virtual ~CCTargetedAction();
|
||||
/** Create an action with the specified action and forced target
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCTargetedAction* actionWithTarget(CCNode* pTarget, CCFiniteTimeAction* pAction);
|
||||
|
||||
/** Create an action with the specified action and forced target */
|
||||
static CCTargetedAction* create(CCNode* pTarget, CCFiniteTimeAction* pAction);
|
||||
|
||||
|
|
|
@ -27,11 +27,6 @@ THE SOFTWARE.
|
|||
|
||||
NS_CC_BEGIN
|
||||
|
||||
CCPageTurn3D* CCPageTurn3D::actionWithSize(const ccGridSize& gridSize, float time)
|
||||
{
|
||||
return CCPageTurn3D::create(gridSize, time);
|
||||
}
|
||||
|
||||
CCPageTurn3D* CCPageTurn3D::create(const ccGridSize& gridSize, float time)
|
||||
{
|
||||
CCPageTurn3D *pAction = new CCPageTurn3D();
|
||||
|
|
|
@ -49,10 +49,7 @@ public:
|
|||
virtual void update(float time);
|
||||
|
||||
public:
|
||||
/** create the action
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCPageTurn3D* actionWithSize(const ccGridSize& gridSize, float time);
|
||||
|
||||
/** create the action */
|
||||
static CCPageTurn3D* create(const ccGridSize& gridSize, float time);
|
||||
};
|
||||
|
|
|
@ -32,11 +32,6 @@ NS_CC_BEGIN
|
|||
|
||||
// implementation of CCProgressTo
|
||||
|
||||
CCProgressTo* CCProgressTo::actionWithDuration(float duration, float fPercent)
|
||||
{
|
||||
return CCProgressTo::create(duration, fPercent);
|
||||
}
|
||||
|
||||
CCProgressTo* CCProgressTo::create(float duration, float fPercent)
|
||||
{
|
||||
CCProgressTo *pProgressTo = new CCProgressTo();
|
||||
|
@ -101,11 +96,6 @@ void CCProgressTo::update(float time)
|
|||
|
||||
// implementation of CCProgressFromTo
|
||||
|
||||
CCProgressFromTo* CCProgressFromTo::actionWithDuration(float duration, float fFromPercentage, float fToPercentage)
|
||||
{
|
||||
return CCProgressFromTo::create(duration, fFromPercentage, fToPercentage);
|
||||
}
|
||||
|
||||
CCProgressFromTo* CCProgressFromTo::create(float duration, float fFromPercentage, float fToPercentage)
|
||||
{
|
||||
CCProgressFromTo *pProgressFromTo = new CCProgressFromTo();
|
||||
|
|
|
@ -49,10 +49,6 @@ public:
|
|||
virtual void update(float time);
|
||||
|
||||
public:
|
||||
/** Creates and initializes with a duration and a percent
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCProgressTo* actionWithDuration(float duration, float fPercent);
|
||||
/** Creates and initializes with a duration and a percent */
|
||||
static CCProgressTo* create(float duration, float fPercent);
|
||||
protected:
|
||||
|
@ -76,10 +72,7 @@ public:
|
|||
virtual void update(float time);
|
||||
|
||||
public:
|
||||
/** Creates and initializes the action with a duration, a "from" percentage and a "to" percentage
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCProgressFromTo* actionWithDuration(float duration, float fFromPercentage, float fToPercentage);
|
||||
|
||||
/** Creates and initializes the action with a duration, a "from" percentage and a "to" percentage */
|
||||
static CCProgressFromTo* create(float duration, float fFromPercentage, float fToPercentage);
|
||||
protected:
|
||||
|
|
|
@ -41,11 +41,6 @@ struct Tile
|
|||
|
||||
// implementation of ShakyTiles3D
|
||||
|
||||
CCShakyTiles3D* CCShakyTiles3D::actionWithRange(int nRange, bool bShakeZ,const ccGridSize& gridSize, float duration)
|
||||
{
|
||||
return CCShakyTiles3D::create(nRange, bShakeZ, gridSize, duration);
|
||||
}
|
||||
|
||||
CCShakyTiles3D* CCShakyTiles3D::create(int nRange, bool bShakeZ,const ccGridSize& gridSize, float duration)
|
||||
{
|
||||
CCShakyTiles3D *pAction = new CCShakyTiles3D();
|
||||
|
@ -139,11 +134,6 @@ void CCShakyTiles3D::update(float time)
|
|||
|
||||
// implementation of CCShatteredTiles3D
|
||||
|
||||
CCShatteredTiles3D* CCShatteredTiles3D::actionWithRange(int nRange, bool bShatterZ, const ccGridSize& gridSize, float duration)
|
||||
{
|
||||
return CCShatteredTiles3D::create(nRange, bShatterZ, gridSize, duration);
|
||||
}
|
||||
|
||||
CCShatteredTiles3D* CCShatteredTiles3D::create(int nRange, bool bShatterZ, const ccGridSize& gridSize, float duration)
|
||||
{
|
||||
CCShatteredTiles3D *pAction = new CCShatteredTiles3D();
|
||||
|
@ -243,11 +233,6 @@ void CCShatteredTiles3D::update(float time)
|
|||
|
||||
// implementation of CCShuffleTiles
|
||||
|
||||
CCShuffleTiles* CCShuffleTiles::actionWithSeed(int s, const ccGridSize& gridSize, float duration)
|
||||
{
|
||||
return CCShuffleTiles::create(s, gridSize, duration);
|
||||
}
|
||||
|
||||
CCShuffleTiles* CCShuffleTiles::create(int s, const ccGridSize& gridSize, float duration)
|
||||
{
|
||||
CCShuffleTiles *pAction = new CCShuffleTiles();
|
||||
|
@ -412,11 +397,6 @@ void CCShuffleTiles::update(float time)
|
|||
|
||||
// implementation of CCFadeOutTRTiles
|
||||
|
||||
CCFadeOutTRTiles* CCFadeOutTRTiles::actionWithSize(const ccGridSize& gridSize, float time)
|
||||
{
|
||||
return CCFadeOutTRTiles::create( gridSize, time);
|
||||
}
|
||||
|
||||
CCFadeOutTRTiles* CCFadeOutTRTiles::create(const ccGridSize& gridSize, float time)
|
||||
{
|
||||
CCFadeOutTRTiles *pAction = new CCFadeOutTRTiles();
|
||||
|
@ -505,10 +485,6 @@ void CCFadeOutTRTiles::update(float time)
|
|||
}
|
||||
|
||||
// implementation of CCFadeOutBLTiles
|
||||
CCFadeOutBLTiles* CCFadeOutBLTiles::actionWithSize(const ccGridSize& gridSize, float time)
|
||||
{
|
||||
return CCFadeOutBLTiles::create(gridSize, time);
|
||||
}
|
||||
|
||||
CCFadeOutBLTiles* CCFadeOutBLTiles::create(const ccGridSize& gridSize, float time)
|
||||
{
|
||||
|
@ -542,11 +518,6 @@ float CCFadeOutBLTiles::testFunc(const ccGridSize& pos, float time)
|
|||
|
||||
// implementation of CCFadeOutUpTiles
|
||||
|
||||
CCFadeOutUpTiles* CCFadeOutUpTiles::actionWithSize(const ccGridSize& gridSize, float time)
|
||||
{
|
||||
return CCFadeOutUpTiles::create(gridSize, time);
|
||||
}
|
||||
|
||||
CCFadeOutUpTiles* CCFadeOutUpTiles::create(const ccGridSize& gridSize, float time)
|
||||
{
|
||||
CCFadeOutUpTiles *pAction = new CCFadeOutUpTiles();
|
||||
|
@ -591,10 +562,6 @@ void CCFadeOutUpTiles::transformTile(const ccGridSize& pos, float distance)
|
|||
}
|
||||
|
||||
// implementation of CCFadeOutDownTiles
|
||||
CCFadeOutDownTiles* CCFadeOutDownTiles::actionWithSize(const ccGridSize& gridSize, float time)
|
||||
{
|
||||
return CCFadeOutDownTiles::create(gridSize, time);
|
||||
}
|
||||
|
||||
CCFadeOutDownTiles* CCFadeOutDownTiles::create(const ccGridSize& gridSize, float time)
|
||||
{
|
||||
|
@ -627,10 +594,6 @@ float CCFadeOutDownTiles::testFunc(const ccGridSize& pos, float time)
|
|||
}
|
||||
|
||||
// implementation of TurnOffTiles
|
||||
CCTurnOffTiles* CCTurnOffTiles::actionWithSize(const ccGridSize& size, float d)
|
||||
{
|
||||
return CCTurnOffTiles::create( size, d);
|
||||
}
|
||||
|
||||
CCTurnOffTiles* CCTurnOffTiles::create(const ccGridSize& size, float d)
|
||||
{
|
||||
|
@ -646,11 +609,6 @@ CCTurnOffTiles* CCTurnOffTiles::create(const ccGridSize& size, float d)
|
|||
return pAction;
|
||||
}
|
||||
|
||||
CCTurnOffTiles* CCTurnOffTiles::actionWithSeed(int s, const ccGridSize& gridSize, float duration)
|
||||
{
|
||||
return CCTurnOffTiles::create(s, gridSize, duration);
|
||||
}
|
||||
|
||||
CCTurnOffTiles* CCTurnOffTiles::create(int s, const ccGridSize& gridSize, float duration)
|
||||
{
|
||||
CCTurnOffTiles *pAction = new CCTurnOffTiles();
|
||||
|
@ -781,11 +739,6 @@ void CCTurnOffTiles::update(float time)
|
|||
|
||||
// implementation of CCWavesTiles3D
|
||||
|
||||
CCWavesTiles3D* CCWavesTiles3D::actionWithWaves(int wav, float amp, const ccGridSize& gridSize, float duration)
|
||||
{
|
||||
return CCWavesTiles3D::create(wav, amp, gridSize, duration);
|
||||
}
|
||||
|
||||
CCWavesTiles3D* CCWavesTiles3D::create(int wav, float amp, const ccGridSize& gridSize, float duration)
|
||||
{
|
||||
CCWavesTiles3D *pAction = new CCWavesTiles3D();
|
||||
|
@ -864,11 +817,6 @@ void CCWavesTiles3D::update(float time)
|
|||
|
||||
// implementation of CCJumpTiles3D
|
||||
|
||||
CCJumpTiles3D* CCJumpTiles3D::actionWithJumps(int j, float amp, const ccGridSize& gridSize, float duration)
|
||||
{
|
||||
return CCJumpTiles3D::create(j, amp, gridSize, duration);
|
||||
}
|
||||
|
||||
CCJumpTiles3D* CCJumpTiles3D::create(int j, float amp, const ccGridSize& gridSize, float duration)
|
||||
{
|
||||
CCJumpTiles3D *pAction = new CCJumpTiles3D();
|
||||
|
@ -958,11 +906,6 @@ void CCJumpTiles3D::update(float time)
|
|||
|
||||
// implementation of CCSplitRows
|
||||
|
||||
CCSplitRows* CCSplitRows::actionWithRows(int nRows, float duration)
|
||||
{
|
||||
return CCSplitRows::create(nRows, duration);
|
||||
}
|
||||
|
||||
CCSplitRows* CCSplitRows::create(int nRows, float duration)
|
||||
{
|
||||
CCSplitRows *pAction = new CCSplitRows();
|
||||
|
@ -1042,11 +985,6 @@ void CCSplitRows::update(float time)
|
|||
|
||||
// implementation of CCSplitCols
|
||||
|
||||
CCSplitCols* CCSplitCols::actionWithCols(int nCols, float duration)
|
||||
{
|
||||
return CCSplitCols::create(nCols, duration);
|
||||
}
|
||||
|
||||
CCSplitCols* CCSplitCols::create(int nCols, float duration)
|
||||
{
|
||||
CCSplitCols *pAction = new CCSplitCols();
|
||||
|
|
|
@ -46,10 +46,6 @@ public:
|
|||
virtual void update(float time);
|
||||
|
||||
public:
|
||||
/** creates the action with a range, whether or not to shake Z vertices, a grid size, and duration
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCShakyTiles3D* actionWithRange(int nRange, bool bShakeZ, const ccGridSize& gridSize, float duration);
|
||||
|
||||
/** creates the action with a range, whether or not to shake Z vertices, a grid size, and duration */
|
||||
static CCShakyTiles3D* create(int nRange, bool bShakeZ, const ccGridSize& gridSize, float duration);
|
||||
|
@ -71,11 +67,6 @@ public:
|
|||
virtual void update(float time);
|
||||
|
||||
public:
|
||||
/** creates the action with a range, whether of not to shatter Z vertices, a grid size and duration
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCShatteredTiles3D* actionWithRange(int nRange, bool bShatterZ, const ccGridSize& gridSize,
|
||||
float duration);
|
||||
|
||||
/** creates the action with a range, whether of not to shatter Z vertices, a grid size and duration */
|
||||
static CCShatteredTiles3D* create(int nRange, bool bShatterZ, const ccGridSize& gridSize,
|
||||
|
@ -105,10 +96,6 @@ public:
|
|||
virtual CCObject* copyWithZone(CCZone* pZone);
|
||||
|
||||
public:
|
||||
/** creates the action with a random seed, the grid size and the duration
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCShuffleTiles* actionWithSeed(int s, const ccGridSize& gridSize, float duration);
|
||||
/** creates the action with a random seed, the grid size and the duration */
|
||||
static CCShuffleTiles* create(int s, const ccGridSize& gridSize, float duration);
|
||||
protected:
|
||||
|
@ -131,10 +118,6 @@ public:
|
|||
virtual void update(float time);
|
||||
|
||||
public:
|
||||
/** creates the action with the grid size and the duration
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCFadeOutTRTiles* actionWithSize(const ccGridSize& gridSize, float time);
|
||||
|
||||
/** creates the action with the grid size and the duration */
|
||||
static CCFadeOutTRTiles* create(const ccGridSize& gridSize, float time);
|
||||
|
@ -149,10 +132,6 @@ public:
|
|||
virtual float testFunc(const ccGridSize& pos, float time);
|
||||
|
||||
public:
|
||||
/** creates the action with the grid size and the duration
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCFadeOutBLTiles* actionWithSize(const ccGridSize& gridSize, float time);
|
||||
|
||||
/** creates the action with the grid size and the duration */
|
||||
static CCFadeOutBLTiles* create(const ccGridSize& gridSize, float time);
|
||||
|
@ -168,10 +147,6 @@ public:
|
|||
virtual void transformTile(const ccGridSize& pos, float distance);
|
||||
|
||||
public:
|
||||
/** creates the action with the grid size and the duration
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCFadeOutUpTiles* actionWithSize(const ccGridSize& gridSize, float time);
|
||||
/** creates the action with the grid size and the duration */
|
||||
static CCFadeOutUpTiles* create(const ccGridSize& gridSize, float time);
|
||||
|
||||
|
@ -186,10 +161,6 @@ public:
|
|||
virtual float testFunc(const ccGridSize& pos, float time);
|
||||
|
||||
public:
|
||||
/** creates the action with the grid size and the duration
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCFadeOutDownTiles* actionWithSize(const ccGridSize& gridSize, float time);
|
||||
|
||||
/** creates the action with the grid size and the duration */
|
||||
static CCFadeOutDownTiles* create(const ccGridSize& gridSize, float time);
|
||||
|
@ -213,14 +184,6 @@ public:
|
|||
virtual void update(float time);
|
||||
|
||||
public:
|
||||
/** creates the action with the grid size and the duration
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCTurnOffTiles* actionWithSize(const ccGridSize& size, float d);
|
||||
/** creates the action with a random seed, the grid size and the duration
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCTurnOffTiles* actionWithSeed(int s, const ccGridSize& gridSize, float duration);
|
||||
|
||||
/** creates the action with the grid size and the duration */
|
||||
static CCTurnOffTiles* create(const ccGridSize& size, float d);
|
||||
|
@ -252,10 +215,6 @@ public:
|
|||
virtual void update(float time);
|
||||
|
||||
public:
|
||||
/** creates the action with a number of waves, the waves amplitude, the grid size and the duration
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCWavesTiles3D* actionWithWaves(int wav, float amp, const ccGridSize& gridSize, float duration);
|
||||
/** creates the action with a number of waves, the waves amplitude, the grid size and the duration */
|
||||
static CCWavesTiles3D* create(int wav, float amp, const ccGridSize& gridSize, float duration);
|
||||
protected:
|
||||
|
@ -284,10 +243,7 @@ public:
|
|||
virtual void update(float time);
|
||||
|
||||
public:
|
||||
/** creates the action with the number of jumps, the sin amplitude, the grid size and the duration
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCJumpTiles3D* actionWithJumps(int j, float amp, const ccGridSize& gridSize, float duration);
|
||||
|
||||
/** creates the action with the number of jumps, the sin amplitude, the grid size and the duration */
|
||||
static CCJumpTiles3D* create(int j, float amp, const ccGridSize& gridSize, float duration);
|
||||
protected:
|
||||
|
@ -308,10 +264,7 @@ public :
|
|||
virtual void startWithTarget(CCNode *pTarget);
|
||||
|
||||
public:
|
||||
/** creates the action with the number of rows to split and the duration
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCSplitRows* actionWithRows(int nRows, float duration);
|
||||
|
||||
/** creates the action with the number of rows to split and the duration */
|
||||
static CCSplitRows* create(int nRows, float duration);
|
||||
protected:
|
||||
|
@ -331,10 +284,6 @@ public:
|
|||
virtual void startWithTarget(CCNode *pTarget);
|
||||
|
||||
public:
|
||||
/** creates the action with the number of columns to split and the duration
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCSplitCols* actionWithCols(int nCols, float duration);
|
||||
/** creates the action with the number of columns to split and the duration */
|
||||
static CCSplitCols* create(int nCols, float duration);
|
||||
protected:
|
||||
|
|
|
@ -27,11 +27,6 @@ THE SOFTWARE.
|
|||
|
||||
NS_CC_BEGIN
|
||||
|
||||
CCActionTween* CCActionTween::actionWithDuration(float aDuration, const char* key, float from, float to)
|
||||
{
|
||||
return CCActionTween::create(aDuration, key, from, to);
|
||||
}
|
||||
|
||||
CCActionTween* CCActionTween::create(float aDuration, const char* key, float from, float to)
|
||||
{
|
||||
CCActionTween* pRet = new CCActionTween();
|
||||
|
|
|
@ -62,10 +62,6 @@ public:
|
|||
class CC_DLL CCActionTween : public CCActionInterval
|
||||
{
|
||||
public:
|
||||
/** creates an initializes the action with the property name (key), and the from and to parameters.
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCActionTween* actionWithDuration(float aDuration, const char* key, float from, float to);
|
||||
/** creates an initializes the action with the property name (key), and the from and to parameters. */
|
||||
static CCActionTween* create(float aDuration, const char* key, float from, float to);
|
||||
/** initializes the action with the property name (key), and the from and to parameters. */
|
||||
|
|
|
@ -60,12 +60,6 @@ CCAtlasNode::~CCAtlasNode()
|
|||
CC_SAFE_RELEASE(m_pTextureAtlas);
|
||||
}
|
||||
|
||||
CCAtlasNode * CCAtlasNode::atlasWithTileFile(const char *tile, unsigned int tileWidth, unsigned int tileHeight,
|
||||
unsigned int itemsToRender)
|
||||
{
|
||||
return CCAtlasNode::create(tile, tileWidth, tileHeight, itemsToRender);
|
||||
}
|
||||
|
||||
CCAtlasNode * CCAtlasNode::create(const char *tile, unsigned int tileWidth, unsigned int tileHeight,
|
||||
unsigned int itemsToRender)
|
||||
{
|
||||
|
|
|
@ -84,12 +84,6 @@ public:
|
|||
CCAtlasNode();
|
||||
virtual ~CCAtlasNode();
|
||||
|
||||
/** creates a CCAtlasNode with an Atlas file the width and height of each item and the quantity of items to render
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCAtlasNode * atlasWithTileFile(const char* tile,unsigned int tileWidth, unsigned int tileHeight,
|
||||
unsigned int itemsToRender);
|
||||
|
||||
/** creates a CCAtlasNode with an Atlas file the width and height of each item and the quantity of items to render*/
|
||||
static CCAtlasNode * create(const char* tile,unsigned int tileWidth, unsigned int tileHeight,
|
||||
unsigned int itemsToRender);
|
||||
|
|
|
@ -507,11 +507,6 @@ CCRect CCNode::boundingBox()
|
|||
return CCRectApplyAffineTransform(rect, nodeToParentTransform());
|
||||
}
|
||||
|
||||
CCNode * CCNode::node(void)
|
||||
{
|
||||
return CCNode::create();
|
||||
}
|
||||
|
||||
CCNode * CCNode::create(void)
|
||||
{
|
||||
CCNode * pRet = new CCNode();
|
||||
|
|
|
@ -397,12 +397,6 @@ public:
|
|||
|
||||
const char* description(void);
|
||||
|
||||
/** allocates and initializes a node.
|
||||
The node will be created as "autorelease".
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCNode * node(void);
|
||||
|
||||
/** allocates and initializes a node.
|
||||
The node will be created as "autorelease".
|
||||
*/
|
||||
|
|
|
@ -40,11 +40,6 @@ CCArray::CCArray(unsigned int capacity)
|
|||
initWithCapacity(capacity);
|
||||
}
|
||||
|
||||
CCArray* CCArray::array()
|
||||
{
|
||||
return CCArray::create();
|
||||
}
|
||||
|
||||
CCArray* CCArray::create()
|
||||
{
|
||||
CCArray* pArray = new CCArray();
|
||||
|
@ -61,11 +56,6 @@ CCArray* CCArray::create()
|
|||
return pArray;
|
||||
}
|
||||
|
||||
CCArray* CCArray::arrayWithObject(CCObject* pObject)
|
||||
{
|
||||
return CCArray::createWithObject(pObject);
|
||||
}
|
||||
|
||||
CCArray* CCArray::createWithObject(CCObject* pObject)
|
||||
{
|
||||
CCArray* pArray = new CCArray();
|
||||
|
@ -82,32 +72,6 @@ CCArray* CCArray::createWithObject(CCObject* pObject)
|
|||
return pArray;
|
||||
}
|
||||
|
||||
CCArray* CCArray::arrayWithObjects(CCObject* pObject, ...)
|
||||
{
|
||||
va_list args;
|
||||
va_start(args,pObject);
|
||||
|
||||
CCArray* pArray = create();
|
||||
if (pArray && pObject)
|
||||
{
|
||||
pArray->addObject(pObject);
|
||||
CCObject *i = va_arg(args, CCObject*);
|
||||
while(i)
|
||||
{
|
||||
pArray->addObject(i);
|
||||
i = va_arg(args, CCObject*);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
CC_SAFE_DELETE(pArray);
|
||||
}
|
||||
|
||||
va_end(args);
|
||||
|
||||
return pArray;
|
||||
}
|
||||
|
||||
CCArray* CCArray::create(CCObject* pObject, ...)
|
||||
{
|
||||
va_list args;
|
||||
|
@ -134,15 +98,17 @@ CCArray* CCArray::create(CCObject* pObject, ...)
|
|||
return pArray;
|
||||
}
|
||||
|
||||
CCArray* CCArray::arrayWithCapacity(unsigned int capacity)
|
||||
CCArray* CCArray::createWithArray(CCArray* otherArray)
|
||||
{
|
||||
return CCArray::createWithCapacity(capacity);
|
||||
CCArray* pRet = (CCArray*)otherArray->copy();
|
||||
pRet->autorelease();
|
||||
return pRet;
|
||||
}
|
||||
|
||||
CCArray* CCArray::createWithCapacity(unsigned int capacity)
|
||||
{
|
||||
CCArray* pArray = new CCArray();
|
||||
|
||||
|
||||
if (pArray && pArray->initWithCapacity(capacity))
|
||||
{
|
||||
pArray->autorelease();
|
||||
|
@ -151,27 +117,10 @@ CCArray* CCArray::createWithCapacity(unsigned int capacity)
|
|||
{
|
||||
CC_SAFE_DELETE(pArray);
|
||||
}
|
||||
|
||||
|
||||
return pArray;
|
||||
}
|
||||
|
||||
CCArray* CCArray::arrayWithArray(CCArray* otherArray)
|
||||
{
|
||||
return CCArray::createWithArray(otherArray);
|
||||
}
|
||||
|
||||
CCArray* CCArray::createWithArray(CCArray* otherArray)
|
||||
{
|
||||
CCArray* pRet = (CCArray*)otherArray->copy();
|
||||
pRet->autorelease();
|
||||
return pRet;
|
||||
}
|
||||
|
||||
CCArray* CCArray::arrayWithContentsOfFile(const char* pFileName)
|
||||
{
|
||||
return CCArray::createWithContentsOfFile(pFileName);
|
||||
}
|
||||
|
||||
CCArray* CCArray::createWithContentsOfFile(const char* pFileName)
|
||||
{
|
||||
CCArray* pRet = CCArray::createWithContentsOfFileThreadSafe(pFileName);
|
||||
|
@ -184,11 +133,6 @@ CCArray* CCArray::createWithContentsOfFile(const char* pFileName)
|
|||
|
||||
extern CCArray* ccFileUtils_arrayWithContentsOfFileThreadSafe(const char* pFileName);
|
||||
|
||||
CCArray* CCArray::arrayWithContentsOfFileThreadSafe(const char* pFileName)
|
||||
{
|
||||
return CCArray::createWithContentsOfFileThreadSafe(pFileName);
|
||||
}
|
||||
|
||||
CCArray* CCArray::createWithContentsOfFileThreadSafe(const char* pFileName)
|
||||
{
|
||||
return ccFileUtils_arrayWithContentsOfFileThreadSafe(pFileName);
|
||||
|
|
|
@ -114,42 +114,6 @@ class CC_DLL CCArray : public CCObject
|
|||
public:
|
||||
~CCArray();
|
||||
|
||||
/* static functions */
|
||||
/** Create an array
|
||||
@deprecated: Please use create() instead. This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCArray* array();
|
||||
/** Create an array with one object
|
||||
@deprecated: Please use createWithObject(CCObject*) instead. This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCArray* arrayWithObject(CCObject* pObject);
|
||||
/** Create an array with some objects
|
||||
@deprecated: Please use create(CCObject*, ...) instead. This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCArray* arrayWithObjects(CCObject* pObject, ...);
|
||||
/** Create an array with capacity
|
||||
@deprecated: Please use createWithCapacity(unsigned int) instead. This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCArray* arrayWithCapacity(unsigned int capacity);
|
||||
/** Create an array with an existing array
|
||||
@deprecated: Please use createWithArray(CCArray*) instead. This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCArray* arrayWithArray(CCArray* otherArray);
|
||||
/**
|
||||
@brief Generate a CCArray pointer by file
|
||||
@param pFileName The file name of *.plist file
|
||||
@return The CCArray pointer generated from the file
|
||||
@deprecated: Please use createWithContentsOfFile(const char*) instead. This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCArray* arrayWithContentsOfFile(const char* pFileName);
|
||||
|
||||
/*
|
||||
@brief The same meaning as arrayWithContentsOfFile(), but it doesn't call autorelease, so the
|
||||
invoker should call release().
|
||||
@deprecated: Please use createWithContentsOfFileThreadSafe(const char*) instead. This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCArray* arrayWithContentsOfFileThreadSafe(const char* pFileName);
|
||||
|
||||
/** Create an array */
|
||||
static CCArray* create();
|
||||
/** Create an array with some objects */
|
||||
|
|
|
@ -298,9 +298,27 @@ CCObject* CCDictionary::copyWithZone(CCZone* pZone)
|
|||
return pNewDict;
|
||||
}
|
||||
|
||||
CCDictionary* CCDictionary::dictionary()
|
||||
CCObject* CCDictionary::randomObject()
|
||||
{
|
||||
return CCDictionary::create();
|
||||
if (m_eDictType == kCCDictUnknown)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
CCObject* key = allKeys()->randomObject();
|
||||
|
||||
if (m_eDictType == kCCDictInt)
|
||||
{
|
||||
return objectForKey(((CCInteger*)key)->getValue());
|
||||
}
|
||||
else if (m_eDictType == kCCDictStr)
|
||||
{
|
||||
return objectForKey(((CCString*)key)->getCString());
|
||||
}
|
||||
else
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
CCDictionary* CCDictionary::create()
|
||||
|
@ -313,11 +331,6 @@ CCDictionary* CCDictionary::create()
|
|||
return pRet;
|
||||
}
|
||||
|
||||
CCDictionary* CCDictionary::dictionaryWithDictionary(CCDictionary* srcDict)
|
||||
{
|
||||
return CCDictionary::createWithDictionary(srcDict);
|
||||
}
|
||||
|
||||
CCDictionary* CCDictionary::createWithDictionary(CCDictionary* srcDict)
|
||||
{
|
||||
CCDictionary* pNewDict = (CCDictionary*)srcDict->copy();
|
||||
|
@ -327,21 +340,11 @@ CCDictionary* CCDictionary::createWithDictionary(CCDictionary* srcDict)
|
|||
|
||||
extern CCDictionary* ccFileUtils_dictionaryWithContentsOfFileThreadSafe(const char *pFileName);
|
||||
|
||||
CCDictionary* CCDictionary::dictionaryWithContentsOfFileThreadSafe(const char *pFileName)
|
||||
{
|
||||
return CCDictionary::createWithContentsOfFileThreadSafe(pFileName);
|
||||
}
|
||||
|
||||
CCDictionary* CCDictionary::createWithContentsOfFileThreadSafe(const char *pFileName)
|
||||
{
|
||||
return ccFileUtils_dictionaryWithContentsOfFileThreadSafe(pFileName);
|
||||
}
|
||||
|
||||
CCDictionary* CCDictionary::dictionaryWithContentsOfFile(const char *pFileName)
|
||||
{
|
||||
return CCDictionary::createWithContentsOfFile(pFileName);
|
||||
}
|
||||
|
||||
CCDictionary* CCDictionary::createWithContentsOfFile(const char *pFileName)
|
||||
{
|
||||
CCDictionary* pRet = createWithContentsOfFileThreadSafe(pFileName);
|
||||
|
|
|
@ -140,28 +140,9 @@ public:
|
|||
|
||||
virtual CCObject* copyWithZone(CCZone* pZone);
|
||||
|
||||
/* static functions */
|
||||
//@deprecated: Please use create() instead. This interface will be deprecated sooner or later.
|
||||
CC_DEPRECATED_ATTRIBUTE static CCDictionary* dictionary();
|
||||
|
||||
//@deprecated: Please use createWithDictionary(CCDictionary*) instead. This interface will be deprecated sooner or later.
|
||||
CC_DEPRECATED_ATTRIBUTE static CCDictionary* dictionaryWithDictionary(CCDictionary* srcDict);
|
||||
/** Returns a random element */
|
||||
CCObject* randomObject();
|
||||
|
||||
/**
|
||||
@brief Generate a CCDictionary pointer by file
|
||||
@param pFileName The file name of *.plist file
|
||||
@return The CCDictionary pointer generated from the file
|
||||
@deprecated: Please use createWithContentsOfFile(const char*) instead. This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCDictionary* dictionaryWithContentsOfFile(const char *pFileName);
|
||||
|
||||
/*
|
||||
@brief The same meaning as dictionaryWithContentsOfFile(), but it doesn't call autorelease, so the
|
||||
invoker should call release().
|
||||
@deprecated: Please use createWithContentsOfFileThreadSafe(const char*) instead. This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCDictionary* dictionaryWithContentsOfFileThreadSafe(const char *pFileName);
|
||||
|
||||
static CCDictionary* create();
|
||||
|
||||
static CCDictionary* createWithDictionary(CCDictionary* srcDict);
|
||||
|
|
|
@ -67,11 +67,6 @@ bool CCPoint::equals(const CCPoint& target) const
|
|||
return ((x == target.x) && (y == target.y));
|
||||
}
|
||||
|
||||
bool CCPoint::CCPointEqualToPoint(const CCPoint& point1, const CCPoint& point2)
|
||||
{
|
||||
return point1.equals(point2);
|
||||
}
|
||||
|
||||
// implementation of CCSize
|
||||
|
||||
CCSize::CCSize(void)
|
||||
|
@ -113,12 +108,6 @@ bool CCSize::equals(const CCSize& target) const
|
|||
return ((width == target.width) && (height == target.height));
|
||||
}
|
||||
|
||||
|
||||
bool CCSize::CCSizeEqualToSize(const CCSize& size1, const CCSize& size2)
|
||||
{
|
||||
return size1.equals(size2);
|
||||
}
|
||||
|
||||
// implementation of CCRect
|
||||
|
||||
CCRect::CCRect(void)
|
||||
|
@ -218,25 +207,4 @@ bool CCRect::intersectsRect(const CCRect& rect) const
|
|||
rect.getMaxY() < getMinY());
|
||||
}
|
||||
|
||||
bool CCRect::CCRectEqualToRect(const CCRect& rect1, const CCRect& rect2)
|
||||
{
|
||||
return rect1.equals(rect2);
|
||||
}
|
||||
|
||||
bool CCRect::CCRectContainsPoint(const CCRect& rect, const CCPoint& point)
|
||||
{
|
||||
return rect.containsPoint(point);
|
||||
}
|
||||
|
||||
bool CCRect::CCRectIntersectsRect(const CCRect& rectA, const CCRect& rectB)
|
||||
{
|
||||
/*
|
||||
return !(CCRectGetMaxX(rectA) < CCRectGetMinX(rectB)||
|
||||
CCRectGetMaxX(rectB) < CCRectGetMinX(rectA)||
|
||||
CCRectGetMaxY(rectA) < CCRectGetMinY(rectB)||
|
||||
CCRectGetMaxY(rectB) < CCRectGetMinY(rectA));
|
||||
*/
|
||||
return rectA.intersectsRect(rectB);
|
||||
}
|
||||
|
||||
NS_CC_END
|
||||
|
|
|
@ -49,11 +49,6 @@ public:
|
|||
void setPoint(float x, float y);
|
||||
virtual CCObject* copyWithZone(CCZone* pZone);
|
||||
bool equals(const CCPoint& target) const;
|
||||
|
||||
public:
|
||||
/** @deprecated use CCPoint::equals(const CCPoint&) instead, like p1.equals(p2)
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static bool CCPointEqualToPoint(const CCPoint& point1, const CCPoint& point2);
|
||||
};
|
||||
|
||||
class CC_DLL CCSize : public CCObject
|
||||
|
@ -70,10 +65,6 @@ public:
|
|||
void setSize(float width, float height);
|
||||
virtual CCObject* copyWithZone(CCZone* pZone);
|
||||
bool equals(const CCSize& target) const;
|
||||
|
||||
public:
|
||||
/** @deprecated use CCSize::equals(const CCSize&) instead, like size1.equals(size2) */
|
||||
CC_DEPRECATED_ATTRIBUTE static bool CCSizeEqualToSize(const CCSize& size1, const CCSize& size2);
|
||||
};
|
||||
|
||||
class CC_DLL CCRect : public CCObject
|
||||
|
@ -98,14 +89,6 @@ public:
|
|||
bool equals(const CCRect& rect) const;
|
||||
bool containsPoint(const CCPoint& point) const;
|
||||
bool intersectsRect(const CCRect& rect) const;
|
||||
|
||||
public:
|
||||
/** @deprecated use CCRect::equals(const CCRect&) instead, like r1.equals(r2) */
|
||||
CC_DEPRECATED_ATTRIBUTE static bool CCRectEqualToRect(const CCRect& rect1, const CCRect& rect2);
|
||||
/** @deprecated use CCRect::containsPoint(const CCPoint&) instead, like rect.containsPoint(point) */
|
||||
CC_DEPRECATED_ATTRIBUTE static bool CCRectContainsPoint(const CCRect& rect, const CCPoint& point);
|
||||
/** @deprecated use CCRect::intersectsRect(const CCRect&) instead, like r1.intersectsRect(r2) */
|
||||
CC_DEPRECATED_ATTRIBUTE static bool CCRectIntersectsRect(const CCRect& rectA, const CCRect& rectB);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -17,12 +17,6 @@ public:
|
|||
: m_nValue(v) {}
|
||||
int getValue() const {return m_nValue;}
|
||||
|
||||
// @deprecated: This interface will be deprecated sooner or later.
|
||||
CC_DEPRECATED_ATTRIBUTE static CCInteger* integerWithInt(int v)
|
||||
{
|
||||
return CCInteger::create(v);
|
||||
}
|
||||
|
||||
static CCInteger* create(int v)
|
||||
{
|
||||
CCInteger* pRet = new CCInteger(v);
|
||||
|
|
|
@ -52,18 +52,7 @@ CCSet::CCSet(const CCSet &rSetObject)
|
|||
|
||||
CCSet::~CCSet(void)
|
||||
{
|
||||
// call release() of elements
|
||||
CCSetIterator iter;
|
||||
for (iter = m_pSet->begin(); iter != m_pSet->end(); ++iter)
|
||||
{
|
||||
if (! (*iter))
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
(*iter)->release();
|
||||
}
|
||||
|
||||
removeAllObjects();
|
||||
CC_SAFE_DELETE(m_pSet);
|
||||
}
|
||||
|
||||
|
@ -96,6 +85,20 @@ void CCSet::removeObject(CCObject *pObject)
|
|||
CC_SAFE_RELEASE(pObject);
|
||||
}
|
||||
|
||||
void CCSet::removeAllObjects()
|
||||
{
|
||||
CCSetIterator it;
|
||||
for (it = m_pSet->begin(); it != m_pSet->end(); ++it)
|
||||
{
|
||||
if (! (*it))
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
(*it)->release();
|
||||
}
|
||||
}
|
||||
|
||||
bool CCSet::containsObject(CCObject *pObject)
|
||||
{
|
||||
return m_pSet->find(pObject) != m_pSet->end();
|
||||
|
|
|
@ -64,6 +64,10 @@ public:
|
|||
*@brief Remove the given element, nothing todo if no element equals pObject.
|
||||
*/
|
||||
void removeObject(CCObject *pObject);
|
||||
/**
|
||||
*@brief Remove all elements of the set
|
||||
*/
|
||||
void removeAllObjects();
|
||||
/**
|
||||
*@brief Check if CCSet contains a element equals pObject.
|
||||
*/
|
||||
|
|
|
@ -150,11 +150,6 @@ bool CCString::isEqual(const CCObject* pObject)
|
|||
return bRet;
|
||||
}
|
||||
|
||||
CCString* CCString::stringWithCString(const char* pStr)
|
||||
{
|
||||
return CCString::create(pStr);
|
||||
}
|
||||
|
||||
CCString* CCString::create(const std::string& str)
|
||||
{
|
||||
CCString* pRet = new CCString(str);
|
||||
|
@ -162,18 +157,6 @@ CCString* CCString::create(const std::string& str)
|
|||
return pRet;
|
||||
}
|
||||
|
||||
CCString* CCString::stringWithString(const std::string& pStr)
|
||||
{
|
||||
CCString* pRet = new CCString(pStr);
|
||||
pRet->autorelease();
|
||||
return pRet;
|
||||
}
|
||||
|
||||
CCString* CCString::stringWithData(const unsigned char* pData, unsigned long nLen)
|
||||
{
|
||||
return CCString::createWithData(pData, nLen);
|
||||
}
|
||||
|
||||
CCString* CCString::createWithData(const unsigned char* pData, unsigned long nLen)
|
||||
{
|
||||
CCString* pRet = NULL;
|
||||
|
@ -195,17 +178,6 @@ CCString* CCString::createWithData(const unsigned char* pData, unsigned long nLe
|
|||
return pRet;
|
||||
}
|
||||
|
||||
CCString* CCString::stringWithFormat(const char* format, ...)
|
||||
{
|
||||
CCString* pRet = CCString::create("");
|
||||
va_list ap;
|
||||
va_start(ap, format);
|
||||
pRet->initWithFormatAndValist(format, ap);
|
||||
va_end(ap);
|
||||
|
||||
return pRet;
|
||||
}
|
||||
|
||||
CCString* CCString::createWithFormat(const char* format, ...)
|
||||
{
|
||||
CCString* pRet = CCString::create("");
|
||||
|
@ -217,11 +189,6 @@ CCString* CCString::createWithFormat(const char* format, ...)
|
|||
return pRet;
|
||||
}
|
||||
|
||||
CCString* CCString::stringWithContentsOfFile(const char* pszFileName)
|
||||
{
|
||||
return CCString::createWithContentsOfFile(pszFileName);
|
||||
}
|
||||
|
||||
CCString* CCString::createWithContentsOfFile(const char* pszFileName)
|
||||
{
|
||||
unsigned long size = 0;
|
||||
|
|
|
@ -84,42 +84,6 @@ public:
|
|||
virtual CCObject* copyWithZone(CCZone* pZone);
|
||||
virtual bool isEqual(const CCObject* pObject);
|
||||
|
||||
/* static functions */
|
||||
/** create a string with c string
|
||||
* @return A CCString pointer which is an autorelease object pointer,
|
||||
* it means that you needn't do a release operation unless you retain it.
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCString* stringWithCString(const char* pStr);
|
||||
|
||||
/** create a string with std::string
|
||||
* @return A CCString pointer which is an autorelease object pointer,
|
||||
* it means that you needn't do a release operation unless you retain it.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCString* stringWithString(const std::string& str);
|
||||
|
||||
/** create a string with format, it's similar with the c function 'sprintf', the default buffer size is (1024*100) bytes,
|
||||
* if you want to change it, you should modify the kMaxStringLen macro in CCString.cpp file.
|
||||
* @return A CCString pointer which is an autorelease object pointer,
|
||||
* it means that you needn't do a release operation unless you retain it.
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCString* stringWithFormat(const char* format, ...);
|
||||
|
||||
/** create a string with binary data
|
||||
* @return A CCString pointer which is an autorelease object pointer,
|
||||
* it means that you needn't do a release operation unless you retain it.
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCString* stringWithData(const unsigned char* pData, unsigned long nLen);
|
||||
|
||||
/** create a string with a file,
|
||||
* @return A CCString pointer which is an autorelease object pointer,
|
||||
* it means that you needn't do a release operation unless you retain it.
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCString* stringWithContentsOfFile(const char* pszFileName);
|
||||
|
||||
/** create a string with std string, you can also pass a c string pointer because the default constructor of std::string can access a c string pointer.
|
||||
* @return A CCString pointer which is an autorelease object pointer,
|
||||
* it means that you needn't do a release operation unless you retain it.
|
||||
|
|
|
@ -39,11 +39,6 @@ THE SOFTWARE.
|
|||
NS_CC_BEGIN
|
||||
// implementation of CCGridBase
|
||||
|
||||
CCGridBase* CCGridBase::gridWithSize(const ccGridSize& gridSize)
|
||||
{
|
||||
return CCGridBase::create(gridSize);
|
||||
}
|
||||
|
||||
CCGridBase* CCGridBase::create(const ccGridSize& gridSize)
|
||||
{
|
||||
CCGridBase *pGridBase = new CCGridBase();
|
||||
|
@ -63,11 +58,6 @@ CCGridBase* CCGridBase::create(const ccGridSize& gridSize)
|
|||
return pGridBase;
|
||||
}
|
||||
|
||||
CCGridBase* CCGridBase::gridWithSize(const ccGridSize& gridSize, CCTexture2D *texture, bool flipped)
|
||||
{
|
||||
return CCGridBase::create(gridSize, texture, flipped);
|
||||
}
|
||||
|
||||
CCGridBase* CCGridBase::create(const ccGridSize& gridSize, CCTexture2D *texture, bool flipped)
|
||||
{
|
||||
CCGridBase *pGridBase = new CCGridBase();
|
||||
|
@ -263,10 +253,6 @@ void CCGridBase::calculateVertexPoints(void)
|
|||
}
|
||||
|
||||
// implementation of CCGrid3D
|
||||
CCGrid3D* CCGrid3D::gridWithSize(const ccGridSize& gridSize, CCTexture2D *pTexture, bool bFlipped)
|
||||
{
|
||||
return CCGrid3D::create(gridSize, pTexture, bFlipped);
|
||||
}
|
||||
|
||||
CCGrid3D* CCGrid3D::create(const ccGridSize& gridSize, CCTexture2D *pTexture, bool bFlipped)
|
||||
{
|
||||
|
@ -288,11 +274,6 @@ CCGrid3D* CCGrid3D::create(const ccGridSize& gridSize, CCTexture2D *pTexture, bo
|
|||
return pRet;
|
||||
}
|
||||
|
||||
CCGrid3D* CCGrid3D::gridWithSize(const ccGridSize& gridSize)
|
||||
{
|
||||
return CCGrid3D::create(gridSize);
|
||||
}
|
||||
|
||||
CCGrid3D* CCGrid3D::create(const ccGridSize& gridSize)
|
||||
{
|
||||
CCGrid3D *pRet= new CCGrid3D();
|
||||
|
@ -486,11 +467,6 @@ CCTiledGrid3D::~CCTiledGrid3D(void)
|
|||
CC_SAFE_FREE(m_pIndices);
|
||||
}
|
||||
|
||||
CCTiledGrid3D* CCTiledGrid3D::gridWithSize(const ccGridSize& gridSize, CCTexture2D *pTexture, bool bFlipped)
|
||||
{
|
||||
return CCTiledGrid3D::create(gridSize, pTexture, bFlipped);
|
||||
}
|
||||
|
||||
CCTiledGrid3D* CCTiledGrid3D::create(const ccGridSize& gridSize, CCTexture2D *pTexture, bool bFlipped)
|
||||
{
|
||||
CCTiledGrid3D *pRet= new CCTiledGrid3D();
|
||||
|
@ -511,11 +487,6 @@ CCTiledGrid3D* CCTiledGrid3D::create(const ccGridSize& gridSize, CCTexture2D *pT
|
|||
return pRet;
|
||||
}
|
||||
|
||||
CCTiledGrid3D* CCTiledGrid3D::gridWithSize(const ccGridSize& gridSize)
|
||||
{
|
||||
return CCTiledGrid3D::create(gridSize);
|
||||
}
|
||||
|
||||
CCTiledGrid3D* CCTiledGrid3D::create(const ccGridSize& gridSize)
|
||||
{
|
||||
CCTiledGrid3D *pRet= new CCTiledGrid3D();
|
||||
|
|
|
@ -81,14 +81,6 @@ public:
|
|||
virtual void calculateVertexPoints(void);
|
||||
|
||||
public:
|
||||
/** create one Grid
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCGridBase* gridWithSize(const ccGridSize& gridSize, CCTexture2D *texture, bool flipped);
|
||||
/** create one Grid
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCGridBase* gridWithSize(const ccGridSize& gridSize);
|
||||
|
||||
/** create one Grid */
|
||||
static CCGridBase* create(const ccGridSize& gridSize, CCTexture2D *texture, bool flipped);
|
||||
|
@ -130,13 +122,6 @@ public:
|
|||
virtual void calculateVertexPoints(void);
|
||||
|
||||
public:
|
||||
/** @deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCGrid3D* gridWithSize(const ccGridSize& gridSize, CCTexture2D *pTexture, bool bFlipped);
|
||||
/** @deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCGrid3D* gridWithSize(const ccGridSize& gridSize);
|
||||
|
||||
/** create one Grid */
|
||||
static CCGrid3D* create(const ccGridSize& gridSize, CCTexture2D *pTexture, bool bFlipped);
|
||||
/** create one Grid */
|
||||
|
@ -171,8 +156,7 @@ public:
|
|||
virtual void calculateVertexPoints(void);
|
||||
|
||||
public:
|
||||
CC_DEPRECATED_ATTRIBUTE static CCTiledGrid3D* gridWithSize(const ccGridSize& gridSize, CCTexture2D *pTexture, bool bFlipped);
|
||||
CC_DEPRECATED_ATTRIBUTE static CCTiledGrid3D* gridWithSize(const ccGridSize& gridSize);
|
||||
|
||||
/** create one Grid */
|
||||
static CCTiledGrid3D* create(const ccGridSize& gridSize, CCTexture2D *pTexture, bool bFlipped);
|
||||
/** create one Grid */
|
||||
|
|
|
@ -107,7 +107,7 @@ To enabled set it to 1. Disabled by default.
|
|||
Default value: 0.1f
|
||||
*/
|
||||
#ifndef CC_DIRECTOR_STATS_INTERVAL
|
||||
#define CC_DIRECTOR_STATS_INTERVAL (0.1f)
|
||||
#define CC_DIRECTOR_STATS_INTERVAL (0.5f)
|
||||
#endif
|
||||
|
||||
/** @def CC_DIRECTOR_FPS_POSITION
|
||||
|
|
|
@ -41,10 +41,6 @@ THE SOFTWARE.
|
|||
NS_CC_BEGIN
|
||||
|
||||
//CCLabelAtlas - Creation & Init
|
||||
CCLabelAtlas* CCLabelAtlas::labelWithString(const char *string, const char *charMapFile, unsigned int itemWidth, int unsigned itemHeight, unsigned int startCharMap)
|
||||
{
|
||||
return CCLabelAtlas::create(string, charMapFile, itemWidth, itemHeight, startCharMap);
|
||||
}
|
||||
|
||||
CCLabelAtlas* CCLabelAtlas::create(const char *string, const char *charMapFile, unsigned int itemWidth, int unsigned itemHeight, unsigned int startCharMap)
|
||||
{
|
||||
|
@ -70,11 +66,6 @@ bool CCLabelAtlas::initWithString(const char *string, const char *charMapFile, u
|
|||
return false;
|
||||
}
|
||||
|
||||
CCLabelAtlas* CCLabelAtlas::labelWithString(const char *string, const char *fntFile)
|
||||
{
|
||||
return CCLabelAtlas::create(string, fntFile);
|
||||
}
|
||||
|
||||
CCLabelAtlas* CCLabelAtlas::create(const char *string, const char *fntFile)
|
||||
{
|
||||
CCLabelAtlas *ret = new CCLabelAtlas();
|
||||
|
|
|
@ -58,16 +58,6 @@ public:
|
|||
{
|
||||
m_sString.clear();
|
||||
}
|
||||
/** creates the CCLabelAtlas with a string, a char map file(the atlas), the width and height of each element and the starting char of the atlas
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCLabelAtlas * labelWithString(const char *string, const char *charMapFile, unsigned int itemWidth, unsigned int itemHeight, unsigned int startCharMap);
|
||||
|
||||
/** creates the CCLabelAtlas with a string and a configuration file
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
@since v2.0
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCLabelAtlas* labelWithString(const char *string, const char *fntFile);
|
||||
|
||||
/** creates the CCLabelAtlas with a string, a char map file(the atlas), the width and height of each element and the starting char of the atlas */
|
||||
static CCLabelAtlas * create(const char *string, const char *charMapFile, unsigned int itemWidth, unsigned int itemHeight, unsigned int startCharMap);
|
||||
|
|
|
@ -388,11 +388,6 @@ void FNTConfigRemoveCache( void )
|
|||
//BitmapFontConfiguration
|
||||
//
|
||||
|
||||
CCBMFontConfiguration * CCBMFontConfiguration::configurationWithFNTFile(const char *FNTfile)
|
||||
{
|
||||
return CCBMFontConfiguration::create(FNTfile);
|
||||
}
|
||||
|
||||
CCBMFontConfiguration * CCBMFontConfiguration::create(const char *FNTfile)
|
||||
{
|
||||
CCBMFontConfiguration * pRet = new CCBMFontConfiguration();
|
||||
|
@ -714,11 +709,6 @@ void CCLabelBMFont::purgeCachedData()
|
|||
FNTConfigRemoveCache();
|
||||
}
|
||||
|
||||
CCLabelBMFont * CCLabelBMFont::node()
|
||||
{
|
||||
return CCLabelBMFont::create();
|
||||
}
|
||||
|
||||
CCLabelBMFont * CCLabelBMFont::create()
|
||||
{
|
||||
CCLabelBMFont * pRet = new CCLabelBMFont();
|
||||
|
@ -746,11 +736,6 @@ CCLabelBMFont * CCLabelBMFont::create(const char *str, const char *fntFile)
|
|||
return CCLabelBMFont::create(str, fntFile, kCCLabelAutomaticWidth, kCCTextAlignmentLeft, CCPointZero);
|
||||
}
|
||||
|
||||
CCLabelBMFont *CCLabelBMFont::labelWithString(const char *str, const char *fntFile, float width/* = kCCLabelAutomaticWidth*/, CCTextAlignment alignment/* = kCCTextAlignmentLeft*/, CCPoint imageOffset/* = CCPointZero*/)
|
||||
{
|
||||
return CCLabelBMFont::create(str, fntFile, width, alignment, imageOffset);
|
||||
}
|
||||
|
||||
//LabelBMFont - Creation & Init
|
||||
CCLabelBMFont *CCLabelBMFont::create(const char *str, const char *fntFile, float width/* = kCCLabelAutomaticWidth*/, CCTextAlignment alignment/* = kCCTextAlignmentLeft*/, CCPoint imageOffset/* = CCPointZero*/)
|
||||
{
|
||||
|
|
|
@ -127,10 +127,6 @@ public:
|
|||
CCBMFontConfiguration();
|
||||
virtual ~CCBMFontConfiguration();
|
||||
const char * description();
|
||||
/** allocates a CCBMFontConfiguration with a FNT file
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCBMFontConfiguration * configurationWithFNTFile(const char *FNTfile);
|
||||
|
||||
/** allocates a CCBMFontConfiguration with a FNT file */
|
||||
static CCBMFontConfiguration * create(const char *FNTfile);
|
||||
|
@ -224,10 +220,7 @@ public:
|
|||
@since v0.99.3
|
||||
*/
|
||||
static void purgeCachedData();
|
||||
/** creates a bitmap font atlas with an initial string and the FNT file
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCLabelBMFont * labelWithString(const char *str, const char *fntFile, float width = kCCLabelAutomaticWidth, CCTextAlignment alignment = kCCTextAlignmentLeft, CCPoint imageOffset = CCPointZero);
|
||||
|
||||
/** creates a bitmap font atlas with an initial string and the FNT file */
|
||||
static CCLabelBMFont * create(const char *str, const char *fntFile, float width, CCTextAlignment alignment, CCPoint imageOffset);
|
||||
|
||||
|
@ -237,11 +230,6 @@ public:
|
|||
|
||||
static CCLabelBMFont * create(const char *str, const char *fntFile);
|
||||
|
||||
/** Creates an label.
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCLabelBMFont * node();
|
||||
|
||||
/** Creates an label.
|
||||
*/
|
||||
static CCLabelBMFont * create();
|
||||
|
|
|
@ -72,36 +72,18 @@ CCLabelTTF * CCLabelTTF::create()
|
|||
return pRet;
|
||||
}
|
||||
|
||||
CCLabelTTF * CCLabelTTF::labelWithString(const char *string, const char *fontName, float fontSize)
|
||||
{
|
||||
return CCLabelTTF::create(string, fontName, fontSize);
|
||||
}
|
||||
|
||||
CCLabelTTF * CCLabelTTF::create(const char *string, const char *fontName, float fontSize)
|
||||
{
|
||||
return CCLabelTTF::create(string, fontName, fontSize,
|
||||
CCSizeZero, kCCTextAlignmentCenter, kCCVerticalTextAlignmentTop);
|
||||
}
|
||||
|
||||
CCLabelTTF * CCLabelTTF::labelWithString(const char *string, const CCSize& dimensions, CCTextAlignment hAlignment, const char *fontName, float fontSize)
|
||||
{
|
||||
return CCLabelTTF::create(string, fontName, fontSize,
|
||||
dimensions, hAlignment, kCCVerticalTextAlignmentTop);
|
||||
}
|
||||
|
||||
CCLabelTTF * CCLabelTTF::create(const char *string, const char *fontName, float fontSize,
|
||||
const CCSize& dimensions, CCTextAlignment hAlignment)
|
||||
{
|
||||
return CCLabelTTF::create(string, fontName, fontSize, dimensions, hAlignment, kCCVerticalTextAlignmentTop);
|
||||
}
|
||||
|
||||
CCLabelTTF* CCLabelTTF::labelWithString(const char *string, const cocos2d::CCSize &dimensions,
|
||||
CCTextAlignment hAlignment, CCVerticalTextAlignment vAlignment,
|
||||
const char *fontName, float fontSize)
|
||||
{
|
||||
return CCLabelTTF::create(string, fontName, fontSize, dimensions, hAlignment, vAlignment);
|
||||
}
|
||||
|
||||
CCLabelTTF* CCLabelTTF::create(const char *string, const char *fontName, float fontSize,
|
||||
const CCSize &dimensions, CCTextAlignment hAlignment,
|
||||
CCVerticalTextAlignment vAlignment)
|
||||
|
|
|
@ -50,22 +50,6 @@ public:
|
|||
virtual ~CCLabelTTF();
|
||||
const char* description();
|
||||
|
||||
/** creates a CCLabelTTF with a font name and font size in points
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCLabelTTF * labelWithString(const char *string, const char *fontName, float fontSize);
|
||||
|
||||
/** creates a CCLabelTTF from a fontname, horizontal alignment, dimension in points, and font size in points.
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
@since v1.0
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCLabelTTF * labelWithString(const char *string, const CCSize& dimensions, CCTextAlignment hAlignment, const char *fontName, float fontSize);
|
||||
|
||||
/** creates a CCLabel from a fontname, alignment, dimension in points and font size in points
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCLabelTTF * labelWithString(const char *string, const CCSize& dimensions, CCTextAlignment hAlignment, CCVerticalTextAlignment vAlignment, const char *fontName, float fontSize);
|
||||
|
||||
/** creates a CCLabelTTF with a font name and font size in points
|
||||
@since v2.0.1
|
||||
*/
|
||||
|
|
|
@ -46,7 +46,9 @@ CCLayer::CCLayer()
|
|||
: m_bTouchEnabled(false)
|
||||
, m_bAccelerometerEnabled(false)
|
||||
, m_bKeypadEnabled(false)
|
||||
, m_pScriptHandlerEntry(NULL)
|
||||
,m_pScriptTouchHandlerEntry(NULL)
|
||||
,m_pScriptKeypadHandlerEntry(NULL)
|
||||
,m_pScriptAccelerateHandlerEntry(NULL)
|
||||
, m_eTouchMode(kCCTouchesAllAtOnce)
|
||||
, m_nTouchPriority(0)
|
||||
{
|
||||
|
@ -57,6 +59,8 @@ CCLayer::CCLayer()
|
|||
CCLayer::~CCLayer()
|
||||
{
|
||||
unregisterScriptTouchHandler();
|
||||
unregisterScriptKeypadHandler();
|
||||
unregisterScriptAccelerateHandler();
|
||||
}
|
||||
|
||||
bool CCLayer::init()
|
||||
|
@ -75,11 +79,6 @@ bool CCLayer::init()
|
|||
return bRet;
|
||||
}
|
||||
|
||||
CCLayer *CCLayer::node()
|
||||
{
|
||||
return CCLayer::create();
|
||||
}
|
||||
|
||||
CCLayer *CCLayer::create()
|
||||
{
|
||||
CCLayer *pRet = new CCLayer();
|
||||
|
@ -102,19 +101,19 @@ void CCLayer::registerWithTouchDispatcher()
|
|||
CCTouchDispatcher* pDispatcher = CCDirector::sharedDirector()->getTouchDispatcher();
|
||||
|
||||
// Using LuaBindings
|
||||
if (m_pScriptHandlerEntry)
|
||||
if (m_pScriptTouchHandlerEntry)
|
||||
{
|
||||
if (m_pScriptHandlerEntry->isMultiTouches())
|
||||
if (m_pScriptTouchHandlerEntry->isMultiTouches())
|
||||
{
|
||||
pDispatcher->addStandardDelegate(this, 0);
|
||||
LUALOG("[LUA] Add multi-touches event handler: %d", m_pScriptHandlerEntry->getHandler());
|
||||
LUALOG("[LUA] Add multi-touches event handler: %d", m_pScriptTouchHandlerEntry->getHandler());
|
||||
}
|
||||
else
|
||||
{
|
||||
pDispatcher->addTargetedDelegate(this,
|
||||
m_pScriptHandlerEntry->getPriority(),
|
||||
m_pScriptHandlerEntry->getSwallowsTouches());
|
||||
LUALOG("[LUA] Add touch event handler: %d", m_pScriptHandlerEntry->getHandler());
|
||||
m_pScriptTouchHandlerEntry->getPriority(),
|
||||
m_pScriptTouchHandlerEntry->getSwallowsTouches());
|
||||
LUALOG("[LUA] Add touch event handler: %d", m_pScriptTouchHandlerEntry->getHandler());
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -130,13 +129,13 @@ void CCLayer::registerWithTouchDispatcher()
|
|||
void CCLayer::registerScriptTouchHandler(int nHandler, bool bIsMultiTouches, int nPriority, bool bSwallowsTouches)
|
||||
{
|
||||
unregisterScriptTouchHandler();
|
||||
m_pScriptHandlerEntry = CCTouchScriptHandlerEntry::create(nHandler, bIsMultiTouches, nPriority, bSwallowsTouches);
|
||||
m_pScriptHandlerEntry->retain();
|
||||
m_pScriptTouchHandlerEntry = CCTouchScriptHandlerEntry::create(nHandler, bIsMultiTouches, nPriority, bSwallowsTouches);
|
||||
m_pScriptTouchHandlerEntry->retain();
|
||||
}
|
||||
|
||||
void CCLayer::unregisterScriptTouchHandler(void)
|
||||
{
|
||||
CC_SAFE_RELEASE_NULL(m_pScriptHandlerEntry);
|
||||
CC_SAFE_RELEASE_NULL(m_pScriptTouchHandlerEntry);
|
||||
}
|
||||
|
||||
int CCLayer::excuteScriptTouchHandler(int nEventType, CCTouch *pTouch)
|
||||
|
@ -262,6 +261,17 @@ void CCLayer::didAccelerate(CCAcceleration* pAccelerationValue)
|
|||
}
|
||||
}
|
||||
|
||||
void CCLayer::registerScriptAccelerateHandler(int nHandler)
|
||||
{
|
||||
unregisterScriptAccelerateHandler();
|
||||
m_pScriptAccelerateHandlerEntry = CCScriptHandlerEntry::create(nHandler);
|
||||
m_pScriptAccelerateHandlerEntry->retain();
|
||||
}
|
||||
|
||||
void CCLayer::unregisterScriptAccelerateHandler(void)
|
||||
{
|
||||
CC_SAFE_RELEASE_NULL(m_pScriptAccelerateHandlerEntry);
|
||||
}
|
||||
|
||||
/// isKeypadEnabled getter
|
||||
bool CCLayer::isKeypadEnabled()
|
||||
|
@ -290,6 +300,34 @@ void CCLayer::setKeypadEnabled(bool enabled)
|
|||
}
|
||||
}
|
||||
|
||||
void CCLayer::registerScriptKeypadHandler(int nHandler)
|
||||
{
|
||||
unregisterScriptKeypadHandler();
|
||||
m_pScriptKeypadHandlerEntry = CCScriptHandlerEntry::create(nHandler);
|
||||
m_pScriptKeypadHandlerEntry->retain();
|
||||
}
|
||||
|
||||
void CCLayer::unregisterScriptKeypadHandler(void)
|
||||
{
|
||||
CC_SAFE_RELEASE_NULL(m_pScriptKeypadHandlerEntry);
|
||||
}
|
||||
|
||||
void CCLayer::keyBackClicked(void)
|
||||
{
|
||||
if (m_pScriptKeypadHandlerEntry)
|
||||
{
|
||||
CCScriptEngineManager::sharedManager()->getScriptEngine()->executeLayerKeypadEvent(this, kTypeBackClicked);
|
||||
}
|
||||
}
|
||||
|
||||
void CCLayer::keyMenuClicked(void)
|
||||
{
|
||||
if (m_pScriptKeypadHandlerEntry)
|
||||
{
|
||||
CCScriptEngineManager::sharedManager()->getScriptEngine()->executeLayerKeypadEvent(this, kTypeMenuClicked);
|
||||
}
|
||||
}
|
||||
|
||||
/// Callbacks
|
||||
void CCLayer::onEnter()
|
||||
{
|
||||
|
@ -522,11 +560,6 @@ CCLayerColor* CCLayerColor::create()
|
|||
return pRet;
|
||||
}
|
||||
|
||||
CCLayerColor * CCLayerColor::layerWithColor(const ccColor4B& color, GLfloat width, GLfloat height)
|
||||
{
|
||||
return CCLayerColor::create(color,width,height);
|
||||
}
|
||||
|
||||
CCLayerColor * CCLayerColor::create(const ccColor4B& color, GLfloat width, GLfloat height)
|
||||
{
|
||||
CCLayerColor * pLayer = new CCLayerColor();
|
||||
|
@ -539,11 +572,6 @@ CCLayerColor * CCLayerColor::create(const ccColor4B& color, GLfloat width, GLflo
|
|||
return NULL;
|
||||
}
|
||||
|
||||
CCLayerColor * CCLayerColor::layerWithColor(const ccColor4B& color)
|
||||
{
|
||||
return CCLayerColor::create(color);
|
||||
}
|
||||
|
||||
CCLayerColor * CCLayerColor::create(const ccColor4B& color)
|
||||
{
|
||||
CCLayerColor * pLayer = new CCLayerColor();
|
||||
|
@ -655,11 +683,6 @@ void CCLayerColor::draw()
|
|||
// CCLayerGradient
|
||||
//
|
||||
|
||||
CCLayerGradient* CCLayerGradient::layerWithColor(const ccColor4B& start, const ccColor4B& end)
|
||||
{
|
||||
return CCLayerGradient::create(start, end);
|
||||
}
|
||||
|
||||
CCLayerGradient* CCLayerGradient::create(const ccColor4B& start, const ccColor4B& end)
|
||||
{
|
||||
CCLayerGradient * pLayer = new CCLayerGradient();
|
||||
|
@ -672,11 +695,6 @@ CCLayerGradient* CCLayerGradient::create(const ccColor4B& start, const ccColor4B
|
|||
return NULL;
|
||||
}
|
||||
|
||||
CCLayerGradient* CCLayerGradient::layerWithColor(const ccColor4B& start, const ccColor4B& end, const CCPoint& v)
|
||||
{
|
||||
return CCLayerGradient::create(start, end, v);
|
||||
}
|
||||
|
||||
CCLayerGradient* CCLayerGradient::create(const ccColor4B& start, const ccColor4B& end, const CCPoint& v)
|
||||
{
|
||||
CCLayerGradient * pLayer = new CCLayerGradient();
|
||||
|
@ -866,23 +884,6 @@ CCLayerMultiplex::~CCLayerMultiplex()
|
|||
CC_SAFE_RELEASE(m_pLayers);
|
||||
}
|
||||
|
||||
CCLayerMultiplex * CCLayerMultiplex::layerWithLayers(CCLayer * layer, ...)
|
||||
{
|
||||
va_list args;
|
||||
va_start(args,layer);
|
||||
|
||||
CCLayerMultiplex * pMultiplexLayer = new CCLayerMultiplex();
|
||||
if(pMultiplexLayer && pMultiplexLayer->initWithLayers(layer, args))
|
||||
{
|
||||
pMultiplexLayer->autorelease();
|
||||
va_end(args);
|
||||
return pMultiplexLayer;
|
||||
}
|
||||
va_end(args);
|
||||
CC_SAFE_DELETE(pMultiplexLayer);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
CCLayerMultiplex * CCLayerMultiplex::create(CCLayer * layer, ...)
|
||||
{
|
||||
va_list args;
|
||||
|
@ -900,11 +901,6 @@ CCLayerMultiplex * CCLayerMultiplex::create(CCLayer * layer, ...)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
CCLayerMultiplex * CCLayerMultiplex::layerWithLayer(CCLayer* layer)
|
||||
{
|
||||
return CCLayerMultiplex::createWithLayer(layer);
|
||||
}
|
||||
|
||||
CCLayerMultiplex * CCLayerMultiplex::createWithLayer(CCLayer* layer)
|
||||
{
|
||||
return CCLayerMultiplex::create(layer, NULL);
|
||||
|
@ -953,6 +949,10 @@ bool CCLayerMultiplex::initWithLayers(CCLayer *layer, va_list params)
|
|||
{
|
||||
if (CCLayer::init())
|
||||
{
|
||||
m_pLayers = CCArray::createWithCapacity(5);
|
||||
m_pLayers->retain();
|
||||
m_pLayers->addObject(layer);
|
||||
|
||||
CCLayer *l = va_arg(params,CCLayer*);
|
||||
while( l ) {
|
||||
m_pLayers->addObject(l);
|
||||
|
@ -969,14 +969,17 @@ bool CCLayerMultiplex::initWithLayers(CCLayer *layer, va_list params)
|
|||
|
||||
bool CCLayerMultiplex::initWithArray(CCArray* arrayOfLayers)
|
||||
{
|
||||
m_pLayers = CCArray::createWithCapacity(arrayOfLayers->count());
|
||||
m_pLayers->addObjectsFromArray(arrayOfLayers);
|
||||
m_pLayers->retain();
|
||||
if (CCLayer::init())
|
||||
{
|
||||
m_pLayers = CCArray::createWithCapacity(arrayOfLayers->count());
|
||||
m_pLayers->addObjectsFromArray(arrayOfLayers);
|
||||
m_pLayers->retain();
|
||||
|
||||
m_nEnabledLayer = 0;
|
||||
this->addChild((CCNode*)m_pLayers->objectAtIndex(m_nEnabledLayer));
|
||||
|
||||
return true;
|
||||
m_nEnabledLayer = 0;
|
||||
this->addChild((CCNode*)m_pLayers->objectAtIndex(m_nEnabledLayer));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void CCLayerMultiplex::switchTo(unsigned int n)
|
||||
|
|
|
@ -63,9 +63,7 @@ public:
|
|||
CCLayer();
|
||||
virtual ~CCLayer();
|
||||
virtual bool init();
|
||||
|
||||
// @deprecated: This interface will be deprecated sooner or later.
|
||||
CC_DEPRECATED_ATTRIBUTE static CCLayer *node(void);
|
||||
|
||||
/** create one layer */
|
||||
static CCLayer *create(void);
|
||||
|
||||
|
@ -86,6 +84,8 @@ public:
|
|||
virtual void ccTouchesCancelled(CCSet *pTouches, CCEvent *pEvent);
|
||||
|
||||
virtual void didAccelerate(CCAcceleration* pAccelerationValue);
|
||||
void registerScriptAccelerateHandler(int nHandler);
|
||||
void unregisterScriptAccelerateHandler(void);
|
||||
|
||||
/** If isTouchEnabled, this method is called onEnter. Override it to change the
|
||||
way CCLayer receives touch events.
|
||||
|
@ -133,8 +133,18 @@ public:
|
|||
*/
|
||||
virtual bool isKeypadEnabled();
|
||||
virtual void setKeypadEnabled(bool value);
|
||||
|
||||
/** Register keypad events handler */
|
||||
void registerScriptKeypadHandler(int nHandler);
|
||||
/** Unregister keypad events handler */
|
||||
void unregisterScriptKeypadHandler(void);
|
||||
|
||||
virtual void keyBackClicked(void);
|
||||
virtual void keyMenuClicked(void);
|
||||
|
||||
inline CCTouchScriptHandlerEntry* getScriptHandlerEntry() { return m_pScriptHandlerEntry; };
|
||||
inline CCTouchScriptHandlerEntry* getScriptTouchHandlerEntry() { return m_pScriptTouchHandlerEntry; };
|
||||
inline CCScriptHandlerEntry* getScriptKeypadHandlerEntry() { return m_pScriptKeypadHandlerEntry; };
|
||||
inline CCScriptHandlerEntry* getScriptAccelerateHandlerEntry() { return m_pScriptAccelerateHandlerEntry; };
|
||||
protected:
|
||||
bool m_bTouchEnabled;
|
||||
bool m_bAccelerometerEnabled;
|
||||
|
@ -142,7 +152,9 @@ protected:
|
|||
|
||||
private:
|
||||
// Script touch events handler
|
||||
CCTouchScriptHandlerEntry* m_pScriptHandlerEntry;
|
||||
CCTouchScriptHandlerEntry* m_pScriptTouchHandlerEntry;
|
||||
CCScriptHandlerEntry* m_pScriptKeypadHandlerEntry;
|
||||
CCScriptHandlerEntry* m_pScriptAccelerateHandlerEntry;
|
||||
|
||||
int m_nTouchPriority;
|
||||
ccTouchesMode m_eTouchMode;
|
||||
|
@ -173,15 +185,6 @@ public:
|
|||
virtual void draw();
|
||||
virtual void setContentSize(const CCSize & var);
|
||||
|
||||
/** creates a CCLayer with color, width and height in Points
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCLayerColor * layerWithColor(const ccColor4B& color, GLfloat width, GLfloat height);
|
||||
/** creates a CCLayer with color. Width and height are the window size.
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCLayerColor * layerWithColor(const ccColor4B& color);
|
||||
|
||||
//@deprecated: This interface will be deprecated sooner or later.
|
||||
static CCLayerColor* node();
|
||||
|
||||
|
@ -247,16 +250,6 @@ class CC_DLL CCLayerGradient : public CCLayerColor
|
|||
{
|
||||
public:
|
||||
|
||||
/** Creates a full-screen CCLayer with a gradient between start and end.
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCLayerGradient* layerWithColor(const ccColor4B& start, const ccColor4B& end);
|
||||
|
||||
/** Creates a full-screen CCLayer with a gradient between start and end in the direction of v.
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCLayerGradient* layerWithColor(const ccColor4B& start, const ccColor4B& end, const CCPoint& v);
|
||||
|
||||
/** Creates a full-screen CCLayer with a gradient between start and end. */
|
||||
static CCLayerGradient* create(const ccColor4B& start, const ccColor4B& end);
|
||||
|
||||
|
@ -309,18 +302,6 @@ public:
|
|||
CCLayerMultiplex();
|
||||
virtual ~CCLayerMultiplex();
|
||||
|
||||
/** creates a CCLayerMultiplex with one or more layers using a variable argument list.
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCLayerMultiplex * layerWithLayers(CCLayer* layer, ... );
|
||||
|
||||
/**
|
||||
* lua script can not init with undetermined number of variables
|
||||
* so add these functions to be used with lua.
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCLayerMultiplex * layerWithLayer(CCLayer* layer);
|
||||
|
||||
/** creates a CCLayerMultiplex with one or more layers using a variable argument list. */
|
||||
static CCLayerMultiplex * create(CCLayer* layer, ... );
|
||||
|
||||
|
@ -338,9 +319,9 @@ public:
|
|||
The current (old) layer will be removed from it's parent with 'cleanup:YES'.
|
||||
*/
|
||||
|
||||
/** initializes a CCMultiplexLayer with an array of layers
|
||||
@since v2.1
|
||||
*/
|
||||
/** initializes a CCMultiplexLayer with an array of layers
|
||||
@since v2.1
|
||||
*/
|
||||
bool initWithArray(CCArray* arrayOfLayers);
|
||||
|
||||
void switchTo(unsigned int n);
|
||||
|
@ -353,8 +334,8 @@ public:
|
|||
static CCLayerMultiplex* node();
|
||||
|
||||
static CCLayerMultiplex* create();
|
||||
/** creates a CCMultiplexLayer with an array of layers.
|
||||
@since v2.1
|
||||
/** creates a CCMultiplexLayer with an array of layers.
|
||||
@since v2.1
|
||||
*/
|
||||
static CCLayerMultiplex* createWithArray(CCArray* arrayOfLayers);
|
||||
};
|
||||
|
|
|
@ -54,11 +54,6 @@ bool CCScene::init()
|
|||
return bRet;
|
||||
}
|
||||
|
||||
CCScene *CCScene::node()
|
||||
{
|
||||
return CCScene::create();
|
||||
}
|
||||
|
||||
CCScene *CCScene::create()
|
||||
{
|
||||
CCScene *pRet = new CCScene();
|
||||
|
|
|
@ -52,7 +52,7 @@ public:
|
|||
CCScene();
|
||||
virtual ~CCScene();
|
||||
bool init();
|
||||
CC_DEPRECATED_ATTRIBUTE static CCScene *node(void);
|
||||
|
||||
static CCScene *create(void);
|
||||
};
|
||||
|
||||
|
|
|
@ -52,11 +52,6 @@ CCTransitionScene::~CCTransitionScene()
|
|||
m_pOutScene->release();
|
||||
}
|
||||
|
||||
CCTransitionScene * CCTransitionScene::transitionWithDuration(float t, CCScene *scene)
|
||||
{
|
||||
return CCTransitionScene::create(t,scene);
|
||||
}
|
||||
|
||||
CCTransitionScene * CCTransitionScene::create(float t, CCScene *scene)
|
||||
{
|
||||
CCTransitionScene * pScene = new CCTransitionScene();
|
||||
|
@ -205,11 +200,6 @@ CCTransitionSceneOriented::~CCTransitionSceneOriented()
|
|||
{
|
||||
}
|
||||
|
||||
CCTransitionSceneOriented * CCTransitionSceneOriented::transitionWithDuration(float t, CCScene *scene, tOrientation orientation)
|
||||
{
|
||||
return CCTransitionSceneOriented::create(t,scene,orientation);
|
||||
}
|
||||
|
||||
CCTransitionSceneOriented * CCTransitionSceneOriented::create(float t, CCScene *scene, tOrientation orientation)
|
||||
{
|
||||
CCTransitionSceneOriented * pScene = new CCTransitionSceneOriented();
|
||||
|
@ -246,20 +236,6 @@ CCTransitionRotoZoom* CCTransitionRotoZoom::create(float t, CCScene* scene)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
CCTransitionRotoZoom* CCTransitionRotoZoom::transitionWithDuration(float t, CCScene* scene)
|
||||
{
|
||||
CCTransitionRotoZoom* pScene = new CCTransitionRotoZoom();
|
||||
|
||||
if(pScene && pScene->initWithDuration(t, scene))
|
||||
{
|
||||
pScene->autorelease();
|
||||
return pScene;
|
||||
}
|
||||
CC_SAFE_DELETE(pScene);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
CCTransitionRotoZoom::~CCTransitionRotoZoom()
|
||||
{
|
||||
}
|
||||
|
@ -320,20 +296,6 @@ CCTransitionJumpZoom* CCTransitionJumpZoom::create(float t, CCScene* scene)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
CCTransitionJumpZoom* CCTransitionJumpZoom::transitionWithDuration(float t, CCScene* scene)
|
||||
{
|
||||
CCTransitionJumpZoom* pScene = new CCTransitionJumpZoom();
|
||||
|
||||
if(pScene && pScene->initWithDuration(t, scene))
|
||||
{
|
||||
pScene->autorelease();
|
||||
return pScene;
|
||||
}
|
||||
CC_SAFE_DELETE(pScene);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void CCTransitionJumpZoom::onEnter()
|
||||
{
|
||||
CCTransitionScene::onEnter();
|
||||
|
@ -389,20 +351,6 @@ CCTransitionMoveInL* CCTransitionMoveInL::create(float t, CCScene* scene)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
CCTransitionMoveInL* CCTransitionMoveInL::transitionWithDuration(float t, CCScene* scene)
|
||||
{
|
||||
CCTransitionMoveInL* pScene = new CCTransitionMoveInL();
|
||||
|
||||
if(pScene && pScene->initWithDuration(t, scene))
|
||||
{
|
||||
pScene->autorelease();
|
||||
return pScene;
|
||||
}
|
||||
CC_SAFE_DELETE(pScene);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void CCTransitionMoveInL::onEnter()
|
||||
{
|
||||
CCTransitionScene::onEnter();
|
||||
|
@ -460,20 +408,6 @@ CCTransitionMoveInR* CCTransitionMoveInR::create(float t, CCScene* scene)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
CCTransitionMoveInR* CCTransitionMoveInR::transitionWithDuration(float t, CCScene* scene)
|
||||
{
|
||||
CCTransitionMoveInR* pScene = new CCTransitionMoveInR();
|
||||
|
||||
if(pScene && pScene->initWithDuration(t, scene))
|
||||
{
|
||||
pScene->autorelease();
|
||||
return pScene;
|
||||
}
|
||||
CC_SAFE_DELETE(pScene);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void CCTransitionMoveInR::initScenes()
|
||||
{
|
||||
CCSize s = CCDirector::sharedDirector()->getWinSize();
|
||||
|
@ -502,20 +436,6 @@ CCTransitionMoveInT* CCTransitionMoveInT::create(float t, CCScene* scene)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
CCTransitionMoveInT* CCTransitionMoveInT::transitionWithDuration(float t, CCScene* scene)
|
||||
{
|
||||
CCTransitionMoveInT* pScene = new CCTransitionMoveInT();
|
||||
|
||||
if(pScene && pScene->initWithDuration(t, scene))
|
||||
{
|
||||
pScene->autorelease();
|
||||
return pScene;
|
||||
}
|
||||
CC_SAFE_DELETE(pScene);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void CCTransitionMoveInT::initScenes()
|
||||
{
|
||||
CCSize s = CCDirector::sharedDirector()->getWinSize();
|
||||
|
@ -544,20 +464,6 @@ CCTransitionMoveInB* CCTransitionMoveInB::create(float t, CCScene* scene)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
CCTransitionMoveInB* CCTransitionMoveInB::transitionWithDuration(float t, CCScene* scene)
|
||||
{
|
||||
CCTransitionMoveInB* pScene = new CCTransitionMoveInB();
|
||||
|
||||
if(pScene && pScene->initWithDuration(t, scene))
|
||||
{
|
||||
pScene->autorelease();
|
||||
return pScene;
|
||||
}
|
||||
CC_SAFE_DELETE(pScene);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void CCTransitionMoveInB::initScenes()
|
||||
{
|
||||
CCSize s = CCDirector::sharedDirector()->getWinSize();
|
||||
|
@ -577,36 +483,11 @@ void CCTransitionMoveInB::initScenes()
|
|||
CCTransitionSlideInL::CCTransitionSlideInL()
|
||||
{
|
||||
}
|
||||
|
||||
CCTransitionSlideInL::~CCTransitionSlideInL()
|
||||
{
|
||||
}
|
||||
|
||||
CCTransitionSlideInL* CCTransitionSlideInL::create(float t, CCScene* scene)
|
||||
{
|
||||
CCTransitionSlideInL* pScene = new CCTransitionSlideInL();
|
||||
if(pScene && pScene->initWithDuration(t, scene))
|
||||
{
|
||||
pScene->autorelease();
|
||||
return pScene;
|
||||
}
|
||||
CC_SAFE_DELETE(pScene);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
CCTransitionSlideInL* CCTransitionSlideInL::transitionWithDuration(float t, CCScene* scene)
|
||||
{
|
||||
CCTransitionSlideInL* pScene = new CCTransitionSlideInL();
|
||||
|
||||
if(pScene && pScene->initWithDuration(t, scene))
|
||||
{
|
||||
pScene->autorelease();
|
||||
return pScene;
|
||||
}
|
||||
CC_SAFE_DELETE(pScene);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void CCTransitionSlideInL::onEnter()
|
||||
{
|
||||
CCTransitionScene::onEnter();
|
||||
|
@ -646,9 +527,19 @@ CCActionInterval* CCTransitionSlideInL::action()
|
|||
CCActionInterval* CCTransitionSlideInL::easeActionWithAction(CCActionInterval* action)
|
||||
{
|
||||
return CCEaseOut::create(action, 2.0f);
|
||||
// return [EaseElasticOut actionWithAction:action period:0.4f];
|
||||
}
|
||||
|
||||
CCTransitionSlideInL* CCTransitionSlideInL::create(float t, CCScene* scene)
|
||||
{
|
||||
CCTransitionSlideInL* pScene = new CCTransitionSlideInL();
|
||||
if(pScene && pScene->initWithDuration(t, scene))
|
||||
{
|
||||
pScene->autorelease();
|
||||
return pScene;
|
||||
}
|
||||
CC_SAFE_DELETE(pScene);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
//
|
||||
// SlideInR
|
||||
|
@ -672,20 +563,6 @@ CCTransitionSlideInR* CCTransitionSlideInR::create(float t, CCScene* scene)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
CCTransitionSlideInR* CCTransitionSlideInR::transitionWithDuration(float t, CCScene* scene)
|
||||
{
|
||||
CCTransitionSlideInR* pScene = new CCTransitionSlideInR();
|
||||
|
||||
if(pScene && pScene->initWithDuration(t, scene))
|
||||
{
|
||||
pScene->autorelease();
|
||||
return pScene;
|
||||
}
|
||||
CC_SAFE_DELETE(pScene);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void CCTransitionSlideInR::sceneOrder()
|
||||
{
|
||||
m_bIsInSceneOnTop = true;
|
||||
|
@ -727,20 +604,6 @@ CCTransitionSlideInT* CCTransitionSlideInT::create(float t, CCScene* scene)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
CCTransitionSlideInT* CCTransitionSlideInT::transitionWithDuration(float t, CCScene* scene)
|
||||
{
|
||||
CCTransitionSlideInT* pScene = new CCTransitionSlideInT();
|
||||
|
||||
if(pScene && pScene->initWithDuration(t, scene))
|
||||
{
|
||||
pScene->autorelease();
|
||||
return pScene;
|
||||
}
|
||||
CC_SAFE_DELETE(pScene);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void CCTransitionSlideInT::sceneOrder()
|
||||
{
|
||||
m_bIsInSceneOnTop = false;
|
||||
|
@ -781,20 +644,6 @@ CCTransitionSlideInB* CCTransitionSlideInB::create(float t, CCScene* scene)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
CCTransitionSlideInB* CCTransitionSlideInB::transitionWithDuration(float t, CCScene* scene)
|
||||
{
|
||||
CCTransitionSlideInB* pScene = new CCTransitionSlideInB();
|
||||
|
||||
if(pScene && pScene->initWithDuration(t, scene))
|
||||
{
|
||||
pScene->autorelease();
|
||||
return pScene;
|
||||
}
|
||||
CC_SAFE_DELETE(pScene);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void CCTransitionSlideInB::sceneOrder()
|
||||
{
|
||||
m_bIsInSceneOnTop = true;
|
||||
|
@ -835,20 +684,6 @@ CCTransitionShrinkGrow* CCTransitionShrinkGrow::create(float t, CCScene* scene)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
CCTransitionShrinkGrow* CCTransitionShrinkGrow::transitionWithDuration(float t, CCScene* scene)
|
||||
{
|
||||
CCTransitionShrinkGrow* pScene = new CCTransitionShrinkGrow();
|
||||
|
||||
if(pScene && pScene->initWithDuration(t, scene))
|
||||
{
|
||||
pScene->autorelease();
|
||||
return pScene;
|
||||
}
|
||||
CC_SAFE_DELETE(pScene);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void CCTransitionShrinkGrow::onEnter()
|
||||
{
|
||||
CCTransitionScene::onEnter();
|
||||
|
@ -935,11 +770,6 @@ void CCTransitionFlipX::onEnter()
|
|||
m_pOutScene->runAction(outA);
|
||||
}
|
||||
|
||||
CCTransitionFlipX* CCTransitionFlipX::transitionWithDuration(float t, CCScene* s, tOrientation o)
|
||||
{
|
||||
return CCTransitionFlipX::create(t, s, o);
|
||||
}
|
||||
|
||||
CCTransitionFlipX* CCTransitionFlipX::create(float t, CCScene* s, tOrientation o)
|
||||
{
|
||||
CCTransitionFlipX* pScene = new CCTransitionFlipX();
|
||||
|
@ -1010,11 +840,6 @@ void CCTransitionFlipY::onEnter()
|
|||
|
||||
}
|
||||
|
||||
CCTransitionFlipY* CCTransitionFlipY::transitionWithDuration(float t, CCScene* s, tOrientation o)
|
||||
{
|
||||
return CCTransitionFlipY::create(t, s, o);
|
||||
}
|
||||
|
||||
CCTransitionFlipY* CCTransitionFlipY::create(float t, CCScene* s, tOrientation o)
|
||||
{
|
||||
CCTransitionFlipY* pScene = new CCTransitionFlipY();
|
||||
|
@ -1085,11 +910,6 @@ void CCTransitionFlipAngular::onEnter()
|
|||
m_pOutScene->runAction(outA);
|
||||
}
|
||||
|
||||
CCTransitionFlipAngular* CCTransitionFlipAngular::transitionWithDuration(float t, CCScene* s, tOrientation o)
|
||||
{
|
||||
return CCTransitionFlipAngular::create(t, s, o);
|
||||
}
|
||||
|
||||
CCTransitionFlipAngular* CCTransitionFlipAngular::create(float t, CCScene* s, tOrientation o)
|
||||
{
|
||||
CCTransitionFlipAngular* pScene = new CCTransitionFlipAngular();
|
||||
|
@ -1168,11 +988,6 @@ void CCTransitionZoomFlipX::onEnter()
|
|||
m_pOutScene->runAction(outA);
|
||||
}
|
||||
|
||||
CCTransitionZoomFlipX* CCTransitionZoomFlipX::transitionWithDuration(float t, CCScene* s, tOrientation o)
|
||||
{
|
||||
return CCTransitionZoomFlipX::create(t, s, o);
|
||||
}
|
||||
|
||||
CCTransitionZoomFlipX* CCTransitionZoomFlipX::create(float t, CCScene* s, tOrientation o)
|
||||
{
|
||||
CCTransitionZoomFlipX* pScene = new CCTransitionZoomFlipX();
|
||||
|
@ -1252,11 +1067,6 @@ void CCTransitionZoomFlipY::onEnter()
|
|||
m_pOutScene->runAction(outA);
|
||||
}
|
||||
|
||||
CCTransitionZoomFlipY* CCTransitionZoomFlipY::transitionWithDuration(float t, CCScene* s, tOrientation o)
|
||||
{
|
||||
return CCTransitionZoomFlipY::create(t, s, o);
|
||||
}
|
||||
|
||||
CCTransitionZoomFlipY* CCTransitionZoomFlipY::create(float t, CCScene* s, tOrientation o)
|
||||
{
|
||||
CCTransitionZoomFlipY* pScene = new CCTransitionZoomFlipY();
|
||||
|
@ -1338,11 +1148,6 @@ void CCTransitionZoomFlipAngular::onEnter()
|
|||
m_pOutScene->runAction(outA);
|
||||
}
|
||||
|
||||
CCTransitionZoomFlipAngular* CCTransitionZoomFlipAngular::transitionWithDuration(float t, CCScene* s, tOrientation o)
|
||||
{
|
||||
return CCTransitionZoomFlipAngular::create(t, s, o);
|
||||
}
|
||||
|
||||
CCTransitionZoomFlipAngular* CCTransitionZoomFlipAngular::create(float t, CCScene* s, tOrientation o)
|
||||
{
|
||||
CCTransitionZoomFlipAngular* pScene = new CCTransitionZoomFlipAngular();
|
||||
|
@ -1367,11 +1172,6 @@ CCTransitionFade::~CCTransitionFade()
|
|||
{
|
||||
}
|
||||
|
||||
CCTransitionFade * CCTransitionFade::transitionWithDuration(float duration, CCScene *scene, const ccColor3B& color)
|
||||
{
|
||||
return CCTransitionFade::create(duration, scene, color);
|
||||
}
|
||||
|
||||
CCTransitionFade * CCTransitionFade::create(float duration, CCScene *scene, const ccColor3B& color)
|
||||
{
|
||||
CCTransitionFade * pTransition = new CCTransitionFade();
|
||||
|
@ -1452,20 +1252,6 @@ CCTransitionCrossFade* CCTransitionCrossFade::create(float t, CCScene* scene)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
CCTransitionCrossFade* CCTransitionCrossFade::transitionWithDuration(float t, CCScene* scene)
|
||||
{
|
||||
CCTransitionCrossFade* pScene = new CCTransitionCrossFade();
|
||||
|
||||
if(pScene && pScene->initWithDuration(t, scene))
|
||||
{
|
||||
pScene->autorelease();
|
||||
return pScene;
|
||||
}
|
||||
CC_SAFE_DELETE(pScene);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void CCTransitionCrossFade:: draw()
|
||||
{
|
||||
// override draw since both scenes (textures) are rendered in 1 scene
|
||||
|
@ -1574,20 +1360,6 @@ CCTransitionTurnOffTiles* CCTransitionTurnOffTiles::create(float t, CCScene* sce
|
|||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
CCTransitionTurnOffTiles* CCTransitionTurnOffTiles::transitionWithDuration(float t, CCScene* scene)
|
||||
{
|
||||
CCTransitionTurnOffTiles* pScene = new CCTransitionTurnOffTiles();
|
||||
|
||||
if(pScene && pScene->initWithDuration(t, scene))
|
||||
{
|
||||
pScene->autorelease();
|
||||
return pScene;
|
||||
}
|
||||
CC_SAFE_DELETE(pScene);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// override addScenes, and change the order
|
||||
void CCTransitionTurnOffTiles::sceneOrder()
|
||||
{
|
||||
|
@ -1644,20 +1416,6 @@ CCTransitionSplitCols* CCTransitionSplitCols::create(float t, CCScene* scene)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
CCTransitionSplitCols* CCTransitionSplitCols::transitionWithDuration(float t, CCScene* scene)
|
||||
{
|
||||
CCTransitionSplitCols* pScene = new CCTransitionSplitCols();
|
||||
|
||||
if(pScene && pScene->initWithDuration(t, scene))
|
||||
{
|
||||
pScene->autorelease();
|
||||
return pScene;
|
||||
}
|
||||
CC_SAFE_DELETE(pScene);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void CCTransitionSplitCols::onEnter()
|
||||
{
|
||||
CCTransitionScene::onEnter();
|
||||
|
@ -1684,7 +1442,6 @@ void CCTransitionSplitCols::onEnter()
|
|||
);
|
||||
}
|
||||
|
||||
|
||||
CCActionInterval* CCTransitionSplitCols:: action()
|
||||
{
|
||||
return CCSplitCols::create(3, m_fDuration/2.0f);
|
||||
|
@ -1703,10 +1460,16 @@ CCActionInterval* CCTransitionSplitCols::easeActionWithAction(CCActionInterval *
|
|||
CCTransitionSplitRows::CCTransitionSplitRows()
|
||||
{
|
||||
}
|
||||
|
||||
CCTransitionSplitRows::~CCTransitionSplitRows()
|
||||
{
|
||||
}
|
||||
|
||||
CCActionInterval* CCTransitionSplitRows::action()
|
||||
{
|
||||
return CCSplitRows::create(3, m_fDuration/2.0f);
|
||||
}
|
||||
|
||||
CCTransitionSplitRows* CCTransitionSplitRows::create(float t, CCScene* scene)
|
||||
{
|
||||
CCTransitionSplitRows* pScene = new CCTransitionSplitRows();
|
||||
|
@ -1719,25 +1482,6 @@ CCTransitionSplitRows* CCTransitionSplitRows::create(float t, CCScene* scene)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
CCTransitionSplitRows* CCTransitionSplitRows::transitionWithDuration(float t, CCScene* scene)
|
||||
{
|
||||
CCTransitionSplitRows* pScene = new CCTransitionSplitRows();
|
||||
|
||||
if(pScene && pScene->initWithDuration(t, scene))
|
||||
{
|
||||
pScene->autorelease();
|
||||
return pScene;
|
||||
}
|
||||
CC_SAFE_DELETE(pScene);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
CCActionInterval* CCTransitionSplitRows::action()
|
||||
{
|
||||
return CCSplitRows::create(3, m_fDuration/2.0f);
|
||||
}
|
||||
|
||||
//
|
||||
// FadeTR Transition
|
||||
//
|
||||
|
@ -1760,20 +1504,6 @@ CCTransitionFadeTR* CCTransitionFadeTR::create(float t, CCScene* scene)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
CCTransitionFadeTR* CCTransitionFadeTR::transitionWithDuration(float t, CCScene* scene)
|
||||
{
|
||||
CCTransitionFadeTR* pScene = new CCTransitionFadeTR();
|
||||
|
||||
if(pScene && pScene->initWithDuration(t, scene))
|
||||
{
|
||||
pScene->autorelease();
|
||||
return pScene;
|
||||
}
|
||||
CC_SAFE_DELETE(pScene);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void CCTransitionFadeTR::sceneOrder()
|
||||
{
|
||||
m_bIsInSceneOnTop = false;
|
||||
|
@ -1837,20 +1567,6 @@ CCTransitionFadeBL* CCTransitionFadeBL::create(float t, CCScene* scene)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
CCTransitionFadeBL* CCTransitionFadeBL::transitionWithDuration(float t, CCScene* scene)
|
||||
{
|
||||
CCTransitionFadeBL* pScene = new CCTransitionFadeBL();
|
||||
|
||||
if(pScene && pScene->initWithDuration(t, scene))
|
||||
{
|
||||
pScene->autorelease();
|
||||
return pScene;
|
||||
}
|
||||
CC_SAFE_DELETE(pScene);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
CCActionInterval* CCTransitionFadeBL::actionWithSize(const ccGridSize& size)
|
||||
{
|
||||
return CCFadeOutBLTiles::create(size, m_fDuration);
|
||||
|
@ -1862,6 +1578,7 @@ CCActionInterval* CCTransitionFadeBL::actionWithSize(const ccGridSize& size)
|
|||
CCTransitionFadeUp::CCTransitionFadeUp()
|
||||
{
|
||||
}
|
||||
|
||||
CCTransitionFadeUp::~CCTransitionFadeUp()
|
||||
{
|
||||
}
|
||||
|
@ -1878,20 +1595,6 @@ CCTransitionFadeUp* CCTransitionFadeUp::create(float t, CCScene* scene)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
CCTransitionFadeUp* CCTransitionFadeUp::transitionWithDuration(float t, CCScene* scene)
|
||||
{
|
||||
CCTransitionFadeUp* pScene = new CCTransitionFadeUp();
|
||||
|
||||
if(pScene && pScene->initWithDuration(t, scene))
|
||||
{
|
||||
pScene->autorelease();
|
||||
return pScene;
|
||||
}
|
||||
CC_SAFE_DELETE(pScene);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
CCActionInterval* CCTransitionFadeUp::actionWithSize(const ccGridSize& size)
|
||||
{
|
||||
return CCFadeOutUpTiles::create(size, m_fDuration);
|
||||
|
@ -1919,20 +1622,6 @@ CCTransitionFadeDown* CCTransitionFadeDown::create(float t, CCScene* scene)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
CCTransitionFadeDown* CCTransitionFadeDown::transitionWithDuration(float t, CCScene* scene)
|
||||
{
|
||||
CCTransitionFadeDown* pScene = new CCTransitionFadeDown();
|
||||
|
||||
if(pScene && pScene->initWithDuration(t, scene))
|
||||
{
|
||||
pScene->autorelease();
|
||||
return pScene;
|
||||
}
|
||||
CC_SAFE_DELETE(pScene);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
CCActionInterval* CCTransitionFadeDown::actionWithSize(const ccGridSize& size)
|
||||
{
|
||||
return CCFadeOutDownTiles::create(size, m_fDuration);
|
||||
|
|
|
@ -96,11 +96,6 @@ public:
|
|||
virtual void onExit();
|
||||
virtual void cleanup();
|
||||
|
||||
/** creates a base transition with duration and incoming scene
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCTransitionScene * transitionWithDuration(float t, CCScene *scene);
|
||||
|
||||
/** creates a base transition with duration and incoming scene */
|
||||
static CCTransitionScene * create(float t, CCScene *scene);
|
||||
|
||||
|
@ -132,11 +127,6 @@ public:
|
|||
CCTransitionSceneOriented();
|
||||
virtual ~CCTransitionSceneOriented();
|
||||
|
||||
/** creates a base transition with duration and incoming scene
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCTransitionSceneOriented * transitionWithDuration(float t,CCScene* scene, tOrientation orientation);
|
||||
|
||||
/** creates a base transition with duration and incoming scene */
|
||||
static CCTransitionSceneOriented * create(float t,CCScene* scene, tOrientation orientation);
|
||||
|
||||
|
@ -154,7 +144,6 @@ public:
|
|||
virtual ~CCTransitionRotoZoom();
|
||||
virtual void onEnter();
|
||||
|
||||
CC_DEPRECATED_ATTRIBUTE static CCTransitionRotoZoom* transitionWithDuration(float t, CCScene* scene);
|
||||
static CCTransitionRotoZoom* create(float t, CCScene* scene);
|
||||
};
|
||||
|
||||
|
@ -168,7 +157,6 @@ public:
|
|||
virtual ~CCTransitionJumpZoom();
|
||||
virtual void onEnter();
|
||||
|
||||
CC_DEPRECATED_ATTRIBUTE static CCTransitionJumpZoom* transitionWithDuration(float t, CCScene* scene);
|
||||
static CCTransitionJumpZoom* create(float t, CCScene* scene);
|
||||
};
|
||||
|
||||
|
@ -189,7 +177,6 @@ public:
|
|||
|
||||
virtual void onEnter();
|
||||
|
||||
CC_DEPRECATED_ATTRIBUTE static CCTransitionMoveInL* transitionWithDuration(float t, CCScene* scene);
|
||||
static CCTransitionMoveInL* create(float t, CCScene* scene);
|
||||
};
|
||||
|
||||
|
@ -203,7 +190,6 @@ public:
|
|||
virtual ~CCTransitionMoveInR();
|
||||
virtual void initScenes();
|
||||
|
||||
CC_DEPRECATED_ATTRIBUTE static CCTransitionMoveInR* transitionWithDuration(float t, CCScene* scene);
|
||||
static CCTransitionMoveInR* create(float t, CCScene* scene);
|
||||
};
|
||||
|
||||
|
@ -217,7 +203,6 @@ public:
|
|||
virtual ~CCTransitionMoveInT();
|
||||
virtual void initScenes();
|
||||
|
||||
CC_DEPRECATED_ATTRIBUTE static CCTransitionMoveInT* transitionWithDuration(float t, CCScene* scene);
|
||||
static CCTransitionMoveInT* create(float t, CCScene* scene);
|
||||
};
|
||||
|
||||
|
@ -231,7 +216,6 @@ public:
|
|||
virtual ~CCTransitionMoveInB();
|
||||
virtual void initScenes();
|
||||
|
||||
CC_DEPRECATED_ATTRIBUTE static CCTransitionMoveInB* transitionWithDuration(float t, CCScene* scene);
|
||||
static CCTransitionMoveInB* create(float t, CCScene* scene);
|
||||
};
|
||||
|
||||
|
@ -253,7 +237,6 @@ public:
|
|||
|
||||
virtual CCActionInterval* easeActionWithAction(CCActionInterval * action);
|
||||
|
||||
CC_DEPRECATED_ATTRIBUTE static CCTransitionSlideInL* transitionWithDuration(float t, CCScene* scene);
|
||||
static CCTransitionSlideInL* create(float t, CCScene* scene);
|
||||
protected:
|
||||
virtual void sceneOrder();
|
||||
|
@ -273,7 +256,6 @@ public:
|
|||
/** returns the action that will be performed by the incoming and outgoing scene */
|
||||
virtual CCActionInterval* action(void);
|
||||
|
||||
CC_DEPRECATED_ATTRIBUTE static CCTransitionSlideInR* transitionWithDuration(float t, CCScene* scene);
|
||||
static CCTransitionSlideInR* create(float t, CCScene* scene);
|
||||
protected:
|
||||
virtual void sceneOrder();
|
||||
|
@ -293,7 +275,6 @@ public:
|
|||
/** returns the action that will be performed by the incoming and outgoing scene */
|
||||
virtual CCActionInterval* action(void);
|
||||
|
||||
CC_DEPRECATED_ATTRIBUTE static CCTransitionSlideInB* transitionWithDuration(float t, CCScene* scene);
|
||||
static CCTransitionSlideInB* create(float t, CCScene* scene);
|
||||
protected:
|
||||
virtual void sceneOrder();
|
||||
|
@ -313,7 +294,6 @@ public:
|
|||
/** returns the action that will be performed by the incoming and outgoing scene */
|
||||
virtual CCActionInterval* action(void);
|
||||
|
||||
CC_DEPRECATED_ATTRIBUTE static CCTransitionSlideInT* transitionWithDuration(float t, CCScene* scene);
|
||||
static CCTransitionSlideInT* create(float t, CCScene* scene);
|
||||
protected:
|
||||
virtual void sceneOrder();
|
||||
|
@ -331,7 +311,6 @@ public:
|
|||
virtual void onEnter();
|
||||
virtual CCActionInterval* easeActionWithAction(CCActionInterval * action);
|
||||
|
||||
CC_DEPRECATED_ATTRIBUTE static CCTransitionShrinkGrow* transitionWithDuration(float t, CCScene* scene);
|
||||
static CCTransitionShrinkGrow* create(float t, CCScene* scene);
|
||||
};
|
||||
|
||||
|
@ -347,8 +326,6 @@ public:
|
|||
|
||||
virtual void onEnter();
|
||||
|
||||
// @deprecated: This interface will be deprecated sooner or later.
|
||||
CC_DEPRECATED_ATTRIBUTE static CCTransitionFlipX* transitionWithDuration(float t, CCScene* s, tOrientation o = kCCTransitionOrientationRightOver);
|
||||
static CCTransitionFlipX* create(float t, CCScene* s, tOrientation o);
|
||||
static CCTransitionFlipX* create(float t, CCScene* s);
|
||||
};
|
||||
|
@ -365,8 +342,6 @@ public:
|
|||
|
||||
virtual void onEnter();
|
||||
|
||||
//@deprecated: This interface will be deprecated sooner or later.
|
||||
CC_DEPRECATED_ATTRIBUTE static CCTransitionFlipY* transitionWithDuration(float t, CCScene* s, tOrientation o = kCCTransitionOrientationUpOver);
|
||||
static CCTransitionFlipY* create(float t, CCScene* s, tOrientation o);
|
||||
static CCTransitionFlipY* create(float t, CCScene* s);
|
||||
};
|
||||
|
@ -382,9 +357,7 @@ public:
|
|||
virtual ~CCTransitionFlipAngular();
|
||||
|
||||
virtual void onEnter();
|
||||
|
||||
//@deprecated: This interface will be deprecated sooner or later.
|
||||
CC_DEPRECATED_ATTRIBUTE static CCTransitionFlipAngular* transitionWithDuration(float t, CCScene* s, tOrientation o = kCCTransitionOrientationRightOver);
|
||||
|
||||
static CCTransitionFlipAngular* create(float t, CCScene* s, tOrientation o);
|
||||
static CCTransitionFlipAngular* create(float t, CCScene* s);
|
||||
};
|
||||
|
@ -401,8 +374,6 @@ public:
|
|||
|
||||
virtual void onEnter();
|
||||
|
||||
//@deprecated: This interface will be deprecated sooner or later.
|
||||
CC_DEPRECATED_ATTRIBUTE static CCTransitionZoomFlipX* transitionWithDuration(float t, CCScene* s, tOrientation o = kCCTransitionOrientationRightOver);
|
||||
static CCTransitionZoomFlipX* create(float t, CCScene* s, tOrientation o);
|
||||
static CCTransitionZoomFlipX* create(float t, CCScene* s);
|
||||
};
|
||||
|
@ -419,8 +390,6 @@ public:
|
|||
|
||||
virtual void onEnter();
|
||||
|
||||
//@deprecated: This interface will be deprecated sooner or later.
|
||||
CC_DEPRECATED_ATTRIBUTE static CCTransitionZoomFlipY* transitionWithDuration(float t, CCScene* s, tOrientation o = kCCTransitionOrientationUpOver);
|
||||
static CCTransitionZoomFlipY* create(float t, CCScene* s, tOrientation o);
|
||||
static CCTransitionZoomFlipY* create(float t, CCScene* s);
|
||||
};
|
||||
|
@ -437,8 +406,6 @@ public:
|
|||
|
||||
virtual void onEnter();
|
||||
|
||||
//@deprecated: This interface will be deprecated sooner or later.
|
||||
CC_DEPRECATED_ATTRIBUTE static CCTransitionZoomFlipAngular* transitionWithDuration(float t, CCScene* s, tOrientation o = kCCTransitionOrientationRightOver);
|
||||
static CCTransitionZoomFlipAngular* create(float t, CCScene* s, tOrientation o);
|
||||
static CCTransitionZoomFlipAngular* create(float t, CCScene* s);
|
||||
};
|
||||
|
@ -455,14 +422,8 @@ public:
|
|||
|
||||
CCTransitionFade();
|
||||
virtual ~CCTransitionFade();
|
||||
|
||||
/** creates the transition with a duration and with an RGB color
|
||||
* Example: FadeTransition::transitionWithDuration(2, scene, ccc3(255,0,0); // red color
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCTransitionFade* transitionWithDuration(float duration,CCScene* scene, const ccColor3B& color = ccBLACK);
|
||||
|
||||
/** creates the transition with a duration and with an RGB color
|
||||
/** creates the transition with a duration and with an RGB color
|
||||
* Example: FadeTransition::create(2, scene, ccc3(255,0,0); // red color
|
||||
*/
|
||||
static CCTransitionFade* create(float duration,CCScene* scene, const ccColor3B& color);
|
||||
|
@ -492,7 +453,6 @@ public :
|
|||
virtual void onExit();
|
||||
|
||||
public:
|
||||
CC_DEPRECATED_ATTRIBUTE static CCTransitionCrossFade* transitionWithDuration(float t, CCScene* scene);
|
||||
static CCTransitionCrossFade* create(float t, CCScene* scene);
|
||||
};
|
||||
|
||||
|
@ -509,7 +469,6 @@ public :
|
|||
virtual CCActionInterval * easeActionWithAction(CCActionInterval * action);
|
||||
|
||||
public:
|
||||
CC_DEPRECATED_ATTRIBUTE static CCTransitionTurnOffTiles* transitionWithDuration(float t, CCScene* scene);
|
||||
static CCTransitionTurnOffTiles* create(float t, CCScene* scene);
|
||||
protected:
|
||||
virtual void sceneOrder();
|
||||
|
@ -529,7 +488,7 @@ public:
|
|||
virtual CCActionInterval * easeActionWithAction(CCActionInterval * action);
|
||||
|
||||
public:
|
||||
CC_DEPRECATED_ATTRIBUTE static CCTransitionSplitCols* transitionWithDuration(float t, CCScene* scene);
|
||||
|
||||
static CCTransitionSplitCols* create(float t, CCScene* scene);
|
||||
};
|
||||
|
||||
|
@ -545,7 +504,7 @@ public:
|
|||
virtual CCActionInterval* action(void);
|
||||
|
||||
public:
|
||||
CC_DEPRECATED_ATTRIBUTE static CCTransitionSplitRows* transitionWithDuration(float t, CCScene* scene);
|
||||
|
||||
static CCTransitionSplitRows* create(float t, CCScene* scene);
|
||||
};
|
||||
|
||||
|
@ -562,7 +521,7 @@ public:
|
|||
virtual CCActionInterval* easeActionWithAction(CCActionInterval * action);
|
||||
|
||||
public:
|
||||
CC_DEPRECATED_ATTRIBUTE static CCTransitionFadeTR* transitionWithDuration(float t, CCScene* scene);
|
||||
|
||||
static CCTransitionFadeTR* create(float t, CCScene* scene);
|
||||
protected:
|
||||
virtual void sceneOrder();
|
||||
|
@ -579,7 +538,7 @@ public:
|
|||
virtual CCActionInterval* actionWithSize(const ccGridSize& size);
|
||||
|
||||
public:
|
||||
CC_DEPRECATED_ATTRIBUTE static CCTransitionFadeBL* transitionWithDuration(float t, CCScene* scene);
|
||||
|
||||
static CCTransitionFadeBL* create(float t, CCScene* scene);
|
||||
};
|
||||
|
||||
|
@ -594,7 +553,7 @@ public:
|
|||
virtual CCActionInterval* actionWithSize(const ccGridSize& size);
|
||||
|
||||
public:
|
||||
CC_DEPRECATED_ATTRIBUTE static CCTransitionFadeUp* transitionWithDuration(float t, CCScene* scene);
|
||||
|
||||
static CCTransitionFadeUp* create(float t, CCScene* scene);
|
||||
};
|
||||
|
||||
|
@ -609,7 +568,7 @@ public:
|
|||
virtual CCActionInterval* actionWithSize(const ccGridSize& size);
|
||||
|
||||
public:
|
||||
CC_DEPRECATED_ATTRIBUTE static CCTransitionFadeDown* transitionWithDuration(float t, CCScene* scene);
|
||||
|
||||
static CCTransitionFadeDown* create(float t, CCScene* scene);
|
||||
};
|
||||
|
||||
|
|
|
@ -40,11 +40,6 @@ CCTransitionPageTurn::~CCTransitionPageTurn()
|
|||
{
|
||||
}
|
||||
|
||||
CCTransitionPageTurn * CCTransitionPageTurn::transitionWithDuration(float t, CCScene *scene, bool backwards)
|
||||
{
|
||||
return CCTransitionPageTurn::create(t,scene,backwards);
|
||||
}
|
||||
|
||||
/** creates a base transition with duration and incoming scene */
|
||||
CCTransitionPageTurn * CCTransitionPageTurn::create(float t, CCScene *scene, bool backwards)
|
||||
{
|
||||
|
|
|
@ -55,14 +55,6 @@ public:
|
|||
CCTransitionPageTurn();
|
||||
virtual ~CCTransitionPageTurn();
|
||||
|
||||
/**
|
||||
* Creates a base transition with duration and incoming scene.
|
||||
* If back is true then the effect is reversed to appear as if the incoming
|
||||
* scene is being turned from left over the outgoing scene.
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCTransitionPageTurn* transitionWithDuration(float t,CCScene* scene,bool backwards);
|
||||
|
||||
/**
|
||||
* Creates a base transition with duration and incoming scene.
|
||||
* If back is true then the effect is reversed to appear as if the incoming
|
||||
|
|
|
@ -60,20 +60,6 @@ CCTransitionProgress* CCTransitionProgress::create(float t, CCScene* scene)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
CCTransitionProgress* CCTransitionProgress::transitionWithDuration(float t, CCScene* scene)
|
||||
{
|
||||
CCTransitionProgress* pScene = new CCTransitionProgress();
|
||||
|
||||
if(pScene && pScene->initWithDuration(t, scene))
|
||||
{
|
||||
pScene->autorelease();
|
||||
return pScene;
|
||||
}
|
||||
CC_SAFE_DELETE(pScene);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// CCTransitionProgress
|
||||
void CCTransitionProgress::onEnter()
|
||||
{
|
||||
|
@ -178,20 +164,6 @@ CCTransitionProgressRadialCCW* CCTransitionProgressRadialCCW::create(float t, CC
|
|||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
CCTransitionProgressRadialCCW* CCTransitionProgressRadialCCW::transitionWithDuration(float t, CCScene* scene)
|
||||
{
|
||||
CCTransitionProgressRadialCCW* pScene = new CCTransitionProgressRadialCCW();
|
||||
|
||||
if(pScene && pScene->initWithDuration(t, scene))
|
||||
{
|
||||
pScene->autorelease();
|
||||
return pScene;
|
||||
}
|
||||
CC_SAFE_DELETE(pScene);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// CCTransitionProgressRadialCW
|
||||
CCTransitionProgressRadialCW* CCTransitionProgressRadialCW::create(float t, CCScene* scene)
|
||||
{
|
||||
|
@ -205,20 +177,6 @@ CCTransitionProgressRadialCW* CCTransitionProgressRadialCW::create(float t, CCSc
|
|||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
CCTransitionProgressRadialCW* CCTransitionProgressRadialCW::transitionWithDuration(float t, CCScene* scene)
|
||||
{
|
||||
CCTransitionProgressRadialCW* pScene = new CCTransitionProgressRadialCW();
|
||||
|
||||
if(pScene && pScene->initWithDuration(t, scene))
|
||||
{
|
||||
pScene->autorelease();
|
||||
return pScene;
|
||||
}
|
||||
CC_SAFE_DELETE(pScene);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
CCProgressTimer* CCTransitionProgressRadialCW::progressTimerNodeWithRenderTexture(CCRenderTexture* texture)
|
||||
{
|
||||
CCSize size = CCDirector::sharedDirector()->getWinSize();
|
||||
|
@ -251,20 +209,6 @@ CCTransitionProgressHorizontal* CCTransitionProgressHorizontal::create(float t,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
CCTransitionProgressHorizontal* CCTransitionProgressHorizontal::transitionWithDuration(float t, CCScene* scene)
|
||||
{
|
||||
CCTransitionProgressHorizontal* pScene = new CCTransitionProgressHorizontal();
|
||||
|
||||
if(pScene && pScene->initWithDuration(t, scene))
|
||||
{
|
||||
pScene->autorelease();
|
||||
return pScene;
|
||||
}
|
||||
CC_SAFE_DELETE(pScene);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
CCProgressTimer* CCTransitionProgressHorizontal::progressTimerNodeWithRenderTexture(CCRenderTexture* texture)
|
||||
{
|
||||
CCSize size = CCDirector::sharedDirector()->getWinSize();
|
||||
|
@ -298,20 +242,6 @@ CCTransitionProgressVertical* CCTransitionProgressVertical::create(float t, CCSc
|
|||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
CCTransitionProgressVertical* CCTransitionProgressVertical::transitionWithDuration(float t, CCScene* scene)
|
||||
{
|
||||
CCTransitionProgressVertical* pScene = new CCTransitionProgressVertical();
|
||||
|
||||
if(pScene && pScene->initWithDuration(t, scene))
|
||||
{
|
||||
pScene->autorelease();
|
||||
return pScene;
|
||||
}
|
||||
CC_SAFE_DELETE(pScene);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
CCProgressTimer* CCTransitionProgressVertical::progressTimerNodeWithRenderTexture(CCRenderTexture* texture)
|
||||
{
|
||||
CCSize size = CCDirector::sharedDirector()->getWinSize();
|
||||
|
@ -346,20 +276,6 @@ CCTransitionProgressInOut* CCTransitionProgressInOut::create(float t, CCScene* s
|
|||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
CCTransitionProgressInOut* CCTransitionProgressInOut::transitionWithDuration(float t, CCScene* scene)
|
||||
{
|
||||
CCTransitionProgressInOut* pScene = new CCTransitionProgressInOut();
|
||||
|
||||
if(pScene && pScene->initWithDuration(t, scene))
|
||||
{
|
||||
pScene->autorelease();
|
||||
return pScene;
|
||||
}
|
||||
CC_SAFE_DELETE(pScene);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void CCTransitionProgressInOut::sceneOrder()
|
||||
{
|
||||
m_bIsInSceneOnTop = false;
|
||||
|
@ -406,20 +322,6 @@ CCTransitionProgressOutIn* CCTransitionProgressOutIn::create(float t, CCScene* s
|
|||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
CCTransitionProgressOutIn* CCTransitionProgressOutIn::transitionWithDuration(float t, CCScene* scene)
|
||||
{
|
||||
CCTransitionProgressOutIn* pScene = new CCTransitionProgressOutIn();
|
||||
|
||||
if(pScene && pScene->initWithDuration(t, scene))
|
||||
{
|
||||
pScene->autorelease();
|
||||
return pScene;
|
||||
}
|
||||
CC_SAFE_DELETE(pScene);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
CCProgressTimer* CCTransitionProgressOutIn::progressTimerNodeWithRenderTexture(CCRenderTexture* texture)
|
||||
{
|
||||
CCSize size = CCDirector::sharedDirector()->getWinSize();
|
||||
|
|
|
@ -42,7 +42,6 @@ class CCRenderTexture;
|
|||
class CC_DLL CCTransitionProgress : public CCTransitionScene
|
||||
{
|
||||
public:
|
||||
CC_DEPRECATED_ATTRIBUTE static CCTransitionProgress* transitionWithDuration(float t, CCScene* scene);
|
||||
static CCTransitionProgress* create(float t, CCScene* scene);
|
||||
|
||||
CCTransitionProgress();
|
||||
|
@ -64,7 +63,6 @@ protected:
|
|||
class CC_DLL CCTransitionProgressRadialCCW : public CCTransitionProgress
|
||||
{
|
||||
public:
|
||||
CC_DEPRECATED_ATTRIBUTE static CCTransitionProgressRadialCCW* transitionWithDuration(float t, CCScene* scene);
|
||||
static CCTransitionProgressRadialCCW* create(float t, CCScene* scene);
|
||||
protected:
|
||||
virtual CCProgressTimer* progressTimerNodeWithRenderTexture(CCRenderTexture* texture);
|
||||
|
@ -78,7 +76,6 @@ protected:
|
|||
class CC_DLL CCTransitionProgressRadialCW : public CCTransitionProgress
|
||||
{
|
||||
public:
|
||||
CC_DEPRECATED_ATTRIBUTE static CCTransitionProgressRadialCW* transitionWithDuration(float t, CCScene* scene);
|
||||
static CCTransitionProgressRadialCW* create(float t, CCScene* scene);
|
||||
protected:
|
||||
virtual CCProgressTimer* progressTimerNodeWithRenderTexture(CCRenderTexture* texture);
|
||||
|
@ -91,7 +88,7 @@ protected:
|
|||
class CC_DLL CCTransitionProgressHorizontal : public CCTransitionProgress
|
||||
{
|
||||
public:
|
||||
CC_DEPRECATED_ATTRIBUTE static CCTransitionProgressHorizontal* transitionWithDuration(float t, CCScene* scene);
|
||||
|
||||
static CCTransitionProgressHorizontal* create(float t, CCScene* scene);
|
||||
protected:
|
||||
virtual CCProgressTimer* progressTimerNodeWithRenderTexture(CCRenderTexture* texture);
|
||||
|
@ -101,7 +98,7 @@ protected:
|
|||
class CC_DLL CCTransitionProgressVertical : public CCTransitionProgress
|
||||
{
|
||||
public:
|
||||
CC_DEPRECATED_ATTRIBUTE static CCTransitionProgressVertical* transitionWithDuration(float t, CCScene* scene);
|
||||
|
||||
static CCTransitionProgressVertical* create(float t, CCScene* scene);
|
||||
protected:
|
||||
virtual CCProgressTimer* progressTimerNodeWithRenderTexture(CCRenderTexture* texture);
|
||||
|
@ -111,7 +108,7 @@ protected:
|
|||
class CC_DLL CCTransitionProgressInOut : public CCTransitionProgress
|
||||
{
|
||||
public:
|
||||
CC_DEPRECATED_ATTRIBUTE static CCTransitionProgressInOut* transitionWithDuration(float t, CCScene* scene);
|
||||
|
||||
static CCTransitionProgressInOut* create(float t, CCScene* scene);
|
||||
protected:
|
||||
virtual CCProgressTimer* progressTimerNodeWithRenderTexture(CCRenderTexture* texture);
|
||||
|
@ -122,7 +119,7 @@ protected:
|
|||
class CC_DLL CCTransitionProgressOutIn : public CCTransitionProgress
|
||||
{
|
||||
public:
|
||||
CC_DEPRECATED_ATTRIBUTE static CCTransitionProgressOutIn* transitionWithDuration(float t, CCScene* scene);
|
||||
|
||||
static CCTransitionProgressOutIn* create(float t, CCScene* scene);
|
||||
protected:
|
||||
virtual CCProgressTimer* progressTimerNodeWithRenderTexture(CCRenderTexture* texture);
|
||||
|
|
|
@ -59,28 +59,11 @@ enum
|
|||
//CCMenu
|
||||
//
|
||||
|
||||
CCMenu* CCMenu::node()
|
||||
{
|
||||
return CCMenu::create();
|
||||
}
|
||||
|
||||
CCMenu* CCMenu::create()
|
||||
{
|
||||
return CCMenu::create(NULL, NULL);
|
||||
}
|
||||
|
||||
CCMenu * CCMenu::menuWithItems(CCMenuItem* item, ...)
|
||||
{
|
||||
va_list args;
|
||||
va_start(args,item);
|
||||
|
||||
CCMenu *pRet = CCMenu::createWithItems(item, args);
|
||||
|
||||
va_end(args);
|
||||
|
||||
return pRet;
|
||||
}
|
||||
|
||||
CCMenu * CCMenu::create(CCMenuItem* item, ...)
|
||||
{
|
||||
va_list args;
|
||||
|
@ -89,15 +72,10 @@ CCMenu * CCMenu::create(CCMenuItem* item, ...)
|
|||
CCMenu *pRet = CCMenu::createWithItems(item, args);
|
||||
|
||||
va_end(args);
|
||||
|
||||
|
||||
return pRet;
|
||||
}
|
||||
|
||||
CCMenu* CCMenu::menuWithArray(CCArray* pArrayOfItems)
|
||||
{
|
||||
return CCMenu::createWithArray(pArrayOfItems);
|
||||
}
|
||||
|
||||
CCMenu* CCMenu::createWithArray(CCArray* pArrayOfItems)
|
||||
{
|
||||
CCMenu *pRet = new CCMenu();
|
||||
|
@ -113,11 +91,6 @@ CCMenu* CCMenu::createWithArray(CCArray* pArrayOfItems)
|
|||
return pRet;
|
||||
}
|
||||
|
||||
CCMenu* CCMenu::menuWithItem(CCMenuItem* item)
|
||||
{
|
||||
return CCMenu::createWithItem(item);
|
||||
}
|
||||
|
||||
CCMenu* CCMenu::createWithItems(CCMenuItem* item, va_list args)
|
||||
{
|
||||
CCArray* pArray = NULL;
|
||||
|
|
|
@ -69,28 +69,6 @@ public:
|
|||
{}
|
||||
virtual ~CCMenu(){}
|
||||
|
||||
/** creates an empty CCMenu
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCMenu* node();
|
||||
|
||||
/** creates a CCMenu with it's items
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCMenu* menuWithItems(CCMenuItem* item, ...);
|
||||
|
||||
/** creates a CCMenu with a NSArray of CCMenuItem objects
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCMenu* menuWithArray(CCArray* pArrayOfItems);
|
||||
|
||||
/** creates a CCMenu with it's item, then use addChild() to add
|
||||
* other items. It is used for script, it can't init with undetermined
|
||||
* number of variables.
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCMenu* menuWithItem(CCMenuItem* item);
|
||||
|
||||
/** creates an empty CCMenu */
|
||||
static CCMenu* create();
|
||||
|
||||
|
|
|
@ -50,11 +50,6 @@ const unsigned int kDisableTag = 0x3;
|
|||
// CCMenuItem
|
||||
//
|
||||
|
||||
CCMenuItem* CCMenuItem::itemWithTarget(CCObject *rec, SEL_MenuHandler selector)
|
||||
{
|
||||
return CCMenuItem::create(rec, selector);
|
||||
}
|
||||
|
||||
CCMenuItem* CCMenuItem::create()
|
||||
{
|
||||
return CCMenuItem::create(NULL, NULL);
|
||||
|
@ -187,11 +182,6 @@ void CCMenuItemLabel::setLabel(CCNode* var)
|
|||
m_pLabel = var;
|
||||
}
|
||||
|
||||
CCMenuItemLabel * CCMenuItemLabel::itemWithLabel(CCNode*label, CCObject* target, SEL_MenuHandler selector)
|
||||
{
|
||||
return CCMenuItemLabel::create(label, target, selector);
|
||||
}
|
||||
|
||||
CCMenuItemLabel * CCMenuItemLabel::create(CCNode*label, CCObject* target, SEL_MenuHandler selector)
|
||||
{
|
||||
CCMenuItemLabel *pRet = new CCMenuItemLabel();
|
||||
|
@ -200,11 +190,6 @@ CCMenuItemLabel * CCMenuItemLabel::create(CCNode*label, CCObject* target, SEL_Me
|
|||
return pRet;
|
||||
}
|
||||
|
||||
CCMenuItemLabel* CCMenuItemLabel::itemWithLabel(CCNode *label)
|
||||
{
|
||||
return CCMenuItemLabel::create(label);
|
||||
}
|
||||
|
||||
CCMenuItemLabel* CCMenuItemLabel::create(CCNode *label)
|
||||
{
|
||||
CCMenuItemLabel *pRet = new CCMenuItemLabel();
|
||||
|
@ -320,21 +305,11 @@ ccColor3B CCMenuItemLabel::getColor()
|
|||
//CCMenuItemAtlasFont
|
||||
//
|
||||
|
||||
CCMenuItemAtlasFont * CCMenuItemAtlasFont::itemWithString(const char *value, const char *charMapFile, int itemWidth, int itemHeight, char startCharMap)
|
||||
{
|
||||
return CCMenuItemAtlasFont::create(value, charMapFile, itemWidth, itemHeight, startCharMap);
|
||||
}
|
||||
|
||||
CCMenuItemAtlasFont * CCMenuItemAtlasFont::create(const char *value, const char *charMapFile, int itemWidth, int itemHeight, char startCharMap)
|
||||
{
|
||||
return CCMenuItemAtlasFont::create(value, charMapFile, itemWidth, itemHeight, startCharMap, NULL, NULL);
|
||||
}
|
||||
|
||||
CCMenuItemAtlasFont * CCMenuItemAtlasFont::itemWithString(const char *value, const char *charMapFile, int itemWidth, int itemHeight, char startCharMap, CCObject* target, SEL_MenuHandler selector)
|
||||
{
|
||||
return CCMenuItemAtlasFont::create(value, charMapFile, itemWidth, itemHeight, startCharMap, target, selector);
|
||||
}
|
||||
|
||||
CCMenuItemAtlasFont * CCMenuItemAtlasFont::create(const char *value, const char *charMapFile, int itemWidth, int itemHeight, char startCharMap, CCObject* target, SEL_MenuHandler selector)
|
||||
{
|
||||
CCMenuItemAtlasFont *pRet = new CCMenuItemAtlasFont();
|
||||
|
@ -384,11 +359,6 @@ const char * CCMenuItemFont::fontName()
|
|||
return _fontName.c_str();
|
||||
}
|
||||
|
||||
CCMenuItemFont * CCMenuItemFont::itemWithString(const char *value, CCObject* target, SEL_MenuHandler selector)
|
||||
{
|
||||
return CCMenuItemFont::create(value, target, selector);
|
||||
}
|
||||
|
||||
CCMenuItemFont * CCMenuItemFont::create(const char *value, CCObject* target, SEL_MenuHandler selector)
|
||||
{
|
||||
CCMenuItemFont *pRet = new CCMenuItemFont();
|
||||
|
@ -397,11 +367,6 @@ CCMenuItemFont * CCMenuItemFont::create(const char *value, CCObject* target, SEL
|
|||
return pRet;
|
||||
}
|
||||
|
||||
CCMenuItemFont * CCMenuItemFont::itemWithString(const char *value)
|
||||
{
|
||||
return CCMenuItemFont::create(value);
|
||||
}
|
||||
|
||||
CCMenuItemFont * CCMenuItemFont::create(const char *value)
|
||||
{
|
||||
CCMenuItemFont *pRet = new CCMenuItemFont();
|
||||
|
@ -578,31 +543,16 @@ ccColor3B CCMenuItemSprite::getColor()
|
|||
return dynamic_cast<CCRGBAProtocol*>(m_pNormalImage)->getColor();
|
||||
}
|
||||
|
||||
CCMenuItemSprite * CCMenuItemSprite::itemWithNormalSprite(CCNode* normalSprite, CCNode* selectedSprite, CCNode* disabledSprite)
|
||||
{
|
||||
return CCMenuItemSprite::create(normalSprite, selectedSprite, disabledSprite);
|
||||
}
|
||||
|
||||
CCMenuItemSprite * CCMenuItemSprite::create(CCNode* normalSprite, CCNode* selectedSprite, CCNode* disabledSprite)
|
||||
{
|
||||
return CCMenuItemSprite::create(normalSprite, selectedSprite, disabledSprite, NULL, NULL);
|
||||
}
|
||||
|
||||
CCMenuItemSprite * CCMenuItemSprite::itemWithNormalSprite(CCNode* normalSprite, CCNode* selectedSprite, CCObject* target, SEL_MenuHandler selector)
|
||||
{
|
||||
return CCMenuItemSprite::create(normalSprite, selectedSprite, target, selector);
|
||||
}
|
||||
|
||||
CCMenuItemSprite * CCMenuItemSprite::create(CCNode* normalSprite, CCNode* selectedSprite, CCObject* target, SEL_MenuHandler selector)
|
||||
{
|
||||
return CCMenuItemSprite::create(normalSprite, selectedSprite, NULL, target, selector);
|
||||
}
|
||||
|
||||
CCMenuItemSprite * CCMenuItemSprite::itemWithNormalSprite(CCNode *normalSprite, CCNode *selectedSprite, CCNode *disabledSprite, CCObject *target, SEL_MenuHandler selector)
|
||||
{
|
||||
return CCMenuItemSprite::create(normalSprite, selectedSprite, disabledSprite, target, selector);
|
||||
}
|
||||
|
||||
CCMenuItemSprite * CCMenuItemSprite::create(CCNode *normalSprite, CCNode *selectedSprite, CCNode *disabledSprite, CCObject *target, SEL_MenuHandler selector)
|
||||
{
|
||||
CCMenuItemSprite *pRet = new CCMenuItemSprite();
|
||||
|
@ -709,11 +659,6 @@ void CCMenuItemSprite::updateImagesVisibility()
|
|||
/// CCMenuItemImage
|
||||
///
|
||||
|
||||
CCMenuItemImage* CCMenuItemImage::node()
|
||||
{
|
||||
return CCMenuItemImage::create();
|
||||
}
|
||||
|
||||
CCMenuItemImage* CCMenuItemImage::create()
|
||||
{
|
||||
CCMenuItemImage *pRet = new CCMenuItemImage();
|
||||
|
@ -730,31 +675,17 @@ bool CCMenuItemImage::init(void)
|
|||
{
|
||||
return initWithNormalImage(NULL, NULL, NULL, NULL, NULL);
|
||||
}
|
||||
CCMenuItemImage * CCMenuItemImage::itemWithNormalImage(const char *normalImage, const char *selectedImage)
|
||||
{
|
||||
return CCMenuItemImage::create(normalImage, selectedImage);
|
||||
}
|
||||
|
||||
CCMenuItemImage * CCMenuItemImage::create(const char *normalImage, const char *selectedImage)
|
||||
{
|
||||
return CCMenuItemImage::create(normalImage, selectedImage, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
CCMenuItemImage * CCMenuItemImage::itemWithNormalImage(const char *normalImage, const char *selectedImage, CCObject* target, SEL_MenuHandler selector)
|
||||
{
|
||||
return CCMenuItemImage::create(normalImage, selectedImage, target, selector);
|
||||
}
|
||||
|
||||
CCMenuItemImage * CCMenuItemImage::create(const char *normalImage, const char *selectedImage, CCObject* target, SEL_MenuHandler selector)
|
||||
{
|
||||
return CCMenuItemImage::create(normalImage, selectedImage, NULL, target, selector);
|
||||
}
|
||||
|
||||
CCMenuItemImage * CCMenuItemImage::itemWithNormalImage(const char *normalImage, const char *selectedImage, const char *disabledImage, CCObject* target, SEL_MenuHandler selector)
|
||||
{
|
||||
return CCMenuItemImage::create(normalImage, selectedImage, disabledImage, target, selector);
|
||||
}
|
||||
|
||||
CCMenuItemImage * CCMenuItemImage::create(const char *normalImage, const char *selectedImage, const char *disabledImage, CCObject* target, SEL_MenuHandler selector)
|
||||
{
|
||||
CCMenuItemImage *pRet = new CCMenuItemImage();
|
||||
|
@ -767,11 +698,6 @@ CCMenuItemImage * CCMenuItemImage::create(const char *normalImage, const char *s
|
|||
return NULL;
|
||||
}
|
||||
|
||||
CCMenuItemImage * CCMenuItemImage::itemWithNormalImage(const char *normalImage, const char *selectedImage, const char *disabledImage)
|
||||
{
|
||||
return CCMenuItemImage::create(normalImage, selectedImage, disabledImage);
|
||||
}
|
||||
|
||||
CCMenuItemImage * CCMenuItemImage::create(const char *normalImage, const char *selectedImage, const char *disabledImage)
|
||||
{
|
||||
CCMenuItemImage *pRet = new CCMenuItemImage();
|
||||
|
@ -840,17 +766,6 @@ CCArray* CCMenuItemToggle::getSubItems()
|
|||
return m_pSubItems;
|
||||
}
|
||||
|
||||
CCMenuItemToggle * CCMenuItemToggle::itemWithTarget(CCObject* target, SEL_MenuHandler selector, CCMenuItem* item, ...)
|
||||
{
|
||||
va_list args;
|
||||
va_start(args, item);
|
||||
CCMenuItemToggle *pRet = new CCMenuItemToggle();
|
||||
pRet->initWithTarget(target, selector, item, args);
|
||||
pRet->autorelease();
|
||||
va_end(args);
|
||||
return pRet;
|
||||
}
|
||||
|
||||
CCMenuItemToggle * CCMenuItemToggle::createWithTarget(CCObject* target, SEL_MenuHandler selector, CCMenuItem* item, ...)
|
||||
{
|
||||
va_list args;
|
||||
|
@ -888,11 +803,6 @@ bool CCMenuItemToggle::initWithTarget(CCObject* target, SEL_MenuHandler selector
|
|||
return true;
|
||||
}
|
||||
|
||||
CCMenuItemToggle* CCMenuItemToggle::itemWithItem(CCMenuItem *item)
|
||||
{
|
||||
return CCMenuItemToggle::create(item);
|
||||
}
|
||||
|
||||
CCMenuItemToggle* CCMenuItemToggle::create(CCMenuItem *item)
|
||||
{
|
||||
CCMenuItemToggle *pRet = new CCMenuItemToggle();
|
||||
|
@ -904,8 +814,8 @@ CCMenuItemToggle* CCMenuItemToggle::create(CCMenuItem *item)
|
|||
bool CCMenuItemToggle::initWithItem(CCMenuItem *item)
|
||||
{
|
||||
CCMenuItem::initWithTarget(NULL, NULL);
|
||||
this->m_pSubItems = CCArray::create();
|
||||
this->m_pSubItems->retain();
|
||||
setSubItems(CCArray::create());
|
||||
|
||||
if (item) {
|
||||
m_pSubItems->addObject(item);
|
||||
}
|
||||
|
|
|
@ -68,10 +68,7 @@ public:
|
|||
, m_nScriptTapHandler(0)
|
||||
{}
|
||||
virtual ~CCMenuItem();
|
||||
/** Creates a CCMenuItem with a target/selector
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCMenuItem * itemWithTarget(CCObject *rec, SEL_MenuHandler selector);
|
||||
|
||||
/** Creates a CCMenuItem with no target/selector */
|
||||
static CCMenuItem* create();
|
||||
/** Creates a CCMenuItem with a target/selector */
|
||||
|
@ -125,14 +122,6 @@ public:
|
|||
, m_fOriginalScale(0.0)
|
||||
{}
|
||||
virtual ~CCMenuItemLabel();
|
||||
/** creates a CCMenuItemLabel with a Label, target and selector
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCMenuItemLabel * itemWithLabel(CCNode*label, CCObject* target, SEL_MenuHandler selector);
|
||||
/** creates a CCMenuItemLabel with a Label. Target and selector will be nil
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCMenuItemLabel* itemWithLabel(CCNode *label);
|
||||
|
||||
/** creates a CCMenuItemLabel with a Label, target and selector */
|
||||
static CCMenuItemLabel * create(CCNode*label, CCObject* target, SEL_MenuHandler selector);
|
||||
|
@ -172,14 +161,6 @@ class CC_DLL CCMenuItemAtlasFont : public CCMenuItemLabel
|
|||
public:
|
||||
CCMenuItemAtlasFont(){}
|
||||
virtual ~CCMenuItemAtlasFont(){}
|
||||
/** creates a menu item from a string and atlas with a target/selector
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCMenuItemAtlasFont* itemWithString(const char *value, const char *charMapFile, int itemWidth, int itemHeight, char startCharMap);
|
||||
/** creates a menu item from a string and atlas. Use it with MenuItemToggle
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCMenuItemAtlasFont* itemWithString(const char *value, const char *charMapFile, int itemWidth, int itemHeight, char startCharMap, CCObject* target, SEL_MenuHandler selector);
|
||||
|
||||
/** creates a menu item from a string and atlas with a target/selector */
|
||||
static CCMenuItemAtlasFont* create(const char *value, const char *charMapFile, int itemWidth, int itemHeight, char startCharMap);
|
||||
|
@ -206,14 +187,6 @@ public:
|
|||
static void setFontName(const char *name);
|
||||
/** get the default font name */
|
||||
static const char *fontName();
|
||||
/** creates a menu item from a string without target/selector. To be used with CCMenuItemToggle
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCMenuItemFont * itemWithString(const char *value);
|
||||
/** creates a menu item from a string with a target/selector
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCMenuItemFont * itemWithString(const char *value, CCObject* target, SEL_MenuHandler selector);
|
||||
|
||||
/** creates a menu item from a string without target/selector. To be used with CCMenuItemToggle */
|
||||
static CCMenuItemFont * create(const char *value);
|
||||
|
@ -270,18 +243,6 @@ public:
|
|||
,m_pSelectedImage(NULL)
|
||||
,m_pDisabledImage(NULL)
|
||||
{}
|
||||
/** creates a menu item with a normal, selected and disabled image
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCMenuItemSprite * itemWithNormalSprite(CCNode* normalSprite, CCNode* selectedSprite, CCNode* disabledSprite = NULL);
|
||||
/** creates a menu item with a normal and selected image with target/selector
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCMenuItemSprite * itemWithNormalSprite(CCNode* normalSprite, CCNode* selectedSprite, CCObject* target, SEL_MenuHandler selector);
|
||||
/** creates a menu item with a normal,selected and disabled image with target/selector
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCMenuItemSprite * itemWithNormalSprite(CCNode* normalSprite, CCNode* selectedSprite, CCNode* disabledSprite, CCObject* target, SEL_MenuHandler selector);
|
||||
|
||||
/** creates a menu item with a normal, selected and disabled image*/
|
||||
static CCMenuItemSprite * create(CCNode* normalSprite, CCNode* selectedSprite, CCNode* disabledSprite = NULL);
|
||||
|
@ -325,22 +286,6 @@ class CC_DLL CCMenuItemImage : public CCMenuItemSprite
|
|||
public:
|
||||
CCMenuItemImage(){}
|
||||
virtual ~CCMenuItemImage(){}
|
||||
/** creates a menu item with a normal and selected image
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCMenuItemImage* itemWithNormalImage(const char *normalImage, const char *selectedImage);
|
||||
/** creates a menu item with a normal,selected and disabled image
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCMenuItemImage* itemWithNormalImage(const char *normalImage, const char *selectedImage, const char *disabledImage);
|
||||
/** creates a menu item with a normal and selected image with target/selector
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCMenuItemImage* itemWithNormalImage(const char *normalImage, const char *selectedImage, CCObject* target, SEL_MenuHandler selector);
|
||||
/** creates a menu item with a normal,selected and disabled image with target/selector
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCMenuItemImage* itemWithNormalImage(const char *normalImage, const char *selectedImage, const char *disabledImage, CCObject* target, SEL_MenuHandler selector);
|
||||
|
||||
/** creates a menu item with a normal and selected image*/
|
||||
static CCMenuItemImage* create(const char *normalImage, const char *selectedImage);
|
||||
|
@ -360,10 +305,6 @@ public:
|
|||
void setSelectedSpriteFrame(CCSpriteFrame* frame);
|
||||
/** sets the sprite frame for the disabled image */
|
||||
void setDisabledSpriteFrame(CCSpriteFrame* frame);
|
||||
/** Creates an CCMenuItemImage.
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCMenuItemImage* node();
|
||||
|
||||
/** Creates an CCMenuItemImage.
|
||||
*/
|
||||
|
@ -395,11 +336,6 @@ public:
|
|||
{}
|
||||
virtual ~CCMenuItemToggle();
|
||||
|
||||
/** creates a menu item from a list of items with a target/selector
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCMenuItemToggle* itemWithTarget(CCObject* target, SEL_MenuHandler selector, CCMenuItem* item, ...);
|
||||
|
||||
/** creates a menu item from a list of items with a target/selector */
|
||||
static CCMenuItemToggle* createWithTarget(CCObject* target, SEL_MenuHandler selector, CCMenuItem* item, ...);
|
||||
|
||||
|
@ -408,12 +344,6 @@ public:
|
|||
|
||||
/** initializes a menu item from a list of items with a target selector */
|
||||
bool initWithTarget(CCObject* target, SEL_MenuHandler selector, CCMenuItem* item, va_list args);
|
||||
|
||||
// The follow methods offered to lua
|
||||
/** creates a menu item with a item
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCMenuItemToggle* itemWithItem(CCMenuItem *item);
|
||||
|
||||
/** creates a menu item with a item */
|
||||
static CCMenuItemToggle* create(CCMenuItem *item);
|
||||
|
|
|
@ -66,11 +66,6 @@ CCMotionStreak::~CCMotionStreak()
|
|||
CC_SAFE_FREE(m_pTexCoords);
|
||||
}
|
||||
|
||||
CCMotionStreak* CCMotionStreak::streakWithFade(float fade, float minSeg, float stroke, ccColor3B color, const char* path)
|
||||
{
|
||||
return CCMotionStreak::create(fade, minSeg, stroke, color, path);
|
||||
}
|
||||
|
||||
CCMotionStreak* CCMotionStreak::create(float fade, float minSeg, float stroke, ccColor3B color, const char* path)
|
||||
{
|
||||
CCMotionStreak *pRet = new CCMotionStreak();
|
||||
|
@ -84,11 +79,6 @@ CCMotionStreak* CCMotionStreak::create(float fade, float minSeg, float stroke, c
|
|||
return NULL;
|
||||
}
|
||||
|
||||
CCMotionStreak* CCMotionStreak::streakWithFade(float fade, float minSeg, float stroke, ccColor3B color, CCTexture2D* texture)
|
||||
{
|
||||
return CCMotionStreak::create(fade, minSeg, stroke, color, texture);
|
||||
}
|
||||
|
||||
CCMotionStreak* CCMotionStreak::create(float fade, float minSeg, float stroke, ccColor3B color, CCTexture2D* texture)
|
||||
{
|
||||
CCMotionStreak *pRet = new CCMotionStreak();
|
||||
|
|
|
@ -45,14 +45,6 @@ class CC_DLL CCMotionStreak : public CCNode, public CCTextureProtocol, public CC
|
|||
public:
|
||||
CCMotionStreak();
|
||||
virtual ~CCMotionStreak();
|
||||
/** creates and initializes a motion streak with fade in seconds, minimum segments, stroke's width, color, texture filename
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCMotionStreak* streakWithFade(float fade, float minSeg, float stroke, ccColor3B color, const char* path);
|
||||
/** creates and initializes a motion streak with fade in seconds, minimum segments, stroke's width, color, texture
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCMotionStreak* streakWithFade(float fade, float minSeg, float stroke, ccColor3B color, CCTexture2D* texture);
|
||||
|
||||
/** creates and initializes a motion streak with fade in seconds, minimum segments, stroke's width, color, texture filename */
|
||||
static CCMotionStreak* create(float fade, float minSeg, float stroke, ccColor3B color, const char* path);
|
||||
|
|
|
@ -56,11 +56,6 @@ CCProgressTimer::CCProgressTimer()
|
|||
,m_bReverseDirection(false)
|
||||
{}
|
||||
|
||||
CCProgressTimer* CCProgressTimer::progressWithSprite(CCSprite* sp)
|
||||
{
|
||||
return CCProgressTimer::create(sp);
|
||||
}
|
||||
|
||||
CCProgressTimer* CCProgressTimer::create(CCSprite* sp)
|
||||
{
|
||||
CCProgressTimer *pProgressTimer = new CCProgressTimer();
|
||||
|
|
|
@ -87,10 +87,6 @@ public:
|
|||
inline void setReverseDirection(bool value) { m_bReverseDirection = value; };
|
||||
|
||||
public:
|
||||
/** Creates a progress timer with the sprite as the shape the timer goes through
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCProgressTimer* progressWithSprite(CCSprite* sp);
|
||||
/** Creates a progress timer with the sprite as the shape the timer goes through */
|
||||
static CCProgressTimer* create(CCSprite* sp);
|
||||
protected:
|
||||
|
|
|
@ -59,12 +59,19 @@ CCRenderTexture::CCRenderTexture()
|
|||
, m_nClearStencil(0)
|
||||
, m_bAutoDraw(false)
|
||||
{
|
||||
#if CC_ENABLE_CACHE_TEXTURE_DATA
|
||||
// Listen this event to save render texture before come to background.
|
||||
// Then it can be restored after coming to foreground on Android.
|
||||
CCNotificationCenter::sharedNotificationCenter()->addObserver(this,
|
||||
callfuncO_selector(CCRenderTexture::listenToBackground),
|
||||
EVENT_COME_TO_BACKGROUND,
|
||||
NULL);
|
||||
callfuncO_selector(CCRenderTexture::listenToBackground),
|
||||
EVENT_COME_TO_BACKGROUND,
|
||||
NULL);
|
||||
|
||||
CCNotificationCenter::sharedNotificationCenter()->addObserver(this,
|
||||
callfuncO_selector(CCRenderTexture::listenToForeground),
|
||||
EVNET_COME_TO_FOREGROUND, // this is misspelt
|
||||
NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
CCRenderTexture::~CCRenderTexture()
|
||||
|
@ -78,29 +85,59 @@ CCRenderTexture::~CCRenderTexture()
|
|||
glDeleteRenderbuffers(1, &m_uDepthRenderBufffer);
|
||||
}
|
||||
CC_SAFE_DELETE(m_pUITextureImage);
|
||||
|
||||
|
||||
#if CC_ENABLE_CACHE_TEXTURE_DATA
|
||||
CCNotificationCenter::sharedNotificationCenter()->removeObserver(this, EVENT_COME_TO_BACKGROUND);
|
||||
CCNotificationCenter::sharedNotificationCenter()->removeObserver(this, EVNET_COME_TO_FOREGROUND);
|
||||
#endif
|
||||
}
|
||||
|
||||
void CCRenderTexture::listenToBackground(cocos2d::CCObject *obj)
|
||||
{
|
||||
#if CC_ENABLE_CACHE_TEXTURE_DATA
|
||||
|
||||
CC_SAFE_DELETE(m_pUITextureImage);
|
||||
|
||||
// to get the rendered texture data
|
||||
m_pUITextureImage = newCCImage();
|
||||
|
||||
m_pUITextureImage = newCCImage(false);
|
||||
|
||||
if (m_pUITextureImage)
|
||||
{
|
||||
const CCSize& s = m_pTexture->getContentSizeInPixels();
|
||||
VolatileTexture::addDataTexture(m_pTexture, m_pUITextureImage->getData(), kTexture2DPixelFormat_RGBA8888, s);
|
||||
}
|
||||
|
||||
if ( m_pTextureCopy )
|
||||
{
|
||||
VolatileTexture::addDataTexture(m_pTextureCopy, m_pUITextureImage->getData(), kTexture2DPixelFormat_RGBA8888, s);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
CCLOG("Cache rendertexture failed!");
|
||||
}
|
||||
|
||||
glDeleteFramebuffers(1, &m_uFBO);
|
||||
m_uFBO = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
void CCRenderTexture::listenToForeground(cocos2d::CCObject *obj)
|
||||
{
|
||||
#if CC_ENABLE_CACHE_TEXTURE_DATA
|
||||
// -- regenerate frame buffer object and attach the texture
|
||||
glGetIntegerv(GL_FRAMEBUFFER_BINDING, &m_nOldFBO);
|
||||
|
||||
glGenFramebuffers(1, &m_uFBO);
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, m_uFBO);
|
||||
|
||||
m_pTexture->setAliasTexParameters();
|
||||
|
||||
if ( m_pTextureCopy )
|
||||
{
|
||||
m_pTextureCopy->setAliasTexParameters();
|
||||
}
|
||||
|
||||
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, m_pTexture->getName(), 0);
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, m_nOldFBO);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -166,11 +203,6 @@ void CCRenderTexture::setAutoDraw(bool bAutoDraw)
|
|||
m_bAutoDraw = bAutoDraw;
|
||||
}
|
||||
|
||||
CCRenderTexture * CCRenderTexture::renderTextureWithWidthAndHeight(int w, int h, CCTexture2DPixelFormat eFormat)
|
||||
{
|
||||
return CCRenderTexture::create(w, h, eFormat);
|
||||
}
|
||||
|
||||
CCRenderTexture * CCRenderTexture::create(int w, int h, CCTexture2DPixelFormat eFormat)
|
||||
{
|
||||
CCRenderTexture *pRet = new CCRenderTexture();
|
||||
|
@ -184,11 +216,6 @@ CCRenderTexture * CCRenderTexture::create(int w, int h, CCTexture2DPixelFormat e
|
|||
return NULL;
|
||||
}
|
||||
|
||||
CCRenderTexture * CCRenderTexture::renderTextureWithWidthAndHeight(int w ,int h, CCTexture2DPixelFormat eFormat, GLuint uDepthStencilFormat)
|
||||
{
|
||||
return CCRenderTexture::create(w, h, eFormat, uDepthStencilFormat);
|
||||
}
|
||||
|
||||
CCRenderTexture * CCRenderTexture::create(int w ,int h, CCTexture2DPixelFormat eFormat, GLuint uDepthStencilFormat)
|
||||
{
|
||||
CCRenderTexture *pRet = new CCRenderTexture();
|
||||
|
@ -202,11 +229,6 @@ CCRenderTexture * CCRenderTexture::create(int w ,int h, CCTexture2DPixelFormat e
|
|||
return NULL;
|
||||
}
|
||||
|
||||
CCRenderTexture * CCRenderTexture::renderTextureWithWidthAndHeight(int w, int h)
|
||||
{
|
||||
return CCRenderTexture::create(w, h);
|
||||
}
|
||||
|
||||
CCRenderTexture * CCRenderTexture::create(int w, int h)
|
||||
{
|
||||
CCRenderTexture *pRet = new CCRenderTexture();
|
||||
|
@ -590,7 +612,7 @@ bool CCRenderTexture::saveToFile(const char *szFilePath)
|
|||
{
|
||||
bool bRet = false;
|
||||
|
||||
CCImage *pImage = newCCImage();
|
||||
CCImage *pImage = newCCImage(true);
|
||||
if (pImage)
|
||||
{
|
||||
bRet = pImage->saveToFile(szFilePath, kCCImageFormatJPEG);
|
||||
|
@ -605,7 +627,7 @@ bool CCRenderTexture::saveToFile(const char *fileName, tCCImageFormat format)
|
|||
CCAssert(format == kCCImageFormatJPEG || format == kCCImageFormatPNG,
|
||||
"the image can only be saved as JPG or PNG format");
|
||||
|
||||
CCImage *pImage = newCCImage();
|
||||
CCImage *pImage = newCCImage(true);
|
||||
if (pImage)
|
||||
{
|
||||
std::string fullpath = CCFileUtils::sharedFileUtils()->getWriteablePath() + fileName;
|
||||
|
@ -619,7 +641,7 @@ bool CCRenderTexture::saveToFile(const char *fileName, tCCImageFormat format)
|
|||
}
|
||||
|
||||
/* get buffer as CCImage */
|
||||
CCImage* CCRenderTexture::newCCImage()
|
||||
CCImage* CCRenderTexture::newCCImage(bool flipImage)
|
||||
{
|
||||
CCAssert(m_ePixelFormat == kCCTexture2DPixelFormat_RGBA8888, "only RGBA8888 can be saved as image");
|
||||
|
||||
|
@ -656,16 +678,24 @@ CCImage* CCRenderTexture::newCCImage()
|
|||
glReadPixels(0,0,nSavedBufferWidth, nSavedBufferHeight,GL_RGBA,GL_UNSIGNED_BYTE, pTempData);
|
||||
this->end();
|
||||
|
||||
// to get the actual texture data
|
||||
// #640 the image read from rendertexture is dirty
|
||||
for (int i = 0; i < nSavedBufferHeight; ++i)
|
||||
if ( flipImage ) // -- flip is only required when saving image to file
|
||||
{
|
||||
memcpy(&pBuffer[i * nSavedBufferWidth * 4],
|
||||
&pTempData[(nSavedBufferHeight - i - 1) * nSavedBufferWidth * 4],
|
||||
nSavedBufferWidth * 4);
|
||||
}
|
||||
// to get the actual texture data
|
||||
// #640 the image read from rendertexture is dirty
|
||||
for (int i = 0; i < nSavedBufferHeight; ++i)
|
||||
{
|
||||
memcpy(&pBuffer[i * nSavedBufferWidth * 4],
|
||||
&pTempData[(nSavedBufferHeight - i - 1) * nSavedBufferWidth * 4],
|
||||
nSavedBufferWidth * 4);
|
||||
}
|
||||
|
||||
pImage->initWithImageData(pBuffer, nSavedBufferWidth * nSavedBufferHeight * 4, CCImage::kFmtRawData, nSavedBufferWidth, nSavedBufferHeight, 8);
|
||||
pImage->initWithImageData(pBuffer, nSavedBufferWidth * nSavedBufferHeight * 4, CCImage::kFmtRawData, nSavedBufferWidth, nSavedBufferHeight, 8);
|
||||
}
|
||||
else
|
||||
{
|
||||
pImage->initWithImageData(pTempData, nSavedBufferWidth * nSavedBufferHeight * 4, CCImage::kFmtRawData, nSavedBufferWidth, nSavedBufferHeight, 8);
|
||||
}
|
||||
|
||||
} while (0);
|
||||
|
||||
CC_SAFE_DELETE_ARRAY(pBuffer);
|
||||
|
|
|
@ -66,21 +66,6 @@ public:
|
|||
virtual void visit();
|
||||
virtual void draw();
|
||||
|
||||
/** initializes a RenderTexture object with width and height in Points and a pixel format( only RGB and RGBA formats are valid ) and depthStencil format
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCRenderTexture * renderTextureWithWidthAndHeight(int w ,int h, CCTexture2DPixelFormat eFormat, GLuint uDepthStencilFormat);
|
||||
|
||||
/** creates a RenderTexture object with width and height in Points and a pixel format, only RGB and RGBA formats are valid
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCRenderTexture * renderTextureWithWidthAndHeight(int w, int h, CCTexture2DPixelFormat eFormat);
|
||||
|
||||
/** creates a RenderTexture object with width and height in Points, pixel format is RGBA8888
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCRenderTexture * renderTextureWithWidthAndHeight(int w, int h);
|
||||
|
||||
/** initializes a RenderTexture object with width and height in Points and a pixel format( only RGB and RGBA formats are valid ) and depthStencil format*/
|
||||
static CCRenderTexture * create(int w ,int h, CCTexture2DPixelFormat eFormat, GLuint uDepthStencilFormat);
|
||||
|
||||
|
@ -128,7 +113,7 @@ public:
|
|||
/* creates a new CCImage from with the texture's data.
|
||||
Caller is responsible for releasing it by calling delete.
|
||||
*/
|
||||
CCImage* newCCImage();
|
||||
CCImage* newCCImage(bool flipImage = true);
|
||||
|
||||
/** saves the texture into a file using JPEG format. The file will be saved in the Documents folder.
|
||||
Returns YES if the operation is successful.
|
||||
|
@ -145,6 +130,11 @@ public:
|
|||
*/
|
||||
void listenToBackground(CCObject *obj);
|
||||
|
||||
/** Listen "come to foreground" message and restore the frame buffer object
|
||||
It only has effect on Android.
|
||||
*/
|
||||
void listenToForeground(CCObject *obj);
|
||||
|
||||
/** Valid flags: GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT, GL_STENCIL_BUFFER_BIT. They can be OR'ed. Valid when "autoDraw is YES. */
|
||||
unsigned int getClearFlags() const;
|
||||
void setClearFlags(unsigned int uClearFlags);
|
||||
|
|
|
@ -58,10 +58,6 @@ CCParticleBatchNode::~CCParticleBatchNode()
|
|||
/*
|
||||
* creation with CCTexture2D
|
||||
*/
|
||||
CCParticleBatchNode* CCParticleBatchNode::batchNodeWithTexture(CCTexture2D *tex, unsigned int capacity/* = kCCParticleDefaultCapacity*/)
|
||||
{
|
||||
return CCParticleBatchNode::createWithTexture(tex, capacity);
|
||||
}
|
||||
|
||||
CCParticleBatchNode* CCParticleBatchNode::createWithTexture(CCTexture2D *tex, unsigned int capacity/* = kCCParticleDefaultCapacity*/)
|
||||
{
|
||||
|
@ -78,10 +74,6 @@ CCParticleBatchNode* CCParticleBatchNode::createWithTexture(CCTexture2D *tex, un
|
|||
/*
|
||||
* creation with File Image
|
||||
*/
|
||||
CCParticleBatchNode* CCParticleBatchNode::batchNodeWithFile(const char* imageFile, unsigned int capacity/* = kCCParticleDefaultCapacity*/)
|
||||
{
|
||||
return CCParticleBatchNode::create(imageFile, capacity);
|
||||
}
|
||||
|
||||
CCParticleBatchNode* CCParticleBatchNode::create(const char* imageFile, unsigned int capacity/* = kCCParticleDefaultCapacity*/)
|
||||
{
|
||||
|
|
|
@ -70,16 +70,6 @@ public:
|
|||
CCParticleBatchNode();
|
||||
virtual ~CCParticleBatchNode();
|
||||
|
||||
/** initializes the particle system with CCTexture2D, a capacity of particles, which particle system to use
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCParticleBatchNode* batchNodeWithTexture(CCTexture2D *tex, unsigned int capacity = kCCParticleDefaultCapacity);
|
||||
|
||||
/** initializes the particle system with the name of a file on disk (for a list of supported formats look at the CCTexture2D class), a capacity of particles
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCParticleBatchNode* batchNodeWithFile(const char* fileImage, unsigned int capacity = kCCParticleDefaultCapacity);
|
||||
|
||||
/** initializes the particle system with CCTexture2D, a capacity of particles, which particle system to use */
|
||||
static CCParticleBatchNode* createWithTexture(CCTexture2D *tex, unsigned int capacity = kCCParticleDefaultCapacity);
|
||||
|
||||
|
|
|
@ -55,11 +55,6 @@ static CCTexture2D* getDefaultTexture()
|
|||
return pTexture;
|
||||
}
|
||||
|
||||
CCParticleFire* CCParticleFire::node()
|
||||
{
|
||||
return CCParticleFire::create();
|
||||
}
|
||||
|
||||
CCParticleFire* CCParticleFire::create()
|
||||
{
|
||||
CCParticleFire* pRet = new CCParticleFire();
|
||||
|
@ -164,10 +159,6 @@ bool CCParticleFire::initWithTotalParticles(unsigned int numberOfParticles)
|
|||
//
|
||||
// ParticleFireworks
|
||||
//
|
||||
CCParticleFireworks* CCParticleFireworks::node()
|
||||
{
|
||||
return CCParticleFireworks::create();
|
||||
}
|
||||
|
||||
CCParticleFireworks* CCParticleFireworks::create()
|
||||
{
|
||||
|
@ -270,12 +261,6 @@ bool CCParticleFireworks::initWithTotalParticles(unsigned int numberOfParticles)
|
|||
//
|
||||
// ParticleSun
|
||||
//
|
||||
|
||||
CCParticleSun* CCParticleSun::node()
|
||||
{
|
||||
return CCParticleSun::create();
|
||||
}
|
||||
|
||||
CCParticleSun* CCParticleSun::create()
|
||||
{
|
||||
CCParticleSun* pRet = new CCParticleSun();
|
||||
|
@ -383,11 +368,6 @@ bool CCParticleSun::initWithTotalParticles(unsigned int numberOfParticles)
|
|||
// ParticleGalaxy
|
||||
//
|
||||
|
||||
CCParticleGalaxy* CCParticleGalaxy::node()
|
||||
{
|
||||
return CCParticleGalaxy::create();
|
||||
}
|
||||
|
||||
CCParticleGalaxy* CCParticleGalaxy::create()
|
||||
{
|
||||
CCParticleGalaxy* pRet = new CCParticleGalaxy();
|
||||
|
@ -497,11 +477,6 @@ bool CCParticleGalaxy::initWithTotalParticles(unsigned int numberOfParticles)
|
|||
// ParticleFlower
|
||||
//
|
||||
|
||||
CCParticleFlower* CCParticleFlower::node()
|
||||
{
|
||||
return CCParticleFlower::create();
|
||||
}
|
||||
|
||||
CCParticleFlower* CCParticleFlower::create()
|
||||
{
|
||||
CCParticleFlower* pRet = new CCParticleFlower();
|
||||
|
@ -610,11 +585,6 @@ bool CCParticleFlower::initWithTotalParticles(unsigned int numberOfParticles)
|
|||
// ParticleMeteor
|
||||
//
|
||||
|
||||
CCParticleMeteor * CCParticleMeteor::node()
|
||||
{
|
||||
return create();
|
||||
}
|
||||
|
||||
CCParticleMeteor * CCParticleMeteor::create()
|
||||
{
|
||||
CCParticleMeteor *pRet = new CCParticleMeteor();
|
||||
|
@ -724,11 +694,6 @@ bool CCParticleMeteor::initWithTotalParticles(unsigned int numberOfParticles)
|
|||
// ParticleSpiral
|
||||
//
|
||||
|
||||
CCParticleSpiral* CCParticleSpiral::node()
|
||||
{
|
||||
return CCParticleSpiral::create();
|
||||
}
|
||||
|
||||
CCParticleSpiral* CCParticleSpiral::create()
|
||||
{
|
||||
CCParticleSpiral* pRet = new CCParticleSpiral();
|
||||
|
@ -838,11 +803,6 @@ bool CCParticleSpiral::initWithTotalParticles(unsigned int numberOfParticles)
|
|||
// ParticleExplosion
|
||||
//
|
||||
|
||||
CCParticleExplosion* CCParticleExplosion::node()
|
||||
{
|
||||
return CCParticleExplosion::create();
|
||||
}
|
||||
|
||||
CCParticleExplosion* CCParticleExplosion::create()
|
||||
{
|
||||
CCParticleExplosion* pRet = new CCParticleExplosion();
|
||||
|
@ -951,11 +911,6 @@ bool CCParticleExplosion::initWithTotalParticles(unsigned int numberOfParticles)
|
|||
// ParticleSmoke
|
||||
//
|
||||
|
||||
CCParticleSmoke* CCParticleSmoke::node()
|
||||
{
|
||||
return CCParticleSmoke::create();
|
||||
}
|
||||
|
||||
CCParticleSmoke* CCParticleSmoke::create()
|
||||
{
|
||||
CCParticleSmoke* pRet = new CCParticleSmoke();
|
||||
|
@ -1061,11 +1016,6 @@ bool CCParticleSmoke::initWithTotalParticles(unsigned int numberOfParticles)
|
|||
// CCParticleSnow
|
||||
//
|
||||
|
||||
CCParticleSnow* CCParticleSnow::node()
|
||||
{
|
||||
return CCParticleSnow::create();
|
||||
}
|
||||
|
||||
CCParticleSnow* CCParticleSnow::create()
|
||||
{
|
||||
CCParticleSnow* pRet = new CCParticleSnow();
|
||||
|
@ -1173,10 +1123,6 @@ bool CCParticleSnow::initWithTotalParticles(unsigned int numberOfParticles)
|
|||
//
|
||||
// CCParticleRain
|
||||
//
|
||||
CCParticleRain* CCParticleRain::node()
|
||||
{
|
||||
return CCParticleRain::create();
|
||||
}
|
||||
|
||||
CCParticleRain* CCParticleRain::create()
|
||||
{
|
||||
|
|
|
@ -43,8 +43,6 @@ public:
|
|||
virtual ~CCParticleFire(){}
|
||||
bool init(){ return initWithTotalParticles(250); }
|
||||
virtual bool initWithTotalParticles(unsigned int numberOfParticles);
|
||||
//@deprecated: This interface will be deprecated sooner or later.
|
||||
CC_DEPRECATED_ATTRIBUTE static CCParticleFire* node();
|
||||
|
||||
static CCParticleFire* create();
|
||||
static CCParticleFire* createWithTotalParticles(unsigned int numberOfParticles);
|
||||
|
@ -58,8 +56,6 @@ public:
|
|||
virtual ~CCParticleFireworks(){}
|
||||
bool init(){ return initWithTotalParticles(1500); }
|
||||
virtual bool initWithTotalParticles(unsigned int numberOfParticles);
|
||||
//@deprecated: This interface will be deprecated sooner or later.
|
||||
CC_DEPRECATED_ATTRIBUTE static CCParticleFireworks* node();
|
||||
|
||||
static CCParticleFireworks* create();
|
||||
static CCParticleFireworks* createWithTotalParticles(unsigned int numberOfParticles);
|
||||
|
@ -73,8 +69,6 @@ public:
|
|||
virtual ~CCParticleSun(){}
|
||||
bool init(){ return initWithTotalParticles(350); }
|
||||
virtual bool initWithTotalParticles(unsigned int numberOfParticles);
|
||||
//@deprecated: This interface will be deprecated sooner or later.
|
||||
CC_DEPRECATED_ATTRIBUTE static CCParticleSun* node();
|
||||
|
||||
static CCParticleSun* create();
|
||||
static CCParticleSun* createWithTotalParticles(unsigned int numberOfParticles);
|
||||
|
@ -88,8 +82,6 @@ public:
|
|||
virtual ~CCParticleGalaxy(){}
|
||||
bool init(){ return initWithTotalParticles(200); }
|
||||
virtual bool initWithTotalParticles(unsigned int numberOfParticles);
|
||||
//@deprecated: This interface will be deprecated sooner or later.
|
||||
CC_DEPRECATED_ATTRIBUTE static CCParticleGalaxy* node();
|
||||
|
||||
static CCParticleGalaxy* create();
|
||||
static CCParticleGalaxy* createWithTotalParticles(unsigned int numberOfParticles);
|
||||
|
@ -103,8 +95,6 @@ public:
|
|||
virtual ~CCParticleFlower(){}
|
||||
bool init(){ return initWithTotalParticles(250); }
|
||||
virtual bool initWithTotalParticles(unsigned int numberOfParticles);
|
||||
//@deprecated: This interface will be deprecated sooner or later.
|
||||
CC_DEPRECATED_ATTRIBUTE static CCParticleFlower* node();
|
||||
|
||||
static CCParticleFlower* create();
|
||||
static CCParticleFlower* createWithTotalParticles(unsigned int numberOfParticles);
|
||||
|
@ -118,7 +108,7 @@ public:
|
|||
virtual ~CCParticleMeteor(){}
|
||||
bool init(){ return initWithTotalParticles(150); }
|
||||
virtual bool initWithTotalParticles(unsigned int numberOfParticles);
|
||||
CC_DEPRECATED_ATTRIBUTE static CCParticleMeteor * node();
|
||||
|
||||
static CCParticleMeteor * create();
|
||||
static CCParticleMeteor* createWithTotalParticles(unsigned int numberOfParticles);
|
||||
};
|
||||
|
@ -131,8 +121,6 @@ public:
|
|||
virtual ~CCParticleSpiral(){}
|
||||
bool init(){ return initWithTotalParticles(500); }
|
||||
virtual bool initWithTotalParticles(unsigned int numberOfParticles);
|
||||
//@deprecated: This interface will be deprecated sooner or later.
|
||||
CC_DEPRECATED_ATTRIBUTE static CCParticleSpiral* node();
|
||||
|
||||
static CCParticleSpiral* create();
|
||||
static CCParticleSpiral* createWithTotalParticles(unsigned int numberOfParticles);
|
||||
|
@ -146,8 +134,6 @@ public:
|
|||
virtual ~CCParticleExplosion(){}
|
||||
bool init(){ return initWithTotalParticles(700); }
|
||||
virtual bool initWithTotalParticles(unsigned int numberOfParticles);
|
||||
//@deprecated: This interface will be deprecated sooner or later.
|
||||
CC_DEPRECATED_ATTRIBUTE static CCParticleExplosion* node();
|
||||
|
||||
static CCParticleExplosion* create();
|
||||
static CCParticleExplosion* createWithTotalParticles(unsigned int numberOfParticles);
|
||||
|
@ -161,8 +147,6 @@ public:
|
|||
virtual ~CCParticleSmoke(){}
|
||||
bool init(){ return initWithTotalParticles(200); }
|
||||
virtual bool initWithTotalParticles(unsigned int numberOfParticles);
|
||||
//@deprecated: This interface will be deprecated sooner or later.
|
||||
CC_DEPRECATED_ATTRIBUTE static CCParticleSmoke* node();
|
||||
|
||||
static CCParticleSmoke* create();
|
||||
static CCParticleSmoke* createWithTotalParticles(unsigned int numberOfParticles);
|
||||
|
@ -176,8 +160,6 @@ public:
|
|||
virtual ~CCParticleSnow(){}
|
||||
bool init(){ return initWithTotalParticles(700); }
|
||||
virtual bool initWithTotalParticles(unsigned int numberOfParticles);
|
||||
//@deprecated: This interface will be deprecated sooner or later.
|
||||
CC_DEPRECATED_ATTRIBUTE static CCParticleSnow* node();
|
||||
|
||||
static CCParticleSnow* create();
|
||||
static CCParticleSnow* createWithTotalParticles(unsigned int numberOfParticles);
|
||||
|
@ -191,8 +173,6 @@ public:
|
|||
virtual ~CCParticleRain(){}
|
||||
bool init(){ return initWithTotalParticles(1000); }
|
||||
virtual bool initWithTotalParticles(unsigned int numberOfParticles);
|
||||
//@deprecated: This interface will be deprecated sooner or later.
|
||||
CC_DEPRECATED_ATTRIBUTE static CCParticleRain* node();
|
||||
|
||||
static CCParticleRain* create();
|
||||
static CCParticleRain* createWithTotalParticles(unsigned int numberOfParticles);
|
||||
|
|
|
@ -134,10 +134,6 @@ CCParticleSystem::CCParticleSystem()
|
|||
m_tBlendFunc.dst = CC_BLEND_DST;
|
||||
}
|
||||
// implementation CCParticleSystem
|
||||
CCParticleSystem * CCParticleSystem::particleWithFile(const char *plistFile)
|
||||
{
|
||||
return CCParticleSystem::create(plistFile);
|
||||
}
|
||||
|
||||
CCParticleSystem * CCParticleSystem::create(const char *plistFile)
|
||||
{
|
||||
|
|
|
@ -367,13 +367,6 @@ public:
|
|||
public:
|
||||
CCParticleSystem();
|
||||
virtual ~CCParticleSystem();
|
||||
/** creates an initializes a CCParticleSystem from a plist file.
|
||||
This plist files can be created manually or with Particle Designer:
|
||||
http://particledesigner.71squared.com/
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
@since v0.99.3
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCParticleSystem * particleWithFile(const char *plistFile);
|
||||
|
||||
/** creates an initializes a CCParticleSystem from a plist file.
|
||||
This plist files can be created manually or with Particle Designer:
|
||||
|
|
|
@ -103,10 +103,6 @@ CCParticleSystemQuad::~CCParticleSystemQuad()
|
|||
}
|
||||
|
||||
// implementation CCParticleSystemQuad
|
||||
CCParticleSystemQuad * CCParticleSystemQuad::particleWithFile(const char *plistFile)
|
||||
{
|
||||
return CCParticleSystemQuad::create(plistFile);
|
||||
}
|
||||
|
||||
CCParticleSystemQuad * CCParticleSystemQuad::create(const char *plistFile)
|
||||
{
|
||||
|
@ -593,11 +589,6 @@ void CCParticleSystemQuad::setBatchNode(CCParticleBatchNode * batchNode)
|
|||
}
|
||||
}
|
||||
|
||||
CCParticleSystemQuad * CCParticleSystemQuad::node()
|
||||
{
|
||||
return CCParticleSystemQuad::create();
|
||||
}
|
||||
|
||||
CCParticleSystemQuad * CCParticleSystemQuad::create() {
|
||||
CCParticleSystemQuad *pParticleSystemQuad = new CCParticleSystemQuad();
|
||||
if (pParticleSystemQuad && pParticleSystemQuad->init())
|
||||
|
|
|
@ -66,12 +66,6 @@ public:
|
|||
CCParticleSystemQuad();
|
||||
virtual ~CCParticleSystemQuad();
|
||||
|
||||
/** creates an initializes a CCParticleSystemQuad from a plist file.
|
||||
This plist files can be created manually or with Particle Designer:
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCParticleSystemQuad * particleWithFile(const char *plistFile);
|
||||
|
||||
/** creates an initializes a CCParticleSystemQuad from a plist file.
|
||||
This plist files can be created manually or with Particle Designer:
|
||||
*/
|
||||
|
@ -106,9 +100,6 @@ public:
|
|||
*/
|
||||
void listenBackToForeground(CCObject *obj);
|
||||
|
||||
//@deprecated: This interface will be deprecated sooner or later.
|
||||
CC_DEPRECATED_ATTRIBUTE static CCParticleSystemQuad * node();
|
||||
|
||||
static CCParticleSystemQuad * create();
|
||||
static CCParticleSystemQuad * createWithTotalParticles(unsigned int numberOfParticles);
|
||||
private:
|
||||
|
|
|
@ -64,7 +64,9 @@ typedef enum LanguageType
|
|||
kLanguageGerman,
|
||||
kLanguageSpanish,
|
||||
kLanguageRussian,
|
||||
kLanguageKorean
|
||||
kLanguageKorean,
|
||||
kLanguageJapanese,
|
||||
kLanguageHungarian
|
||||
} ccLanguageType;
|
||||
|
||||
// end of platform group
|
||||
|
|
|
@ -112,6 +112,14 @@ ccLanguageType CCApplication::getCurrentLanguage()
|
|||
{
|
||||
ret = kLanguageKorean;
|
||||
}
|
||||
else if (0 == strcmp("ja", pLanguageName))
|
||||
{
|
||||
ret = kLanguageJapanese;
|
||||
}
|
||||
else if (0 == strcmp("hu", pLanguageName))
|
||||
{
|
||||
ret = kLanguageHungarian;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -147,10 +147,18 @@ ccLanguageType CCApplication::getCurrentLanguage()
|
|||
{
|
||||
ret_language = kLanguageRussian;
|
||||
}
|
||||
else if (strcmp(language, "ko") == 0)
|
||||
else if (strcmp(language, "ko") == 0)
|
||||
{
|
||||
ret_language = kLanguageKorean;
|
||||
}
|
||||
else if (strcmp(language, "ja") == 0)
|
||||
{
|
||||
ret_language = kLanguageJapanese;
|
||||
}
|
||||
else if (strcmp(language, "hu") == 0)
|
||||
{
|
||||
ret_language = kLanguageHungarian;
|
||||
}
|
||||
|
||||
free(language);
|
||||
free(country);
|
||||
|
|
|
@ -107,6 +107,12 @@ ccLanguageType CCApplication::getCurrentLanguage()
|
|||
else if ([languageCode isEqualToString:@"ko"]){
|
||||
ret = kLanguageKorean;
|
||||
}
|
||||
else if ([languageCode isEqualToString:@"ja"]){
|
||||
ret = kLanguageJapanese;
|
||||
}
|
||||
else if ([languageCode isEqualToString:@"hu"]){
|
||||
ret = kLanguageHungarian;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -100,8 +100,60 @@ CCApplication* CCApplication::sharedApplication()
|
|||
|
||||
ccLanguageType CCApplication::getCurrentLanguage()
|
||||
{
|
||||
//TODO
|
||||
return kLanguageEnglish;
|
||||
char *pLanguageName = getenv("LANG");
|
||||
ccLanguageType ret = kLanguageEnglish;
|
||||
if (!pLanguageName)
|
||||
{
|
||||
return kLanguageEnglish;
|
||||
}
|
||||
strtok(pLanguageName, "_");
|
||||
if (!pLanguageName)
|
||||
{
|
||||
return kLanguageEnglish;
|
||||
}
|
||||
|
||||
if (0 == strcmp("zh", pLanguageName))
|
||||
{
|
||||
ret = kLanguageChinese;
|
||||
}
|
||||
else if (0 == strcmp("en", pLanguageName))
|
||||
{
|
||||
ret = kLanguageEnglish;
|
||||
}
|
||||
else if (0 == strcmp("fr", pLanguageName))
|
||||
{
|
||||
ret = kLanguageFrench;
|
||||
}
|
||||
else if (0 == strcmp("it", pLanguageName))
|
||||
{
|
||||
ret = kLanguageItalian;
|
||||
}
|
||||
else if (0 == strcmp("de", pLanguageName))
|
||||
{
|
||||
ret = kLanguageGerman;
|
||||
}
|
||||
else if (0 == strcmp("es", pLanguageName))
|
||||
{
|
||||
ret = kLanguageSpanish;
|
||||
}
|
||||
else if (0 == strcmp("ru", pLanguageName))
|
||||
{
|
||||
ret = kLanguageRussian;
|
||||
}
|
||||
else if (0 == strcmp("ko", pLanguageName))
|
||||
{
|
||||
ret = kLanguageKorean;
|
||||
}
|
||||
else if (0 == strcmp("ja", pLanguageName))
|
||||
{
|
||||
ret = kLanguageJapanese;
|
||||
}
|
||||
else if (0 == strcmp("hu", pLanguageName))
|
||||
{
|
||||
ret = kLanguageHungarian;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
NS_CC_END
|
||||
|
|
|
@ -181,7 +181,7 @@ void CCEGLView::setFrameSize(float width, float height)
|
|||
case 16:
|
||||
{
|
||||
/* Updates video mode */
|
||||
eResult = (glfwOpenWindow(width, height, 5, 6, 5, 0, 16, 0, (int)u32GLFWFlags) != false) ? true : false;
|
||||
eResult = (glfwOpenWindow(width, height, 5, 6, 5, 0, 16, 8, (int)u32GLFWFlags) != false) ? true : false;
|
||||
|
||||
break;
|
||||
}
|
||||
|
@ -190,7 +190,7 @@ void CCEGLView::setFrameSize(float width, float height)
|
|||
case 24:
|
||||
{
|
||||
/* Updates video mode */
|
||||
eResult = (glfwOpenWindow(width, height, 8, 8, 8, 0, 16, 0, (int)u32GLFWFlags) != false) ? true : false;
|
||||
eResult = (glfwOpenWindow(width, height, 8, 8, 8, 0, 16, 8, (int)u32GLFWFlags) != false) ? true : false;
|
||||
|
||||
break;
|
||||
}
|
||||
|
@ -200,7 +200,7 @@ void CCEGLView::setFrameSize(float width, float height)
|
|||
case 32:
|
||||
{
|
||||
/* Updates video mode */
|
||||
eResult = (glfwOpenWindow(width, height, 8, 8, 8, 8, 16, 0, (int)u32GLFWFlags) != GL_FALSE) ? true :false;
|
||||
eResult = (glfwOpenWindow(width, height, 8, 8, 8, 8, 16, 8, (int)u32GLFWFlags) != GL_FALSE) ? true :false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -320,6 +320,10 @@ bool CCEGLView::initGL()
|
|||
{
|
||||
CCLog("OpenGL 2.0 not supported\n");
|
||||
}
|
||||
|
||||
// Enable point size by default on linux.
|
||||
glEnable(GL_VERTEX_PROGRAM_POINT_SIZE);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -113,6 +113,12 @@ ccLanguageType CCApplication::getCurrentLanguage()
|
|||
else if ([languageCode isEqualToString:@"ko"]){
|
||||
ret = kLanguageKorean;
|
||||
}
|
||||
else if ([languageCode isEqualToString:@"ja"]){
|
||||
ret = kLanguageJapanese;
|
||||
}
|
||||
else if ([languageCode isEqualToString:@"hu"]){
|
||||
ret = kLanguageHungarian;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -177,6 +177,14 @@ ccLanguageType CCApplication::getCurrentLanguage()
|
|||
currentLanguage = kLanguageKorean;
|
||||
break;
|
||||
|
||||
case S3E_DEVICE_LANGUAGE_JAPANESE:
|
||||
currentLanguage = kLanguageJapanese;
|
||||
break;
|
||||
|
||||
case S3E_DEVICE_LANGUAGE_HUNGARIAN:
|
||||
currentLanguage = kLanguageHungarian;
|
||||
break;
|
||||
|
||||
default:
|
||||
currentLanguage = kLanguageEnglish;
|
||||
break;
|
||||
|
|
|
@ -552,77 +552,77 @@ bool CCImage::initWithImageData(void * pData,
|
|||
int nHeight,
|
||||
int nBitsPerComponent)
|
||||
{
|
||||
bool bRet = false;
|
||||
do
|
||||
{
|
||||
CC_BREAK_IF(! pData || nDataLen <= 0);
|
||||
|
||||
if (kFmtPng == eFmt)
|
||||
{
|
||||
bRet = _initWithPngData(pData, nDataLen);
|
||||
break;
|
||||
}
|
||||
else if (kFmtJpg == eFmt)
|
||||
{
|
||||
bRet = _initWithJpgData(pData, nDataLen);
|
||||
break;
|
||||
}
|
||||
else if (kFmtTiff == eFmt)
|
||||
{
|
||||
bRet = _initWithTiffData(pData, nDataLen);
|
||||
break;
|
||||
}
|
||||
else if (kFmtRawData == eFmt)
|
||||
{
|
||||
bRet = _initWithRawData(pData, nDataLen, nWidth, nHeight, nBitsPerComponent);
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
// if it is a png file buffer.
|
||||
if (nDataLen > 8)
|
||||
{
|
||||
unsigned char* pHead = (unsigned char*)pData;
|
||||
if ( pHead[0] == 0x89
|
||||
&& pHead[1] == 0x50
|
||||
&& pHead[2] == 0x4E
|
||||
&& pHead[3] == 0x47
|
||||
&& pHead[4] == 0x0D
|
||||
&& pHead[5] == 0x0A
|
||||
&& pHead[6] == 0x1A
|
||||
&& pHead[7] == 0x0A)
|
||||
{
|
||||
bRet = _initWithPngData(pData, nDataLen);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// if it is a tiff file buffer.
|
||||
if (nDataLen > 2)
|
||||
{
|
||||
unsigned char* pHead = (unsigned char*)pData;
|
||||
if ( (pHead[0] == 0x49 && pHead[1] == 0x49)
|
||||
|| (pHead[0] == 0x4d && pHead[1] == 0x4d)
|
||||
)
|
||||
{
|
||||
bRet = _initWithTiffData(pData, nDataLen);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// if it is a jpeg file buffer.
|
||||
if (nDataLen > 2)
|
||||
{
|
||||
unsigned char* pHead = (unsigned char*)pData;
|
||||
if ( pHead[0] == 0xff
|
||||
&& pHead[1] == 0xd8)
|
||||
{
|
||||
bRet = _initWithJpgData(pData, nDataLen);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} while (0);
|
||||
bool bRet = false;
|
||||
do
|
||||
{
|
||||
CC_BREAK_IF(! pData || nDataLen <= 0);
|
||||
|
||||
if (kFmtPng == eFmt)
|
||||
{
|
||||
bRet = _initWithPngData(pData, nDataLen);
|
||||
break;
|
||||
}
|
||||
else if (kFmtJpg == eFmt)
|
||||
{
|
||||
bRet = _initWithJpgData(pData, nDataLen);
|
||||
break;
|
||||
}
|
||||
else if (kFmtTiff == eFmt)
|
||||
{
|
||||
bRet = _initWithTiffData(pData, nDataLen);
|
||||
break;
|
||||
}
|
||||
else if (kFmtRawData == eFmt)
|
||||
{
|
||||
bRet = _initWithRawData(pData, nDataLen, nWidth, nHeight, nBitsPerComponent);
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
// if it is a png file buffer.
|
||||
if (nDataLen > 8)
|
||||
{
|
||||
unsigned char* pHead = (unsigned char*)pData;
|
||||
if ( pHead[0] == 0x89
|
||||
&& pHead[1] == 0x50
|
||||
&& pHead[2] == 0x4E
|
||||
&& pHead[3] == 0x47
|
||||
&& pHead[4] == 0x0D
|
||||
&& pHead[5] == 0x0A
|
||||
&& pHead[6] == 0x1A
|
||||
&& pHead[7] == 0x0A)
|
||||
{
|
||||
bRet = _initWithPngData(pData, nDataLen);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// if it is a tiff file buffer.
|
||||
if (nDataLen > 2)
|
||||
{
|
||||
unsigned char* pHead = (unsigned char*)pData;
|
||||
if ( (pHead[0] == 0x49 && pHead[1] == 0x49)
|
||||
|| (pHead[0] == 0x4d && pHead[1] == 0x4d)
|
||||
)
|
||||
{
|
||||
bRet = _initWithTiffData(pData, nDataLen);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// if it is a jpeg file buffer.
|
||||
if (nDataLen > 2)
|
||||
{
|
||||
unsigned char* pHead = (unsigned char*)pData;
|
||||
if ( pHead[0] == 0xff
|
||||
&& pHead[1] == 0xd8)
|
||||
{
|
||||
bRet = _initWithJpgData(pData, nDataLen);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} while (0);
|
||||
return bRet;
|
||||
}
|
||||
|
||||
|
@ -630,99 +630,84 @@ bool CCImage::_initWithJpgData(void * data, int nSize)
|
|||
{
|
||||
IW_CALLSTACK("CCImage::_initWithJpgData");
|
||||
|
||||
bool bRet = false;
|
||||
/* these are standard libjpeg structures for reading(decompression) */
|
||||
struct jpeg_decompress_struct cinfo;
|
||||
struct jpeg_error_mgr jerr;
|
||||
/* libjpeg data structure for storing one row, that is, scanline of an image */
|
||||
JSAMPROW row_pointer[1] = {0};
|
||||
unsigned long location = 0;
|
||||
unsigned int i = 0;
|
||||
|
||||
s3eFile* pFile = s3eFileOpenFromMemory(data, nSize);
|
||||
|
||||
IwAssert(GAME, pFile);
|
||||
|
||||
jpeg_decompress_struct cinfo;
|
||||
bzero(&cinfo, sizeof(cinfo));
|
||||
|
||||
JSAMPARRAY buffer; /* Output row buffer */
|
||||
int row_stride; /* physical row width in output buffer */
|
||||
|
||||
jpeg_source_mgr srcmgr;
|
||||
|
||||
srcmgr.bytes_in_buffer = nSize;
|
||||
srcmgr.next_input_byte = (JOCTET*) data;
|
||||
srcmgr.init_source = CCImageHelper::JPEGInitSource;
|
||||
srcmgr.fill_input_buffer = CCImageHelper::JPEGFillInputBuffer;
|
||||
srcmgr.skip_input_data = CCImageHelper::JPEGSkipInputData;
|
||||
srcmgr.resync_to_restart = jpeg_resync_to_restart;
|
||||
srcmgr.term_source = CCImageHelper::JPEGTermSource;
|
||||
|
||||
jpeg_error_mgr jerr;
|
||||
cinfo.err = jpeg_std_error(&jerr);
|
||||
|
||||
jpeg_create_decompress(&cinfo);
|
||||
cinfo.src = &srcmgr;
|
||||
|
||||
jpeg_read_header(&cinfo, TRUE);
|
||||
jpeg_start_decompress(&cinfo);
|
||||
|
||||
/* JSAMPLEs per row in output buffer */
|
||||
row_stride = cinfo.output_width * cinfo.output_components;
|
||||
|
||||
/* Make a one-row-high sample array that will go away when done with image */
|
||||
buffer = (*cinfo.mem->alloc_sarray)
|
||||
((j_common_ptr) &cinfo, JPOOL_IMAGE, row_stride, 1);
|
||||
|
||||
int copy_rows = (int)cinfo.output_height;
|
||||
int copy_width = (int)cinfo.output_width;
|
||||
|
||||
if (copy_width < 0 || copy_rows < 0)
|
||||
bool bRet = false;
|
||||
do
|
||||
{
|
||||
printf("jpeg is fully off screen\n");
|
||||
return bRet;
|
||||
}
|
||||
int startx=0;
|
||||
int starty=0;
|
||||
int bytesPerPix = 4;
|
||||
m_pData = new unsigned char[copy_rows * copy_width * bytesPerPix];
|
||||
memset(m_pData,0, copy_rows * copy_width * bytesPerPix);
|
||||
// init image info
|
||||
m_bPreMulti = false;
|
||||
m_bHasAlpha = false;
|
||||
m_nHeight = copy_rows;
|
||||
m_nWidth = copy_width;
|
||||
m_nBitsPerComponent = bytesPerPix;
|
||||
unsigned char *dst = m_pData;
|
||||
unsigned char *pData = m_pData;
|
||||
/* here we set up the standard libjpeg error handler */
|
||||
cinfo.err = jpeg_std_error( &jerr );
|
||||
|
||||
while (cinfo.output_scanline < cinfo.output_height)// count through the image
|
||||
{
|
||||
/* jpeg_read_scanlines expects an array of pointers to scanlines.
|
||||
* Here the array is only one element long, but you could ask for
|
||||
* more than one scanline at a time if that's more convenient.
|
||||
*/
|
||||
(void) jpeg_read_scanlines(&cinfo, buffer, 1);
|
||||
/* setup decompression process and source, then read JPEG header */
|
||||
jpeg_create_decompress( &cinfo );
|
||||
|
||||
if (starty-- <= 0)// count down from start
|
||||
{
|
||||
if (copy_rows-- > 0)
|
||||
jpeg_source_mgr srcmgr;
|
||||
|
||||
srcmgr.bytes_in_buffer = nSize;
|
||||
srcmgr.next_input_byte = (JOCTET*) data;
|
||||
srcmgr.init_source = CCImageHelper::JPEGInitSource;
|
||||
srcmgr.fill_input_buffer = CCImageHelper::JPEGFillInputBuffer;
|
||||
srcmgr.skip_input_data = CCImageHelper::JPEGSkipInputData;
|
||||
srcmgr.resync_to_restart = jpeg_resync_to_restart;
|
||||
srcmgr.term_source = CCImageHelper::JPEGTermSource;
|
||||
cinfo.src = &srcmgr;
|
||||
// jpeg_mem_src( &cinfo, (unsigned char *) data, nSize );
|
||||
|
||||
/* reading the image header which contains image information */
|
||||
jpeg_read_header( &cinfo, true );
|
||||
|
||||
// we only support RGB or grayscale
|
||||
if (cinfo.jpeg_color_space != JCS_RGB)
|
||||
{
|
||||
if (cinfo.jpeg_color_space == JCS_GRAYSCALE || cinfo.jpeg_color_space == JCS_YCbCr)
|
||||
{
|
||||
for (int xx=startx; xx < copy_width; xx++)
|
||||
{
|
||||
uint8 r = buffer[0][xx*3+0];
|
||||
uint8 b = buffer[0][xx*3+1];
|
||||
uint8 g = buffer[0][xx*3+2];
|
||||
|
||||
*dst++ = r;
|
||||
*dst++ = b;
|
||||
*dst++ = g;
|
||||
*dst++ = 255;
|
||||
}
|
||||
}
|
||||
cinfo.out_color_space = JCS_RGB;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
(void) jpeg_finish_decompress(&cinfo);
|
||||
jpeg_destroy_decompress(&cinfo);
|
||||
/* Start decompression jpeg here */
|
||||
jpeg_start_decompress( &cinfo );
|
||||
|
||||
printf("jpeg display done\n");
|
||||
/* init image info */
|
||||
m_nWidth = (short)(cinfo.image_width);
|
||||
m_nHeight = (short)(cinfo.image_height);
|
||||
m_bHasAlpha = false;
|
||||
m_bPreMulti = false;
|
||||
m_nBitsPerComponent = 8;
|
||||
row_pointer[0] = new unsigned char[cinfo.output_width*cinfo.output_components];
|
||||
CC_BREAK_IF(! row_pointer[0]);
|
||||
|
||||
bRet = true;
|
||||
m_pData = new unsigned char[cinfo.output_width*cinfo.output_height*cinfo.output_components];
|
||||
CC_BREAK_IF(! m_pData);
|
||||
|
||||
/* now actually read the jpeg into the raw buffer */
|
||||
/* read one scan line at a time */
|
||||
while( cinfo.output_scanline < cinfo.image_height )
|
||||
{
|
||||
jpeg_read_scanlines( &cinfo, row_pointer, 1 );
|
||||
for( i=0; i<cinfo.image_width*cinfo.output_components;i++)
|
||||
{
|
||||
m_pData[location++] = row_pointer[0][i];
|
||||
}
|
||||
}
|
||||
|
||||
jpeg_finish_decompress( &cinfo );
|
||||
jpeg_destroy_decompress(&cinfo);
|
||||
/* wrap up decompression, destroy objects, free pointers and close open files */
|
||||
bRet = true;
|
||||
} while (0);
|
||||
|
||||
CC_SAFE_DELETE_ARRAY(row_pointer[0]);
|
||||
return bRet;
|
||||
}
|
||||
|
||||
|
|
|
@ -139,6 +139,12 @@ ccLanguageType CCApplication::getCurrentLanguage()
|
|||
case LANG_KOREAN:
|
||||
ret = kLanguageKorean;
|
||||
break;
|
||||
case LANG_JAPANESE:
|
||||
ret = kLanguageJapanese;
|
||||
break;
|
||||
case LANG_HUNGARIAN:
|
||||
ret = kLanguageHungarian;
|
||||
break;
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
|
|
@ -86,13 +86,12 @@
|
|||
<option id="gnu.cpp.link.option.soname.2012475291" name="Shared object name (-Wl,-soname=)" superClass="gnu.cpp.link.option.soname" value="" valueType="string"/>
|
||||
<option id="gnu.cpp.link.option.userobjs.1360463693" name="Other objects" superClass="gnu.cpp.link.option.userobjs" valueType="userObjs">
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux/libraries/libfreetype.a"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux/libraries/libcurl.a"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux/libraries/libtiff.a"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux/libraries/libxml2.a"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux/libraries/libpng.a"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux/libraries/libjpeg.a"/>
|
||||
</option>
|
||||
<option id="gnu.cpp.link.option.paths.1027331890" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
|
||||
<option id="gnu.cpp.link.option.paths.1027331890" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux/glew-1.7.0/glew-1.7.0/lib"/>
|
||||
</option>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.620370737" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
|
||||
|
@ -106,10 +105,11 @@
|
|||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry excluding="shaders|kazmath|tilemap_parallax_nodes|actions|base_nodes|cocoa|effects|include|keypad_dispatcher|label_nodes|layers_scenes_transitions_nodes|menu_nodes|misc_nodes|particle_nodes|platform|script_support|sprite_nodes|support|text_input_node|textures|tileMap_parallax_nodes|touch_dispatcher" flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name=""/>
|
||||
<entry excluding="draw_nodes|shaders|kazmath|tilemap_parallax_nodes|actions|base_nodes|cocoa|effects|include|keypad_dispatcher|label_nodes|layers_scenes_transitions_nodes|menu_nodes|misc_nodes|particle_nodes|platform|script_support|sprite_nodes|support|text_input_node|textures|tileMap_parallax_nodes|touch_dispatcher" flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name=""/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="actions"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="base_nodes"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="cocoa"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="draw_nodes"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="effects"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="include"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="kazmath"/>
|
||||
|
@ -217,12 +217,11 @@
|
|||
<option id="gnu.cpp.link.option.soname.1066283521" name="Shared object name (-Wl,-soname=)" superClass="gnu.cpp.link.option.soname" value="" valueType="string"/>
|
||||
<option id="gnu.cpp.link.option.userobjs.394630625" name="Other objects" superClass="gnu.cpp.link.option.userobjs" valueType="userObjs">
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux/libraries/libfreetype.a"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux/libraries/libcurl.a"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux/libraries/libxml2.a"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux/libraries/libpng.a"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux/libraries/libjpeg.a"/>
|
||||
</option>
|
||||
<option id="gnu.cpp.link.option.paths.1001119408" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
|
||||
<option id="gnu.cpp.link.option.paths.1001119408" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/linux/glew-1.7.0/glew-1.7.0/lib"/>
|
||||
</option>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.319060310" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
|
||||
|
@ -236,10 +235,11 @@
|
|||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry excluding="kazmath|tilemap_parallax_nodes|actions|base_nodes|cocoa|effects|include|keypad_dispatcher|label_nodes|layers_scenes_transitions_nodes|menu_nodes|misc_nodes|particle_nodes|platform|script_support|sprite_nodes|support|text_input_node|textures|tileMap_parallax_nodes|touch_dispatcher" flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name=""/>
|
||||
<entry excluding="draw_nodes|shaders|kazmath|tilemap_parallax_nodes|actions|base_nodes|cocoa|effects|include|keypad_dispatcher|label_nodes|layers_scenes_transitions_nodes|menu_nodes|misc_nodes|particle_nodes|platform|script_support|sprite_nodes|support|text_input_node|textures|tileMap_parallax_nodes|touch_dispatcher" flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name=""/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="actions"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="base_nodes"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="cocoa"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="draw_nodes"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="effects"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="include"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="kazmath"/>
|
||||
|
@ -251,6 +251,7 @@
|
|||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="particle_nodes"/>
|
||||
<entry excluding="android/|bada/|ios/|Linux/CCFileUtils_Linux.cpp|Linux/CCImage_Linux.cpp|marmalade/|qnx/|third_party/|win32/|wophone/" flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="platform"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="script_support"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="shaders"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="sprite_nodes"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="support"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="text_input_node"/>
|
||||
|
|
|
@ -101,11 +101,6 @@
|
|||
<type>1</type>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/CCDirector.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>CCDrawingPrimitives.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/CCDrawingPrimitives.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>CCScheduler.cpp</name>
|
||||
<type>1</type>
|
||||
|
@ -131,6 +126,11 @@
|
|||
<type>1</type>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/cocos2d.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>draw_nodes</name>
|
||||
<type>2</type>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/draw_nodes</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>effects</name>
|
||||
<type>2</type>
|
||||
|
|
|
@ -174,7 +174,7 @@ SHAREDLIBS += -L../../cocos2dx/platform/third_party/linux/glew-1.7.0/glew-1.7.0/
|
|||
|
||||
debug: CCFLAGS += -g3 -O0
|
||||
debug: CXXFLAGS += -g3 -O0
|
||||
debug: DEFINES += -DDEBUG -DCC_ENABLE_CHIPMUNK_INTEGRATION
|
||||
debug: DEFINES += -DDEBUG -DCC_ENABLE_CHIPMUNK_INTEGRATION -DCOCOS2D_DEBUG=1
|
||||
debug: $(TARGET)
|
||||
|
||||
release: CCFLAGS += -O3
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include "CCAccelerometer.h"
|
||||
#include "touch_dispatcher/CCTouch.h"
|
||||
#include "cocoa/CCSet.h"
|
||||
#include "CCAccelerometer.h"
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <list>
|
||||
|
@ -226,6 +227,9 @@ public:
|
|||
virtual int executeLayerTouchesEvent(CCLayer* pLayer, int eventType, CCSet *pTouches) = 0;
|
||||
virtual int executeLayerTouchEvent(CCLayer* pLayer, int eventType, CCTouch *pTouch) = 0;
|
||||
|
||||
/** functions for keypad event */
|
||||
virtual int executeLayerKeypadEvent(CCLayer* pLayer, int eventType) = 0;
|
||||
|
||||
/** execute a accelerometer event */
|
||||
virtual int executeAccelerometerEvent(CCLayer* pLayer, CCAcceleration* pAccelerationValue) = 0;
|
||||
};
|
||||
|
|
|
@ -458,11 +458,6 @@ void CCGLProgram::setUniformsForBuiltins()
|
|||
}
|
||||
}
|
||||
|
||||
void CCGLProgram::setUniformForModelViewProjectionMatrix()
|
||||
{
|
||||
setUniformsForBuiltins();
|
||||
}
|
||||
|
||||
void CCGLProgram::reset()
|
||||
{
|
||||
m_uVertShader = m_uFragShader = 0;
|
||||
|
|
|
@ -152,9 +152,6 @@ public:
|
|||
/** will update the builtin uniforms if they are different than the previous call for this same shader program. */
|
||||
void setUniformsForBuiltins();
|
||||
|
||||
/** Deprecated alias for setUniformsForBuiltins */
|
||||
CC_DEPRECATED_ATTRIBUTE void setUniformForModelViewProjectionMatrix();
|
||||
|
||||
/** returns the vertexShader error log */
|
||||
const char* vertexShaderLog();
|
||||
/** returns the fragmentShader error log */
|
||||
|
|
|
@ -20,9 +20,9 @@
|
|||
*/
|
||||
|
||||
" \n\
|
||||
#extension GL_OES_standard_derivatives : enable \n\
|
||||
\n\
|
||||
#ifdef GL_ES \n\
|
||||
// #extension GL_OES_standard_derivatives : enable \n\
|
||||
\n\
|
||||
varying mediump vec4 v_color; \n\
|
||||
varying mediump vec2 v_texcoord; \n\
|
||||
#else \n\
|
||||
|
@ -32,10 +32,10 @@ varying vec2 v_texcoord; \n\
|
|||
\n\
|
||||
void main() \n\
|
||||
{ \n\
|
||||
#if defined GL_OES_standard_derivatives \n\
|
||||
gl_FragColor = v_color*smoothstep(0.0, length(fwidth(v_texcoord)), 1.0 - length(v_texcoord)); \n\
|
||||
#else \n\
|
||||
// #if defined GL_OES_standard_derivatives \n\
|
||||
// gl_FragColor = v_color*smoothstep(0.0, length(fwidth(v_texcoord)), 1.0 - length(v_texcoord)); \n\
|
||||
// #else \n\
|
||||
gl_FragColor = v_color*step(0.0, 1.0 - length(v_texcoord)); \n\
|
||||
#endif \n\
|
||||
// #endif \n\
|
||||
} \n\
|
||||
";
|
||||
|
|
|
@ -81,11 +81,6 @@ CCObject* CCAnimationFrame::copyWithZone(CCZone* pZone)
|
|||
|
||||
// implementation of CCAnimation
|
||||
|
||||
CCAnimation* CCAnimation::animation(void)
|
||||
{
|
||||
return CCAnimation::create();
|
||||
}
|
||||
|
||||
CCAnimation* CCAnimation::create(void)
|
||||
{
|
||||
CCAnimation *pAnimation = new CCAnimation();
|
||||
|
@ -95,11 +90,6 @@ CCAnimation* CCAnimation::create(void)
|
|||
return pAnimation;
|
||||
}
|
||||
|
||||
CCAnimation* CCAnimation::animationWithSpriteFrames(CCArray *frames, float delay/* = 0.0f*/)
|
||||
{
|
||||
return CCAnimation::createWithSpriteFrames(frames, delay);
|
||||
}
|
||||
|
||||
CCAnimation* CCAnimation::createWithSpriteFrames(CCArray *frames, float delay/* = 0.0f*/)
|
||||
{
|
||||
CCAnimation *pAnimation = new CCAnimation();
|
||||
|
@ -109,11 +99,6 @@ CCAnimation* CCAnimation::createWithSpriteFrames(CCArray *frames, float delay/*
|
|||
return pAnimation;
|
||||
}
|
||||
|
||||
CCAnimation* CCAnimation::animationWithAnimationFrames(CCArray* arrayOfAnimationFrameNames, float delayPerUnit, unsigned int loops)
|
||||
{
|
||||
return CCAnimation::create(arrayOfAnimationFrameNames, delayPerUnit, loops);
|
||||
}
|
||||
|
||||
CCAnimation* CCAnimation::create(CCArray* arrayOfAnimationFrameNames, float delayPerUnit, unsigned int loops)
|
||||
{
|
||||
CCAnimation *pAnimation = new CCAnimation();
|
||||
|
|
|
@ -89,25 +89,6 @@ public:
|
|||
~CCAnimation(void);
|
||||
public:
|
||||
/** Creates an animation
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
@since v0.99.5
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCAnimation* animation(void);
|
||||
|
||||
/* Creates an animation with an array of CCSpriteFrame and a delay between frames in seconds.
|
||||
The frames will be added with one "delay unit".
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
@since v0.99.5
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCAnimation* animationWithSpriteFrames(CCArray* arrayOfSpriteFrameNames, float delay = 0.0f);
|
||||
|
||||
/* Creates an animation with an array of CCAnimationFrame, the delay per units in seconds and and how many times it should be executed.
|
||||
@deprecated: This interface will be deprecated sooner or later.
|
||||
@since v2.0
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE static CCAnimation* animationWithAnimationFrames(CCArray *arrayOfAnimationFrameNames, float delayPerUnit, unsigned int loops);
|
||||
|
||||
/** Creates an animation
|
||||
@since v0.99.5
|
||||
*/
|
||||
static CCAnimation* create(void);
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue