Skip to content

Commit

Permalink
few improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
xpenatan committed Sep 4, 2024
1 parent 04e1c87 commit 7587bc4
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import static jolt.EMotionType.EMotionType_Static;
import static jolt.jolt.physics.EActivation.EActivation_Activate;

public class BasicExample extends ScreenAdapter {
public class GameScreen extends ScreenAdapter {

// Object layers
static int LAYER_NON_MOVING = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public void show() {
public void render(float delta) {
if(init) {
init = false;
game.setScreen(new BasicExample());
game.setScreen(new GameScreen());
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package jolt.example.samples.app;

public class SamplesApp {

public void startTest(Class<Test> testClass) {

}

public void nextTest() {

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package jolt.example.samples.app;

import jolt.DebugRendererEm;
import jolt.jolt.core.TempAllocator;
import jolt.jolt.physics.PhysicsSystem;
import jolt.jolt.physics.body.BodyInterface;

public abstract class Test {

PhysicsSystem mPhysicsSystem = null;
BodyInterface mBodyInterface = null;
DebugRendererEm mDebugRenderer = null;
TempAllocator mTempAllocator = null;

}
10 changes: 10 additions & 0 deletions jolt/jolt-build/src/main/cpp/jolt.idl
Original file line number Diff line number Diff line change
Expand Up @@ -3542,4 +3542,14 @@ interface JoltInterface {
ObjectVsBroadPhaseLayerFilter GetObjectVsBroadPhaseLayerFilter();
// static unsigned long long sGetTotalMemory();
// static unsigned long long sGetFreeMemory();
};

interface TempAllocatorImpl {
void TempAllocatorImpl(unsigned long inSize);

};

interface JobSystemThreadPool {
void JobSystemThreadPool(unsigned long inMaxJobs, unsigned long inMaxBarriers, optional long inNumThreads);

};
9 changes: 9 additions & 0 deletions jolt/jolt-build/src/main/java/Build.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import com.github.xpenatan.jparser.builder.tool.BuildToolListener;
import com.github.xpenatan.jparser.builder.tool.BuildToolOptions;
import com.github.xpenatan.jparser.builder.tool.BuilderTool;
import com.github.xpenatan.jparser.idl.IDLHelper;
import com.github.xpenatan.jparser.idl.IDLReader;
import java.util.ArrayList;

Expand All @@ -17,6 +18,14 @@ public static void main(String[] args) {
String modulePrefix = "jolt";
String basePackage = "jolt";
String sourceDir = "/build/jolt";

IDLHelper.cppConverter = idlType -> {
if(idlType.equals("unsigned long long")) {
return "uint64";
}
return null;
};

BuildToolOptions op = new BuildToolOptions(modulePrefix, libName, basePackage, sourceDir, args);
BuilderTool.build(op, new BuildToolListener() {
@Override
Expand Down

0 comments on commit 7587bc4

Please sign in to comment.