fix box2d

This commit is contained in:
blueloveTH 2023-10-01 22:54:08 +08:00
parent cdc2d23b2c
commit e6b89a1206
7 changed files with 9 additions and 9 deletions

View File

@ -52,7 +52,7 @@ jobs:
mkdir build
cd build
cmake ..
cmake --build . --config Release
cmake --build . --config Release -DPK_USE_BOX2D=ON
cp main ../output/linux/x86_64
cp libpocketpy.so ../output/linux/x86_64
cp main ../

View File

@ -79,9 +79,9 @@ struct PyBody{
}
}
PyBody& _() { return *this; }
b2Body& _b2Body() { return *body; }
b2Fixture& _b2Fixture() { return *fixture; }
PyBody* _() { return this; }
b2Body* _b2Body() { return body; }
b2Fixture* _b2Fixture() { return fixture; }
static void _register(VM* vm, PyObject* mod, PyObject* type);

View File

@ -1,4 +1,4 @@
#include "box2d_bindings.hpp"
#include "box2dw.hpp"
namespace pkpy{

View File

@ -1,4 +1,4 @@
#include "box2d_bindings.hpp"
#include "box2dw.hpp"
namespace pkpy{

View File

@ -1,4 +1,4 @@
#include "box2d_bindings.hpp"
#include "box2dw.hpp"
namespace pkpy{

View File

@ -34,7 +34,7 @@ def remove_copied_include(text):
key = m.group(1)
if key.startswith("pocketpy/"):
key = key[9:]
if key in ["user_config.h", "box2d_bindings.hpp"]:
if key in ["user_config.h", "box2dw.hpp"]:
return m.group(0)
if key == "opcodes.h":
return OPCODES_TEXT

View File

@ -1,7 +1,7 @@
#include "pocketpy/pocketpy.h"
#ifdef PK_USE_BOX2D
#include "box2d_bindings.hpp"
#include "box2dw.hpp"
#endif
namespace pkpy{