home *** CD-ROM | disk | FTP | other *** search
/ Xentax forum attachments archive / xentax.7z / 7840 / WD_Repack.7z / WD_XBT-ConvertGraphicProc.bat < prev    next >
Encoding:
DOS Batch File  |  2014-09-16  |  990 b   |  45 lines

  1. @echo off
  2. mode 80,60
  3.  
  4. set WD_EList2=WD_ErrorList2.txt
  5. type nul> %WD_EList2%
  6.  
  7. REM ********************************************
  8. REM *** Convert to CRN              # Proc_DDS #
  9. REM ********************************************
  10. rem *** %1= Filename
  11. rem *** %2= Fourcc code
  12. rem *** %3= type of conversion
  13.  
  14. rem *** you can not use "." on the crunch commandline...
  15. set Tfile1="%~dpnx1"
  16. set Tfile2="%~dpn1".crn
  17.  
  18. rem echo %1   ~  [%2]   ~  %3   ~    [%Tfile1%]  ~ [%Tfile2%]
  19.  
  20. echo.
  21. echo Treating file: [%~nx1]
  22. echo.
  23.  
  24. if %3==CRN (
  25.  
  26.     rem **** to CRN: A8R8G8B8 => -DXT5A
  27.     crunch_x64 /outsamedir -file "%~dpnx1" -%2 -quality 128
  28.  
  29.     if exist "%~dpn1".%3 ( del "%~dpnx1" )
  30.  
  31. )
  32.  
  33. if %3==DDS (
  34.  
  35.     rem **** to DDS: DXT5A => -A8R8G8B8
  36.     crunch_x64 /outsamedir -file "%~dpn1.crn" -%2
  37.  
  38.     if exist "%~dpn1".%3 ( del "%~dpn1.crn" )
  39. )
  40.  
  41. if not exist "%~dpn1".%3 ( echo Compression Fault: "%~dpnx1" >> %WD_EList2% )
  42.  
  43. rem *** End of :Proc_DDS procedure...
  44.  
  45. exit