Compare commits

..

7 Commits

Author SHA1 Message Date
minjaesong
5ad352d8cf COPYING update 2026-05-22 22:28:38 +09:00
minjaesong
426f0b0aab blending fix 2026-05-17 13:03:55 +09:00
minjaesong
b01d1683b7 contextual darkening of ui 2026-05-17 12:42:20 +09:00
minjaesong
b547914865 long overdue JVM tuning 2026-04-27 17:57:00 +09:00
minjaesong
c3c6f70e38 wtf? 2026-04-25 15:50:16 +09:00
minjaesong
8824bad9bf Graal update 2026-04-20 17:34:07 +09:00
minjaesong
9edf3a6573 better splash 2026-04-06 11:11:36 +09:00
87 changed files with 450 additions and 238 deletions

View File

@@ -25,12 +25,20 @@
<element id="extracted-dir" path="$KOTLIN_BUNDLED$/lib/kotlin-stdlib-jdk8.jar" path-in-jar="/" /> <element id="extracted-dir" path="$KOTLIN_BUNDLED$/lib/kotlin-stdlib-jdk8.jar" path-in-jar="/" />
<element id="extracted-dir" path="$KOTLIN_BUNDLED$/lib/kotlin-stdlib-jdk7.jar" path-in-jar="/" /> <element id="extracted-dir" path="$KOTLIN_BUNDLED$/lib/kotlin-stdlib-jdk7.jar" path-in-jar="/" />
<element id="extracted-dir" path="$KOTLIN_BUNDLED$/lib/kotlin-reflect.jar" path-in-jar="/" /> <element id="extracted-dir" path="$KOTLIN_BUNDLED$/lib/kotlin-reflect.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/lib/graal-sdk-22.3.1.jar" path-in-jar="/" /> <element id="extracted-dir" path="$PROJECT_DIR$/lib/polyglot-23.1.10.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/lib/icu4j-71.1.jar" path-in-jar="/" /> <element id="extracted-dir" path="$PROJECT_DIR$/lib/js-language-23.1.10.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/lib/js-22.3.1-edit.jar" path-in-jar="/" /> <element id="extracted-dir" path="$PROJECT_DIR$/lib/js-scriptengine-23.1.10.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/lib/js-scriptengine-22.3.1.jar" path-in-jar="/" /> <element id="extracted-dir" path="$PROJECT_DIR$/lib/regex-23.1.10.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/lib/regex-22.3.1-edit.jar" path-in-jar="/" /> <element id="extracted-dir" path="$PROJECT_DIR$/lib/truffle-api-23.1.10.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/lib/truffle-api-22.3.1.jar" path-in-jar="/" /> <element id="extracted-dir" path="$PROJECT_DIR$/lib/truffle-runtime-23.1.10.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/lib/truffle-compiler-23.1.10.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/lib/compiler-23.1.10.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/lib/compiler-management-23.1.10.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/lib/icu4j-23.1.10.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/lib/collections-23.1.10.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/lib/word-23.1.10.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/lib/nativeimage-23.1.10.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/lib/jniutils-23.1.10.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/lib/gdx-1.12.1.jar" path-in-jar="/" /> <element id="extracted-dir" path="$PROJECT_DIR$/lib/gdx-1.12.1.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/lib/gdx-backend-lwjgl3-1.12.1.jar" path-in-jar="/" /> <element id="extracted-dir" path="$PROJECT_DIR$/lib/gdx-backend-lwjgl3-1.12.1.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/lib/lwjgl-3.3.3.jar" path-in-jar="/" /> <element id="extracted-dir" path="$PROJECT_DIR$/lib/lwjgl-3.3.3.jar" path-in-jar="/" />

View File

@@ -18,12 +18,20 @@
<element id="extracted-dir" path="$PROJECT_DIR$/lib/Terrarum_Joise.jar" path-in-jar="/" /> <element id="extracted-dir" path="$PROJECT_DIR$/lib/Terrarum_Joise.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/lib/TerrarumSansBitmap.jar" path-in-jar="/" /> <element id="extracted-dir" path="$PROJECT_DIR$/lib/TerrarumSansBitmap.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/lib/gdx-jnigen-loader-2.3.1.jar" path-in-jar="/" /> <element id="extracted-dir" path="$PROJECT_DIR$/lib/gdx-jnigen-loader-2.3.1.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/lib/js-scriptengine-22.3.1.jar" path-in-jar="/" /> <element id="extracted-dir" path="$PROJECT_DIR$/lib/polyglot-23.1.10.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/lib/truffle-api-22.3.1.jar" path-in-jar="/" /> <element id="extracted-dir" path="$PROJECT_DIR$/lib/js-language-23.1.10.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/lib/icu4j-71.1.jar" path-in-jar="/" /> <element id="extracted-dir" path="$PROJECT_DIR$/lib/js-scriptengine-23.1.10.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/lib/regex-22.3.1-edit.jar" path-in-jar="/" /> <element id="extracted-dir" path="$PROJECT_DIR$/lib/regex-23.1.10.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/lib/js-22.3.1-edit.jar" path-in-jar="/" /> <element id="extracted-dir" path="$PROJECT_DIR$/lib/truffle-api-23.1.10.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/lib/graal-sdk-22.3.1.jar" path-in-jar="/" /> <element id="extracted-dir" path="$PROJECT_DIR$/lib/truffle-runtime-23.1.10.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/lib/truffle-compiler-23.1.10.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/lib/compiler-23.1.10.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/lib/compiler-management-23.1.10.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/lib/icu4j-23.1.10.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/lib/collections-23.1.10.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/lib/word-23.1.10.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/lib/nativeimage-23.1.10.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/lib/jniutils-23.1.10.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/lib/commons-math3-3.6.1.jar" path-in-jar="/" /> <element id="extracted-dir" path="$PROJECT_DIR$/lib/commons-math3-3.6.1.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/lib/JTransforms-3.1.jar" path-in-jar="/" /> <element id="extracted-dir" path="$PROJECT_DIR$/lib/JTransforms-3.1.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/lib/JLargeArrays-1.5.jar" path-in-jar="/" /> <element id="extracted-dir" path="$PROJECT_DIR$/lib/JLargeArrays-1.5.jar" path-in-jar="/" />

View File

