@echo off
SETLOCAL EnableDelayedExpansion
if not exist "bin\compressonator\compressonatorcli.exe" (
    echo Warning: bin\compressonator\compressonatorcli.exe not found.
    echo It is highly recommended to use compressonator for better results.
    set /p "letter=Do you still want to continue? (Y/N)?"
    
    if /i not "!letter!"=="Y" (
        goto end
    )
)

if exist "bin\compressonator\compressonatorcli.exe" (
    for %%a in ("*.dds") do (
        echo Processing %%a with Compressonator...
        bin\compressonator\compressonatorcli "%%a" "%%a" -fd BC1 -NumThreads 8
    )
) else (
    for %%a in ("*.dds") do (
        echo Processing %%a with Texconv...
        bin\texconv -y -f BC1_UNORM -m 1 "%%a"
    )
)

:end
ENDLOCAL
