::------------------------------------------
::          script by BME/ILMHB 2012
::------------------------------------------

@ECHO OFF
CLS
IF NOT EXIST BARF.exe GOTO nobarf
IF NOT EXIST 3AITD GOTO nofolder
ECHO.
ECHO.
ECHO.
ECHO.
ECHO.
ECHO.
ECHO.
ECHO                     ----------------------------------------
ECHO                      Blood - Alone in The Dark 3 First Demo
ECHO                               by NoOne a.k.a. Diman
ECHO                     ----------------------------------------
ECHO.
ECHO.                             
MKDIR 3ACKUP
CHOICE /n /c:YN "                      Install shotgun model? (Y/N) "
IF ERRORLEVEL 2 GOTO bloodshotgun
IF ERRORLEVEL 1 GOTO gimmegun

:gimmegun
SET dukeshotgun=1
GOTO ask4snow

:bloodshotgun
SET dukeshotgun=0

:ask4snow
ECHO.
CHOICE /n /c:YN "                 Disable snowing to increase frame rate? (Y/N) "
IF ERRORLEVEL 2 goto goinst
IF ERRORLEVEL 1 goto nosnow

:nosnow
ECHO.
COPY TILES008.art 3ACKUP
CD 3AITD
COPY TILES008.art ..
CD ..

:goinst
ECHO.

COPY BLOOD.RFF 3ACKUP
COPY SOUNDS.RFF 3ACKUP
COPY *.dat 3ACKUP
COPY TILES015.art 3ACKUP
IF NOT EXIST TILES017.art GOTO t18
COPY TILES017.art 3ACKUP
:t18
IF NOT EXIST TILES018.art GOTO t19
COPY TILES018.art 3ACKUP
:t19
IF NOT EXIST TILES019.art GOTO doit
COPY TILES019.art 3ACKUP

:doit
CD 3AITD
COPY *.rfs ..
COPY 3AITD.ini ..
COPY 3AITD.map ..
COPY TILES015.art ..
COPY TILES017.art ..
COPY TILES018.art ..
COPY TILES019.art ..
COPY VOXEL.dat ..
COPY SURFACE.dat ..
CD ..
BARF BLOOD.rff  @KVX.rfs
BARF SOUNDS.rff @SND.rfs

IF "%dukeshotgun%"=="0" GOTO nodukegun
BARF BLOOD.rff  @WEAPON.rfs
BARF SOUNDS.rff @WEAPSND.rfs
:nodukegun
ECHO.
BLOOD -INI 3AITD.INI
CLS

DEL *.rfs
DEL 3AITD.INI
DEL 3AITD.MAP
DEL TILES017.art
DEL TILES018.art
DEL TILES019.art
DEL VOXEL.dat
DEL SURFACE.dat

CD 3ACKUP
COPY *.* ..
DEL *.*
CD ..
RD 3ACKUP

CLS
ECHO Installer by BME/ILMHB 2012.
ECHO.
ECHO All files restored!
ECHO.
GOTO done

:nobarf
ECHO ERROR! - BARF.EXE is required and must be in the main Blood folder!
GOTO end
:nofolder
ECHO ERROR! - 3AITD folder does not exist!
ECHO Make sure all files are EXTRACTED and NOT dragged from the ZIP!
GOTO end

:end
ECHO Installation aborted.
ECHO.
:done
