issue #2771: move include chipmunk and box2d to cpp

This commit is contained in:
boyu0 2013-09-17 17:39:08 +08:00
parent b5b6406976
commit a454e373c7
15 changed files with 48 additions and 12 deletions

View File

@ -26,6 +26,12 @@
#include <algorithm>
#if (CC_PHYSICS_ENGINE == CC_PHYSICS_CHIPMUNK)
#include "chipmunk.h"
#elif (CC_PHYSICS_ENGINE == CCPHYSICS_BOX2D)
#include "Box2D.h"
#endif
#include "CCPhysicsShape.h"
#include "CCPhysicsJoint.h"
#include "CCPhysicsWorld.h"

View File

@ -23,6 +23,13 @@
****************************************************************************/
#include "CCPhysicsContact.h"
#ifdef CC_USE_PHYSICS
#if (CC_PHYSICS_ENGINE == CC_PHYSICS_CHIPMUNK)
#include "chipmunk.h"
#elif (CC_PHYSICS_ENGINE == CCPHYSICS_BOX2D)
#include "Box2D.h"
#endif
#include "chipmunk/CCPhysicsContactInfo.h"
#include "Box2D/CCPhysicsContactInfo.h"

View File

@ -24,6 +24,13 @@
#include "CCPhysicsJoint.h"
#ifdef CC_USE_PHYSICS
#if (CC_PHYSICS_ENGINE == CC_PHYSICS_CHIPMUNK)
#include "chipmunk.h"
#elif (CC_PHYSICS_ENGINE == CCPHYSICS_BOX2D)
#include "Box2D.h"
#endif
#include "CCPhysicsBody.h"
#include "chipmunk/CCPhysicsJointInfo.h"

View File

@ -43,10 +43,4 @@
#define CC_USE_PHYSICS
#endif
#if (CC_PHYSICS_ENGINE == CC_PHYSICS_BOX2D)
#include "Box2D.h"
#elif (CC_PHYSICS_ENGINE == CC_PHYSICS_CHIPMUNK)
#include "chipmunk.h"
#endif
#endif // __CCPHYSICS_SETTING_H__

View File

@ -25,6 +25,12 @@
#include "CCPhysicsShape.h"
#ifdef CC_USE_PHYSICS
#if (CC_PHYSICS_ENGINE == CC_PHYSICS_CHIPMUNK)
#include "chipmunk.h"
#elif (CC_PHYSICS_ENGINE == CCPHYSICS_BOX2D)
#include "Box2D.h"
#endif
#include "CCPhysicsBody.h"
#include "chipmunk/CCPhysicsBodyInfo.h"

View File

@ -25,6 +25,12 @@
#include "CCPhysicsWorld.h"
#ifdef CC_USE_PHYSICS
#if (CC_PHYSICS_ENGINE == CC_PHYSICS_CHIPMUNK)
#include "chipmunk.h"
#elif (CC_PHYSICS_ENGINE == CCPHYSICS_BOX2D)
#include "Box2D.h"
#endif
#include "CCPhysicsBody.h"
#include "CCPhysicsShape.h"
#include "CCPhysicsContact.h"

View File

@ -31,6 +31,12 @@
#include "cocoa/CCObject.h"
#include "cocoa/CCGeometry.h"
#if (CC_PHYSICS_ENGINE == CC_PHYSICS_CHIPMUNK)
typedef struct cpArbiter cpArbiter;
typedef struct cpSpace cpSpace;
#endif
NS_CC_BEGIN
class PhysicsBody;

View File

@ -27,6 +27,7 @@
#ifndef __CCPHYSICS_BODY_INFO_H__
#define __CCPHYSICS_BODY_INFO_H__
#include "chipmunk.h"
#include "platform/CCPlatformMacros.h"
#include "cocoa/CCObject.h"

View File

@ -27,6 +27,7 @@
#ifndef __CCPHYSICS_CONTACT_INFO_H__
#define __CCPHYSICS_CONTACT_INFO_H__
#include "chipmunk.h"
#include "platform/CCPlatformMacros.h"
NS_CC_BEGIN

View File

@ -28,6 +28,7 @@
#ifndef __CCPHYSICS_HELPER_H__
#define __CCPHYSICS_HELPER_H__
#include "chipmunk.h"
#include "platform/CCPlatformMacros.h"
#include "cocoa/CCGeometry.h"

View File

@ -27,9 +27,8 @@
#ifndef __CCPHYSICS_JOINT_INFO_H__
#define __CCPHYSICS_JOINT_INFO_H__
#include "chipmunk.h"
#include "platform/CCPlatformMacros.h"
NS_CC_BEGIN
class PhysicsJointInfo

View File

@ -27,10 +27,11 @@
#ifndef __CCPHYSICS_SHAPE_INFO_H__
#define __CCPHYSICS_SHAPE_INFO_H__
#include <vector>
#include "platform/CCPlatformMacros.h"
#include <vector>
#include <map>
#include "chipmunk.h"
#include "platform/CCPlatformMacros.h"
NS_CC_BEGIN

View File

@ -27,6 +27,7 @@
#ifndef __CCPHYSICS_WORLD_INFO_H__
#define __CCPHYSICS_WORLD_INFO_H__
#include "chipmunk.h"
#include "platform/CCPlatformMacros.h"
NS_CC_BEGIN

View File

@ -13,7 +13,7 @@ android_flags = -D_SIZE_T_DEFINED_
clang_headers = -I%(clangllvmdir)s/lib/clang/3.3/include
clang_flags = -nostdinc -x c++ -std=c++11
cocos_headers = -I%(cocosdir)s/cocos2dx/include -I%(cocosdir)s/cocos2dx/platform -I%(cocosdir)s/cocos2dx/platform/android -I%(cocosdir)s/cocos2dx -I%(cocosdir)s/cocos2dx/kazmath/include -I%(cocosdir)s/external/chipmunk/include/chipmunk
cocos_headers = -I%(cocosdir)s/cocos2dx/include -I%(cocosdir)s/cocos2dx/platform -I%(cocosdir)s/cocos2dx/platform/android -I%(cocosdir)s/cocos2dx -I%(cocosdir)s/cocos2dx/kazmath/include
cocos_flags = -DANDROID -DCOCOS2D_JAVASCRIPT
cxxgenerator_headers = -I%(cxxgeneratordir)s/targets/spidermonkey/common

View File

@ -13,7 +13,7 @@ android_flags = -D_SIZE_T_DEFINED_
clang_headers = -I%(clangllvmdir)s/lib/clang/3.3/include
clang_flags = -nostdinc -x c++ -std=c++11
cocos_headers = -I%(cocosdir)s/cocos2dx/include -I%(cocosdir)s/cocos2dx/platform -I%(cocosdir)s/cocos2dx/platform/android -I%(cocosdir)s/cocos2dx -I%(cocosdir)s/cocos2dx/kazmath/include -I%(cocosdir)s/extensions -I%(cocosdir)s/external/chipmunk/include/chipmunk
cocos_headers = -I%(cocosdir)s/cocos2dx/include -I%(cocosdir)s/cocos2dx/platform -I%(cocosdir)s/cocos2dx/platform/android -I%(cocosdir)s/cocos2dx -I%(cocosdir)s/cocos2dx/kazmath/include -I%(cocosdir)s/extensions
cocos_flags = -DANDROID -DCOCOS2D_JAVASCRIPT
cxxgenerator_headers = -I%(cxxgeneratordir)s/targets/spidermonkey/common