@echo off

:menu
cls
echo Multiple Configuration Files Encountered
echo ========================================
echo Please choose a configuration file from the following list by pressing its
echo corresponding digit:
echo 1. prboom-plus.cfg
echo 2. glboom-plus.cfg
echo 3. doom.cfg                   (Doom/2 v1.9 config file)
echo 4. entryway.cfg               (Author's OpenGL config)
echo 0. exit
echo.
echo (glboom-plus.cfg will be used if no selection is made within 60 seconds.)
echo.

.\cfgs\CHOICE.COM /C:12340 /T:2,60

if errorlevel = 5 goto end
if errorlevel = 4 goto entryway
if errorlevel = 3 goto doom
if errorlevel = 2 goto glboom
if errorlevel = 1 goto prboom

goto end

:prboom
start prboom-plus.exe %1 %2 %3 %4 %5 %6 %7 %8 %9
goto end

:glboom
start glboom-plus.exe %1 %2 %3 %4 %5 %6 %7 %8 %9
goto end

:doom
start prboom-plus.exe -config .\cfgs\doom.cfg %1 %2 %3 %4 %5 %6 %7 %8 %9
goto end

:entryway
start glboom-plus.exe -config .\cfgs\entryway.cfg %1 %2 %3 %4 %5 %6 %7 %8 %9
goto end

:end
exit
