issue #3162: deprecated RGBAProtocol, NodeRGBA and LayerRGBA

This commit is contained in:
boyu0 2013-12-13 10:10:49 +08:00
parent d7106d49be
commit c8c0e2270e
6 changed files with 35 additions and 12 deletions

View File

@ -1040,6 +1040,10 @@ CC_DEPRECATED_ATTRIBUTE typedef __Bool CCBool;
CC_DEPRECATED_ATTRIBUTE typedef __String CCString;
//CC_DEPRECATED_ATTRIBUTE typedef __String String;
CC_DEPRECATED_ATTRIBUTE typedef __RGBAProtocol RGBAProtocol;
CC_DEPRECATED_ATTRIBUTE typedef __NodeRGBA NodeRGBA;
CC_DEPRECATED_ATTRIBUTE typedef __LayerRGBA LayerRGBA;
NS_CC_END

View File

@ -192,10 +192,10 @@ private:
- RGB colors
@since 2.1
*/
class CC_DLL CC_DEPRECATED_ATTRIBUTE LayerRGBA : public Layer, public RGBAProtocol
class CC_DLL __LayerRGBA : public Layer, public __RGBAProtocol
{
public:
CREATE_FUNC(LayerRGBA);
CREATE_FUNC(__LayerRGBA);
//
@ -219,11 +219,11 @@ public:
virtual bool isOpacityModifyRGB() const override { return Layer::isOpacityModifyRGB(); }
protected:
LayerRGBA() {}
virtual ~LayerRGBA() {}
__LayerRGBA() {}
virtual ~__LayerRGBA() {}
private:
CC_DISALLOW_COPY_AND_ASSIGN(LayerRGBA);
CC_DISALLOW_COPY_AND_ASSIGN(__LayerRGBA);
};
//

View File

@ -1523,7 +1523,7 @@ private:
Opacity/Color propagates into children that conform to the RGBAProtocol if cascadeOpacity/cascadeColor is enabled.
@since v2.1
*/
class CC_DLL CC_DEPRECATED_ATTRIBUTE NodeRGBA : public Node, public RGBAProtocol
class CC_DLL __NodeRGBA : public Node, public __RGBAProtocol
{
public:
// overrides
@ -1545,11 +1545,11 @@ public:
virtual bool isOpacityModifyRGB() const override { return Node::isOpacityModifyRGB(); }
protected:
NodeRGBA() {}
virtual ~NodeRGBA() {}
CC_DEPRECATED_ATTRIBUTE __NodeRGBA() { CCLOG("NodeRGBA deprecated.");}
virtual ~__NodeRGBA() {}
private:
CC_DISALLOW_COPY_AND_ASSIGN(NodeRGBA);
CC_DISALLOW_COPY_AND_ASSIGN(__NodeRGBA);
};
// end of base_node group

View File

@ -35,10 +35,10 @@ NS_CC_BEGIN
/**
* RGBA protocol that affects Node's color and opacity
*/
class CC_DLL CC_DEPRECATED_ATTRIBUTE RGBAProtocol
class CC_DLL __RGBAProtocol
{
public:
virtual ~RGBAProtocol() {}
virtual ~__RGBAProtocol() {}
/**
* Changes the color with R,G,B bytes

View File

@ -279,6 +279,14 @@ end
_G["CCNodeRGBA"] = DeprecatedClass.CCNodeRGBA()
--CCNodeRGBA class will be Deprecated,end
--NodeRGBA class will be Deprecated,begin
function DeprecatedClass.NodeRGBA()
deprecatedTip("cc.NodeRGBA","cc.Node")
return cc.Node
end
_G["cc"]["NodeRGBA"] = DeprecatedClass.NodeRGBA()
--NodeRGBA class will be Deprecated,end
--CCAnimationCache class will be Deprecated,begin
function DeprecatedClass.CCAnimationCache()
deprecatedTip("CCAnimationCache","cc.AnimationCache")
@ -1311,6 +1319,14 @@ end
_G["CCLayerRGBA"] = DeprecatedClass.CCLayerRGBA()
--CCLayerRGBA class will be Deprecated,end
--LayerRGBA class will be Deprecated,begin
function DeprecatedClass.LayerRGBA()
deprecatedTip("cc.LayerRGBA","cc.Layer")
return cc.Layer
end
_G["cc"]["LayerRGBA"] = DeprecatedClass.LayerRGBA()
--LayerRGBA class will be Deprecated,end
--CCBezierTo class will be Deprecated,begin
function DeprecatedClass.CCBezierTo()
deprecatedTip("CCBezierTo","cc.BezierTo")

View File

@ -125,7 +125,10 @@ rename_functions = SpriteFrameCache::[addSpriteFramesWithFile=addSpriteFrames ge
FileUtils::[loadFilenameLookupDictionaryFromFile=loadFilenameLookup]
rename_classes = ParticleSystemQuad::ParticleSystem,
SimpleAudioEngine::AudioEngine
SimpleAudioEngine::AudioEngine,
__RGBAProtocol::RGBAProtocol,
__NodeRGBA::NodeRGBA,
__LayerRGBA::LayerRGBA
# for all class names, should we remove something when registering in the target VM?
remove_prefix =