@@ -1,28 +1,52 @@
<component name="libraryTable"> <component name="libraryTable">
<library name="graalvm-js 22.3.1"> <library name="graalvm-js 23.1.10">
<CLASSES> <CLASSES>
<root url="jar://$PROJECT_DIR$/lib/graal-sdk-22.3.1.jar!/" /> <root url="jar://$PROJECT_DIR$/lib/polyglot-23.1.10.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/icu4j-71.1.jar!/" /> <root url="jar://$PROJECT_DIR$/lib/icu4j-23.1.10.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/js-22.3.1-edit.jar!/" /> <root url="jar://$PROJECT_DIR$/lib/js-language-23.1.10.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/js-scriptengine-22.3.1.jar!/" /> <root url="jar://$PROJECT_DIR$/lib/js-scriptengine-23.1.10.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/regex-22.3.1-edit.jar!/" /> <root url="jar://$PROJECT_DIR$/lib/regex-23.1.10.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/truffle-api-22.3.1.jar!/" /> <root url="jar://$PROJECT_DIR$/lib/truffle-api-23.1.10.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/truffle-runtime-23.1.10.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/truffle-compiler-23.1.10.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/compiler-23.1.10.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/compiler-management-23.1.10.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/collections-23.1.10.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/word-23.1.10.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/nativeimage-23.1.10.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/jniutils-23.1.10.jar!/" />
</CLASSES> </CLASSES>
<JAVADOC> <JAVADOC>
<root url="jar://$PROJECT_DIR$/lib/graal-sdk-22.3.1-javadoc.jar!/" /> <root url="jar://$PROJECT_DIR$/lib/polyglot-23.1.10-javadoc.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/icu4j-71.1-javadoc.jar!/" /> <root url="jar://$PROJECT_DIR$/lib/icu4j-23.1.10-javadoc.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/js-22.3.1-javadoc.jar!/" /> <root url="jar://$PROJECT_DIR$/lib/js-language-23.1.10-javadoc.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/js-scriptengine-22.3.1-javadoc.jar!/" /> <root url="jar://$PROJECT_DIR$/lib/js-scriptengine-23.1.10-javadoc.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/regex-22.3.1-javadoc.jar!/" /> <root url="jar://$PROJECT_DIR$/lib/regex-23.1.10-javadoc.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/truffle-api-22.3.1-javadoc.jar!/" /> <root url="jar://$PROJECT_DIR$/lib/truffle-api-23.1.10-javadoc.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/truffle-runtime-23.1.10-javadoc.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/truffle-compiler-23.1.10-javadoc.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/compiler-23.1.10-javadoc.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/compiler-management-23.1.10-javadoc.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/collections-23.1.10-javadoc.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/word-23.1.10-javadoc.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/nativeimage-23.1.10-javadoc.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/jniutils-23.1.10-javadoc.jar!/" />
</JAVADOC> </JAVADOC>
<SOURCES> <SOURCES>
<root url="jar://$PROJECT_DIR$/lib/graal-sdk-22.3.1-sources.jar!/" /> <root url="jar://$PROJECT_DIR$/lib/polyglot-23.1.10-sources.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/icu4j-71.1-sources.jar!/" /> <root url="jar://$PROJECT_DIR$/lib/icu4j-23.1.10-sources.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/js-22.3.1-sources.jar!/" /> <root url="jar://$PROJECT_DIR$/lib/js-language-23.1.10-sources.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/js-scriptengine-22.3.1-sources.jar!/" /> <root url="jar://$PROJECT_DIR$/lib/js-scriptengine-23.1.10-sources.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/regex-22.3.1-sources.jar!/" /> <root url="jar://$PROJECT_DIR$/lib/regex-23.1.10-sources.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/truffle-api-22.3.1-sources.jar!/" /> <root url="jar://$PROJECT_DIR$/lib/truffle-api-23.1.10-sources.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/truffle-runtime-23.1.10-sources.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/truffle-compiler-23.1.10-sources.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/compiler-23.1.10-sources.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/compiler-management-23.1.10-sources.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/collections-23.1.10-sources.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/word-23.1.10-sources.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/nativeimage-23.1.10-sources.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/jniutils-23.1.10-sources.jar!/" />
</SOURCES> </SOURCES>
</library> </library>
</component> </component>

View File

@@ -1,7 +1,7 @@
<component name="ProjectRunConfigurationManager"> <component name="ProjectRunConfigurationManager">
<configuration default="false" name="SpriteAssemblerApp" type="JarApplication"> <configuration default="false" name="SpriteAssemblerApp" type="JarApplication">
<option name="JAR_PATH" value="$PROJECT_DIR$/out/SpriteAssemblerApp.jar" /> <option name="JAR_PATH" value="$PROJECT_DIR$/out/SpriteAssemblerApp.jar" />
<option name="VM_PARAMETERS" value="-ea" /> <option name="VM_PARAMETERS" value="-ea --upgrade-module-path=lib/compiler-23.1.10.jar:lib/compiler-management-23.1.10.jar:lib/truffle-compiler-23.1.10.jar:lib/truffle-api-23.1.10.jar:lib/truffle-runtime-23.1.10.jar:lib/polyglot-23.1.10.jar:lib/collections-23.1.10.jar:lib/word-23.1.10.jar:lib/nativeimage-23.1.10.jar:lib/jniutils-23.1.10.jar -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI --add-exports=java.base/jdk.internal.misc=jdk.internal.vm.compiler" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" /> <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="ALTERNATIVE_JRE_PATH" value="17" /> <option name="ALTERNATIVE_JRE_PATH" value="17" />
<module name="TerrarumBuild" /> <module name="TerrarumBuild" />

View File

@@ -1,7 +1,7 @@
<component name="ProjectRunConfigurationManager"> <component name="ProjectRunConfigurationManager">
<configuration default="false" name="Terrarum" type="JarApplication"> <configuration default="false" name="Terrarum" type="JarApplication">
<option name="JAR_PATH" value="$PROJECT_DIR$/out/TerrarumBuild.jar" /> <option name="JAR_PATH" value="$PROJECT_DIR$/out/TerrarumBuild.jar" />
<option name="VM_PARAMETERS" value="-ea -Dswing.aatext=true -Dawt.useSystemAAFontSettings=lcd" /> <option name="VM_PARAMETERS" value="-ea --upgrade-module-path=lib/compiler-23.1.10.jar:lib/compiler-management-23.1.10.jar:lib/truffle-compiler-23.1.10.jar:lib/truffle-api-23.1.10.jar:lib/truffle-runtime-23.1.10.jar:lib/polyglot-23.1.10.jar:lib/collections-23.1.10.jar:lib/word-23.1.10.jar:lib/nativeimage-23.1.10.jar:lib/jniutils-23.1.10.jar -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI --add-exports=java.base/jdk.internal.misc=jdk.internal.vm.compiler -Dswing.aatext=true -Dawt.useSystemAAFontSettings=lcd" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" /> <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="ALTERNATIVE_JRE_PATH" value="17" /> <option name="ALTERNATIVE_JRE_PATH" value="17" />
<module name="TerrarumBuild" /> <module name="TerrarumBuild" />

View File

@@ -1,7 +1,7 @@
<component name="ProjectRunConfigurationManager"> <component name="ProjectRunConfigurationManager">
<configuration default="false" name="Terrarum (no DEV MODE)" type="JarApplication"> <configuration default="false" name="Terrarum (no DEV MODE)" type="JarApplication">
<option name="JAR_PATH" value="$PROJECT_DIR$/out/TerrarumBuild.jar" /> <option name="JAR_PATH" value="$PROJECT_DIR$/out/TerrarumBuild.jar" />
<option name="VM_PARAMETERS" value="-Dswing.aatext=true -Dawt.useSystemAAFontSettings=lcd" /> <option name="VM_PARAMETERS" value="--upgrade-module-path=lib/compiler-23.1.10.jar:lib/compiler-management-23.1.10.jar:lib/truffle-compiler-23.1.10.jar:lib/truffle-api-23.1.10.jar:lib/truffle-runtime-23.1.10.jar:lib/polyglot-23.1.10.jar:lib/collections-23.1.10.jar:lib/word-23.1.10.jar:lib/nativeimage-23.1.10.jar:lib/jniutils-23.1.10.jar -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI --add-exports=java.base/jdk.internal.misc=jdk.internal.vm.compiler -Dswing.aatext=true -Dawt.useSystemAAFontSettings=lcd" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" /> <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="ALTERNATIVE_JRE_PATH" value="17" /> <option name="ALTERNATIVE_JRE_PATH" value="17" />
<module name="TerrarumBuild" /> <module name="TerrarumBuild" />

View File

@@ -1,7 +1,7 @@
<component name="ProjectRunConfigurationManager"> <component name="ProjectRunConfigurationManager">
<configuration default="false" name="Terrarum (no prebuild, release-mode assets)" type="JarApplication"> <configuration default="false" name="Terrarum (no prebuild, release-mode assets)" type="JarApplication">
<option name="JAR_PATH" value="$PROJECT_DIR$/out/TerrarumBuild.jar" /> <option name="JAR_PATH" value="$PROJECT_DIR$/out/TerrarumBuild.jar" />
<option name="VM_PARAMETERS" value="-ea -Dswing.aatext=true -Dawt.useSystemAAFontSettings=lcd" /> <option name="VM_PARAMETERS" value="-ea --upgrade-module-path=lib/compiler-23.1.10.jar:lib/compiler-management-23.1.10.jar:lib/truffle-compiler-23.1.10.jar:lib/truffle-api-23.1.10.jar:lib/truffle-runtime-23.1.10.jar:lib/polyglot-23.1.10.jar:lib/collections-23.1.10.jar:lib/word-23.1.10.jar:lib/nativeimage-23.1.10.jar:lib/jniutils-23.1.10.jar -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI --add-exports=java.base/jdk.internal.misc=jdk.internal.vm.compiler -Dswing.aatext=true -Dawt.useSystemAAFontSettings=lcd" />
<option name="PROGRAM_PARAMETERS" value="--assets buildapp/out/assets.tevd" /> <option name="PROGRAM_PARAMETERS" value="--assets buildapp/out/assets.tevd" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" /> <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="ALTERNATIVE_JRE_PATH" value="17" /> <option name="ALTERNATIVE_JRE_PATH" value="17" />

