Developers Manual > Cocos2d-x > Deprecated Docs for Cocos2d-x > Upgrade Guides Cocos2d-x > Methods deprecated in cocos2d-101-x-091

Methods deprecated in v1.0.1-x-0.9.1

CCAnimation

/** Initializes a CCAnimation with a name          
@since v0.99.3          
@deprecated Will be removed in 1.0.1. Use "init" instead.    
*/          
bool initWithName(const char *pszName);

/** Initializes a CCAnimation with a name and frames          
@since v0.99.3
@deprecated Will be removed in 1.0.1. Use "initWithFrames" instead.
*/
bool initWithName(const char *pszName, CCMutableArray *pFrames);

/** Initializes a CCAnimation with a name and delay between frames.
@deprecated Will be removed in 1.0.1. Use "initWithFrames:nil delay:delay" instead.
*/
bool initWithName(const char *pszName, float fDelay);

/** Initializes a CCAnimation with a name, delay and an array of CCSpriteFrames.
@deprecated Will be removed in 1.0.1. Use "initWithFrames:frames delay:delay" instead.
*/
bool initWithName(const char *pszName, float fDelay, CCMutableArray *pFrames);

/** Creates a CCAnimation with a name
@since v0.99.3
@deprecated Will be removed in 1.0.1. Use "animation" instead.
*/
static CCAnimation* animationWithName(const char *pszName);

/** Creates a CCAnimation with a name and frames
@since v0.99.3
@deprecated Will be removed in 1.0.1. Use "animationWithFrames" instead.
*/
static CCAnimation* animationWithName(const char *pszName, CCMutableArray *pFrames);

/** Creates a CCAnimation with a name and delay between frames. */
static CCAnimation* animationWithName(const char *pszName, float fDelay);

/** Creates a CCAnimation with a name, delay and an array of CCSpriteFrames. */
static CCAnimation* animationWithName(const char *pszName, float fDelay, CCMutableArray *pFrames);

CCLabelAtlas

/** creates the CCLabelAtlas with a string, a char map file(the atlas), the width and height of each element in points and the starting char of the atlas.
@deprecated Will be removed in 1.0.1. Use "labelWithString:" instead
*/
static CCLabelAtlas * labelAtlasWithString(const char *label, const char *charMapFile, unsigned int itemWidth, unsigned int itemHeight, unsigned char startCharMap);

CCLabelBMFont

/** creates a BMFont label with an initial string and the FNT file
@deprecated Will be removed in 1.0.1. Use "labelWithString" instead.
@since v0.99.5
*/
static CCLabelBMFont * bitmapFontAtlasWithString(const char *str, const char *fntFile);

CCBitmapFontAtlas ~~> CCLabelBMFont
<pre>
/*** CCBitmapFontAtlas
`deprecated Use CCLabelBMFont instead. Will be removed 1.0.1
*/
class CCBitmapFontAtlas : public CCLabelBMFont
{
};
</pre>

h2. CCColorLayer -> CCLayerColor

<pre>
/** CCColorLayer
It is the same as CCLayerColor.
`deprecated Use CCLayerColor instead. This class will be removed in v1.0.1
**/
class CC_DLL CCColorLayer : public CCLayerColor
{
public:
static CCColorLayer * layerWithColorWidthHeight;
static CCColorLayer * layerWithColor;
};
</pre>

h2. CCMultiplexLayer~~> CCLayerMultiplex

/** CCMultiplexLayer
It is the same as CCLayerMultiplex.
@deprecated Use CCLayerMultiplex instead. This class will be removed in v1.0.1
*/
class CCMultiplexLayer : public CCLayerMultiplex
{
};

CCSprite

/** adds an Animation to the Sprite.
@deprecated Use CCAnimationCache instead. Will be removed in 1.0.1
*/
void addAnimation(CCAnimation *pAnimation);

/** returns an Animation given it's name.
@deprecated Use CCAnimationCache instead. Will be removed in 1.0.1
*/
CCAnimation* animationByName(const char *pszAnimationName);

/** changes the display frame based on an animation and an index.
@deprecated Will be removed in 1.0.1. Use setDisplayFrameWithAnimationName:index instead
*/
void setDisplayFrame(const char *pszAnimationName, int nFrameIndex);

CCSpriteBatchNode

// use batchNodeWithTexture(CCTexture2D *tex) instead
static CCSpriteBatchNode* spriteSheetWithTexture(CCTexture2D *tex);

// use  batchNodeWithTexture(CCTexture2D* tex, unsigned int capacity) instead
static CCSpriteBatchNode* spriteSheetWithTexture(CCTexture2D *tex, unsigned int capacity);

// use batchNodeWithFile(const char* fileImage) instead
static CCSpriteBatchNode* spriteSheetWithFile(const char* fileImage);

// use batchNodeWithFile(const char* fileImage, unsigned int capacity) instead
static CCSpriteBatchNode* spriteSheetWithFile(const char* fileImage, unsigned int capacity);

/** creates an sprite with a rect in the CCSpriteBatchNode.
It's the same as:
create an standard CCSsprite
set the usingSpriteSheet = YES
set the textureAtlas to the same texture Atlas as the CCSpriteBatchNode
@deprecated Use CCSprite::spriteWithBatchNode(CCSpriteBatchNode*, rect) instead;
*/
CCSprite* createSpriteWithRect(CCRect rect);

/** initializes a previously created sprite with a rect. This sprite will have the same texture as the CCSpriteBatchNode.
It's the same as:
initialize an standard CCSsprite
set the usingBatchNode = YES
set the textureAtlas to the same texture Atlas as the CCSpriteBatchNode
@since v0.99.0
@deprecated Use CCSprite::initWithBatchNode(rect) instead;
*/
void initSprite(CCSprite *sprite, CCRect rect);

CCSpriteFrameCache

/** Creates an sprite with the name of an sprite frame.
The created sprite will contain the texture, rect and offset of the sprite frame.
It returns an autorelease object.
@deprecated use CCSprite::spriteWithSpriteFrameName(name). This method will be removed on final v0.9
*/
CCSprite* createSpriteWithFrameName(const char *pszName);

CCTMXTiledMap

/** return the TMXObjectGroup for the secific group
@deprecated Use map#objectGroupNamed instead
*/
CCTMXObjectGroup* groupNamed(const char *groupName);

Copyright © 2010 - 2014 Cocos2d-x.orgClustrmaps Support Email: support@cocos.org