Skip to content

Commit

Permalink
Merge pull request #269 from eagleivg/xd_dev
Browse files Browse the repository at this point in the history
Latest Linux fixes
  • Loading branch information
Xottab-DUTY committed Nov 9, 2018
2 parents 5098bb9 + 1682b0b commit b4f778f
Show file tree
Hide file tree
Showing 257 changed files with 1,089 additions and 902 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
url = https://github.com/OpenXRay/luabind-deboostified.git
[submodule "Externals/GameSpy"]
path = Externals/GameSpy
url = https://github.com/nitrocaster/GameSpy.git
url = https://github.com/OpenXRay/GameSpy.git
[submodule "Externals/AGS_SDK"]
path = Externals/AGS_SDK
url = https://github.com/GPUOpen-LibrariesAndSDKs/AGS_SDK.git
Expand Down
13 changes: 6 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,17 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
endif()
endif()

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive --std=c++17 -Wno-attributes -pipe")
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive") This is for the future versions
#set(CMAKE_CXX_STANDARD 14) #Otherwise adds -std=gnu++11 and breaks successful building
#set(CMAKE_CXX_STANDARD_REQUIRED ON)
#set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive --std=c++17 -Wno-attributes -pipe -Wl,--no-undefined -fvisibility=hidden")

set(LUA_LIBRARIES luajit)

if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "" FORCE)
elseif(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
add_definitions(-DDEBUG)
endif()

if(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
add_definitions(-DDEBUG -DMIXED)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Og")
set(LUA_LIBRARIES luajit-debug)
endif()

Expand Down
1 change: 1 addition & 0 deletions Externals/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ include(luajit.cmake)
add_subdirectory(luabind)
xr_install_file(luabind)
add_subdirectory(cximage)
add_subdirectory(GameSpy)
#add_subdirectory(lzo)
#add_subdirectory(NVTT)
add_subdirectory(OPCODE)
Expand Down
2 changes: 1 addition & 1 deletion Externals/cximage/ximaenc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -996,7 +996,7 @@ bool CxImage::CheckFormat(CxFile * hFile, DWORD imagetype)
////////////////////////////////////////////////////////////////////////////////
bool CxImage::CheckFormat(BYTE * buffer, DWORD size, DWORD imagetype)
{
if (buffer==NULL || size==NULL){
if (buffer==NULL || size==0){
strcpy(info.szLastError,"invalid or empty buffer");
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion Externals/luabind
2 changes: 1 addition & 1 deletion Externals/ode/include/ode/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ typedef struct dJointFeedback {
* when the ODE step function updates the body state.
*/

void dGeomMoved (dGeomID);
ODE_API void dGeomMoved (dGeomID);
dGeomID dGeomGetBodyNext (dGeomID);


Expand Down
4 changes: 4 additions & 0 deletions Externals/ode/include/ode/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ extern "C" {
#elif !defined(ODE_LIB)
#define ODE_DLL_API __declspec(dllimport)
#endif
#else
#if defined(__GNUC__) && __GNUC__ >=4
#define ODE_API __attribute__ ((visibility("default")))
#endif
#endif

#if !defined(ODE_API)
Expand Down
10 changes: 5 additions & 5 deletions Externals/ode/include/ode/objects.h
Original file line number Diff line number Diff line change
Expand Up @@ -512,10 +512,10 @@ ODE_API dBodyID dBodyCreate (dWorldID);
*/
ODE_API void dBodyDestroy (dBodyID);

void dWorldAddBody (dWorldID,dBodyID); // X-Ray custom probably
void dWorldAddJoint (dWorldID,dJointID); // X-Ray custom probably
void dWorldRemoveBody (dWorldID,dBodyID); // X-Ray custom probably
void dWorldRemoveJoint (dWorldID,dJointID); // X-Ray custom probably
ODE_API void dWorldAddBody (dWorldID,dBodyID); // X-Ray custom probably
ODE_API void dWorldAddJoint (dWorldID,dJointID); // X-Ray custom probably
ODE_API void dWorldRemoveBody (dWorldID,dBodyID); // X-Ray custom probably
ODE_API void dWorldRemoveJoint (dWorldID,dJointID); // X-Ray custom probably

/**
* @brief Set the body's user-data pointer.
Expand Down Expand Up @@ -989,7 +989,7 @@ ODE_API dJointID dJointCreateSlider (dWorldID, dJointGroupID);
* If it is nonzero the joint is allocated in the given joint group.
*/
ODE_API dJointID dJointCreateContact (dWorldID, dJointGroupID, const dContact *);
dJointID dJointCreateContactSpecial (dWorldID, dJointGroupID, const dContact *); // XXX: GSC custom?
ODE_API dJointID dJointCreateContactSpecial (dWorldID, dJointGroupID, const dContact *); // XXX: GSC custom?

/**
* @brief Create a new joint of the hinge2 type.
Expand Down
4 changes: 2 additions & 2 deletions Externals/ode/ode/src/collision_std.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ int dCollideCapsulePlane (dxGeom *o1, dxGeom *o2, int flags,
#ifdef __cplusplus
extern "C" {
#endif
int dCollideRaySphere (dxGeom *o1, dxGeom *o2, int flags,
ODE_API int dCollideRaySphere (dxGeom *o1, dxGeom *o2, int flags,
dContactGeom *contact, int skip);
int dCollideRayBox (dxGeom *o1, dxGeom *o2, int flags,
ODE_API int dCollideRayBox (dxGeom *o1, dxGeom *o2, int flags,
dContactGeom *contact, int skip);
int dCollideRayCapsule (dxGeom *o1, dxGeom *o2,
int flags, dContactGeom *contact, int skip);
Expand Down
Loading

0 comments on commit b4f778f

Please sign in to comment.