Skip to content

Commit

Permalink
Update EntityAnno and glTFrenzy
Browse files Browse the repository at this point in the history
  • Loading branch information
GlennFolker committed Dec 10, 2024
1 parent b9509b8 commit 49092fd
Show file tree
Hide file tree
Showing 10 changed files with 51 additions and 44 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,8 @@ jobs:
with:
java-version: 17
distribution: temurin
- name: Setup Android SDK
uses: android-actions/setup-android@v3
with:
packages: 'platforms;android-34 build-tools;34.0.0'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Build mod artifact
run: |
chmod +x gradlew
Expand Down
10 changes: 0 additions & 10 deletions .github/workflows/validate.yml

This file was deleted.

21 changes: 11 additions & 10 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,15 @@ import java.io.*
import java.util.regex.*

buildscript{
val arcVersion: String by project
val useJitpack = property("mindustryBE").toString().toBooleanStrict()

dependencies{
val arcVersion: String by project
classpath("com.github.Anuken.Arc:arc-core:$arcVersion")
}

repositories{
mavenCentral()
maven("https://oss.sonatype.org/content/repositories/snapshots/")
maven("https://oss.sonatype.org/content/repositories/releases/")
maven("https://raw.githubusercontent.com/Zelaux/MindustryRepo/master/repository")
if(!useJitpack) maven("https://raw.githubusercontent.com/Zelaux/MindustryRepo/master/repository")
maven("https://jitpack.io")
}
}
Expand All @@ -28,7 +27,7 @@ plugins{
id("com.github.GlennFolker.EntityAnno") apply(false)
}

