echo off
setlocal

set BMSLN_CONV="..\..\BishamonSDK_DirectX9\converter\Matchlock.Bm3.Converter.exe"
set MODEL_CONV="..\..\BishamonSDK_DirectX9\converter\m3dg_conv_c14.exe"
set TEX_CONV="%DXSDK_DIR%Utilities\Bin\x86\texconv.exe"
set ENDIAN=little
set CHARACTER_CODE=utf-16
set PLATFORM=DirectX9

REM bmsln -> bmb
for /r %%i in (bmsln\*.bmsln) do (
	%BMSLN_CONV% --input="%%i" --database_dir=. --endian=%ENDIAN% --character_code=%CHARACTER_CODE%
)

REM dae -> m3r
for /r %%i in (model\*.dae) do (
	%MODEL_CONV% --input="%%i" --platform=%PLATFORM% --character_code=%CHARACTER_CODE%
)

REM png -> dds
for /r %%i in (texture\*.png) do (
	%TEX_CONV% -f DXT5 -o texture "%%i"
)
for /r %%i in (model\*.png) do (
	%TEX_CONV% -f DXT5 -o model "%%i"
)

endlocal
pause
