allow choosing between ATICompressor and DXTC.dll

This commit is contained in:
Rudolf Polzer 2010-06-26 16:38:26 +02:00
parent 0e1fbbc2bf
commit 9c9343fa31
2 changed files with 8 additions and 3 deletions

View File

@ -7,7 +7,7 @@ set -e
: ${jpeg_qual_rgb:=95} : ${jpeg_qual_rgb:=95}
: ${jpeg_qual_a:=99} : ${jpeg_qual_a:=99}
: ${do_dds:=true} : ${do_dds:=true}
: ${dds_tool:=compressonator} : ${dds_tool:=compressonator-dxtc}
: ${do_ogg:=false} : ${do_ogg:=false}
: ${ogg_qual:=1} : ${ogg_qual:=1}

View File

@ -8,9 +8,14 @@ format=$1; shift
src=$1; shift src=$1; shift
dst=$1; shift dst=$1; shift
c=
f= f=
case "$tool" in 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 case "$format" in
dxt1) f="+fourCC DXT1" ;; dxt1) f="+fourCC DXT1" ;;
dxt3) f="+fourCC DXT3" ;; dxt3) f="+fourCC DXT3" ;;
@ -21,7 +26,7 @@ case "$tool" in
dir_dos="C:/${dir##*/}" dir_dos="C:/${dir##*/}"
ext=${src##*.} ext=${src##*.}
cp "$src" "$dir/src.$ext" 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" mv "$dir/dst.dds" "$dst"
rm -rf "$dir" rm -rf "$dir"
;; ;;