echo off
echo Making directory "\OLDGRAPH"
md \OLDGRAPH


echo Saving existing floor tiles to "\OLDGRAPH"
dmgraph DEM1_1     -e   \oldGRAPH\DEM1_1.GIF
dmgraph DEM1_2     -e   \oldGRAPH\DEM1_2.GIF
dmgraph DEM1_3     -e   \oldGRAPH\DEM1_3.GIF
dmgraph DEM1_4     -e   \oldGRAPH\DEM1_4.GIF
dmgraph FLOOR3_3   -e   \oldGRAPH\FLOOR3_3.GIF
dmgraph FLOOR4_1   -e   \oldGRAPH\FLOOR4_1.GIF
dmgraph FLOOR4_5   -e   \oldGRAPH\FLOOR4_5.GIF
dmgraph FLOOR4_6   -e   \oldGRAPH\FLOOR4_6.GIF
dmgraph FLOOR0_1   -e   \oldGRAPH\FLOOR0_1.GIF
dmgraph FLOOR0_3   -e   \oldGRAPH\FLOOR0_3.GIF
dmgraph FLOOR0_6   -e   \oldGRAPH\FLOOR0_6.GIF
dmgraph FLOOR5_4   -e   \oldGRAPH\FLOOR5_4.GIF
dmgraph COMP01     -e   \oldGRAPH\COMP01.GIF
dmgraph FLAT8      -e   \oldGRAPH\FLAT8.GIF
dmgraph FLAT9      -e   \oldGRAPH\FLAT9.GIF
dmgraph FLAT1_1    -e   \oldGRAPH\FLAT1_1.GIF
dmgraph FLAT1_2    -e   \oldGRAPH\FLAT1_2.GIF
dmgraph FLAT1_3    -e   \oldGRAPH\FLAT1_3.GIF
dmgraph CEIL3_3    -e   \oldGRAPH\CEIL3_3.GIF
dmgraph FLOOR0_5   -e   \oldGRAPH\FLOOR0_5.GIF
dmgraph FLAT18     -e   \oldGRAPH\FLAT18.GIF


echo Installing new tiles into DOOM.WAD
dmgraph DEM1_1     -s   %1BLUEBRN.GIF
dmgraph DEM1_2     -s   %1BLUEDIA.GIF
dmgraph DEM1_3     -s   %1BLUEMESH.GIF
dmgraph DEM1_4     -s   %1GREENBAR.GIF
dmgraph FLOOR3_3   -s   %1GRENMESH.GIF
dmgraph FLOOR4_1   -s   %1GREYRED.GIF
dmgraph FLOOR4_5   -s   %1ORNGARC.GIF
dmgraph FLOOR4_6   -s   %1REDBRN.GIF
dmgraph FLOOR0_1   -s   %1GRENBLUE.GIF
dmgraph FLOOR0_3   -s   %1REDSTARS.GIF
dmgraph FLOOR0_6   -s   %1RGMESH.GIF
dmgraph FLOOR5_4   -s   %1BLUSTARS.GIF
dmgraph COMP01     -s   %BLGRPLAS.GIF
dmgraph FLAT8      -s   %BLUEGRID.GIF
dmgraph FLAT9      -s   %GRENPLAS.GIF
dmgraph FLAT1_1    -s   %GRGRPLAS.GIF
dmgraph FLAT1_2    -s   %P-B-GRID.GIF
dmgraph FLAT1_3    -s   %PBR-GRID.GIF
dmgraph CEIL3_3    -s   %PURPGRID.GIF
dmgraph FLOOR0_5   -s   %RED-GRID.GIF
dmgraph FLAT18     -s   %YERDPLAS.GIF

echo erasing working files...
del  %1BLUEBRN.GIF
del  %1BLUEDIA.GIF
del  %1BLUEMESH.GIF
del  %1GREENBAR.GIF
del  %1GRENMESH.GIF
del  %1GREYRED.GIF
del  %1ORNGARC.GIF
del  %1REDBRN.GIF
del  %1GRENBLUE.GIF
del  %1REDSTARS.GIF
del  %1RGMESH.GIF
del  %1BLUSTARS.GIF
del  %BLGRPLAS.GIF
del  %BLUEGRID.GIF
del  %GRENPLAS.GIF
del  %GRGRPLAS.GIF
del  %P-B-GRID.GIF
del  %PBR-GRID.GIF
del  %PURPGRID.GIF
del  %RED-GRID.GIF
del  %YERDPLAS.GIF

echo Done.
echo To restore your original tiles, just run OLDFLOOR.BAT from your DOOM Directory
