X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=misc%2Ftools%2Fcompress-texture;h=5ee658c659322432dde564a7dab44e7f4bb3aaa0;hb=a09032a8062b17960f6015d26cf6f69fbe6d20df;hp=1c488b09503ec7603a2fd7bb6fecdda6ee156608;hpb=a780c8749a1364dbd6151e61fbe1a53e21ec5c56;p=xonotic%2Fxonotic.git diff --git a/misc/tools/compress-texture b/misc/tools/compress-texture index 1c488b09..5ee658c6 100755 --- a/misc/tools/compress-texture +++ b/misc/tools/compress-texture @@ -10,6 +10,8 @@ format=$1; shift src=$1; shift dst=$1; shift +ext=${src##*.} + c= f= @@ -63,7 +65,6 @@ case "$tool" in esac dir=`mktemp -d "$HOME/.wine/drive_c/compressonator.XXXXXX"` dir_dos="C:/${dir##*/}" - ext=${src##*.} cp "$src" "$dir/src.$ext" # compressonator and wine suck, so we sometimes have to retry :( @@ -84,6 +85,14 @@ case "$tool" in esac nvcompress $f "$@" "$src" "$dst" ;; + s2tc) + case "$format" in + dxt1) f="-t DXT1" ;; + dxt3) f="-t DXT3" ;; + dxt5) f="-t DXT5" ;; + esac + s2tc_compress $f "$@" -i "$src" -o "$dst" + ;; esac if [ -n "$fourcchack" ]; then