@echo off if "%1"=="" goto usage if not exist patch.wad goto wad_error if not exist %1.gif goto file_error if not exist dmgraph.exe goto dmgraph_error if not exist wad2lmp.exe goto wad2lmp_error if "%2"=="" goto usage if "%3"=="" goto usage copy patch.wad temp.wad > nul dmgraph patch -s %1.gif -i %2,%3 -f temp.wad wad2lmp temp.wad %1.lmp del temp.wad goto end :wad_error echo. echo. echo ERROR: File PATCH.WAD does not exist in current directory. echo. echo. goto end :file_error echo. echo. echo ERROR: File %1.GIF does not exist in current directory. echo. echo. goto end :dmgraph_error echo. echo. echo ERROR: File DMGRAPH.EXE does not exist in current directory. echo. goto end :wad2lmp_error echo. echo. echo ERROR: File WAD2LMP.EXE does not exist in current directory. echo. goto end :usage echo. echo. echo Usage: doomtex gifname[.GIF] insert_x insert_y echo where insert_x and insert_y are the insertion points used by dmgraph. echo. echo Example: doomtex newpatch 0 0 echo where a file newpatch.gif exists in the current directory. echo. echo. :end