@echo off
echo off
REM - PLAYLMP.BAT - RAL4HALL Batch .LMP Viewer (C) Sept 9th 1994 SWidlake
echo.

if not exist doom.wad goto err1
if not exist %1.zip goto err0

dir doom.wad > $$$$.tmp
find "WAD  10401760" < $$$$.tmp > $$$$.fin
copy $$$$.fin $$$$.chk > nul
if not exist $$$$.chk goto err5
echo.
echo DOOM.WAD ... OK
del $$$$.*

if not exist doom.exe goto err6

dir doom.exe > $$$$.tmp
find "DOOM     EXE" < $$$$.tmp > $$$$.dir
fc doom-exe.dir $$$$.dir > $$$$.tst
find "no diff" < $$$$.tst > $$$$.fin
copy $$$$.fin $$$$.chk > nul
if not exist $$$$.chk goto err3
echo.
echo DOOM.EXE ... OK
del $$$$.*

if not exist hallsall.wad goto err7

dir hallsall.wad > $$$$.tmp
find "HALLSALL WAD" < $$$$.tmp > $$$$.dir
fc hallsall.dir $$$$.dir > $$$$.tst
find "no diff" < $$$$.tst > $$$$.fin
copy $$$$.fin $$$$.chk > nul
if not exist $$$$.chk goto err4
echo.
echo HALLSALL.WAD ... OK
del $$$$.*

if not exist lmpc10.exe goto err8

dir lmpc10.exe > $$$$.tmp
find "LMPC10   EXE" < $$$$.tmp > $$$$.dir
fc lmpc10ex.dir $$$$.dir > $$$$.tst
find "no diff" < $$$$.tst > $$$$.fin
copy $$$$.fin $$$$.chk > nul
if not exist $$$$.chk goto err9
echo.
echo LMPC10.EXE ... OK
del $$$$.*

if exist $$$$.tmp del $$$$.tmp
pkunzip $$$$.tmp > $$$$.tmp
if not exist $$$$.tmp goto err2
del $$$$.tmp

:okay

pkunzip %1
if not exist %1.LMP goto errA
echo.
echo Please Note that the NAME of this Recorded file is :-)  "%1.LMP"
echo                                                          *----*----
echo.
echo Instructions : Enter "%1.LMP [Enter]"  ( Case doesn't matter )
echo.
echo                Then Select an Available view-point : 1 up to 4
echo.
echo.
echo                And then Press "[Enter]" Again to Quit ...
echo.                        *********************
REM pause
lmpc10 %1
doom -file hallsall.wad 151.wad -playdemo %1
del %1.lmp
echo.
echo.
echo.
echo Well I hope you enjoyed our murderous adventures in HALLSALL.Land
echo.
echo Send Money, oops, E-mail to swidlake@rl.ac.uk If You Want More ...
echo.
echo.
goto exit

:err0
echo.
echo Stupid User Error ! NO %%1[.LMP] File Specified ! Use GOHALL[2 to 9] !
goto exit
:err1
del $$$$.*
echo.
echo Error - The File DOOM.WAD is not present !!! Did Someone Erase it ???
goto exit
:err2
echo.
echo CRITICAL Error ! PKUNZIP is NOT on the Path so This .BAT WON'T WORK !
goto exit
:err3
del $$$$.*
echo.
echo Error - The File DOOM.EXE Doesn't "look" right! - 1.5 beta Required !
goto exit
:err4
del $$$$.*
echo.
echo Error - The File HALLSALL.WAD Doesn't "Look" right ! - Run SetHall !!
goto exit
:err5
del $$$$.*
echo.
echo Error - The File DOOM.WAD is Wrong or is Not Patched - Run SetHall !!
goto exit
:err6
echo.
echo Error - The File DOOM.EXE is not present !!! Did Someone Erase it ???
goto exit
:err7
echo.
echo Error - The File HALLSALL is not present !!! Did Someone Erase it ???
goto exit
:err8
echo.
echo Error - The File LMPC10.EXE is not present ! Did Someone Erase it ???
goto exit
:err9
del $$$$.*
echo.
echo Error - The File LMPC10.EXE Doesn't "Look" right ! PkUnZip LMPC10.ZIP
goto exit
:errA
echo.
echo CRITICAL Error!!! The Final UNZIP DIDN'T WORK - Out of Disk Space ?!?
goto exit
:exit
echo.
:stop

