mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-31 01:44:22 +07:00
Switched from gdx-packer to arc-packer
This commit is contained in:
parent
78b2fe64a3
commit
eb8479f7f7
11
build.gradle
11
build.gradle
@ -1,4 +1,8 @@
|
||||
buildscript{
|
||||
ext{
|
||||
arcExtVersion = "e287fdce0449a87fb15599c67b5167ac0273bcb6"
|
||||
}
|
||||
|
||||
repositories{
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
@ -10,8 +14,9 @@ buildscript{
|
||||
|
||||
dependencies{
|
||||
classpath 'com.mobidevelop.robovm:robovm-gradle-plugin:2.3.8'
|
||||
classpath "com.badlogicgames.gdx:gdx-tools:1.9.10"
|
||||
classpath "com.github.anuken:packr:-SNAPSHOT"
|
||||
classpath "com.github.Anuken.Arc:packer:$arcExtVersion"
|
||||
classpath "com.github.Anuken.Arc:arc-core:$arcExtVersion"
|
||||
}
|
||||
}
|
||||
|
||||
@ -308,10 +313,8 @@ project(":annotations"){
|
||||
apply plugin: "java"
|
||||
|
||||
dependencies{
|
||||
def arcVersion = "e287fdce0449a87fb15599c67b5167ac0273bcb6"
|
||||
|
||||
compile 'com.squareup:javapoet:1.11.0'
|
||||
compile "com.github.Anuken.Arc:arc-core:$arcVersion"
|
||||
compile "com.github.Anuken.Arc:arc-core:$arcExtVersion"
|
||||
compile files("${System.getProperty('java.home')}/../lib/tools.jar")
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,3 @@
|
||||
org.gradle.daemon=true
|
||||
org.gradle.jvmargs=-Xms256m -Xmx1024m
|
||||
archash=460d616ccc09942f462108337d0e6bf2bed8ded8
|
||||
archash=1bb6b5430668b3c15657c2efbde5ec3d7bc11651
|
||||
|
@ -3,12 +3,9 @@ apply plugin: "java"
|
||||
sourceCompatibility = 1.8
|
||||
sourceSets.main.java.srcDirs = ["src/"]
|
||||
|
||||
|
||||
import com.badlogic.gdx.graphics.Color
|
||||
import com.badlogic.gdx.tools.texturepacker.TexturePacker
|
||||
import com.badlogic.gdx.utils.IntArray
|
||||
import com.badlogic.gdx.utils.IntIntMap
|
||||
import com.badlogic.gdx.utils.IntMap
|
||||
import arc.struct.*
|
||||
import arc.graphics.*
|
||||
import arc.packer.*
|
||||
|
||||
import javax.imageio.ImageIO
|
||||
import java.awt.*
|
||||
@ -16,7 +13,7 @@ import java.awt.image.BufferedImage
|
||||
import java.util.List
|
||||
import java.util.concurrent.ExecutorService
|
||||
import java.util.concurrent.Executors
|
||||
import java.util.concurrent.TimeUnit
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
def genFolder = "../core/assets-raw/sprites_out/generated/"
|
||||
def doAntialias = !project.hasProperty("disableAntialias")
|
||||
@ -87,7 +84,8 @@ def antialias = { File file ->
|
||||
suma.a += color.a
|
||||
}
|
||||
|
||||
suma.mul(suma.a <= 0.001f ? 0f : (float) (1f / suma.a))
|
||||
float fm = suma.a <= 0.001f ? 0f : (float) (1f / suma.a)
|
||||
suma.mul(fm, fm, fm, fm)
|
||||
|
||||
float total = 0
|
||||
sum.set(0)
|
||||
@ -103,7 +101,8 @@ def antialias = { File file ->
|
||||
total += 1f
|
||||
}
|
||||
|
||||
sum.mul((float) (1f / total))
|
||||
fm = (float)(1f / total)
|
||||
sum.mul(fm, fm, fm, fm)
|
||||
int result = Color.argb8888(sum)
|
||||
out.setRGB(x, y, result)
|
||||
sum.set(0)
|
||||
|
Loading…
Reference in New Issue
Block a user