Removed exe scaling

This commit is contained in:
Anuken 2019-01-08 17:24:01 -05:00
parent 521174f911
commit 8b791b68d3

View File

@ -11,8 +11,6 @@ import java.awt.image.BufferedImage
def outFolder = "../core/assets-raw/sprites_out/"
def genFolder = "../core/assets-raw/sprites_out/generated/"
def scaling = "XBRZ 4x"
def do4 = true
task swapColors(){
doLast{
@ -20,7 +18,7 @@ task swapColors(){
def carr = new File(getProperty("colors")).text.split("\n")
def map = [:]
def swaps = 0
carr.each {str -> map[Color.argb8888(Color.valueOf(str.split("=")[0]))] = Color.argb8888(Color.valueOf(str.split("=")[1]))}
carr.each{str -> map[Color.argb8888(Color.valueOf(str.split("=")[0]))] = Color.argb8888(Color.valueOf(str.split("=")[1]))}
def tmpc = new Color()
fileTree(dir: '../core/assets-raw/sprites', include: "**/*.png").visit { file ->
@ -100,25 +98,7 @@ task scaleSprites4x(){
task scaleSprites(){
finalizedBy 'genSprites'
if(do4){
dependsOn 'scaleSprites4x'
}else{
doLast {
def arguments = ["mono", "ImageResizer.exe"]
fileTree(dir: '../core/assets-raw/sprites/', include: "**/*.png").visit { file ->
if (file.isDirectory() || file.toString().contains("/ui/")) return;
def write = new File(file.file.toString().replace("/sprites", "/sprites_out"))
arguments += ["/load", file.file.toString(), "/resize",
"auto", scaling, "/save", write.toString()]
}
exec { commandLine arguments }
}
}
dependsOn 'scaleSprites4x'
}
task pack(){