@echo off
REM Tick DOOM by Steve Blauwkamp and Chuck Fuoco
REM     Auto-install batch file


if exist doom2.wad goto doom2
if exist doom.wad goto doom1
echo Error: No DOOM files found
goto end

:doom1
:doom2
echo @echo off > tickdoom.bat
echo @echo Tick DOOM >> tickdoom.bat
echo dehacked -load tickdoom.deh >> tickdoom.bat
echo doomhack -file %1 %2 %3 %4 %5 tickgfx.wad ticksnd.wad tickspr.wad >> tickdoom.bat

echo Completing tickspr.wad...
deusf -doom . -sprites -app tickspr.wad
if ERRORLEVEL 0 goto okay
echo Error: the sprite completion failed
del tickdoom.bat
goto end

:okay
echo Tick DOOM ready to go.
echo Just type "tickdoom" to get her started.
:end
