@echo off
if %1a==a goto inst
if not exist DOOM.WAD goto chkshareware
:back
if not exist DMAUD.EXE goto nodmaud
if not exist %1\SND1.WAV goto badpath

set DMGOOFY=fine
goto header
:fine2
echo.
echo     You are about to permanently change the sounds in the copy of Doom
echo specified on the command line.  THIS PROCESS IS IRREVERSABLE!  If you
echo want to be able to have the original sounds back again, either back up
echo the DOOM.WAD(registered) or DOOM1.WAD(shareware) file before executing
echo this program or be prepared to reinstall Doom from the original disks.
echo. 
echo If you do not wish to proceed, you may press Ctrl-C now.
echo.
echo Otherwise, Please press any key...
pause > NUL
echo.
echo Beginning Process...
echo.
echo Installing Sound 1.....
dmaud 1 -q -s %1\snd1.wav
echo Installing Sound 2.....
dmaud 2 -q -s %1\snd2.wav
echo Installing Sound 3.....
dmaud 3 -q -s %1\snd3.wav
echo Installing Sound 4.....
dmaud 4 -q -s %1\snd4.wav
echo Installing Sound 5.....
dmaud 5 -q -s %1\snd5.wav
echo Installing Sound 6.....
dmaud 6 -q -s %1\snd6.wav
echo Installing Sound 7.....
dmaud 7 -q -s %1\snd7.wav
echo Installing Sound 8.....
dmaud 8 -q -s %1\snd8.wav
echo Installing Sound 9.....
dmaud 9 -q -s %1\snd9.wav
echo Installing Sound 10.....
dmaud 10 -q -s %1\snd10.wav
echo Installing Sound 11.....
dmaud 11 -q -s %1\snd11.wav
echo Installing Sound 12.....
dmaud 12 -q -s %1\snd12.wav
echo Installing Sound 13.....
dmaud 13 -q -s %1\snd13.wav
echo Installing Sound 14.....
dmaud 14 -q -s %1\snd14.wav
echo Installing Sound 15.....
dmaud 15 -q -s %1\snd15.wav
echo Installing Sound 16.....
dmaud 16 -q -s %1\snd16.wav
echo Installing Sound 17.....
dmaud 17 -q -s %1\snd17.wav
echo Installing Sound 18.....
dmaud 18 -q -s %1\snd18.wav
echo Installing Sound 19.....
dmaud 19 -q -s %1\snd19.wav
echo Installing Sound 20.....
dmaud 20 -q -s %1\snd20.wav
echo Installing Sound 21.....
dmaud 21 -q -s %1\snd21.wav
echo Installing Sound 22.....
dmaud 22 -q -s %1\snd22.wav
echo Installing Sound 23.....
dmaud 23 -q -s %1\snd23.wav
echo Installing Sound 24.....
dmaud 24 -q -s %1\snd24.wav
echo Installing Sound 25.....
dmaud 25 -q -s %1\snd25.wav
echo Installing Sound 26.....
dmaud 26 -q -s %1\snd26.wav
echo Installing Sound 27.....
dmaud 27 -q -s %1\snd27.wav
echo Installing Sound 28.....
dmaud 28 -q -s %1\snd28.wav
echo Installing Sound 29.....
dmaud 29 -q -s %1\snd29.wav
echo Installing Sound 30.....
dmaud 30 -q -s %1\snd30.wav
echo Installing Sound 31.....
dmaud 31 -q -s %1\snd31.wav
echo Installing Sound 32.....
dmaud 32 -q -s %1\snd32.wav
echo Installing Sound 33.....
dmaud 33 -q -s %1\snd33.wav
echo Installing Sound 34.....
dmaud 34 -q -s %1\snd34.wav
echo Installing Sound 35.....
dmaud 35 -q -s %1\snd35.wav
echo Installing Sound 36.....
dmaud 36 -q -s %1\snd36.wav
echo Installing Sound 37.....
dmaud 37 -q -s %1\snd37.wav
echo Installing Sound 38.....
dmaud 38 -q -s %1\snd38.wav
echo Installing Sound 39.....
dmaud 39 -q -s %1\snd39.wav
echo Installing Sound 40.....
dmaud 40 -q -s %1\snd40.wav
echo Installing Sound 41.....
dmaud 41 -q -s %1\snd41.wav
echo Installing Sound 42.....
dmaud 42 -q -s %1\snd42.wav
echo Installing Sound 43.....
dmaud 43 -q -s %1\snd43.wav
echo Installing Sound 44.....
dmaud 44 -q -s %1\snd44.wav
echo Installing Sound 45.....
dmaud 45 -q -s %1\snd45.wav
echo Installing Sound 46.....
dmaud 46 -q -s %1\snd46.wav
echo Installing Sound 47.....
dmaud 47 -q -s %1\snd47.wav
echo Installing Sound 48.....
dmaud 48 -q -s %1\snd48.wav
echo Installing Sound 49.....
dmaud 49 -q -s %1\snd49.wav
if exist DOOM1.WAD goto done
echo Installing Sound 50.....
dmaud 50 -q -s %1\snd50.wav
echo Installing Sound 51.....
dmaud 51 -q -s %1\snd51.wav
echo Installing Sound 52.....
dmaud 52 -q -s %1\snd52.wav
echo Installing Sound 53.....
dmaud 53 -q -s %1\snd53.wav
echo Installing Sound 54.....
dmaud 54 -q -s %1\snd54.wav
echo Installing Sound 55.....
dmaud 55 -q -s %1\snd55.wav
echo Installing Sound 56.....
dmaud 56 -q -s %1\snd56.wav
echo Installing Sound 57.....
dmaud 57 -q -s %1\snd57.wav
echo Installing Sound 58.....
dmaud 58 -q -s %1\snd58.wav
echo Installing Sound 59.....
dmaud 59 -q -s %1\snd59.wav
echo Installing Sound 60.....
dmaud 60 -q -s %1\snd60.wav
echo Installing Sound 61.....
dmaud 61 -q -s %1\snd61.wav
goto done


