From 1319271fd47744c2e488e506e6b6e9a6b1c53759 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sat, 18 Nov 2017 05:52:40 +0100 Subject: [PATCH] Texture converter: refactor convert_alphatex --- tools/Texture_Converter.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/Texture_Converter.py b/tools/Texture_Converter.py index d2db113d6..3faf8d6bb 100755 --- a/tools/Texture_Converter.py +++ b/tools/Texture_Converter.py @@ -115,10 +115,10 @@ tex_dir = base_dir + "/assets/minecraft/textures" # FUNCTION DEFINITIONS -def convert_alphatex(one, two, three, four, five): - os.system("convert "+one+" -crop 1x1+"+three+" -depth 8 -resize "+four+"x"+four+" "+tempfile1.name) - os.system("composite -compose Multiply "+tempfile1.name+" "+two+" "+tempfile2.name) - os.system("composite -compose Dst_In "+two+" "+tempfile1.name+" -alpha Set "+five) +def convert_alphatex(colormap, source, colormap_pixel, texture_size, destination): + os.system("convert "+colormap+" -crop 1x1+"+colormap_pixel+" -depth 8 -resize "+texture_size+"x"+texture_size+" "+tempfile1.name) + os.system("composite -compose Multiply "+tempfile1.name+" "+source+" "+tempfile2.name) + os.system("composite -compose Dst_In "+source+" "+tempfile1.name+" -alpha Set "+destination) def target_dir(directory): if make_texture_pack: