Skip to content

Commit 4716ced

Browse files
committed
feat: Add patch for java gen changes
1 parent 5cc52a5 commit 4716ced

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed

java_binding_gen_patches.patch

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
diff --git a/src/main/java/com/badlogic/gdx/box2d/Box2d.java b/src/main/java/com/badlogic/gdx/box2d/Box2d.java
2+
--- a/src/main/java/com/badlogic/gdx/box2d/Box2d.java (date 1737370055253)
3+
+++ b/src/main/java/com/badlogic/gdx/box2d/Box2d.java (revision 5cc52a55c8a151d2f30f995f2dc59643fbc04057)
4+
@@ -1,5 +1,6 @@
5+
package com.badlogic.gdx.box2d;
6+
7+
+import com.badlogic.gdx.jnigen.loader.SharedLibraryLoader;
8+
import com.badlogic.gdx.jnigen.runtime.c.CXXException;
9+
import com.badlogic.gdx.jnigen.runtime.closure.ClosureObject;
10+
import com.badlogic.gdx.jnigen.runtime.CHandler;
11+
@@ -82,12 +83,19 @@
12+
import com.badlogic.gdx.box2d.Box2d_Internal.b2FreeFcn_Internal;
13+
import com.badlogic.gdx.box2d.Box2d_Internal.b2FinishTaskCallback_Internal;
14+
15+
+@SuppressWarnings("unused")
16+
public final class Box2d {
17+
18+
static {
19+
+ new SharedLibraryLoader().load("gdx-box2d");
20+
CHandler.init();
21+
FFITypes.init();
22+
init(IllegalArgumentException.class, CXXException.class);
23+
+
24+
+ // Yes, this technically leaks, but this is expected to live for the entire program lifetime
25+
+ b2SetAssertFcn(ClosureObject.fromClosure((condition, fileName, lineNumber) -> {
26+
+ throw new Box2dAssertionError("BOX2D ASSERTION: " + condition.getString() + ", " + fileName.getString() + ", line " + lineNumber);
27+
+ }));
28+
}
29+
30+
public static void initialize() {
31+
@@ -4733,20 +4741,6 @@
32+
return 0;
33+
*/
34+
35+
- /**
36+
- * Get the allowed clip fraction.
37+
- */
38+
- public static float b2Shape_GetAllowedClipFraction(b2ShapeId shapeId) {
39+
- return b2Shape_GetAllowedClipFraction_internal(shapeId.getPointer());
40+
- }
41+
-
42+
- static private native float b2Shape_GetAllowedClipFraction_internal(long shapeId);/*
43+
- HANDLE_JAVA_EXCEPTION_START()
44+
- return (jfloat)b2Shape_GetAllowedClipFraction(*(b2ShapeId*)shapeId);
45+
- HANDLE_JAVA_EXCEPTION_END()
46+
- return 0;
47+
- */
48+
-
49+
/**
50+
* Get the shape filter
51+
*/
52+
@@ -7122,7 +7116,7 @@
53+
/**
54+
* Prototype callback for overlap queries.
55+
* Called for each shape found in the query.
56+
- * @see b2World_OverlapABB
57+
+ * @see Box2d#b2World_OverlapAABB
58+
* @return false to terminate the query.
59+
* @ingroup world
60+
*/

0 commit comments

Comments
 (0)