home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / games / volume16 / nethck31 / patch3d < prev    next >
Encoding:
Internet Message Format  |  1993-07-23  |  60.2 KB

  1. Path: uunet!news.tek.com!saab!billr
  2. From: billr@saab.CNA.TEK.COM (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v18i037:  nethack31 - display oriented dungeons & dragons (Ver. 3.1), Patch3d/18
  5. Date: 20 Jul 1993 22:32:27 GMT
  6. Organization: Tektronix, Inc, Redmond, OR, USA
  7. Lines: 1780
  8. Approved: billr@saab.CNA.TEK.COM
  9. Message-ID: <22hrpr$9pr@ying.cna.tek.com>
  10. NNTP-Posting-Host: saab.cna.tek.com
  11. Xref: uunet comp.sources.games:1837
  12.  
  13. Submitted-by: izchak@linc.cis.upenn.edu (Izchak Miller)
  14. Posting-number: Volume 18, Issue 37
  15. Archive-name: nethack31/patch3d
  16. Patch-To: nethack31: Volume 16, Issue 1-116
  17. Environment: Amiga, Atari, Mac, MS-DOS, Windows-NT, OS2, Unix, VMS, X11
  18.  
  19.  
  20.  
  21. #! /bin/sh
  22. # This is a shell archive.  Remove anything before this line, then unpack
  23. # it by saving it into a file and typing "sh file".  To overwrite existing
  24. # files, type "sh file -c".  You can also feed this as standard input via
  25. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  26. # will see the following message at the end:
  27. #        "End of archive 4 (of 18)."
  28. # Contents:  patches03e sys/msdos/msdos.hlp
  29. # Wrapped by billr@saab on Tue Jul 20 14:57:19 1993
  30. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  31. if test -f 'patches03e' -a "${1}" != "-c" ; then 
  32.   echo shar: Renaming existing file \"'patches03e'\" to \"'patches03e.orig'\"
  33.   mv -f 'patches03e' 'patches03e.orig'
  34. fi
  35. echo shar: Extracting \"'patches03e'\" \(53675 characters\)
  36. sed "s/^X//" >'patches03e' <<'END_OF_FILE'
  37. X*** /tmp/da22173    Mon Jul 12 17:39:27 1993
  38. X--- sys/msdos/Install.dos    Mon Jul 12 14:10:02 1993
  39. X***************
  40. X*** 1,13 ****
  41. X!     SCCS Id: @(#)Install.dos     3.1        93/05/10
  42. X  
  43. X          Copyright (c) NetHack PC Development Team 1990 - 1993.
  44. X!         NetHack may be freely redistributed.  See license for details.
  45. X!         ======================================================
  46. X!             Instructions for compiling and installing
  47. X!                  NetHack 3.1 on an MS-DOS system
  48. X!         ======================================================
  49. X!                  (or, How to make PC NetHack 3.1)
  50. X!                     Last revision: May 10, 1993
  51. X  
  52. X  Credit for a runnable full PC NetHack 3.1 goes to the PC Development team
  53. X  of Norm Meluch, Kevin Smolkowski, Paul Winner, Michael Allison and Steve
  54. X--- 1,13 ----
  55. X!     SCCS Id: @(#)Install.dos     3.1        93/07/07
  56. X  
  57. X          Copyright (c) NetHack PC Development Team 1990 - 1993.
  58. X!        NetHack may be freely redistributed.  See license for details.
  59. X!        ==============================================================
  60. X!               Instructions for compiling and installing
  61. X!                     NetHack 3.1 on an MS-DOS system
  62. X!          ======================================================
  63. X!                   (or, How to make PC NetHack 3.1)
  64. X!                      Last revision: July 11, 1993
  65. X  
  66. X  Credit for a runnable full PC NetHack 3.1 goes to the PC Development team
  67. X  of Norm Meluch, Kevin Smolkowski, Paul Winner, Michael Allison and Steve
  68. X***************
  69. X*** 25,40 ****
  70. X  
  71. X      Microsoft C 6.0a
  72. X      Microsoft C 7.0 and Microsoft Visual C++ Professional (MSVC) 1.0
  73. X!     DJGPP       1.9   (gcc version 2.2 for msdos,
  74. X!                        free from your local archive sites)
  75. X  
  76. X      For specific details concerning each compiler, please see the
  77. X      corresponding appendix.
  78. X  
  79. X      All the makefiles were created for use with NDMAKE.  The make programs
  80. X!     provided by the various vendors all seem to lack necessary features.
  81. X      NDMAKE is available free from your local archive site.
  82. X  
  83. X      You may find it useful to obtain copies of lex (flex) and yacc (bison).
  84. X      While not strictly necessary to compile nethack, they are required should
  85. X      you desire to make any changes to the level and dungeon compilers.
  86. X--- 25,44 ----
  87. X  
  88. X      Microsoft C 6.0a
  89. X      Microsoft C 7.0 and Microsoft Visual C++ Professional (MSVC) 1.0
  90. X!     DJGPP       1.9 or later
  91. X  
  92. X      For specific details concerning each compiler, please see the
  93. X      corresponding appendix.
  94. X  
  95. X      All the makefiles were created for use with NDMAKE.  The make programs
  96. X!     provided by the various vendors all seem to lack necessary features,
  97. X!     or differ enough in their syntax that the supplied makefiles won't
  98. X!     work.  That is the case with 'nmake' supplied with the MSC compiler.  
  99. X      NDMAKE is available free from your local archive site.
  100. X  
  101. X+     If you want to build a copy of NetHack that is identical to the
  102. X+     "official binaries", please see appendix A.
  103. X+ 
  104. X      You may find it useful to obtain copies of lex (flex) and yacc (bison).
  105. X      While not strictly necessary to compile nethack, they are required should
  106. X      you desire to make any changes to the level and dungeon compilers.
  107. X***************
  108. X*** 73,79 ****
  109. X      termcap.zip.  termcap.zip contains several files of termcap routines.
  110. X      Using them with NetHack involves very little knowledge of the UNIX concept
  111. X      of a termcap database; mostly you need to know enough to set a TERM
  112. X!     environment variable.  You can unzip termcap.zip in the sys/msdos
  113. X      directory, but if you are going to use it, it is probably better to
  114. X      unzip a copy in a special directory and copy the library files to where
  115. X      your linker can find them.
  116. X--- 77,83 ----
  117. X      termcap.zip.  termcap.zip contains several files of termcap routines.
  118. X      Using them with NetHack involves very little knowledge of the UNIX concept
  119. X      of a termcap database; mostly you need to know enough to set a TERM
  120. X!     environment variable.  You can unzip termcap.zip in the sys/share
  121. X      directory, but if you are going to use it, it is probably better to
  122. X      unzip a copy in a special directory and copy the library files to where
  123. X      your linker can find them.
  124. X***************
  125. X*** 83,88 ****
  126. X--- 87,96 ----
  127. X      and generates termcap.lib, Makegcc.lib works with DJGPP and generates
  128. X      libtermc.a.
  129. X  
  130. X+     Note that you only need the termcap library if you have changed 
  131. X+     pcconf.h to define TERMLIB, and commented out the #define NO_TERMS 
  132. X+     (See point 6).
  133. X+ 
  134. X  4.  ovlmgr.uu (MS-DOS overlay manager) is the uuencoded assembled
  135. X      object module for the overlay manager used with Microsoft C 6.0
  136. X      and older.  This file is provided in case you do not have an assembler
  137. X***************
  138. X*** 104,117 ****
  139. X  
  140. X      First check config.h according to the comments to match your system and
  141. X      desired set of features.  Mostly you need to check the WIZARD option,
  142. X!     make sure the HACKDIR is set properly, and check TERMLIB and COMPRESS.
  143. X  
  144. X      We've managed to enable all the special features.  You may include all
  145. X!     or as few of them as you wish.
  146. X  
  147. X      Also check pcconf.h, which should not need much editing (if you are
  148. X!     including termcap.uu and random.c).  If you are not including random.c
  149. X!     you will need to comment out RANDOM. 
  150. X  
  151. X      There are several options available for screen management with this
  152. X      release of PC NetHack.  The features #define TERMLIB, #define
  153. X--- 112,128 ----
  154. X  
  155. X      First check config.h according to the comments to match your system and
  156. X      desired set of features.  Mostly you need to check the WIZARD option,
  157. X!     make sure the HACKDIR is set properly or disabled, and check TERMLIB
  158. X!     and COMPRESS.
  159. X  
  160. X      We've managed to enable all the special features.  You may include all
  161. X!     or as few of them as you wish.  To conserve disk space, you may wish
  162. X!     to disable LOGFILE and NEWS.
  163. X  
  164. X      Also check pcconf.h, which should not need much editing (if you are
  165. X!     including random.c, and if you do not require termcap for screen
  166. X!     management).  If you are not including random.c you will need to 
  167. X!     comment out RANDOM. 
  168. X  
  169. X      There are several options available for screen management with this
  170. X      release of PC NetHack.  The features #define TERMLIB, #define
  171. X***************
  172. X*** 118,139 ****
  173. X      ANSI_DEFAULT, and #define NO_TERMS in pcconf.h control the various
  174. X      options.
  175. X  
  176. X!     Commenting out the #define TERMLIB in pcconf.h to disable use of termcap
  177. X!     routines means relying on either the ANSI_DEFAULT feature, or the
  178. X!     NO_TERMS feature, and will make your job a bit easier.
  179. X!     You can elect to compile with both TERMLIB and ANSI_DEFAULT
  180. X!     and simply not set your TERM variable if you do not wish to use the
  181. X!     termcap file settings.  The NO_TERMS feature has the advantage of not
  182. X!     needing the DEVICE=ANSI.SYS statement in config.sys.  It will not
  183. X!     work with TERMLIB, nor with ANSI_DEFAULT.  It uses internal routines 
  184. X!     for screen management, and may be an ideal choice if your
  185. X!     play machine is industry standard (has an IBM compatible BIOS).
  186. X  
  187. X!     Should you define NO_TERMS, only define one of the two screen
  188. X!     access methods.  If compiling for Microsoft machines, use
  189. X!     SCREEN_BIOS, if using DJGPP you can choose between SCREEN_BIOS
  190. X      and SCREEN_DJGPPFAST.  Never, never, ever choose both.  Bad things
  191. X      will happen.
  192. X      
  193. X      If you are using a Microsoft compiler you should make doubly certain
  194. X      that OVERLAY is defined in pcconf.h, since otherwise things will 
  195. X--- 129,157 ----
  196. X      ANSI_DEFAULT, and #define NO_TERMS in pcconf.h control the various
  197. X      options.
  198. X  
  199. X!     The NO_TERMS feature (the default) has the advantage of not needing the
  200. X!     DEVICE=ANSI.SYS statement in config.sys.  The supplied sources and
  201. X!     header files are distributed with support for NO_TERMS enabled.  
  202. X!     NO_TERMS will not work with TERMLIB, nor with ANSI_DEFAULT defined.  
  203. X!     The NO_TERMS feature uses internal routines for screen management, and 
  204. X!     may be an ideal choice if your play machine is industry standard (has 
  205. X!     an IBM compatible BIOS).
  206. X  
  207. X!     Should you choose to leave NO_TERMS defined, define only one of the two 
  208. X!     screen access methods.  If compiling for Microsoft compilers, use
  209. X!     SCREEN_BIOS; if using DJGPP, you can choose between SCREEN_BIOS
  210. X      and SCREEN_DJGPPFAST.  Never, never, ever choose both.  Bad things
  211. X      will happen.
  212. X+ 
  213. X+     If you leave the #define TERMLIB commented in pcconf.h to disable use
  214. X+     of termcap routines, then your screen management must rely on either 
  215. X+     the NO_TERMS feature described above, or the ANSI_DEFAULT feature.  
  216. X+     Either of these will make your job a bit easier than if you choose to 
  217. X+     use TERMLIB.  If you elect to include TERMLIB support, you may compile 
  218. X+     with both TERMLIB and ANSI_DEFAULT, and simply not set your TERM variable 
  219. X+     if you do not wish to use the termcap file settings.  You will need
  220. X+     to uudecode the termcap library in sys\share if you are using the TERMLIB
  221. X+     feature.  
  222. X      
  223. X      If you are using a Microsoft compiler you should make doubly certain
  224. X      that OVERLAY is defined in pcconf.h, since otherwise things will 
  225. X***************
  226. X*** 154,164 ****
  227. X      commenting out RANDOM in pcconf.h or tosconf.h, comment out (or set equal
  228. X      to nothing) the RANDOM macro in your Makefile.
  229. X  
  230. X!     If you elected not to use termcap, then comment out (or set equal to
  231. X!     nothing) the TERMLIB macro in your Makefile.
  232. X      
  233. X!     That is,    TERMLIB = (SSYS)\termlib.lib
  234. X!     should be   TERMLIB =
  235. X  
  236. X      If you are recompiling after patching your sources, or if you got your
  237. X      files from somewhere other than the official distribution, "touch
  238. X--- 172,183 ----
  239. X      commenting out RANDOM in pcconf.h or tosconf.h, comment out (or set equal
  240. X      to nothing) the RANDOM macro in your Makefile.
  241. X  
  242. X!     If you elected to use termcap (TERMLIB defined), then uncomment the 
  243. X!     TERMLIB macro in your Makefile that points to the location of the
  244. X!     library.
  245. X      
  246. X!     That is,    TERMLIB =
  247. X!     should be   TERMLIB = (SSYS)\termlib.lib
  248. X  
  249. X      If you are recompiling after patching your sources, or if you got your
  250. X      files from somewhere other than the official distribution, "touch
  251. X***************
  252. X*** 184,189 ****
  253. X--- 203,212 ----
  254. X      termcap to your game directory.  Edit NetHack.cnf to reflect your
  255. X      particular setup and personal preferences, by following the comments.
  256. X  
  257. X+     Also, make sure the file msdos.hlp made it to your game directory.
  258. X+     If it didn't, move it from sys\msdos to your game directory
  259. X+     yourself.
  260. X+ 
  261. X      If you'll be running NetHack from a different subdirectory, you will
  262. X      want to "set HACKDIR=c:\games\nethack" (or whatever drive and directory 
  263. X      you want to use) now.  Add it to your autoexec.bat (in DOS), as you'll
  264. X***************
  265. X*** 191,199 ****
  266. X  
  267. X  11. Play NetHack.  If it works, you're done!
  268. X  
  269. X  
  270. X! Appendix A - Microsoft C Compilers
  271. X  
  272. X      You can compile NetHack using almost any version of Microsoft C later
  273. X      than 5.1, including Microsoft Visual C++ Professional 1.0.  MSC Versions
  274. X      5.0 and earlier are broken in such a way that it is impossible to use 
  275. X--- 214,243 ----
  276. X  
  277. X  11. Play NetHack.  If it works, you're done!
  278. X  
  279. X+ Appendix A - Building the "offical binaries"
  280. X  
  281. X!     If you wish to build a copy of NetHack identical to the ones that
  282. X!     the pc team distributes, observe the following:
  283. X  
  284. X+     For the binary built with Microsoft C 7.00, make no changes to
  285. X+     any of the defines.  
  286. X+ 
  287. X+     For the 386 binary built with DJGPP, set the following
  288. X+     - include/pcconf.h
  289. X+       comment out #SCREEN_BIOS
  290. X+       define SCREEN_DJGPPFAST
  291. X+ 
  292. X+     Make sure the following files have been converted from the
  293. X+     unix style "^J" end of line, to the msdos style "^M^J":
  294. X+       license, help, hh, termcap, history, cmdhelp wizhelp and
  295. X+       nethack.cnf.
  296. X+ 
  297. X+     Uudecode nhico.uu nhpif.uu.
  298. X+ 
  299. X+     Place all the files in a clean directory and test.
  300. X+ 
  301. X+ Appendix B - Microsoft C Compilers
  302. X+ 
  303. X      You can compile NetHack using almost any version of Microsoft C later
  304. X      than 5.1, including Microsoft Visual C++ Professional 1.0.  MSC Versions
  305. X      5.0 and earlier are broken in such a way that it is impossible to use 
  306. X***************
  307. X*** 269,275 ****
  308. X      The Microsoft Visual C++ Professional compiler can utilize the same
  309. X      Makefiles and instructions for compiling as Microsoft C version 7.0.
  310. X  
  311. X! Appendix B - DJGPP Compiler (gcc ported to msdos)
  312. X  
  313. X      If you have a 386 or better machine, you are in luck.  You can compile
  314. X      NetHack without spending money on a compiler.  DJGPP is available free
  315. X--- 313,319 ----
  316. X      The Microsoft Visual C++ Professional compiler can utilize the same
  317. X      Makefiles and instructions for compiling as Microsoft C version 7.0.
  318. X  
  319. X! Appendix C - DJGPP Compiler (gcc ported to msdos)
  320. X  
  321. X      If you have a 386 or better machine, you are in luck.  You can compile
  322. X      NetHack without spending money on a compiler.  DJGPP is available free
  323. X***************
  324. X*** 281,297 ****
  325. X      dungeon compilers.  They should be available at the same place you got
  326. X      djgpp.
  327. X  
  328. X!     The executable version of NetHack built with DJGPP runs in protected mode
  329. X!     without overlays and is quite fast.  It cannot run under Microsoft
  330. X!     Windows.  See the DJGPP documentation for more details on particular
  331. X!     memory requirements.
  332. X  
  333. X      If you want to use the built-in DJGPP screen routines, uncomment
  334. X      SCREEN_DJGPPFAST in pcconf.h.  Note that some of these routines
  335. X!     seem to be broken so we pick and choose the ones that work.  See
  336. X!     video.c for details. 
  337. X  
  338. X! Appendix C - Borland C Compiler
  339. X  
  340. X      NetHack will not compile at all with any version of Turbo C/C++.  It
  341. X      has been made to compile with Borland C v2.0 after much work, but the
  342. X--- 325,339 ----
  343. X      dungeon compilers.  They should be available at the same place you got
  344. X      djgpp.
  345. X  
  346. X!     The latest version of djgpp, 1.10, will produce a binary that will
  347. X!     run under Microsoft Windows.
  348. X  
  349. X      If you want to use the built-in DJGPP screen routines, uncomment
  350. X      SCREEN_DJGPPFAST in pcconf.h.  Note that some of these routines
  351. X!     are broken under early versions of the compiler, so we pick and 
  352. X!     choose the ones that work.  See video.c for details. 
  353. X  
  354. X! Appendix D - Borland C Compiler
  355. X  
  356. X      NetHack will not compile at all with any version of Turbo C/C++.  It
  357. X      has been made to compile with Borland C v2.0 after much work, but the
  358. X***************
  359. X*** 331,337 ****
  360. X         to convert the raw data files into game readable form.  If you
  361. X         get errors then something is wrong.
  362. X  
  363. X! Appendix D - Microsoft C Compiler Warnings
  364. X  
  365. X      If you are using MSC for your compile with any of the /W levels set,
  366. X      you can expect warnings.  The list below are those warnings that we
  367. X--- 373,379 ----
  368. X         to convert the raw data files into game readable form.  If you
  369. X         get errors then something is wrong.
  370. X  
  371. X! Appendix E - Microsoft C Compiler Warnings
  372. X  
  373. X      If you are using MSC for your compile with any of the /W levels set,
  374. X      you can expect warnings.  The list below are those warnings that we
  375. X*** /tmp/da22197    Mon Jul 12 17:39:35 1993
  376. X--- sys/msdos/MakeMSC.src    Mon Jul 12 13:51:23 1993
  377. X***************
  378. X*** 1,4 ****
  379. X! # SCCS Id: @(#)MakeMSC.src    3.1    93/05/23
  380. X  # Copyright (c) NetHack PC Development Team 1992, 1993
  381. X  # PC NetHack 3.1 Makefile for Microsoft(tm) "C" >= 6.0ax and MSVC >= 1.0
  382. X  #
  383. X--- 1,4 ----
  384. X! # SCCS Id: @(#)MakeMSC.src    3.1    93/07/11
  385. X  # Copyright (c) NetHack PC Development Team 1992, 1993
  386. X  # PC NetHack 3.1 Makefile for Microsoft(tm) "C" >= 6.0ax and MSVC >= 1.0
  387. X  #
  388. X***************
  389. X*** 67,73 ****
  390. X  # command line exceeds the MSDOS 128 character limit.
  391. X  #
  392. X  CFLAGS    = /c
  393. X! LFLAGS    = /noi /seg:512 /map /st:5120 /DYNAMIC:1050 /INFO
  394. X  OVLMUCKING =    # None required
  395. X  MSC6MUCK =    # None required
  396. X  OVERLAY =    # None required
  397. X--- 67,73 ----
  398. X  # command line exceeds the MSDOS 128 character limit.
  399. X  #
  400. X  CFLAGS    = /c
  401. X! LFLAGS    = /noi /seg:512 /map /st:5120 /DYNAMIC:1052 /INFO
  402. X  OVLMUCKING =    # None required
  403. X  MSC6MUCK =    # None required
  404. X  OVERLAY =    # None required
  405. X***************
  406. X*** 137,148 ****
  407. X  # RANDOM    =
  408. X  
  409. X  #
  410. X! # If TERMLIB is NOT #defined in the source (in include\pcconf.h), 
  411. X! # comment out the lower line and uncomment the upper.  Make sure 
  412. X  # that TERMLIB contains the full pathname to the termcap library. 
  413. X  
  414. X! #TERMLIB =
  415. X! TERMLIB = $(SSYS)\termcap.lib
  416. X  
  417. X  #
  418. X  #    Nothing below this line should have to be changed.
  419. X--- 137,148 ----
  420. X  # RANDOM    =
  421. X  
  422. X  #
  423. X! # If TERMLIB is #defined in the source (in include\pcconf.h), 
  424. X! # comment out the upper line and uncomment the lower.  Make sure 
  425. X  # that TERMLIB contains the full pathname to the termcap library. 
  426. X  
  427. X! TERMLIB =
  428. X! #TERMLIB = $(SSYS)\termcap.lib
  429. X  
  430. X  #
  431. X  #    Nothing below this line should have to be changed.
  432. X***************
  433. X*** 382,387 ****
  434. X--- 382,388 ----
  435. X      copy $(DAT)\*.lev        $(GAMEDIR)
  436. X      copy $(SSYS)\NetHack.cnf    $(GAMEDIR)
  437. X      copy $(UTL)\recover.exe        $(GAMEDIR)
  438. X+     copy $(SYS)\msdos.hlp        $(GAMEDIR)
  439. X      del  $(GAMEDIR)\makefile
  440. X      echo install done > install.tag
  441. X  
  442. X*** /tmp/da22301    Mon Jul 12 17:40:02 1993
  443. X--- sys/msdos/setup.bat    Thu Jul  1 15:51:39 1993
  444. X***************
  445. X*** 6,12 ****
  446. X  
  447. X  REM setup batch file for msdos, see Install.dos for details.
  448. X  
  449. X! if not %1 .==. goto ok_parm
  450. X  goto err_set
  451. X  
  452. X  :ok_parm
  453. X--- 6,12 ----
  454. X  
  455. X  REM setup batch file for msdos, see Install.dos for details.
  456. X  
  457. X! if not %1.==. goto ok_parm
  458. X  goto err_set
  459. X  
  460. X  :ok_parm
  461. X*** /tmp/da22317    Mon Jul 12 17:40:07 1993
  462. X--- sys/msdos/video.c    Fri Jul  2 14:27:51 1993
  463. X***************
  464. X*** 1,4 ****
  465. X! /*   SCCS Id: @(#)video.c   3.1     93/05/09                        */
  466. X  /*   Copyright (c) NetHack PC Development Team 1993                 */
  467. X  /*   NetHack may be freely redistributed.  See license for details. */
  468. X  /*                                                                  */
  469. X--- 1,4 ----
  470. X! /*   SCCS Id: @(#)video.c   3.1     93/06/28                        */
  471. X  /*   Copyright (c) NetHack PC Development Team 1993                 */
  472. X  /*   NetHack may be freely redistributed.  See license for details. */
  473. X  /*                                                                  */
  474. X***************
  475. X*** 12,17 ****
  476. X--- 12,22 ----
  477. X   *     Use CO,LI in decl.c           M. Allison      93/04/24
  478. X   *     Add djgpp support             K. Smolkowski   93/04/26
  479. X   *     Add runtime monoadapter check M. Allison      93/05/09
  480. X+  *     Fix grays                     M. Allison      93/06/15
  481. X+  *     MONO_CHECK not BIOS specific  M. Allison      93/06/19
  482. X+  *     Add .cnf videoshades support  M. Allison      93/06/25
  483. X+  *     Add .cnf videocolors support  M. Allison      93/06/27
  484. X+  *     Make tty_delay_output() work  M. Allison      93/06/28
  485. X   */
  486. X  
  487. X  #include "hack.h"
  488. X***************
  489. X*** 18,27 ****
  490. X  
  491. X  #include <dos.h>
  492. X  
  493. X! #ifdef SCREEN_BIOS
  494. X! #define MONO_CHECK               /* Enable monochrome adapter support */
  495. X! #endif
  496. X  
  497. X  /*
  498. X   * PC interrupts
  499. X   */
  500. X--- 23,56 ----
  501. X  
  502. X  #include <dos.h>
  503. X  
  504. X! /*
  505. X!  * Choose compile options for different compilers/environments.
  506. X!  * Current optional features in video.c :
  507. X!  *
  508. X!  *     MONO_CHECK     Enables runtime checking for monochrome
  509. X!  *                    adapter. 93/06/19
  510. X!  *     ENABLE_SLEEP   Enables the tty_delay_output() function. 93/06/28
  511. X!  *
  512. X!  */
  513. X  
  514. X+ # ifdef SCREEN_BIOS
  515. X+ # define MONO_CHECK        /* Video BIOS can do the check       */ 
  516. X+ #  if defined(_MSC_VER) && _MSC_VER >= 700
  517. X+ # define ENABLE_SLEEP        /* enable napping for visual effects */
  518. X+ #  endif
  519. X+ # endif
  520. X+ 
  521. X+ # ifdef SCREEN_DJGPPFAST
  522. X+ /*# define MONO_CHECK         /* djgpp should be able to do check  */ 
  523. X+ # define ENABLE_SLEEP        /* enable napping for visual effects */
  524. X+ # endif
  525. X+ 
  526. X+ # ifdef PC9801
  527. X+ #  ifdef MONO_CHECK
  528. X+ #undef MONO_CHECK        /* Don't suppose it can do the check */
  529. X+ #  endif                        /* Can it?                           */
  530. X+ # endif
  531. X+ 
  532. X  /*
  533. X   * PC interrupts
  534. X   */
  535. X***************
  536. X*** 37,56 ****
  537. X   */
  538. X  #define ATTRIB_NORMAL         0x07    /* Normal attribute */
  539. X  #define ATTRIB_INTENSE           0x0f    /* Intense White */
  540. X  #ifdef MONO_CHECK
  541. X  #define ATTRIB_MONO_UNDERLINE 0x01    /* Underlined,white */
  542. X  #define ATTRIB_MONO_BLINK     0x87    /* Flash bit, white */
  543. X  #define ATTRIB_MONO_REVERSE   0x70    /* Black on white */
  544. X  #endif
  545. X  /*
  546. X   * Video BIOS functions
  547. X   */
  548. X! #ifdef PC9801
  549. X  #define SETCURPOS   0x13    /* Set Cursor Position */
  550. X  #define SENSEMODE   0x0b    /* Sense CRT Mode */
  551. X  #else
  552. X- #define GETCURPOS   0x03    /* Get Cursor Position */
  553. X  #define SETCURPOS   0x02    /* Set Cursor Position */
  554. X  #define GETMODE     0x0f    /* Get Video Mode */
  555. X  #define SETMODE     0x00    /* Set Video Mode */
  556. X  #define SETPAGE     0x05    /* Set Video Page */
  557. X--- 66,89 ----
  558. X   */
  559. X  #define ATTRIB_NORMAL         0x07    /* Normal attribute */
  560. X  #define ATTRIB_INTENSE           0x0f    /* Intense White */
  561. X+ 
  562. X  #ifdef MONO_CHECK
  563. X  #define ATTRIB_MONO_UNDERLINE 0x01    /* Underlined,white */
  564. X  #define ATTRIB_MONO_BLINK     0x87    /* Flash bit, white */
  565. X  #define ATTRIB_MONO_REVERSE   0x70    /* Black on white */
  566. X  #endif
  567. X+ 
  568. X  /*
  569. X   * Video BIOS functions
  570. X   */
  571. X! #if defined(PC9801)
  572. X  #define SETCURPOS   0x13    /* Set Cursor Position */
  573. X  #define SENSEMODE   0x0b    /* Sense CRT Mode */
  574. X  #else
  575. X  #define SETCURPOS   0x02    /* Set Cursor Position */
  576. X+ #endif
  577. X+ 
  578. X+ #define GETCURPOS   0x03    /* Get Cursor Position */
  579. X  #define GETMODE     0x0f    /* Get Video Mode */
  580. X  #define SETMODE     0x00    /* Set Video Mode */
  581. X  #define SETPAGE     0x05    /* Set Video Page */
  582. X***************
  583. X*** 57,64 ****
  584. X  #define FONTINFO    0x1130  /* Get Font Info */
  585. X  #define SCROLL      0x06    /* Scroll or initialize window */
  586. X  #define PUTCHARATT  0x09    /* Write attribute & char at cursor */
  587. X- #endif
  588. X  
  589. X  #ifdef OVLB
  590. X  
  591. X  void
  592. X--- 90,97 ----
  593. X  #define FONTINFO    0x1130  /* Get Font Info */
  594. X  #define SCROLL      0x06    /* Scroll or initialize window */
  595. X  #define PUTCHARATT  0x09    /* Write attribute & char at cursor */
  596. X  
  597. X+ 
  598. X  #ifdef OVLB
  599. X  
  600. X  void
  601. X***************
  602. X*** 78,84 ****
  603. X  
  604. X      LI = (regs.h.al & 0x01) ? 20 : 25;
  605. X      CO = (regs.h.al & 0x02) ? 40 : 80;
  606. X! # else
  607. X      regs.x.ax = FONTINFO;
  608. X      regs.x.bx = 0;            /* current ROM BIOS font */
  609. X      regs.h.dl = 24;            /* default row count */
  610. X--- 111,117 ----
  611. X  
  612. X      LI = (regs.h.al & 0x01) ? 20 : 25;
  613. X      CO = (regs.h.al & 0x02) ? 40 : 80;
  614. X! # else 
  615. X      regs.x.ax = FONTINFO;
  616. X      regs.x.bx = 0;            /* current ROM BIOS font */
  617. X      regs.h.dl = 24;            /* default row count */
  618. X***************
  619. X*** 105,111 ****
  620. X      CO = regs.h.ah;
  621. X  # endif /* PC9801 */
  622. X  }
  623. X! #endif
  624. X  
  625. X  #ifdef NO_TERMS
  626. X  
  627. X--- 138,144 ----
  628. X      CO = regs.h.ah;
  629. X  # endif /* PC9801 */
  630. X  }
  631. X! #endif /*OVLB*/
  632. X  
  633. X  #ifdef NO_TERMS
  634. X  
  635. X***************
  636. X*** 121,134 ****
  637. X  # ifdef TEXTCOLOR
  638. X  char ttycolors[MAXCOLORS];
  639. X  static void NDECL(init_ttycolor);
  640. X! # endif
  641. X  
  642. X  # ifdef SCREEN_BIOS
  643. X  void FDECL(gotoxy, (int,int));
  644. X  void FDECL(get_cursor, (int *, int *));
  645. X- #  ifdef MONO_CHECK
  646. X- int  NDECL(monoadapt_check);
  647. X- #  endif
  648. X  # endif
  649. X  
  650. X  # ifdef SCREEN_DJGPPFAST
  651. X--- 154,164 ----
  652. X  # ifdef TEXTCOLOR
  653. X  char ttycolors[MAXCOLORS];
  654. X  static void NDECL(init_ttycolor);
  655. X! # endif /* TEXTCOLOR */
  656. X  
  657. X  # ifdef SCREEN_BIOS
  658. X  void FDECL(gotoxy, (int,int));
  659. X  void FDECL(get_cursor, (int *, int *));
  660. X  # endif
  661. X  
  662. X  # ifdef SCREEN_DJGPPFAST
  663. X***************
  664. X*** 136,146 ****
  665. X  #define get_cursor(x,y) ScreenGetCursor(y,x)
  666. X  # endif
  667. X  
  668. X  /* 
  669. X   *  LI, CO are ifdefs of a data structure in decl.c, and are initialized
  670. X   *  by get_scr_size()
  671. X   */
  672. X- /*extern  int LI, CO; */    /* decl.h does this already */
  673. X  char g_attribute;        /* Current attribute to use */
  674. X  
  675. X  # ifdef MONO_CHECK
  676. X--- 166,179 ----
  677. X  #define get_cursor(x,y) ScreenGetCursor(y,x)
  678. X  # endif
  679. X  
  680. X+ # ifdef MONO_CHECK
  681. X+ int  NDECL(monoadapt_check);
  682. X+ # endif
  683. X+ 
  684. X  /* 
  685. X   *  LI, CO are ifdefs of a data structure in decl.c, and are initialized
  686. X   *  by get_scr_size()
  687. X   */
  688. X  char g_attribute;        /* Current attribute to use */
  689. X  
  690. X  # ifdef MONO_CHECK
  691. X***************
  692. X*** 170,175 ****
  693. X--- 203,209 ----
  694. X   * so for now we just use the BIOS Routines
  695. X   */
  696. X  {
  697. X+ 
  698. X      union REGS regs;
  699. X  
  700. X      regs.h.dl = CO - 1;      /* columns */
  701. X***************
  702. X*** 377,390 ****
  703. X  }
  704. X  
  705. X  # endif /* OVLB */
  706. X! # ifdef OVL1
  707. X  
  708. X  void
  709. X  tty_delay_output()
  710. X  {
  711. X!     /* delay 50 ms - not implimented */
  712. X  }
  713. X! # endif /* OVL1 */
  714. X  
  715. X  # ifdef OVLB
  716. X  void
  717. X--- 411,432 ----
  718. X  }
  719. X  
  720. X  # endif /* OVLB */
  721. X! # ifdef OVL0
  722. X  
  723. X  void
  724. X  tty_delay_output()
  725. X  {
  726. X!     /* delay 50 ms - now uses clock() which is ANSI C */
  727. X! #  if defined(ENABLE_SLEEP) || defined(__STDC__)
  728. X!     clock_t goal;
  729. X! 
  730. X!     goal = 50 + clock();
  731. X!     while ( goal > clock()) {
  732. X!         /* do nothing */
  733. X!     }
  734. X! #  endif /* ENABLE_SLEEP || __STDC__*/
  735. X  }
  736. X! # endif /* OVL0 */
  737. X  
  738. X  # ifdef OVLB
  739. X  void
  740. X***************
  741. X*** 473,480 ****
  742. X--- 515,526 ----
  743. X      int x,y;
  744. X      char attribute;
  745. X  
  746. X+ #  ifdef MONO_CHECK
  747. X+     attribute = ((g_attribute == 0) ? ATTRIB_NORMAL : g_attribute);
  748. X+ #  else
  749. X      attribute = (((g_attribute > 0) && (g_attribute < MAXCOLORS)) ?
  750. X              g_attribute : ATTRIB_NORMAL);
  751. X+ #  endif
  752. X  
  753. X  #  ifdef SCREEN_DJGPPFAST
  754. X      get_cursor(&x,&y);
  755. X***************
  756. X*** 485,497 ****
  757. X      regs.h.ah = PUTCHARATT;    /* write attribute & character */
  758. X      regs.h.al = ch;            /* character */
  759. X      regs.h.bh = 0;            /* display page */
  760. X!                     /* BL = attribute */
  761. X! #    ifdef MONO_CHECK
  762. X!     regs.h.bl = ((g_attribute == 0) ? ATTRIB_NORMAL : g_attribute);
  763. X! #    else
  764. X!     regs.h.bl = (((g_attribute > 0) && (g_attribute < MAXCOLORS)) ? 
  765. X!             g_attribute : ATTRIB_NORMAL);
  766. X! #    endif
  767. X      regs.x.cx = 1;            /* one character */
  768. X      int86(VIDEO_BIOS, ®s, ®s); /* write attribute & character */
  769. X      get_cursor(&x,&y);
  770. X--- 531,537 ----
  771. X      regs.h.ah = PUTCHARATT;    /* write attribute & character */
  772. X      regs.h.al = ch;            /* character */
  773. X      regs.h.bh = 0;            /* display page */
  774. X!     regs.h.bl = attribute;        /* BL = attribute */
  775. X      regs.x.cx = 1;            /* one character */
  776. X      int86(VIDEO_BIOS, ®s, ®s); /* write attribute & character */
  777. X      get_cursor(&x,&y);
  778. X***************
  779. X*** 501,508 ****
  780. X  }
  781. X  
  782. X  /*
  783. X!  *  Supporting routines.  None of these routines are required to 
  784. X!  *  resolve references outside this source file.
  785. X   */
  786. X  #  ifdef SCREEN_BIOS
  787. X  void
  788. X--- 541,547 ----
  789. X  }
  790. X  
  791. X  /*
  792. X!  *  Supporting routines.
  793. X   */
  794. X  #  ifdef SCREEN_BIOS
  795. X  void
  796. X***************
  797. X*** 543,548 ****
  798. X--- 582,589 ----
  799. X       * returns nothing.  -3.
  800. X       */
  801. X  }
  802. X+ #  endif /* SCREEN_BIOS */ 
  803. X+ 
  804. X  #  ifdef MONO_CHECK
  805. X  int monoadapt_check()
  806. X  {
  807. X***************
  808. X*** 553,565 ****
  809. X      int86(VIDEO_BIOS, ®s, ®s);
  810. X      return (regs.h.al == 7) ? 1 : 0;    /* 7 means monochrome mode */
  811. X  }
  812. X! #   endif /* MONO_CHECK */
  813. X! #  endif /* SCREEN_BIOS */
  814. X  
  815. X  # endif /* OVL0 */
  816. X- # ifdef OVLB
  817. X  
  818. X! #  ifdef TEXTCOLOR
  819. X  /*
  820. X   * BLACK                0
  821. X   * RED                  1
  822. X--- 594,606 ----
  823. X      int86(VIDEO_BIOS, ®s, ®s);
  824. X      return (regs.h.al == 7) ? 1 : 0;    /* 7 means monochrome mode */
  825. X  }
  826. X! #  endif /* MONO_CHECK */
  827. X  
  828. X  # endif /* OVL0 */
  829. X  
  830. X! # ifdef TEXTCOLOR
  831. X! #  ifdef OVLB
  832. X! 
  833. X  /*
  834. X   * BLACK                0
  835. X   * RED                  1
  836. X***************
  837. X*** 581,609 ****
  838. X   * BRIGHT               8
  839. X   */
  840. X  
  841. X  static void
  842. X  init_ttycolor()
  843. X  {
  844. X!     ttycolors[BLACK] = 7;                      /* mapped to 7 = white */
  845. X!     ttycolors[RED] = 4;            /*  4 = red */
  846. X!     ttycolors[GREEN] = 2;            /*  2 = green */
  847. X!     ttycolors[BROWN] = 6;            /*  6 = brown */
  848. X!     ttycolors[BLUE] = 1;            /*  1 = blue */
  849. X!     ttycolors[MAGENTA] = 5;            /*  5 = magenta */
  850. X!     ttycolors[CYAN] = 3;            /*  3 = cyan */
  851. X!     ttycolors[GRAY] = 8;            /*  8 = dark gray */
  852. X!     ttycolors[BRIGHT] = 15;            /* 15 = intense white */
  853. X!     ttycolors[ORANGE_COLORED] = 12;        /* 12 = light red */
  854. X!     ttycolors[BRIGHT_GREEN] = 10;        /* 10 = light green */
  855. X!     ttycolors[YELLOW] = 14;            /* 14 = yellow */
  856. X!     ttycolors[BRIGHT_BLUE] = 9;        /*  9 = light blue */
  857. X!     ttycolors[BRIGHT_MAGENTA] = 13;        /* 13 = light magenta */
  858. X!     ttycolors[BRIGHT_CYAN] = 11;        /* 11 = light cyan */
  859. X!     ttycolors[WHITE] = 7;            /*  7 = white */
  860. X  }
  861. X  
  862. X! #  endif /* TEXTCOLOR */
  863. X! # endif OVLB
  864. X  
  865. X  #endif /* NO_TERMS */
  866. X  
  867. X--- 622,763 ----
  868. X   * BRIGHT               8
  869. X   */
  870. X  
  871. X+ #  ifdef VIDEOSHADES
  872. X+ /* assign_videoshades() is prototyped in extern.h */
  873. X+ int shadeflag;                    /* shades are initialized */
  874. X+ int colorflag;                    /* colors are initialized */
  875. X+ char *schoice[3] = {"dark","normal","light"};
  876. X+ char *shade[3];
  877. X+ #  endif /* VIDEOSHADES */
  878. X+ 
  879. X  static void
  880. X  init_ttycolor()
  881. X  {
  882. X! #   ifdef VIDEOSHADES
  883. X!     if (!shadeflag) {
  884. X!         ttycolors[BLACK] = 8;           /*  8 = dark gray */
  885. X!         ttycolors[WHITE] = 15;          /* 15 = bright white */
  886. X!         ttycolors[GRAY]  = 7;        /*  7 = normal white */
  887. X!         shade[0] = schoice[0];
  888. X!         shade[1] = schoice[1];
  889. X!         shade[2] = schoice[2];
  890. X!     }
  891. X! #   else
  892. X!     ttycolors[BLACK] = 7;            /*  mapped to white */
  893. X!     ttycolors[WHITE] = 7;            /*  mapped to white */
  894. X!     ttycolors[GRAY]  = 7;            /*  mapped to white */
  895. X! #   endif
  896. X! 
  897. X! #   ifdef VIDEOSHADES
  898. X!         if (!colorflag) {
  899. X! #   endif
  900. X!         ttycolors[RED] = 4;            /*  4 = red */
  901. X!         ttycolors[GREEN] = 2;            /*  2 = green */
  902. X!         ttycolors[BROWN] = 6;            /*  6 = brown */
  903. X!         ttycolors[BLUE] = 1;            /*  1 = blue */
  904. X!         ttycolors[MAGENTA] = 5;            /*  5 = magenta */
  905. X!         ttycolors[CYAN] = 3;            /*  3 = cyan */
  906. X!         ttycolors[BRIGHT] = 15;            /* 15 = bright white */
  907. X!         ttycolors[ORANGE_COLORED] = 12;        /* 12 = light red */
  908. X!         ttycolors[BRIGHT_GREEN] = 10;        /* 10 = light green */
  909. X!         ttycolors[YELLOW] = 14;            /* 14 = yellow */
  910. X!         ttycolors[BRIGHT_BLUE] = 9;        /*  9 = light blue */
  911. X!         ttycolors[BRIGHT_MAGENTA] = 13;        /* 13 = light magenta */
  912. X!         ttycolors[BRIGHT_CYAN] = 11;        /* 11 = light cyan */
  913. X! #   ifdef VIDEOSHADES
  914. X!     }
  915. X! #   endif
  916. X  }
  917. X  
  918. X! #   ifdef VIDEOSHADES
  919. X! int assign_videoshades(uchar *choiceptr,int linelen)
  920. X! {
  921. X!     char choices[120];
  922. X!     char *cptr, *cvalue[3];
  923. X!     int i,icolor;
  924. X! 
  925. X!     strncpy(choices,choiceptr,linelen);
  926. X!     choices[linelen] = '\0';
  927. X!     cvalue[0] = choices;
  928. X! 
  929. X!         /* find the next ' ' or tab */
  930. X!         cptr = index(cvalue[0], ' ');
  931. X!         if (!cptr) cptr = index(cvalue[0], '\t');
  932. X!         if (!cptr) return 0;
  933. X!     *cptr = '\0';
  934. X!         /* skip  whitespace between '=' and value */
  935. X!         do { ++cptr; } while (isspace(*cptr));
  936. X!     cvalue[1] = cptr;
  937. X! 
  938. X!         cptr = index(cvalue[1], ' ');
  939. X!         if (!cptr) cptr = index(cvalue[1], '\t');
  940. X!         if (!cptr) return 0;
  941. X!     *cptr = '\0';
  942. X!         do { ++cptr; } while (isspace(*cptr));
  943. X!     cvalue[2] = cptr;
  944. X! 
  945. X!     for (i=0; i < 3; ++i) {
  946. X!         switch(i) {
  947. X!             case 0: icolor = BLACK;
  948. X!                 break;
  949. X!             case 1: icolor = GRAY;
  950. X!                 break;
  951. X!             case 2: icolor = WHITE;
  952. X!                 break;
  953. X!         }
  954. X! 
  955. X!         shadeflag = 1;            
  956. X!         if ((strncmpi(cvalue[i],"black",5) == 0) ||
  957. X!             (strncmpi(cvalue[i],"dark",4) == 0)) {
  958. X!             shade[i] = schoice[0];
  959. X!             ttycolors[icolor] = 8;  /* dark gray */
  960. X!         } else if ((strncmpi(cvalue[i],"gray",4) == 0) ||
  961. X!                    (strncmpi(cvalue[i],"grey",4) == 0) ||
  962. X!                (strncmpi(cvalue[i],"medium",6) == 0) ||
  963. X!                (strncmpi(cvalue[i],"normal",6) == 0)) {
  964. X!             shade[i] = schoice[1];
  965. X!             ttycolors[icolor] = 7;  /* regular gray */
  966. X!         } else if ((strncmpi(cvalue[i],"white",5) == 0) ||
  967. X!                (strncmpi(cvalue[i],"light",5) == 0)) {
  968. X!             shade[i] = schoice[2];
  969. X!             ttycolors[icolor] = 15;  /* bright white */
  970. X!         } else {
  971. X!             shadeflag = 0;
  972. X!             return 0;
  973. X!         }
  974. X!     }
  975. X!     return 1;
  976. X! }
  977. X! 
  978. X! /*
  979. X!  * Process NetHack.cnf option VIDEOCOLORS=
  980. X!  * Left to right assignments for: 
  981. X!  *     red green brown blue magenta cyan orange br.green yellow 
  982. X!  *     br.blue br.mag br.cyan
  983. X!  *
  984. X!  * Default Mapping: 4 2 6 1 5 3 12 10 14 9 13 11
  985. X!  */
  986. X! int assign_videocolors(uchar *tmpcolor,int len)
  987. X! {
  988. X!     int i,icolor,max1,max2;
  989. X! 
  990. X!     init_ttycolor();    /* in case nethack.cnf entry wasn't complete */
  991. X!     icolor = RED;
  992. X!     for( i = 0; i < len; ++i) {
  993. X!         if (icolor < (WHITE)) {
  994. X!             ttycolors[icolor++] = tmpcolor[i];
  995. X!             if ((icolor > CYAN) && (icolor < ORANGE_COLORED)) {
  996. X!                  icolor = ORANGE_COLORED;
  997. X!             }
  998. X!         }
  999. X!     }
  1000. X!     colorflag = 1;
  1001. X!     return 1;
  1002. X! }
  1003. X! #   endif /* VIDEOSHADES */
  1004. X! 
  1005. X! #  endif /* OVLB */
  1006. X! # endif /* TEXTCOLOR */
  1007. X  
  1008. X  #endif /* NO_TERMS */
  1009. X  
  1010. X*** /tmp/da22807    Mon Jul 12 17:59:42 1993
  1011. X--- sys/winnt/Install.nt    Fri Jul  2 15:31:46 1993
  1012. X***************
  1013. X*** 4,11 ****
  1014. X          Instructions for compiling and installing
  1015. X           NetHack 3.1 on a Windows NT system
  1016. X          ======================================================
  1017. X!          (or, How to make NT NetHack 3.1.2)
  1018. X!             Last revision: Apr 16, 1993
  1019. X  
  1020. X  Credit for the PC versions of NetHack goes to the PC Development team 
  1021. X  consisting of Norm Meluch, Kevin Smolkowski, Paul Winner and Steve 
  1022. X--- 4,11 ----
  1023. X          Instructions for compiling and installing
  1024. X           NetHack 3.1 on a Windows NT system
  1025. X          ======================================================
  1026. X!          (or, How to make NT NetHack 3.1.3)
  1027. X!             Last revision: Jun 30, 1993
  1028. X  
  1029. X  Credit for the PC versions of NetHack goes to the PC Development team 
  1030. X  consisting of Norm Meluch, Kevin Smolkowski, Paul Winner and Steve 
  1031. X***************
  1032. X*** 20,26 ****
  1033. X  completion of the first Windows NT port of NetHack: Doug Thompson, 
  1034. X  Phil Mills, Scott Murray. 
  1035. X  
  1036. X! This first version of NetHack for Windows NT is a tty port utilizing 
  1037. X  the NT WIN32 Console I/O subsystem.
  1038. X  
  1039. X  
  1040. X--- 20,26 ----
  1041. X  completion of the first Windows NT port of NetHack: Doug Thompson, 
  1042. X  Phil Mills, Scott Murray. 
  1043. X  
  1044. X! This current version of NetHack for Windows NT is a tty port utilizing 
  1045. X  the NT WIN32 Console I/O subsystem.
  1046. X  
  1047. X  
  1048. X***************
  1049. X*** 197,203 ****
  1050. X      "Working Directory:" dialogue box field when creating your 
  1051. X      Program Manager Icon:
  1052. X  
  1053. X!     ie.  Description      :  NetHack 3.1.2 
  1054. X           Command Line     :  C:\GAMES\NETHACK\NETHACK.EXE
  1055. X           Working Directory:  C:\GAMES\NETHACK
  1056. X           Shortcut key     :
  1057. X--- 197,203 ----
  1058. X      "Working Directory:" dialogue box field when creating your 
  1059. X      Program Manager Icon:
  1060. X  
  1061. X!     ie.  Description      :  NetHack 3.1.3 
  1062. X           Command Line     :  C:\GAMES\NETHACK\NETHACK.EXE
  1063. X           Working Directory:  C:\GAMES\NETHACK
  1064. X           Shortcut key     :
  1065. X***************
  1066. X*** 232,239 ****
  1067. X      More than 1,900,000 bytes, nethack.exe when debugging information 
  1068. X          is included in the .exe, and more than 1,200,000 bytes without.
  1069. X  
  1070. X! 3)  If you want to use the number pad on the keyboard for movement when
  1071. X!     playing the game, be sure the NUMLOCK is on.
  1072. X  
  1073. X  4)  A true Windows (WIN32s) version of NetHack is currently under development
  1074. X      by the PC Windows Porting team.
  1075. X--- 232,242 ----
  1076. X      More than 1,900,000 bytes, nethack.exe when debugging information 
  1077. X          is included in the .exe, and more than 1,200,000 bytes without.
  1078. X  
  1079. X! 3)  Beginning with NetHack 3.1.3, the keyboard command sequences match
  1080. X!     those in the MSDOS port of NetHack more exactly.  The keypad may be used for
  1081. X!     movement without having the NUMLOCK on.  This also gives you the advantage
  1082. X!     of being able to RUN by pressing the SHIFT key at the same time as one
  1083. X!     of the directional movement keys on the keypad (1,2,3,4,6,7,8,9).
  1084. X  
  1085. X  4)  A true Windows (WIN32s) version of NetHack is currently under development
  1086. X      by the PC Windows Porting team.
  1087. X*** /tmp/da22847    Mon Jul 12 17:59:51 1993
  1088. X--- sys/winnt/nhincl.mak    Mon Jul 12 14:14:52 1993
  1089. X***************
  1090. X*** 1,6 ****
  1091. X  # =========================================================================
  1092. X! # NTWIN32.MAK - Win32 application master NMAKE definitions file for the
  1093. X! #               Microsoft Win32 SDK for Windows NT programming samples
  1094. X  # -------------------------------------------------------------------------
  1095. X  # NMAKE Options
  1096. X  #
  1097. X--- 1,6 ----
  1098. X  # =========================================================================
  1099. X! # NHINCL.MAK - Modified Win32 application master NMAKE definitions file for
  1100. X! #              NetHack 3.1.3 - NetHack PC Development Team 93/07/12
  1101. X  # -------------------------------------------------------------------------
  1102. X  # NMAKE Options
  1103. X  #
  1104. X***************
  1105. X*** 116,122 ****
  1106. X  # -------------------------------------------------------------------------
  1107. X  
  1108. X  # declarations common to all compilers.
  1109. X! ccommon = -c -W0
  1110. X  
  1111. X  !IF "$(CPU)" == "i386"
  1112. X  cflags = $(ccommon) -G3 -D_X86_=1
  1113. X--- 116,122 ----
  1114. X  # -------------------------------------------------------------------------
  1115. X  
  1116. X  # declarations common to all compilers.
  1117. X! ccommon = -c -W0 -nologo
  1118. X  
  1119. X  !IF "$(CPU)" == "i386"
  1120. X  cflags = $(ccommon) -G3 -D_X86_=1
  1121. X***************
  1122. X*** 271,278 ****
  1123. X  psxlflags = -subsystem:posix -entry:__PosixProcessStartup
  1124. X  
  1125. X  # for compatibility with older style makefiles
  1126. X! conflags  = $(conlflags)
  1127. X! guiflags  = $(guilflags)
  1128. X  psxflags  = $(psxlflags)
  1129. X  
  1130. X  # -------------------------------------------------------------------------
  1131. X--- 271,278 ----
  1132. X  psxlflags = -subsystem:posix -entry:__PosixProcessStartup
  1133. X  
  1134. X  # for compatibility with older style makefiles
  1135. X! conflags  = $(conlflags) -IGNORE:505
  1136. X! guiflags  = $(guilflags) -IGNORE:505
  1137. X  psxflags  = $(psxlflags)
  1138. X  
  1139. X  # -------------------------------------------------------------------------
  1140. X*** /tmp/da22855    Mon Jul 12 17:59:53 1993
  1141. X--- sys/winnt/nttty.c    Tue Jul  6 15:14:43 1993
  1142. X***************
  1143. X*** 1,4 ****
  1144. X! /*    SCCS Id: @(#)nttty.c    3.1    90/05/23
  1145. X  /* Copyright (c) NetHack PC Development Team 1993    */
  1146. X  /* NetHack may be freely redistributed.  See license for details. */
  1147. X  
  1148. X--- 1,4 ----
  1149. X! /*    SCCS Id: @(#)nttty.c    3.1    93/07/04
  1150. X  /* Copyright (c) NetHack PC Development Team 1993    */
  1151. X  /* NetHack may be freely redistributed.  See license for details. */
  1152. X  
  1153. X***************
  1154. X*** 18,23 ****
  1155. X--- 18,24 ----
  1156. X  #pragma pack(8)
  1157. X  #include <windows.h>
  1158. X  #include <wincon.h>
  1159. X+ #pragma pack()
  1160. X  
  1161. X  void FDECL(cmov, (int, int));
  1162. X  void FDECL(nocmov, (int, int));
  1163. X***************
  1164. X*** 47,53 ****
  1165. X  /* Flag for whether NetHack was launched via progman, not command line.
  1166. X   * The reason we care at all, is so that we can get
  1167. X   * a final RETURN at the end of the game when launched from progman
  1168. X!  * to prevent the scoreboard (or panic message :-| from vanishing
  1169. X   * immediately after it is displayed, yet not bother when started
  1170. X   * from the command line. 
  1171. X   */
  1172. X--- 48,54 ----
  1173. X  /* Flag for whether NetHack was launched via progman, not command line.
  1174. X   * The reason we care at all, is so that we can get
  1175. X   * a final RETURN at the end of the game when launched from progman
  1176. X!  * to prevent the scoreboard (or panic message :-|) from vanishing
  1177. X   * immediately after it is displayed, yet not bother when started
  1178. X   * from the command line. 
  1179. X   */
  1180. X***************
  1181. X*** 93,136 ****
  1182. X      start_screen();
  1183. X  }
  1184. X  
  1185. X  int
  1186. X  tgetch()
  1187. X  {
  1188. X-     int ch;
  1189. X      int valid = 0;
  1190. X      int metaflags = 0;
  1191. X      int count;
  1192. X  
  1193. X      valid = 0;
  1194. X      while (!valid)
  1195. X      {
  1196. X!         ReadConsoleInput(hConIn,&ir,1,&count);
  1197. X!         /* We only care about ascii press-down KEY_EVENTs */
  1198. X!         if ((ir.EventType == KEY_EVENT) &&
  1199. X!            (ir.Event.KeyEvent.bKeyDown) &&    
  1200. X!            (ir.Event.KeyEvent.uChar.AsciiChar)) valid = 1;
  1201. X      }
  1202. X!     metaflags = ir.Event.KeyEvent.dwControlKeyState;
  1203. X!     /*
  1204. X!      * metaflags can be checked to see if various special
  1205. X!          * keys were pressed at the same time as the key.
  1206. X!          * Currently we are using the ALT keys only.
  1207. X!      *
  1208. X!      *           RIGHT_ALT_PRESSED, LEFT_ALT_PRESSED,
  1209. X!          *           RIGHT_CTRL_PRESSED, LEFT_CTRL_PRESSED,
  1210. X!          *           SHIFT_PRESSED,NUMLOCK_ON, SCROLLLOCK_ON,
  1211. X!          *           CAPSLOCK_ON, ENHANCED_KEY
  1212. X!          *
  1213. X!      * are all valid bit masks to use on metaflags
  1214. X!          * eg. (metaflags & LEFT_CTRL_PRESSED) is true if the
  1215. X!          *      left control key was pressed with the keystroke.
  1216. X!          */
  1217. X!     ch = (ir.Event.KeyEvent.uChar.AsciiChar == '\r') ?
  1218. X!              '\n' :ir.Event.KeyEvent.uChar.AsciiChar;
  1219. X!     if (metaflags & (LEFT_ALT_PRESSED|RIGHT_ALT_PRESSED))
  1220. X!        ch = tolower(ch) | 0x080;
  1221. X!     return ch;
  1222. X! }
  1223. X  
  1224. X  int
  1225. X  kbhit()
  1226. X--- 94,226 ----
  1227. X      start_screen();
  1228. X  }
  1229. X  
  1230. X+ /*
  1231. X+  *  Keyboard translation tables.
  1232. X+  *  (Adopted from the MSDOS port)
  1233. X+  */
  1234. X+ 
  1235. X+ #define KEYPADLO    0x47
  1236. X+ #define KEYPADHI    0x53
  1237. X+ 
  1238. X+ #define PADKEYS     (KEYPADHI - KEYPADLO + 1)
  1239. X+ #define iskeypad(x)    (KEYPADLO <= (x) && (x) <= KEYPADHI)
  1240. X+ 
  1241. X+ /*
  1242. X+  * Keypad keys are translated to the normal values below.
  1243. X+  * Shifted keypad keys are translated to the
  1244. X+  *    shift values below.
  1245. X+  */
  1246. X+ 
  1247. X+ static const struct pad {
  1248. X+     char normal, shift, cntrl;
  1249. X+ } keypad[PADKEYS] = {
  1250. X+             {'y', 'Y', C('y')},        /* 7 */
  1251. X+             {'k', 'K', C('k')},        /* 8 */
  1252. X+             {'u', 'U', C('u')},        /* 9 */
  1253. X+             {'m', C('p'), C('p')},        /* - */
  1254. X+             {'h', 'H', C('h')},        /* 4 */
  1255. X+             {'g', 'g', 'g'},        /* 5 */
  1256. X+             {'l', 'L', C('l')},        /* 6 */
  1257. X+             {'p', 'P', C('p')},        /* + */
  1258. X+             {'b', 'B', C('b')},        /* 1 */
  1259. X+             {'j', 'J', C('j')},        /* 2 */
  1260. X+             {'n', 'N', C('n')},        /* 3 */
  1261. X+             {'i', 'I', C('i')},        /* Ins */
  1262. X+             {'.', ':', ':'}            /* Del */
  1263. X+ }, numpad[PADKEYS] = {
  1264. X+             {'7', M('7'), '7'},        /* 7 */
  1265. X+             {'8', M('8'), '8'},        /* 8 */
  1266. X+             {'9', M('9'), '9'},        /* 9 */
  1267. X+             {'m', C('p'), C('p')},        /* - */
  1268. X+             {'4', M('4'), '4'},        /* 4 */
  1269. X+             {'g', 'G', 'g'},        /* 5 */
  1270. X+             {'6', M('6'), '6'},        /* 6 */
  1271. X+             {'p', 'P', C('p')},        /* + */
  1272. X+             {'1', M('1'), '1'},        /* 1 */
  1273. X+             {'2', M('2'), '2'},        /* 2 */
  1274. X+             {'3', M('3'), '3'},        /* 3 */
  1275. X+             {'i', 'I', C('i')},        /* Ins */
  1276. X+             {'.', ':', ':'}            /* Del */
  1277. X+ };
  1278. X+ /*
  1279. X+  * Unlike Ctrl-letter, the Alt-letter keystrokes have no specific ASCII
  1280. X+  * meaning unless assigned one by a keyboard conversion table
  1281. X+  * To interpret Alt-letters, we use a
  1282. X+  * scan code table to translate the scan code into a letter, then set the
  1283. X+  * "meta" bit for it.  -3.
  1284. X+  */
  1285. X+ #define SCANLO        0x10
  1286. X+ 
  1287. X+ static const char scanmap[] = {     /* ... */
  1288. X+     'q','w','e','r','t','y','u','i','o','p','[',']', '\n',
  1289. X+     0, 'a','s','d','f','g','h','j','k','l',';','\'', '`',
  1290. X+     0, '\\', 'z','x','c','v','b','n','m',',','.','?'    /* ... */
  1291. X+ };
  1292. X+ 
  1293. X+ #define inmap(x)    (SCANLO <= (x) && (x) < SCANLO + SIZE(scanmap))
  1294. X+ 
  1295. X  int
  1296. X  tgetch()
  1297. X  {
  1298. X      int valid = 0;
  1299. X      int metaflags = 0;
  1300. X      int count;
  1301. X+     unsigned short int scan;
  1302. X+     unsigned char ch;
  1303. X+     unsigned long shiftstate;
  1304. X+     int altseq;
  1305. X+     const struct pad *kpad;
  1306. X+     char keymess[100];
  1307. X  
  1308. X+     shiftstate = 0L;
  1309. X      valid = 0;
  1310. X      while (!valid)
  1311. X      {
  1312. X!        ReadConsoleInput(hConIn,&ir,1,&count);
  1313. X!        if ((ir.EventType == KEY_EVENT) && ir.Event.KeyEvent.bKeyDown) {
  1314. X!         ch    = ir.Event.KeyEvent.uChar.AsciiChar;
  1315. X!         scan  = ir.Event.KeyEvent.wVirtualScanCode;
  1316. X!         shiftstate = ir.Event.KeyEvent.dwControlKeyState;
  1317. X!         altseq=(shiftstate & (LEFT_ALT_PRESSED|RIGHT_ALT_PRESSED)) && inmap(scan);
  1318. X!         if (ch || (iskeypad(scan)) || altseq)
  1319. X!             valid = 1;
  1320. X!        }
  1321. X      }
  1322. X!     if (valid) {
  1323. X!             /*
  1324. X!         * shiftstate can be checked to see if various special
  1325. X!             * keys were pressed at the same time as the key.
  1326. X!             * Currently we are using the ALT & SHIFT & CONTROLS.
  1327. X!             *
  1328. X!             *           RIGHT_ALT_PRESSED, LEFT_ALT_PRESSED,
  1329. X!             *           RIGHT_CTRL_PRESSED, LEFT_CTRL_PRESSED,
  1330. X!             *           SHIFT_PRESSED,NUMLOCK_ON, SCROLLLOCK_ON,
  1331. X!             *           CAPSLOCK_ON, ENHANCED_KEY
  1332. X!             *
  1333. X!             * are all valid bit masks to use on shiftstate.
  1334. X!             * eg. (shiftstate & LEFT_CTRL_PRESSED) is true if the
  1335. X!             *      left control key was pressed with the keystroke.
  1336. X!             */
  1337. X!             if (iskeypad(scan)) {
  1338. X!                 kpad = flags.num_pad ? numpad : keypad;
  1339. X!                 if (shiftstate & SHIFT_PRESSED) {
  1340. X!                     ch = kpad[scan - KEYPADLO].shift;
  1341. X!                 }
  1342. X!                 else if (shiftstate & (LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED)) {
  1343. X!                     ch = kpad[scan - KEYPADLO].cntrl;
  1344. X!                 }
  1345. X!                 else {
  1346. X!                     ch = kpad[scan - KEYPADLO].normal;
  1347. X!                 }
  1348. X!             }
  1349. X!             else if (shiftstate & (LEFT_ALT_PRESSED|RIGHT_ALT_PRESSED)) { /* ALT sequence */
  1350. X!                     if (inmap(scan))
  1351. X!                         ch = scanmap[scan - SCANLO];
  1352. X!                     ch = (isprint(ch) ? M(ch) : ch);
  1353. X!             }
  1354. X!             return (ch == '\r') ? '\n' : ch;
  1355. X!     }
  1356. X! }
  1357. X  
  1358. X  int
  1359. X  kbhit()
  1360. X***************
  1361. X*** 137,144 ****
  1362. X  {
  1363. X      int done = 0;    /* true =  "stop searching"        */
  1364. X      int retval;    /* true =  "we had a match"        */
  1365. X!     int count;    /* scratch-pad area for API call   */
  1366. X! 
  1367. X      done = 0;
  1368. X      retval = 0;
  1369. X      while (!done)
  1370. X--- 227,238 ----
  1371. X  {
  1372. X      int done = 0;    /* true =  "stop searching"        */
  1373. X      int retval;    /* true =  "we had a match"        */
  1374. X!     int count;
  1375. X!     unsigned short int scan;
  1376. X!     unsigned char ch;
  1377. X!     unsigned long shiftstate;
  1378. X!     int altseq;
  1379. X!         
  1380. X      done = 0;
  1381. X      retval = 0;
  1382. X      while (!done)
  1383. X***************
  1384. X*** 145,168 ****
  1385. X      {
  1386. X          count = 0;
  1387. X          PeekConsoleInput(hConIn,&ir,1,&count);
  1388. X!         if (count > 0)
  1389. X!             {
  1390. X!         /* Make sure its an ascii press-down KEY_EVENT */
  1391. X!             if ((ir.EventType == KEY_EVENT) &&
  1392. X!             (ir.Event.KeyEvent.bKeyDown) &&    
  1393. X!             (ir.Event.KeyEvent.uChar.AsciiChar))
  1394. X!             { 
  1395. X!              /* This is what we were looking for        */
  1396. X!              done = 1;            /* Stop looking         */
  1397. X!              retval = 1;        /* Found what we sought */
  1398. X!             }
  1399. X!         /* Discard it, its an insignificant event */
  1400. X!             else ReadConsoleInput(hConIn,&ir,1,&count);
  1401. X!         }
  1402. X!         else  /* There are no events in console event queue*/
  1403. X!         {
  1404. X          done = 1;      /* Stop looking               */
  1405. X!         retval = 0;      /* No ascii press-down key    */
  1406. X          }
  1407. X      }
  1408. X      return retval;
  1409. X--- 239,259 ----
  1410. X      {
  1411. X          count = 0;
  1412. X          PeekConsoleInput(hConIn,&ir,1,&count);
  1413. X!         if (count > 0) {
  1414. X!         ch    = ir.Event.KeyEvent.uChar.AsciiChar;
  1415. X!         scan  = ir.Event.KeyEvent.wVirtualScanCode;
  1416. X!         shiftstate = ir.Event.KeyEvent.dwControlKeyState;
  1417. X!         altseq=(shiftstate & (LEFT_ALT_PRESSED|RIGHT_ALT_PRESSED)) && inmap(scan);
  1418. X!         if (((ir.EventType == KEY_EVENT) && ir.Event.KeyEvent.bKeyDown) &&
  1419. X!              (ch || (iskeypad(scan)) || altseq)) {
  1420. X!             done = 1;        /* Stop looking         */
  1421. X!             retval = 1;         /* Found what we sought */
  1422. X!         }
  1423. X!         else /* Discard it, its an insignificant event */
  1424. X!             ReadConsoleInput(hConIn,&ir,1,&count);
  1425. X!         } else  /* There are no events in console event queue */ {
  1426. X          done = 1;      /* Stop looking               */
  1427. X!         retval = 0;
  1428. X          }
  1429. X      }
  1430. X      return retval;
  1431. X***************
  1432. X*** 173,179 ****
  1433. X  nttty_open()
  1434. X  {
  1435. X          HANDLE hStdOut;
  1436. X! 
  1437. X          /* The following 6 lines of code were suggested by 
  1438. X           * Bob Landau of Microsoft WIN32 Developer support,
  1439. X           * as the only current means of determining whether
  1440. X--- 264,273 ----
  1441. X  nttty_open()
  1442. X  {
  1443. X          HANDLE hStdOut;
  1444. X!         long cmode;
  1445. X!         long mask;
  1446. X!         unsigned int codepage;
  1447. X!         
  1448. X          /* The following 6 lines of code were suggested by 
  1449. X           * Bob Landau of Microsoft WIN32 Developer support,
  1450. X           * as the only current means of determining whether
  1451. X***************
  1452. X*** 193,203 ****
  1453. X              GENERIC_READ |GENERIC_WRITE,
  1454. X              FILE_SHARE_READ |FILE_SHARE_WRITE,
  1455. X              NULL, OPEN_EXISTING, 0, NULL);                    
  1456. X! 
  1457. X      hConOut = CreateFile("CONOUT$",
  1458. X              GENERIC_READ |GENERIC_WRITE,
  1459. X              FILE_SHARE_READ |FILE_SHARE_WRITE,
  1460. X!             NULL, OPEN_EXISTING, 0, NULL);                    
  1461. X      get_scr_size();
  1462. X  }
  1463. X  
  1464. X--- 287,303 ----
  1465. X              GENERIC_READ |GENERIC_WRITE,
  1466. X              FILE_SHARE_READ |FILE_SHARE_WRITE,
  1467. X              NULL, OPEN_EXISTING, 0, NULL);                    
  1468. X!     GetConsoleMode(hConIn,&cmode);
  1469. X!     mask = ENABLE_PROCESSED_INPUT | ENABLE_LINE_INPUT |
  1470. X!            ENABLE_MOUSE_INPUT | ENABLE_ECHO_INPUT | ENABLE_WINDOW_INPUT;   
  1471. X!     cmode &= ~mask;
  1472. X!     SetConsoleMode(hConIn,cmode);
  1473. X!     
  1474. X      hConOut = CreateFile("CONOUT$",
  1475. X              GENERIC_READ |GENERIC_WRITE,
  1476. X              FILE_SHARE_READ |FILE_SHARE_WRITE,
  1477. X!             NULL, OPEN_EXISTING, 0, NULL);                            
  1478. X!         
  1479. X      get_scr_size();
  1480. X  }
  1481. X  
  1482. X***************
  1483. X*** 364,370 ****
  1484. X  void
  1485. X  tty_delay_output()
  1486. X  {
  1487. X!     /* delay 50 ms - not implimented */
  1488. X  }
  1489. X  
  1490. X  void
  1491. X--- 464,476 ----
  1492. X  void
  1493. X  tty_delay_output()
  1494. X  {
  1495. X!     /* delay 50 ms - uses ANSI C clock() function now */
  1496. X!     clock_t goal;
  1497. X! 
  1498. X!     goal = 50 + clock();
  1499. X!     while (goal > clock()) {
  1500. X!         /* Do nothing */
  1501. X!     }
  1502. X  }
  1503. X  
  1504. X  void
  1505. X***************
  1506. X*** 523,526 ****
  1507. X  }
  1508. X  
  1509. X  #endif /* WIN32CON */
  1510. X- 
  1511. X--- 629,631 ----
  1512. X*** /tmp/da22911    Mon Jul 12 18:00:08 1993
  1513. X--- win/X11/dialogs.c    Thu Jul  1 15:32:48 1993
  1514. X***************
  1515. X*** 34,39 ****
  1516. X--- 34,44 ----
  1517. X   *    We don't need it here.
  1518. X   *    + Add the function positionpopup() from another part of ghostview
  1519. X   *    to this code.
  1520. X+  *
  1521. X+  * Modified 2/93, Various.
  1522. X+  *    + Added workaround for SYSV include problem.
  1523. X+  *    + Changed the default width response text widget to be as wide as the
  1524. X+  *    window itself.  Suggestion from David E. Wexelblat, dwex@goblin.org.
  1525. X   */
  1526. X  
  1527. X  #ifndef SYSV
  1528. X***************
  1529. X*** 226,231 ****
  1530. X--- 231,237 ----
  1531. X      return XtNewString(s);
  1532. X  }
  1533. X  
  1534. X+ #define max(a,b) (((a) > (b)) ? (a) : (b))
  1535. X  /* set the default reponse */
  1536. X  void
  1537. X  SetDialogResponse(w, s)
  1538. X***************
  1539. X*** 232,251 ****
  1540. X      Widget w;
  1541. X      String s;
  1542. X  {
  1543. X!     Arg args[3];
  1544. X      Widget response;
  1545. X      XFontStruct *font;
  1546. X!     Dimension width, leftMargin, rightMargin;
  1547. X  
  1548. X      response = XtNameToWidget(w, "response");
  1549. X      XtSetArg(args[0], XtNfont, &font);
  1550. X      XtSetArg(args[1], XtNleftMargin, &leftMargin);
  1551. X      XtSetArg(args[2], XtNrightMargin, &rightMargin);
  1552. X!     XtGetValues(response, args, THREE);
  1553. X!     width = font->max_bounds.width * strlen(s) + leftMargin + rightMargin;
  1554. X  
  1555. X      XtSetArg(args[0], XtNstring, s);
  1556. X!     XtSetArg(args[1], XtNwidth, width);
  1557. X      XtSetValues(response, args, TWO);
  1558. X      XawTextSetInsertionPoint(response, strlen(s));
  1559. X  }
  1560. X--- 238,259 ----
  1561. X      Widget w;
  1562. X      String s;
  1563. X  {
  1564. X!     Arg args[4];
  1565. X      Widget response;
  1566. X      XFontStruct *font;
  1567. X!     Dimension width, nwidth, leftMargin, rightMargin;
  1568. X  
  1569. X      response = XtNameToWidget(w, "response");
  1570. X      XtSetArg(args[0], XtNfont, &font);
  1571. X      XtSetArg(args[1], XtNleftMargin, &leftMargin);
  1572. X      XtSetArg(args[2], XtNrightMargin, &rightMargin);
  1573. X!     XtSetArg(args[3], XtNwidth, &width);
  1574. X!     XtGetValues(response, args, FOUR);
  1575. X!     nwidth = max(((font->max_bounds.width * strlen(s))+leftMargin+rightMargin),
  1576. X!          (width-(leftMargin+rightMargin)));
  1577. X  
  1578. X      XtSetArg(args[0], XtNstring, s);
  1579. X!     XtSetArg(args[1], XtNwidth, nwidth);
  1580. X      XtSetValues(response, args, TWO);
  1581. X      XawTextSetInsertionPoint(response, strlen(s));
  1582. X  }
  1583. X*** /tmp/da22991    Mon Jul 12 18:00:30 1993
  1584. X--- win/X11/winmesg.c    Thu Jul  1 15:33:02 1993
  1585. X***************
  1586. X*** 80,86 ****
  1587. X  
  1588. X      mesg_info->fs = 0;
  1589. X      mesg_info->num_lines = 0;
  1590. X!     mesg_info->head = mesg_info->last_pause =
  1591. X              mesg_info->last_pause_head = (struct line_element *) 0;
  1592. X      mesg_info->dirty = False;
  1593. X      mesg_info->viewport_width = mesg_info->viewport_height = 0;
  1594. X--- 80,86 ----
  1595. X  
  1596. X      mesg_info->fs = 0;
  1597. X      mesg_info->num_lines = 0;
  1598. X!     mesg_info->head = mesg_info->line_here = mesg_info->last_pause =
  1599. X              mesg_info->last_pause_head = (struct line_element *) 0;
  1600. X      mesg_info->dirty = False;
  1601. X      mesg_info->viewport_width = mesg_info->viewport_height = 0;
  1602. X***************
  1603. X*** 445,451 ****
  1604. X  {
  1605. X      struct mesg_info_t *mesg_info = wp->mesg_information;
  1606. X      register struct line_element *curr;
  1607. X!     register int row;
  1608. X  
  1609. X      /*
  1610. X       * Do this the cheap and easy way.  Clear the window and just redraw
  1611. X--- 445,451 ----
  1612. X  {
  1613. X      struct mesg_info_t *mesg_info = wp->mesg_information;
  1614. X      register struct line_element *curr;
  1615. X!     register int row, y_base;
  1616. X  
  1617. X      /*
  1618. X       * Do this the cheap and easy way.  Clear the window and just redraw
  1619. X***************
  1620. X*** 456,469 ****
  1621. X       *
  1622. X       * Only need to clear if window has new text.
  1623. X       */
  1624. X!     if (mesg_info->dirty) XClearWindow(XtDisplay(wp->w), XtWindow(wp->w));
  1625. X  
  1626. X      /* For now, just update the whole shootn' match. */
  1627. X!     for (row = 0, curr = mesg_info->head;
  1628. X!             row < mesg_info->num_lines; row++, curr = curr->next) {
  1629. X  
  1630. X-     register int y_base = row * mesg_info->char_height;
  1631. X- 
  1632. X      XDrawString(XtDisplay(wp->w), XtWindow(wp->w),
  1633. X          mesg_info->gc,
  1634. X          mesg_info->char_lbearing,
  1635. X--- 456,471 ----
  1636. X       *
  1637. X       * Only need to clear if window has new text.
  1638. X       */
  1639. X!     if (mesg_info->dirty) {
  1640. X!     XClearWindow(XtDisplay(wp->w), XtWindow(wp->w));
  1641. X!     mesg_info->line_here = mesg_info->last_pause;
  1642. X!     }
  1643. X  
  1644. X      /* For now, just update the whole shootn' match. */
  1645. X!     for (y_base = row = 0, curr = mesg_info->head;
  1646. X!         row < mesg_info->num_lines;
  1647. X!         row++, y_base += mesg_info->char_height, curr = curr->next) {
  1648. X  
  1649. X      XDrawString(XtDisplay(wp->w), XtWindow(wp->w),
  1650. X          mesg_info->gc,
  1651. X          mesg_info->char_lbearing,
  1652. X***************
  1653. X*** 470,481 ****
  1654. X          mesg_info->char_ascent + y_base,
  1655. X          curr->line,
  1656. X          curr->str_length);
  1657. X- 
  1658. X      /*
  1659. X       * This draws a line at the _top_ of the line of text pointed to by
  1660. X       * mesg_info->last_pause.
  1661. X       */
  1662. X!     if (appResources.message_line && curr == mesg_info->last_pause) {
  1663. X          XDrawLine(XtDisplay(wp->w), XtWindow(wp->w),
  1664. X          mesg_info->gc,
  1665. X          0, y_base, wp->pixel_width, y_base);
  1666. X--- 472,482 ----
  1667. X          mesg_info->char_ascent + y_base,
  1668. X          curr->line,
  1669. X          curr->str_length);
  1670. X      /*
  1671. X       * This draws a line at the _top_ of the line of text pointed to by
  1672. X       * mesg_info->last_pause.
  1673. X       */
  1674. X!     if (appResources.message_line && curr == mesg_info->line_here) {
  1675. X          XDrawLine(XtDisplay(wp->w), XtWindow(wp->w),
  1676. X          mesg_info->gc,
  1677. X          0, y_base, wp->pixel_width, y_base);
  1678. END_OF_FILE
  1679. if test 53675 -ne `wc -c <'patches03e'`; then
  1680.     echo shar: \"'patches03e'\" unpacked with wrong size!
  1681. fi
  1682. # end of 'patches03e'
  1683. if test -f 'sys/msdos/msdos.hlp' -a "${1}" != "-c" ; then 
  1684.   echo shar: Renaming existing file \"'sys/msdos/msdos.hlp'\" to \"'sys/msdos/msdos.hlp.orig'\"
  1685.   mv -f 'sys/msdos/msdos.hlp' 'sys/msdos/msdos.hlp.orig'
  1686. fi
  1687. echo shar: Extracting \"'sys/msdos/msdos.hlp'\" \(3605 characters\)
  1688. sed "s/^X//" >'sys/msdos/msdos.hlp' <<'END_OF_FILE'
  1689. X            MSDOS specific help file for NetHack 3.1.3 
  1690. X                    (Last Revised: July 11, 1993)
  1691. X
  1692. XCopyright (c) NetHack PC Development Team 1993
  1693. XNetHack may be freely distributed.  See license for details.
  1694. X
  1695. XThe MSDOS port of NetHack supports some additional or enhanced commands
  1696. Xas well as some NetHack.cnf file options specific to configuration choices 
  1697. Xused during the building of PC NetHack.  Listed below are those commands
  1698. Xand NetHack.cnf file options.
  1699. X
  1700. XRecognized MSDOS specific NetHack.cnf entries are outlined below.
  1701. X
  1702. X
  1703. XCompound options available under MSDOS if using internal screen routines
  1704. X(NO_TERMS was defined during the compile):
  1705. X
  1706. X        videoshades             May be specified to override the default 
  1707. X                                gray intensity mapping for the following 
  1708. X                                shades of gray (listed in the required 
  1709. X                                order): black gray white
  1710. X                                The choices for mapping to each shade of 
  1711. X                                gray are: dark, normal, or light. 
  1712. X                                Default: videoshades = dark normal light
  1713. X
  1714. X        videocolors             May be specified to override the default 
  1715. X                                color map used by the internal screen 
  1716. X                                management routines in the following 
  1717. X                                order: red green brown blue magenta cyan 
  1718. X                                       orange bright_green yellow bright_blue 
  1719. X                                       bright_magenta bright_cyan
  1720. X                                Default:
  1721. X                                  videocolors = 4 2 6 1 5 3 12 10 14 9 13 11
  1722. X
  1723. XBoolean Options:
  1724. X
  1725. X        IBMgraphics             Use IBM extended characters for the dungeon
  1726. X                                Default: [FALSE]
  1727. X
  1728. XBoolean options if DGK was set at compile time:
  1729. X
  1730. X        BIOS                    Allow the use of IBM ROM BIOS calls
  1731. X                                Default: [FALSE]
  1732. X        rawio                   Allow the use of raw I/O (may only be set
  1733. X                                on startup)
  1734. X                                Default: [FALSE]
  1735. X
  1736. X
  1737. XThe following options are NOT currently recognized under the MSDOS
  1738. Xport of PC NetHack:
  1739. X
  1740. X        LEVELS=                 Where to store/create per level
  1741. X                                data files.
  1742. X        SAVE=                   Where to save games.
  1743. X        BONES=                  Where to store bones files.
  1744. X        RAMDISK=                Where your RAM disk is (driver letter).
  1745. X
  1746. XMSDOS Additional/Enhanced Commands:
  1747. X
  1748. XWhile playing NetHack under MSDOS you can press the ALT key in combination 
  1749. Xwith another key to execute an extended command as an alternative method
  1750. Xto pressing the # key combination:
  1751. X
  1752. XAlt-a    adjust    - adjust inventory letters.
  1753. XAlt-c    chat      - talk to someone.
  1754. XAlt-d    dip       - dip an object into something.
  1755. XAlt-f    force     - force a lock.
  1756. XAlt-i    invoke    - invoke an object's powers.
  1757. XAlt-j    jump      - jump to a location.
  1758. XAlt-l    loot      - loot a box on the floor.
  1759. XAlt-m    monster   - use a monster's special ability.
  1760. XAlt-n    name      - name an item or type of object.
  1761. XAlt-o    offer     - offer a sacrifice to the gods.
  1762. XAlt-p    pray      - pray to the gods for help.
  1763. XAlt-r    rub       - rub a lamp.
  1764. XAlt-s    sit       - sit down.
  1765. XAlt-t    turn      - turn undead.
  1766. XAlt-u    untrap    - untrap something.
  1767. XAlt-v    version   - list compile time options for this version of NetHack.
  1768. XAlt-w    wipe      - wipe off your face.
  1769. XAlt-?    ?         - get this list of extended commands.
  1770. END_OF_FILE
  1771. if test 3605 -ne `wc -c <'sys/msdos/msdos.hlp'`; then
  1772.     echo shar: \"'sys/msdos/msdos.hlp'\" unpacked with wrong size!
  1773. fi
  1774. # end of 'sys/msdos/msdos.hlp'
  1775. echo shar: End of archive 4 \(of 18\).
  1776. cp /dev/null ark4isdone
  1777. MISSING=""
  1778. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 ; do
  1779.     if test ! -f ark${I}isdone ; then
  1780.     MISSING="${MISSING} ${I}"
  1781.     fi
  1782. done
  1783. if test "${MISSING}" = "" ; then
  1784.     echo You have unpacked all 18 archives.
  1785.     echo "Now execute ./patchit3.sh"
  1786.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1787. else
  1788.     echo You still need to unpack the following archives:
  1789.     echo "        " ${MISSING}
  1790. fi
  1791. ##  End of shell archive.
  1792. exit 0
  1793.