allow choosing between ATICompressor and DXTC.dll
authorRudolf Polzer <divverent@alientrap.org>
Sat, 26 Jun 2010 14:38:26 +0000 (16:38 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Sat, 26 Jun 2010 14:38:26 +0000 (16:38 +0200)
misc/tools/cached-converter.sh
misc/tools/compress-texture

index e9a214b758880f0efb381cbd67c6997744d2de7c..4d52563ec279e3290e88b3b216a11b9368056946 100755 (executable)
@@ -7,7 +7,7 @@ set -e
 : ${jpeg_qual_rgb:=95}
 : ${jpeg_qual_a:=99}
 : ${do_dds:=true}
-: ${dds_tool:=compressonator}
+: ${dds_tool:=compressonator-dxtc}
 : ${do_ogg:=false}
 : ${ogg_qual:=1}
 
index d1ceecd0ec1f7d308d99d41ca343343c6d07315d..da050f964773a18ddc19a0b723abaa42922bcf07 100755 (executable)
@@ -8,9 +8,14 @@ format=$1; shift
 src=$1; shift
 dst=$1; shift
 
+c=
 f=
 case "$tool" in
-       compressonator)
+       compressonator-dxtc|compressor-atic)
+               case "$tool" in
+                       *-dxtc) c="-codec DXTC.dll" ;;
+                       *-atic) c="-codec ATICompressor.dll" ;;
+               esac
                case "$format" in
                        dxt1) f="+fourCC DXT1" ;;
                        dxt3) f="+fourCC DXT3" ;;
@@ -21,7 +26,7 @@ case "$tool" in
                dir_dos="C:/${dir##*/}"
                ext=${src##*.}
                cp "$src" "$dir/src.$ext"
-               wine "$HOME/.wine/drive_c/Program Files/AMD/The Compressonator 1.50/TheCompressonator.exe" -convert -mipmaps "$dir_dos/src.$ext" "$dir_dos/dst.dds" -codec DXTC.dll $f "$@"
+               wine "$HOME/.wine/drive_c/Program Files/AMD/The Compressonator 1.50/TheCompressonator.exe" -convert -mipmaps "$dir_dos/src.$ext" "$dir_dos/dst.dds" $c $f "$@"
                mv "$dir/dst.dds" "$dst"
                rm -rf "$dir"
                ;;