Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions build/cocos2d_libs.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2994,7 +2994,7 @@
B375104F1823AC7B00B3BA6A /* CCPhysicsWorldInfo_chipmunk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCPhysicsWorldInfo_chipmunk.h; sourceTree = "<group>"; };
B3AF019E1842FBA400A98B85 /* b2MotorJoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2MotorJoint.cpp; sourceTree = "<group>"; };
B3AF019F1842FBA400A98B85 /* b2MotorJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2MotorJoint.h; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
1551A33C158F2AB200E66CFE /* Frameworks */ = {
Expand Down Expand Up @@ -7629,7 +7629,6 @@
"COCOS2D_DEBUG=1",
USE_FILE32API,
"CC_ENABLE_CHIPMUNK_INTEGRATION=1",
CC_USE_PHYSICS,
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES;
Expand Down Expand Up @@ -7665,7 +7664,6 @@
"CC_ENABLE_CHIPMUNK_INTEGRATION=1",
NDEBUG,
USE_FILE32API,
CC_USE_PHYSICS,
);
GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES;
GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS = YES;
Expand Down
2 changes: 0 additions & 2 deletions build/cocos2d_samples.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -8895,7 +8895,6 @@
"COCOS2D_DEBUG=1",
USE_FILE32API,
"CC_ENABLE_CHIPMUNK_INTEGRATION=1",
CC_USE_PHYSICS,
);
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES;
Expand All @@ -8921,7 +8920,6 @@
NDEBUG,
USE_FILE32API,
"CC_ENABLE_CHIPMUNK_INTEGRATION=1",
CC_USE_PHYSICS,
);
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES;
Expand Down
5 changes: 5 additions & 0 deletions cocos/2d/ccConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -266,4 +266,9 @@ To enable set it to a value different than 0. Disabled by default.
#define CC_LUA_ENGINE_DEBUG 0
#endif

/** Use physics integration API */
#ifndef CC_USE_PHYSICS
#define CC_USE_PHYSICS
#endif

