@echo off

:start
cls
echo Welcome to the Quake DeathMatch Pack v1.0d DEMO
echo.
echo [1] Configure QuakeDMP Network game (SETUP)
echo [2] Quickstart QuakeDMP (COMMIT)
echo [3] Activate QuakeDMP and Backup files
echo [4] Deactivate QuakeDMP and Restore files
echo [5] Quit
echo.
if not exist qdmp_act.001 echo QuakeDMP is not active.....
echo.
choice /c:12345 /n
if errorlevel 5 goto quit
if errorlevel 4 goto deactivate
if errorlevel 3 goto activate
if errorlevel 2 goto quickstartqdmp
if errorlevel 1 goto startqdmp


:startqdmp
echo.
echo Starting QuakeDMP.....
echo.
cd..
setup /xqdmpdemo\qdmp_13d.con %1 %2 %3 %4 %5 %6 %7 %8 %9
cd qdmpdemo
goto start

:quickstartqdmp
echo.
echo Starting QuakeDMP.....
echo.
cd..
commit /xqdmpdemo\qdmp_13d.con %1 %2 %3 %4 %5 %6 %7 %8 %9
cd qdmpdemo
goto start

:activate
cls
if exist qdmp_act.001 goto active

rem ----- BACKING UP -----
echo.
echo Backing up files.....
echo.

if exist backup\nul goto bu_mid
echo Creating Backup Directory ("\BACKUP").....
md backup
echo.

:bu_mid
if not exist ..\*.mid goto nomid
echo Backing up MID files.....
move ..\*.mid backup\
echo DONE!
echo.
goto bu_voc
:nomid
echo No MID files found
echo.

:bu_voc
if not exist ..\*.voc goto novoc
echo Backing up VOC files.....
move ..\*.voc backup\
echo DONE!
echo.
goto bu_wav
:novoc
echo No VOC files found
echo.

:bu_wav
if not exist ..\*.wav goto nowav
echo Backing up WAV files.....
move ..\*.wav backup\
echo DONE!
echo.
goto bu_art
:nowav
echo No WAV files found
echo.

:bu_art
if not exist ..\*.art goto noart
echo Backing up ART files.....
move ..\*.art backup\
echo DONE!
echo.
goto backuped
:noart
echo No ART files found
echo.

:backuped
echo.
echo Files Backuped
echo.
rem ----- BACKED UP -----

rem ----- ACTIVATING -----
move files\E1_MAP01.MAP ..
move files\E1_MAP02.MAP ..
move files\E1_MAP03.MAP ..
move files\E1_MAP04.MAP ..
move files\E1_MAP05.MAP ..
move files\E1_MAP06.MAP ..
move files\E1_MAP07.MAP ..
move files\E1_MAP09.MAP ..
move files\TILES000.ART ..
move files\TILES004.ART ..
move files\TILES014.ART ..
move files\TILES015.ART ..
move files\Title.mid ..
move files\map01.mid ..
move files\map02.mid ..
move files\map03.mid ..
move files\map04.mid ..
move files\map05.mid ..
move files\map06.mid ..
move files\map07.mid ..
move files\map09.mid ..
move files\barmusic.voc ..
move files\bonus.voc ..
move files\clax.voc ..
move files\compamb.voc ..
move files\drip3.voc ..
move files\edoor10.voc ..
move files\edoor11.voc ..
move files\fire09.voc ..
move files\gbelev01.voc ..
move files\gbelev02.voc ..
move files\geargrnd.voc ..
move files\GETITM19.VOC ..
move files\hydro22.voc ..
move files\hydro24.voc ..
move files\hydro27.voc ..
move files\hydro34.voc ..
move files\hydro40.voc ..
move files\hydro43.voc ..
move files\machamb.voc ..
move files\monolith.voc ..
move files\mustdie.voc ..
move files\onboard.voc ..
move files\opendoor.voc ..
move files\reactor.voc ..
move files\secret.voc ..
move files\slidoor.voc ..
move files\switch.voc ..
move files\teleport.voc ..
move files\wind54.voc ..
rem ----- ACTIVATED -----

