mirror of https://github.com/axmolengine/axmol.git
issue #2771: edit android.mk, CMakeLists.txt, change PHYSICS_CONTACT_POINT_MAX to PhysicsContactData:POINT_MAX
This commit is contained in:
parent
0100c05a93
commit
8346fe4b4d
|
@ -39,13 +39,13 @@ CCEventAcceleration.cpp \
|
|||
CCEventCustom.cpp \
|
||||
CCEventDispatcher.cpp \
|
||||
CCEventKeyboard.cpp \
|
||||
CCEventMouse.cpp \
|
||||
CCEventListenerMouse.cpp \
|
||||
CCEventListener.cpp \
|
||||
CCEventListenerAcceleration.cpp \
|
||||
CCEventListenerCustom.cpp \
|
||||
CCEventListenerKeyboard.cpp \
|
||||
CCEventListenerMouse.cpp \
|
||||
CCEventListenerTouch.cpp \
|
||||
CCEventMouse.cpp \
|
||||
CCEventTouch.cpp \
|
||||
CCFont.cpp \
|
||||
CCFontAtlas.cpp \
|
||||
|
@ -149,11 +149,6 @@ platform/CCThread.cpp \
|
|||
../physics/CCPhysicsJoint.cpp \
|
||||
../physics/CCPhysicsShape.cpp \
|
||||
../physics/CCPhysicsWorld.cpp \
|
||||
../physics/box2d/CCPhysicsBodyInfo_box2d.cpp \
|
||||
../physics/box2d/CCPhysicsContactInfo_box2d.cpp \
|
||||
../physics/box2d/CCPhysicsJointInfo_box2d.cpp \
|
||||
../physics/box2d/CCPhysicsShapeInfo_box2d.cpp \
|
||||
../physics/box2d/CCPhysicsWorldInfo_box2d.cpp \
|
||||
../physics/chipmunk/CCPhysicsBodyInfo_chipmunk.cpp \
|
||||
../physics/chipmunk/CCPhysicsContactInfo_chipmunk.cpp \
|
||||
../physics/chipmunk/CCPhysicsJointInfo_chipmunk.cpp \
|
||||
|
|
|
@ -266,8 +266,4 @@ To enable set it to a value different than 0. Disabled by default.
|
|||
#define CC_LUA_ENGINE_DEBUG 0
|
||||
#endif
|
||||
|
||||
#ifdef CC_USE_PHYSICS
|
||||
#define PHYSICS_CONTACT_POINT_MAX 4
|
||||
#endif
|
||||
|
||||
#endif // __CCCONFIG_H__
|
||||
|
|
|
@ -98,7 +98,7 @@ void PhysicsContact::generateContactData()
|
|||
cpArbiter* arb = static_cast<cpArbiter*>(_contactInfo);
|
||||
_contactData = new PhysicsContactData();
|
||||
_contactData->count = cpArbiterGetCount(arb);
|
||||
for (int i=0; i<_contactData->count; ++i)
|
||||
for (int i=0; i<_contactData->count && i<PhysicsContactData::POINT_MAX; ++i)
|
||||
{
|
||||
_contactData->points[i] = PhysicsHelper::cpv2point(cpArbiterGetPoint(arb, i));
|
||||
}
|
||||
|
|
|
@ -44,7 +44,8 @@ typedef Point Vect;
|
|||
|
||||
typedef struct PhysicsContactData
|
||||
{
|
||||
Point points[PHYSICS_CONTACT_POINT_MAX];
|
||||
static const long POINT_MAX = 4;
|
||||
Point points[POINT_MAX];
|
||||
int count;
|
||||
Point normal;
|
||||
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
set(COCOS_PHYSICS_SRC
|
||||
${CMAKE_SOURCE_DIR}/cocos/physics/box2d/CCPhysicsContactInfo_box2d.cpp
|
||||
${CMAKE_SOURCE_DIR}/cocos/physics/box2d/CCPhysicsJointInfo_box2d.cpp
|
||||
${CMAKE_SOURCE_DIR}/cocos/physics/box2d/CCPhysicsShapeInfo_box2d.cpp
|
||||
${CMAKE_SOURCE_DIR}/cocos/physics/box2d/CCPhysicsBodyInfo_box2d.cpp
|
||||
${CMAKE_SOURCE_DIR}/cocos/physics/box2d/CCPhysicsWorldInfo_box2d.cpp
|
||||
${CMAKE_SOURCE_DIR}/cocos/physics/chipmunk/CCPhysicsContactInfo_chipmunk.cpp
|
||||
${CMAKE_SOURCE_DIR}/cocos/physics/chipmunk/CCPhysicsJointInfo_chipmunk.cpp
|
||||
${CMAKE_SOURCE_DIR}/cocos/physics/chipmunk/CCPhysicsShapeInfo_chipmunk.cpp
|
||||
|
|
Loading…
Reference in New Issue