Skip to content

Commit d76d41a

Browse files
committed
format
1 parent 1817a11 commit d76d41a

5 files changed

Lines changed: 49 additions & 49 deletions

File tree

core/src/main/java/engine/application/BasicApplication.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ public abstract class BasicApplication implements Application {
4646
private DebugContext debugContext;
4747

4848
private CollisionSystem collisionSystem;
49+
50+
private Font font = new Font("Lucida Sans", 12, Font.PLAIN);
4951

5052
public BasicApplication() {
5153
this.timer = new Time();
@@ -57,8 +59,6 @@ public BasicApplication() {
5759
public abstract void onUpdate(float tpf);
5860

5961
public abstract void onRender(Graphics g);
60-
61-
private Font font = new Font("Lucida Sans", 12, Font.PLAIN);
6262

6363
public void onRenderUI(Graphics g) {
6464
// Do nothing

core/src/main/java/engine/runtime/debug/core/render/DebugRenderer.java

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -10,37 +10,6 @@
1010

1111
public final class DebugRenderer {
1212

13-
private static final class BatchKey {
14-
15-
final Class<? extends DebugCommand> type;
16-
17-
final DebugDepthMode depthMode;
18-
19-
BatchKey(Class<? extends DebugCommand> type, DebugDepthMode depthMode) {
20-
this.type = type;
21-
this.depthMode = depthMode;
22-
}
23-
24-
@Override
25-
public boolean equals(Object o) {
26-
if (this == o) {
27-
return true;
28-
}
29-
if (!(o instanceof BatchKey)) {
30-
return false;
31-
}
32-
BatchKey other = (BatchKey) o;
33-
return type == other.type && depthMode == other.depthMode;
34-
}
35-
36-
@Override
37-
public int hashCode() {
38-
int result = type.hashCode();
39-
result = 31 * result + depthMode.hashCode();
40-
return result;
41-
}
42-
}
43-
4413
private final Map<Class<? extends DebugCommand>, DebugCommandRenderer<?>> renderers =
4514
new HashMap<>();
4615

@@ -101,4 +70,35 @@ private void applyDepthMode(Graphics g, DebugDepthMode mode) {
10170
break;
10271
}
10372
}
73+
74+
private static final class BatchKey {
75+
76+
final Class<? extends DebugCommand> type;
77+
78+
final DebugDepthMode depthMode;
79+
80+
BatchKey(Class<? extends DebugCommand> type, DebugDepthMode depthMode) {
81+
this.type = type;
82+
this.depthMode = depthMode;
83+
}
84+
85+
@Override
86+
public boolean equals(Object o) {
87+
if (this == o) {
88+
return true;
89+
}
90+
if (!(o instanceof BatchKey)) {
91+
return false;
92+
}
93+
BatchKey other = (BatchKey) o;
94+
return type == other.type && depthMode == other.depthMode;
95+
}
96+
97+
@Override
98+
public int hashCode() {
99+
int result = type.hashCode();
100+
result = 31 * result + depthMode.hashCode();
101+
return result;
102+
}
103+
}
104104
}

demos/src/main/java/demos/jam26/core/DungeonCrawlerGame.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,6 @@
4343

4444
public class DungeonCrawlerGame extends BasicApplication {
4545

46-
public static void main(String[] args) {
47-
ApplicationSettings settings = ApplicationSettings.defaultSettings();
48-
settings.setFullscreen(true);
49-
DungeonCrawlerGame game = new DungeonCrawlerGame();
50-
game.launch(settings);
51-
}
52-
5346
private boolean debug = true;
5447

5548
private boolean drawDebugNormals = false;
@@ -70,6 +63,13 @@ public static void main(String[] args) {
7063

7164
private SceneNode uiRoot;
7265

66+
public static void main(String[] args) {
67+
ApplicationSettings settings = ApplicationSettings.defaultSettings();
68+
settings.setFullscreen(true);
69+
DungeonCrawlerGame game = new DungeonCrawlerGame();
70+
game.launch(settings);
71+
}
72+
7373
@Override
7474
public void onInitialize() {
7575
setupDebug();

demos/src/main/java/sandbox/MultiCameraIntegrationApp.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,6 @@
5555
*/
5656
public class MultiCameraIntegrationApp extends BasicApplication {
5757

58-
public static void main(String[] args) {
59-
MultiCameraIntegrationApp app = new MultiCameraIntegrationApp();
60-
app.launch(ApplicationSettings.defaultSettings().setFullscreen(true));
61-
}
62-
6358
private Scene scene;
6459

6560
private OrbitCamera orbitCamera;
@@ -70,6 +65,11 @@ public static void main(String[] args) {
7065

7166
private SceneNode perspectiveCameraNode;
7267

68+
public static void main(String[] args) {
69+
MultiCameraIntegrationApp app = new MultiCameraIntegrationApp();
70+
app.launch(ApplicationSettings.defaultSettings().setFullscreen(true));
71+
}
72+
7373
@Override
7474
public void onInitialize() {
7575
setupScene();

voxels-server/src/main/java/server/scheduler/ServerScheduler.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66

77
public class ServerScheduler {
88

9+
private final PriorityQueue<ScheduledTask> queue = new PriorityQueue<>();
10+
11+
private final Set<Task> activeTasks = ConcurrentHashMap.newKeySet();
12+
913
public static class Task {
1014
private boolean cancelled = false;
1115

@@ -41,10 +45,6 @@ public int compareTo(ScheduledTask other) {
4145
}
4246
}
4347

44-
private final PriorityQueue<ScheduledTask> queue = new PriorityQueue<>();
45-
46-
private final Set<Task> activeTasks = ConcurrentHashMap.newKeySet();
47-
4848
public Task schedule(long currentTick, long delay, Runnable runnable) {
4949
Task handle = new Task();
5050
activeTasks.add(handle);

0 commit comments

Comments
 (0)