H.BAT 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. @echo off
  2. if "%1x"=="x" goto badargs
  3. if "%2x"=="x" goto badargs
  4. set hticargs=-noartiskip -warp %1 %2
  5. set hticwads=-file
  6. set hticnplay=
  7. :parseloop
  8. if "%3x"=="x" goto doneparse
  9. if "%3"=="m" goto nomonsters
  10. if "%3"=="M" goto nomonsters
  11. if "%3"=="s1" goto skill1
  12. if "%3"=="S1" goto skill1
  13. if "%3"=="s2" goto skill2
  14. if "%3"=="S2" goto skill2
  15. if "%3"=="s3" goto skill3
  16. if "%3"=="S3" goto skill3
  17. if "%3"=="s4" goto skill4
  18. if "%3"=="S4" goto skill4
  19. if "%3"=="s5" goto skill5
  20. if "%3"=="S5" goto skill5
  21. if "%3"=="n1" goto nplay1
  22. if "%3"=="N1" goto nplay1
  23. if "%3"=="n2" goto nplay2
  24. if "%3"=="N2" goto nplay2
  25. if "%3"=="n3" goto nplay3
  26. if "%3"=="N3" goto nplay3
  27. if "%3"=="n4" goto nplay4
  28. if "%3"=="N4" goto nplay4
  29. if "%3"=="p" goto altport
  30. if "%3"=="P" goto altport
  31. goto addwad
  32. :nomonsters
  33. set hticargs=%hticargs% -nomonsters
  34. shift
  35. goto parseloop
  36. :skill1
  37. set hticargs=%hticargs% -skill 1
  38. shift
  39. goto parseloop
  40. :skill2
  41. set hticargs=%hticargs% -skill 2
  42. shift
  43. goto parseloop
  44. :skill3
  45. set hticargs=%hticargs% -skill 3
  46. shift
  47. goto parseloop
  48. :skill4
  49. set hticargs=%hticargs% -skill 4
  50. shift
  51. goto parseloop
  52. :skill5
  53. set hticargs=%hticargs% -skill 5
  54. shift
  55. goto parseloop
  56. :nplay1
  57. set hticnplay=1
  58. shift
  59. goto parseloop
  60. :nplay2
  61. set hticnplay=2
  62. shift
  63. goto parseloop
  64. :nplay3
  65. set hticnplay=3
  66. shift
  67. goto parseloop
  68. :nplay4
  69. set hticnplay=4
  70. shift
  71. goto parseloop
  72. :altport
  73. set hticargs=%hticargs% -port 3
  74. shift
  75. goto parseloop
  76. :addwad
  77. set hticwads=%hticwads% %3.wad
  78. shift
  79. goto parseloop
  80. :badargs
  81. echo Usage: H episode map [s?] [m] [n?] [p] [wadfile [wadfile ...] ]
  82. echo.
  83. echo [s?] = skill (1-5)
  84. echo [m] = no monsters
  85. echo [n?] = net play (1-4)
  86. echo [p] = use alternate port setting
  87. echo [wadfile] = add external wadfile (.WAD is implicit)
  88. echo.
  89. goto end
  90. :doneparse
  91. if"%hticwads%"=="-file" goto startgame
  92. set hticargs=%hticargs% %hticwads%
  93. :startgame
  94. if"%hticnplay%x"=="x" goto normalplay
  95. echo -nodes %hticnplay% -deathmatch %hticargs%
  96. ipxsetup -nodes %hticnplay% -deathmatch %hticargs%
  97. goto end
  98. :normalplay
  99. echo %hticargs%
  100. heretic %hticargs%
  101. goto end
  102. :end
  103. set hticargs=
  104. set hticwads=
  105. set hticnplay=