cls
@echo off


if exist *.ART goto TILES


:INTRO


:CHOICE
cls
echo.
echo              * * * * * * * * * * * * * * * * * * * * * *
echo              *                                         *
echo              *     GET READY TO ENTER THE WORLD OF:    *
echo              *      TCM (Total Conversion Masters)     *                       
echo              *                                         *
echo              *                  MERC 2                 *
echo              *                Version 1.0              *
echo              *                                         *
echo              *                                         *
echo              * * * * * * * * * * * * * * * * * * * * * *
echo. 
echo  Choose your destiny!
echo.
echo 1. Single Player game
echo 2. Network or Modem game (dukematch)
echo 3. View Demos
echo 4. View the MERC 2 ReadMe File
echo 5. View the Credits
echo.
echo. 
echo. 
choice  /n /c:123456x "Make selection (or type X to exit): "

if ERRORLEVEL 6 GOTO EXIT
if ERRORLEVEL 5 GOTO CREDITS
if ERRORLEVEL 4 GOTO TEXT
if ERRORLEVEL 3 GOTO DEMO
if ERRORLEVEL 2 GOTO DMATCH
if ERRORLEVEL 1 GOTO SINGLE

CLS


:NOCHOICE

echo:
echo              ******************
echo              *     MERC 2     *
echo.             *   Version 1.0  *
echo              ******************
echo:
echo:
echo If you wish to play a network or modem game,
echo press CTRL+C now to exit and type the following at the
echo DOS prompt:  setup /xmerc2.con /merc2.grp
echo Then setup your multiplayer game as usual.
echo:
echo:
echo If you would like to play a single player game,
pause
cls
duke3d /xmerc2.con /gmerc2.grp

goto EXIT






:TILES
cls
echo:
echo:
echo Art tiles were found in your Duke Nukem directory:
echo:
echo:
echo MERC2 will not function properly if these files are present.  They
echo can be automatically backed up for you now, or you can exit, rename
echo or back them up yourself, and then run this program again.
echo:
echo:


echo Please select one of the following:
echo 1. Automatically backup the files and continue
echo 2. Exit


echo. 
echo. 
choice  /n /c:12 "Make selection: "




if ERRORLEVEL 2 GOTO EXIT
if ERRORLEVEL 1 GOTO BACKUP


:TILESNOCHOICE
cls

echo:
echo:
echo Art tiles were found in your Duke Nukem directory:
echo:
echo:
echo MERC2 will not function properly if these files are present.  They
echo can be automatically backed up for you now, or you can exit, rename
echo or back them up yourself, and then run this program again.
echo:
echo:
echo Press CTRL+C to exit or
echo:

pause

cls
rename tiles000.art tiles000.bak
rename tiles001.art tiles001.bak
rename tiles002.art tiles002.bak
rename tiles003.art tiles003.bak
rename tiles004.art tiles004.bak
rename tiles005.art tiles005.bak
rename tiles006.art tiles006.bak
rename tiles007.art tiles007.bak
rename tiles008.art tiles008.bak
rename tiles009.art tiles009.bak
rename tiles010.art tiles010.bak
rename tiles011.art tiles011.bak
rename tiles012.art tiles012.bak
rename tiles013.art tiles013.bak
rename tiles014.art tiles014.bak
rename tiles015.art tiles015.bak
rename tiles016.art tiles016.bak
rename tiles017.art tiles017.bak
rename tiles018.art tiles018.bak
rename tiles019.art tiles019.bak
rename tiles020.art tiles020.bak

cls
echo Your original .ART files have been backed up as
echo:
echo:
echo    TILES###.BAK
echo:
echo:
echo.
pause

goto INTRO





:BACKUP
cls
rename tiles000.art tiles000.bak
rename tiles001.art tiles001.bak
rename tiles002.art tiles002.bak
rename tiles003.art tiles003.bak
rename tiles004.art tiles004.bak
rename tiles005.art tiles005.bak
rename tiles006.art tiles006.bak
rename tiles007.art tiles007.bak
rename tiles008.art tiles008.bak
rename tiles009.art tiles009.bak
rename tiles010.art tiles010.bak
rename tiles011.art tiles011.bak
rename tiles012.art tiles012.bak
rename tiles013.art tiles013.bak
rename tiles014.art tiles014.bak
rename tiles015.art tiles015.bak
rename tiles016.art tiles016.bak
rename tiles017.art tiles017.bak
rename tiles018.art tiles018.bak
rename tiles019.art tiles019.bak
rename tiles020.art tiles020.bak
rem pause

cls
echo Your original files have been backed up as
echo:
echo:
echo    TILES###.BAK
echo:
echo:
echo They will be restored at the end of this session.
echo.
pause

goto INTRO


:DEMO
cls
echo.
echo.
echo There are three demos to choose from:
echo.
echo.
echo 1. Demo One: E1L4
echo.
echo 2. Demo Two: E1L6
echo.
echo 3. Demo Three: E2L2
echo.
echo.

choice  /n /c:123x "Make selection (or hit X to return): "

if ERRORLEVEL 4 GOTO INTRO
if ERRORLEVEL 3 GOTO DEMO3
if ERRORLEVEL 2 GOTO DEMO2
if ERRORLEVEL 1 GOTO DEMO1

:DEMO1
duke3d /xmerc2.con /gmerc2.grp /m /dm2demo1
goto INTRO


:DEMO2
duke3d /xmerc2.con /gmerc2.grp /m /dm2demo2
goto INTRO


:DEMO3
duke3d /xmerc2.con /gmerc2.grp /m /dm2demo3
goto INTRO


:TEXT
edit m2doc.mrc
if errorlevel 1 goto NOEDIT
cls
goto INTRO

:NOEDIT
cls
type m2doc.mrc |more
cls
goto INTRO

:CREDITS
edit m2crdts.mrc
if errorlevel 1 goto NOEDIT2
cls
goto INTRO

:CREDITS
cls
type m2crdts.mrc |more
cls
goto INTRO



:SINGLE
cls
duke3d /xmerc2.con /gmerc2.grp
goto INTRO


:DMATCH
cls
setup.exe /xmerc2.con /gmerc2.grp 
goto INTRO



:EXIT
cls
if exist *.BAK goto RESTORE

goto :DONE

:RESTORE
rename tiles000.bak tiles000.art
rename tiles001.bak tiles001.art
rename tiles002.bak tiles002.art
rename tiles003.bak tiles003.art
rename tiles004.bak tiles004.art
rename tiles005.bak tiles005.art
rename tiles006.bak tiles006.art
rename tiles007.bak tiles007.art
rename tiles008.bak tiles008.art
rename tiles009.bak tiles009.art
rename tiles010.bak tiles010.art
rename tiles011.bak tiles011.art
rename tiles012.bak tiles012.art
rename tiles013.bak tiles013.art
rename tiles014.bak tiles014.art
rename tiles015.bak tiles015.art
rename tiles016.bak tiles016.art
rename tiles017.bak tiles017.art
rename tiles018.bak tiles018.art
rename tiles019.bak tiles019.art
rename tiles020.bak tiles020.art

cls
echo.
echo.
echo Your original ART files have been restored.
echo.
echo.
pause



:DONE

cls
echo:
echo:
echo:
echo:
echo:
echo:
echo:
echo:
echo:
echo:
echo                           We hope you enjoyed MERC 2
echo:
echo                              Copyright 1998 TCM
echo:
echo:
echo:
echo:
echo:
echo:
echo:
echo:



