From 0100c05a933f9b0280ebb2a54f8ece45acb1a108 Mon Sep 17 00:00:00 2001 From: boyu0 Date: Tue, 26 Nov 2013 17:29:09 +0800 Subject: [PATCH] issue #2771: fix compile errors --- cocos/2d/ccConfig.h | 5 ----- cocos/physics/CCPhysicsBody.h | 3 ++- cocos/physics/CCPhysicsContact.h | 1 + cocos/physics/CCPhysicsWorld.h | 2 ++ cocos/physics/chipmunk/CCPhysicsWorldInfo_chipmunk.h | 2 +- 5 files changed, 6 insertions(+), 7 deletions(-) diff --git a/cocos/2d/ccConfig.h b/cocos/2d/ccConfig.h index 5cf5af7bdc..b8729d0d28 100644 --- a/cocos/2d/ccConfig.h +++ b/cocos/2d/ccConfig.h @@ -268,11 +268,6 @@ To enable set it to a value different than 0. Disabled by default. #ifdef CC_USE_PHYSICS #define PHYSICS_CONTACT_POINT_MAX 4 -namespace cocos2d -{ - class Point; - typedef Point Vect; -} #endif #endif // __CCCONFIG_H__ diff --git a/cocos/physics/CCPhysicsBody.h b/cocos/physics/CCPhysicsBody.h index 731af4bbd0..ebff4c777f 100644 --- a/cocos/physics/CCPhysicsBody.h +++ b/cocos/physics/CCPhysicsBody.h @@ -40,9 +40,10 @@ NS_CC_BEGIN class Sprite; class PhysicsWorld; class PhysicsJoint; - class PhysicsBodyInfo; +typedef Point Vect; + const PhysicsMaterial PHYSICSBODY_MATERIAL_DEFAULT(0.1f, 0.5f, 0.5f); diff --git a/cocos/physics/CCPhysicsContact.h b/cocos/physics/CCPhysicsContact.h index 40d9081653..d9655754f0 100644 --- a/cocos/physics/CCPhysicsContact.h +++ b/cocos/physics/CCPhysicsContact.h @@ -40,6 +40,7 @@ class PhysicsWorld; class PhysicsContactInfo; +typedef Point Vect; typedef struct PhysicsContactData { diff --git a/cocos/physics/CCPhysicsWorld.h b/cocos/physics/CCPhysicsWorld.h index 71f977c5f4..2b9f34d140 100644 --- a/cocos/physics/CCPhysicsWorld.h +++ b/cocos/physics/CCPhysicsWorld.h @@ -42,6 +42,8 @@ class PhysicsShape; class PhysicsContact; class Array; +typedef Point Vect; + class Sprite; class Scene; class DrawNode; diff --git a/cocos/physics/chipmunk/CCPhysicsWorldInfo_chipmunk.h b/cocos/physics/chipmunk/CCPhysicsWorldInfo_chipmunk.h index 85f45c1732..7eda879ec9 100644 --- a/cocos/physics/chipmunk/CCPhysicsWorldInfo_chipmunk.h +++ b/cocos/physics/chipmunk/CCPhysicsWorldInfo_chipmunk.h @@ -32,7 +32,7 @@ #include "CCPlatformMacros.h" #include "CCGeometry.h" NS_CC_BEGIN -class Vect; +typedef Point Vect; class PhysicsBodyInfo; class PhysicsJointInfo; class PhysicsShapeInfo;