Skip to content

Commit

Permalink
fixed linux build
Browse files Browse the repository at this point in the history
  • Loading branch information
d954mas committed Jan 9, 2023
1 parent 4d441e7 commit 5f6c122
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/bob.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ on:
push:
pull_request_target:
schedule:
# nightly at 04:00 on the 1st and 15th
- cron: 0 4 1,15 * *
# nightly at 05:00 on the 1st and 15th
- cron: 0 5 1,15 * *

env:
VERSION_FILENAME: 'info.json'
Expand Down Expand Up @@ -48,7 +48,7 @@ jobs:
build_with_bob_macos:
strategy:
matrix:
platform: [x86_64-darwin]
platform: [x86_64-macos]
runs-on: macOS-latest

name: Build
Expand Down
2 changes: 2 additions & 0 deletions reactphysics3d/include/objects/shape/box_shape_userdata.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
#define box_shape_h

#include <dmsdk/sdk.h>
#include "undefine_none.h"
#include "objects/base_userdata.h"
#include "reactphysics3d/reactphysics3d.h"
#include "static_hash.h"



using namespace reactphysics3d;

namespace rp3dDefold {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#define collision_shape_h

#include <dmsdk/sdk.h>
#include "undefine_none.h"
#include "objects/base_userdata.h"
#include "reactphysics3d/reactphysics3d.h"
#include "static_hash.h"
Expand Down
1 change: 1 addition & 0 deletions reactphysics3d/include/objects/world_userdata.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#define world_userdata_h

#include <dmsdk/sdk.h>
#include "undefine_none.h"
#include "objects/base_userdata.h"
#include "reactphysics3d/reactphysics3d.h"
#include "static_hash.h"
Expand Down
29 changes: 29 additions & 0 deletions reactphysics3d/include/undefine_none.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
//https://github.com/OneLoneCoder/olcPixelGameEngine/issues/195
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

// The header <X11/X.h> defines "None" as a macro that expands to "0L".
// This is terrible because many enumerations have an enumerator named "None".
// To work around this, we undefine the macro "None", and define a replacement
// macro named "X11None".
// Include this header after including X11 headers, where necessary.

#ifndef undefine_none
#define undefine_none

#if defined(DM_PLATFORM_LINUX)


#ifdef None
# undef None
# define X11None 0L
# ifdef RevertToNone
# undef RevertToNone
# define RevertToNone (int)X11None
# endif
#endif

#endif

#endif
3 changes: 3 additions & 0 deletions reactphysics3d/src/extension.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@
#define MODULE_NAME "rp3d"

#include <dmsdk/sdk.h>
#include "undefine_none.h"
#include "utils.h"
#include "objects/objects.h"
#include "reactphysics3d/reactphysics3d.h"
#include "objects/shape/collision_shape_userdata.h"



using namespace reactphysics3d;
using namespace rp3dDefold;

Expand Down
1 change: 0 additions & 1 deletion reactphysics3d/src/objects/shape/box_shape_userdata.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#ifndef world_h
#define world_h

#include <dmsdk/sdk.h>
#include "reactphysics3d/reactphysics3d.h"
#include "objects/shape/box_shape_userdata.h"
#include "objects/shape/collision_shape_userdata.h"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
#ifndef world_h
#define world_h

#include <dmsdk/sdk.h>
#include "objects/base_userdata.h"
#include "reactphysics3d/reactphysics3d.h"
#include "static_hash.h"

#include "objects/shape/box_shape_userdata.h"
#include "objects/shape/collision_shape_userdata.h"
#include "reactphysics3d/reactphysics3d.h"



Expand Down

0 comments on commit 5f6c122

Please sign in to comment.