echo > qdmp_act.001 This file is needed for QuakeDMP. Don't delete it !!!
echo.
echo QuakeDMP is now ACTIVE!!
echo.
pause
goto start
:active
echo.
echo QuakeDMP has already been activated
echo.
pause
goto start

:deactivate
cls
if not exist qdmp_act.001 goto inactive

rem ----- DEACTIVATING -----
move ..\E1_MAP01.MAP files\
move ..\E1_MAP02.MAP files\
move ..\E1_MAP03.MAP files\
move ..\E1_MAP04.MAP files\
move ..\E1_MAP05.MAP files\
move ..\E1_MAP06.MAP files\
move ..\E1_MAP07.MAP files\
move ..\E1_MAP09.MAP files\
move ..\TILES000.ART files\
move ..\TILES004.ART files\
move ..\TILES014.ART files\
move ..\TILES015.ART files\
move ..\Title.mid files\
move ..\map01.mid files\
move ..\map02.mid files\
move ..\map03.mid files\
move ..\map04.mid files\
move ..\map05.mid files\
move ..\map06.mid files\
move ..\map07.mid files\
move ..\map09.mid files\
move ..\barmusic.voc files\
move ..\bonus.voc files\
move ..\clax.voc files\
move ..\compamb.voc files\
move ..\drip3.voc files\
move ..\edoor10.voc files\
move ..\edoor11.voc files\
move ..\fire09.voc files\
move ..\gbelev01.voc files\
move ..\gbelev02.voc files\
move ..\geargrnd.voc files\
move ..\GETITM19.VOC files\
move ..\hydro22.voc files\
move ..\hydro24.voc files\
move ..\hydro27.voc files\
move ..\hydro34.voc files\
move ..\hydro40.voc files\
move ..\hydro43.voc files\
move ..\machamb.voc files\
move ..\monolith.voc files\
move ..\mustdie.voc files\
move ..\onboard.voc files\
move ..\opendoor.voc files\
move ..\reactor.voc files\
move ..\secret.voc files\
move ..\slidoor.voc files\
move ..\switch.voc files\
move ..\teleport.voc files\
move ..\wind54.voc files\
rem ----- DEACTIVATING -----

rem ----- RESTORING FILES -----
echo.
echo Restoring Backuped files.....
echo.

if not exist backup\*.* goto nofiles

:rs_mid
if not exist backup\*.mid goto nomid2
echo Restoring MID files.....
move backup\*.mid ..\
echo DONE!
echo.
goto rs_voc
:nomid2
echo No MID files to restore
echo.

:rs_voc
if not exist backup\*.voc goto novoc2
echo Restoring VOC files.....
move backup\*.voc ..\
echo DONE!
echo.
goto rs_wav
:novoc2
echo No VOC files to restore
echo.

:rs_wav
if not exist backup\*.wav goto nowav2
echo Restoring WAV files.....
move backup\*.wav ..\
echo DONE!
echo.
goto rs_art
:nowav2
echo No WAV files to restore
echo.

:rs_art
if not exist backup\*.art goto noart2
echo Restoring ART files.....
move backup\*.art ..\
echo DONE!
echo.
goto restored
:noart2
echo No ART files to restore
echo.
goto restored

:nofiles
echo No files to restore
echo.
rem ----- RESTORED FILES -----

:restored
del qdmp_act.001
echo.
echo QuakeDMP is now INACTIVE!!
echo.
pause
goto start
:inactive
echo.
echo QuakeDMP is not active
echo.
pause
goto start

:quit
echo.
echo Quake DeathMatch Pack v1.0d DEMO -by- Frag Control Society
echo ----- Frag Control Society are WolfHead and MikeRST -----
