mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 03:20:18 +00:00
fix box2d
This commit is contained in:
parent
cdc2d23b2c
commit
e6b89a1206
2
.github/workflows/main.yml
vendored
2
.github/workflows/main.yml
vendored
@ -52,7 +52,7 @@ jobs:
|
|||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
cmake ..
|
cmake ..
|
||||||
cmake --build . --config Release
|
cmake --build . --config Release -DPK_USE_BOX2D=ON
|
||||||
cp main ../output/linux/x86_64
|
cp main ../output/linux/x86_64
|
||||||
cp libpocketpy.so ../output/linux/x86_64
|
cp libpocketpy.so ../output/linux/x86_64
|
||||||
cp main ../
|
cp main ../
|
||||||
|
@ -79,9 +79,9 @@ struct PyBody{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PyBody& _() { return *this; }
|
PyBody* _() { return this; }
|
||||||
b2Body& _b2Body() { return *body; }
|
b2Body* _b2Body() { return body; }
|
||||||
b2Fixture& _b2Fixture() { return *fixture; }
|
b2Fixture* _b2Fixture() { return fixture; }
|
||||||
|
|
||||||
static void _register(VM* vm, PyObject* mod, PyObject* type);
|
static void _register(VM* vm, PyObject* mod, PyObject* type);
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
#include "box2d_bindings.hpp"
|
#include "box2dw.hpp"
|
||||||
|
|
||||||
namespace pkpy{
|
namespace pkpy{
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include "box2d_bindings.hpp"
|
#include "box2dw.hpp"
|
||||||
|
|
||||||
namespace pkpy{
|
namespace pkpy{
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include "box2d_bindings.hpp"
|
#include "box2dw.hpp"
|
||||||
|
|
||||||
namespace pkpy{
|
namespace pkpy{
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ def remove_copied_include(text):
|
|||||||
key = m.group(1)
|
key = m.group(1)
|
||||||
if key.startswith("pocketpy/"):
|
if key.startswith("pocketpy/"):
|
||||||
key = key[9:]
|
key = key[9:]
|
||||||
if key in ["user_config.h", "box2d_bindings.hpp"]:
|
if key in ["user_config.h", "box2dw.hpp"]:
|
||||||
return m.group(0)
|
return m.group(0)
|
||||||
if key == "opcodes.h":
|
if key == "opcodes.h":
|
||||||
return OPCODES_TEXT
|
return OPCODES_TEXT
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#include "pocketpy/pocketpy.h"
|
#include "pocketpy/pocketpy.h"
|
||||||
|
|
||||||
#ifdef PK_USE_BOX2D
|
#ifdef PK_USE_BOX2D
|
||||||
#include "box2d_bindings.hpp"
|
#include "box2dw.hpp"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace pkpy{
|
namespace pkpy{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user