echo off
cd %VAR%
..\..\..\util\setconsole.exe /reset
echo.
echo Press 1 to play King's Quest IV: The Perils of Rosella using Tandy
echo Press 2 to play King's Quest IV: The Perils of Rosella using IBM PC
echo Press 3 to play King's Quest IV: The Perils of Rosella using ScummVM
echo.
echo Tandy only plays the AGI version of the game, however it has enhanced sound
echo compared to the IBM AGI version, which uses PC Speaker. The IBM also contains
echo the SCI version of the game (along with SoundBlaster ^& Roland MT-32 sound) and
echo an "Ultimate" version, which is documented in the IBM menu.
echo.
..\..\..\util\choice /C:123 /N Please Choose:

if errorlevel = 3 goto scummvm
if errorlevel = 2 goto dosbox
if errorlevel = 1 goto tandy

:dosbox
..\..\..\util\setconsole.exe /minimize
cd ..
cd ..
cd ..
".\emulators\dosbox\%dosbox%" -conf "%var%\dosbox.conf" -conf ".\emulators\dosbox\options.conf" -conf %conf% -noconsole -exit -nomenu
del stdout.txt
del stderr.txt
if exist glide.* del glide.*
if exist .\eXoDOS\CWSDPMI.swp del .\eXoDOS\CWSDPMI.swp
goto end

:tandy
..\..\..\util\setconsole.exe /minimize
cd ..
cd ..
cd ..
".\emulators\dosbox\%dosbox%" -conf "%var%\tandy.conf" -conf ".\emulators\dosbox\options.conf" -conf %conf% -noconsole -exit -nomenu
del stdout.txt
del stderr.txt
if exist glide.* del glide.*
if exist .\eXoDOS\CWSDPMI.swp del .\eXoDOS\CWSDPMI.swp
goto end

:scummvm
cd ..
cd ..
cd ..
cls
echo.
echo Press 1 to play using Sound Blaster for music
echo Press 2 to play using MT32 for music
echo.
.\util\choice /C:12 /N Please Choose:

if errorlevel = 2 goto svmmt32
if errorlevel = 1 goto svmsb

:svmsb
.\util\setconsole.exe /minimize
".\emulators\scummvm\scummvm.exe" --no-console -F -g3x --aspect-ratio -p.\eXoDOS\KQ4\scummvm kq4sci
goto end

:svmmt32
.\util\setconsole.exe /minimize
".\emulators\scummvm\scummvm.exe" --no-console -F -g3x -emt32 --extrapath=.\mt32\ --aspect-ratio -p.\eXoDOS\KQ4\scummvm kq4sci
goto end