home *** CD-ROM | disk | FTP | other *** search
/ WADS of WADS / WadsOfWads.1994.zip / OTHER / RUNDOOM1 / RUNDOOM.BAT < prev   
DOS Batch File  |  1994-08-24  |  9KB  |  310 lines

  1. @echo off
  2. goto Top
  3.  
  4.     ......................................................................
  5.     Created 8/7/94 
  6.     Copyright 1994, Larry Leonard.  All rights reserved. 
  7.     CompuServe 71753,2426
  8.  
  9.     Warranty Disclaimer - Users of RunDoom.Bat must accept this 
  10.     disclaimer of warranty: RunDoom.Bat is supplied "as is".  The author 
  11.     disclaims all warranties, expressed or implied, including, without 
  12.     limitation, the warranties of merchantability and of fitness for any 
  13.     purpose.  The author assumes no liability for damages, direct or 
  14.     consequential, which may result from the use of RunDoom.Bat.
  15.  
  16.     This program is FREEWARE and may be distributed freely.
  17.  
  18.     DOOM is a trademark of Id Software, inc.
  19.     ......................................................................
  20.  
  21.     ......................................................................
  22.     The public domain program ENTER.COM (written by Frank Tracy) should 
  23.     be placed in the same directory as this program. 
  24.     ......................................................................
  25.     
  26.     ......................................................................
  27.     SmartDrive notes: Very briefly, DOOM wants 4 Meg of RAM, so for best 
  28.     results, set SmartDrive to use all your RAM, less 4 Meg.  Disable 
  29.     all caching for all drives, except read caching on the drive with 
  30.     DOOM.WAD.  Now, before you run a WAD file, copy and then delete it, 
  31.     which loads it in the SmartDrive buffer.  
  32.  
  33.     IMPORTANT NOTE: If you're not running SmartDrive, comment out all 
  34.             the "smartdrv" commands.  Also, be aware that there
  35.             is a SMARTDRV in your DOS directory *and* in your
  36.             WINDOWS directory.  You should always use the one 
  37.             with the latest date (you may have to modify this
  38.             program, which uses the WINDOWS one).
  39.  
  40.     IMPORTANT NOTE: The command that copies the WAD file requires that 
  41.             you have enough disk space to do so.  In the case 
  42.             of DOOM.WAD this is about 10 Meg.  If you don't 
  43.             have enough space, you will see the error messages 
  44.             "Insufficient disk space" and "File not found".  
  45.             You may safely ignore these messages.
  46.     ......................................................................
  47.  
  48.  
  49. rem ......................................................................
  50. rem Check for help-seeking command line arguments.
  51. rem ......................................................................
  52.  
  53. :Top
  54. if /?==%1 goto Help
  55. if -?==%1 goto Help
  56.  
  57. rem ......................................................................
  58. rem Prepare SmartDrive.
  59. rem ......................................................................
  60.  
  61. c:\windows\smartdrv a- b- c  > nul
  62. c:\windows\smartdrv /r  > nul
  63.  
  64. rem ......................................................................
  65. rem Check for WAD file-loading command line arguments.
  66. rem ......................................................................
  67.  
  68. set file=%1.wad
  69. if not exist %file% goto Start
  70.  
  71. set episode=%2
  72. set level=%3
  73. set skill=%4
  74. goto Run
  75.  
  76. rem ......................................................................
  77. rem The beginning.
  78. rem ......................................................................
  79. :Start
  80. cls
  81. echo  ====================================================
  82. echo  RunDoom v1.0
  83. echo  Copyright 1994 - Larry Leonard - All Rights Reserved
  84. echo  ====================================================
  85.  
  86. rem ......................................................................
  87. rem Get the WAD file.
  88. rem ......................................................................
  89. echo.
  90. echo    A = Doom
  91. echo    B = Despair
  92. echo    C = DmHQ
  93. echo    D = LiteODay
  94. echo    E = RedRoom
  95. echo    F = TeethUpd
  96. echo    G = HiClimb
  97. echo    H = UAC Dead
  98. echo    I = Apocalypse
  99. echo    J = Abyss
  100. echo    K = ChrisK22
  101. echo    Q =    To Quit
  102. echo.
  103.  
  104. choice /C:QABCDEFGHIJK /N " Pick a file: "
  105.  
  106. if errorlevel 12 goto ChrisK22
  107. if errorlevel 11 goto Abyss
  108. if errorlevel 10 goto Apoclpse
  109. if errorlevel  9 goto Uacdead
  110. if errorlevel  8 goto Hiclimb
  111. if errorlevel  7 goto Teethupd
  112. if errorlevel  6 goto Redroom
  113. if errorlevel  5 goto Liteoday
  114. if errorlevel  4 goto Dmhq
  115. if errorlevel  3 goto Despair
  116. if errorlevel  2 goto Doom
  117. if errorlevel  1 goto Quit
  118.  
  119. rem ......................................................................
  120. rem Get the episode.
  121. rem ......................................................................
  122. :Episode
  123. cls
  124. echo  File %file%.
  125. echo.
  126. echo    1 = Knee-Deep in the Dead
  127. echo    2 = Shores of Hell
  128. echo    3 = Inferno
  129. echo    Q =    To Quit
  130. echo.
  131.  
  132. choice /C:123Q /N " Pick an Episode: "
  133. echo.
  134.  
  135. if errorlevel 4 goto Quit
  136. if errorlevel 1 set episode=1
  137. if errorlevel 2 set episode=2
  138. if errorlevel 3 set episode=3
  139.  
  140. rem ......................................................................
  141. rem Get the level (building).
  142. rem ......................................................................
  143. :Level
  144. cls
  145. echo  File %file%, episode %episode%.
  146. echo.
  147.  
  148. choice /C:123456789Q " Pick a Level "
  149.  
  150. if errorlevel 10 goto Quit
  151. if errorlevel  1 set level=1
  152. if errorlevel  2 set level=2
  153. if errorlevel  3 set level=3
  154. if errorlevel  4 set level=4
  155. if errorlevel  5 set level=5
  156. if errorlevel  6 set level=6
  157. if errorlevel  7 set level=7
  158. if errorlevel  8 set level=8
  159. if errorlevel  9 set level=9
  160.  
  161. rem ......................................................................
  162. rem Get the skill.
  163. rem ......................................................................
  164. :Skill
  165. cls
  166. echo  File %file%, episode %episode%, level %level%.
  167. echo.
  168. echo    1 = I'm too young to die!
  169. echo    2 = Not too rough!
  170. echo    3 = Hurt me plenty!
  171. echo    4 = Ultra-violence!
  172. echo    5 = NIGHTMARE!!!
  173. echo    Q =    To Quit
  174. echo.
  175.  
  176. choice /C:12345Q /N " Pick a Skill: "
  177.  
  178. if errorlevel 6 goto Quit       
  179. if errorlevel 1 set skill=1
  180. if errorlevel 2 set skill=2
  181. if errorlevel 3 set skill=3
  182. if errorlevel 4 set skill=4
  183. if errorlevel 5 set skill=5
  184.  
  185. rem ......................................................................
  186. rem Run DOOM!
  187. rem ......................................................................
  188. :Run
  189. echo.
  190. echo Running file %file%, episode %episode%, level %level%, skill %skill%.
  191. echo.
  192.  
  193. echo Loading SmartDrive buffer... please stand by...
  194. echo.
  195. copy %file% t$%file% > nul
  196. erase t$%file% > nul
  197.  
  198. set cmd=doom.exe -devparm -warp %episode% %level% -skill %skill%
  199. if not %file%==DOOM.WAD set cmd=%cmd% -file %file% 
  200.  
  201. if     exist enter.com  enter.com
  202. if     exist enter.com  %cmd% > ~rundoom.tmp
  203. if not exist enter.com  %cmd%
  204.  
  205. echo.
  206. echo That was file %file%, episode %episode%, level %level%, skill %skill%.
  207. echo.
  208. pause
  209. goto Start
  210.  
  211. rem ......................................................................
  212. rem Help.
  213. rem ......................................................................
  214. :Help
  215. echo.
  216. echo  RunDoom command-line syntax:
  217. echo.
  218. echo      RUNDOOM filename episode level skill
  219. echo.
  220. echo  Example:
  221. echo.
  222. echo      RUNDOOM HICLIMB 1 2 4
  223. echo.
  224. goto :Quit
  225.  
  226. rem ......................................................................
  227. rem Various WAD File Handlers.  Sorted alphabetically for ease-of-use.
  228. rem ......................................................................
  229.  
  230. :Abyss
  231. set file=ABYSS.WAD
  232. set episode=1
  233. set level=1
  234. goto Skill
  235.  
  236. :Apoclpse
  237. set file=APOCLPSE.WAD
  238. set episode=1
  239. set level=1
  240. goto Skill
  241.  
  242. :ChrisK22
  243. set file=CHRISK22.WAD
  244. set episode=2
  245. set level=2
  246. goto Skill
  247.  
  248. :Despair
  249. set file=DESPAIR.WAD
  250. set episode=2
  251. set level=2
  252. goto Skill
  253.  
  254. :Dmhq
  255. set file=DMHQ.WAD
  256. set episode=1
  257. set level=1
  258. goto Skill
  259.  
  260. :Doom
  261. set file=DOOM.WAD
  262. goto Episode
  263.  
  264. :Hiclimb
  265. set file=HICLIMB.WAD
  266. set episode=1
  267. set level=2
  268. goto Skill
  269.  
  270. :Liteoday
  271. set file=LITEODAY.WAD
  272. set episode=1
  273. set level=1
  274. goto Skill
  275.  
  276. :Redroom
  277. set file=REDROOM.WAD
  278. set episode=1
  279. set level=1
  280. goto Skill
  281.  
  282. :Teethupd
  283. set file=TEETHUPD.WAD
  284. set episode=2
  285. set level=1
  286. goto Skill
  287.  
  288. :Uacdead
  289. set file=UAC_DEAD.WAD
  290. set episode=1
  291. set level=8
  292. goto Skill
  293.  
  294. rem ......................................................................
  295. rem Quit Handler.  Note that we reset SmartDrive to what it was before we
  296. rem started.
  297. rem ......................................................................
  298. :Quit
  299. set file=
  300. set episode=
  301. set level=
  302. set skill=
  303. set cmd=
  304. c:\windows\smartdrv a+ b+ c+ > nul
  305. echo.
  306.  
  307. rem ......................................................................
  308. rem End of File
  309. rem ......................................................................
  310.