From e5ef579cb3f10d116a2ee625f0af5b51ccca608a Mon Sep 17 00:00:00 2001 From: James Chen Date: Wed, 20 Mar 2013 10:41:20 +0800 Subject: [PATCH 1/2] Fixing compilation errors for linux. --- extensions/CCBReader/CCBAnimationManager.cpp | 6 +++--- extensions/CCBReader/CCNodeLoader.cpp | 3 +-- extensions/proj.linux/Makefile | 1 + 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/extensions/CCBReader/CCBAnimationManager.cpp b/extensions/CCBReader/CCBAnimationManager.cpp index 525c8a2f6e..cd290d2004 100644 --- a/extensions/CCBReader/CCBAnimationManager.cpp +++ b/extensions/CCBReader/CCBAnimationManager.cpp @@ -23,10 +23,10 @@ CCBAnimationManager::CCBAnimationManager() , mAutoPlaySequenceId(0) , mRootNode(NULL) , mRootContainerSize(CCSizeZero) -, mOwner(NULL) -, jsControlled(false) , mDelegate(NULL) , mRunningSequence(NULL) +, jsControlled(false) +, mOwner(NULL) { init(); } @@ -585,7 +585,7 @@ CCObject* CCBAnimationManager::actionForCallbackChannel(CCBSequenceProperty* cha actions->addObject(callback); } } else { - CCObject *target; + CCObject*target = NULL; if(selectorTarget == kCCBTargetTypeDocumentRoot) target = mRootNode; else if (selectorTarget == kCCBTargetTypeOwner) target = mOwner; if(target != NULL) { diff --git a/extensions/CCBReader/CCNodeLoader.cpp b/extensions/CCBReader/CCNodeLoader.cpp index 4451514a41..8d853bdea8 100644 --- a/extensions/CCBReader/CCNodeLoader.cpp +++ b/extensions/CCBReader/CCNodeLoader.cpp @@ -163,6 +163,7 @@ void CCNodeLoader::parseProperties(CCNode * pNode, CCNode * pParent, CCBReader * { this->onHandlePropTypeFloatXY(pNode, pParent, propertyName.c_str(), xy, pCCBReader); } + CC_SAFE_DELETE_ARRAY(xy); break; } @@ -451,8 +452,6 @@ float * CCNodeLoader::parsePropTypeFloatXY(CCNode * pNode, CCNode * pParent, CCB float x = pCCBReader->readFloat(); float y = pCCBReader->readFloat(); - int type = pCCBReader->readInt(false); - float * floatXY = new float[2]; floatXY[0] = x; floatXY[1] = y; diff --git a/extensions/proj.linux/Makefile b/extensions/proj.linux/Makefile index 40688cb67f..f0ade992f5 100644 --- a/extensions/proj.linux/Makefile +++ b/extensions/proj.linux/Makefile @@ -4,6 +4,7 @@ COCOS_ROOT=../.. INCLUDES = -I$(COCOS_ROOT)/external \ -I$(COCOS_ROOT)/external/chipmunk/include/chipmunk \ + -I$(COCOS_ROOT)/CocosDenshion/include \ -I.. \ -I../CCBReader \ -I../GUI/CCControlExtension \ From 37acbbe4fb504c1c2949a6ad56ac05258e4a7cd6 Mon Sep 17 00:00:00 2001 From: James Chen Date: Wed, 20 Mar 2013 10:44:21 +0800 Subject: [PATCH 2/2] Adding a space for target variable. --- extensions/CCBReader/CCBAnimationManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/CCBReader/CCBAnimationManager.cpp b/extensions/CCBReader/CCBAnimationManager.cpp index cd290d2004..e80949cdf3 100644 --- a/extensions/CCBReader/CCBAnimationManager.cpp +++ b/extensions/CCBReader/CCBAnimationManager.cpp @@ -585,7 +585,7 @@ CCObject* CCBAnimationManager::actionForCallbackChannel(CCBSequenceProperty* cha actions->addObject(callback); } } else { - CCObject*target = NULL; + CCObject* target = NULL; if(selectorTarget == kCCBTargetTypeDocumentRoot) target = mRootNode; else if (selectorTarget == kCCBTargetTypeOwner) target = mOwner; if(target != NULL) {