@echo off
@color 0C
title H266MOD Batch Launcher
cls

:top
echo.
echo You are playing Hendricks266's H266MOD.
echo.
pause
echo.
if not exist eduke32.exe goto no
if exist hdukedc.grp goto dukedc
if exist dukedc.grp goto nodukedc
goto check

:nodukedc
echo You do have DukeDC, but you haven't run HDukeDC.bat yet.
echo Even if all you want to do is get rid of this warning, please
echo run HDukeDC.bat.
echo.
echo Note: H266MOD_DUKEDC.zip has all the files neccessary to run
echo HDukeDC.bat.
echo.
pause
goto check

:dukedc
echo Would you like to play with the Duke It Out In D.C. Addon enabled?
echo.
echo 1 - Yes (Note: DukeDC End of Episode cutscene will not work.)
echo 2 - No
echo.
goto dukedcchoice

:dukedcchoice
echo Please type the number of the your choice and press ENTER.
echo.
set choice=
set /p choice=What is your choice? 
echo.
if not '%choice%'=='' set choice=%choice:~0,1%
if '%choice%'=='1' goto check
if '%choice%'=='2' goto check
cls
echo.
echo "%choice%" is not valid. Please try again.
echo.
goto dukedc


:check
cls
echo.
echo Please do not close this window. It will close itself when you're done.
echo Technically, it will close itself when the EDuke32.exe process is closed.
if exist duke3d_xtr.zip goto xtr
if exist duke3d_hrp.zip goto hrp
goto run

:hrp
if '%choice%'=='1' goto dchrp
EDuke32.exe -hH266.def -xHEDuke.con -gduke3d_hrp.zip
goto end

:xtr
if '%choice%'=='1' goto dcxtr
EDuke32.exe -hH266.def -xHEDuke.con -gduke3d_xtr.zip
goto end



:dchrp
EDuke32.exe -hH266DC.def -xHDukeDC.con -gHDukeDC.grp -gduke3d_hrp.zip -gdukedc_hrp.zip
goto end

:dcxtr
EDuke32.exe -hH266DC.def -xHDukeDC.con -gHDukeDC.grp -gduke3d_xtr.zip -gdukedc_hrp.zip
goto end

:run
EDuke32.exe -hH266.def -xHEDuke.con
goto end

:no
cls
echo You don't have EDuke32.exe in your directory.
echo Aborting Launch.
echo.
pause
goto end

:end
exit
