Skip to content

Commit 6c6475a

Browse files
committed
xrPhysics: add to Linux build
1 parent fbf7987 commit 6c6475a

File tree

91 files changed

+182
-149
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+182
-149
lines changed

Externals/OPCODE/OPC_Preprocessor.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
#if defined(_WIN32) || defined(WIN32)
1717
#pragma message("Compiling on Windows...")
1818
#define PLATFORM_WINDOWS
19+
#elif defined(LINUX)
20+
#pragma message("Compiling on GNU/Linux...")
1921
#else
2022
#pragma message("Compiling on unknown platform...")
2123
#endif
@@ -24,6 +26,10 @@
2426
#if defined(_MSC_VER)
2527
#pragma message("Compiling with VC++...")
2628
#define COMPILER_VISUAL_CPP
29+
#elif defined(__MINGW32__)
30+
#pragma message("Compiling with MinGW...")
31+
#elif defined(__GNUC__)
32+
#pragma message("Compiling with G++...")
2733
#else
2834
#pragma message("Compiling with unknown compiler...")
2935
#endif

src/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ add_subdirectory(xrCore)
88
#add_subdirectory(xrGame)
99
#add_subdirectory(xrNetServer)
1010
#add_subdirectory(xrParticles)
11-
#add_subdirectory(xrPhysics)
11+
add_subdirectory(xrPhysics)
1212
add_subdirectory(xrScriptEngine)
1313
add_subdirectory(xrSound)

src/Include/xrRender/KinematicsAnimated.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
#include "xrCore/Animation/SkeletonMotions.hpp"
66
#include "animation_blend.h"
7-
#include "Layers/xrrender/KinematicAnimatedDefs.h"
7+
#include "Layers/xrRender/KinematicAnimatedDefs.h"
88
#include "Layers/xrRender/KinematicsAddBoneTransform.hpp" //--#SM+#--
99

1010
class IKinematics;

src/xrCore/xrMemory.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,14 @@ class XRCORE_API xrMemory
3434

3535
extern XRCORE_API xrMemory Memory;
3636

37+
#if defined(WINDOWS)
3738
#undef ZeroMemory
3839
#undef CopyMemory
3940
#undef FillMemory
4041
#define ZeroMemory(a, b) memset(a, 0, b)
4142
#define CopyMemory(a, b, c) memcpy(a, b, c)
4243
#define FillMemory(a, b, c) memset(a, c, b)
44+
#endif
4345

4446
/*
4547
Начиная со стандарта C++11 нет необходимости объявлять все формы операторов new и delete.

src/xrEngine/GameMtlLib.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class IWriter;
5656
#endif
5757

5858
#ifndef GM_NON_GAME
59-
#include "xrSound/Sound.h"
59+
#include "xrSound/sound.h"
6060
#include "Include/xrRender/WallMarkArray.h"
6161
#include "Include/xrRender/RenderFactory.h"
6262
typedef xr_vector<ref_sound> SoundVec;

src/xrPhysics/CMakeLists.txt

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
project(xrPhysics)
2+
3+
list(APPEND DIRS
4+
"."
5+
"tri-colliderKNoOPC"
6+
"dCylinder"
7+
)
8+
9+
add_dir("${DIRS}")
10+
11+
include_directories(
12+
${CMAKE_CURRENT_SOURCE_DIR}/..
13+
${CMAKE_CURRENT_SOURCE_DIR}/../../Externals/ode/include
14+
${CMAKE_CURRENT_SOURCE_DIR}/../../sdk/include
15+
)
16+
message( "src list " ${${PROJECT_NAME}__SOURCES})
17+
list(REMOVE_ITEM ${PROJECT_NAME}__SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/tri-colliderKNoOPC/dcTriListCollider.cpp")
18+
#list(REMOVE_ITEM ${PROJECT_NAME}__INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}/./xr_cda.h")
19+
20+
message( "src list after" ${${PROJECT_NAME}__SOURCES})
21+
add_definitions(-DXRPHYSICS_EXPORTS -DdSINGLE -D_SECURE_SCL=0)
22+
add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}__SOURCES} ${${PROJECT_NAME}__INCLUDES})
23+
24+
set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "")
25+
target_link_libraries(${PROJECT_NAME} xrCore ODE xrScriptEngine xrAPI xrCDB xrSound)

src/xrPhysics/CalculateTriangle.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#include "MathUtils.h"
33

44
#include "Geometry.h"
5-
#include "tri-colliderknoopc/dtricollidermath.h"
5+
#include "tri-colliderKNoOPC/dTriColliderMath.h"
66

77
#include "ode_redefine.h"
88
#include "xrCDB/xr_area.h"

src/xrPhysics/ElevatorState.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#ifndef ELEVATOR_STAETE
22
#define ELEVATOR_STAETE
33

4-
#include "ielevatorstate.h"
4+
#include "IElevatorState.h"
55
class CPHCharacter;
66
struct dContact;
77
struct SGameMtl;
@@ -19,7 +19,7 @@ class CElevatorState : public IElevatorState
1919
u32 time;
2020
};
2121

22-
static SEnertionState m_etable[CElevatorState::clbNoState][CElevatorState::clbNoState];
22+
static SEnertionState m_etable[::clbNoState][::clbNoState];
2323

2424
IClimableObject* m_ladder;
2525
CPHCharacter* m_character;

src/xrPhysics/ExtendedGeom.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include "stdafx.h"
2-
#include "extendedgeom.h"
3-
#include "dcylinder/dcylinder.h"
2+
#include "ExtendedGeom.h"
3+
#include "dCylinder/dCylinder.h"
44
bool IsCyliderContact(const dContact& c)
55
{
66
int geomClass = -1;

src/xrPhysics/ExtendedGeom.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#include <ode/common.h>
1010
#include <ode/collision.h>
11-
#include "physicscommon.h"
11+
#include "PhysicsCommon.h"
1212
#include "MathUtils.h"
1313
#ifdef DEBUG
1414
#include "debug_output.h"

0 commit comments

Comments
 (0)