@echo off

:: Setup environment
set CDROM=f

:: Goto appropriate menu
if x%1%==x goto all
goto %1%
goto exit


:: Display selection menu for all games
:all
echo C. Crusader: No Remorse
echo D. Descent II
echo O. Doom*
echo U. Duke Nukem 3D
echo H. Heretic*
echo R. Heroes of Might and Magic*
echo M. MechWarrior 2
echo N. Nesticle
echo I. Nibbles
echo P. Privateer*
echo S. Star Wars: Dark Forces
echo F. Strife
echo T. Terminal Velocity
echo A. The Terminator: SkyNET and Future Shock
echo B. Tomb Raider Gold
echo W. Wing Commander*
echo.
echo E. Exit
echo.

:: Process selection
choice /c:cdouhrmnipsftabwe /n Launch which game?
if errorlevel 17 goto exit
if errorlevel 16 goto wing-menu
if errorlevel 15 goto tombraid
if errorlevel 14 goto skynet
if errorlevel 13 goto tv
if errorlevel 12 goto strife
if errorlevel 11 goto dark
if errorlevel 10 goto privateer-menu
if errorlevel 9 goto nibbles
if errorlevel 8 goto nesticle
if errorlevel 7 goto mech2
if errorlevel 6 goto homm-menu
if errorlevel 5 goto heretic
if errorlevel 4 goto duke3d
if errorlevel 3 goto doom-menu
if errorlevel 2 goto descent2
if errorlevel 1 goto crusader

:: Display selection menu for games with no special optimizations
:basic
echo 1. Descent II
echo 2. Doom*
echo 3. Duke Nukem 3D
echo 4. Heretic*
echo 5. Heroes of Might and Magic*
echo 6. MechWarrior 2
echo 7. Nesticle
echo 8. Nibbles
echo 9. Strife
echo a. Terminal Velocity
echo.
echo E. Exit
echo.

:: Process selection
choice /c:123456789ae /n Launch which game?
if errorlevel 10 goto exit
if errorlevel a goto tv
if errorlevel 9 goto strife
if errorlevel 8 goto nibbles
if errorlevel 7 goto nesticle
if errorlevel 6 goto mech2
if errorlevel 5 goto homm-menu
if errorlevel 4 goto heretic
if errorlevel 3 goto duke3d
if errorlevel 2 goto doom-menu
if errorlevel 1 goto descent2

:: Display selection menu for games w/ CD and w/o EMS
:noemscd
echo 1. Crusader: No Remorse
echo 2. The Terminator: SkyNET and Future Shock
echo 3. Wing Commander III: Heart of the Tiger (Requires CD)
echo 4. Wing Commander IV: The Price of Freedom (Requires CD)
echo.
echo E. Exit
echo.

:: Process selection
choice /c:1234e /n Launch which game?
if errorlevel 5 goto exit
if errorlevel 4 goto wc4
if errorlevel 3 goto wc3
if errorlevel 2 goto skynet
if errorlevel 1 goto crusader

:noemscdextreme
echo 1. Privateer 2: The Darkening (Requires CD)
echo.
echo E. Exit
echo.

:: Process selection
choice /c:1e /n Launch which game?
if errorlevel 2 goto exit
if errorlevel 1 goto priv2

:: Display selection menu for games w/ EMS and extreme optimizations
:emsextreme
echo 1. Wing Commander
echo 2. Wing Commander II: Vengence of the Kilrathi
echo 3. Wing Commander II: Special Operations 1
echo 4. Wing Commander II: Special Operations 2
echo.
echo E. Exit
echo.

:: Process selection
choice /c:1234e /n Launch which game?
if errorlevel 5 goto exit
if errorlevel 4 goto wc2-2
if errorlevel 3 goto wc2-1
if errorlevel 2 goto wc2
if errorlevel 1 goto wc1


:: Display selection menu for games w/ CD and w/o EMS, Mouse, or SmartDrive
:emscdnomnosd
echo 1. Tomb Raider Gold
echo.
echo E. Exit
echo.

:: Process selection
choice /c:1e /n Launch which game?
if errorlevel 2 goto exit
if errorlevel 1 goto tombraid

:: Display selection menu for games w/o EMS or SmartDrive
:noemsnosd
echo 1. Star Wars: Dark Forces
echo.
echo E. Exit
echo.

:: Process selection
choice /c:1e /n Launch which game?
if errorlevel 2 goto exit
if errorlevel 1 goto dark

:: Display selection menu for games w/o EMS and extreme optimizations
:noemsextreme
echo 1. Wing Commander: Privateer
echo 2. Wing Commander: Privateer: Righteous Fire
echo.
echo E. Exit
echo.

choice /c:12e /n Launch which game?
if errorlevel 3 goto exit
if errorlevel 2 goto rf
if errorlevel 1 goto privater

:crusader
pushd d:\games\crusader
c:\apps\fakecd.exe e:\crusader /l:%CDROM% >nul
crusader.exe
fakecd /uninstall >nul
goto pop

:descent2
pushd d:\games\descent2
descent2.exe -NoJoystick -NoNetwork -NoSerial
if exist *.swp del *.swp
goto pop

:doom-menu
echo 1. The Ultimate Doom
echo 2. Doom II: Hell on Earth
echo 3. Final Doom: The Plutonia Experiment
echo 4. Final Doom: TNT: Evilution
echo.
echo R. Return
echo.