View File

@@ -1,4 +1,4 @@
Copyright (C) 2013-2024 Minjae Song ("CuriousTorvald") Copyright (C) 2013-2026 Minjae Song ("CuriousTorvald")
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by

View File

@@ -9,7 +9,7 @@
<orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="ModuleComputersLib" level="project" /> <orderEntry type="library" name="ModuleComputersLib" level="project" />
<orderEntry type="module" module-name="TerrarumBuild" scope="PROVIDED" /> <orderEntry type="module" module-name="TerrarumBuild" scope="PROVIDED" />
<orderEntry type="library" scope="PROVIDED" name="graalvm-js 22.3.1" level="project" /> <orderEntry type="library" scope="PROVIDED" name="graalvm-js 23.1.10" level="project" />
<orderEntry type="library" scope="PROVIDED" name="TerrarumSansBitmap" level="project" /> <orderEntry type="library" scope="PROVIDED" name="TerrarumSansBitmap" level="project" />
<orderEntry type="library" scope="PROVIDED" name="badlogicgames.gdx" level="project" /> <orderEntry type="library" scope="PROVIDED" name="badlogicgames.gdx" level="project" />
<orderEntry type="library" scope="PROVIDED" name="badlogicgames.gdx.backend.lwjgl3" level="project" /> <orderEntry type="library" scope="PROVIDED" name="badlogicgames.gdx.backend.lwjgl3" level="project" />

View File

@@ -43,7 +43,7 @@ Requires 64 bit processor and operation system.
Kotlin runtimes must be downloaded using the IntelliJ IDEA. All other libraries are included in the repository. Kotlin runtimes must be downloaded using the IntelliJ IDEA. All other libraries are included in the repository.
The project includes modified version of the GraalVM-JS, in which the only difference is the `regex-22.3.1-edit.jar` is a modification of `regex-22.3.1.jar` where the only difference is its `MANIFEST.MD` The project uses GraalVM 23.1.10 for JavaScript execution (with the Graal JIT compiler enabled via `--upgrade-module-path`).
## Copyright ## ## Copyright ##

View File

@@ -17,7 +17,7 @@
<orderEntry type="library" name="gdx-controllers-core-2.2.1" level="project" /> <orderEntry type="library" name="gdx-controllers-core-2.2.1" level="project" />
<orderEntry type="library" name="gdx-controllers-desktop-2.2.1" level="project" /> <orderEntry type="library" name="gdx-controllers-desktop-2.2.1" level="project" />
<orderEntry type="library" name="jxinput-1.0.0" level="project" /> <orderEntry type="library" name="jxinput-1.0.0" level="project" />
<orderEntry type="library" name="graalvm-js 22.3.1" level="project" /> <orderEntry type="library" name="graalvm-js 23.1.10" level="project" />
<orderEntry type="library" name="badlogicgames.gdx" level="project" /> <orderEntry type="library" name="badlogicgames.gdx" level="project" />
<orderEntry type="library" name="badlogicgames.gdx.backend.lwjgl3" level="project" /> <orderEntry type="library" name="badlogicgames.gdx.backend.lwjgl3" level="project" />
<orderEntry type="library" name="io.github.classgraph" level="project" /> <orderEntry type="library" name="io.github.classgraph" level="project" />

View File

@@ -33,6 +33,9 @@ mv $DESTDIR/out/$RUNTIME/bin/java $DESTDIR/out/$RUNTIME/bin/java
cp "out/assets.tevd" $DESTDIR/ cp "out/assets.tevd" $DESTDIR/
cp "../out/$JARNAME" $DESTDIR/out/ cp "../out/$JARNAME" $DESTDIR/out/
# Copy over Graal module-path JARs for JIT compiler
cp "../lib/compiler-23.1.10.jar" "../lib/compiler-management-23.1.10.jar" "../lib/truffle-compiler-23.1.10.jar" "../lib/truffle-api-23.1.10.jar" "../lib/truffle-runtime-23.1.10.jar" "../lib/polyglot-23.1.10.jar" "../lib/collections-23.1.10.jar" "../lib/word-23.1.10.jar" "../lib/nativeimage-23.1.10.jar" "../lib/jniutils-23.1.10.jar" $DESTDIR/
# Pack everything to AppImage # Pack everything to AppImage
ARCH=aarch64 "./$APPIMAGETOOL" $DESTDIR "out/$DESTDIR.AppImage" || { echo 'Building AppImage failed' >&2; exit 1; } ARCH=aarch64 "./$APPIMAGETOOL" $DESTDIR "out/$DESTDIR.AppImage" || { echo 'Building AppImage failed' >&2; exit 1; }
chmod +x "out/$DESTDIR.AppImage" chmod +x "out/$DESTDIR.AppImage"

View File

@@ -33,6 +33,9 @@ mv $DESTDIR/out/$RUNTIME/bin/java $DESTDIR/out/$RUNTIME/bin/java
cp "out/assets.tevd" $DESTDIR/ cp "out/assets.tevd" $DESTDIR/
cp "../out/$JARNAME" $DESTDIR/out/ cp "../out/$JARNAME" $DESTDIR/out/
# Copy over Graal module-path JARs for JIT compiler
cp "../lib/compiler-23.1.10.jar" "../lib/compiler-management-23.1.10.jar" "../lib/truffle-compiler-23.1.10.jar" "../lib/truffle-api-23.1.10.jar" "../lib/truffle-runtime-23.1.10.jar" "../lib/polyglot-23.1.10.jar" "../lib/collections-23.1.10.jar" "../lib/word-23.1.10.jar" "../lib/nativeimage-23.1.10.jar" "../lib/jniutils-23.1.10.jar" $DESTDIR/
# Pack everything to AppImage # Pack everything to AppImage
"./$APPIMAGETOOL" $DESTDIR "out/$DESTDIR.AppImage" || { echo 'Building AppImage failed' >&2; exit 1; } "./$APPIMAGETOOL" $DESTDIR "out/$DESTDIR.AppImage" || { echo 'Building AppImage failed' >&2; exit 1; }
chmod +x "out/$DESTDIR.AppImage" chmod +x "out/$DESTDIR.AppImage"

View File

@@ -36,6 +36,9 @@ mv $DESTDIR/Contents/MacOS/out/$RUNTIME/bin/java $DESTDIR/Contents/MacOS/out/$RU
cp "out/assets.tevd" $DESTDIR/Contents/MacOS/ cp "out/assets.tevd" $DESTDIR/Contents/MacOS/
cp "../out/$JARNAME" $DESTDIR/Contents/MacOS/out/ cp "../out/$JARNAME" $DESTDIR/Contents/MacOS/out/
# Copy over Graal module-path JARs for JIT compiler
cp "../lib/compiler-23.1.10.jar" "../lib/compiler-management-23.1.10.jar" "../lib/truffle-compiler-23.1.10.jar" "../lib/truffle-api-23.1.10.jar" "../lib/truffle-runtime-23.1.10.jar" "../lib/polyglot-23.1.10.jar" "../lib/collections-23.1.10.jar" "../lib/word-23.1.10.jar" "../lib/nativeimage-23.1.10.jar" "../lib/jniutils-23.1.10.jar" $DESTDIR/Contents/MacOS/
# zip everything # zip everything
cd "out" cd "out"
rm $APPDIR.zip rm $APPDIR.zip

View File

@@ -36,6 +36,9 @@ mv $DESTDIR/Contents/MacOS/out/$RUNTIME/bin/java $DESTDIR/Contents/MacOS/out/$RU
cp "out/assets.tevd" $DESTDIR/Contents/MacOS/ cp "out/assets.tevd" $DESTDIR/Contents/MacOS/
cp "../out/$JARNAME" $DESTDIR/Contents/MacOS/out/ cp "../out/$JARNAME" $DESTDIR/Contents/MacOS/out/
# Copy over Graal module-path JARs for JIT compiler
cp "../lib/compiler-23.1.10.jar" "../lib/compiler-management-23.1.10.jar" "../lib/truffle-compiler-23.1.10.jar" "../lib/truffle-api-23.1.10.jar" "../lib/truffle-runtime-23.1.10.jar" "../lib/polyglot-23.1.10.jar" "../lib/collections-23.1.10.jar" "../lib/word-23.1.10.jar" "../lib/nativeimage-23.1.10.jar" "../lib/jniutils-23.1.10.jar" $DESTDIR/Contents/MacOS/
# zip everything # zip everything
cd "out" cd "out"
rm $APPDIR.zip rm $APPDIR.zip

View File

@@ -38,6 +38,9 @@ mv $DESTDIR/out/$RUNTIME/bin/java.exe $DESTDIR/out/$RUNTIME/bin/java.exe
cp "out/assets.tevd" $DESTDIR/ cp "out/assets.tevd" $DESTDIR/
cp "../out/$JARNAME" $DESTDIR/out/ cp "../out/$JARNAME" $DESTDIR/out/
# Copy over Graal module-path JARs for JIT compiler
cp "../lib/compiler-23.1.10.jar" "../lib/compiler-management-23.1.10.jar" "../lib/truffle-compiler-23.1.10.jar" "../lib/truffle-api-23.1.10.jar" "../lib/truffle-runtime-23.1.10.jar" "../lib/polyglot-23.1.10.jar" "../lib/collections-23.1.10.jar" "../lib/word-23.1.10.jar" "../lib/nativeimage-23.1.10.jar" "../lib/jniutils-23.1.10.jar" $DESTDIR/
# zip everything # zip everything
rm "out/$DESTDIR.zip" rm "out/$DESTDIR.zip"
zip -r -9 -l "out/$DESTDIR.zip" $DESTDIR zip -r -9 -l "out/$DESTDIR.zip" $DESTDIR

View File

@@ -1,3 +1,4 @@
#!/bin/bash #!/bin/bash
cd "${0%/*}" cd "${0%/*}"
./out/runtime-linux-arm/bin/java -Dswing.aatext=true -Dawt.useSystemAAFontSettings=lcd -jar ./out/TerrarumBuild.jar GRAAL_MODULE_PATH=compiler-23.1.10.jar:compiler-management-23.1.10.jar:truffle-compiler-23.1.10.jar:truffle-api-23.1.10.jar:truffle-runtime-23.1.10.jar:polyglot-23.1.10.jar:collections-23.1.10.jar:word-23.1.10.jar:nativeimage-23.1.10.jar:jniutils-23.1.10.jar
./out/runtime-linux-arm/bin/java --upgrade-module-path=$GRAAL_MODULE_PATH -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:+UseZGC -XX:+ZGenerational -XX:+UseDynamicNumberOfGCThreads --add-exports=java.base/jdk.internal.misc=jdk.internal.vm.compiler -Dswing.aatext=true -Dawt.useSystemAAFontSettings=lcd -jar ./out/TerrarumBuild.jar

View File

@@ -1,3 +1,4 @@
#!/bin/bash #!/bin/bash
cd "${0%/*}" cd "${0%/*}"
./out/runtime-linux-x86/bin/java -Dswing.aatext=true -Dawt.useSystemAAFontSettings=lcd -jar ./out/TerrarumBuild.jar GRAAL_MODULE_PATH=compiler-23.1.10.jar:compiler-management-23.1.10.jar:truffle-compiler-23.1.10.jar:truffle-api-23.1.10.jar:truffle-runtime-23.1.10.jar:polyglot-23.1.10.jar:collections-23.1.10.jar:word-23.1.10.jar:nativeimage-23.1.10.jar:jniutils-23.1.10.jar
./out/runtime-linux-x86/bin/java --upgrade-module-path=$GRAAL_MODULE_PATH -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:+UseZGC -XX:+ZGenerational -XX:+UseDynamicNumberOfGCThreads --add-exports=java.base/jdk.internal.misc=jdk.internal.vm.compiler -Dswing.aatext=true -Dawt.useSystemAAFontSettings=lcd -jar ./out/TerrarumBuild.jar

View File

@@ -1,3 +1,4 @@
#!/bin/bash #!/bin/bash
cd "${0%/*}" cd "${0%/*}"
./out/runtime-osx-arm/bin/java -jar ./out/TerrarumBuild.jar GRAAL_MODULE_PATH=compiler-23.1.10.jar:compiler-management-23.1.10.jar:truffle-compiler-23.1.10.jar:truffle-api-23.1.10.jar:truffle-runtime-23.1.10.jar:polyglot-23.1.10.jar:collections-23.1.10.jar:word-23.1.10.jar:nativeimage-23.1.10.jar:jniutils-23.1.10.jar
./out/runtime-osx-arm/bin/java --upgrade-module-path=$GRAAL_MODULE_PATH -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:+UseZGC -XX:+ZGenerational -XX:+UseDynamicNumberOfGCThreads --add-exports=java.base/jdk.internal.misc=jdk.internal.vm.compiler -jar ./out/TerrarumBuild.jar

View File

@@ -1,3 +1,4 @@
#!/bin/bash #!/bin/bash
cd "${0%/*}" cd "${0%/*}"
./out/runtime-osx-x86/bin/java -jar ./out/TerrarumBuild.jar GRAAL_MODULE_PATH=compiler-23.1.10.jar:compiler-management-23.1.10.jar:truffle-compiler-23.1.10.jar:truffle-api-23.1.10.jar:truffle-runtime-23.1.10.jar:polyglot-23.1.10.jar:collections-23.1.10.jar:word-23.1.10.jar:nativeimage-23.1.10.jar:jniutils-23.1.10.jar
./out/runtime-osx-x86/bin/java --upgrade-module-path=$GRAAL_MODULE_PATH -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:+UseZGC -XX:+ZGenerational -XX:+UseDynamicNumberOfGCThreads --add-exports=java.base/jdk.internal.misc=jdk.internal.vm.compiler -jar ./out/TerrarumBuild.jar

View File

