Skip to content

Instantly share code, notes, and snippets.

@wangxiaodong
Last active December 20, 2015 16:29
Show Gist options
  • Save wangxiaodong/6161463 to your computer and use it in GitHub Desktop.
Save wangxiaodong/6161463 to your computer and use it in GitHub Desktop.
cocos2d-x bugs base on cocos2d-2.1rc0-x-2.1.3
// ccCArray.cpp
// line:
//unsigned int ccArrayGetIndexOfObject(ccArray *arr, CCObject* object)
//{
// for(unsigned int i = 0; i < arr->num; i++)
// {
// if( arr->arr[i] == object ) return i;
// }
//
// return CC_INVALID_INDEX;
//}
// this is wrong, as cocos foundation protocol, here should using isEqual
unsigned int ccArrayGetIndexOfObject(ccArray *arr, CCObject* object)
{
for(unsigned int i = 0; i < arr->num; i++)
{
if( arr->arr[i]->isEqual(object) ) return i;
}
return CC_INVALID_INDEX;
}
// CCLayerLoader.cpp
// line: 7
// #define PROPERTY_TOUCH_ENABLED "isTouchEnabled"
// ccbreader version 5
// as cocosbuilder 3 alpha 5, is "touchEnabled"
#define PROPERTY_TOUCH_ENABLED "touchEnabled"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment