From: Rudolf Polzer Date: Wed, 15 Dec 2010 11:54:59 +0000 (+0100) Subject: make the fourcchack actually work for nonsupporting compressors X-Git-Tag: xonotic-v0.1.0preview~15 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=4f966a0222c11335ec2bd9fa17bf0d66fd168b12;p=xonotic%2Fxonotic.git make the fourcchack actually work for nonsupporting compressors --- diff --git a/misc/tools/compress-texture b/misc/tools/compress-texture index 36aa0281..93d5c494 100755 --- a/misc/tools/compress-texture +++ b/misc/tools/compress-texture @@ -12,6 +12,7 @@ dst=$1; shift c= f= + fourcchack= case "$tool" in compressonator-dxtc) @@ -29,6 +30,13 @@ case "$tool" in esac ;; esac + +if [ -n "$fourcchack" ]; then + fourcchack_dir=`mktemp -d` + convert "$src" -fx "u*u.a" "$fourcchack_dir/src.$ext" + src="$fourcchack_dir/src.$ext" +fi + case "$tool" in compressonator-dxtc|compressonator-atic) case "$tool" in @@ -70,4 +78,5 @@ esac if [ -n "$fourcchack" ]; then # use dd to hack in the right FOURCC echo -n "$fourcchack" | dd of="$dst" bs=1 count=4 seek=84 + rm -rf "$fourcchack_dir" fi