@@ -7,7 +7,11 @@ int main() {
si.dwFlags = STARTF_USESHOWWINDOW; si.dwFlags = STARTF_USESHOWWINDOW;
si.wShowWindow = SW_HIDE; si.wShowWindow = SW_HIDE;
char cmd[] = "\".\\out\\runtime-windows-x86\\bin\\java.exe\" -jar \".\\out\\TerrarumBuild.jar\""; char cmd[] = "\".\\out\\runtime-windows-x86\\bin\\java.exe\" "
"--upgrade-module-path=compiler-23.1.10.jar;compiler-management-23.1.10.jar;truffle-compiler-23.1.10.jar;truffle-api-23.1.10.jar;truffle-runtime-23.1.10.jar;polyglot-23.1.10.jar;collections-23.1.10.jar;word-23.1.10.jar;nativeimage-23.1.10.jar;jniutils-23.1.10.jar "
"-XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:+UseZGC -XX:+ZGenerational -XX:+UseDynamicNumberOfGCThreads "
"--add-exports=java.base/jdk.internal.misc=jdk.internal.vm.compiler "
"-jar \".\\out\\TerrarumBuild.jar\"";
CreateProcessA( CreateProcessA(
NULL, NULL,

Binary file not shown.

Binary file not shown.

BIN
lib/collections-23.1.10.jar LFS Normal file

Binary file not shown.

BIN
lib/compiler-23.1.10-javadoc.jar LFS Normal file

Binary file not shown.

BIN
lib/compiler-23.1.10-sources.jar LFS Normal file

Binary file not shown.

BIN
lib/compiler-23.1.10.jar LFS Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
lib/icu4j-23.1.10-javadoc.jar LFS Normal file

Binary file not shown.

BIN
lib/icu4j-23.1.10-sources.jar LFS Normal file

Binary file not shown.

BIN
lib/icu4j-23.1.10.jar LFS Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
lib/jniutils-23.1.10-javadoc.jar LFS Normal file

Binary file not shown.

BIN
lib/jniutils-23.1.10-sources.jar LFS Normal file

Binary file not shown.

BIN
lib/jniutils-23.1.10.jar LFS Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
lib/js-language-23.1.10.jar LFS Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
lib/js-scriptengine-23.1.10.jar LFS Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
lib/nativeimage-23.1.10.jar LFS Normal file

Binary file not shown.

BIN
lib/polyglot-23.1.10-javadoc.jar LFS Normal file

Binary file not shown.

BIN
lib/polyglot-23.1.10-sources.jar LFS Normal file

Binary file not shown.

BIN
lib/polyglot-23.1.10.jar LFS Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
lib/regex-23.1.10-javadoc.jar LFS Normal file

Binary file not shown.

BIN
lib/regex-23.1.10-sources.jar LFS Normal file

Binary file not shown.

BIN
lib/regex-23.1.10.jar LFS Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
lib/truffle-api-23.1.10.jar LFS Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
lib/truffle-compiler-23.1.10.jar LFS Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
lib/truffle-runtime-23.1.10.jar LFS Normal file

Binary file not shown.

BIN
lib/word-23.1.10-javadoc.jar LFS Normal file

Binary file not shown.

BIN
lib/word-23.1.10-sources.jar LFS Normal file

Binary file not shown.

BIN
lib/word-23.1.10.jar LFS Normal file

Binary file not shown.

View File

@@ -265,10 +265,10 @@ public class App implements ApplicationListener {
public static Hq2x hq2x; public static Hq2x hq2x;
public static Mesh fullscreenQuad; public static Mesh fullscreenQuad;
private static OrthographicCamera camera; public static OrthographicCamera camera;
private static FlippingSpriteBatch logoBatch; public static FlippingSpriteBatch logoBatch;
public static TextureRegion splashScreenLogo; public static TextureRegion splashScreenLogo;
private static TextureRegion splashBackdrop; public static TextureRegion splashBackdrop;
public static AudioDevice audioDevice; public static AudioDevice audioDevice;
public static FlippingSpriteBatch batch; public static FlippingSpriteBatch batch;
@@ -550,7 +550,7 @@ public class App implements ApplicationListener {
} }
} }
private static Color splashTextCol = new Color(0x282828FF); public static Color splashTextCol = new Color(0x282828FF);
@Override @Override
public void create() { public void create() {
@@ -752,6 +752,7 @@ public class App implements ApplicationListener {
// hand over the scene control to this single class; Terrarum must call // hand over the scene control to this single class; Terrarum must call
// 'AppLoader.getINSTANCE().screen.render(delta)', this is not redundant at all! // 'AppLoader.getINSTANCE().screen.render(delta)', this is not redundant at all!
SplashScreen.loadingComplete = true;
IngameInstance title = ModMgr.INSTANCE.getTitleScreen(batch); IngameInstance title = ModMgr.INSTANCE.getTitleScreen(batch);
if (title != null) { if (title != null) {
@@ -882,107 +883,7 @@ public class App implements ApplicationListener {
} }
public static void drawSplash() { public static void drawSplash() {
setCameraPosition(0f, 0f);
logoBatch.setColor(Color.WHITE);
logoBatch.setBlendFunctionSeparate(GL20.GL_SRC_ALPHA, GL20.GL_ONE_MINUS_SRC_ALPHA, GL20.GL_ONE, GL20.GL_ONE_MINUS_SRC_ALPHA);
int drawWidth = Toolkit.INSTANCE.getDrawWidth();
int safetyTextLen = fontGame.getWidth(Lang.INSTANCE.get("APP_WARNING_HEALTH_AND_SAFETY", true));
int logoPosX0 = (drawWidth - splashScreenLogo.getRegionWidth() - safetyTextLen) >>> 1;
int logoPosY = Math.round(scr.getHeight() / 15f);
int textY = logoPosY + splashScreenLogo.getRegionHeight() - 16;
// draw custom backdrop (if exists)
if (splashBackdrop != null) {
logoBatch.setShader(null);
logoBatch.begin();
var size = ((float) Math.max(scr.getWidth(), scr.getHeight()));
var x = 0f;
var y = 0f;
if (scr.getWidth() > scr.getHeight()) {
y = (scr.getHeight() - size) / 2f;
}
else {
x = (scr.getWidth() - size) / 2f;
}
logoBatch.draw(splashBackdrop, x, y, size, size);
logoBatch.end();
}
int logoPosX = logoPosX0;//(int)(logoPosX0 + Math.round(100 * Math.sin(GLOBAL_RENDER_TIMER / 50.0)));
// draw logo reflection
logoBatch.setShader(shaderReflect);
logoBatch.setColor(Color.WHITE);
logoBatch.begin();
if (getConfigBoolean("showhealthmessageonstartup")) {
logoBatch.draw(splashScreenLogo, logoPosX, logoPosY + splashScreenLogo.getRegionHeight());
}
else {
logoBatch.draw(splashScreenLogo, (drawWidth - splashScreenLogo.getRegionWidth()) / 2f,
(scr.getHeight() - splashScreenLogo.getRegionHeight() * 2) / 2f + splashScreenLogo.getRegionHeight()
);
}
logoBatch.end();
logoBatch.setShader(null);
logoBatch.begin();
if (getConfigBoolean("showhealthmessageonstartup")) {
logoBatch.draw(splashScreenLogo, logoPosX, logoPosY);
}
else {
logoBatch.draw(splashScreenLogo, (drawWidth - splashScreenLogo.getRegionWidth()) / 2f,
(scr.getHeight() - splashScreenLogo.getRegionHeight() * 2) / 2f
);
}
logoBatch.end();
// draw loading bar and subtitle
SplashScreen.render(logoBatch, camera); SplashScreen.render(logoBatch, camera);
// draw health messages
if (getConfigBoolean("showhealthmessageonstartup")) {
logoBatch.setShader(null);
logoBatch.begin();
logoBatch.setColor(splashTextCol);
fontGame.draw(logoBatch, Lang.INSTANCE.get("APP_WARNING_HEALTH_AND_SAFETY", true),
logoPosX + splashScreenLogo.getRegionWidth(),
textY
);
// some chinese stuff
if (GAME_LOCALE.contentEquals("zhCN")) {
for (int i = 1; i <= 4; i++) {
String s = Lang.INSTANCE.get("APP_CHINESE_HEALTHY_GAME_MSG_" + i, true);
fontGame.draw(logoBatch, s,
(drawWidth - fontGame.getWidth(s)) >>> 1,
Math.round(scr.getHeight() * 12f / 15f + fontGame.getLineHeight() * (i - 1))
);
}
}
Texture tex1 = CommonResourcePool.INSTANCE.getAsTexture("title_health1");
Texture tex2 = CommonResourcePool.INSTANCE.getAsTexture("title_health2");
int virtualHeight = scr.getHeight() - logoPosY - splashScreenLogo.getRegionHeight() / 4;
int virtualHeightOffset = scr.getHeight() - virtualHeight;
logoBatch.drawFlipped(tex1, (drawWidth - tex1.getWidth()) >>> 1, virtualHeightOffset + (virtualHeight >>> 1) - 16, tex1.getWidth(), -tex1.getHeight());
logoBatch.drawFlipped(tex2, (drawWidth - tex2.getWidth()) >>> 1, virtualHeightOffset + (virtualHeight >>> 1) + 16 + tex2.getHeight(), tex2.getWidth(), -tex2.getHeight());
}
logoBatch.end();
batch.setBlendFunctionSeparate(GL20.GL_SRC_ALPHA, GL20.GL_ONE_MINUS_SRC_ALPHA, GL20.GL_ONE, GL20.GL_ONE_MINUS_SRC_ALPHA);
} }
/** /**
@@ -1471,7 +1372,7 @@ public class App implements ApplicationListener {
} }
private static void setCameraPosition(float newX, float newY) { public static void setCameraPosition(float newX, float newY) {
camera.position.set((-newX + scr.getWidth() / 2), (-newY + scr.getHeight() / 2), 0f); // deliberate integer division camera.position.set((-newX + scr.getWidth() / 2), (-newY + scr.getHeight() / 2), 0f); // deliberate integer division
camera.update(); camera.update();
logoBatch.setProjectionMatrix(camera.combined); logoBatch.setProjectionMatrix(camera.combined);

View File

@@ -31,16 +31,6 @@ object CommonResourcePool {
private val slowLoadingQueue = ConcurrentLinkedQueue<ResourceLoadingDescriptor>() private val slowLoadingQueue = ConcurrentLinkedQueue<ResourceLoadingDescriptor>()
private val slowLoadingRemaining = AtomicInteger(0) private val slowLoadingRemaining = AtomicInteger(0)
private val slowLoadingTotal = AtomicInteger(0)
/** 0.0 = not started yet, 1.0 = all done. Only meaningful during / after [loadAllSlowly]. */
val loadingProgress: Float
get() {
val total = slowLoadingTotal.get()
if (total == 0) return 0f
val remaining = slowLoadingRemaining.get()
return (total - remaining).toFloat() / total.toFloat()
}
fun setGLThread(thread: Thread) { fun setGLThread(thread: Thread) {
glThread = thread glThread = thread
@@ -162,7 +152,6 @@ object CommonResourcePool {
val desc = loadingList.removeFirst() val desc = loadingList.removeFirst()
slowLoadingQueue.add(desc) slowLoadingQueue.add(desc)
slowLoadingRemaining.incrementAndGet() slowLoadingRemaining.incrementAndGet()
slowLoadingTotal.incrementAndGet()
} }
// Block until the GL thread has processed all slow items // Block until the GL thread has processed all slow items
while (slowLoadingRemaining.get() > 0) { while (slowLoadingRemaining.get() > 0) {

View File

@@ -53,6 +53,7 @@ public class Principii {
} }
} }
private static final String GRAAL_MODULE_PATH = "compiler-23.1.10.jar:compiler-management-23.1.10.jar:truffle-compiler-23.1.10.jar:truffle-api-23.1.10.jar:truffle-runtime-23.1.10.jar:polyglot-23.1.10.jar:collections-23.1.10.jar:word-23.1.10.jar:nativeimage-23.1.10.jar:jniutils-23.1.10.jar";
public static void main(String[] args) { public static void main(String[] args) {
@@ -130,6 +131,13 @@ public class Principii {
List<String> userDefinedExtraCmds = Arrays.stream(userDefinedExtraCmd0.split(" +")).filter((it) -> !it.isBlank()).toList(); List<String> userDefinedExtraCmds = Arrays.stream(userDefinedExtraCmd0.split(" +")).filter((it) -> !it.isBlank()).toList();
ArrayList<String> cmd0 = new ArrayList<>(); ArrayList<String> cmd0 = new ArrayList<>();
cmd0.add(runtime); cmd0.add(runtime);
cmd0.add("--upgrade-module-path="+GRAAL_MODULE_PATH);
cmd0.add("-XX:+UnlockExperimentalVMOptions");
cmd0.add("-XX:+EnableJVMCI");
cmd0.add("-XX:+UseZGC");
cmd0.add("-XX:+ZGenerational");
cmd0.add("-XX:+UseDynamicNumberOfGCThreads");
cmd0.add("--add-exports=java.base/jdk.internal.misc=jdk.internal.vm.compiler");
cmd0.addAll(extracmds); cmd0.addAll(extracmds);
cmd0.addAll(userDefinedExtraCmds); cmd0.addAll(userDefinedExtraCmds);
// cmd0.add("-Dhttps.protocols=SSLv3,TLSv1.2,TLSv1.1,TLSv1"); // cmd0.add("-Dhttps.protocols=SSLv3,TLSv1.2,TLSv1.1,TLSv1");

View File

@@ -1,20 +1,32 @@
package net.torvald.terrarum package net.torvald.terrarum
import com.badlogic.gdx.graphics.Color import com.badlogic.gdx.graphics.Color
import com.badlogic.gdx.graphics.GL20
import com.badlogic.gdx.graphics.OrthographicCamera import com.badlogic.gdx.graphics.OrthographicCamera
import com.badlogic.gdx.graphics.Texture
import com.badlogic.gdx.graphics.g2d.SpriteBatch import com.badlogic.gdx.graphics.g2d.SpriteBatch
import net.torvald.terrarum.langpack.Lang
import net.torvald.terrarum.ui.Toolkit import net.torvald.terrarum.ui.Toolkit
import net.torvald.terrarum.ui.UICanvas import net.torvald.terrarum.ui.UICanvas
import net.torvald.terrarum.ui.UIItemHorzSlider import net.torvald.terrarum.ui.UIItemHorzSlider
import kotlin.math.max
/** /**
* Draws the loading bar and subtitle on the cold-boot splash screen. * Draws the cold-boot splash screen: backdrop, logo, loading bar, subtitle, and health messages.
* Called from App.drawSplash() (Java static context) on the GL thread. * Consolidated from App.drawSplash() so all splash rendering lives here.
*
* Progress is time-based: p = t / (t + HALF_TIME_MS), snapping to 1.0 when
* [loadingComplete] is set to true by App right before transitioning to the title screen.
* *
* Created by minjaesong on 2026-04-06. * Created by minjaesong on 2026-04-06.
*/ */
object SplashScreen { object SplashScreen {
/** Set to true by App when loading completes, to snap the bar to 100%. */
@JvmField @Volatile var loadingComplete = false
private const val HALF_TIME_MS = 1500L // progress = t / (t + HALF_TIME_MS)
private val stubParent = object : UICanvas() { private val stubParent = object : UICanvas() {
override var width = 0 override var width = 0
override var height = 0 override var height = 0
@@ -25,15 +37,74 @@ object SplashScreen {
private var loadingBar: UIItemHorzSlider? = null private var loadingBar: UIItemHorzSlider? = null
private var lastBarWidth = 0 private var lastBarWidth = 0
private var startTime = 0L
private val subtitleCol = Color(0.75f, 0.75f, 0.75f, 1f) private val subtitleCol = Color(0.75f, 0.75f, 0.75f, 1f)
@JvmStatic @JvmStatic fun render(batch: SpriteBatch, camera: OrthographicCamera) {
fun render(batch: SpriteBatch, camera: OrthographicCamera) { App.setCameraPosition(0f, 0f)
val progress = CommonResourcePool.loadingProgress
val batch = App.logoBatch
val scr = App.scr
val drawWidth = Toolkit.drawWidth
val showHealth = App.getConfigBoolean("showhealthmessageonstartup")
batch.color = Color.WHITE
batch.setBlendFunctionSeparate(GL20.GL_SRC_ALPHA, GL20.GL_ONE_MINUS_SRC_ALPHA, GL20.GL_ONE, GL20.GL_ONE_MINUS_SRC_ALPHA)
val safetyTextLen = if (showHealth) App.fontGame.getWidth(Lang["APP_WARNING_HEALTH_AND_SAFETY", true]) else 0
val logoPosX0 = (drawWidth - App.splashScreenLogo.regionWidth - safetyTextLen) ushr 1
val logoPosY = Math.round(scr.height / 15f)
val textY = logoPosY + App.splashScreenLogo.regionHeight - 16
// backdrop
App.splashBackdrop?.let { backdrop ->
batch.setShader(null)
batch.inUse {
val size = max(scr.width, scr.height).toFloat()
val x = if (scr.width > scr.height) 0f else (scr.width - size) / 2f
val y = if (scr.width > scr.height) (scr.height - size) / 2f else 0f
batch.draw(backdrop, x, y, size, size)
}
}
val logoPosX = logoPosX0
// logo reflection
batch.setShader(App.shaderReflect)
batch.color = Color.WHITE
batch.inUse {
if (showHealth) {
batch.draw(App.splashScreenLogo, logoPosX.toFloat(), (logoPosY + App.splashScreenLogo.regionHeight).toFloat())
} else {
batch.draw(App.splashScreenLogo,
(drawWidth - App.splashScreenLogo.regionWidth) / 2f,
(scr.height - App.splashScreenLogo.regionHeight * 2) / 2f + App.splashScreenLogo.regionHeight)
}
}
// logo
batch.setShader(null)
batch.inUse {
if (showHealth) {
batch.draw(App.splashScreenLogo, logoPosX.toFloat(), logoPosY.toFloat())
} else {
batch.draw(App.splashScreenLogo,
(drawWidth - App.splashScreenLogo.regionWidth) / 2f,
(scr.height - App.splashScreenLogo.regionHeight * 2) / 2f)
}
}
// loading bar+subtitle
if (startTime == 0L) startTime = System.currentTimeMillis()
val elapsed = System.currentTimeMillis() - startTime
val progress = if (loadingComplete) 1f
else elapsed.toFloat() / (elapsed + HALF_TIME_MS).toFloat()
val barWidth = (Toolkit.drawWidth * 0.4f).toInt().coerceAtLeast(200) val barWidth = (Toolkit.drawWidth * 0.4f).toInt().coerceAtLeast(200)
val barX = (Toolkit.drawWidth - barWidth) / 2 val barX = (Toolkit.drawWidth - barWidth) / 2
val barY = App.scr.height - 48 val barY = App.scr.height - App.scr.tvSafeGraphicsHeight - 24
if (loadingBar == null || lastBarWidth != barWidth) { if (loadingBar == null || lastBarWidth != barWidth) {
lastBarWidth = barWidth lastBarWidth = barWidth
@@ -48,16 +119,36 @@ object SplashScreen {
bar.posY = barY bar.posY = barY
bar.handleWidth = (progress * barWidth).toInt().coerceIn(12, barWidth) bar.handleWidth = (progress * barWidth).toInt().coerceIn(12, barWidth)
val subtitle = "${App.GAME_NAME} ${App.getVERSION_STRING()}" val subtitle = "Reticulating Splines..."
val subtitleW = App.fontGame.getWidth(subtitle) val subtitleW = App.fontGame.getWidth(subtitle)
val subtitleX = (Toolkit.drawWidth - subtitleW) / 2f val subtitleX = (Toolkit.drawWidth - subtitleW) / 2f
val subtitleY = (barY - 20).toFloat() // leave gap above the bar val subtitleY = (barY - 32).toFloat()
batch.inUse {
batch.color = subtitleCol
App.fontGame.draw(batch, subtitle, subtitleX, subtitleY)
batch.color = Color.WHITE
bar.render(0f, batch, camera)
}
// health messages
if (showHealth) {
batch.setShader(null)
batch.inUse {
batch.color = App.splashTextCol
App.fontGame.draw(batch, Lang["APP_WARNING_HEALTH_AND_SAFETY", true],
(logoPosX + App.splashScreenLogo.regionWidth).toFloat(), textY.toFloat())
val tex1 = CommonResourcePool.getAsTexture("title_health1")
val tex2 = CommonResourcePool.getAsTexture("title_health2")
val virtualHeight = scr.height - logoPosY - App.splashScreenLogo.regionHeight / 4
val virtualHeightOffset = scr.height - virtualHeight
batch.drawFlipped(tex1, ((drawWidth - tex1.width) ushr 1).toFloat(), (virtualHeightOffset + (virtualHeight ushr 1) - 16).toFloat(), tex1.width.toFloat(), (-tex1.height).toFloat())
batch.drawFlipped(tex2, ((drawWidth - tex2.width) ushr 1).toFloat(), (virtualHeightOffset + (virtualHeight ushr 1) + 16 + tex2.height).toFloat(), tex2.width.toFloat(), (-tex2.height).toFloat())
}
}
App.batch.setBlendFunctionSeparate(GL20.GL_SRC_ALPHA, GL20.GL_ONE_MINUS_SRC_ALPHA, GL20.GL_ONE, GL20.GL_ONE_MINUS_SRC_ALPHA)
batch.begin()
batch.color = subtitleCol
App.fontGame.draw(batch, subtitle, subtitleX, subtitleY)
batch.color = Color.WHITE
bar.render(0f, batch, camera)
batch.end()
} }
} }

View File

@@ -8,8 +8,10 @@ import com.badlogic.gdx.graphics.g2d.TextureRegion
import com.badlogic.gdx.graphics.glutils.Float16FrameBuffer import com.badlogic.gdx.graphics.glutils.Float16FrameBuffer
import com.badlogic.gdx.graphics.glutils.FrameBuffer import com.badlogic.gdx.graphics.glutils.FrameBuffer
import com.badlogic.gdx.graphics.glutils.ShaderProgram import com.badlogic.gdx.graphics.glutils.ShaderProgram
import com.badlogic.gdx.utils.BufferUtils
import com.badlogic.gdx.utils.Disposable import com.badlogic.gdx.utils.Disposable
import com.jme3.math.FastMath import com.jme3.math.FastMath
import java.nio.ByteBuffer
import net.torvald.random.HQRNG import net.torvald.random.HQRNG
import net.torvald.terrarum.* import net.torvald.terrarum.*
import net.torvald.terrarum.App.* import net.torvald.terrarum.App.*
@@ -87,12 +89,21 @@ object IngameRenderer : Disposable {
private lateinit var fboRGBwall: Float16FrameBuffer // for masking away the shadows private lateinit var fboRGBwall: Float16FrameBuffer // for masking away the shadows
private lateinit var fboUI: Float16FrameBuffer // UI composite target for scene-aware dimming
private lateinit var fboSceneAvg: Float16FrameBuffer // tiny target for brightness readback
private lateinit var rgbTex: TextureRegion private lateinit var rgbTex: TextureRegion
private lateinit var aTex: TextureRegion private lateinit var aTex: TextureRegion
private lateinit var mixedOutTex: TextureRegion private lateinit var mixedOutTex: TextureRegion
private lateinit var uiTex: TextureRegion
private lateinit var lightTex: TextureRegion private lateinit var lightTex: TextureRegion
private lateinit var blurTex: TextureRegion private lateinit var blurTex: TextureRegion
// Contextual UI dimming: dim slightly when the world scene is dark.
private val sceneAvgBuf: ByteBuffer = BufferUtils.newByteBuffer(SCENE_AVG_SIZE * SCENE_AVG_SIZE * 4)
@Volatile private var smoothedSceneLuma = 1f
private var uiDimFactor = 1f
private lateinit var fboBlurHalf: Float16FrameBuffer private lateinit var fboBlurHalf: Float16FrameBuffer
// private lateinit var fboBlurQuarter: Float16FrameBuffer // private lateinit var fboBlurQuarter: Float16FrameBuffer
@@ -136,6 +147,14 @@ object IngameRenderer : Disposable {
/** lower value = greater lozenge artefact from linear intp */ /** lower value = greater lozenge artefact from linear intp */
const val lightmapDownsample = 2f // still has choppy look when the camera moves but unnoticeable when blurred const val lightmapDownsample = 2f // still has choppy look when the camera moves but unnoticeable when blurred
// Contextual UI dimming parameters.
private const val SCENE_AVG_SIZE = 16 // side of the small RGBA8 FBO used for brightness readback
private const val SCENE_AVG_INTERVAL = 6L // sample every N frames; smoothing fills the gaps
private const val UI_DIM_DARK_FACTOR = 0.8f // 80% brightness when the scene is dark
private const val UI_DIM_DARK_LUMA = 0.08f // luma at/below this -> fully dimmed
private const val UI_DIM_BRIGHT_LUMA = 0.22f // luma at/above this -> no dimming
private const val UI_DIM_SMOOTHING = 0.12f // per-sample EMA factor for luma
private var debugMode = 0 private var debugMode = 0
var renderingActorsCount = 0 var renderingActorsCount = 0
@@ -444,20 +463,38 @@ object IngameRenderer : Disposable {
/////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////
// draw UI // contextual UI dimming: keep uiDimFactor in sync with the rendered scene's brightness
setCameraPosition(0f, 0f) sampleSceneBrightness()
batch.inUse { // draw UI into its own FBO so individual UIs can keep using batch.color freely
batch.shader = null fboUI.inAction(camera, batch) {
batch.color = Color.WHITE gdxClearAndEnableBlend(0f, 0f, 0f, 0f)
blendNormalStraightAlpha(batch)
if (!KeyToggler.isOn(Input.Keys.F4)) { batch.inUse {
uiContainer?.forEach { batch.shader = null
it?.render(frameDelta, batch, camera) batch.color = Color.WHITE
if (!KeyToggler.isOn(Input.Keys.F4)) {
uiContainer?.forEach {
it?.render(frameDelta, batch, camera)
}
} }
} }
} }
// composite UI on top of the world with the contextual dim tint
setCameraPosition(0f, 0f)
blendNormalPremultAlpha(batch)
uiTex.texture.setFilter(Texture.TextureFilter.Nearest, Texture.TextureFilter.Nearest)
batch.inUse {
batch.shader = null
batch.color = Color(uiDimFactor, uiDimFactor, uiDimFactor, 1f)
batch.drawFlipped(uiTex, 0f, 0f, fboUI.width.toFloat(), fboUI.height.toFloat())
batch.color = Color.WHITE
}
// works but some UI elements have wrong transparency -> should be fixed with Terrarum.gdxCleanAndSetBlend -- Torvald 2019-01-12 // works but some UI elements have wrong transparency -> should be fixed with Terrarum.gdxCleanAndSetBlend -- Torvald 2019-01-12
blendNormalStraightAlpha(batch) blendNormalStraightAlpha(batch)
batch.color = Color.WHITE batch.color = Color.WHITE
@@ -466,6 +503,48 @@ object IngameRenderer : Disposable {
if (newWorldLoadedLatch) newWorldLoadedLatch = false if (newWorldLoadedLatch) newWorldLoadedLatch = false
} }
/**
* Downsamples [fboMixedOut] into [fboSceneAvg], reads it back, and updates [smoothedSceneLuma]
* and [uiDimFactor]. Sampling is throttled to every [SCENE_AVG_INTERVAL] frames; the EMA fills gaps.
*/
private fun sampleSceneBrightness() {
if (App.GLOBAL_RENDER_TIMER % SCENE_AVG_INTERVAL == 0L) {
mixedOutTex.texture.setFilter(Texture.TextureFilter.Linear, Texture.TextureFilter.Linear)
fboSceneAvg.inAction(camera, batch) {
gdxClearAndEnableBlend(0f, 0f, 0f, 1f)
batch.inUse {
batch.shader = null
batch.color = Color.WHITE
batch.draw(mixedOutTex, 0f, 0f, fboSceneAvg.width.toFloat(), fboSceneAvg.height.toFloat())
}
sceneAvgBuf.rewind()
Gdx.gl.glReadPixels(0, 0, fboSceneAvg.width, fboSceneAvg.height,
GL20.GL_RGBA, GL20.GL_UNSIGNED_BYTE, sceneAvgBuf)
}
sceneAvgBuf.rewind()
var sumR = 0L
var sumG = 0L
var sumB = 0L
val count = fboSceneAvg.width * fboSceneAvg.height
for (i in 0 until count) {
sumR += (sceneAvgBuf.get().toInt() and 0xFF)
sumG += (sceneAvgBuf.get().toInt() and 0xFF)
sumB += (sceneAvgBuf.get().toInt() and 0xFF)
sceneAvgBuf.get() // alpha discarded
}
val inv = 1f / (count * 255f)
val luma = 0.2126f * (sumR * inv) + 0.7152f * (sumG * inv) + 0.0722f * (sumB * inv)
smoothedSceneLuma += (luma - smoothedSceneLuma) * UI_DIM_SMOOTHING
}
val t = ((smoothedSceneLuma - UI_DIM_DARK_LUMA) / (UI_DIM_BRIGHT_LUMA - UI_DIM_DARK_LUMA))
.coerceIn(0f, 1f)
uiDimFactor = UI_DIM_DARK_FACTOR + (1f - UI_DIM_DARK_FACTOR) * t
}
private fun prepLightmapRGBA() { private fun prepLightmapRGBA() {
lightmapFbo.inAction(null, null) { lightmapFbo.inAction(null, null) {
@@ -1305,6 +1384,9 @@ object IngameRenderer : Disposable {
fboBlurHalf.dispose() fboBlurHalf.dispose()
//fboBlurQuarter.dispose() //fboBlurQuarter.dispose()
if (::fboUI.isInitialized) fboUI.dispose()
if (::fboSceneAvg.isInitialized) fboSceneAvg.dispose()
} }
// BlocksDrawer and LightmapRenderer must be resized before lightmapFbo is created, // BlocksDrawer and LightmapRenderer must be resized before lightmapFbo is created,
@@ -1332,11 +1414,15 @@ object IngameRenderer : Disposable {
LightmapRenderer.lightBuffer.height * LightmapRenderer.DRAW_TILE_SIZE.toInt(), LightmapRenderer.lightBuffer.height * LightmapRenderer.DRAW_TILE_SIZE.toInt(),
false false
) )
fboUI = Float16FrameBuffer(width, height, false)
fboSceneAvg = Float16FrameBuffer(SCENE_AVG_SIZE, SCENE_AVG_SIZE, false)
rgbTex = TextureRegion(fboRGB_lightMixed.colorBufferTexture) rgbTex = TextureRegion(fboRGB_lightMixed.colorBufferTexture)
aTex = TextureRegion(fboA_lightMixed.colorBufferTexture) aTex = TextureRegion(fboA_lightMixed.colorBufferTexture)
lightTex = TextureRegion(lightmapFbo.colorBufferTexture) lightTex = TextureRegion(lightmapFbo.colorBufferTexture)
blurTex = TextureRegion() blurTex = TextureRegion()
mixedOutTex = TextureRegion(fboMixedOut.colorBufferTexture) mixedOutTex = TextureRegion(fboMixedOut.colorBufferTexture)
uiTex = TextureRegion(fboUI.colorBufferTexture)
fboBlurHalf = Float16FrameBuffer( fboBlurHalf = Float16FrameBuffer(
LightmapRenderer.lightBuffer.width * LightmapRenderer.DRAW_TILE_SIZE.toInt() / 2, LightmapRenderer.lightBuffer.width * LightmapRenderer.DRAW_TILE_SIZE.toInt() / 2,
@@ -1394,6 +1480,8 @@ object IngameRenderer : Disposable {
if (::fboRGBactorsMiddleShadow.isInitialized) fboRGBactorsMiddleShadow.tryDispose() if (::fboRGBactorsMiddleShadow.isInitialized) fboRGBactorsMiddleShadow.tryDispose()
if (::fboRGBterrainShadow.isInitialized) fboRGBterrainShadow.tryDispose() if (::fboRGBterrainShadow.isInitialized) fboRGBterrainShadow.tryDispose()
if (::fboRGBwall.isInitialized) fboRGBwall.tryDispose() if (::fboRGBwall.isInitialized) fboRGBwall.tryDispose()
if (::fboUI.isInitialized) fboUI.tryDispose()
if (::fboSceneAvg.isInitialized) fboSceneAvg.tryDispose()
blurtex0.tryDispose() blurtex0.tryDispose()

View File

@@ -6,7 +6,7 @@ import com.badlogic.gdx.graphics.OrthographicCamera
import com.badlogic.gdx.graphics.Pixmap import com.badlogic.gdx.graphics.Pixmap
import com.badlogic.gdx.graphics.g2d.SpriteBatch import com.badlogic.gdx.graphics.g2d.SpriteBatch
import com.badlogic.gdx.graphics.glutils.FrameBuffer import com.badlogic.gdx.graphics.glutils.FrameBuffer
import com.ibm.icu.text.Normalizer2 import org.graalvm.shadowed.com.ibm.icu.text.Normalizer2 // wtf?
import com.jme3.math.FastMath import com.jme3.math.FastMath
import net.torvald.terrarum.* import net.torvald.terrarum.*
import net.torvald.terrarum.gamecontroller.* import net.torvald.terrarum.gamecontroller.*