choice /c:1234r /n Launch which game?
if errorlevel 5 goto all
if errorlevel 4 goto tnt
if errorlevel 3 goto plutonia
if errorlevel 2 goto doom2
if errorlevel 1 goto udoom

:udoom
pushd d:\games\dosdoom
dosdoom.exe -iwad doom.wad
goto pop

:doom2
pushd d:\games\dosdoom
dosdoom.exe -iwad doom2.wad
goto pop

:plutonia
pushd d:\games\dosdoom
dosdoom.exe -iwad plutonia.wad
goto pop

:tnt
pushd d:\games\dosdoom
dosdoom.exe -iwad tnt.wad
goto pop

:duke3d
pushd d:\games\duke3d
duke3d.exe
goto pop

:heretic-menu
echo 1. Heretic
echo 2. Hexen: Beyond Heretic
echo.
echo R. Return
echo.

choice /c:12r /n Launch which game?
if errorlevel 3 goto all
if errorlevel 2 goto hexen
if errorlevel 1 goto heretic

:heretic
pushd d:\games\heretic
heretic.exe
goto pop

:hexen
pushd d:\games\hexen
hexen.exe -nojoy
goto pop

:homm-menu
echo 1. Heroes of Might and Magic: A Strategic Quest
echo 2. Heroes of Might and Magic II: The Price of Loyalty
echo.
echo R. Return
echo.

choice /c:12r /n Launch which game?
if errorlevel 3 goto all
if errorlevel 2 goto heroes2
if errorlevel 1 goto heroes

:heroes
pushd d:\games\heroes
heroes.exe
goto pop

:heroes2
pushd d:\games\heroes2
heroes2.exe
goto pop

:mech2
pushd d:\games\mech2
c:\apps\fakecd.exe d:\games\mech2 /l:%CDROM% >nul
mech2.exe
c:\apps\fakecd.exe /unload >nul
goto pop

:nesticle
pushd d:\games\nesticle
nesticle.exe
goto pop

:nibbles
c:\dos\qbasic.exe /run c:\dos\nibbles.bas
goto skippop

:privateer-menu
echo 1. Wing Commander: Privateer
echo 2. Wing Commander: Privateer: Righteous Fire
echo 3. Privateer 2: The Darkening (Requires CD)
echo.
echo R. Return
echo.

choice /c:123r /n Launch which game?
if errorlevel 4 goto all
if errorlevel 3 goto priv2
if errorlevel 2 goto rf
if errorlevel 1 goto privater

:privater
d:
cd d:\games\privater
priv.exe
goto skippop

:rf
d:
cd d:\games\privater
rf.bat
goto skippop

:priv2
d:
cd d:\games\priv2
dark.exe
goto skippop

:dark
pushd d:\games\dark
copy /q cd.id c:
dark.exe
del /q c:\cd.id
goto pop

:strife
pushd d:\games\strife
strife1.exe
goto pop

:tv
pushd d:\games\tv
tv.exe
goto pop

:skynet
pushd d:\games\skynet
c:\apps\fakecd.exe e:\skynet /l:%CDROM% >nul
skynet.exe /j
if exist *.swp del *.swp
c:\apps\fakecd.exe /uninstall >nul
goto pop

:tombraid
pushd d:\games\tombraid
loadhigh c:\apps\fakecd.exe e:\tr1 /l:%CDROM% >nul
tomb_crk.com %CDROM%
tomb.exe
c:\apps\fakecd.exe /uninstall
goto pop

:wing-menu
echo 1. Wing Commander and The Secret Missions
echo 2. Wing Commander: The Secret Missions 2: Crusade
echo 3. Wing Commander II: Vengence of the Kilrathi
echo 4. Wing Commander II: Special Operations 1
echo 5. Wing Commander II: Special Operations 2
echo 6. Wing Commander III: Heart of the Tiger
echo 7. Wing Commander IV: The Price of Freedom
echo.
echo R. Return
echo.

choice /c:1234567r /n Launch which game?
if errorlevel 8 goto all
if errorlevel 7 goto wc4
if errorlevel 6 goto wc3
if errorlevel 5 goto wc2-2
if errorlevel 4 goto wc2-1
if errorlevel 3 goto wc2
if errorlevel 2 goto wc1-2
if errorlevel 1 goto wc1

:wc1
d:
cd d:\games\wc1
rem slowdown.com /MHz486:48 wc.exe
cpucache.com off
wc.exe
cpucache.com on
echo.
goto skippop

:wc1-2
d:
cd d:\games\wc1
cpucache.com off
sm2.exe
cpucache.com on
echo.
goto skippop

:wc2
d:
cd d:\games\wc2
cpucache.com off
wc2.exe
cpucache.com on
echo.
goto skippop

:wc2-1
d:
cd d:\games\wc2
cpucache.com off
so1.exe
cpucache.com on
echo.
goto skippop

:wc2-2
d:
cd d:\games\wc2
cpucache.com off
so2.exe
cpucache.com on
echo.
goto skippop

:wc3
pushd %CDROM%:
mkdir c:\wc3
copy /q d:\games\wc3\wc3.* c:\wc3
wc3.exe
copy c:\wc3\wc3.* d:\games\wc3
deltree /y c:\wc3 >nul
goto pop

:wc4
pushd d:\games\wc4
wc4.exe
goto pop

:pop
popd

:skippop
rem c:\apps\ansiplus\setaplus.exe mode 03h height 8 rate 30 delay 1

:exit
