Hello.
If I am normal using cocos2d framework it works fine, but when I
#define CC_USE_BOX2D
instead of CC_USE_CHIPMUNK in CCPhysicsSetting.h i got compile errors:
error C2664: 'cocos2d::PhysicsShapeInfo::PhysicsShapeInfo(const cocos2d::PhysicsShapeInfo &)' : cannot convert parameter 1 from 'cocos2d::PhysicsShape *const ' to 'const cocos2d::PhysicsShapeInfo &' \..\ccphysicsshape.cpp 63
error C2664: 'cocos2d::PhysicsContactInfo::PhysicsContactInfo(const cocos2d::PhysicsContactInfo &)' : cannot convert parameter 1 from 'cocos2d::PhysicsContact *const ' to 'const cocos2d::PhysicsContactInfo &' \..\ccphysicscontact.cpp 70
It is about these parts of code:
bool PhysicsShape::init(PhysicsBody* body, Type type)
{
if (body == nullptr) return false;
_body = body;
_info = new PhysicsShapeInfo(this);
if (_info == nullptr) return false;
_type = type;
return true;
}
bool PhysicsContact::init(PhysicsShape* a, PhysicsShape* b)
{
do
{
CC_BREAK_IF(a == nullptr || b == nullptr);
CC_BREAK_IF(!(_info = new PhysicsContactInfo(this)));
_shapeA = a;
_shapeB = b;
return true;
} while(false);
return false;
}
Regards,
Shakaz