Switched from gdx-packer to arc-packer
This commit is contained in:
+8
-9
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user