:header
cls
echo.
echo.
echo                _________________________________
echo                  Goofy Doom Sound Replacements
echo.
echo                        Brought to you by
echo.                    
echo                          The Skywalkyr
echo.
echo                         Thanks to: Gaea
echo                --------------------------------- 
echo.
if %DMGOOFY%==inst goto inst2
if %DMGOOFY%==fine goto fine2
if %DMGOOFY%==nodmaud goto nodmaud2
if %DMGOOFY%==nodoom goto nodoom2
if %DMGOOFY%==badpath goto badpath2
goto end

:inst
set DMGOOFY=inst
goto header
:inst2
echo.
echo To run, simply unzip this archive to a temporary directory, then invoke
echo this batch file from your Doom directory as follows:
echo.
echo  DMGOOFY path_to_archive
echo.
echo path_to_archive is the location of the files that accompanied this program.
echo.
echo.
echo     I hope this brings you as many laughs as it did me.  REGISTER DOOM!
echo The people of id need to be encouraged to make many many more awesome
echo games in the future, so show your support by registering your Doom today.
echo Besides, Episodes two & three make one look like a day at Disneyland! :-)
echo.
echo.
echo.
goto end

:nodmaud
set DMGOOFY=nodmaud
goto header
:nodmaud2
echo.
echo.
echo    You must have a copy of DMAUD.EXE, the Doom sound editor written by Bill
echo Neisius in order to use this program, and it must be in the Doom directory
echo that you are currently in.
echo.
echo.
goto end

:nodoom
set DMGOOFY=nodoom
goto header
:nodoom2
echo.
echo.
echo    You must run this program from the Doom directory where you want the
echo sounds installed.
echo.
echo.
goto end

:badpath
set DMGOOFY=badpath
goto header
:badpath2
echo.
echo.
echo    You must specify the path where this batch and its accompanying files
echo can be located.  ex.  C:\DOOM>DMGOOFY \TEMP
echo where \TEMP contains the files from this archive.
echo.
echo.
goto end

:chkshareware
if not exist DOOM1.WAD goto nodoom
goto back

:done
echo.
echo Done!  Now go laugh your BFG off!
echo.
echo.

:end
SET DMGOOFY=
