home *** CD-ROM | disk | FTP | other *** search
/ Action Ware 12: Heretic & Hexen / actionware12.iso / acware12 / graphics / edmap / build.bat < prev    next >
DOS Batch File  |  1995-02-01  |  2KB  |  71 lines

  1. @echo off
  2. rem --------------------------------------------------------------
  3. rem BUILD.BAT for EdMap v1.25+                (by Jeff Rabenhorst)
  4. rem
  5. rem         Edit this file to use a different NODE-BUILDER
  6. rem
  7. rem   Requires STUFFBUF.EXE to insert keystrokes into the buffer
  8. rem   and NPXTEST.EXE to test whether a NPX (80x87) is availible
  9. rem   and DOOM2WAD.EXE to convert PWAD map entries (DOOM1/DOOM2)
  10. rem --------------------------------------------------------------
  11.  
  12.     if not "%1"=="" goto ONEPARAM
  13.     error Missing WAD filename.
  14.     goto TEXTDESC
  15. :ONEPARAM
  16.     if "%1"=="/?" goto TEXTDESC
  17.     if "%1"=="-?" goto TEXTDESC
  18.     if exist %1.wad goto OKPARAMS
  19.     error %1.WAD does not exist.
  20.     goto TEXTDESC
  21. :OKPARAMS
  22.     if exist build.tmp del build.tmp > nul
  23.     copy %1.wad backup.wad > nul
  24.     DOOM2WAD %1.WAD 0
  25.     WAD_DWD %1.WAD TMP.DWD
  26.     echo .
  27.     if errorlevel 1 goto BUILDFAILED
  28.     erase %1.WAD
  29.     echo Building BSP data...
  30. :BUILDNOW
  31.     IDBSP TMP.DWD %1.WAD
  32.     if errorlevel 1 goto BUILDFAILED
  33.  
  34.         echo  
  35.         DOOM2WAD %1.WAD %2
  36.         echo  
  37.         echo Finished building PWAD; %1.WAD is now playable.
  38.         echo  
  39.         if "%4"=="" goto END
  40.           STUFFBUF !
  41.           EDMAPCOM %3 %4 BUILT OK
  42.         goto END
  43. :BUILDFAILED
  44.         copy backup.wad %1.wad > nul
  45.         if "%4"=="" goto FAILTEXT
  46.               EDMAPCOM %3 %4 PLAYMAP=FALSE
  47.               EDMAPCOM %3 %4 ERROR BuildFailed
  48. :FAILTEXT
  49.         echo BUILD FAILED!
  50.         echo PWAD RESTORED
  51.         goto END
  52. :NONPX
  53.         if "%4"=="" goto NONPXTEXT
  54.               EDMAPCOM %3 %4 PLAYMAP=FALSE
  55.               EDMAPCOM %3 %4 ERROR NoNPX
  56. :NONPXTEXT
  57.         echo BUILD FAILED!
  58.         echo No NPX (80x87) present for builder.
  59.         goto END
  60. :TEXTDESC
  61.     echo  
  62.     echo BUILD.BAT        
  63.     echo   PWAD node-builder (builds BSP data for maps)
  64.     echo  
  65.     echo format: BUILD filename
  66.     echo     ex: BUILD C:\DOOM\PWADS\CASTLE
  67.     echo  
  68.     goto END
  69. :END
  70. rem --------------------------------------------------------------
  71.