#endif // __CCCONFIG_H__
4 changes: 2 additions & 2 deletions cocos/2d/cocos2d.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;$(EngineRoot)external\sqlite3\include;$(EngineRoot)external\unzip;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\png\include\win32;$(EngineRoot)external\jpeg\include\win32;$(EngineRoot)external\tiff\include\win32;$(EngineRoot)external\webp\include\win32;$(EngineRoot)external\freetype2\include\win32;$(EngineRoot)external\win32-specific\icon\include;$(EngineRoot)external\win32-specific\zlib\include;$(EngineRoot)external\chipmunk\include\chipmunk;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;CC_USE_PHYSICS;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
Expand Down Expand Up @@ -121,7 +121,7 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\gles\prebuilt\*.*" "$(Ou
</PreBuildEvent>
<ClCompile>
<AdditionalIncludeDirectories>$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;$(EngineRoot)external\sqlite3\include;$(EngineRoot)external\unzip;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\png\include\win32;$(EngineRoot)external\jpeg\include\win32;$(EngineRoot)external\tiff\include\win32;$(EngineRoot)external\webp\include\win32;$(EngineRoot)external\freetype2\include\win32;$(EngineRoot)external\win32-specific\icon\include;$(EngineRoot)external\win32-specific\zlib\include;$(EngineRoot)external\chipmunk\include\chipmunk;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;CC_USE_PHYSICS;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
Expand Down
1 change: 1 addition & 0 deletions cocos/physics/CCPhysicsBody.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#ifndef __CCPHYSICS_BODY_H__
#define __CCPHYSICS_BODY_H__

#include "ccConfig.h"
#ifdef CC_USE_PHYSICS

#include "CCObject.h"
Expand Down
1 change: 1 addition & 0 deletions cocos/physics/CCPhysicsContact.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#ifndef __CCPHYSICS_CONTACT_H__
#define __CCPHYSICS_CONTACT_H__

#include "ccConfig.h"
#ifdef CC_USE_PHYSICS

#include "CCObject.h"
Expand Down
1 change: 1 addition & 0 deletions cocos/physics/CCPhysicsJoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#ifndef __CCPHYSICS_JOINT_H__
#define __CCPHYSICS_JOINT_H__

#include "ccConfig.h"
#ifdef CC_USE_PHYSICS

#include "CCObject.h"
Expand Down
1 change: 1 addition & 0 deletions cocos/physics/CCPhysicsShape.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#ifndef __CCPHYSICS_SHAPE_H__
#define __CCPHYSICS_SHAPE_H__

#include "ccConfig.h"
#ifdef CC_USE_PHYSICS

#include "CCObject.h"
Expand Down
1 change: 1 addition & 0 deletions cocos/physics/CCPhysicsWorld.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#ifndef __CCPHYSICS_WORLD_H__
#define __CCPHYSICS_WORLD_H__

#include "ccConfig.h"
#ifdef CC_USE_PHYSICS

#include <list>
Expand Down
2 changes: 1 addition & 1 deletion cocos/physics/chipmunk/CCPhysicsBodyInfo_chipmunk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
THE SOFTWARE.
****************************************************************************/

#ifdef CC_USE_PHYSICS
#include "CCPhysicsBodyInfo_chipmunk.h"
#ifdef CC_USE_PHYSICS
NS_CC_BEGIN

PhysicsBodyInfo::PhysicsBodyInfo()
Expand Down
1 change: 1 addition & 0 deletions cocos/physics/chipmunk/CCPhysicsBodyInfo_chipmunk.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#ifndef __CCPHYSICS_BODY_INFO_CHIPMUNK_H__
#define __CCPHYSICS_BODY_INFO_CHIPMUNK_H__

#include "ccConfig.h"
#ifdef CC_USE_PHYSICS

#include "chipmunk.h"
Expand Down
2 changes: 1 addition & 1 deletion cocos/physics/chipmunk/CCPhysicsContactInfo_chipmunk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
THE SOFTWARE.
****************************************************************************/

#ifdef CC_USE_PHYSICS
#include "CCPhysicsContactInfo_chipmunk.h"
#ifdef CC_USE_PHYSICS
NS_CC_BEGIN

PhysicsContactInfo::PhysicsContactInfo(PhysicsContact* contact)
Expand Down
1 change: 1 addition & 0 deletions cocos/physics/chipmunk/CCPhysicsContactInfo_chipmunk.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#ifndef __CCPHYSICS_CONTACT_INFO_CHIPMUNK_H__
#define __CCPHYSICS_CONTACT_INFO_CHIPMUNK_H__

#include "ccConfig.h"
#ifdef CC_USE_PHYSICS

#include "chipmunk.h"
Expand Down
1 change: 1 addition & 0 deletions cocos/physics/chipmunk/CCPhysicsHelper_chipmunk.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#ifndef __CCPHYSICS_HELPER_CHIPMUNK_H__
#define __CCPHYSICS_HELPER_CHIPMUNK_H__

#include "ccConfig.h"
#ifdef CC_USE_PHYSICS

#include "chipmunk.h"
Expand Down
2 changes: 1 addition & 1 deletion cocos/physics/chipmunk/CCPhysicsJointInfo_chipmunk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
THE SOFTWARE.
****************************************************************************/

#ifdef CC_USE_PHYSICS
#include "CCPhysicsJointInfo_chipmunk.h"
#ifdef CC_USE_PHYSICS
#include <algorithm>
#include <unordered_map>

Expand Down
1 change: 1 addition & 0 deletions cocos/physics/chipmunk/CCPhysicsJointInfo_chipmunk.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#ifndef __CCPHYSICS_JOINT_INFO_CHIPMUNK_H__
#define __CCPHYSICS_JOINT_INFO_CHIPMUNK_H__

#include "ccConfig.h"
#ifdef CC_USE_PHYSICS

#include "chipmunk.h"
Expand Down
2 changes: 1 addition & 1 deletion cocos/physics/chipmunk/CCPhysicsShapeInfo_chipmunk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
THE SOFTWARE.
****************************************************************************/

#ifdef CC_USE_PHYSICS
#include "CCPhysicsShapeInfo_chipmunk.h"
#ifdef CC_USE_PHYSICS
#include <algorithm>
#include <unordered_map>

Expand Down
3 changes: 2 additions & 1 deletion cocos/physics/chipmunk/CCPhysicsShapeInfo_chipmunk.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
#ifndef __CCPHYSICS_SHAPE_INFO_CHIPMUNK_H__
#define __CCPHYSICS_SHAPE_INFO_CHIPMUNK_H__

#if CC_USE_PHYSICS
#include "ccConfig.h"
#ifdef CC_USE_PHYSICS

#include <vector>
#include <unordered_map>
Expand Down
2 changes: 1 addition & 1 deletion cocos/physics/chipmunk/CCPhysicsWorldInfo_chipmunk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
THE SOFTWARE.
****************************************************************************/

#ifdef CC_USE_PHYSICS
#include "CCPhysicsWorldInfo_chipmunk.h"
#ifdef CC_USE_PHYSICS
#include "CCPhysicsHelper_chipmunk.h"
#include "CCPhysicsBodyInfo_chipmunk.h"
#include "CCPhysicsShapeInfo_chipmunk.h"
Expand Down
1 change: 1 addition & 0 deletions cocos/physics/chipmunk/CCPhysicsWorldInfo_chipmunk.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#ifndef __CCPHYSICS_WORLD_INFO_CHIPMUNK_H__
#define __CCPHYSICS_WORLD_INFO_CHIPMUNK_H__

#include "ccConfig.h"
#ifdef CC_USE_PHYSICS

#include <vector>
Expand Down
4 changes: 2 additions & 2 deletions samples/Cpp/TestCpp/proj.win32/TestCpp.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\Classes;$(EngineRoot);$(EngineRoot)cocos;$(EngineRoot)cocos\editor-support;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\network;$(EngineRoot)external;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)external\curl\include\win32;$(EngineRoot)external\websockets\win32\include;$(EngineRoot)extensions;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USE_MATH_DEFINES;GL_GLEXT_PROTOTYPES;CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_USE_PHYSICS;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USE_MATH_DEFINES;GL_GLEXT_PROTOTYPES;CC_ENABLE_CHIPMUNK_INTEGRATION=1;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeader>
Expand Down Expand Up @@ -103,7 +103,7 @@ xcopy /Y /Q "$(ProjectDir)..\..\..\..\external\websockets\prebuilt\win32\*.*" "$
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories>..\Classes;$(EngineRoot);$(EngineRoot)cocos;$(EngineRoot)cocos\editor-support;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\network;$(EngineRoot)external;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)external\curl\include\win32;$(EngineRoot)external\websockets\win32\include;$(EngineRoot)extensions;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USE_MATH_DEFINES;GL_GLEXT_PROTOTYPES;CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_USE_PHYSICS;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USE_MATH_DEFINES;GL_GLEXT_PROTOTYPES;CC_ENABLE_CHIPMUNK_INTEGRATION=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader>
Expand Down