From c2ed3d22ef3321a1a305de5240bba8b8727ccd12 Mon Sep 17 00:00:00 2001 From: Ming Date: Thu, 12 Aug 2010 10:14:21 +0000 Subject: [PATCH] issue #44: fix some bugs --- cocos2dx/sprite_nodes/CCSprite.cpp | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/cocos2dx/sprite_nodes/CCSprite.cpp b/cocos2dx/sprite_nodes/CCSprite.cpp index dea6a386b1..0a231a890d 100644 --- a/cocos2dx/sprite_nodes/CCSprite.cpp +++ b/cocos2dx/sprite_nodes/CCSprite.cpp @@ -105,14 +105,10 @@ CCSprite* CCSprite::spriteWithSpriteFrame(CCSpriteFrame *pSpriteFrame) return pobSprite; } - -///@todo implement CCSprite* CCSprite::spriteWithSpriteFrameName(const char *pszSpriteFrameName) { - /* CCSpriteFrame *pFrame = CCSpriteFrameCache::sharedSpriteFrameCache()->spriteFrameByName(pszSpriteFrameName); return spriteWithSpriteFrame(pFrame); - */ return NULL; } @@ -265,13 +261,11 @@ CCSprite* CCSprite::initWithSpriteFrame(CCSpriteFrame *pSpriteFrame) CCSprite* CCSprite::initWithSpriteFrameName(const char *pszSpriteFrameName) { - /* - ///@ implement later assert(pszSpriteFrameName != NULL); CCSpriteFrame *pFrame = CCSpriteFrameCache::sharedSpriteFrameCache()->spriteFrameByName(pszSpriteFrameName); return initWithSpriteFrame(pFrame); - */ + return NULL; } @@ -613,11 +607,8 @@ CCNode* CCSprite::addChild(CCNode *pChild, int zOrder, int tag) if (m_bUsesSpriteSheet) { - /* - ///@todo implement after SpriteSheet is implemented unsigned int index = m_pobSpriteSheet->atlasIndexForChild(static_cast(pChild), zOrder); m_pobSpriteSheet->insertChild(static_cast(pChild), index); - */ } m_bHasChildren = true; @@ -665,8 +656,6 @@ void CCSprite::removeChild(CCNode *pChild, bool bCleanup) void CCSprite::removeAllChildrenWithCleanup(bool bCleanup) { - /* - ///@todo: implement after the implementation of sprite sheet if (m_bUsesSpriteSheet) { CCSprite *pChild; @@ -681,7 +670,6 @@ void CCSprite::removeAllChildrenWithCleanup(bool bCleanup) __super::removeAllChildrenWithCleanup(bCleanup); m_bHasChildren = false; - */ } //