mirror of https://github.com/axmolengine/axmol.git
issue #2771: move include chipmunk and box2d to cpp
This commit is contained in:
parent
b5b6406976
commit
a454e373c7
|
@ -26,6 +26,12 @@
|
||||||
|
|
||||||
#include <algorithm>
|
#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 "CCPhysicsShape.h"
|
||||||
#include "CCPhysicsJoint.h"
|
#include "CCPhysicsJoint.h"
|
||||||
#include "CCPhysicsWorld.h"
|
#include "CCPhysicsWorld.h"
|
||||||
|
|
|
@ -23,6 +23,13 @@
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
#include "CCPhysicsContact.h"
|
#include "CCPhysicsContact.h"
|
||||||
#ifdef CC_USE_PHYSICS
|
#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 "chipmunk/CCPhysicsContactInfo.h"
|
||||||
#include "Box2D/CCPhysicsContactInfo.h"
|
#include "Box2D/CCPhysicsContactInfo.h"
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,13 @@
|
||||||
|
|
||||||
#include "CCPhysicsJoint.h"
|
#include "CCPhysicsJoint.h"
|
||||||
#ifdef CC_USE_PHYSICS
|
#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 "CCPhysicsBody.h"
|
||||||
|
|
||||||
#include "chipmunk/CCPhysicsJointInfo.h"
|
#include "chipmunk/CCPhysicsJointInfo.h"
|
||||||
|
|
|
@ -43,10 +43,4 @@
|
||||||
#define CC_USE_PHYSICS
|
#define CC_USE_PHYSICS
|
||||||
#endif
|
#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__
|
#endif // __CCPHYSICS_SETTING_H__
|
||||||
|
|
|
@ -25,6 +25,12 @@
|
||||||
#include "CCPhysicsShape.h"
|
#include "CCPhysicsShape.h"
|
||||||
#ifdef CC_USE_PHYSICS
|
#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 "CCPhysicsBody.h"
|
||||||
|
|
||||||
#include "chipmunk/CCPhysicsBodyInfo.h"
|
#include "chipmunk/CCPhysicsBodyInfo.h"
|
||||||
|
|
|
@ -25,6 +25,12 @@
|
||||||
#include "CCPhysicsWorld.h"
|
#include "CCPhysicsWorld.h"
|
||||||
#ifdef CC_USE_PHYSICS
|
#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 "CCPhysicsBody.h"
|
||||||
#include "CCPhysicsShape.h"
|
#include "CCPhysicsShape.h"
|
||||||
#include "CCPhysicsContact.h"
|
#include "CCPhysicsContact.h"
|
||||||
|
|
|
@ -31,6 +31,12 @@
|
||||||
#include "cocoa/CCObject.h"
|
#include "cocoa/CCObject.h"
|
||||||
#include "cocoa/CCGeometry.h"
|
#include "cocoa/CCGeometry.h"
|
||||||
|
|
||||||
|
|
||||||
|
#if (CC_PHYSICS_ENGINE == CC_PHYSICS_CHIPMUNK)
|
||||||
|
typedef struct cpArbiter cpArbiter;
|
||||||
|
typedef struct cpSpace cpSpace;
|
||||||
|
#endif
|
||||||
|
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
||||||
|
|
||||||
class PhysicsBody;
|
class PhysicsBody;
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
|
|
||||||
#ifndef __CCPHYSICS_BODY_INFO_H__
|
#ifndef __CCPHYSICS_BODY_INFO_H__
|
||||||
#define __CCPHYSICS_BODY_INFO_H__
|
#define __CCPHYSICS_BODY_INFO_H__
|
||||||
|
#include "chipmunk.h"
|
||||||
#include "platform/CCPlatformMacros.h"
|
#include "platform/CCPlatformMacros.h"
|
||||||
#include "cocoa/CCObject.h"
|
#include "cocoa/CCObject.h"
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
|
|
||||||
#ifndef __CCPHYSICS_CONTACT_INFO_H__
|
#ifndef __CCPHYSICS_CONTACT_INFO_H__
|
||||||
#define __CCPHYSICS_CONTACT_INFO_H__
|
#define __CCPHYSICS_CONTACT_INFO_H__
|
||||||
|
#include "chipmunk.h"
|
||||||
#include "platform/CCPlatformMacros.h"
|
#include "platform/CCPlatformMacros.h"
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
#ifndef __CCPHYSICS_HELPER_H__
|
#ifndef __CCPHYSICS_HELPER_H__
|
||||||
#define __CCPHYSICS_HELPER_H__
|
#define __CCPHYSICS_HELPER_H__
|
||||||
|
|
||||||
|
#include "chipmunk.h"
|
||||||
#include "platform/CCPlatformMacros.h"
|
#include "platform/CCPlatformMacros.h"
|
||||||
#include "cocoa/CCGeometry.h"
|
#include "cocoa/CCGeometry.h"
|
||||||
|
|
||||||
|
|
|
@ -27,9 +27,8 @@
|
||||||
|
|
||||||
#ifndef __CCPHYSICS_JOINT_INFO_H__
|
#ifndef __CCPHYSICS_JOINT_INFO_H__
|
||||||
#define __CCPHYSICS_JOINT_INFO_H__
|
#define __CCPHYSICS_JOINT_INFO_H__
|
||||||
|
#include "chipmunk.h"
|
||||||
#include "platform/CCPlatformMacros.h"
|
#include "platform/CCPlatformMacros.h"
|
||||||
|
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
||||||
|
|
||||||
class PhysicsJointInfo
|
class PhysicsJointInfo
|
||||||
|
|
|
@ -27,10 +27,11 @@
|
||||||
|
|
||||||
#ifndef __CCPHYSICS_SHAPE_INFO_H__
|
#ifndef __CCPHYSICS_SHAPE_INFO_H__
|
||||||
#define __CCPHYSICS_SHAPE_INFO_H__
|
#define __CCPHYSICS_SHAPE_INFO_H__
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
#include "platform/CCPlatformMacros.h"
|
#include <vector>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
#include "chipmunk.h"
|
||||||
|
#include "platform/CCPlatformMacros.h"
|
||||||
|
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
|
|
||||||
#ifndef __CCPHYSICS_WORLD_INFO_H__
|
#ifndef __CCPHYSICS_WORLD_INFO_H__
|
||||||
#define __CCPHYSICS_WORLD_INFO_H__
|
#define __CCPHYSICS_WORLD_INFO_H__
|
||||||
|
#include "chipmunk.h"
|
||||||
#include "platform/CCPlatformMacros.h"
|
#include "platform/CCPlatformMacros.h"
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ android_flags = -D_SIZE_T_DEFINED_
|
||||||
clang_headers = -I%(clangllvmdir)s/lib/clang/3.3/include
|
clang_headers = -I%(clangllvmdir)s/lib/clang/3.3/include
|
||||||
clang_flags = -nostdinc -x c++ -std=c++11
|
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
|
cocos_flags = -DANDROID -DCOCOS2D_JAVASCRIPT
|
||||||
|
|
||||||
cxxgenerator_headers = -I%(cxxgeneratordir)s/targets/spidermonkey/common
|
cxxgenerator_headers = -I%(cxxgeneratordir)s/targets/spidermonkey/common
|
||||||
|
|
|
@ -13,7 +13,7 @@ android_flags = -D_SIZE_T_DEFINED_
|
||||||
clang_headers = -I%(clangllvmdir)s/lib/clang/3.3/include
|
clang_headers = -I%(clangllvmdir)s/lib/clang/3.3/include
|
||||||
clang_flags = -nostdinc -x c++ -std=c++11
|
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
|
cocos_flags = -DANDROID -DCOCOS2D_JAVASCRIPT
|
||||||
|
|
||||||
cxxgenerator_headers = -I%(cxxgeneratordir)s/targets/spidermonkey/common
|
cxxgenerator_headers = -I%(cxxgeneratordir)s/targets/spidermonkey/common
|
||||||
|
|
Loading…
Reference in New Issue