diff --git a/HelloLua/proj.win32/HelloLua.win32.vcproj b/HelloLua/proj.win32/HelloLua.win32.vcproj
index 1e4f31e3ba..5057a8e546 100644
--- a/HelloLua/proj.win32/HelloLua.win32.vcproj
+++ b/HelloLua/proj.win32/HelloLua.win32.vcproj
@@ -50,14 +50,14 @@
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\Classes;"$(SolutionDir)\lua\cocos2dx_support";"$(SolutionDir)\lua\CocosDenshion_support";"$(SolutionDir)\lua\lua";"$(SolutionDir)\lua\tolua";"$(SolutionDir)\lua\src";.;"$(SolutionDir)cocos2dx";"$(SolutionDir)cocos2dx\include";"$(SolutionDir)cocos2dx\kazmath\include";"$(SolutionDir)cocos2dx\platform\win32";"$(SolutionDir)cocos2dx\platform\third_party\win32\OGLES";"$(SolutionDir)CocosDenshion\include""
- PreprocessorDefinitions="WIN32;_WINDOWS;STRICT;_DEBUG;COCOS2D_DEBUG=1"
+ PreprocessorDefinitions="WIN32;_WINDOWS;STRICT;_DEBUG;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="4"
- DisableSpecificWarnings="4251"
+ DisableSpecificWarnings="4267;4251;4244"
/>
Disabled.;..\Classes;..\..\cocos2dx;..\..\cocos2dx\include;..\..\cocos2dx\kazmath\include;..\..\cocos2dx\platform\win32;..\..\cocos2dx\platform\third_party\win32;..\..\cocos2dx\platform\third_party\win32\OGLES;..\..\CocosDenshion\Include;..\..\lua\cocos2dx_support;..\..\lua\tolua;..\..\lua\lua;%(AdditionalIncludeDirectories)
- WIN32;_WINDOWS;STRICT;_DEBUG;COCOS2D_DEBUG=1;ENABLE_LUA;%(PreprocessorDefinitions)
+ WIN32;_WINDOWS;STRICT;_DEBUG;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)trueEnableFastChecksMultiThreadedDebugDLL
@@ -73,7 +73,7 @@
Level3EditAndContinue
- 4251;%(DisableSpecificWarnings)
+ 4267;4251;4244;%(DisableSpecificWarnings)_DEBUG;%(PreprocessorDefinitions)
@@ -103,7 +103,7 @@
.;..\Classes;..\..\cocos2dx;..\..\cocos2dx\include;..\..\cocos2dx\kazmath\include;..\..\cocos2dx\platform\win32;..\..\cocos2dx\platform\third_party\win32;..\..\cocos2dx\platform\third_party\win32\OGLES;..\..\CocosDenshion\Include;..\..\lua\cocos2dx_support;..\..\lua\tolua;..\..\lua\lua;%(AdditionalIncludeDirectories)
- WIN32;_WINDOWS;STRICT;NDEBUG;%(PreprocessorDefinitions)
+ WIN32;_WINDOWS;STRICT;NDEBUG;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)MultiThreadedDLL
@@ -112,7 +112,7 @@
Level3
- 4251;%(DisableSpecificWarnings)
+ 4267;4251;4244;%(DisableSpecificWarnings)NDEBUG;%(PreprocessorDefinitions)
diff --git a/HelloWorld/proj.win32/HelloWorld.win32.vcproj b/HelloWorld/proj.win32/HelloWorld.win32.vcproj
index eb3f3b68a9..3c5bbb16fb 100644
--- a/HelloWorld/proj.win32/HelloWorld.win32.vcproj
+++ b/HelloWorld/proj.win32/HelloWorld.win32.vcproj
@@ -42,13 +42,14 @@
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""$(SolutionDir)cocos2dx";"$(SolutionDir)cocos2dx\include";"$(SolutionDir)cocos2dx\kazmath\include";"$(SolutionDir)cocos2dx\platform\win32";"$(SolutionDir)cocos2dx\platform\third_party\win32\OGLES";..\Classes"
- PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="4"
+ DisableSpecificWarnings="4267;4251;4244"
/>
Disabled.;..\Classes;..\..\cocos2dx;..\..\cocos2dx\include;..\..\cocos2dx\kazmath\include;..\..\cocos2dx\platform\win32;..\..\cocos2dx\platform\third_party\win32;..\..\cocos2dx\platform\third_party\win32\OGLES;..\..\CocosDenshion\Include;%(AdditionalIncludeDirectories)
- WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)
+ WIN32;_DEBUG;_WINDOWS;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)trueEnableFastChecksMultiThreadedDebugDLL
@@ -63,6 +63,7 @@
Level3EditAndContinue
+ 4267;4251;4244libcocos2d.lib;%(AdditionalDependencies)
@@ -82,13 +83,14 @@
MaxSpeedtrue.;..\Classes;..\..\cocos2dx;..\..\cocos2dx\include;..\..\cocos2dx\kazmath\include;..\..\cocos2dx\platform\win32;..\..\cocos2dx\platform\third_party\win32;..\..\cocos2dx\platform\third_party\win32\OGLES;..\..\CocosDenshion\Include;%(AdditionalIncludeDirectories)
- WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
+ WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)MultiThreadedDLLtrueLevel3ProgramDatabase
+ 4267;4251;4244libcocos2d.lib;%(AdditionalDependencies)
diff --git a/cocos2dx/CCDirector.cpp b/cocos2dx/CCDirector.cpp
index 6932e32495..603dfc0a4f 100644
--- a/cocos2dx/CCDirector.cpp
+++ b/cocos2dx/CCDirector.cpp
@@ -596,7 +596,7 @@ void CCDirector::purgeDirector()
// purge bitmap cache
CCLabelBMFont::purgeCachedData();
- // purge all managers / caches
+ // purge all managed caches
CCAnimationCache::purgeSharedAnimationCache();
CCSpriteFrameCache::purgeSharedSpriteFrameCache();
CCTextureCache::purgeSharedTextureCache();
diff --git a/cocos2dx/actions/CCAction.h b/cocos2dx/actions/CCAction.h
index d51d0a075f..02723c1735 100644
--- a/cocos2dx/actions/CCAction.h
+++ b/cocos2dx/actions/CCAction.h
@@ -95,7 +95,7 @@ public:
/** Allocates and initializes the action
@warning: This interface will be deprecated in future.
*/
- static CCAction* action();
+ CC_DEPRECATED_ATTRIBUTE static CCAction* action();
/** Create an action */
static CCAction* create();
@@ -182,7 +182,7 @@ public:
/** creates the action
@warning: This interface will be deprecated in future.
*/
- static CCSpeed* actionWithAction(CCActionInterval *pAction, float fSpeed);
+ CC_DEPRECATED_ATTRIBUTE static CCSpeed* actionWithAction(CCActionInterval *pAction, float fSpeed);
/** create the action */
static CCSpeed* create(CCActionInterval* pAction, float fSpeed);
@@ -231,7 +231,7 @@ public:
It will work with no boundary if @param rect is equal to CCRectZero.
@warning: This interface will be deprecated in future.
*/
- static CCFollow* actionWithTarget(CCNode *pFollowedNode, const CCRect& rect = CCRectZero);
+ 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.
*/
diff --git a/cocos2dx/actions/CCActionCamera.h b/cocos2dx/actions/CCActionCamera.h
index 49a5d18c20..9c2e9cb5a0 100644
--- a/cocos2dx/actions/CCActionCamera.h
+++ b/cocos2dx/actions/CCActionCamera.h
@@ -90,7 +90,7 @@ public:
/** creates a CCOrbitCamera action with radius, delta-radius, z, deltaZ, x, deltaX
@warning: This interface will be deprecated in future.
*/
- static CCOrbitCamera* actionWithDuration(float t, float radius, float deltaRadius, float angleZ, float deltaAngleZ, float angleX, float deltaAngleX);
+ 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);
diff --git a/cocos2dx/actions/CCActionCatmullRom.cpp b/cocos2dx/actions/CCActionCatmullRom.cpp
index 47f5c40a66..632cd160a6 100644
--- a/cocos2dx/actions/CCActionCatmullRom.cpp
+++ b/cocos2dx/actions/CCActionCatmullRom.cpp
@@ -182,14 +182,14 @@ CCPoint ccCardinalSplineAt(CCPoint &p0, CCPoint &p1, CCPoint &p2, CCPoint &p3, f
float t3 = t2 * t;
/*
- * Formula: s(-ttt + 2tt – t)P1 + s(-ttt + tt)P2 + (2ttt – 3tt + 1)P2 + s(ttt – 2tt + t)P3 + (-2ttt + 3tt)P3 + s(ttt – tt)P4
+ * Formula: s(-ttt + 2tt - t)P1 + s(-ttt + tt)P2 + (2ttt - 3tt + 1)P2 + s(ttt - 2tt + t)P3 + (-2ttt + 3tt)P3 + s(ttt - tt)P4
*/
float s = (1 - tension) / 2;
- float b1 = s * ((-t3 + (2 * t2)) - t); // s(-t3 + 2 t2 – t)P1
- float b2 = s * (-t3 + t2) + (2 * t3 - 3 * t2 + 1); // s(-t3 + t2)P2 + (2 t3 – 3 t2 + 1)P2
- float b3 = s * (t3 - 2 * t2 + t) + (-2 * t3 + 3 * t2); // s(t3 – 2 t2 + t)P3 + (-2 t3 + 3 t2)P3
- float b4 = s * (t3 - t2); // s(t3 – t2)P4
+ float b1 = s * ((-t3 + (2 * t2)) - t); // s(-t3 + 2 t2 - t)P1
+ float b2 = s * (-t3 + t2) + (2 * t3 - 3 * t2 + 1); // s(-t3 + t2)P2 + (2 t3 - 3 t2 + 1)P2
+ float b3 = s * (t3 - 2 * t2 + t) + (-2 * t3 + 3 * t2); // s(t3 - 2 t2 + t)P3 + (-2 t3 + 3 t2)P3
+ float b4 = s * (t3 - t2); // s(t3 - t2)P4
float x = (p0.x*b1 + p1.x*b2 + p2.x*b3 + p3.x*b4);
float y = (p0.y*b1 + p1.y*b2 + p2.y*b3 + p3.y*b4);
diff --git a/cocos2dx/actions/CCActionCatmullRom.h b/cocos2dx/actions/CCActionCatmullRom.h
index 4f6fd87c3e..ae62c6ff7f 100644
--- a/cocos2dx/actions/CCActionCatmullRom.h
+++ b/cocos2dx/actions/CCActionCatmullRom.h
@@ -52,7 +52,7 @@ public:
/** creates and initializes a Points array with capacity
@warning: This interface will be deprecated in future.
*/
- static CCPointArray* arrayWithCapacity(unsigned int capacity);
+ CC_DEPRECATED_ATTRIBUTE static CCPointArray* arrayWithCapacity(unsigned int capacity);
/** creates and initializes a Points array with capacity */
static CCPointArray* create(unsigned int capacity);
@@ -110,7 +110,7 @@ public:
/** creates an action with a Cardinal Spline array of points and tension
@warning: This interface will be deprecated in future.
*/
- static CCCardinalSplineTo* actionWithDuration(float duration, CCPointArray* points, float tension);
+ 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);
@@ -153,7 +153,7 @@ public:
/** creates an action with a Cardinal Spline array of points and tension
@warning: This interface will be deprecated in future.
*/
- static CCCardinalSplineBy* actionWithDuration(float duration, CCPointArray* points, float tension);
+ 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);
@@ -177,7 +177,7 @@ public:
/** creates an action with a Cardinal Spline array of points and tension
@warning: This interface will be deprecated in future.
*/
- static CCCatmullRomTo* actionWithDuration(float dt, CCPointArray* points);
+ 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);
@@ -196,7 +196,7 @@ public:
/** creates an action with a Cardinal Spline array of points and tension
@warning: This interface will be deprecated in future.
*/
- static CCCatmullRomBy* actionWithDuration(float dt, CCPointArray* points);
+ 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);
diff --git a/cocos2dx/actions/CCActionEase.h b/cocos2dx/actions/CCActionEase.h
index 45402a79c2..9946643f86 100644
--- a/cocos2dx/actions/CCActionEase.h
+++ b/cocos2dx/actions/CCActionEase.h
@@ -54,7 +54,7 @@ public:
/** creates the action
@warning: This interface will be deprecated in future.
*/
- static CCActionEase* actionWithAction(CCActionInterval *pAction);
+ CC_DEPRECATED_ATTRIBUTE static CCActionEase* actionWithAction(CCActionInterval *pAction);
/** creates the action */
static CCActionEase* create(CCActionInterval *pAction);
@@ -86,7 +86,7 @@ public:
/** Creates the action with the inner action and the rate parameter
@warning: This interface will be deprecated in future.
*/
- static CCEaseRateAction* actionWithAction(CCActionInterval* pAction, float fRate);
+ 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);
@@ -108,7 +108,7 @@ public:
/** Creates the action with the inner action and the rate parameter
@warning: This interface will be deprecated in future.
*/
- static CCEaseIn* actionWithAction(CCActionInterval* pAction, float fRate);
+ 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);
@@ -128,7 +128,7 @@ public:
/** Creates the action with the inner action and the rate parameter
@warning: This interface will be deprecated in future.
*/
- static CCEaseOut* actionWithAction(CCActionInterval* pAction, float fRate);
+ 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);
@@ -148,7 +148,7 @@ public:
/** Creates the action with the inner action and the rate parameter
@warning: This interface will be deprecated in future.
*/
- static CCEaseInOut* actionWithAction(CCActionInterval* pAction, float fRate);
+ 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);
@@ -168,7 +168,7 @@ public:
/** creates the action
@warning: This interface will be deprecated in future.
*/
- static CCEaseExponentialIn* actionWithAction(CCActionInterval* pAction);
+ CC_DEPRECATED_ATTRIBUTE static CCEaseExponentialIn* actionWithAction(CCActionInterval* pAction);
/** creates the action */
static CCEaseExponentialIn* create(CCActionInterval* pAction);
};
@@ -187,7 +187,7 @@ public:
/** creates the action
@warning: This interface will be deprecated in future.
*/
- static CCEaseExponentialOut* actionWithAction(CCActionInterval* pAction);
+ CC_DEPRECATED_ATTRIBUTE static CCEaseExponentialOut* actionWithAction(CCActionInterval* pAction);
/** creates the action */
static CCEaseExponentialOut* create(CCActionInterval* pAction);
};
@@ -206,7 +206,7 @@ public:
/** creates the action
@warning: This interface will be deprecated in future.
*/
- static CCEaseExponentialInOut* actionWithAction(CCActionInterval* pAction);
+ CC_DEPRECATED_ATTRIBUTE static CCEaseExponentialInOut* actionWithAction(CCActionInterval* pAction);
/** creates the action */
static CCEaseExponentialInOut* create(CCActionInterval* pAction);
@@ -226,7 +226,7 @@ public:
/** creates the action
@warning: This interface will be deprecated in future.
*/
- static CCEaseSineIn* actionWithAction(CCActionInterval* pAction);
+ CC_DEPRECATED_ATTRIBUTE static CCEaseSineIn* actionWithAction(CCActionInterval* pAction);
/** creates the action */
static CCEaseSineIn* create(CCActionInterval* pAction);
};
@@ -245,7 +245,7 @@ public:
/** creates the action
@warning: This interface will be deprecated in future.
*/
- static CCEaseSineOut* actionWithAction(CCActionInterval* pAction);
+ CC_DEPRECATED_ATTRIBUTE static CCEaseSineOut* actionWithAction(CCActionInterval* pAction);
/** creates the action */
static CCEaseSineOut* create(CCActionInterval* pAction);
};
@@ -264,7 +264,7 @@ public:
/** creates the action
@warning: This interface will be deprecated in future.
*/
- static CCEaseSineInOut* actionWithAction(CCActionInterval* pAction);
+ CC_DEPRECATED_ATTRIBUTE static CCEaseSineInOut* actionWithAction(CCActionInterval* pAction);
/** creates the action */
static CCEaseSineInOut* create(CCActionInterval* pAction);
};
@@ -291,7 +291,7 @@ public:
/** Creates the action with the inner action and the period in radians (default is 0.3)
@warning: This interface will be deprecated in future.
*/
- static CCEaseElastic* actionWithAction(CCActionInterval *pAction, float fPeriod = 0.3f);
+ 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 = 0.3f);
protected:
@@ -314,7 +314,7 @@ public:
/** Creates the action with the inner action and the period in radians (default is 0.3)
@warning: This interface will be deprecated in future.
*/
- static CCEaseElasticIn* actionWithAction(CCActionInterval *pAction, float fPeriod = 0.3f);
+ 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 = 0.3f);
};
@@ -335,7 +335,7 @@ public:
/** Creates the action with the inner action and the period in radians (default is 0.3)
@warning: This interface will be deprecated in future.
*/
- static CCEaseElasticOut* actionWithAction(CCActionInterval *pAction, float fPeriod = 0.3f);
+ 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 = 0.3f);
@@ -357,7 +357,7 @@ public:
/** Creates the action with the inner action and the period in radians (default is 0.3)
@warning: This interface will be deprecated in future.
*/
- static CCEaseElasticInOut* actionWithAction(CCActionInterval *pAction, float fPeriod = 0.3f);
+ 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 = 0.3f);
@@ -378,7 +378,7 @@ public:
/** creates the action
@warning: This interface will be deprecated in future.
*/
- static CCEaseBounce* actionWithAction(CCActionInterval* pAction);
+ CC_DEPRECATED_ATTRIBUTE static CCEaseBounce* actionWithAction(CCActionInterval* pAction);
/** creates the action */
static CCEaseBounce* create(CCActionInterval* pAction);
};
@@ -399,7 +399,7 @@ public:
/** creates the action
@warning: This interface will be deprecated in future.
*/
- static CCEaseBounceIn* actionWithAction(CCActionInterval* pAction);
+ CC_DEPRECATED_ATTRIBUTE static CCEaseBounceIn* actionWithAction(CCActionInterval* pAction);
/** creates the action */
static CCEaseBounceIn* create(CCActionInterval* pAction);
};
@@ -420,7 +420,7 @@ public:
/** creates the action
@warning: This interface will be deprecated in future.
*/
- static CCEaseBounceOut* actionWithAction(CCActionInterval* pAction);
+ CC_DEPRECATED_ATTRIBUTE static CCEaseBounceOut* actionWithAction(CCActionInterval* pAction);
/** creates the action */
static CCEaseBounceOut* create(CCActionInterval* pAction);
};
@@ -441,7 +441,7 @@ public:
/** creates the action
@warning: This interface will be deprecated in future.
*/
- static CCEaseBounceInOut* actionWithAction(CCActionInterval* pAction);
+ CC_DEPRECATED_ATTRIBUTE static CCEaseBounceInOut* actionWithAction(CCActionInterval* pAction);
/** creates the action */
static CCEaseBounceInOut* create(CCActionInterval* pAction);
};
@@ -462,7 +462,7 @@ public:
/** creates the action
@warning: This interface will be deprecated in future.
*/
- static CCEaseBackIn* actionWithAction(CCActionInterval* pAction);
+ CC_DEPRECATED_ATTRIBUTE static CCEaseBackIn* actionWithAction(CCActionInterval* pAction);
/** creates the action */
static CCEaseBackIn* create(CCActionInterval* pAction);
};
@@ -483,7 +483,7 @@ public:
/** creates the action
@warning: This interface will be deprecated in future.
*/
- static CCEaseBackOut* actionWithAction(CCActionInterval* pAction);
+ CC_DEPRECATED_ATTRIBUTE static CCEaseBackOut* actionWithAction(CCActionInterval* pAction);
/** creates the action */
static CCEaseBackOut* create(CCActionInterval* pAction);
};
@@ -504,7 +504,7 @@ public:
/** creates the action
@warning: This interface will be deprecated in future.
*/
- static CCEaseBackInOut* actionWithAction(CCActionInterval* pAction);
+ CC_DEPRECATED_ATTRIBUTE static CCEaseBackInOut* actionWithAction(CCActionInterval* pAction);
/** creates the action */
static CCEaseBackInOut* create(CCActionInterval* pAction);
};
diff --git a/cocos2dx/actions/CCActionGrid.h b/cocos2dx/actions/CCActionGrid.h
index 74cca70d40..675d18adce 100644
--- a/cocos2dx/actions/CCActionGrid.h
+++ b/cocos2dx/actions/CCActionGrid.h
@@ -49,7 +49,7 @@ public:
/** creates the action with size and duration
@warning: This interface will be deprecated in future.
*/
- static CCGridAction* actionWithSize(const ccGridSize& gridSize, float duration);
+ 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:
@@ -76,7 +76,7 @@ public:
/** creates the action with size and duration
@warning: This interface will be deprecated in future.
*/
- static CCGrid3DAction* actionWithSize(const ccGridSize& gridSize, float duration);
+ 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);
};
@@ -99,7 +99,7 @@ public:
/** creates the action with size and duration
@warning: This interface will be deprecated in future.
*/
- static CCTiledGrid3DAction* actionWithSize(const ccGridSize& gridSize, float duration);
+ 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);
};
@@ -125,7 +125,7 @@ public:
/** creates the action with an inner action that has the amplitude property, and a duration time
@warning: This interface will be deprecated in future.
*/
- static CCAccelDeccelAmplitude* actionWithAction(CCAction *pAction, float duration);
+ 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);
@@ -155,7 +155,7 @@ public:
/** creates the action with an inner action that has the amplitude property, and a duration time
@warning: This interface will be deprecated in future.
*/
- static CCAccelAmplitude* actionWithAction(CCAction *pAction, float duration);
+ 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:
@@ -184,7 +184,7 @@ public:
/** creates the action with an inner action that has the amplitude property, and a duration time
@warning: This interface will be deprecated in future.
*/
- static CCDeccelAmplitude* actionWithAction(CCAction *pAction, float duration);
+ 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);
@@ -207,7 +207,7 @@ public:
/** Allocates and initializes the action
@warning: This interface will be deprecated in future.
*/
- static CCStopGrid* action(void);
+ CC_DEPRECATED_ATTRIBUTE static CCStopGrid* action(void);
/** Allocates and initializes the action */
static CCStopGrid* create(void);
};
@@ -225,7 +225,7 @@ public:
/** creates an action with the number of times that the current grid will be reused
@warning: This interface will be deprecated in future.
*/
- static CCReuseGrid* actionWithTimes(int times);
+ 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:
diff --git a/cocos2dx/actions/CCActionGrid3D.h b/cocos2dx/actions/CCActionGrid3D.h
index b509b4e22f..c8d36bc4ca 100644
--- a/cocos2dx/actions/CCActionGrid3D.h
+++ b/cocos2dx/actions/CCActionGrid3D.h
@@ -50,7 +50,7 @@ public:
/** create the action
@warning: This interface will be deprecated in future.
*/
- static CCWaves3D* actionWithWaves(int wav, float amp, const ccGridSize& gridSize, float duration);
+ 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:
@@ -73,7 +73,7 @@ public:
/** creates the action with duration
@warning: This interface will be deprecated in future.
*/
- static CCFlipX3D* actionWithDuration(float duration);
+ CC_DEPRECATED_ATTRIBUTE static CCFlipX3D* actionWithDuration(float duration);
/** creates the action with duration */
static CCFlipX3D* create(float duration);
};
@@ -89,7 +89,7 @@ public:
/** creates the action with duration
@warning: This interface will be deprecated in future.
*/
- static CCFlipY3D* actionWithDuration(float duration);
+ CC_DEPRECATED_ATTRIBUTE static CCFlipY3D* actionWithDuration(float duration);
/** creates the action with duration */
static CCFlipY3D* create(float duration);
};
@@ -115,7 +115,7 @@ public:
/** creates the action with center position, radius, a grid size and duration
@warning: This interface will be deprecated in future.
*/
- static CCLens3D* actionWithPosition(const CCPoint& pos, float r, const ccGridSize& gridSize, float duration);
+ 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:
@@ -153,7 +153,7 @@ public:
/** creates the action with radius, number of waves, amplitude, a grid size and duration
@warning: This interface will be deprecated in future.
*/
- static CCRipple3D* actionWithPosition(const CCPoint& pos, float r, int wav, float amp,
+ 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,
@@ -180,7 +180,7 @@ public:
/** creates the action with a range, shake Z vertices, a grid and duration
@warning: This interface will be deprecated in future.
*/
- static CCShaky3D* actionWithRange(int range, bool shakeZ, const ccGridSize& gridSize, float duration);
+ 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:
@@ -207,7 +207,7 @@ public:
/** creates the action with amplitude, a grid and duration
@warning: This interface will be deprecated in future.
*/
- static CCLiquid* actionWithWaves(int wav, float amp, const ccGridSize& gridSize, float duration);
+ 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:
@@ -236,7 +236,7 @@ public:
/** initializes the action with amplitude, horizontal sin, vertical sin, a grid and duration
@warning: This interface will be deprecated in future.
*/
- static CCWaves* actionWithWaves(int wav, float amp, bool h, bool v, const ccGridSize& gridSize,
+ 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 */
@@ -275,7 +275,7 @@ public:
/** creates the action with center position, number of twirls, amplitude, a grid size and duration
@warning: This interface will be deprecated in future.
*/
- static CCTwirl* actionWithPosition(CCPoint pos, int t, float amp, const ccGridSize& gridSize,
+ 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 */
diff --git a/cocos2dx/actions/CCActionInstant.h b/cocos2dx/actions/CCActionInstant.h
index bd9fa64204..bedd94cd76 100644
--- a/cocos2dx/actions/CCActionInstant.h
+++ b/cocos2dx/actions/CCActionInstant.h
@@ -66,7 +66,7 @@ public:
/** Allocates and initializes the action
@warning: This interface will be deprecated in future.
*/
- static CCShow * action();
+ CC_DEPRECATED_ATTRIBUTE static CCShow * action();
/** Allocates and initializes the action */
static CCShow * create();
@@ -91,7 +91,7 @@ public:
/** Allocates and initializes the action
@warning: This interface will be deprecated in future.
*/
- static CCHide * action();
+ CC_DEPRECATED_ATTRIBUTE static CCHide * action();
/** Allocates and initializes the action */
static CCHide * create();
@@ -112,7 +112,7 @@ public:
/** Allocates and initializes the action
@warning: This interface will be deprecated in future.
*/
- static CCToggleVisibility * action();
+ CC_DEPRECATED_ATTRIBUTE static CCToggleVisibility * action();
/** Allocates and initializes the action */
static CCToggleVisibility * create();
@@ -133,7 +133,7 @@ public:
/** create the action
@warning: This interface will be deprecated in future.
*/
- static CCFlipX * actionWithFlipX(bool x);
+ CC_DEPRECATED_ATTRIBUTE static CCFlipX * actionWithFlipX(bool x);
/** create the action */
static CCFlipX * create(bool x);
@@ -164,7 +164,7 @@ public:
/** create the action
@warning: This interface will be deprecated in future.
*/
- static CCFlipY * actionWithFlipY(bool y);
+ CC_DEPRECATED_ATTRIBUTE static CCFlipY * actionWithFlipY(bool y);
/** create the action */
static CCFlipY * create(bool y);
@@ -190,7 +190,7 @@ public:
/** creates a Place action with a position
@warning: This interface will be deprecated in future.
*/
- static CCPlace * actionWithPosition(const CCPoint& pos);
+ 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 */
@@ -220,7 +220,7 @@ public:
@warning: This interface will be deprecated in future.
typedef void (CCObject::*SEL_CallFunc)();
*/
- static CCCallFunc * actionWithTarget(CCObject* pSelectorTarget, SEL_CallFunc selector);
+ CC_DEPRECATED_ATTRIBUTE static CCCallFunc * actionWithTarget(CCObject* pSelectorTarget, SEL_CallFunc selector);
/** creates the action with the callback
@@ -280,7 +280,7 @@ public:
@warning: This interface will be deprecated in future.
typedef void (CCObject::*SEL_CallFuncN)(CCNode*);
*/
- static CCCallFuncN * actionWithTarget(CCObject* pSelectorTarget, SEL_CallFuncN selector);
+ CC_DEPRECATED_ATTRIBUTE static CCCallFuncN * actionWithTarget(CCObject* pSelectorTarget, SEL_CallFuncN selector);
/** creates the action with the callback
@@ -309,7 +309,7 @@ public:
/** creates the action with the callback and the data to pass as an argument
@warning: This interface will be deprecated in future.
*/
- static CCCallFuncND * actionWithTarget(CCObject* pSelectorTarget, SEL_CallFuncND selector, void* d);
+ 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);
@@ -339,7 +339,7 @@ public:
@warning: This interface will be deprecated in future.
typedef void (CCObject::*SEL_CallFuncO)(CCObject*);
*/
- static CCCallFuncO * actionWithTarget(CCObject* pSelectorTarget, SEL_CallFuncO selector, CCObject* pObject);
+ CC_DEPRECATED_ATTRIBUTE static CCCallFuncO * actionWithTarget(CCObject* pSelectorTarget, SEL_CallFuncO selector, CCObject* pObject);
/** creates the action with the callback
diff --git a/cocos2dx/actions/CCActionInterval.cpp b/cocos2dx/actions/CCActionInterval.cpp
index 599bd9b9ef..cddd12b8c6 100644
--- a/cocos2dx/actions/CCActionInterval.cpp
+++ b/cocos2dx/actions/CCActionInterval.cpp
@@ -178,7 +178,7 @@ CCFiniteTimeAction* CCSequence::actions(CCFiniteTimeAction *pAction1, ...)
pNow = va_arg(params, CCFiniteTimeAction*);
if (pNow)
{
- pPrev = actionOneTwo(pPrev, pNow);
+ pPrev = CCSequence::create(pPrev, pNow);
}
else
{
@@ -215,18 +215,18 @@ CCFiniteTimeAction* CCSequence::create(CCFiniteTimeAction *pAction1, ...)
return pPrev;
}
-CCFiniteTimeAction* CCSequence::actionWithArray(CCArray *actions)
+CCFiniteTimeAction* CCSequence::actionWithArray(CCArray* arrayOfActions)
{
- return CCSequence::create(actions);
+ return CCSequence::create(arrayOfActions);
}
-CCFiniteTimeAction* CCSequence::create(CCArray *actions)
+CCFiniteTimeAction* CCSequence::create(CCArray* arrayOfActions)
{
- CCFiniteTimeAction* prev = (CCFiniteTimeAction*)actions->objectAtIndex(0);
+ CCFiniteTimeAction* prev = (CCFiniteTimeAction*)arrayOfActions->objectAtIndex(0);
- for (unsigned int i = 1; i < actions->count(); ++i)
+ for (unsigned int i = 1; i < arrayOfActions->count(); ++i)
{
- prev = create(prev, (CCFiniteTimeAction*)actions->objectAtIndex(i));
+ prev = create(prev, (CCFiniteTimeAction*)arrayOfActions->objectAtIndex(i));
}
return prev;
@@ -585,7 +585,7 @@ CCFiniteTimeAction* CCSpawn::actions(CCFiniteTimeAction *pAction1, ...)
pNow = va_arg(params, CCFiniteTimeAction*);
if (pNow)
{
- pPrev = actionOneTwo(pPrev, pNow);
+ pPrev = CCSpawn::create(pPrev, pNow);
}
else
{
@@ -622,18 +622,18 @@ CCFiniteTimeAction* CCSpawn::create(CCFiniteTimeAction *pAction1, ...)
return pPrev;
}
-CCFiniteTimeAction* CCSpawn::actionWithArray(CCArray *actions)
+CCFiniteTimeAction* CCSpawn::actionWithArray(CCArray *arrayOfActions)
{
- return CCSpawn::create(actions);
+ return CCSpawn::create(arrayOfActions);
}
-CCFiniteTimeAction* CCSpawn::create(CCArray *actions)
+CCFiniteTimeAction* CCSpawn::create(CCArray *arrayOfActions)
{
- CCFiniteTimeAction* prev = (CCFiniteTimeAction*)actions->objectAtIndex(0);
+ CCFiniteTimeAction* prev = (CCFiniteTimeAction*)arrayOfActions->objectAtIndex(0);
- for (unsigned int i = 1; i < actions->count(); ++i)
+ for (unsigned int i = 1; i < arrayOfActions->count(); ++i)
{
- prev = create(prev, (CCFiniteTimeAction*)actions->objectAtIndex(i));
+ prev = create(prev, (CCFiniteTimeAction*)arrayOfActions->objectAtIndex(i));
}
return prev;
diff --git a/cocos2dx/actions/CCActionInterval.h b/cocos2dx/actions/CCActionInterval.h
index 78b56db756..339794cb5d 100644
--- a/cocos2dx/actions/CCActionInterval.h
+++ b/cocos2dx/actions/CCActionInterval.h
@@ -75,7 +75,7 @@ public:
/** creates the action
@warning: This interface will be deprecated in future.
*/
- static CCActionInterval* actionWithDuration(float d);
+ CC_DEPRECATED_ATTRIBUTE static CCActionInterval* actionWithDuration(float d);
/** creates the action */
static CCActionInterval* create(float d);
@@ -110,15 +110,15 @@ public:
/** helper constructor to create an array of sequenceable actions
@warning: This interface will be deprecated in future.
*/
- static CCFiniteTimeAction* actions(CCFiniteTimeAction *pAction1, ...);
+ CC_DEPRECATED_ATTRIBUTE static CCFiniteTimeAction* actions(CCFiniteTimeAction *pAction1, ...);
/** helper contructor to create an array of sequenceable actions given an array
@warning: This interface will be deprecated in future.
*/
- static CCFiniteTimeAction* actionWithArray(CCArray *arrayOfActions);
+ CC_DEPRECATED_ATTRIBUTE static CCFiniteTimeAction* actionWithArray(CCArray *arrayOfActions);
/** creates the action
@warning: This interface will be deprecated in future.
*/
- static CCSequence* actionOneTwo(CCFiniteTimeAction *pActionOne, CCFiniteTimeAction *pActionTwo);
+ CC_DEPRECATED_ATTRIBUTE static CCSequence* actionOneTwo(CCFiniteTimeAction *pActionOne, CCFiniteTimeAction *pActionTwo);
/** helper constructor to create an array of sequenceable actions */
static CCFiniteTimeAction* create(CCFiniteTimeAction *pAction1, ...);
@@ -170,7 +170,7 @@ public:
/** creates a CCRepeat action. Times is an unsigned integer between 1 and pow(2,30)
@warning: This interface will be deprecated in future.
*/
- static CCRepeat* actionWithAction(CCFiniteTimeAction *pAction, unsigned int times);
+ 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);
@@ -222,7 +222,7 @@ public:
/** creates the action
@warning: This interface will be deprecated in future.
*/
- static CCRepeatForever* actionWithAction(CCActionInterval *pAction);
+ CC_DEPRECATED_ATTRIBUTE static CCRepeatForever* actionWithAction(CCActionInterval *pAction);
/** creates the action */
static CCRepeatForever* create(CCActionInterval *pAction);
protected:
@@ -250,17 +250,17 @@ public:
/** helper constructor to create an array of spawned actions
@warning: This interface will be deprecated in future.
*/
- static CCFiniteTimeAction* actions(CCFiniteTimeAction *pAction1, ...);
+ CC_DEPRECATED_ATTRIBUTE static CCFiniteTimeAction* actions(CCFiniteTimeAction *pAction1, ...);
/** helper contructor to create an array of spawned actions given an array
@warning: This interface will be deprecated in future.
*/
- static CCFiniteTimeAction* actionWithArray(CCArray *arrayOfActions);
+ CC_DEPRECATED_ATTRIBUTE static CCFiniteTimeAction* actionWithArray(CCArray *arrayOfActions);
/** creates the Spawn action
@warning: This interface will be deprecated in future.
*/
- static CCSpawn* actionOneTwo(CCFiniteTimeAction *pAction1, CCFiniteTimeAction *pAction2);
+ CC_DEPRECATED_ATTRIBUTE static CCSpawn* actionOneTwo(CCFiniteTimeAction *pAction1, CCFiniteTimeAction *pAction2);
/** helper constructor to create an array of spawned actions */
static CCFiniteTimeAction* create(CCFiniteTimeAction *pAction1, ...);
@@ -294,7 +294,7 @@ public:
/** creates the action
@warning: This interface will be deprecated in future.
*/
- static CCRotateTo* actionWithDuration(float duration, float fDeltaAngle);
+ CC_DEPRECATED_ATTRIBUTE static CCRotateTo* actionWithDuration(float duration, float fDeltaAngle);
/** creates the action */
static CCRotateTo* create(float duration, float fDeltaAngle);
protected:
@@ -320,7 +320,7 @@ public:
/** creates the action
@warning: This interface will be deprecated in future.
*/
- static CCRotateBy* actionWithDuration(float duration, float fDeltaAngle);
+ CC_DEPRECATED_ATTRIBUTE static CCRotateBy* actionWithDuration(float duration, float fDeltaAngle);
/** creates the action */
static CCRotateBy* create(float duration, float fDeltaAngle);
protected:
@@ -344,7 +344,7 @@ public:
/** creates the action
@warning: This interface will be deprecated in future.
*/
- static CCMoveTo* actionWithDuration(float duration, const CCPoint& position);
+ CC_DEPRECATED_ATTRIBUTE static CCMoveTo* actionWithDuration(float duration, const CCPoint& position);
/** creates the action */
static CCMoveTo* create(float duration, const CCPoint& position);
protected:
@@ -371,7 +371,7 @@ public:
/** creates the action
@warning: This interface will be deprecated in future.
*/
- static CCMoveBy* actionWithDuration(float duration, const CCPoint& position);
+ CC_DEPRECATED_ATTRIBUTE static CCMoveBy* actionWithDuration(float duration, const CCPoint& position);
/** creates the action */
static CCMoveBy* create(float duration, const CCPoint& position);
};
@@ -392,7 +392,7 @@ public:
/** creates the action
@warning: This interface will be deprecated in future.
*/
- static CCSkewTo* actionWithDuration(float t, float sx, float sy);
+ CC_DEPRECATED_ATTRIBUTE static CCSkewTo* actionWithDuration(float t, float sx, float sy);
/** creates the action */
static CCSkewTo* create(float t, float sx, float sy);
@@ -421,7 +421,7 @@ public:
/** creates the action
@warning: This interface will be deprecated in future.
*/
- static CCSkewBy* actionWithDuration(float t, float deltaSkewX, float deltaSkewY);
+ CC_DEPRECATED_ATTRIBUTE static CCSkewBy* actionWithDuration(float t, float deltaSkewX, float deltaSkewY);
/** creates the action */
static CCSkewBy* create(float t, float deltaSkewX, float deltaSkewY);
};
@@ -443,7 +443,7 @@ public:
/** creates the action
@warning: This interface will be deprecated in future.
*/
- static CCJumpBy* actionWithDuration(float duration, const CCPoint& position, float height, unsigned int jumps);
+ 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:
@@ -465,7 +465,7 @@ public:
/** creates the action
@warning: This interface will be deprecated in future.
*/
- static CCJumpTo* actionWithDuration(float duration, const CCPoint& position, float height, int jumps);
+ 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);
};
@@ -498,7 +498,7 @@ public:
/** creates the action with a duration and a bezier configuration
@warning: This interface will be deprecated in future.
*/
- static CCBezierBy* actionWithDuration(float t, const ccBezierConfig& c);
+ 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:
@@ -519,7 +519,7 @@ public:
/** creates the action with a duration and a bezier configuration
@warning: This interface will be deprecated in future.
*/
- static CCBezierTo* actionWithDuration(float t, const ccBezierConfig& c);
+ 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);
@@ -545,12 +545,12 @@ public:
/** creates the action with the same scale factor for X and Y
@warning: This interface will be deprecated in future.
*/
- static CCScaleTo* actionWithDuration(float duration, float s);
+ CC_DEPRECATED_ATTRIBUTE static CCScaleTo* actionWithDuration(float duration, float s);
/** creates the action with and X factor and a Y factor
@warning: This interface will be deprecated in future.
*/
- static CCScaleTo* actionWithDuration(float duration, float sx, float sy);
+ 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);
@@ -581,12 +581,12 @@ public:
/** creates the action with the same scale factor for X and Y
@warning: This interface will be deprecated in future.
*/
- static CCScaleBy* actionWithDuration(float duration, float s);
+ CC_DEPRECATED_ATTRIBUTE static CCScaleBy* actionWithDuration(float duration, float s);
/** creates the action with and X factor and a Y factor
@warning: This interface will be deprecated in future.
*/
- static CCScaleBy* actionWithDuration(float duration, float sx, float sy);
+ 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);
@@ -611,7 +611,7 @@ public:
/** creates the action
@warning: This interface will be deprecated in future.
*/
- static CCBlink* actionWithDuration(float duration, unsigned int uBlinks);
+ CC_DEPRECATED_ATTRIBUTE static CCBlink* actionWithDuration(float duration, unsigned int uBlinks);
/** creates the action */
static CCBlink* create(float duration, unsigned int uBlinks);
protected:
@@ -632,7 +632,7 @@ public:
/** creates the action
@warning: This interface will be deprecated in future.
*/
- static CCFadeIn* actionWithDuration(float d);
+ CC_DEPRECATED_ATTRIBUTE static CCFadeIn* actionWithDuration(float d);
/** creates the action */
static CCFadeIn* create(float d);
};
@@ -651,7 +651,7 @@ public:
/** creates the action
@warning: This interface will be deprecated in future.
*/
- static CCFadeOut* actionWithDuration(float d);
+ CC_DEPRECATED_ATTRIBUTE static CCFadeOut* actionWithDuration(float d);
/** creates the action */
static CCFadeOut* create(float d);
@@ -674,7 +674,7 @@ public:
/** creates an action with duration and opacity
@warning: This interface will be deprecated in future.
*/
- static CCFadeTo* actionWithDuration(float duration, GLubyte opacity);
+ 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:
@@ -700,7 +700,7 @@ public:
/** creates an action with duration and color
@warning: This interface will be deprecated in future.
*/
- static CCTintTo* actionWithDuration(float duration, GLubyte red, GLubyte green, GLubyte blue);
+ 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:
@@ -726,7 +726,7 @@ public:
/** creates an action with duration and color
@warning: This interface will be deprecated in future.
*/
- static CCTintBy* actionWithDuration(float duration, GLshort deltaRed, GLshort deltaGreen, GLshort deltaBlue);
+ 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:
@@ -752,7 +752,7 @@ public:
/** creates the action
@warning: This interface will be deprecated in future.
*/
- static CCDelayTime* actionWithDuration(float d);
+ CC_DEPRECATED_ATTRIBUTE static CCDelayTime* actionWithDuration(float d);
/** creates the action */
static CCDelayTime* create(float d);
@@ -784,7 +784,7 @@ public:
/** creates the action
@warning: This interface will be deprecated in future.
*/
- static CCReverseTime* actionWithAction(CCFiniteTimeAction *pAction);
+ CC_DEPRECATED_ATTRIBUTE static CCReverseTime* actionWithAction(CCFiniteTimeAction *pAction);
/** creates the action */
static CCReverseTime* create(CCFiniteTimeAction *pAction);
protected:
@@ -813,7 +813,7 @@ public:
/** creates the action with an Animation and will restore the original frame when the animation is over
@warning: This interface will be deprecated in future.
*/
- static CCAnimate* actionWithAnimation(CCAnimation *pAnimation);
+ 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)
@@ -835,7 +835,7 @@ public:
/** Create an action with the specified action and forced target
@warning: This interface will be deprecated in future.
*/
- static CCTargetedAction* actionWithTarget(CCNode* pTarget, CCFiniteTimeAction* pAction);
+ 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);
diff --git a/cocos2dx/actions/CCActionPageTurn3D.h b/cocos2dx/actions/CCActionPageTurn3D.h
index 7ec14caac2..ce675c5473 100644
--- a/cocos2dx/actions/CCActionPageTurn3D.h
+++ b/cocos2dx/actions/CCActionPageTurn3D.h
@@ -46,7 +46,7 @@ public:
/** create the action
@warning: This interface will be deprecated in future.
*/
- static CCPageTurn3D* actionWithSize(const ccGridSize& gridSize, float time);
+ CC_DEPRECATED_ATTRIBUTE static CCPageTurn3D* actionWithSize(const ccGridSize& gridSize, float time);
/** create the action */
static CCPageTurn3D* create(const ccGridSize& gridSize, float time);
};
diff --git a/cocos2dx/actions/CCActionProgressTimer.h b/cocos2dx/actions/CCActionProgressTimer.h
index 9e09094e53..d1130b9e15 100644
--- a/cocos2dx/actions/CCActionProgressTimer.h
+++ b/cocos2dx/actions/CCActionProgressTimer.h
@@ -47,7 +47,7 @@ public:
/** Creates and initializes with a duration and a percent
@warning: This interface will be deprecated in future.
*/
- static CCProgressTo* actionWithDuration(float duration, float fPercent);
+ 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:
@@ -74,7 +74,7 @@ public:
/** Creates and initializes the action with a duration, a "from" percentage and a "to" percentage
@warning: This interface will be deprecated in future.
*/
- static CCProgressFromTo* actionWithDuration(float duration, float fFromPercentage, float fToPercentage);
+ 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:
diff --git a/cocos2dx/actions/CCActionTiledGrid.h b/cocos2dx/actions/CCActionTiledGrid.h
index 1c67f09d98..c075b284fe 100644
--- a/cocos2dx/actions/CCActionTiledGrid.h
+++ b/cocos2dx/actions/CCActionTiledGrid.h
@@ -43,7 +43,7 @@ public:
/** creates the action with a range, whether or not to shake Z vertices, a grid size, and duration
@warning: This interface will be deprecated in future.
*/
- static CCShakyTiles3D* actionWithRange(int nRange, bool bShakeZ, const ccGridSize& gridSize, float duration);
+ 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);
@@ -68,7 +68,7 @@ public:
/** creates the action with a range, whether of not to shatter Z vertices, a grid size and duration
@warning: This interface will be deprecated in future.
*/
- static CCShatteredTiles3D* actionWithRange(int nRange, bool bShatterZ, const ccGridSize& gridSize,
+ 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 */
@@ -102,7 +102,7 @@ public:
/** creates the action with a random seed, the grid size and the duration
@warning: This interface will be deprecated in future.
*/
- static CCShuffleTiles* actionWithSeed(int s, const ccGridSize& gridSize, float duration);
+ 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:
@@ -128,7 +128,7 @@ public:
/** creates the action with the grid size and the duration
@warning: This interface will be deprecated in future.
*/
- static CCFadeOutTRTiles* actionWithSize(const ccGridSize& gridSize, float time);
+ 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);
@@ -146,7 +146,7 @@ public:
/** creates the action with the grid size and the duration
@warning: This interface will be deprecated in future.
*/
- static CCFadeOutBLTiles* actionWithSize(const ccGridSize& gridSize, float time);
+ 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);
@@ -165,7 +165,7 @@ public:
/** creates the action with the grid size and the duration
@warning: This interface will be deprecated in future.
*/
- static CCFadeOutUpTiles* actionWithSize(const ccGridSize& gridSize, float time);
+ 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);
@@ -183,7 +183,7 @@ public:
/** creates the action with the grid size and the duration
@warning: This interface will be deprecated in future.
*/
- static CCFadeOutDownTiles* actionWithSize(const ccGridSize& gridSize, float time);
+ 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);
@@ -210,11 +210,11 @@ public:
/** creates the action with the grid size and the duration
@warning: This interface will be deprecated in future.
*/
- static CCTurnOffTiles* actionWithSize(const ccGridSize& size, float d);
+ CC_DEPRECATED_ATTRIBUTE static CCTurnOffTiles* actionWithSize(const ccGridSize& size, float d);
/** creates the action with a random seed, the grid size and the duration
@warning: This interface will be deprecated in future.
*/
- static CCTurnOffTiles* actionWithSeed(int s, const ccGridSize& gridSize, float duration);
+ 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);
@@ -249,7 +249,7 @@ public:
/** creates the action with a number of waves, the waves amplitude, the grid size and the duration
@warning: This interface will be deprecated in future.
*/
- static CCWavesTiles3D* actionWithWaves(int wav, float amp, const ccGridSize& gridSize, float duration);
+ 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:
@@ -281,7 +281,7 @@ public:
/** creates the action with the number of jumps, the sin amplitude, the grid size and the duration
@warning: This interface will be deprecated in future.
*/
- static CCJumpTiles3D* actionWithJumps(int j, float amp, const ccGridSize& gridSize, float duration);
+ 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:
@@ -305,7 +305,7 @@ public:
/** creates the action with the number of rows to split and the duration
@warning: This interface will be deprecated in future.
*/
- static CCSplitRows* actionWithRows(int nRows, float duration);
+ 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:
@@ -328,7 +328,7 @@ public:
/** creates the action with the number of columns to split and the duration
@warning: This interface will be deprecated in future.
*/
- static CCSplitCols* actionWithCols(int nCols, float duration);
+ 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:
diff --git a/cocos2dx/actions/CCActionTween.h b/cocos2dx/actions/CCActionTween.h
index e3ceca34d0..9620437f0d 100644
--- a/cocos2dx/actions/CCActionTween.h
+++ b/cocos2dx/actions/CCActionTween.h
@@ -60,7 +60,7 @@ public:
/** creates an initializes the action with the property name (key), and the from and to parameters.
@warning: This interface will be deprecated in future.
*/
- static CCActionTween* actionWithDuration(float aDuration, const char* key, float from, float to);
+ 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. */
diff --git a/cocos2dx/base_nodes/CCAtlasNode.h b/cocos2dx/base_nodes/CCAtlasNode.h
index ecd4231a38..bb4650045d 100644
--- a/cocos2dx/base_nodes/CCAtlasNode.h
+++ b/cocos2dx/base_nodes/CCAtlasNode.h
@@ -82,7 +82,7 @@ public:
/** creates a CCAtlasNode with an Atlas file the width and height of each item and the quantity of items to render
@warning: This interface will be deprecated in future.
*/
- static CCAtlasNode * atlasWithTileFile(const char* tile,unsigned int tileWidth, unsigned int tileHeight,
+ 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*/
diff --git a/cocos2dx/base_nodes/CCNode.h b/cocos2dx/base_nodes/CCNode.h
index 086e2e8c9d..abf1ee8984 100644
--- a/cocos2dx/base_nodes/CCNode.h
+++ b/cocos2dx/base_nodes/CCNode.h
@@ -308,7 +308,7 @@ public:
The node will be created as "autorelease".
@warning: This interface will be deprecated in future.
*/
- static CCNode * node(void);
+ CC_DEPRECATED_ATTRIBUTE static CCNode * node(void);
/** allocates and initializes a node.
The node will be created as "autorelease".
diff --git a/cocos2dx/cocoa/CCArray.h b/cocos2dx/cocoa/CCArray.h
index 5b09f1b74c..e2e52b9085 100644
--- a/cocos2dx/cocoa/CCArray.h
+++ b/cocos2dx/cocoa/CCArray.h
@@ -113,37 +113,37 @@ public:
/** Create an array
@warning: This interface will be deprecated in future.
*/
- static CCArray* array();
+ CC_DEPRECATED_ATTRIBUTE static CCArray* array();
/** Create an array with one object
@warning: This interface will be deprecated in future.
*/
- static CCArray* arrayWithObject(CCObject* pObject);
+ CC_DEPRECATED_ATTRIBUTE static CCArray* arrayWithObject(CCObject* pObject);
/** Create an array with some objects
@warning: This interface will be deprecated in future.
*/
- static CCArray* arrayWithObjects(CCObject* pObject, ...);
+ CC_DEPRECATED_ATTRIBUTE static CCArray* arrayWithObjects(CCObject* pObject, ...);
/** Create an array with capacity
@warning: This interface will be deprecated in future.
*/
- static CCArray* arrayWithCapacity(unsigned int capacity);
+ CC_DEPRECATED_ATTRIBUTE static CCArray* arrayWithCapacity(unsigned int capacity);
/** Create an array with an existing array
@warning: This interface will be deprecated in future.
*/
- static CCArray* arrayWithArray(CCArray* otherArray);
+ 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
@warning: This interface will be deprecated in future.
*/
- static CCArray* arrayWithContentsOfFile(const char* pFileName);
+ 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().
@warning: This interface will be deprecated in future.
*/
- static CCArray* arrayWithContentsOfFileThreadSafe(const char* pFileName);
+ CC_DEPRECATED_ATTRIBUTE static CCArray* arrayWithContentsOfFileThreadSafe(const char* pFileName);
/** Create an array */
static CCArray* create();
diff --git a/cocos2dx/cocoa/CCDictionary.h b/cocos2dx/cocoa/CCDictionary.h
index 86dfa07d9a..64614df570 100644
--- a/cocos2dx/cocoa/CCDictionary.h
+++ b/cocos2dx/cocoa/CCDictionary.h
@@ -137,23 +137,24 @@ public:
/* static functions */
//@warning: This interface will be deprecated in future.
- static CCDictionary* dictionary();
+ CC_DEPRECATED_ATTRIBUTE static CCDictionary* dictionary();
- static CCDictionary* dictionaryWithDictionary(CCDictionary* srcDict);
+ //@warning: This interface will be deprecated in future.
+ CC_DEPRECATED_ATTRIBUTE static CCDictionary* dictionaryWithDictionary(CCDictionary* srcDict);
/**
@brief Generate a CCDictionary pointer by file
@param pFileName The file name of *.plist file
@return The CCDictionary pointer generated from the file
@warning: This interface will be deprecated in future.
*/
- static CCDictionary* dictionaryWithContentsOfFile(const char *pFileName);
+ 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().
@warning: This interface will be deprecated in future.
*/
- static CCDictionary* dictionaryWithContentsOfFileThreadSafe(const char *pFileName);
+ CC_DEPRECATED_ATTRIBUTE static CCDictionary* dictionaryWithContentsOfFileThreadSafe(const char *pFileName);
static CCDictionary* create();
diff --git a/cocos2dx/cocoa/CCInteger.h b/cocos2dx/cocoa/CCInteger.h
index b8d550cf18..ff52046405 100644
--- a/cocos2dx/cocoa/CCInteger.h
+++ b/cocos2dx/cocoa/CCInteger.h
@@ -13,7 +13,7 @@ public:
int getValue() const {return m_nValue;}
// @warning: This interface will be deprecated in future.
- static CCInteger* integerWithInt(int v)
+ CC_DEPRECATED_ATTRIBUTE static CCInteger* integerWithInt(int v)
{
return CCInteger::create(v);
}
diff --git a/cocos2dx/cocoa/CCString.cpp b/cocos2dx/cocoa/CCString.cpp
index 96fb38e841..f6ea6d8390 100644
--- a/cocos2dx/cocoa/CCString.cpp
+++ b/cocos2dx/cocoa/CCString.cpp
@@ -155,9 +155,9 @@ CCString* CCString::stringWithCString(const char* pStr)
return CCString::create(pStr);
}
-CCString* CCString::create(const char* pStr)
+CCString* CCString::create(const std::string& str)
{
- CCString* pRet = new CCString(pStr);
+ CCString* pRet = new CCString(str);
pRet->autorelease();
return pRet;
}
@@ -169,7 +169,12 @@ CCString* CCString::stringWithString(const std::string& pStr)
return pRet;
}
-CCString* CCString::stringWithCStringData(const char* pData, unsigned long nLen)
+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;
if (pData != NULL)
@@ -178,30 +183,11 @@ CCString* CCString::stringWithCStringData(const char* pData, unsigned long nLen)
if (pStr != NULL)
{
pStr[nLen] = '\0';
- memcpy(pStr, pData, nLen);
- pRet = CCString::stringWithCString(pStr);
- free(pStr);
- }
- }
- return pRet;
-
-}
-
-CCString* CCString::stringWithData(unsigned char* pData, unsigned long nLen)
-{
- return CCString::createWithData(pData, nLen);
-}
-
-CCString* CCString::createWithData(unsigned char* pData, unsigned long nLen)
-{
- CCString* pRet = NULL;
- if (pData != NULL && nLen > 0)
- {
- char* pStr = (char*)malloc(nLen+1);
- if (pStr != NULL)
- {
- pStr[nLen] = '\0';
- memcpy(pStr, pData, nLen);
+ if (nLen > 0)
+ {
+ memcpy(pStr, pData, nLen);
+ }
+
pRet = CCString::create(pStr);
free(pStr);
}
diff --git a/cocos2dx/cocoa/CCString.h b/cocos2dx/cocoa/CCString.h
index b1d2e55bb8..2712ac0cba 100644
--- a/cocos2dx/cocoa/CCString.h
+++ b/cocos2dx/cocoa/CCString.h
@@ -80,19 +80,13 @@ public:
* it means that you needn't do a release operation unless you retain it.
@warning: This interface will be deprecated in future.
*/
- static CCString* stringWithCString(const char* pStr);
-
- /** 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.
- */
- static CCString* stringWithCStringData(const char* pData, unsigned long nLen);
+ 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.
*/
- static CCString* stringWithString(const std::string& str);
+ 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.
@@ -100,27 +94,27 @@ public:
* it means that you needn't do a release operation unless you retain it.
@warning: This interface will be deprecated in future.
*/
- static CCString* stringWithFormat(const char* format, ...);
+ 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.
@warning: This interface will be deprecated in future.
*/
- static CCString* stringWithData(unsigned char* pData, unsigned long nLen);
+ 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.
@warning: This interface will be deprecated in future.
*/
- static CCString* stringWithContentsOfFile(const char* pszFileName);
+ CC_DEPRECATED_ATTRIBUTE static CCString* stringWithContentsOfFile(const char* pszFileName);
- /** create a string with c string
+ /** create a string with std string, you can also pass a c string pointer because the default constuctor 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.
*/
- static CCString* create(const char* pStr);
+ static CCString* create(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.
@@ -133,7 +127,7 @@ public:
* @return A CCString pointer which is an autorelease object pointer,
* it means that you needn't do a release operation unless you retain it.
*/
- static CCString* createWithData(unsigned char* pData, unsigned long nLen);
+ static CCString* createWithData(const unsigned char* pData, unsigned long nLen);
/** create a string with a file,
* @return A CCString pointer which is an autorelease object pointer,
diff --git a/cocos2dx/effects/CCGrid.h b/cocos2dx/effects/CCGrid.h
index fd4b645113..22743dc3b2 100644
--- a/cocos2dx/effects/CCGrid.h
+++ b/cocos2dx/effects/CCGrid.h
@@ -79,11 +79,11 @@ public:
/** create one Grid
@warning: This interface will be deprecated in future.
*/
- static CCGridBase* gridWithSize(const ccGridSize& gridSize, CCTexture2D *texture, bool flipped);
+ CC_DEPRECATED_ATTRIBUTE static CCGridBase* gridWithSize(const ccGridSize& gridSize, CCTexture2D *texture, bool flipped);
/** create one Grid
@warning: This interface will be deprecated in future.
*/
- static CCGridBase* gridWithSize(const ccGridSize& gridSize);
+ CC_DEPRECATED_ATTRIBUTE static CCGridBase* gridWithSize(const ccGridSize& gridSize);
/** create one Grid */
static CCGridBase* create(const ccGridSize& gridSize, CCTexture2D *texture, bool flipped);
diff --git a/cocos2dx/extensions/CCBReader/CCBReader.cpp b/cocos2dx/extensions/CCBReader/CCBReader.cpp
index 822406653f..76548aab89 100644
--- a/cocos2dx/extensions/CCBReader/CCBReader.cpp
+++ b/cocos2dx/extensions/CCBReader/CCBReader.cpp
@@ -93,7 +93,7 @@ CCNode * CCBReader::readNodeGraphFromFile(CCString * pCCBRootPath, CCString * pC
}
CCNode * CCBReader::readNodeGraphFromFile(const char * pCCBRootPath, const char * pCCBFileName, CCObject * pOwner, CCSize pRootContainerSize) {
- return this->readNodeGraphFromFile(CCString::stringWithCString(pCCBRootPath), CCString::stringWithCString(pCCBFileName), pOwner, pRootContainerSize);
+ return this->readNodeGraphFromFile(CCString::create(pCCBRootPath), CCString::create(pCCBFileName), pOwner, pRootContainerSize);
}
CCNode * CCBReader::readNodeGraphFromFile(CCString * pCCBRootPath, CCString * pCCBFileName, CCObject * pOwner, CCSize pRootContainerSize) {
@@ -166,8 +166,8 @@ void CCBReader::readStringCacheEntry() {
int numBytes = b0 << 8 | b1;
- const char * src = (const char *) (this->mBytes + this->mCurrentByte);
- CCString * string = CCString::stringWithCStringData(src, (unsigned long)numBytes);
+ const unsigned char * src = (const unsigned char *) (this->mBytes + this->mCurrentByte);
+ CCString * string = CCString::createWithData(src, (unsigned long)numBytes);
string->retain();
this->mCurrentByte += numBytes;
@@ -182,7 +182,7 @@ unsigned char CCBReader::readByte() {
}
bool CCBReader::readBool() {
- return this->readByte();
+ return 0 == this->readByte() ? false : true;
}
int CCBReader::readInt(bool pSigned) {
@@ -230,7 +230,7 @@ float CCBReader::readFloat() {
case kCCBFloat05:
return 0.5f;
case kCCBFloatInteger:
- return this->readInt(true);
+ return (float)this->readInt(true);
default:
/* using a memcpy since the compiler isn't
* doing the float ptr math correctly on device.
@@ -368,24 +368,24 @@ CCString * CCBReader::lastPathComponent(CCString * pPath) {
std::string path(pPath->getCString());
int slashPos = path.find_last_of("/");
if(slashPos != std::string::npos) {
- return CCString::stringWithCString(path.substr(slashPos + 1, path.length() - slashPos).c_str());
+ return CCString::create(path.substr(slashPos + 1, path.length() - slashPos).c_str());
}
- return CCString::stringWithCString(path.c_str());
+ return CCString::create(path.c_str());
}
CCString * CCBReader::deletePathExtension(CCString * pPath) {
std::string path(pPath->getCString());
int dotPos = path.find_last_of(".");
if(dotPos != std::string::npos) {
- return CCString::stringWithCString(path.substr(0, dotPos).c_str());
+ return CCString::create(path.substr(0, dotPos).c_str());
}
- return CCString::stringWithCString(path.c_str());
+ return CCString::create(path.c_str());
}
CCString * CCBReader::toLowerCase(CCString * pString) {
std::string copy(pString->getCString());
std::transform(copy.begin(), copy.end(), copy.begin(), ::tolower);
- return CCString::stringWithCString(copy.c_str());
+ return CCString::create(copy.c_str());
}
CCString * CCBReader::concat(CCString * pStringA, CCString * pStringB) {
@@ -396,7 +396,7 @@ CCString * CCBReader::concat(CCString * pStringA, CCString * pStringB) {
strcat(concatenated, pStringB->getCString());
concatenated[concatenatedLength] = '\0';
- pRet = CCString::stringWithCString(concatenated);
+ pRet = CCString::create(concatenated);
CC_SAFE_FREE(concatenated);
return pRet;
}
diff --git a/cocos2dx/extensions/CCBReader/CCNodeLoader.cpp b/cocos2dx/extensions/CCBReader/CCNodeLoader.cpp
index 5ebc34972b..e6bcfe96e3 100644
--- a/cocos2dx/extensions/CCBReader/CCNodeLoader.cpp
+++ b/cocos2dx/extensions/CCBReader/CCNodeLoader.cpp
@@ -415,7 +415,7 @@ CCSpriteFrame * CCNodeLoader::parsePropTypeSpriteFrame(CCNode * pNode, CCNode *
CCTexture2D * texture = CCTextureCache::sharedTextureCache()->addImage(spriteFilePath->getCString());
CCRect bounds = CCRectMake(0, 0, texture->getContentSize().width, texture->getContentSize().height);
- spriteFrame = CCSpriteFrame::frameWithTexture(texture, bounds);
+ spriteFrame = CCSpriteFrame::create(texture, bounds);
} else {
CCSpriteFrameCache * frameCache = CCSpriteFrameCache::sharedSpriteFrameCache();
@@ -537,7 +537,7 @@ CCString * CCNodeLoader::parsePropTypeText(CCNode * pNode, CCNode * pParent, CCB
CCString * CCNodeLoader::parsePropTypeFontTTF(CCNode * pNode, CCNode * pParent, CCBReader * pCCBReader) {
CCString * fontTTF = pCCBReader->readCachedString();
- CCString * ttfEnding = CCString::stringWithCString(".ttf");
+ CCString * ttfEnding = CCString::create(".ttf");
/* If the fontTTF comes with the ".ttf" extension, prepend the absolute path.
* System fonts come without the ".ttf" extension and do not need the path prepended. */
@@ -653,7 +653,7 @@ CCNode * CCNodeLoader::parsePropTypeCCBFile(CCNode * pNode, CCNode * pParent, CC
/* Change path extension to .ccbi. */
CCString * ccbFileWithoutPathExtension = CCBReader::deletePathExtension(ccbFileName);
- CCString * ccbiFileName = CCBReader::concat(ccbFileWithoutPathExtension, CCString::stringWithCString(".ccbi"));
+ CCString * ccbiFileName = CCBReader::concat(ccbFileWithoutPathExtension, CCString::create(".ccbi"));
CCBReader * ccbReader = new CCBReader(pCCBReader);
ccbReader->autorelease();
diff --git a/cocos2dx/extensions/CCBReader/CCNodeLoader.h b/cocos2dx/extensions/CCBReader/CCNodeLoader.h
index e4f03cdd4c..639c7baad5 100644
--- a/cocos2dx/extensions/CCBReader/CCNodeLoader.h
+++ b/cocos2dx/extensions/CCBReader/CCNodeLoader.h
@@ -7,7 +7,7 @@
NS_CC_EXT_BEGIN
#define CCB_VIRTUAL_NEW_AUTORELEASE_CREATECCNODE_METHOD(T) virtual T * createCCNode(cocos2d::CCNode * pParent, cocos2d::extension::CCBReader * pCCBReader) { \
- return T::node(); \
+ return T::create(); \
}
#define CCB_PURE_VIRTUAL_NEW_AUTORELEASE_CREATECCNODE_METHOD(T) virtual T * createCCNode(cocos2d::CCNode * pParent, cocos2d::extension::CCBReader * pCCBReader) = 0
diff --git a/cocos2dx/extensions/CCBReader/CCNodeLoaderLibrary.cpp b/cocos2dx/extensions/CCBReader/CCNodeLoaderLibrary.cpp
index ff25b171ac..bd5fe95410 100644
--- a/cocos2dx/extensions/CCBReader/CCNodeLoaderLibrary.cpp
+++ b/cocos2dx/extensions/CCBReader/CCNodeLoaderLibrary.cpp
@@ -44,7 +44,7 @@ void CCNodeLoaderLibrary::registerDefaultCCNodeLoaders() {
}
void CCNodeLoaderLibrary::registerCCNodeLoader(const char * pClassName, CCNodeLoader * pCCNodeLoader) {
- this->registerCCNodeLoader(CCString::stringWithCString(pClassName), pCCNodeLoader);
+ this->registerCCNodeLoader(CCString::create(pClassName), pCCNodeLoader);
}
void CCNodeLoaderLibrary::registerCCNodeLoader(CCString * pClassName, CCNodeLoader * pCCNodeLoader) {
@@ -54,7 +54,7 @@ void CCNodeLoaderLibrary::registerCCNodeLoader(CCString * pClassName, CCNodeLoad
}
void CCNodeLoaderLibrary::unregisterCCNodeLoader(const char * pClassName) {
- this->unregisterCCNodeLoader(CCString::stringWithCString(pClassName));
+ this->unregisterCCNodeLoader(CCString::create(pClassName));
}
void CCNodeLoaderLibrary::unregisterCCNodeLoader(CCString * pClassName) {
diff --git a/cocos2dx/extensions/CCControlExtension/CCControlButton.cpp b/cocos2dx/extensions/CCControlExtension/CCControlButton.cpp
index a3446921d0..e496e8ce17 100644
--- a/cocos2dx/extensions/CCControlExtension/CCControlButton.cpp
+++ b/cocos2dx/extensions/CCControlExtension/CCControlButton.cpp
@@ -53,7 +53,7 @@ CCControlButton::~CCControlButton()
bool CCControlButton::init()
{
- return this->initWithLabelAndBackgroundSprite(CCLabelTTF::labelWithString("", "Helvetica", 12), CCScale9Sprite::node());
+ return this->initWithLabelAndBackgroundSprite(CCLabelTTF::create("", "Helvetica", 12), CCScale9Sprite::create());
}
@@ -371,7 +371,7 @@ void CCControlButton::setTitleTTFForState(const char * fntFile, CCControlState s
{
CCString * title = this->getTitleForState(state);
if (!title) title = new CCString("");
- this->setTitleLabelForState(CCLabelTTF::labelWithString(title->getCString(), fntFile, 12), state);
+ this->setTitleLabelForState(CCLabelTTF::create(title->getCString(), fntFile, 12), state);
}
const char * CCControlButton::getTitleTTFForState(CCControlState state)
@@ -419,7 +419,7 @@ void CCControlButton::setTitleBMFontForState(const char * fntFile, CCControlStat
{
CCString * title = this->getTitleForState(state);
if (!title) title = new CCString("");
- this->setTitleLabelForState(CCLabelBMFont::labelWithString(title->getCString(), fntFile), state);
+ this->setTitleLabelForState(CCLabelBMFont::create(title->getCString(), fntFile), state);
}
const char * CCControlButton::getTitleBMFontForState(CCControlState state)
@@ -476,7 +476,7 @@ void CCControlButton::setBackgroundSpriteForState(CCScale9Sprite* sprite, CCCont
void CCControlButton::setBackgroundSpriteFrameForState(CCSpriteFrame * spriteFrame, CCControlState state)
{
- CCScale9Sprite * sprite = CCScale9Sprite::spriteWithSpriteFrame(spriteFrame);
+ CCScale9Sprite * sprite = CCScale9Sprite::createWithSpriteFrame(spriteFrame);
this->setBackgroundSpriteForState(sprite, state);
}
@@ -651,7 +651,7 @@ void CCControlButton::ccTouchCancelled(CCTouch *pTouch, CCEvent *pEvent)
sendActionsForControlEvents(CCControlEventTouchCancel);
}
-CCControlButton * CCControlButton::node()
+CCControlButton* CCControlButton::create()
{
CCControlButton *pControlButton = new CCControlButton();
if (pControlButton && pControlButton->init())
@@ -663,4 +663,9 @@ CCControlButton * CCControlButton::node()
return NULL;
}
+CCControlButton* CCControlButton::node()
+{
+ return CCControlButton::create();
+}
+
NS_CC_EXT_END
diff --git a/cocos2dx/extensions/CCControlExtension/CCControlButton.h b/cocos2dx/extensions/CCControlExtension/CCControlButton.h
index 39f704889a..b2c1d85c2a 100644
--- a/cocos2dx/extensions/CCControlExtension/CCControlButton.h
+++ b/cocos2dx/extensions/CCControlExtension/CCControlButton.h
@@ -98,19 +98,19 @@ public:
virtual bool init();
virtual bool initWithLabelAndBackgroundSprite(CCNode* label, CCScale9Sprite* backgroundSprite);
//@warning: This interface will be deprecated in future.
- static CCControlButton* buttonWithLabelAndBackgroundSprite(CCNode* label, CCScale9Sprite* backgroundSprite);
+ CC_DEPRECATED_ATTRIBUTE static CCControlButton* buttonWithLabelAndBackgroundSprite(CCNode* label, CCScale9Sprite* backgroundSprite);
static CCControlButton* create(CCNode* label, CCScale9Sprite* backgroundSprite);
virtual bool initWithTitleAndFontNameAndFontSize(std::string title, const char * fontName, float fontSize);
//@warning: This interface will be deprecated in future.
- static CCControlButton* buttonWithTitleAndFontNameAndFontSize(std::string title, const char * fontName, float fontSize);
+ CC_DEPRECATED_ATTRIBUTE static CCControlButton* buttonWithTitleAndFontNameAndFontSize(std::string title, const char * fontName, float fontSize);
static CCControlButton* create(std::string title, const char * fontName, float fontSize);
virtual bool initWithBackgroundSprite(CCScale9Sprite* sprite);
//@warning: This interface will be deprecated in future.
- static CCControlButton* buttonWithBackgroundSprite(CCScale9Sprite* sprite);
+ CC_DEPRECATED_ATTRIBUTE static CCControlButton* buttonWithBackgroundSprite(CCScale9Sprite* sprite);
static CCControlButton* create(CCScale9Sprite* sprite);
@@ -221,7 +221,8 @@ public:
*/
virtual void setBackgroundSpriteFrameForState(CCSpriteFrame * spriteFrame, CCControlState state);
- static CCControlButton * node();
+ CC_DEPRECATED_ATTRIBUTE static CCControlButton * node();
+ static CCControlButton* create();
};
NS_CC_EXT_END
diff --git a/cocos2dx/extensions/CCControlExtension/CCControlColourPicker.h b/cocos2dx/extensions/CCControlExtension/CCControlColourPicker.h
index 60fe18d5ee..35ce8b8374 100644
--- a/cocos2dx/extensions/CCControlExtension/CCControlColourPicker.h
+++ b/cocos2dx/extensions/CCControlExtension/CCControlColourPicker.h
@@ -53,7 +53,7 @@ protected:
public:
//@warning: This interface will be deprecated in future.
- static CCControlColourPicker* colourPicker();
+ CC_DEPRECATED_ATTRIBUTE static CCControlColourPicker* colourPicker();
static CCControlColourPicker* create();
diff --git a/cocos2dx/extensions/CCControlExtension/CCControlHuePicker.h b/cocos2dx/extensions/CCControlExtension/CCControlHuePicker.h
index aa0f4c51df..c08dd13d6f 100644
--- a/cocos2dx/extensions/CCControlExtension/CCControlHuePicker.h
+++ b/cocos2dx/extensions/CCControlExtension/CCControlHuePicker.h
@@ -55,7 +55,7 @@ public:
virtual ~CCControlHuePicker();
virtual bool initWithTargetAndPos(CCNode* target, CCPoint pos);
//@warning: This interface will be deprecated in future.
- static CCControlHuePicker* pickerWithTargetAndPos(CCNode* target, CCPoint pos);
+ CC_DEPRECATED_ATTRIBUTE static CCControlHuePicker* pickerWithTargetAndPos(CCNode* target, CCPoint pos);
static CCControlHuePicker* create(CCNode* target, CCPoint pos);
protected:
void updateSliderPosition(CCPoint location);
diff --git a/cocos2dx/extensions/CCControlExtension/CCControlSaturationBrightnessPicker.h b/cocos2dx/extensions/CCControlExtension/CCControlSaturationBrightnessPicker.h
index 8669d51092..e7c13e26bd 100644
--- a/cocos2dx/extensions/CCControlExtension/CCControlSaturationBrightnessPicker.h
+++ b/cocos2dx/extensions/CCControlExtension/CCControlSaturationBrightnessPicker.h
@@ -58,7 +58,7 @@ public:
virtual bool initWithTargetAndPos(CCNode* target, CCPoint pos);
//@warning: This interface will be deprecated in future.
- static CCControlSaturationBrightnessPicker* pickerWithTargetAndPos(CCNode* target, CCPoint pos);
+ CC_DEPRECATED_ATTRIBUTE static CCControlSaturationBrightnessPicker* pickerWithTargetAndPos(CCNode* target, CCPoint pos);
static CCControlSaturationBrightnessPicker* create(CCNode* target, CCPoint pos);
virtual void updateWithHSV(HSV hsv);
virtual void updateDraggerWithHSV(HSV hsv);
diff --git a/cocos2dx/extensions/CCControlExtension/CCControlSlider.h b/cocos2dx/extensions/CCControlExtension/CCControlSlider.h
index 58eb60fc39..d701b5d28c 100644
--- a/cocos2dx/extensions/CCControlExtension/CCControlSlider.h
+++ b/cocos2dx/extensions/CCControlExtension/CCControlSlider.h
@@ -77,7 +77,7 @@ public:
* thumb image filename.
@warning: This interface will be deprecated in future.
*/
- static CCControlSlider* sliderWithFiles(const char* bgFile, const char* progressFile, const char* thumbFile);
+ CC_DEPRECATED_ATTRIBUTE static CCControlSlider* sliderWithFiles(const char* bgFile, const char* progressFile, const char* thumbFile);
/**
* Creates a slider with a given background sprite and a progress bar and a
@@ -85,7 +85,7 @@ public:
*@warning: This interface will be deprecated in future.
* @see initWithBackgroundSprite:progressSprite:thumbMenuItem:
*/
- static CCControlSlider* sliderWithSprites(CCSprite * backgroundSprite, CCSprite* pogressSprite, CCMenuItem* thumbItem);
+ CC_DEPRECATED_ATTRIBUTE static CCControlSlider* sliderWithSprites(CCSprite * backgroundSprite, CCSprite* pogressSprite, CCMenuItem* thumbItem);
/**
diff --git a/cocos2dx/extensions/CCControlExtension/CCControlSwitch.h b/cocos2dx/extensions/CCControlExtension/CCControlSwitch.h
index 45ba0d7ca7..6c50b1da18 100644
--- a/cocos2dx/extensions/CCControlExtension/CCControlSwitch.h
+++ b/cocos2dx/extensions/CCControlExtension/CCControlSwitch.h
@@ -49,7 +49,7 @@ public:
/** Creates a switch with a mask sprite, on/off sprites for on/off states and a thumb sprite.
@warning: This interface will be deprecated in future.
*/
- static CCControlSwitch* switchWithMaskSprite(CCSprite *maskSprite, CCSprite * onSprite, CCSprite * offSprite, CCSprite * thumbSprite);
+ CC_DEPRECATED_ATTRIBUTE static CCControlSwitch* switchWithMaskSprite(CCSprite *maskSprite, CCSprite * onSprite, CCSprite * offSprite, CCSprite * thumbSprite);
/** Creates a switch with a mask sprite, on/off sprites for on/off states and a thumb sprite. */
static CCControlSwitch* create(CCSprite *maskSprite, CCSprite * onSprite, CCSprite * offSprite, CCSprite * thumbSprite);
@@ -61,7 +61,7 @@ public:
/** Creates a switch with a mask sprite, on/off sprites for on/off states, a thumb sprite and an on/off labels.
@warning: This interface will be deprecated in future.
*/
- static CCControlSwitch* switchWithMaskSprite(CCSprite *maskSprite, CCSprite * onSprite, CCSprite * offSprite, CCSprite * thumbSprite, CCLabelTTF* onLabel, CCLabelTTF* offLabel);
+ CC_DEPRECATED_ATTRIBUTE static CCControlSwitch* switchWithMaskSprite(CCSprite *maskSprite, CCSprite * onSprite, CCSprite * offSprite, CCSprite * thumbSprite, CCLabelTTF* onLabel, CCLabelTTF* offLabel);
/** Creates a switch with a mask sprite, on/off sprites for on/off states, a thumb sprite and an on/off labels. */
static CCControlSwitch* create(CCSprite *maskSprite, CCSprite * onSprite, CCSprite * offSprite, CCSprite * thumbSprite, CCLabelTTF* onLabel, CCLabelTTF* offLabel);
diff --git a/cocos2dx/extensions/CCControlExtension/CCMenuPassive.h b/cocos2dx/extensions/CCControlExtension/CCMenuPassive.h
index e4beb6036f..ba63cd3ce6 100644
--- a/cocos2dx/extensions/CCControlExtension/CCMenuPassive.h
+++ b/cocos2dx/extensions/CCControlExtension/CCMenuPassive.h
@@ -20,19 +20,19 @@ public:
/** creates an empty CCMenu
@warning: This interface will be deprecated in future.
*/
- static CCMenuPassive* node();
+ CC_DEPRECATED_ATTRIBUTE static CCMenuPassive* node();
/** creates a CCMenu with it's items
@warning: This interface will be deprecated in future.
*/
- static CCMenuPassive* menuWithItems(CCNode* item, ...);
+ CC_DEPRECATED_ATTRIBUTE static CCMenuPassive* menuWithItems(CCNode* item, ...);
/** creates a CCMenu with it's item, then use addChild() to add
* other items. It is used for script, it can't init with undetermined
* number of variables.
@warning: This interface will be deprecated in future.
*/
- static CCMenuPassive* menuWithItem(CCNode* item);
+ CC_DEPRECATED_ATTRIBUTE static CCMenuPassive* menuWithItem(CCNode* item);
/** creates an empty CCMenu */
static CCMenuPassive* create();
diff --git a/cocos2dx/extensions/CCControlExtension/CCScale9Sprite.cpp b/cocos2dx/extensions/CCControlExtension/CCScale9Sprite.cpp
index 52b0639ca8..9913af1eb5 100644
--- a/cocos2dx/extensions/CCControlExtension/CCScale9Sprite.cpp
+++ b/cocos2dx/extensions/CCControlExtension/CCScale9Sprite.cpp
@@ -602,7 +602,7 @@ bool CCScale9Sprite::isOpacityModifyRGB()
void CCScale9Sprite::setSpriteFrame(CCSpriteFrame * spriteFrame)
{
- CCSpriteBatchNode * batchnode = CCSpriteBatchNode::batchNodeWithTexture(spriteFrame->getTexture(), 9);
+ CCSpriteBatchNode * batchnode = CCSpriteBatchNode::createWithTexture(spriteFrame->getTexture(), 9);
this->updateWithBatchNode(batchnode, spriteFrame->getRect(), CCRectZero);
// Reset insets
diff --git a/cocos2dx/extensions/CCControlExtension/CCScale9Sprite.h b/cocos2dx/extensions/CCControlExtension/CCScale9Sprite.h
index b454a12515..a14f4daece 100644
--- a/cocos2dx/extensions/CCControlExtension/CCScale9Sprite.h
+++ b/cocos2dx/extensions/CCControlExtension/CCScale9Sprite.h
@@ -114,7 +114,7 @@ public:
* @see initWithFile:rect:centerRegion:
@warning: This interface will be deprecated in future.
*/
- static CCScale9Sprite* spriteWithFile(const char* file, CCRect rect, CCRect capInsets);
+ CC_DEPRECATED_ATTRIBUTE static CCScale9Sprite* spriteWithFile(const char* file, CCRect rect, CCRect capInsets);
/**
* Creates a 9-slice sprite with a texture file, a delimitation zone and
@@ -174,7 +174,7 @@ public:
* @see initWithFile:capInsets:
@warning: This interface will be deprecated in future.
*/
- static CCScale9Sprite* spriteWithFile(CCRect capInsets, const char* file);
+ CC_DEPRECATED_ATTRIBUTE static CCScale9Sprite* spriteWithFile(CCRect capInsets, const char* file);
/**
* Creates a 9-slice sprite with a texture file. The whole texture will be
* broken down into a 3×3 grid of equal blocks.
@@ -202,7 +202,7 @@ public:
* @see initWithFile:
@warning: This interface will be deprecated in future.
*/
- static CCScale9Sprite* spriteWithFile(const char* file);
+ CC_DEPRECATED_ATTRIBUTE static CCScale9Sprite* spriteWithFile(const char* file);
/**
* Creates a 9-slice sprite with a texture file. The whole texture will be
@@ -233,7 +233,7 @@ public:
* @see initWithSpriteFrame:centerRegion:
@warning: This interface will be deprecated in future.
*/
- static CCScale9Sprite* spriteWithSpriteFrame(CCSpriteFrame* spriteFrame, CCRect capInsets);
+ CC_DEPRECATED_ATTRIBUTE static CCScale9Sprite* spriteWithSpriteFrame(CCSpriteFrame* spriteFrame, CCRect capInsets);
/**
* Creates a 9-slice sprite with an sprite frame and the centre of its zone.
@@ -263,7 +263,7 @@ public:
* @see initWithSpriteFrame:
@warning: This interface will be deprecated in future.
*/
- static CCScale9Sprite* spriteWithSpriteFrame(CCSpriteFrame* spriteFrame);
+ CC_DEPRECATED_ATTRIBUTE static CCScale9Sprite* spriteWithSpriteFrame(CCSpriteFrame* spriteFrame);
/**
* Creates a 9-slice sprite with an sprite frame.
@@ -296,7 +296,7 @@ public:
* @see initWithSpriteFrameName:centerRegion:
@warning: This interface will be deprecated in future.
*/
- static CCScale9Sprite* spriteWithSpriteFrameName(const char*spriteFrameName, CCRect capInsets);
+ CC_DEPRECATED_ATTRIBUTE static CCScale9Sprite* spriteWithSpriteFrameName(const char*spriteFrameName, CCRect capInsets);
/**
* Creates a 9-slice sprite with an sprite frame name and the centre of its
@@ -328,7 +328,7 @@ public:
* @see initWithSpriteFrameName:
@warning: This interface will be deprecated in future.
*/
- static CCScale9Sprite* spriteWithSpriteFrameName(const char*spriteFrameName);
+ CC_DEPRECATED_ATTRIBUTE static CCScale9Sprite* spriteWithSpriteFrameName(const char*spriteFrameName);
/**
* Creates a 9-slice sprite with an sprite frame name.
@@ -350,8 +350,8 @@ public:
*/
CCScale9Sprite* resizableSpriteWithCapInsets(CCRect capInsets);
-
- static CCScale9Sprite* node();
+ //@warning: This interface will be deprecated in future.
+ CC_DEPRECATED_ATTRIBUTE static CCScale9Sprite* node();
static CCScale9Sprite* create();
diff --git a/cocos2dx/extensions/CCListView/CCListView.h b/cocos2dx/extensions/CCListView/CCListView.h
index 7b848697fc..9764fc7f0c 100644
--- a/cocos2dx/extensions/CCListView/CCListView.h
+++ b/cocos2dx/extensions/CCListView/CCListView.h
@@ -122,7 +122,7 @@ public:
CCListView(void);
// @warning: This interface will be deprecated in future.
- static CCListView* viewWithMode(CCListViewMode mode);
+ CC_DEPRECATED_ATTRIBUTE static CCListView* viewWithMode(CCListViewMode mode);
static CCListView* create(CCListViewMode mode);
diff --git a/cocos2dx/extensions/CCScrollView/CCScrollView.cpp b/cocos2dx/extensions/CCScrollView/CCScrollView.cpp
index aa36ab0ab8..e4d2170c45 100644
--- a/cocos2dx/extensions/CCScrollView/CCScrollView.cpp
+++ b/cocos2dx/extensions/CCScrollView/CCScrollView.cpp
@@ -117,7 +117,7 @@ bool CCScrollView::initWithViewSize(CCSize size, CCNode *container/* = NULL*/)
if (!this->m_pContainer)
{
- m_pContainer = CCLayer::node();
+ m_pContainer = CCLayer::create();
}
this->setViewSize(size);
@@ -231,9 +231,9 @@ void CCScrollView::setContentOffsetInDuration(CCPoint offset, float dt)
{
CCFiniteTimeAction *scroll, *expire;
- scroll = CCMoveTo::actionWithDuration(dt, offset);
- expire = CCCallFuncN::actionWithTarget(this, callfuncN_selector(CCScrollView::stoppedAnimatedScroll));
- m_pContainer->runAction(CCSequence::actions(scroll, expire, NULL));
+ scroll = CCMoveTo::create(dt, offset);
+ expire = CCCallFuncN::create(this, callfuncN_selector(CCScrollView::stoppedAnimatedScroll));
+ m_pContainer->runAction(CCSequence::create(scroll, expire, NULL));
this->schedule(schedule_selector(CCScrollView::performedAnimatedScroll));
}
@@ -296,7 +296,7 @@ void CCScrollView::setZoomScaleInDuration(float s, float dt)
if (m_pContainer->getScale() != s)
{
CCActionTween *scaleAction;
- scaleAction = CCActionTween::actionWithDuration(dt, "zoomScale", m_pContainer->getScale(), s);
+ scaleAction = CCActionTween::create(dt, "zoomScale", m_pContainer->getScale(), s);
this->runAction(scaleAction);
}
}
diff --git a/cocos2dx/extensions/CCScrollView/CCScrollView.h b/cocos2dx/extensions/CCScrollView/CCScrollView.h
index ef1a8d6f8e..99c997354b 100644
--- a/cocos2dx/extensions/CCScrollView/CCScrollView.h
+++ b/cocos2dx/extensions/CCScrollView/CCScrollView.h
@@ -71,7 +71,7 @@ public:
* @param container parent object
* @return autoreleased scroll view object
*/
- static CCScrollView* viewWithViewSize(CCSize size, CCNode* container = NULL);
+ CC_DEPRECATED_ATTRIBUTE static CCScrollView* viewWithViewSize(CCSize size, CCNode* container = NULL);
/**
* Returns an autoreleased scroll view object.
@@ -89,7 +89,7 @@ public:
* @param container parent object
* @return autoreleased scroll view object
*/
- static CCScrollView* node();
+ CC_DEPRECATED_ATTRIBUTE static CCScrollView* node();
/**
* Returns an autoreleased scroll view object.
diff --git a/cocos2dx/label_nodes/CCLabelAtlas.h b/cocos2dx/label_nodes/CCLabelAtlas.h
index a252a6960a..ea31cad5cb 100644
--- a/cocos2dx/label_nodes/CCLabelAtlas.h
+++ b/cocos2dx/label_nodes/CCLabelAtlas.h
@@ -54,13 +54,13 @@ public:
/** creates the CCLabelAtlas with a string, a char map file(the atlas), the width and height of each element and the starting char of the atlas
@warning: This interface will be deprecated in future.
*/
- static CCLabelAtlas * labelWithString(const char *label, const char *charMapFile, unsigned int itemWidth, unsigned int itemHeight, unsigned int startCharMap);
+ CC_DEPRECATED_ATTRIBUTE static CCLabelAtlas * labelWithString(const char *label, const char *charMapFile, unsigned int itemWidth, unsigned int itemHeight, unsigned int startCharMap);
/** creates the CCLabelAtlas with a string and a configuration file
@warning: This interface will be deprecated in future.
@since v2.0
*/
- static CCLabelAtlas* labelWithString(const char *sring, const char *fntFile);
+ CC_DEPRECATED_ATTRIBUTE static CCLabelAtlas* labelWithString(const char *sring, const char *fntFile);
/** creates the CCLabelAtlas with a string, a char map file(the atlas), the width and height of each element and the starting char of the atlas */
static CCLabelAtlas * create(const char *label, const char *charMapFile, unsigned int itemWidth, unsigned int itemHeight, unsigned int startCharMap);
diff --git a/cocos2dx/label_nodes/CCLabelBMFont.h b/cocos2dx/label_nodes/CCLabelBMFont.h
index 9fb9182591..193879bb81 100644
--- a/cocos2dx/label_nodes/CCLabelBMFont.h
+++ b/cocos2dx/label_nodes/CCLabelBMFont.h
@@ -106,7 +106,7 @@ public:
/** allocates a CCBMFontConfiguration with a FNT file
@warning: This interface will be deprecated in future.
*/
- static CCBMFontConfiguration * configurationWithFNTFile(const char *FNTfile);
+ CC_DEPRECATED_ATTRIBUTE static CCBMFontConfiguration * configurationWithFNTFile(const char *FNTfile);
/** allocates a CCBMFontConfiguration with a FNT file */
static CCBMFontConfiguration * create(const char *FNTfile);
@@ -198,14 +198,14 @@ public:
/** creates a bitmap font altas with an initial string and the FNT file
@warning: This interface will be deprecated in future.
*/
- static CCLabelBMFont * labelWithString(const char *str, const char *fntFile, float width = kCCLabelAutomaticWidth, CCTextAlignment alignment = kCCTextAlignmentLeft, CCPoint imageOffset = CCPointZero);
+ 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 altas with an initial string and the FNT file */
static CCLabelBMFont * create(const char *str, const char *fntFile, float width = kCCLabelAutomaticWidth, CCTextAlignment alignment = kCCTextAlignmentLeft, CCPoint imageOffset = CCPointZero);
/** Creates an label.
@warning: This interface will be deprecated in future.
*/
- static CCLabelBMFont * node();
+ CC_DEPRECATED_ATTRIBUTE static CCLabelBMFont * node();
/** Creates an label.
*/
diff --git a/cocos2dx/label_nodes/CCLabelTTF.h b/cocos2dx/label_nodes/CCLabelTTF.h
index 9f5b728b00..ae152031da 100644
--- a/cocos2dx/label_nodes/CCLabelTTF.h
+++ b/cocos2dx/label_nodes/CCLabelTTF.h
@@ -46,19 +46,19 @@ public:
/** creates a CCLabelTTF with a font name and font size in points
@warning: This interface will be deprecated in future.
*/
- static CCLabelTTF * labelWithString(const char *string, const char *fontName, float fontSize);
+ 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.
@warning: This interface will be deprecated in future.
@since v1.0
*/
- static CCLabelTTF * labelWithString(const char *string, const CCSize& dimensions, CCTextAlignment hAlignment,
+ 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
@warning: This interface will be deprecated in future.
*/
- static CCLabelTTF * labelWithString(const char *string, const CCSize& dimensions, CCTextAlignment hAlignment,
+ 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*/
diff --git a/cocos2dx/layers_scenes_transitions_nodes/CCLayer.h b/cocos2dx/layers_scenes_transitions_nodes/CCLayer.h
index 03bc7e9a9c..48f19439c5 100644
--- a/cocos2dx/layers_scenes_transitions_nodes/CCLayer.h
+++ b/cocos2dx/layers_scenes_transitions_nodes/CCLayer.h
@@ -55,7 +55,7 @@ public:
bool init();
// @warning: This interface will be deprecated in future.
- static CCLayer *node(void);
+ CC_DEPRECATED_ATTRIBUTE static CCLayer *node(void);
/** create one layer */
static CCLayer *create(void);
@@ -129,7 +129,7 @@ private:
// for the subclass of CCLayer, each has to implement the static "node" method
// @warning: This interface will be deprecated in future.
#define LAYER_NODE_FUNC(layer) \
- static layer* node() \
+ CC_DEPRECATED_ATTRIBUTE static layer* node() \
{ \
layer *pRet = new layer(); \
if (pRet && pRet->init()) \
@@ -166,7 +166,7 @@ private:
// @warning: This interface will be deprecated in future.
#define LAYER_NODE_FUNC_PARAM(layer,__PARAMTYPE__,__PARAM__) \
- static layer* node(__PARAMTYPE__ __PARAM__) \
+ CC_DEPRECATED_ATTRIBUTE static layer* node(__PARAMTYPE__ __PARAM__) \
{ \
layer *pRet = new layer(); \
if (pRet && pRet->init(__PARAM__)) \
@@ -225,11 +225,11 @@ public:
/** creates a CCLayer with color, width and height in Points
@warning: This interface will be deprecated in future.
*/
- static CCLayerColor * layerWithColor(const ccColor4B& color, GLfloat width, GLfloat height);
+ 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.
@warning: This interface will be deprecated in future.
*/
- static CCLayerColor * layerWithColor(const ccColor4B& color);
+ CC_DEPRECATED_ATTRIBUTE static CCLayerColor * layerWithColor(const ccColor4B& color);
/** creates a CCLayer with color, width and height in Points */
static CCLayerColor * create(const ccColor4B& color, GLfloat width, GLfloat height);
@@ -296,12 +296,12 @@ public:
/** Creates a full-screen CCLayer with a gradient between start and end.
@warning: This interface will be deprecated in future.
*/
- static CCLayerGradient* layerWithColor(const ccColor4B& start, const ccColor4B& end);
+ 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.
@warning: This interface will be deprecated in future.
*/
- static CCLayerGradient* layerWithColor(const ccColor4B& start, const ccColor4B& end, const CCPoint& v);
+ 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);
@@ -355,14 +355,14 @@ public:
/** creates a CCLayerMultiplex with one or more layers using a variable argument list.
@warning: This interface will be deprecated in future.
*/
- static CCLayerMultiplex * layerWithLayers(CCLayer* layer, ... );
+ CC_DEPRECATED_ATTRIBUTE static CCLayerMultiplex * layerWithLayers(CCLayer* layer, ... );
/**
* lua script can not init with undetermined number of variables
* so add these functinons to be used with lua.
@warning: This interface will be deprecated in future.
*/
- static CCLayerMultiplex * layerWithLayer(CCLayer* layer);
+ 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, ... );
diff --git a/cocos2dx/layers_scenes_transitions_nodes/CCScene.h b/cocos2dx/layers_scenes_transitions_nodes/CCScene.h
index 143a32be64..d74de75c3e 100644
--- a/cocos2dx/layers_scenes_transitions_nodes/CCScene.h
+++ b/cocos2dx/layers_scenes_transitions_nodes/CCScene.h
@@ -56,7 +56,7 @@ NS_CC_END
// for the subclass of CCScene, each has to implement the static "node" method
// @warning: This interface will be deprecated in future.
#define SCENE_NODE_FUNC(scene) \
-static scene* node() \
+CC_DEPRECATED_ATTRIBUTE static scene* node() \
{ \
scene *pRet = new scene(); \
if (pRet && pRet->init()) \
@@ -74,7 +74,7 @@ static scene* node() \
// @warning: This interface will be deprecated in future.
#define SCENE_FUNC_PARAM(__TYPE__,__PARAMTYPE__,__PARAM__) \
- static cocos2d::CCScene* node(__PARAMTYPE__ __PARAM__) \
+ CC_DEPRECATED_ATTRIBUTE static cocos2d::CCScene* node(__PARAMTYPE__ __PARAM__) \
{ \
cocos2d::CCScene * scene = NULL; \
do \
diff --git a/cocos2dx/layers_scenes_transitions_nodes/CCTransition.h b/cocos2dx/layers_scenes_transitions_nodes/CCTransition.h
index d4c4d962ce..fc5fa49d78 100644
--- a/cocos2dx/layers_scenes_transitions_nodes/CCTransition.h
+++ b/cocos2dx/layers_scenes_transitions_nodes/CCTransition.h
@@ -36,23 +36,8 @@ NS_CC_BEGIN
//c/c++ don't support object creation of using class name
//so, all classes need creation method.
-// @warning: This interface will be deprecated in future.
-// #define DECLEAR_TRANSITIONWITHDURATION(_Type)\
-// static _Type* transitionWithDuration(float t, CCScene* scene);
-//
-// #define IMPLEMENT_TRANSITIONWITHDURATION(_Type)\
-// _Type* _Type::transitionWithDuration(float t, CCScene* scene)\
-// {\
-// _Type* pScene = new _Type();\
-// if(pScene && pScene->initWithDuration(t, scene)){\
-// pScene->autorelease();\
-// return pScene;}\
-// CC_SAFE_DELETE(pScene);\
-// return NULL;\
-//
-
#define OLD_TRANSITION_CREATE_FUNC(_Type) \
- static _Type* transitionWithDuration(float t, CCScene* scene) \
+ CC_DEPRECATED_ATTRIBUTE static _Type* transitionWithDuration(float t, CCScene* scene) \
{ \
_Type* pScene = new _Type(); \
if(pScene && pScene->initWithDuration(t, scene)) \
@@ -129,7 +114,7 @@ public:
/** creates a base transition with duration and incoming scene
@warning: This interface will be deprecated in future.
*/
- static CCTransitionScene * transitionWithDuration(float t, CCScene *scene);
+ 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);
@@ -165,7 +150,7 @@ public:
/** creates a base transition with duration and incoming scene
@warning: This interface will be deprecated in future.
*/
- static CCTransitionSceneOriented * transitionWithDuration(float t,CCScene* scene, tOrientation orientation);
+ 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);
@@ -378,7 +363,7 @@ public:
virtual void onEnter();
// @warning: This interface will be deprecated in future.
- static CCTransitionFlipX* transitionWithDuration(float t, CCScene* s, tOrientation o = kOrientationRightOver);
+ CC_DEPRECATED_ATTRIBUTE static CCTransitionFlipX* transitionWithDuration(float t, CCScene* s, tOrientation o = kOrientationRightOver);
static CCTransitionFlipX* create(float t, CCScene* s, tOrientation o = kOrientationRightOver);
};
@@ -395,7 +380,7 @@ public:
virtual void onEnter();
//@warning: This interface will be deprecated in future.
- static CCTransitionFlipY* transitionWithDuration(float t, CCScene* s, tOrientation o = kOrientationUpOver);
+ CC_DEPRECATED_ATTRIBUTE static CCTransitionFlipY* transitionWithDuration(float t, CCScene* s, tOrientation o = kOrientationUpOver);
static CCTransitionFlipY* create(float t, CCScene* s, tOrientation o = kOrientationUpOver);
};
@@ -412,7 +397,7 @@ public:
virtual void onEnter();
//@warning: This interface will be deprecated in future.
- static CCTransitionFlipAngular* transitionWithDuration(float t, CCScene* s, tOrientation o = kOrientationRightOver);
+ CC_DEPRECATED_ATTRIBUTE static CCTransitionFlipAngular* transitionWithDuration(float t, CCScene* s, tOrientation o = kOrientationRightOver);
static CCTransitionFlipAngular* create(float t, CCScene* s, tOrientation o = kOrientationRightOver);
};
@@ -429,7 +414,7 @@ public:
virtual void onEnter();
//@warning: This interface will be deprecated in future.
- static CCTransitionZoomFlipX* transitionWithDuration(float t, CCScene* s, tOrientation o = kOrientationRightOver);
+ CC_DEPRECATED_ATTRIBUTE static CCTransitionZoomFlipX* transitionWithDuration(float t, CCScene* s, tOrientation o = kOrientationRightOver);
static CCTransitionZoomFlipX* create(float t, CCScene* s, tOrientation o = kOrientationRightOver);
};
@@ -446,7 +431,7 @@ public:
virtual void onEnter();
//@warning: This interface will be deprecated in future.
- static CCTransitionZoomFlipY* transitionWithDuration(float t, CCScene* s, tOrientation o = kOrientationUpOver);
+ CC_DEPRECATED_ATTRIBUTE static CCTransitionZoomFlipY* transitionWithDuration(float t, CCScene* s, tOrientation o = kOrientationUpOver);
static CCTransitionZoomFlipY* create(float t, CCScene* s, tOrientation o = kOrientationUpOver);
};
@@ -463,7 +448,7 @@ public:
virtual void onEnter();
//@warning: This interface will be deprecated in future.
- static CCTransitionZoomFlipAngular* transitionWithDuration(float t, CCScene* s, tOrientation o = kOrientationRightOver);
+ CC_DEPRECATED_ATTRIBUTE static CCTransitionZoomFlipAngular* transitionWithDuration(float t, CCScene* s, tOrientation o = kOrientationRightOver);
static CCTransitionZoomFlipAngular* create(float t, CCScene* s, tOrientation o = kOrientationRightOver);
};
@@ -484,7 +469,7 @@ public:
* Example: FadeTransition::transitionWithDuration(2, scene, ccc3(255,0,0); // red color
@warning: This interface will be deprecated in future.
*/
- static CCTransitionFade* transitionWithDuration(float duration,CCScene* scene, const ccColor3B& color = ccBLACK);
+ 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
* Example: FadeTransition::create(2, scene, ccc3(255,0,0); // red color
diff --git a/cocos2dx/layers_scenes_transitions_nodes/CCTransitionPageTurn.h b/cocos2dx/layers_scenes_transitions_nodes/CCTransitionPageTurn.h
index b002c77e18..7dc3333ecf 100644
--- a/cocos2dx/layers_scenes_transitions_nodes/CCTransitionPageTurn.h
+++ b/cocos2dx/layers_scenes_transitions_nodes/CCTransitionPageTurn.h
@@ -56,7 +56,7 @@ public:
* scene is being turned from left over the outgoing scene.
@warning: This interface will be deprecated in future.
*/
- static CCTransitionPageTurn* transitionWithDuration(float t,CCScene* scene,bool backwards);
+ CC_DEPRECATED_ATTRIBUTE static CCTransitionPageTurn* transitionWithDuration(float t,CCScene* scene,bool backwards);
/**
* Creates a base transition with duration and incoming scene.
diff --git a/cocos2dx/menu_nodes/CCMenu.h b/cocos2dx/menu_nodes/CCMenu.h
index 9790568f6d..4952c5095d 100644
--- a/cocos2dx/menu_nodes/CCMenu.h
+++ b/cocos2dx/menu_nodes/CCMenu.h
@@ -66,24 +66,24 @@ public:
/** creates an empty CCMenu
@warning: This interface will be deprecated in future.
*/
- static CCMenu* node();
+ CC_DEPRECATED_ATTRIBUTE static CCMenu* node();
/** creates a CCMenu with it's items
@warning: This interface will be deprecated in future.
*/
- static CCMenu* menuWithItems(CCMenuItem* item, ...);
+ CC_DEPRECATED_ATTRIBUTE static CCMenu* menuWithItems(CCMenuItem* item, ...);
/** creates a CCMenu with a NSArray of CCMenuItem objects
@warning: This interface will be deprecated in future.
*/
- static CCMenu* menuWithArray(CCArray* pArrayOfItems);
+ 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.
@warning: This interface will be deprecated in future.
*/
- static CCMenu* menuWithItem(CCMenuItem* item);
+ CC_DEPRECATED_ATTRIBUTE static CCMenu* menuWithItem(CCMenuItem* item);
/** creates an empty CCMenu */
static CCMenu* create();
diff --git a/cocos2dx/menu_nodes/CCMenuItem.h b/cocos2dx/menu_nodes/CCMenuItem.h
index 5c37532b24..75fa229504 100644
--- a/cocos2dx/menu_nodes/CCMenuItem.h
+++ b/cocos2dx/menu_nodes/CCMenuItem.h
@@ -63,7 +63,7 @@ public:
/** Creates a CCMenuItem with a target/selector
@warning: This interface will be deprecated in future.
*/
- static CCMenuItem * itemWithTarget(CCObject *rec, SEL_MenuHandler selector);
+ CC_DEPRECATED_ATTRIBUTE static CCMenuItem * itemWithTarget(CCObject *rec, SEL_MenuHandler selector);
/** Creates a CCMenuItem with a target/selector */
static CCMenuItem * create(CCObject *rec, SEL_MenuHandler selector);
/** Initializes a CCMenuItem with a target/selector */
@@ -116,11 +116,11 @@ public:
/** creates a CCMenuItemLabel with a Label, target and selector
@warning: This interface will be deprecated in future.
*/
- static CCMenuItemLabel * itemWithLabel(CCNode*label, CCObject* target, SEL_MenuHandler selector);
+ CC_DEPRECATED_ATTRIBUTE static CCMenuItemLabel * itemWithLabel(CCNode*label, CCObject* target, SEL_MenuHandler selector);
/** creates a CCMenuItemLabel with a Label. Target and selector will be nill
@warning: This interface will be deprecated in future.
*/
- static CCMenuItemLabel* itemWithLabel(CCNode *label);
+ 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);
@@ -162,11 +162,11 @@ public:
/** creates a menu item from a string and atlas with a target/selector
@warning: This interface will be deprecated in future.
*/
- static CCMenuItemAtlasFont* itemWithString(const char *value, const char *charMapFile, int itemWidth, int itemHeight, char startCharMap);
+ 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
@warning: This interface will be deprecated in future.
*/
- static CCMenuItemAtlasFont* itemWithString(const char *value, const char *charMapFile, int itemWidth, int itemHeight, char startCharMap, CCObject* target, SEL_MenuHandler selector);
+ 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);
@@ -195,11 +195,11 @@ public:
/** creates a menu item from a string without target/selector. To be used with CCMenuItemToggle
@warning: This interface will be deprecated in future.
*/
- static CCMenuItemFont * itemWithString(const char *value);
+ CC_DEPRECATED_ATTRIBUTE static CCMenuItemFont * itemWithString(const char *value);
/** creates a menu item from a string with a target/selector
@warning: This interface will be deprecated in future.
*/
- static CCMenuItemFont * itemWithString(const char *value, CCObject* target, SEL_MenuHandler selector);
+ 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);
@@ -258,15 +258,15 @@ public:
/** creates a menu item with a normal, selected and disabled image
@warning: This interface will be deprecated in future.
*/
- static CCMenuItemSprite * itemWithNormalSprite(CCNode* normalSprite, CCNode* selectedSprite, CCNode* disabledSprite = NULL);
+ 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
@warning: This interface will be deprecated in future.
*/
- static CCMenuItemSprite * itemWithNormalSprite(CCNode* normalSprite, CCNode* selectedSprite, CCObject* target, SEL_MenuHandler selector);
+ 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
@warning: This interface will be deprecated in future.
*/
- static CCMenuItemSprite * itemWithNormalSprite(CCNode* normalSprite, CCNode* selectedSprite, CCNode* disabledSprite, CCObject* target, SEL_MenuHandler selector);
+ 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);
@@ -312,19 +312,19 @@ public:
/** creates a menu item with a normal and selected image
@warning: This interface will be deprecated in future.
*/
- static CCMenuItemImage* itemWithNormalImage(const char *normalImage, const char *selectedImage);
+ CC_DEPRECATED_ATTRIBUTE static CCMenuItemImage* itemWithNormalImage(const char *normalImage, const char *selectedImage);
/** creates a menu item with a normal,selected and disabled image
@warning: This interface will be deprecated in future.
*/
- static CCMenuItemImage* itemWithNormalImage(const char *normalImage, const char *selectedImage, const char *disabledImage);
+ 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
@warning: This interface will be deprecated in future.
*/
- static CCMenuItemImage* itemWithNormalImage(const char *normalImage, const char *selectedImage, CCObject* target, SEL_MenuHandler selector);
+ 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
@warning: This interface will be deprecated in future.
*/
- static CCMenuItemImage* itemWithNormalImage(const char *normalImage, const char *selectedImage, const char *disabledImage, CCObject* target, SEL_MenuHandler selector);
+ 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);
@@ -347,7 +347,7 @@ public:
/** Creates an CCMenuItemImage.
@warning: This interface will be deprecated in future.
*/
- static CCMenuItemImage* node();
+ CC_DEPRECATED_ATTRIBUTE static CCMenuItemImage* node();
/** Creates an CCMenuItemImage.
*/
@@ -381,7 +381,7 @@ public:
/** creates a menu item from a list of items with a target/selector
@warning: This interface will be deprecated in future.
*/
- static CCMenuItemToggle* itemWithTarget(CCObject* target, SEL_MenuHandler selector, CCMenuItem* item, ...);
+ 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* create(CCObject* target, SEL_MenuHandler selector, CCMenuItem* item, ...);
@@ -393,7 +393,7 @@ public:
/** creates a menu item with a item
@warning: This interface will be deprecated in future.
*/
- static CCMenuItemToggle* itemWithItem(CCMenuItem *item);
+ CC_DEPRECATED_ATTRIBUTE static CCMenuItemToggle* itemWithItem(CCMenuItem *item);
/** creates a menu item with a item */
static CCMenuItemToggle* create(CCMenuItem *item);
diff --git a/cocos2dx/misc_nodes/CCMotionStreak.h b/cocos2dx/misc_nodes/CCMotionStreak.h
index 80af657693..44d8ba515c 100644
--- a/cocos2dx/misc_nodes/CCMotionStreak.h
+++ b/cocos2dx/misc_nodes/CCMotionStreak.h
@@ -44,11 +44,11 @@ public:
/** creates and initializes a motion streak with fade in seconds, minimum segments, stroke's width, color, texture filename
@warning: This interface will be deprecated in future.
*/
- static CCMotionStreak* streakWithFade(float fade, float minSeg, float stroke, ccColor3B color, const char* path);
+ 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
@warning: This interface will be deprecated in future.
*/
- static CCMotionStreak* streakWithFade(float fade, float minSeg, float stroke, ccColor3B color, CCTexture2D* texture);
+ 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);
diff --git a/cocos2dx/misc_nodes/CCProgressTimer.h b/cocos2dx/misc_nodes/CCProgressTimer.h
index 553373123e..aa4e6d1e7a 100644
--- a/cocos2dx/misc_nodes/CCProgressTimer.h
+++ b/cocos2dx/misc_nodes/CCProgressTimer.h
@@ -85,7 +85,7 @@ public:
/** Creates a progress timer with the sprite as the shape the timer goes through
@warning: This interface will be deprecated in future.
*/
- static CCProgressTimer* progressWithSprite(CCSprite* sp);
+ 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:
diff --git a/cocos2dx/misc_nodes/CCRenderTexture.h b/cocos2dx/misc_nodes/CCRenderTexture.h
index 79f8a3f50b..523e05ba5b 100644
--- a/cocos2dx/misc_nodes/CCRenderTexture.h
+++ b/cocos2dx/misc_nodes/CCRenderTexture.h
@@ -61,17 +61,17 @@ public:
/** initializes a RenderTexture object with width and height in Points and a pixel format( only RGB and RGBA formats are valid ) and depthStencil format
@warning: This interface will be deprecated in future.
*/
- static CCRenderTexture * renderTextureWithWidthAndHeight(int w ,int h, CCTexture2DPixelFormat eFormat, GLuint uDepthStencilFormat);
+ 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
@warning: This interface will be deprecated in future.
*/
- static CCRenderTexture * renderTextureWithWidthAndHeight(int w, int h, CCTexture2DPixelFormat eFormat);
+ 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
@warning: This interface will be deprecated in future.
*/
- static CCRenderTexture * renderTextureWithWidthAndHeight(int w, int h);
+ 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);
diff --git a/cocos2dx/particle_nodes/CCParticleBatchNode.h b/cocos2dx/particle_nodes/CCParticleBatchNode.h
index 26ab2bdd13..a06908a429 100644
--- a/cocos2dx/particle_nodes/CCParticleBatchNode.h
+++ b/cocos2dx/particle_nodes/CCParticleBatchNode.h
@@ -68,12 +68,12 @@ public:
/** initializes the particle system with CCTexture2D, a capacity of particles, which particle system to use
@warning: This interface will be deprecated in future.
*/
- static CCParticleBatchNode* batchNodeWithTexture(CCTexture2D *tex, unsigned int capacity = kCCParticleDefaultCapacity);
+ 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
@warning: This interface will be deprecated in future.
*/
- static CCParticleBatchNode* batchNodeWithFile(const char* fileImage, unsigned int capacity = kCCParticleDefaultCapacity);
+ 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);
diff --git a/cocos2dx/particle_nodes/CCParticleSystem.h b/cocos2dx/particle_nodes/CCParticleSystem.h
index 4268295282..cc08b707bf 100644
--- a/cocos2dx/particle_nodes/CCParticleSystem.h
+++ b/cocos2dx/particle_nodes/CCParticleSystem.h
@@ -368,7 +368,7 @@ public:
@warning: This interface will be deprecated in future.
@since v0.99.3
*/
- static CCParticleSystem * particleWithFile(const char *plistFile);
+ CC_DEPRECATED_ATTRIBUTE static CCParticleSystem * particleWithFile(const char *plistFile);
/** creates an initializes a CCParticleSystem from a plist file.
This plist files can be creted manually or with Particle Designer:
diff --git a/cocos2dx/particle_nodes/CCParticleSystemQuad.h b/cocos2dx/particle_nodes/CCParticleSystemQuad.h
index cbe8d42fd6..18fe5aa004 100644
--- a/cocos2dx/particle_nodes/CCParticleSystemQuad.h
+++ b/cocos2dx/particle_nodes/CCParticleSystemQuad.h
@@ -65,7 +65,7 @@ public:
This plist files can be creted manually or with Particle Designer:
@warning: This interface will be deprecated in future.
*/
- static CCParticleSystemQuad * particleWithFile(const char *plistFile);
+ CC_DEPRECATED_ATTRIBUTE static CCParticleSystemQuad * particleWithFile(const char *plistFile);
/** creates an initializes a CCParticleSystemQuad from a plist file.
This plist files can be creted manually or with Particle Designer:
@@ -102,7 +102,7 @@ public:
void listenBackToForeground(CCObject *obj);
//@warning: This interface will be deprecated in future.
- static CCParticleSystemQuad * node();
+ CC_DEPRECATED_ATTRIBUTE static CCParticleSystemQuad * node();
static CCParticleSystemQuad * create();
private:
diff --git a/cocos2dx/platform/CCPlatformMacros.h b/cocos2dx/platform/CCPlatformMacros.h
index bd2f263048..a929c1fe56 100644
--- a/cocos2dx/platform/CCPlatformMacros.h
+++ b/cocos2dx/platform/CCPlatformMacros.h
@@ -197,5 +197,15 @@ public: virtual void set##funName(varType var) \
#define LUALOG(format, ...) cocos2d::CCLog(format, ##__VA_ARGS__)
#endif // Lua engine debug
+/*
+ * only certain compilers support __attribute__((deprecated))
+ */
+#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)))
+ #define CC_DEPRECATED_ATTRIBUTE __attribute__((deprecated))
+#elif _MSC_VER >= 1400 //vs 2005 or higher
+#define CC_DEPRECATED_ATTRIBUTE __declspec(deprecated)
+#else
+ #define CC_DEPRECATED_ATTRIBUTE
+#endif
#endif // __CC_PLATFORM_MACROS_H__
diff --git a/cocos2dx/proj.win32/cocos2d-win32.vcproj b/cocos2dx/proj.win32/cocos2d-win32.vcproj
index dfdc58248b..39c79ae412 100755
--- a/cocos2dx/proj.win32/cocos2d-win32.vcproj
+++ b/cocos2dx/proj.win32/cocos2d-win32.vcproj
@@ -43,7 +43,7 @@
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..;..\platform\win32;..\platform\third_party\win32\iconv;..\platform\third_party\win32\zlib;..\platform\third_party\win32\libpng;..\platform\third_party\win32\libjpeg;..\platform\third_party\win32\libtiff;..\platform\third_party\win32\libxml2;..\platform\third_party\win32\pthread;..\platform\third_party\win32\OGLES;..\include;..\kazmath\include"
- PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
@@ -51,7 +51,7 @@
WarningLevel="3"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="4"
- DisableSpecificWarnings="4996;4267"
+ DisableSpecificWarnings="4267;4251;4244"
/>
Disabled..;..\platform\win32;..\platform\third_party\win32\iconv;..\platform\third_party\win32\zlib;..\platform\third_party\win32\libpng;..\platform\third_party\win32\libtiff;..\platform\third_party\win32\libjpeg;..\platform\third_party\win32\libxml2;..\platform\third_party\win32\pthread;..\platform\third_party\win32\OGLES;..\include;..\kazmath\include;%(AdditionalIncludeDirectories)
- WIN32;_DEBUG;_WINDOWS;_USRDLL;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;%(PreprocessorDefinitions)
+ WIN32;_DEBUG;_WINDOWS;_USRDLL;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)trueEnableFastChecksMultiThreadedDebugDLL
@@ -66,7 +66,7 @@
Level3EditAndContinue
- 4251;4996;4267;%(DisableSpecificWarnings)
+ 4267;4251;4244;%(DisableSpecificWarnings)if not exist "$(OutDir)" mkdir "$(OutDir)"
@@ -98,13 +98,13 @@ xcopy /Y /Q "$(SolutionDir)cocos2dx\platform\third_party\win32\libraries\*.*" "$
..;..\platform\win32;..\platform\third_party\win32\iconv;..\platform\third_party\win32\zlib;..\platform\third_party\win32\libpng;..\platform\third_party\win32\libtiff;..\platform\third_party\win32\libjpeg;..\platform\third_party\win32\libxml2;..\platform\third_party\win32\pthread;..\platform\third_party\win32\OGLES;..\include;..\kazmath\include;%(AdditionalIncludeDirectories)
- WIN32;NDEBUG;_WINDOWS;_USRDLL;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;%(PreprocessorDefinitions)
+ WIN32;NDEBUG;_WINDOWS;_USRDLL;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)MultiThreadedDLLLevel3ProgramDatabase
- 4251;4996;4267;%(DisableSpecificWarnings)
+ 4267;4251;4244;%(DisableSpecificWarnings)if not exist "$(OutDir)" mkdir "$(OutDir)"
diff --git a/cocos2dx/sprite_nodes/CCAnimation.h b/cocos2dx/sprite_nodes/CCAnimation.h
index dbf3ffc7ed..a18c7418a8 100644
--- a/cocos2dx/sprite_nodes/CCAnimation.h
+++ b/cocos2dx/sprite_nodes/CCAnimation.h
@@ -87,20 +87,20 @@ public:
@warning: This interface will be deprecated in future.
@since v0.99.5
*/
- static CCAnimation* animation(void);
+ 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".
@warning: This interface will be deprecated in future.
@since v0.99.5
*/
- static CCAnimation* animationWithSpriteFrames(CCArray* arrayOfSpriteFrameNames, float delay = 0.0f);
+ 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.
@warning: This interface will be deprecated in future.
@since v2.0
*/
- static CCAnimation* animationWithAnimationFrames(CCArray *arrayOfAnimationFrameNames, float delayPerUnit, unsigned int loops);
+ CC_DEPRECATED_ATTRIBUTE static CCAnimation* animationWithAnimationFrames(CCArray *arrayOfAnimationFrameNames, float delayPerUnit, unsigned int loops);
/** Creates an animation
@since v0.99.5
diff --git a/cocos2dx/sprite_nodes/CCSprite.h b/cocos2dx/sprite_nodes/CCSprite.h
index 8964775736..42a8eaab4f 100644
--- a/cocos2dx/sprite_nodes/CCSprite.h
+++ b/cocos2dx/sprite_nodes/CCSprite.h
@@ -125,13 +125,13 @@ public:
The offset will be (0,0).
@warning: This interface will be deprecated in future.
*/
- static CCSprite* spriteWithTexture(CCTexture2D *pTexture);
+ CC_DEPRECATED_ATTRIBUTE static CCSprite* spriteWithTexture(CCTexture2D *pTexture);
/** Creates an sprite with a texture and a rect.
The offset will be (0,0).
@warning: This interface will be deprecated in future.
*/
- static CCSprite* spriteWithTexture(CCTexture2D *pTexture, const CCRect& rect);
+ CC_DEPRECATED_ATTRIBUTE static CCSprite* spriteWithTexture(CCTexture2D *pTexture, const CCRect& rect);
/** Creates an sprite with a texture.
The rect used will be the size of the texture.
@@ -147,7 +147,7 @@ public:
/** Creates an sprite with an sprite frame.
@warning: This interface will be deprecated in future.
*/
- static CCSprite* spriteWithSpriteFrame(CCSpriteFrame *pSpriteFrame);
+ CC_DEPRECATED_ATTRIBUTE static CCSprite* spriteWithSpriteFrame(CCSpriteFrame *pSpriteFrame);
/** Creates an sprite with an sprite frame name.
An CCSpriteFrame will be fetched from the CCSpriteFrameCache by name.
@@ -155,7 +155,7 @@ public:
@warning: This interface will be deprecated in future.
@since v0.9
*/
- static CCSprite* spriteWithSpriteFrameName(const char *pszSpriteFrameName);
+ CC_DEPRECATED_ATTRIBUTE static CCSprite* spriteWithSpriteFrameName(const char *pszSpriteFrameName);
/** Creates an sprite with an sprite frame. */
static CCSprite* createWithSpriteFrame(CCSpriteFrame *pSpriteFrame);
@@ -172,13 +172,13 @@ public:
@warning: This interface will be deprecated in future.
The offset will be (0,0).
*/
- static CCSprite* spriteWithFile(const char *pszFileName);
+ CC_DEPRECATED_ATTRIBUTE static CCSprite* spriteWithFile(const char *pszFileName);
/** Creates an sprite with an image filename and a rect.
The offset will be (0,0).
@warning: This interface will be deprecated in future.
*/
- static CCSprite* spriteWithFile(const char *pszFileName, const CCRect& rect);
+ CC_DEPRECATED_ATTRIBUTE static CCSprite* spriteWithFile(const char *pszFileName, const CCRect& rect);
/** Creates an sprite with an image filename.
The rect used will be the size of the image.
@@ -194,7 +194,7 @@ public:
/** Creates an sprite.
@warning: This interface will be deprecated in future.
*/
- static CCSprite* node();
+ CC_DEPRECATED_ATTRIBUTE static CCSprite* node();
/** Creates an sprite.
*/
static CCSprite* create();
diff --git a/cocos2dx/sprite_nodes/CCSpriteBatchNode.h b/cocos2dx/sprite_nodes/CCSpriteBatchNode.h
index a686d2646c..94e643f935 100644
--- a/cocos2dx/sprite_nodes/CCSpriteBatchNode.h
+++ b/cocos2dx/sprite_nodes/CCSpriteBatchNode.h
@@ -80,14 +80,14 @@ public:
The capacity will be increased in 33% in runtime if it run out of space.
@warning: This interface will be deprecated in future.
*/
- static CCSpriteBatchNode* batchNodeWithTexture(CCTexture2D* tex, unsigned int capacity = kDefaultSpriteBatchCapacity);
+ CC_DEPRECATED_ATTRIBUTE static CCSpriteBatchNode* batchNodeWithTexture(CCTexture2D* tex, unsigned int capacity = kDefaultSpriteBatchCapacity);
/** creates a CCSpriteBatchNode with a file image (.png, .jpeg, .pvr, etc) and capacity of children.
The capacity will be increased in 33% in runtime if it run out of space.
The file will be loaded using the TextureMgr.
@warning: This interface will be deprecated in future.
*/
- static CCSpriteBatchNode* batchNodeWithFile(const char* fileImage, unsigned int capacity = kDefaultSpriteBatchCapacity);
+ CC_DEPRECATED_ATTRIBUTE static CCSpriteBatchNode* batchNodeWithFile(const char* fileImage, unsigned int capacity = kDefaultSpriteBatchCapacity);
/** creates a CCSpriteBatchNode with a texture2d and capacity of children.
The capacity will be increased in 33% in runtime if it run out of space.
diff --git a/cocos2dx/sprite_nodes/CCSpriteFrame.h b/cocos2dx/sprite_nodes/CCSpriteFrame.h
index 965d63ea1d..3448ceb63c 100644
--- a/cocos2dx/sprite_nodes/CCSpriteFrame.h
+++ b/cocos2dx/sprite_nodes/CCSpriteFrame.h
@@ -94,25 +94,25 @@ public:
@warning: This interface will be deprecated in future.
It is assumed that the frame was not trimmed.
*/
- static CCSpriteFrame* frameWithTexture(CCTexture2D* pobTexture, const CCRect& rect);
+ CC_DEPRECATED_ATTRIBUTE static CCSpriteFrame* frameWithTexture(CCTexture2D* pobTexture, const CCRect& rect);
/** Create a CCSpriteFrame with a texture filename, rect in points.
It is assumed that the frame was not trimmed.
@warning: This interface will be deprecated in future.
*/
- static CCSpriteFrame* frameWithTextureFilename(const char* filename, const CCRect& rect);
+ CC_DEPRECATED_ATTRIBUTE static CCSpriteFrame* frameWithTextureFilename(const char* filename, const CCRect& rect);
/** Create a CCSpriteFrame with a texture, rect, rotated, offset and originalSize in pixels.
The originalSize is the size in points of the frame before being trimmed.
@warning: This interface will be deprecated in future.
*/
- static CCSpriteFrame* frameWithTexture(CCTexture2D* pobTexture, const CCRect& rect, bool rotated, const CCPoint& offset, const CCSize& originalSize);
+ CC_DEPRECATED_ATTRIBUTE static CCSpriteFrame* frameWithTexture(CCTexture2D* pobTexture, const CCRect& rect, bool rotated, const CCPoint& offset, const CCSize& originalSize);
/** Create a CCSpriteFrame with a texture filename, rect, rotated, offset and originalSize in pixels.
The originalSize is the size in pixels of the frame before being trimmed.
@warning: This interface will be deprecated in future.
*/
- static CCSpriteFrame* frameWithTextureFilename(const char* filename, const CCRect& rect, bool rotated, const CCPoint& offset, const CCSize& originalSize);
+ CC_DEPRECATED_ATTRIBUTE static CCSpriteFrame* frameWithTextureFilename(const char* filename, const CCRect& rect, bool rotated, const CCPoint& offset, const CCSize& originalSize);
/** Create a CCSpriteFrame with a texture, rect in points.
It is assumed that the frame was not trimmed.
diff --git a/cocos2dx/support/zip_support/ioapi.cpp b/cocos2dx/support/zip_support/ioapi.cpp
index 581ef56b23..3e75d86386 100644
--- a/cocos2dx/support/zip_support/ioapi.cpp
+++ b/cocos2dx/support/zip_support/ioapi.cpp
@@ -10,13 +10,8 @@
*/
-#if (defined(_WIN32))
- #define _CRT_SECURE_NO_WARNINGS
-#endif
-
#include "ioapi.h"
-
namespace cocos2d {
voidpf call_zopen64 (const zlib_filefunc64_32_def* pfilefunc,const void*filename,int mode)
diff --git a/cocos2dx/textures/CCTexturePVR.cpp b/cocos2dx/textures/CCTexturePVR.cpp
index 7121532bd8..d59b8afb5d 100755
--- a/cocos2dx/textures/CCTexturePVR.cpp
+++ b/cocos2dx/textures/CCTexturePVR.cpp
@@ -338,7 +338,7 @@ bool CCTexturePVR::createGLTexture()
GLenum internalFormat = tableFormats[m_uTableFormatIndex][kCCInternalOpenGLInternalFormat];
GLenum format = tableFormats[m_uTableFormatIndex][kCCInternalOpenGLFormat];
GLenum type = tableFormats[m_uTableFormatIndex][kCCInternalOpenGLType];
- bool compressed = tableFormats[m_uTableFormatIndex][kCCInternalCompressedImage];
+ bool compressed = (0 == tableFormats[m_uTableFormatIndex][kCCInternalCompressedImage]) ? false : true;
// Generate textures with mipmaps
for (unsigned int i = 0; i < m_uNumberOfMipmaps; ++i)
diff --git a/cocos2dx/tileMap_parallax_nodes/CCParallaxNode.h b/cocos2dx/tileMap_parallax_nodes/CCParallaxNode.h
index d243e8b0bb..b7110c0a1a 100644
--- a/cocos2dx/tileMap_parallax_nodes/CCParallaxNode.h
+++ b/cocos2dx/tileMap_parallax_nodes/CCParallaxNode.h
@@ -51,7 +51,7 @@ public:
CCParallaxNode();
virtual ~CCParallaxNode();
//@warning: This interface will be deprecated in future.
- static CCParallaxNode * node();
+ CC_DEPRECATED_ATTRIBUTE static CCParallaxNode * node();
static CCParallaxNode * create();
virtual void addChild(CCNode * child, unsigned int z, const CCPoint& parallaxRatio, const CCPoint& positionOffset);
// super methods
diff --git a/cocos2dx/tileMap_parallax_nodes/CCTMXLayer.h b/cocos2dx/tileMap_parallax_nodes/CCTMXLayer.h
index 63dc1194de..5d7d64e9c7 100644
--- a/cocos2dx/tileMap_parallax_nodes/CCTMXLayer.h
+++ b/cocos2dx/tileMap_parallax_nodes/CCTMXLayer.h
@@ -86,7 +86,7 @@ public:
/** creates a CCTMXLayer with an tileset info, a layer info and a map info
@warning: This interface will be deprecated in future.
*/
- static CCTMXLayer * layerWithTilesetInfo(CCTMXTilesetInfo *tilesetInfo, CCTMXLayerInfo *layerInfo, CCTMXMapInfo *mapInfo);
+ CC_DEPRECATED_ATTRIBUTE static CCTMXLayer * layerWithTilesetInfo(CCTMXTilesetInfo *tilesetInfo, CCTMXLayerInfo *layerInfo, CCTMXMapInfo *mapInfo);
/** creates a CCTMXLayer with an tileset info, a layer info and a map info */
static CCTMXLayer * create(CCTMXTilesetInfo *tilesetInfo, CCTMXLayerInfo *layerInfo, CCTMXMapInfo *mapInfo);
diff --git a/cocos2dx/tileMap_parallax_nodes/CCTMXTiledMap.h b/cocos2dx/tileMap_parallax_nodes/CCTMXTiledMap.h
index 4b1536ef56..12002b413e 100644
--- a/cocos2dx/tileMap_parallax_nodes/CCTMXTiledMap.h
+++ b/cocos2dx/tileMap_parallax_nodes/CCTMXTiledMap.h
@@ -120,12 +120,12 @@ public:
/** creates a TMX Tiled Map with a TMX file.
@warning: This interface will be deprecated in future.
*/
- static CCTMXTiledMap* tiledMapWithTMXFile(const char *tmxFile);
+ CC_DEPRECATED_ATTRIBUTE static CCTMXTiledMap* tiledMapWithTMXFile(const char *tmxFile);
/** initializes a TMX Tiled Map with a TMX formatted XML string and a path to TMX resources
@warning: This interface will be deprecated in future.
*/
- static CCTMXTiledMap* tiledMapWithXML(const char* tmxString, const char* resourcePath);
+ CC_DEPRECATED_ATTRIBUTE static CCTMXTiledMap* tiledMapWithXML(const char* tmxString, const char* resourcePath);
/** creates a TMX Tiled Map with a TMX file.*/
static CCTMXTiledMap* create(const char *tmxFile);
diff --git a/cocos2dx/tileMap_parallax_nodes/CCTileMapAtlas.h b/cocos2dx/tileMap_parallax_nodes/CCTileMapAtlas.h
index e48e00cb15..cfe84655a0 100644
--- a/cocos2dx/tileMap_parallax_nodes/CCTileMapAtlas.h
+++ b/cocos2dx/tileMap_parallax_nodes/CCTileMapAtlas.h
@@ -59,7 +59,7 @@ public:
The tile file will be loaded using the TextureMgr.
@warning: This interface will be deprecated in future.
*/
- static CCTileMapAtlas * tileMapAtlasWithTileFile(const char *tile, const char *mapFile, int tileWidth, int tileHeight);
+ CC_DEPRECATED_ATTRIBUTE static CCTileMapAtlas * tileMapAtlasWithTileFile(const char *tile, const char *mapFile, int tileWidth, int tileHeight);
/** creates a CCTileMap with a tile file (atlas) with a map file and the width and height of each tile in points.
The tile file will be loaded using the TextureMgr.
diff --git a/tests/proj.win32/test.win32.vcproj b/tests/proj.win32/test.win32.vcproj
index e484186f32..3def1b8e35 100644
--- a/tests/proj.win32/test.win32.vcproj
+++ b/tests/proj.win32/test.win32.vcproj
@@ -42,14 +42,14 @@
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""$(SolutionDir)cocos2dx";"$(SolutionDir)cocos2dx\include";"$(SolutionDir)cocos2dx\kazmath\include";"$(SolutionDir)cocos2dx\platform\win32";"$(SolutionDir)cocos2dx\platform\third_party\win32";"$(SolutionDir)cocos2dx\platform\third_party\win32\OGLES";"$(SolutionDir)";"$(SolutionDir)chipmunk\include\chipmunk";"$(SolutionDir)CocosDenshion\include";..\tests;.."
- PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USE_MATH_DEFINES;GL_GLEXT_PROTOTYPES"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USE_MATH_DEFINES;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="4"
- DisableSpecificWarnings="4244;4996"
+ DisableSpecificWarnings="4267;4251;4244"
/>
Disabled.;..;..\tests;..\..;..\..\chipmunk\include\chipmunk;..\..\cocos2dx;..\..\cocos2dx\include;..\..\cocos2dx\kazmath\include;..\..\cocos2dx\platform\win32;..\..\cocos2dx\platform\third_party\win32;..\..\cocos2dx\platform\third_party\win32\OGLES;..\..\CocosDenshion\Include;%(AdditionalIncludeDirectories)
- WIN32;_DEBUG;_WINDOWS;_USE_MATH_DEFINES;GL_GLEXT_PROTOTYPES;%(PreprocessorDefinitions)
+ WIN32;_DEBUG;_WINDOWS;_USE_MATH_DEFINES;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)trueEnableFastChecksMultiThreadedDebugDLL
@@ -64,7 +64,7 @@
Level3EditAndContinue
- 4251;4244;4996;%(DisableSpecificWarnings)
+ 4267;4251;4244;%(DisableSpecificWarnings)opengl32.lib;glew32.lib;libcocos2d.lib;libBox2d.lib;libchipmunk.lib;libcurl_imp.lib;libCocosDenshion.lib;%(AdditionalDependencies)
@@ -84,14 +84,14 @@
MaxSpeedtrue.;..;..\tests;..\..;..\..\chipmunk\include\chipmunk;..\..\cocos2dx;..\..\cocos2dx\include;..\..\cocos2dx\kazmath\include;..\..\cocos2dx\platform\win32;..\..\cocos2dx\platform\third_party\win32;..\..\cocos2dx\platform\third_party\win32\OGLES;..\..\CocosDenshion\Include;%(AdditionalIncludeDirectories)
- WIN32;NDEBUG;_WINDOWS;_USE_MATH_DEFINES;GL_GLEXT_PROTOTYPES;%(PreprocessorDefinitions)
+ WIN32;NDEBUG;_WINDOWS;_USE_MATH_DEFINES;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)MultiThreadedDLLtrueLevel3ProgramDatabase
- 4251;4244;4996;%(DisableSpecificWarnings)
+ 4267;4251;4244;%(DisableSpecificWarnings)opengl32.lib;glew32.lib;libcocos2d.lib;libBox2d.lib;libchipmunk.lib;libcurl_imp.lib;libCocosDenshion.lib;%(AdditionalDependencies)
diff --git a/tests/tests/EffectsTest/EffectsTest.h b/tests/tests/EffectsTest/EffectsTest.h
index 60b04f04b3..4e2bbc77f6 100644
--- a/tests/tests/EffectsTest/EffectsTest.h
+++ b/tests/tests/EffectsTest/EffectsTest.h
@@ -28,8 +28,6 @@ public:
void newScene();
- // @warning: This interface will be deprecated in future.
- //static TextLayer* node();
static TextLayer* create();
};
diff --git a/tests/tests/ExtensionsTest/CocosBuilderTest/ButtonTest/ButtonTestLayer.h b/tests/tests/ExtensionsTest/CocosBuilderTest/ButtonTest/ButtonTestLayer.h
index 0234353a2a..5ce2bb5df7 100644
--- a/tests/tests/ExtensionsTest/CocosBuilderTest/ButtonTest/ButtonTestLayer.h
+++ b/tests/tests/ExtensionsTest/CocosBuilderTest/ButtonTest/ButtonTestLayer.h
@@ -12,7 +12,7 @@ class ButtonTestLayer
, public cocos2d::extension::CCBSelectorResolver
{
public:
- CCB_STATIC_NEW_AUTORELEASE_OBJECT_WITH_INIT_METHOD(ButtonTestLayer, node);
+ CCB_STATIC_NEW_AUTORELEASE_OBJECT_WITH_INIT_METHOD(ButtonTestLayer, create);
ButtonTestLayer();
virtual ~ButtonTestLayer();
diff --git a/tests/tests/ExtensionsTest/CocosBuilderTest/HelloCocosBuilder/HelloCocosBuilderLayer.cpp b/tests/tests/ExtensionsTest/CocosBuilderTest/HelloCocosBuilder/HelloCocosBuilderLayer.cpp
index 9c33fe7b97..8faedee59f 100644
--- a/tests/tests/ExtensionsTest/CocosBuilderTest/HelloCocosBuilder/HelloCocosBuilderLayer.cpp
+++ b/tests/tests/ExtensionsTest/CocosBuilderTest/HelloCocosBuilder/HelloCocosBuilderLayer.cpp
@@ -58,13 +58,13 @@ void HelloCocosBuilderLayer::openTest(const char * pCCBFileName, const char * pC
transitionColor.g = 0;
transitionColor.b = 0;
- CCDirector::sharedDirector()->pushScene(CCTransitionFade::transitionWithDuration(0.5f, scene, transitionColor));
+ CCDirector::sharedDirector()->pushScene(CCTransitionFade::create(0.5f, scene, transitionColor));
}
void HelloCocosBuilderLayer::onNodeLoaded(cocos2d::CCNode * pNode, cocos2d::extension::CCNodeLoader * pNodeLoader) {
- CCRotateBy * ccRotateBy = CCRotateBy::actionWithDuration(0.5f, 10);
- CCRepeatForever * ccRepeatForever = CCRepeatForever::actionWithAction(ccRotateBy);
+ CCRotateBy * ccRotateBy = CCRotateBy::create(0.5f, 10);
+ CCRepeatForever * ccRepeatForever = CCRepeatForever::create(ccRotateBy);
this->mBurstSprite->runAction(ccRepeatForever);
}
diff --git a/tests/tests/ExtensionsTest/CocosBuilderTest/HelloCocosBuilder/HelloCocosBuilderLayer.h b/tests/tests/ExtensionsTest/CocosBuilderTest/HelloCocosBuilder/HelloCocosBuilderLayer.h
index b5bc30e368..0bdfa37c95 100644
--- a/tests/tests/ExtensionsTest/CocosBuilderTest/HelloCocosBuilder/HelloCocosBuilderLayer.h
+++ b/tests/tests/ExtensionsTest/CocosBuilderTest/HelloCocosBuilder/HelloCocosBuilderLayer.h
@@ -24,7 +24,7 @@ class HelloCocosBuilderLayer
, public cocos2d::extension::CCNodeLoaderListener
{
public:
- CCB_STATIC_NEW_AUTORELEASE_OBJECT_WITH_INIT_METHOD(HelloCocosBuilderLayer, node);
+ CCB_STATIC_NEW_AUTORELEASE_OBJECT_WITH_INIT_METHOD(HelloCocosBuilderLayer, create);
HelloCocosBuilderLayer();
virtual ~HelloCocosBuilderLayer();
diff --git a/tests/tests/ExtensionsTest/CocosBuilderTest/LabelTest/LabelTestLayer.h b/tests/tests/ExtensionsTest/CocosBuilderTest/LabelTest/LabelTestLayer.h
index 8d72c06299..f57f8c0328 100644
--- a/tests/tests/ExtensionsTest/CocosBuilderTest/LabelTest/LabelTestLayer.h
+++ b/tests/tests/ExtensionsTest/CocosBuilderTest/LabelTest/LabelTestLayer.h
@@ -6,7 +6,7 @@
class LabelTestLayer : public cocos2d::CCLayer {
public:
- CCB_STATIC_NEW_AUTORELEASE_OBJECT_WITH_INIT_METHOD(LabelTestLayer, node);
+ CCB_STATIC_NEW_AUTORELEASE_OBJECT_WITH_INIT_METHOD(LabelTestLayer, create);
};
#endif
\ No newline at end of file
diff --git a/tests/tests/ExtensionsTest/CocosBuilderTest/MenuTest/MenuTestLayer.h b/tests/tests/ExtensionsTest/CocosBuilderTest/MenuTest/MenuTestLayer.h
index 160fedd979..3d4fa7c01e 100644
--- a/tests/tests/ExtensionsTest/CocosBuilderTest/MenuTest/MenuTestLayer.h
+++ b/tests/tests/ExtensionsTest/CocosBuilderTest/MenuTest/MenuTestLayer.h
@@ -12,7 +12,7 @@ class MenuTestLayer
, public cocos2d::extension::CCBMemberVariableAssigner
{
public:
- CCB_STATIC_NEW_AUTORELEASE_OBJECT_WITH_INIT_METHOD(MenuTestLayer, node);
+ CCB_STATIC_NEW_AUTORELEASE_OBJECT_WITH_INIT_METHOD(MenuTestLayer, create);
MenuTestLayer();
virtual ~MenuTestLayer();
diff --git a/tests/tests/ExtensionsTest/CocosBuilderTest/ParticleSystemTest/ParticleSystemTestLayer.h b/tests/tests/ExtensionsTest/CocosBuilderTest/ParticleSystemTest/ParticleSystemTestLayer.h
index f876b09456..49630f5f14 100644
--- a/tests/tests/ExtensionsTest/CocosBuilderTest/ParticleSystemTest/ParticleSystemTestLayer.h
+++ b/tests/tests/ExtensionsTest/CocosBuilderTest/ParticleSystemTest/ParticleSystemTestLayer.h
@@ -6,7 +6,7 @@
class ParticleSystemTestLayer : public cocos2d::CCLayer {
public:
- CCB_STATIC_NEW_AUTORELEASE_OBJECT_WITH_INIT_METHOD(ParticleSystemTestLayer, node);
+ CCB_STATIC_NEW_AUTORELEASE_OBJECT_WITH_INIT_METHOD(ParticleSystemTestLayer, create);
};
#endif
\ No newline at end of file
diff --git a/tests/tests/ExtensionsTest/CocosBuilderTest/ScrollViewTest/ScrollViewTestLayer.h b/tests/tests/ExtensionsTest/CocosBuilderTest/ScrollViewTest/ScrollViewTestLayer.h
index 836850de64..685e3dc2cb 100644
--- a/tests/tests/ExtensionsTest/CocosBuilderTest/ScrollViewTest/ScrollViewTestLayer.h
+++ b/tests/tests/ExtensionsTest/CocosBuilderTest/ScrollViewTest/ScrollViewTestLayer.h
@@ -6,7 +6,7 @@
class ScrollViewTestLayer : public cocos2d::CCLayer {
public:
- CCB_STATIC_NEW_AUTORELEASE_OBJECT_WITH_INIT_METHOD(ScrollViewTestLayer, node);
+ CCB_STATIC_NEW_AUTORELEASE_OBJECT_WITH_INIT_METHOD(ScrollViewTestLayer, create);
};
#endif
\ No newline at end of file
diff --git a/tests/tests/ExtensionsTest/CocosBuilderTest/SpriteTest/SpriteTestLayer.h b/tests/tests/ExtensionsTest/CocosBuilderTest/SpriteTest/SpriteTestLayer.h
index 11bce158c1..6b7cf5f68f 100644
--- a/tests/tests/ExtensionsTest/CocosBuilderTest/SpriteTest/SpriteTestLayer.h
+++ b/tests/tests/ExtensionsTest/CocosBuilderTest/SpriteTest/SpriteTestLayer.h
@@ -6,7 +6,7 @@
class SpriteTestLayer : public cocos2d::CCLayer {
public:
- CCB_STATIC_NEW_AUTORELEASE_OBJECT_WITH_INIT_METHOD(SpriteTestLayer, node);
+ CCB_STATIC_NEW_AUTORELEASE_OBJECT_WITH_INIT_METHOD(SpriteTestLayer, create);
};
#endif
\ No newline at end of file
diff --git a/tests/tests/ExtensionsTest/CocosBuilderTest/TestHeader/TestHeaderLayer.h b/tests/tests/ExtensionsTest/CocosBuilderTest/TestHeader/TestHeaderLayer.h
index 4c9acfa9c6..3ec4f490b5 100644
--- a/tests/tests/ExtensionsTest/CocosBuilderTest/TestHeader/TestHeaderLayer.h
+++ b/tests/tests/ExtensionsTest/CocosBuilderTest/TestHeader/TestHeaderLayer.h
@@ -10,7 +10,7 @@ class TestHeaderLayer
, public cocos2d::extension::CCBSelectorResolver
{
public:
- CCB_STATIC_NEW_AUTORELEASE_OBJECT_WITH_INIT_METHOD(TestHeaderLayer, node);
+ CCB_STATIC_NEW_AUTORELEASE_OBJECT_WITH_INIT_METHOD(TestHeaderLayer, create);
virtual cocos2d::SEL_MenuHandler onResolveCCBCCMenuItemSelector(cocos2d::CCObject * pTarget, cocos2d::CCString * pSelectorName);
virtual cocos2d::extension::SEL_CCControlHandler onResolveCCBCCControlSelector(cocos2d::CCObject * pTarget, cocos2d::CCString * pSelectorName);