Skip to content

Commit 381613c

Browse files
committed
a-ikiso
1 parent f6a130a commit 381613c

20 files changed

+184
-245
lines changed

common/src/main/java/dev/felnull/fnjl/FNJLBuildIn.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,4 @@
22

33
public class FNJLBuildIn {
44
protected static final String VERSION = "1.32";
5-
6-
protected static final int NATIVE_LIB_VERSION = 3;
75
}

common/src/main/java/dev/felnull/fnjl/FelNullJavaLibrary.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,4 @@ public class FelNullJavaLibrary {
1515
public static String getVersion() {
1616
return FNJLBuildIn.VERSION;
1717
}
18-
19-
/**
20-
* ネイティブライブラリのバージョン
21-
*
22-
* @return バージョン
23-
*/
24-
public static int getNativeLibVersion() {
25-
return FNJLBuildIn.NATIVE_LIB_VERSION;
26-
}
27-
2818
}

common/src/main/java/dev/felnull/fnjl/jni/NativeLibraryManager.java

Lines changed: 0 additions & 119 deletions
This file was deleted.

common/src/main/java/dev/felnull/fnjl/jni/windows/WindowsNative.java

Lines changed: 0 additions & 10 deletions
This file was deleted.

common/src/main/java/dev/felnull/fnjl/math/FNComplex.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,4 +104,8 @@ public String toString() {
104104
", imag=" + imag +
105105
'}';
106106
}
107+
108+
public FNVec2d convertVec2d() {
109+
return new FNVec2d(real, imag);
110+
}
107111
}

common/src/main/java/dev/felnull/fnjl/math/FNVec2d.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,12 @@ public String toString() {
6363
", y=" + y +
6464
'}';
6565
}
66+
67+
public FNVec2f convertFloat() {
68+
return new FNVec2f((float) x, (float) y);
69+
}
70+
71+
public FNVec2i convertInt() {
72+
return new FNVec2i((int) x, (int) y);
73+
}
6674
}

common/src/main/java/dev/felnull/fnjl/math/FNVec2f.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,12 @@ public boolean equals(Object o) {
6363
public int hashCode() {
6464
return Objects.hash(x, y);
6565
}
66+
67+
public FNVec2d convertDouble() {
68+
return new FNVec2d(x, y);
69+
}
70+
71+
public FNVec2i convertInt() {
72+
return new FNVec2i((int) x, (int) y);
73+
}
6674
}

common/src/main/java/dev/felnull/fnjl/math/FNVec2i.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,12 @@ public String toString() {
6363
", y=" + y +
6464
'}';
6565
}
66+
67+
public FNVec2f convertFloat() {
68+
return new FNVec2f(x, y);
69+
}
70+
71+
public FNVec2d convertDouble() {
72+
return new FNVec2d(x, y);
73+
}
6674
}

common/src/main/java/dev/felnull/fnjl/util/FNFontUtil.java

Lines changed: 0 additions & 42 deletions
This file was deleted.

common/src/main/java/dev/felnull/fnjl/util/FNRuntimeUtil.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
public class FNRuntimeUtil {
88
private static final Map<Runnable, Long> lastTimes = new HashMap<>();
9+
private static final List<Timer> timers = new ArrayList<>();
910

1011
public static void oneDayClockTimer(int hours, int minutes, Runnable runnable) {
1112
oneDayClockTimer(hours, minutes, runnable, false);
@@ -30,6 +31,7 @@ public void run() {
3031
}
3132
};
3233
timer.schedule(task, 0, 1000);
34+
timers.add(timer);
3335
}
3436

3537
/**
@@ -130,4 +132,16 @@ public static CompletableFuture<Void> multipleRun(String threadName, int max, Ru
130132
});
131133
}
132134

135+
/**
136+
* このクラスで登録したタスクをすべて停止
137+
*/
138+
public static void kill() {
139+
for (Timer timer : timers) {
140+
timer.cancel();
141+
timer.purge();
142+
}
143+
timers.clear();
144+
lastTimes.clear();
145+
}
146+
133147
}

0 commit comments

Comments
 (0)