Merge pull request #4428 from boyu0/iss2771_move_CC_USE_PHYSICS_to_header

issue #2771: move CC_USE_PHYSICS from project definition to ccConfig.h
This commit is contained in:
James Chen 2013-12-04 19:55:10 -08:00
commit 14ab7ccd16
21 changed files with 28 additions and 12 deletions

View File

@ -1 +1 @@
4367613b05de13587c6cd0fb07aeef45f44afcfc
70579540615cf1d2f1ed86cc4789e1424144c616

View File

@ -1 +1 @@
edf83dc058b5630510ac8d327ae8db62ab062cc6
d9ca56584f41cdc53df610c01b375de066b4844b

View File

@ -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__

View File

@ -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>
@ -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>

View File

@ -25,6 +25,7 @@
#ifndef __CCPHYSICS_BODY_H__
#define __CCPHYSICS_BODY_H__
#include "ccConfig.h"
#ifdef CC_USE_PHYSICS
#include "CCObject.h"

View File

@ -25,6 +25,7 @@
#ifndef __CCPHYSICS_CONTACT_H__
#define __CCPHYSICS_CONTACT_H__
#include "ccConfig.h"
#ifdef CC_USE_PHYSICS
#include "CCObject.h"

View File

@ -25,6 +25,7 @@
#ifndef __CCPHYSICS_JOINT_H__
#define __CCPHYSICS_JOINT_H__
#include "ccConfig.h"
#ifdef CC_USE_PHYSICS
#include "CCObject.h"

View File

@ -25,6 +25,7 @@
#ifndef __CCPHYSICS_SHAPE_H__
#define __CCPHYSICS_SHAPE_H__
#include "ccConfig.h"
#ifdef CC_USE_PHYSICS
#include "CCObject.h"

View File

@ -25,6 +25,7 @@
#ifndef __CCPHYSICS_WORLD_H__
#define __CCPHYSICS_WORLD_H__
#include "ccConfig.h"
#ifdef CC_USE_PHYSICS
#include <list>

View File

@ -22,8 +22,8 @@
THE SOFTWARE.
****************************************************************************/
#ifdef CC_USE_PHYSICS
#include "CCPhysicsBodyInfo_chipmunk.h"
#ifdef CC_USE_PHYSICS
NS_CC_BEGIN
PhysicsBodyInfo::PhysicsBodyInfo()

View File

@ -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"

View File

@ -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)

View File

@ -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"

View File

@ -25,6 +25,7 @@
#ifndef __CCPHYSICS_HELPER_CHIPMUNK_H__
#define __CCPHYSICS_HELPER_CHIPMUNK_H__
#include "ccConfig.h"
#ifdef CC_USE_PHYSICS
#include "chipmunk.h"

View File

@ -22,8 +22,8 @@
THE SOFTWARE.
****************************************************************************/
#ifdef CC_USE_PHYSICS
#include "CCPhysicsJointInfo_chipmunk.h"
#ifdef CC_USE_PHYSICS
#include <algorithm>
#include <unordered_map>

View File

@ -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"

View File

@ -22,8 +22,8 @@
THE SOFTWARE.
****************************************************************************/
#ifdef CC_USE_PHYSICS
#include "CCPhysicsShapeInfo_chipmunk.h"
#ifdef CC_USE_PHYSICS
#include <algorithm>
#include <unordered_map>

View File

@ -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>

View File

@ -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"

View File

@ -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>

View File

@ -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>
@ -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>