From 9e96954eaaecf31b741f0bfba16b9a82e4cd949c Mon Sep 17 00:00:00 2001 From: Anuken Date: Sat, 13 Jun 2020 12:18:18 -0400 Subject: [PATCH] Fixed colorswap --- tools/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/build.gradle b/tools/build.gradle index 0642941f93..bd77f189c5 100644 --- a/tools/build.gradle +++ b/tools/build.gradle @@ -235,7 +235,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.valueOf(str.split("=")[0]).argb8888()] = Color.valueOf(str.split("=")[1]).argb8888() } def tmpc = new Color() fileTree(dir: '../core/assets-raw/sprites', include: "**/*.png").visit{ file -> @@ -246,7 +246,7 @@ task swapColors(){ for(x in (0..img.getWidth() - 1)){ for(y in (0..img.getHeight() - 1)){ def c = img.getRGB(x, y) - Color.argb8888ToColor(tmpc, c) + tmpc.argb8888(c) if(tmpc.a < 0.1f) continue if(map.containsKey(c)){ img.setRGB(x, y, (int)map.get(c))