configure<ExtraPropertiesExtension>{
ext{
val props = StringMap()

val local = layout.projectDirectory.file("local.properties").asFile
Expand Down Expand Up @@ -79,7 +78,7 @@ fun entity(module: String): String{

allprojects{
apply(plugin = "java-library")
sourceSets["main"].java.setSrcDirs(arrayListOf(layout.projectDirectory.dir("src")))
sourceSets["main"].java.setSrcDirs(listOf(layout.projectDirectory.dir("src")))

configurations.configureEach{
// Resolve the correct Mindustry dependency, and force Arc version.
Expand All @@ -102,6 +101,8 @@ allprojects{
mavenCentral()
maven("https://oss.sonatype.org/content/repositories/snapshots/")
maven("https://oss.sonatype.org/content/repositories/releases/")
maven("https://raw.githubusercontent.com/GlennFolker/EntityAnnoMaven/main")
maven("https://raw.githubusercontent.com/GlennFolker/glTFrenzyMaven/main")

// Use Zelaux's non-buggy repository for release Mindustry and Arc builds.
if(!useJitpack) maven("https://raw.githubusercontent.com/Zelaux/MindustryRepo/master/repository")
Expand Down Expand Up @@ -338,7 +339,8 @@ project(":"){

from(zipTree(desktopJar), zipTree(dexJar))
doFirst{
exec{
logger.lifecycle("Running `d8`.")
providers.exec{
// Find Android SDK root.
val sdkRoot = File(
OS.env("ANDROID_SDK_ROOT") ?: OS.env("ANDROID_HOME") ?:
Expand Down Expand Up @@ -366,9 +368,8 @@ project(":"){
if(OS.isWindows) command.addAll(0, arrayOf("cmd", "/c").toList())

// Run `d8`.
logger.lifecycle("Running `d8`.")
commandLine(command)
}
}.result.get().rethrowFailure()
}
}

Expand Down
12 changes: 6 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ modArtifact = Confictura
# EntityAnno version, for integrating syntax-downgrader and entity annotation processor.
# The exact version you need should be looked up on the project's `README.md`
# (see https://github.com/GlennFolker/EntityAnno?tab=readme-ov-file#version-compatibility).
entVersion = v146.0.8
entVersion = v146.0.10
# glTFrenzy version, for loading 3D models.
glTFrenzyVersion = c454246ef2590cba33e58d7ef9b02de3556a4aec
glTFrenzyVersion = v146.0.1
# Set to `true` if the mod is compiled against Mindustry bleeding-edge build.
# See documents on `mindustryVersion` and `mindustryBEVersion`.
mindustryBE = true
Expand All @@ -24,15 +24,15 @@ mindustryBE = true
mindustryVersion = v146
# Mindustry *bleeding-edge* version, corresponds to commit hashes of Anuken/MindustryJitpack, e.g. `345ea0d54de0aee6953a664468556f4fea1a7c4f`.
# Leave empty if `mindustryBE = false`.
mindustryBEVersion = 4a332e2ec39714b22514f11b76f90a1c20dc0e8a
mindustryBEVersion = 170cb8523e
# Arc version, should either follow `mindustryVersion` for release or whatever hash bleeding-edge Mindustry uses.
arcVersion = c1e3b23ddd
arcVersion = ae657a7db3

##### Android SDK configuration for building Android artifacts.
# Android platform SDK version.
androidSdkVersion = 34
androidSdkVersion = 35
# Android build-tools version.
androidBuildVersion = 34.0.0
androidBuildVersion = 35.0.0
# Android platform minimum API version. Should be left as 14, as that's what Mindustry officially supports.
androidMinVersion = 14

Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
7 changes: 5 additions & 2 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#

##############################################################################
#
Expand Down Expand Up @@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand Down Expand Up @@ -84,7 +86,8 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down
2 changes: 2 additions & 0 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem

@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pluginManagement{
repositories{
gradlePluginPortal()
maven("https://jitpack.io")
maven("https://raw.githubusercontent.com/GlennFolker/EntityAnnoMaven/main")
}

plugins{
Expand Down
33 changes: 23 additions & 10 deletions src/confictura/world/celestial/BlackHole.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ public class BlackHole extends Planet{
public @Nullable CFrameBuffer depth, depthRef;
public @Nullable Cubemap skybox;

public @Nullable Cubemap pov;

protected Seq<Planet> stashChildren = new Seq<>(), requests = new Seq<>();
protected Cubemap stashSkybox;
protected boolean drawing = false;
Expand Down Expand Up @@ -70,21 +72,32 @@ public void load(){
if(depth == null) depth = new CFrameBuffer(2, 2, true);
if(depthRef == null) depthRef = new CFrameBuffer(2, 2, true);

var base = "skyboxes/confictura/megalith/";
skybox = new Cubemap(
tree.get(base + "right.png"),
tree.get(base + "left.png"),
tree.get(base + "top.png"),
tree.get(base + "bottom.png"),
tree.get(base + "front.png"),
tree.get(base + "back.png")
if(skybox == null) {
var base = "skyboxes/confictura/megalith/";
skybox = new Cubemap(
tree.get(base + "right.png"),
tree.get(base + "left.png"),
tree.get(base + "top.png"),
tree.get(base + "bottom.png"),
tree.get(base + "front.png"),
tree.get(base + "back.png")
);
}

if(pov == null) pov = new Cubemap(
new GLOnlyTextureData(1024, 1024, 0, Gl.rgba, Gl.rgba, Gl.unsignedByte),
new GLOnlyTextureData(1024, 1024, 0, Gl.rgba, Gl.rgba, Gl.unsignedByte),
new GLOnlyTextureData(1024, 1024, 0, Gl.rgba, Gl.rgba, Gl.unsignedByte),
new GLOnlyTextureData(1024, 1024, 0, Gl.rgba, Gl.rgba, Gl.unsignedByte),
new GLOnlyTextureData(1024, 1024, 0, Gl.rgba, Gl.rgba, Gl.unsignedByte),
new GLOnlyTextureData(1024, 1024, 0, Gl.rgba, Gl.rgba, Gl.unsignedByte)
);
}

@Override
public void draw(PlanetParams params, Mat3D projection, Mat3D transform){
// Fool `PlanetRenderer` into thinking the black hole has no children, so that it can draw them itself.
var stash = stashChildren;
/*var stash = stashChildren;
stashChildren = children;
children = stash;
Expand Down Expand Up @@ -180,7 +193,7 @@ public void draw(PlanetParams params, Mat3D projection, Mat3D transform){
renderer.planets.batch.proj(cam.combined);
if(params.drawUi) renderer.planets.renderOrbit(planet, params);
}
draw.get(back, requests.size);
draw.get(back, requests.size);*/
}

@Override
Expand Down

0 comments on commit 49092fd

Please sign in to comment.