home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / games / volume7 / nethack3 / patch8a < prev    next >
Internet Message Format  |  1990-06-08  |  53KB

  1. Path: uunet!zephyr.ens.tek.com!tekred!saab!billr
  2. From: billr@saab.CNA.TEK.COM (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v10i019:  NetHack3 -  display oriented dungeons & dragons (Ver. 3.0), Patch8a
  5. Message-ID: <5727@tekred.CNA.TEK.COM>
  6. Date: 5 Jun 90 17:46:05 GMT
  7. Sender: news@tekred.CNA.TEK.COM
  8. Lines: 1871
  9. Approved: billr@saab.CNA.TEK.COM
  10.  
  11. Submitted-by: Izchak Miller <izchak@linc.cis.upenn.edu>
  12. Posting-number: Volume 10, Issue 19
  13. Archive-name: NetHack3/Patch8a
  14. Patch-To: NetHack3: Volume 7, Issue 56-93
  15.  
  16.     [As before, unpack this in your top level NetHack3 directory.
  17.          This set of patches will overwrite several existing files
  18.          whose diffs were larger than the source itself and create
  19.          several patch8.?? files to be fed to patch. Use the
  20.          do_patch8.sh script to do this automatically. The script also
  21.          deletes several old files or files that moved to other
  22.          directories. There are 24 parts (a-x) in this patch (#8).
  23.               -br]
  24.  
  25. [[And now a word from the development team...
  26. UPDATE8
  27.  
  28. This patch is devoted to bugfixes and accommodations for more versions of
  29. the newer ports.
  30.  
  31. The VMS port should now compile with both VAXC and GNUC and install more
  32. easily under a variety of OS versions, thanks to Joshua Delahunty and Pat
  33. Rankin.
  34.  
  35. A number of strange interactions in the Macintosh-specific code have been
  36. cleaned up.
  37.  
  38. The MSDOS overlay manager was debugged, and the overlay assignments and macro
  39. names straightened out, so the result should be both faster and more stable
  40. than previous versions.  See the new file Install.ovl and various files in
  41. the others directory for more information.
  42.  
  43. The Amiga port now specifies addressing modes for many external variables,
  44. which should make its executable smaller and faster as well.
  45.  
  46.  
  47. The biggest externally visible change separates DECgraphics and IBMgraphics
  48. from the general graphics-setting code, and makes them selectable on the
  49. command line.
  50.  
  51. Once again, existing saved games and bones files should be discarded (or the
  52. update postponed until they are gone).
  53.  
  54. A number of reasonably simple bugs are no more, although some screen update
  55. oddities are postponed to 3.1.  Among the dead are problems with shops on
  56. bones levels, renaming artifacts, kicking non-objects, winning gem treatment,
  57. level bounds checking and monster filling, mimic appearances, taking items
  58. out of containers, monster interiors and inventories, and guard behavior.
  59. Various other things were changed to be consistent with similar situations.]]
  60.  
  61.  
  62. #! /bin/sh
  63. # This is a shell archive.  Remove anything before this line, then unpack
  64. # it by saving it into a file and typing "sh file".  To overwrite existing
  65. # files, type "sh file -c".  You can also feed this as standard input via
  66. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  67. # will see the following message at the end:
  68. #        "End of archive 1 (of 24)."
  69. # Contents:  MANIFEST.P8 patch8.05
  70. # Wrapped by billr@saab on Mon Jun  4 15:27:11 1990
  71. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  72. if test -f 'MANIFEST.P8' -a "${1}" != "-c" ; then 
  73.   echo shar: Will not clobber existing file \"'MANIFEST.P8'\"
  74. else
  75. echo shar: Extracting \"'MANIFEST.P8'\" \(1881 characters\)
  76. sed "s/^X//" >'MANIFEST.P8' <<'END_OF_FILE'
  77. X   File Name        Archive #    Description
  78. X-----------------------------------------------------------
  79. X Files                     24    
  80. X Install.dos               23    
  81. X Install.mac               20    
  82. X Install.ovl               19    
  83. X Install.vms               23    
  84. X MANIFEST.P8                1    This shipping list
  85. X UPDATE8                    5    
  86. X amiga/GBinfo.uu            4    
  87. X amiga/NHScore.uu          24    
  88. X amiga/NHinfo.uu           24    
  89. X amiga/NewGame.uu          24    
  90. X amiga/dflticon.uu         24    
  91. X auxil/Guidebook.mss       10    
  92. X auxil/Guidebook.tex        3    
  93. X auxil/Makefile.auxil      21    
  94. X auxil/history             24    
  95. X do_patch8.sh              20    
  96. X include/decl.h            24    
  97. X mac/MD.proj.hqx           19    
  98. X mac/MD.rsrc.hqx           24    
  99. X mac/MacAlert.c            22    
  100. X mac/NH.proj.hqx           18    
  101. X mac/NH.rsrc.hqx           17    
  102. X mac/SL.proj.hqx           18    
  103. X others/Makefile.os2       23    
  104. X others/Makefile.ovl       22    
  105. X others/exesmurf.c         19    
  106. X others/exesmurf.uu        17    
  107. X others/maintain.ovl       16    
  108. X others/ovlmgr.asm         20    
  109. X others/ovlmgr.doc         23    
  110. X others/ovlmgr.uu          24    
  111. X others/splitf.c            9    
  112. X others/splitf.uu          16    
  113. X others/suputils.ovl        3    
  114. X patch8.01                 12    
  115. X patch8.02                 13    
  116. X patch8.03                  9    
  117. X patch8.04                  8    
  118. X patch8.05                 01    
  119. X patch8.06                  7    
  120. X patch8.07                  6    
  121. X patch8.08                  5    
  122. X patch8.09                 14    
  123. X patch8.10                 15    
  124. X patch8.11                 11    
  125. X patch8.12                  4    
  126. X patch8.13                  2    
  127. X src/lev_comp.c            21    
  128. X src/lev_lex.c             21    
  129. X vms/install.com            2    
  130. X vms/lev_lex.h              4    
  131. X vms/oldcrtl.c              7    
  132. X vms/spec_lev.com          23    
  133. X vms/vmsbuild.com          22    
  134. X vms/vmsmisc.c             20    
  135. X vms/vmstty.c              24    
  136. END_OF_FILE
  137. if test 1881 -ne `wc -c <'MANIFEST.P8'`; then
  138.     echo shar: \"'MANIFEST.P8'\" unpacked with wrong size!
  139. fi
  140. # end of 'MANIFEST.P8'
  141. fi
  142. if test -f 'patch8.05' -a "${1}" != "-c" ; then 
  143.   echo shar: Will not clobber existing file \"'patch8.05'\"
  144. else
  145. echo shar: Extracting \"'patch8.05'\" \(45498 characters\)
  146. sed "s/^X//" >'patch8.05' <<'END_OF_FILE'
  147. X*** src/Old/monst.c    Sun Jun  3 13:36:38 1990
  148. X--- src/monst.c    Sun May 13 20:26:01 1990
  149. X***************
  150. X*** 2,11 ****
  151. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  152. X  /* NetHack may be freely redistributed.  See license for details. */
  153. X  
  154. X- /* since this file is also used in auxiliary programs, don't include all the
  155. X-  * function declarations for all of nethack
  156. X-  */
  157. X- #define EXTERN_H
  158. X  #include "config.h"
  159. X  #include "permonst.h"
  160. X  #include "monsym.h"
  161. X--- 2,7 ----
  162. X***************
  163. X*** 28,40 ****
  164. X  #endif
  165. X  
  166. X  #ifndef SPLITMON_2
  167. X! struct permonst playermon = {        /* used by weapons bonus code */
  168. X      "player", S_HUMAN, 1, 10, 10, 0, 0, G_GENO | G_NOGEN,
  169. X      { { AT_WEAP, AD_PHYS, 1, 6 }, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK },
  170. X      45, 400, PL_NSIZ, MS_SILENT, MZ_HUMAN,
  171. X      M1_NEEDPICK | M1_HUMANOID | M1_COLLECT,
  172. X      M2_HUMAN | M2_STRONG, C(HI_DOMESTIC)
  173. X! },    *uasmon = &playermon;
  174. X  #endif /* SPLITMON_2 */
  175. X  
  176. X  /*
  177. X--- 24,36 ----
  178. X  #endif
  179. X  
  180. X  #ifndef SPLITMON_2
  181. X! struct permonst NEARDATA playermon = {        /* used by weapons bonus code */
  182. X      "player", S_HUMAN, 1, 10, 10, 0, 0, G_GENO | G_NOGEN,
  183. X      { { AT_WEAP, AD_PHYS, 1, 6 }, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK },
  184. X      45, 400, PL_NSIZ, MS_SILENT, MZ_HUMAN,
  185. X      M1_NEEDPICK | M1_HUMANOID | M1_COLLECT,
  186. X      M2_HUMAN | M2_STRONG, C(HI_DOMESTIC)
  187. X! },    NEARDATA *uasmon = &playermon;
  188. X  #endif /* SPLITMON_2 */
  189. X  
  190. X  /*
  191. X***************
  192. X*** 76,82 ****
  193. X  struct permonst *mons;       /* for SMALLDATA - mons data stored in NetHack app */
  194. X  #else
  195. X  #ifndef SPLITMON_2
  196. X! struct permonst mons[] = {
  197. X  /*    ants    */
  198. X      { "giant ant",    S_ANT, 2, 18, 3, 0, 0, (G_GENO | G_SGROUP | 3),
  199. X        { { AT_BITE, AD_PHYS, 1, 4 }, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK },
  200. X--- 72,78 ----
  201. X  struct permonst *mons;       /* for SMALLDATA - mons data stored in NetHack app */
  202. X  #else
  203. X  #ifndef SPLITMON_2
  204. X! struct permonst NEARDATA mons[] = {
  205. X  /*    ants    */
  206. X      { "giant ant",    S_ANT, 2, 18, 3, 0, 0, (G_GENO | G_SGROUP | 3),
  207. X        { { AT_BITE, AD_PHYS, 1, 4 }, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK },
  208. X*** src/Old/mthrowu.c    Sun Jun  3 13:38:37 1990
  209. X--- src/mthrowu.c    Sat May 26 22:30:17 1990
  210. X***************
  211. X*** 4,12 ****
  212. X  
  213. X  #include    "hack.h"
  214. X  
  215. X! OSTATIC int FDECL(movedist,(int,int,int,int));
  216. X! static void FDECL(drop_throw,(struct obj *,BOOLEAN_P,int,int));
  217. X! OSTATIC void FDECL(m_throw,(int,int,int,int,int,struct obj *));
  218. X  
  219. X  #define URETREATING(x,y) (movedist(u.ux,u.uy,x,y) > movedist(u.ux0,u.uy0,x,y))
  220. X  
  221. X--- 4,12 ----
  222. X  
  223. X  #include    "hack.h"
  224. X  
  225. X! STATIC_DCL int FDECL(movedist,(int,int,int,int));
  226. X! STATIC_DCL void FDECL(drop_throw,(struct obj *,BOOLEAN_P,int,int));
  227. X! STATIC_DCL void FDECL(m_throw,(int,int,int,int,int,struct obj *));
  228. X  
  229. X  #define URETREATING(x,y) (movedist(u.ux,u.uy,x,y) > movedist(u.ux0,u.uy0,x,y))
  230. X  
  231. X***************
  232. X*** 14,26 ****
  233. X  
  234. X  #ifndef OVLB
  235. X  
  236. X! OSTATIC const char *breathwep[];
  237. X  
  238. X  #else /* OVLB */
  239. X  
  240. X! schar    tbx = 0, tby = 0;    /* used for direction of throw, buzz, etc. */
  241. X  
  242. X! XSTATIC const char *breathwep[] = {    "fragments",
  243. X                  "fire",
  244. X                  "sleep gas",
  245. X                  "frost",
  246. X--- 14,27 ----
  247. X  
  248. X  #ifndef OVLB
  249. X  
  250. X! STATIC_DCL const char *breathwep[];
  251. X  
  252. X  #else /* OVLB */
  253. X  
  254. X! schar NEARDATA tbx = 0, NEARDATA tby = 0;
  255. X!     /* used for direction of throw, buzz, etc. */
  256. X  
  257. X! STATIC_OVL const char NEARDATA *breathwep[] = {    "fragments",
  258. X                  "fire",
  259. X                  "sleep gas",
  260. X                  "frost",
  261. X***************
  262. X*** 70,76 ****
  263. X  /* Be sure this corresponds with what happens to player-thrown objects in
  264. X   * dothrow.c (for consistency). --KAA
  265. X   */
  266. X! static void
  267. X  drop_throw(obj, ohit, x, y)
  268. X  register struct obj *obj;
  269. X  boolean ohit;
  270. X--- 71,78 ----
  271. X  /* Be sure this corresponds with what happens to player-thrown objects in
  272. X   * dothrow.c (for consistency). --KAA
  273. X   */
  274. X! 
  275. X! STATIC_OVL void
  276. X  drop_throw(obj, ohit, x, y)
  277. X  register struct obj *obj;
  278. X  boolean ohit;
  279. X***************
  280. X*** 93,99 ****
  281. X      } else free((genericptr_t)obj);
  282. X  }
  283. X  
  284. X! XSTATIC void
  285. X  m_throw(x, y, dx, dy, range, obj)
  286. X      register int x,y,dx,dy,range;        /* direction and range */
  287. X      register struct obj *obj;
  288. X--- 95,104 ----
  289. X      } else free((genericptr_t)obj);
  290. X  }
  291. X  
  292. X! #endif /* OVLB */
  293. X! #ifdef OVL1
  294. X! 
  295. X! STATIC_OVL void
  296. X  m_throw(x, y, dx, dy, range, obj)
  297. X      register int x,y,dx,dy,range;        /* direction and range */
  298. X      register struct obj *obj;
  299. X***************
  300. X*** 270,275 ****
  301. X--- 275,283 ----
  302. X      }
  303. X  }
  304. X  
  305. X+ #endif /* OVL1 */
  306. X+ #ifdef OVLB
  307. X+ 
  308. X  /* Remove an item from the monster's inventory.
  309. X   */
  310. X  void
  311. X***************
  312. X*** 322,328 ****
  313. X          if(!URETREATING(x,y) ||
  314. X             !rn2(BOLT_LIM-movedist(x,mtmp->mux,y,mtmp->muy)))
  315. X          {
  316. X!             int savequan = otmp->quan;
  317. X              const char *verb = "throws";
  318. X  
  319. X              if (otmp->otyp == ARROW
  320. X--- 330,336 ----
  321. X          if(!URETREATING(x,y) ||
  322. X             !rn2(BOLT_LIM-movedist(x,mtmp->mux,y,mtmp->muy)))
  323. X          {
  324. X!             unsigned savequan = otmp->quan;
  325. X              const char *verb = "throws";
  326. X  
  327. X              if (otmp->otyp == ARROW
  328. X***************
  329. X*** 476,482 ****
  330. X  #endif /* OVL0 */
  331. X  #ifdef OVL1
  332. X  
  333. X! XSTATIC int
  334. X  movedist(x0, x1, y0, y1)
  335. X  int x0, x1, y0, y1;
  336. X  {
  337. X--- 484,490 ----
  338. X  #endif /* OVL0 */
  339. X  #ifdef OVL1
  340. X  
  341. X! STATIC_OVL int
  342. X  movedist(x0, x1, y0, y1)
  343. X  int x0, x1, y0, y1;
  344. X  {
  345. X*** src/Old/music.c    Sun Jun  3 13:39:01 1990
  346. X--- src/music.c    Sat May 12 16:09:00 1990
  347. X***************
  348. X*** 229,236 ****
  349. X                      else if (flags.soundok && humanoid(mtmp->data))
  350. X                      You("hear a scream!");
  351. X                      if ((mtmp->mhp -= rnd(6)) <= 0) {
  352. X-                     int saved_conf = u.umconf;
  353. X- 
  354. X                      if(!cansee(x,y))
  355. X                          pline("It is destroyed!");
  356. X                      else {
  357. X--- 229,234 ----
  358. X***************
  359. X*** 240,246 ****
  360. X                          mon_nam(mtmp));
  361. X                      }
  362. X                      xkilled(mtmp,0);
  363. X-                     u.umconf = saved_conf;
  364. X                      }
  365. X                  }
  366. X                  } else if (x == u.ux && y == u.uy) {
  367. X--- 238,243 ----
  368. X***************
  369. X*** 394,399 ****
  370. X--- 391,397 ----
  371. X          /* Search for the drawbridge */
  372. X          for(y=u.uy-1; y<=u.uy+1; y++)
  373. X              for(x=u.ux-1;x<=u.ux+1;x++)
  374. X+             if(isok(x,y))
  375. X              if (find_drawbridge(&x,&y)) {
  376. X                  if (levl[x][y].typ == DRAWBRIDGE_DOWN)
  377. X                  close_drawbridge(x,y);
  378. X***************
  379. X*** 408,413 ****
  380. X--- 406,412 ----
  381. X          ok = FALSE;
  382. X          for(y = u.uy-1; y <= u.uy+1 && !ok; y++)
  383. X              for(x = u.ux-1; x <= u.ux+1 && !ok; x++)
  384. X+             if(isok(x,y))
  385. X              if(IS_DRAWBRIDGE(levl[x][y].typ) ||
  386. X                 is_drawbridge_wall(x,y) >= 0)
  387. X                  ok = TRUE;
  388. X*** src/Old/o_init.c    Sun Jun  3 13:39:22 1990
  389. X--- src/o_init.c    Wed May  9 20:18:19 1990
  390. X***************
  391. X*** 4,9 ****
  392. X--- 4,13 ----
  393. X  
  394. X  #include    "hack.h"        /* for typedefs */
  395. X  
  396. X+ #if defined(LATTICE)                 /* This is NOT */
  397. X+ # define MACOS                    /* a typo! */
  398. X+ #endif
  399. X+ 
  400. X  static void NDECL(setgemprobs);
  401. X  static void FDECL(shuffle,(int,int,BOOLEAN_P));
  402. X  static boolean FDECL(interesting_to_discover,(int));
  403. X***************
  404. X*** 28,35 ****
  405. X  #endif
  406. X      RING_SYM, GEM_SYM, 0 };
  407. X  
  408. X! int bases[sizeof(obj_symbols)] = DUMMY;
  409. X! static int disco[TOTAL_OBJS] = DUMMY;
  410. X  
  411. X  int
  412. X  letindex(let) register char let; {
  413. X--- 32,39 ----
  414. X  #endif
  415. X      RING_SYM, GEM_SYM, 0 };
  416. X  
  417. X! int NEARDATA bases[sizeof(obj_symbols)] = DUMMY;
  418. X! static int NEARDATA disco[TOTAL_OBJS] = DUMMY;
  419. X  
  420. X  int
  421. X  letindex(let) register char let; {
  422. X***************
  423. X*** 301,307 ****
  424. X          objects[i].oc_descr = d[switches[i]].descr;
  425. X      }
  426. X  #else
  427. X! # if !defined(MSDOS) && !defined(M_XENIX) && !defined(HPUX)
  428. X      differ = (genericptr_t)&objects[0] - (genericptr_t)then;
  429. X  # else
  430. X      differ = (long)&objects[0] - (long)then;
  431. X--- 305,311 ----
  432. X          objects[i].oc_descr = d[switches[i]].descr;
  433. X      }
  434. X  #else
  435. X! # if !defined(MSDOS) && !defined(M_XENIX) && !defined(HPUX) && !defined(VAXC)
  436. X      differ = (genericptr_t)&objects[0] - (genericptr_t)then;
  437. X  # else
  438. X      differ = (long)&objects[0] - (long)then;
  439. X***************
  440. X*** 310,316 ****
  441. X      for(i=0; i < TOTAL_OBJS; i++) {
  442. X  #ifndef MACOS
  443. X          if (objects[i].oc_name) {
  444. X! # if !defined(MSDOS) && !defined(M_XENIX)
  445. X              objects[i].oc_name += differ;
  446. X  # else
  447. X              objects[i].oc_name =
  448. X--- 314,320 ----
  449. X      for(i=0; i < TOTAL_OBJS; i++) {
  450. X  #ifndef MACOS
  451. X          if (objects[i].oc_name) {
  452. X! # if !defined(MSDOS) && !defined(M_XENIX) && !defined(HPUX) && !defined(VAXC)
  453. X              objects[i].oc_name += differ;
  454. X  # else
  455. X              objects[i].oc_name =
  456. X***************
  457. X*** 318,324 ****
  458. X  # endif
  459. X          }
  460. X          if (objects[i].oc_descr) {
  461. X! # if !defined(MSDOS) && !defined(M_XENIX)
  462. X              objects[i].oc_descr += differ;
  463. X  # else
  464. X              objects[i].oc_descr =
  465. X--- 322,328 ----
  466. X  # endif
  467. X          }
  468. X          if (objects[i].oc_descr) {
  469. X! # if !defined(MSDOS) && !defined(M_XENIX) && !defined(HPUX) && !defined(VAXC)
  470. X              objects[i].oc_descr += differ;
  471. X  # else
  472. X              objects[i].oc_descr =
  473. X*** src/Old/objects.c    Sun Jun  3 13:39:46 1990
  474. X--- src/objects.c    Sun May 13 20:26:16 1990
  475. X***************
  476. X*** 2,16 ****
  477. X  /* NetHack may be freely redistributed.  See license for details. */
  478. X  /* Copyright (c) Mike Threepoint, 1989 (890110) */
  479. X  
  480. X- /* since this file is also used in auxiliary programs, don't include all the 
  481. X-  * function declarations for all of nethack
  482. X-  */
  483. X- #define EXTERN_H
  484. X  #include "config.h"
  485. X  #include "obj.h"
  486. X  #include "objclass.h"
  487. X  #include "prop.h"
  488. X- #undef BOW
  489. X  
  490. X  /* objects have letter " % ) ( 0 _ ` [ ! ? / = * + . */
  491. X  
  492. X--- 2,11 ----
  493. X***************
  494. X*** 28,34 ****
  495. X  struct objclass *objects;
  496. X  struct small_objclass sm_obj[] = {
  497. X  #else
  498. X! struct objclass objects[] = {
  499. X  #endif
  500. X  
  501. X  #if defined(MACOS) && !defined(MAKEDEFS_C)
  502. X--- 23,29 ----
  503. X  struct objclass *objects;
  504. X  struct small_objclass sm_obj[] = {
  505. X  #else
  506. X! struct objclass NEARDATA objects[] = {
  507. X  #endif
  508. X  
  509. X  #if defined(MACOS) && !defined(MAKEDEFS_C)
  510. X***************
  511. X*** 549,554 ****
  512. X--- 544,589 ----
  513. X  #undef ARMOR
  514. X  
  515. X  #if defined(MACOS) && !defined(MAKEDEFS_C)
  516. X+ #define GEM(name,desc,prob,wt,gval,glass, color) \
  517. X+     { name, desc}
  518. X+ #else
  519. X+ #define GEM(name,desc,prob,wt,gval,glass, color) \
  520. X+         { name, desc, NULL, 0,1,0,0,glass, 0,\
  521. X+         GEM_SYM, prob, 0, wt, gval, 3, 3, WP_SLING, C(color)}
  522. X+ #endif
  523. X+ GEM("dilithium crystal", "white",     3, 1, 4500, MINERAL, WHITE),
  524. X+ GEM("diamond", "white",          4, 1, 4000, MINERAL, WHITE),
  525. X+ GEM("ruby", "red",             5, 1, 3500, MINERAL, RED),
  526. X+ GEM("sapphire", "blue",          6, 1, 3000, MINERAL, BLUE),
  527. X+ GEM("emerald", "green",          7, 1, 2500, MINERAL, GREEN),
  528. X+ GEM("turquoise", "green",         8, 1, 2000, MINERAL, GREEN),
  529. X+ GEM("aquamarine", "green",        10, 1, 1500, MINERAL, GREEN),
  530. X+ GEM("amber", "yellowish brown",     11, 1, 1000, MINERAL, BROWN),
  531. X+ GEM("topaz", "yellowish brown",     13, 1,    900, MINERAL, BROWN),
  532. X+ GEM("opal", "white",            15, 1,    800, MINERAL, WHITE),
  533. X+ GEM("garnet", "red",            17, 1,    700, MINERAL, RED),
  534. X+ GEM("amethyst", "violet",        19, 1,  600, MINERAL, MAGENTA),
  535. X+ GEM("jasper", "red",            21, 1,    500, MINERAL, RED),
  536. X+ GEM("fluorite", "violet",        22, 1,    400, MINERAL, MAGENTA),
  537. X+ GEM("jade", "green",            23, 1,    300, MINERAL, GREEN),
  538. X+ GEM("worthless piece of white glass", "white",    131, 1, 0, GLASS, WHITE),
  539. X+ GEM("worthless piece of blue glass", "blue",    131, 1, 0, GLASS, BLUE),
  540. X+ GEM("worthless piece of red glass", "red",    131, 1, 0, GLASS, RED),
  541. X+ GEM("worthless piece of yellowish brown glass", "yellowish brown",
  542. X+                         131, 1, 0, GLASS, BROWN),
  543. X+ GEM("worthless piece of green glass", "green",    131, 1, 0, GLASS, GREEN),
  544. X+ GEM("worthless piece of violet glass", "violet",131, 1, 0, GLASS, MAGENTA),
  545. X+ GEM("luckstone", "gray",         10, 1,  60, MINERAL, GRAY),
  546. X+ GEM("loadstone", "gray",         10, 50,  1, MINERAL, GRAY),
  547. X+ #if defined(MACOS) && !defined(MAKEDEFS_C)
  548. X+ { "rock", NULL},
  549. X+ #else
  550. X+ { "rock", NULL, NULL, 1,1,0,0,MINERAL, 0,
  551. X+         GEM_SYM, 10, 0, 1, 0, 3, 3, WP_SLING, C(HI_MINERAL)},
  552. X+ #endif
  553. X+ #undef GEM
  554. X+ 
  555. X+ #if defined(MACOS) && !defined(MAKEDEFS_C)
  556. X  #define POTION(name,desc,power,prob,cost,color) \
  557. X      { name, desc}
  558. X  #else
  559. X***************
  560. X*** 756,802 ****
  561. X  RING("protection from shape changers", "shining", PROT_FROM_SHAPE_CHANGERS,
  562. X                              100, 0, METAL, HI_METAL|BRIGHT),
  563. X  #undef RING
  564. X- 
  565. X- /* gems ************************************************************/
  566. X- #if defined(MACOS) && !defined(MAKEDEFS_C)
  567. X- #define GEM(name,desc,prob,wt,gval,glass, color) \
  568. X-     { name, desc}
  569. X- #else
  570. X- #define GEM(name,desc,prob,wt,gval,glass, color) \
  571. X-         { name, desc, NULL, 0,1,0,0,glass, 0,\
  572. X-         GEM_SYM, prob, 0, wt, gval, 3, 3, WP_SLING, C(color)}
  573. X- #endif
  574. X- GEM("dilithium crystal", "white",     3, 1, 4500, MINERAL, WHITE),
  575. X- GEM("diamond", "white",          4, 1, 4000, MINERAL, WHITE),
  576. X- GEM("ruby", "red",             5, 1, 3500, MINERAL, RED),
  577. X- GEM("sapphire", "blue",          6, 1, 3000, MINERAL, BLUE),
  578. X- GEM("emerald", "green",          7, 1, 2500, MINERAL, GREEN),
  579. X- GEM("turquoise", "green",         8, 1, 2000, MINERAL, GREEN),
  580. X- GEM("aquamarine", "green",        10, 1, 1500, MINERAL, GREEN),
  581. X- GEM("amber", "yellowish brown",     11, 1, 1000, MINERAL, BROWN),
  582. X- GEM("topaz", "yellowish brown",     13, 1,    900, MINERAL, BROWN),
  583. X- GEM("opal", "white",            15, 1,    800, MINERAL, WHITE),
  584. X- GEM("garnet", "red",            17, 1,    700, MINERAL, RED),
  585. X- GEM("amethyst", "violet",        19, 1,  600, MINERAL, MAGENTA),
  586. X- GEM("jasper", "red",            21, 1,    500, MINERAL, RED),
  587. X- GEM("fluorite", "violet",        22, 1,    400, MINERAL, MAGENTA),
  588. X- GEM("jade", "green",            23, 1,    300, MINERAL, GREEN),
  589. X- GEM("worthless piece of white glass", "white",    131, 1, 0, GLASS, WHITE),
  590. X- GEM("worthless piece of blue glass", "blue",    131, 1, 0, GLASS, BLUE),
  591. X- GEM("worthless piece of red glass", "red",    131, 1, 0, GLASS, RED),
  592. X- GEM("worthless piece of yellowish brown glass", "yellowish brown",
  593. X-                         131, 1, 0, GLASS, BROWN),
  594. X- GEM("worthless piece of green glass", "green",    131, 1, 0, GLASS, GREEN),
  595. X- GEM("worthless piece of violet glass", "violet",131, 1, 0, GLASS, MAGENTA),
  596. X- GEM("luckstone", "gray",         10, 1,  60, MINERAL, GRAY),
  597. X- GEM("loadstone", "gray",         10, 50,  1, MINERAL, GRAY),
  598. X- #if defined(MACOS) && !defined(MAKEDEFS_C)
  599. X- { "rock", NULL},
  600. X- #else
  601. X- { "rock", NULL, NULL, 1,1,0,0,MINERAL, 0,
  602. X-         GEM_SYM, 10, 0, 1, 0, 3, 3, WP_SLING, C(HI_MINERAL)},
  603. X- #endif
  604. X- #undef GEM
  605. X  
  606. X  #if defined(MACOS) && !defined(MAKEDEFS_C)
  607. X      { NULL, NULL}
  608. X--- 791,796 ----
  609. X*** src/Old/objnam.c    Mon Jun  4 13:11:56 1990
  610. X--- src/objnam.c    Mon Jun  4 13:04:34 1990
  611. X***************
  612. X*** 3,8
  613. X  /* NetHack may be freely redistributed.  See license for details. */
  614. X  
  615. X  #include    "hack.h"
  616. X  #include <ctype.h>    /* for isalpha() */
  617. X  
  618. X  /* "an uncursed partly eaten guardian naga hatchling corpse" */
  619. X
  620. X--- 3,9 -----
  621. X  /* NetHack may be freely redistributed.  See license for details. */
  622. X  
  623. X  #include    "hack.h"
  624. X+ #ifdef TUTTI_FRUTTI
  625. X  #include <ctype.h>    /* for isalpha() */
  626. X  #endif
  627. X  
  628. X***************
  629. X*** 4,9
  630. X  
  631. X  #include    "hack.h"
  632. X  #include <ctype.h>    /* for isalpha() */
  633. X  
  634. X  /* "an uncursed partly eaten guardian naga hatchling corpse" */
  635. X  #define    PREFIX    50
  636. X
  637. X--- 5,11 -----
  638. X  #include    "hack.h"
  639. X  #ifdef TUTTI_FRUTTI
  640. X  #include <ctype.h>    /* for isalpha() */
  641. X+ #endif
  642. X  
  643. X  /* "an uncursed partly eaten guardian naga hatchling corpse" */
  644. X  #define    PREFIX    50
  645. X***************
  646. X*** 11,17
  647. X  
  648. X  #ifndef OVLB
  649. X  
  650. X! OSTATIC const char *keystr[N_LOX], *lockstr[N_LOX];
  651. X  
  652. X  #else /* OVLB */
  653. X  /*    We want the player to be able to learn what key goes in what lock.  */
  654. X
  655. X--- 13,19 -----
  656. X  
  657. X  #ifndef OVLB
  658. X  
  659. X! STATIC_DCL const char *keystr[N_LOX], *lockstr[N_LOX];
  660. X  
  661. X  #else /* OVLB */
  662. X  /*    We want the player to be able to learn what key goes in what lock.  */
  663. X***************
  664. X*** 15,21
  665. X  
  666. X  #else /* OVLB */
  667. X  /*    We want the player to be able to learn what key goes in what lock.  */
  668. X! XSTATIC const char *keystr[N_LOX] = { "round", "square", "triangular", "oval",
  669. X                            "octagonal", "hexagonal", "cylindrical",
  670. X                            "irregular", "conical", "wedge-shaped" },
  671. X                *lockstr[N_LOX] = { "round", "square", "triangular", "oval",
  672. X
  673. X--- 17,23 -----
  674. X  
  675. X  #else /* OVLB */
  676. X  /*    We want the player to be able to learn what key goes in what lock.  */
  677. X! STATIC_OVL const char NEARDATA *keystr[N_LOX] = { "round", "square", "triangular", "oval",
  678. X                            "octagonal", "hexagonal", "cylindrical",
  679. X                            "irregular", "conical", "wedge-shaped" },
  680. X               NEARDATA *lockstr[N_LOX] = { "round", "square", "triangular", "oval",
  681. X***************
  682. X*** 18,24
  683. X  XSTATIC const char *keystr[N_LOX] = { "round", "square", "triangular", "oval",
  684. X                            "octagonal", "hexagonal", "cylindrical",
  685. X                            "irregular", "conical", "wedge-shaped" },
  686. X!               *lockstr[N_LOX] = { "round", "square", "triangular", "oval",
  687. X                            "octagonal", "hexagonal", "wide",
  688. X                            "notched", "large round", "large square" };
  689. X  #endif /* OVLB */
  690. X
  691. X--- 20,26 -----
  692. X  STATIC_OVL const char NEARDATA *keystr[N_LOX] = { "round", "square", "triangular", "oval",
  693. X                            "octagonal", "hexagonal", "cylindrical",
  694. X                            "irregular", "conical", "wedge-shaped" },
  695. X!              NEARDATA *lockstr[N_LOX] = { "round", "square", "triangular", "oval",
  696. X                            "octagonal", "hexagonal", "wide",
  697. X                            "notched", "large round", "large square" };
  698. X  #endif /* OVLB */
  699. X***************
  700. X*** 23,32
  701. X                            "notched", "large round", "large square" };
  702. X  #endif /* OVLB */
  703. X  
  704. X! static int FDECL(rnd_class, (int,int));
  705. X! OSTATIC int FDECL(named_key,(const char *));
  706. X! OSTATIC int FDECL(named_box,(const char *));
  707. X! OSTATIC char *FDECL(strprepend,(char *,const char *));
  708. X  static char *FDECL(sitoa,(int));
  709. X  
  710. X  static struct Jitem {
  711. X
  712. X--- 25,35 -----
  713. X                            "notched", "large round", "large square" };
  714. X  #endif /* OVLB */
  715. X  
  716. X! STATIC_DCL int FDECL(named_key,(const char *));
  717. X! STATIC_DCL int FDECL(named_box,(const char *));
  718. X! STATIC_DCL char *FDECL(strprepend,(char *,const char *));
  719. X! 
  720. X! #ifdef OVL1
  721. X  static char *FDECL(sitoa,(int));
  722. X  #endif /* OVL1 */
  723. X  
  724. X***************
  725. X*** 28,33
  726. X  OSTATIC int FDECL(named_box,(const char *));
  727. X  OSTATIC char *FDECL(strprepend,(char *,const char *));
  728. X  static char *FDECL(sitoa,(int));
  729. X  
  730. X  static struct Jitem {
  731. X      int item;
  732. X
  733. X--- 31,37 -----
  734. X  
  735. X  #ifdef OVL1
  736. X  static char *FDECL(sitoa,(int));
  737. X+ #endif /* OVL1 */
  738. X  
  739. X  struct Jitem {
  740. X      int item;
  741. X***************
  742. X*** 29,35
  743. X  OSTATIC char *FDECL(strprepend,(char *,const char *));
  744. X  static char *FDECL(sitoa,(int));
  745. X  
  746. X! static struct Jitem {
  747. X      int item;
  748. X      const char *name;
  749. X  } Japanese_items[] = {
  750. X
  751. X--- 33,39 -----
  752. X  static char *FDECL(sitoa,(int));
  753. X  #endif /* OVL1 */
  754. X  
  755. X! struct Jitem {
  756. X      int item;
  757. X      const char *name;
  758. X  };
  759. X***************
  760. X*** 32,38
  761. X  static struct Jitem {
  762. X      int item;
  763. X      const char *name;
  764. X! } Japanese_items[] = {
  765. X      { SHORT_SWORD, "wakizashi" },
  766. X      { BROADSWORD, "ninja-to" },
  767. X      { GLAIVE, "naginata" },
  768. X
  769. X--- 36,50 -----
  770. X  struct Jitem {
  771. X      int item;
  772. X      const char *name;
  773. X! };
  774. X! 
  775. X! #ifndef OVLB
  776. X! 
  777. X! STATIC_DCL struct Jitem Japanese_items[];
  778. X! 
  779. X! #else /* OVLB */
  780. X! 
  781. X! STATIC_OVL struct Jitem Japanese_items[] = {
  782. X      { SHORT_SWORD, "wakizashi" },
  783. X      { BROADSWORD, "ninja-to" },
  784. X      { GLAIVE, "naginata" },
  785. X***************
  786. X*** 40,46
  787. X      { LOCK_PICK, "osaku" },
  788. X      {0, "" }
  789. X  };
  790. X- OSTATIC const char *FDECL(Japanese_item_name,(int));
  791. X  
  792. X  #ifdef OVL1
  793. X  
  794. X
  795. X--- 52,57 -----
  796. X      { LOCK_PICK, "osaku" },
  797. X      {0, "" }
  798. X  };
  799. X  
  800. X  #endif /* OVLB */
  801. X  
  802. X***************
  803. X*** 42,47
  804. X  };
  805. X  OSTATIC const char *FDECL(Japanese_item_name,(int));
  806. X  
  807. X  #ifdef OVL1
  808. X  
  809. X  XSTATIC int
  810. X
  811. X--- 53,62 -----
  812. X      {0, "" }
  813. X  };
  814. X  
  815. X+ #endif /* OVLB */
  816. X+ 
  817. X+ STATIC_DCL const char *FDECL(Japanese_item_name,(int));
  818. X+ 
  819. X  #ifdef OVL1
  820. X  
  821. X  STATIC_OVL int
  822. X***************
  823. X*** 44,50
  824. X  
  825. X  #ifdef OVL1
  826. X  
  827. X! XSTATIC int
  828. X  named_key(s) register const char *s; {
  829. X      char tc[BUFSZ];
  830. X      register int i;
  831. X
  832. X--- 59,65 -----
  833. X  
  834. X  #ifdef OVL1
  835. X  
  836. X! STATIC_OVL int
  837. X  named_key(s) register const char *s; {
  838. X      char tc[BUFSZ];
  839. X      register int i;
  840. X***************
  841. X*** 57,63
  842. X      return(0);
  843. X  }
  844. X  
  845. X! XSTATIC int
  846. X  named_box(s)
  847. X  register const char *s;
  848. X  {
  849. X
  850. X--- 72,78 -----
  851. X      return(0);
  852. X  }
  853. X  
  854. X! STATIC_OVL int
  855. X  named_box(s)
  856. X  register const char *s;
  857. X  {
  858. X***************
  859. X*** 72,78
  860. X      return(0);
  861. X  }
  862. X  
  863. X! XSTATIC char *
  864. X  strprepend(s,pref)
  865. X  register char *s;
  866. X  register const char *pref; {
  867. X
  868. X--- 87,93 -----
  869. X      return(0);
  870. X  }
  871. X  
  872. X! STATIC_OVL char *
  873. X  strprepend(s,pref)
  874. X  register char *s;
  875. X  register const char *pref; {
  876. X***************
  877. X*** 91,97
  878. X  #ifdef LINT    /* static char buf[13]; */
  879. X      char buf[13];
  880. X  #else
  881. X!     static char buf[13];
  882. X  #endif
  883. X      Sprintf(buf, (a < 0) ? "%d" : "+%d", a);
  884. X      return(buf);
  885. X
  886. X--- 106,112 -----
  887. X  #ifdef LINT    /* static char buf[13]; */
  888. X      char buf[13];
  889. X  #else
  890. X!     static char NEARDATA buf[13];
  891. X  #endif
  892. X      Sprintf(buf, (a < 0) ? "%d" : "+%d", a);
  893. X      return(buf);
  894. X***************
  895. X*** 107,113
  896. X  #ifdef LINT    /* static char buf[BUFSZ]; */
  897. X  char buf[BUFSZ];
  898. X  #else
  899. X! static char buf[BUFSZ];
  900. X  #endif
  901. X  register struct objclass *ocl = &objects[otyp];
  902. X  register const char *actualn = ocl->oc_name;
  903. X
  904. X--- 122,128 -----
  905. X  #ifdef LINT    /* static char buf[BUFSZ]; */
  906. X  char buf[BUFSZ];
  907. X  #else
  908. X! static char NEARDATA buf[BUFSZ];
  909. X  #endif
  910. X  register struct objclass *ocl = &objects[otyp];
  911. X  register const char *actualn = ocl->oc_name;
  912. X***************
  913. X*** 612,618
  914. X  register struct obj *otmp;
  915. X  char *FDECL((*func), (struct obj *));
  916. X  {
  917. X!     int savequan;
  918. X      char *nam;
  919. X  
  920. X      /* Note: using xname for corpses will not give the monster type */
  921. X
  922. X--- 627,633 -----
  923. X  register struct obj *otmp;
  924. X  char *FDECL((*func), (struct obj *));
  925. X  {
  926. X!     unsigned savequan;
  927. X      char *nam;
  928. X  
  929. X      /* Note: using xname for corpses will not give the monster type */
  930. X***************
  931. X*** 617,623
  932. X  
  933. X      /* Note: using xname for corpses will not give the monster type */
  934. X      if (otmp->otyp == CORPSE && func == xname) {
  935. X!         static char buf[31];
  936. X  
  937. X          Sprintf(buf, "%s corpse", mons[otmp->corpsenm].mname);
  938. X          return buf;
  939. X
  940. X--- 632,638 -----
  941. X  
  942. X      /* Note: using xname for corpses will not give the monster type */
  943. X      if (otmp->otyp == CORPSE && func == xname) {
  944. X!         static char NEARDATA buf[31];
  945. X  
  946. X          Sprintf(buf, "%s corpse", mons[otmp->corpsenm].mname);
  947. X          return buf;
  948. X***************
  949. X*** 633,639
  950. X  an(str)
  951. X  register const char *str;
  952. X  {
  953. X!     static char buf[BUFSZ];
  954. X  
  955. X      buf[0] = '\0';
  956. X  
  957. X
  958. X--- 648,654 -----
  959. X  an(str)
  960. X  register const char *str;
  961. X  {
  962. X!     static char NEARDATA buf[BUFSZ];
  963. X  
  964. X      buf[0] = '\0';
  965. X  
  966. X***************
  967. X*** 639,644
  968. X  
  969. X      if (strncmp(str, "the ", 4))
  970. X          if (index(vowels, *str) &&
  971. X          strncmp(str, "unicorn", 7) &&
  972. X          strncmp(str, "uranium", 7))
  973. X              Strcpy(buf, "an ");
  974. X
  975. X--- 654,660 -----
  976. X  
  977. X      if (strncmp(str, "the ", 4))
  978. X          if (index(vowels, *str) &&
  979. X+         strncmp(str, "useful", 6) &&
  980. X          strncmp(str, "unicorn", 7) &&
  981. X          strncmp(str, "uranium", 7))
  982. X              Strcpy(buf, "an ");
  983. X***************
  984. X*** 737,743
  985. X  const char *oldstr;
  986. X  {
  987. X      register char *spot;
  988. X!     static char str[BUFSZ];
  989. X      const char *excess;
  990. X      int len;
  991. X  
  992. X
  993. X--- 753,759 -----
  994. X  const char *oldstr;
  995. X  {
  996. X      register char *spot;
  997. X!     static char NEARDATA str[BUFSZ];
  998. X      const char *excess;
  999. X      int len;
  1000. X  
  1001. X***************
  1002. X*** 876,883
  1003. X      }
  1004. X  
  1005. X      /* matzoh/matzot, possible food name */
  1006. X!     if (len >= 6 && !strcmp(spot-5, "matzoh")) {
  1007. X!         *(spot) = 't';
  1008. X          goto bottom;
  1009. X      }
  1010. X  
  1011. X
  1012. X--- 892,900 -----
  1013. X      }
  1014. X  
  1015. X      /* matzoh/matzot, possible food name */
  1016. X!     if (len >= 6 && (!strcmp(spot-5, "matzoh")
  1017. X!                     || !strcmp(spot-5, "matzah"))) {
  1018. X!         Strcpy(spot-1, "ot");
  1019. X          goto bottom;
  1020. X      }
  1021. X      if (len >= 5 && (!strcmp(spot-4, "matzo")
  1022. X***************
  1023. X*** 880,885
  1024. X          *(spot) = 't';
  1025. X          goto bottom;
  1026. X      }
  1027. X  
  1028. X      /* child/children (for the wise guys who give their food funny names) */
  1029. X      if (len >= 5 && !strcmp(spot-4, "child")) {
  1030. X
  1031. X--- 897,907 -----
  1032. X          Strcpy(spot-1, "ot");
  1033. X          goto bottom;
  1034. X      }
  1035. X+     if (len >= 5 && (!strcmp(spot-4, "matzo")
  1036. X+                     || !strcmp(spot-5, "matza"))) {
  1037. X+         Strcpy(spot, "ot");
  1038. X+         goto bottom;
  1039. X+     }
  1040. X  
  1041. X      /* child/children (for the wise guys who give their food funny names) */
  1042. X      if (len >= 5 && !strcmp(spot-4, "child")) {
  1043. X***************
  1044. X*** 931,937
  1045. X  
  1046. X  #ifndef OVLB
  1047. X  
  1048. X! OSTATIC const struct o_range o_ranges[];
  1049. X  
  1050. X  #else /* OVLB */
  1051. X  
  1052. X
  1053. X--- 953,959 -----
  1054. X  
  1055. X  #ifndef OVLB
  1056. X  
  1057. X! STATIC_DCL const struct o_range o_ranges[];
  1058. X  
  1059. X  #else /* OVLB */
  1060. X  
  1061. X***************
  1062. X*** 936,942
  1063. X  #else /* OVLB */
  1064. X  
  1065. X  /* wishable subranges of objects */
  1066. X! XSTATIC const struct o_range o_ranges[] = {
  1067. X      { "bag",    TOOL_SYM,   SACK,        BAG_OF_TRICKS },
  1068. X      { "gloves",    ARMOR_SYM,  LEATHER_GLOVES, GAUNTLETS_OF_DEXTERITY },
  1069. X      { "gauntlets",    ARMOR_SYM,  LEATHER_GLOVES, GAUNTLETS_OF_DEXTERITY },
  1070. X
  1071. X--- 958,964 -----
  1072. X  #else /* OVLB */
  1073. X  
  1074. X  /* wishable subranges of objects */
  1075. X! STATIC_OVL const struct o_range NEARDATA o_ranges[] = {
  1076. X      { "bag",    TOOL_SYM,   SACK,        BAG_OF_TRICKS },
  1077. X      { "gloves",    ARMOR_SYM,  LEATHER_GLOVES, GAUNTLETS_OF_DEXTERITY },
  1078. X      { "gauntlets",    ARMOR_SYM,  LEATHER_GLOVES, GAUNTLETS_OF_DEXTERITY },
  1079. X***************
  1080. X*** 963,969
  1081. X  const char *oldstr;
  1082. X  {
  1083. X      char *p, *bp;
  1084. X!     static char str[BUFSZ];
  1085. X  
  1086. X      if (!oldstr || !*oldstr) {
  1087. X          impossible("singular of null?");
  1088. X
  1089. X--- 985,991 -----
  1090. X  const char *oldstr;
  1091. X  {
  1092. X      char *p, *bp;
  1093. X!     static char NEARDATA str[BUFSZ];
  1094. X  
  1095. X      if (!oldstr || !*oldstr) {
  1096. X          impossible("singular of null?");
  1097. X***************
  1098. X*** 1228,1235
  1099. X  
  1100. X  sing:
  1101. X      /* Maybe we need a special strcmp() which ignores capitalization and
  1102. X!      * dashes/spaces/underscores, so the below 3 special cases would be
  1103. X!      * unnecessary.
  1104. X       */
  1105. X      /* Alternate spellings (two-handed sword vs. two handed sword) */
  1106. X      if(!strcmp(bp, "two handed sword")) {
  1107. X
  1108. X--- 1250,1257 -----
  1109. X  
  1110. X  sing:
  1111. X      /* Maybe we need a special strcmp() which ignores capitalization and
  1112. X!      * dashes/spaces/underscores, so some of the below special cases would
  1113. X!      * be unnecessary.
  1114. X       */
  1115. X      /* Alternate spellings (two-handed sword vs. two handed sword) */
  1116. X      if(!strcmp(bp, "two handed sword")) {
  1117. X***************
  1118. X*** 1615,1621
  1119. X      return(otmp);
  1120. X  }
  1121. X  
  1122. X! static int
  1123. X  rnd_class(first,last)
  1124. X  int first,last;
  1125. X  {
  1126. X
  1127. X--- 1637,1643 -----
  1128. X      return(otmp);
  1129. X  }
  1130. X  
  1131. X! int
  1132. X  rnd_class(first,last)
  1133. X  int first,last;
  1134. X  {
  1135. X***************
  1136. X*** 1629,1635
  1137. X      return 0;
  1138. X  }
  1139. X  
  1140. X! XSTATIC const char *
  1141. X  Japanese_item_name(i)
  1142. X  int i;
  1143. X  {
  1144. X
  1145. X--- 1651,1657 -----
  1146. X      return 0;
  1147. X  }
  1148. X  
  1149. X! STATIC_OVL const char *
  1150. X  Japanese_item_name(i)
  1151. X  int i;
  1152. X  {
  1153. X
  1154. X*** src/Old/options.c    Sun Jun  3 13:41:43 1990
  1155. X--- src/options.c    Sat May 26 16:05:14 1990
  1156. X***************
  1157. X*** 1,12 ****
  1158. X  /*    SCCS Id: @(#)options.c    3.0    89/11/15
  1159. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  1160. X  /* NetHack may be freely redistributed.  See license for details. */
  1161. X  #include "hack.h"
  1162. X! static boolean set_order;
  1163. X  
  1164. X  static void FDECL(nmcpy, (char *, const char *, int));
  1165. X  void FDECL(escapes,(const char *, char *));
  1166. X  
  1167. X  void
  1168. X  initoptions()
  1169. X  {
  1170. X--- 1,19 ----
  1171. X  /*    SCCS Id: @(#)options.c    3.0    89/11/15
  1172. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  1173. X  /* NetHack may be freely redistributed.  See license for details. */
  1174. X+ 
  1175. X  #include "hack.h"
  1176. X! #include "termcap.h"
  1177. X! 
  1178. X! static boolean NEARDATA set_order;
  1179. X  
  1180. X  static void FDECL(nmcpy, (char *, const char *, int));
  1181. X  void FDECL(escapes,(const char *, char *));
  1182. X  
  1183. X+ #ifdef AMIGA_WBENCH
  1184. X+ extern int FromWBench;
  1185. X+ #endif
  1186. X+ 
  1187. X  void
  1188. X  initoptions()
  1189. X  {
  1190. X***************
  1191. X*** 28,40 ****
  1192. X      nmcpy(pl_fruit, objects[SLIME_MOLD].oc_name, PL_FSIZ);
  1193. X  #endif
  1194. X      flags.num_pad = FALSE;
  1195. X  #ifdef TEXTCOLOR
  1196. X      flags.use_color = TRUE;
  1197. X  #endif
  1198. X! #ifdef MSDOS
  1199. X! #ifdef DECRAINBOW
  1200. X!     flags.DECRainbow = FALSE;
  1201. X  #endif
  1202. X  #ifdef DGK
  1203. X      flags.IBMBIOS =
  1204. X  #ifdef TOS
  1205. X--- 35,50 ----
  1206. X      nmcpy(pl_fruit, objects[SLIME_MOLD].oc_name, PL_FSIZ);
  1207. X  #endif
  1208. X      flags.num_pad = FALSE;
  1209. X+     flags.help = TRUE;
  1210. X+     flags.IBMgraphics = FALSE;
  1211. X+     flags.DECgraphics = FALSE;
  1212. X  #ifdef TEXTCOLOR
  1213. X      flags.use_color = TRUE;
  1214. X  #endif
  1215. X! #ifdef AMIFLUSH
  1216. X!     flags.amiflush = FALSE;    /* default to original behaviour */
  1217. X  #endif
  1218. X+ #ifdef MSDOS
  1219. X  #ifdef DGK
  1220. X      flags.IBMBIOS =
  1221. X  #ifdef TOS
  1222. X***************
  1223. X*** 45,55 ****
  1224. X      read_config_file();
  1225. X  #endif /* MSDOS */
  1226. X  #ifdef MACOS
  1227. X-     flags.standout = TRUE;
  1228. X-     flags.end_around = 2;    /* Mac display routines don't scroll */
  1229. X-     flags.end_top = 4;
  1230. X      read_config_file();
  1231. X!     
  1232. X  #endif
  1233. X      if(opts = getenv("NETHACKOPTIONS"))
  1234. X          parseoptions(opts,TRUE);
  1235. X--- 55,62 ----
  1236. X      read_config_file();
  1237. X  #endif /* MSDOS */
  1238. X  #ifdef MACOS
  1239. X      read_config_file();
  1240. X!     flags.standout = TRUE;    
  1241. X  #endif
  1242. X      if(opts = getenv("NETHACKOPTIONS"))
  1243. X          parseoptions(opts,TRUE);
  1244. X***************
  1245. X*** 153,158 ****
  1246. X--- 160,227 ----
  1247. X          showsyms[i] = defsyms[i];
  1248. X  }
  1249. X  
  1250. X+ /*
  1251. X+  * Use the nice IBM Extended ASCII line-drawing characters (codepage 437).
  1252. X+  *
  1253. X+  * OS/2 defaults to a multilingual character set (codepage 850, corresponding
  1254. X+  * to the ISO 8859 character set.  We should probably do a VioSetCp() call to
  1255. X+  * set the codepage to 437.
  1256. X+  */
  1257. X+ void
  1258. X+ assign_ibm_graphics()
  1259. X+ {
  1260. X+ #ifdef ASCIIGRAPH
  1261. X+     flags.IBMgraphics = TRUE;    /* not set from command line */
  1262. X+ 
  1263. X+     showsyms[S_vwall] = 0xb3;    /* meta-3, vertical rule */
  1264. X+     showsyms[S_hwall] = 0xc4;    /* meta-D, horizontal rule */
  1265. X+     showsyms[S_tlcorn] = 0xda;    /* meta-Z, top left corner */
  1266. X+     showsyms[S_trcorn] = 0xbf;    /* meta-?, top right corner */
  1267. X+     showsyms[S_blcorn] = 0xc0;    /* meta-@, bottom left */
  1268. X+     showsyms[S_brcorn] = 0xd9;    /* meta-Y, bottom right */
  1269. X+     showsyms[S_crwall] = 0xc5;    /* meta-E, cross */
  1270. X+     showsyms[S_tuwall] = 0xc1;    /* meta-A, T up */
  1271. X+     showsyms[S_tdwall] = 0xc2;    /* meta-B, T down */
  1272. X+     showsyms[S_tlwall] = 0xb4;    /* meta-4, T left */
  1273. X+     showsyms[S_trwall] = 0xc3;    /* meta-C, T right */
  1274. X+     showsyms[S_vbeam] = 0xb3;    /* meta-3, vertical rule */
  1275. X+     showsyms[S_hbeam] = 0xc4;    /* meta-D, horizontal rule */
  1276. X+     showsyms[S_ndoor] = 0xfa;
  1277. X+     showsyms[S_vodoor] = 0xfe;    /* meta-~, small centered square */
  1278. X+     showsyms[S_hodoor] = 0xfe;    /* meta-~, small centered square */
  1279. X+     showsyms[S_room] = 0xfa;    /* meta-z, centered dot */
  1280. X+     showsyms[S_pool] = 0xf7;    /* meta-w, approx. equals */
  1281. X+ #endif  /* ASCIIGRAPH */
  1282. X+ }
  1283. X+ 
  1284. X+ /* Use VT100 graphics for terminals that have them */
  1285. X+ void
  1286. X+ assign_dec_graphics()
  1287. X+ {
  1288. X+ #ifdef TERMLIB
  1289. X+     flags.DECgraphics = TRUE;    /* not set from command line */
  1290. X+ 
  1291. X+     showsyms[S_vwall] = 0xf8;    /* vertical rule */
  1292. X+     showsyms[S_hwall] = 0xf1;    /* horizontal rule */
  1293. X+     showsyms[S_tlcorn] = 0xec;    /* top left corner */
  1294. X+     showsyms[S_trcorn] = 0xeb;    /* top right corner */
  1295. X+     showsyms[S_blcorn] = 0xed;    /* bottom left */
  1296. X+     showsyms[S_brcorn] = 0xea;    /* bottom right */
  1297. X+     showsyms[S_crwall] = 0xee;    /* cross */
  1298. X+     showsyms[S_tuwall] = 0xf6;    /* T up */
  1299. X+     showsyms[S_tdwall] = 0xf7;    /* T down */
  1300. X+     showsyms[S_tlwall] = 0xf5;    /* T left */
  1301. X+     showsyms[S_trwall] = 0xf4;    /* T right */
  1302. X+     showsyms[S_vbeam] = 0xf8;    /* vertical rule */
  1303. X+     showsyms[S_hbeam] = 0xf1;    /* horizontal rule */
  1304. X+     showsyms[S_ndoor] = 0xfe;
  1305. X+     showsyms[S_vodoor] = 0xe1;    /* small centered square */
  1306. X+     showsyms[S_hodoor] = 0xe1;    /* small centered square */
  1307. X+     showsyms[S_room] = 0xfe;    /* centered dot */
  1308. X+     showsyms[S_pool] = 0xe0;    /* diamond */
  1309. X+ #endif  /* TERMLIB */
  1310. X+ }
  1311. X+ 
  1312. X  void
  1313. X  parseoptions(opts, from_env)
  1314. X  register char *opts;
  1315. X***************
  1316. X*** 233,238 ****
  1317. X--- 302,340 ----
  1318. X          return;
  1319. X      }
  1320. X  
  1321. X+     if (!strncmp(opts, "hel", 3)) {
  1322. X+         flags.help = !negated;
  1323. X+         return;
  1324. X+     }
  1325. X+ 
  1326. X+     if (!strncmp(opts, "IBMg", 4)) {
  1327. X+         if(from_env) {
  1328. X+             flags.IBMgraphics = !negated;
  1329. X+             if(flags.IBMgraphics) assign_ibm_graphics();
  1330. X+         } else {
  1331. X+ #ifdef MSDOS
  1332. X+           pline("\"IBMgraphics\" settable only from %s.", configfile);
  1333. X+ #else
  1334. X+           pline("IBMgraphics can be set only from NETHACKOPTIONS.");
  1335. X+ #endif
  1336. X+         }
  1337. X+         return;
  1338. X+     }
  1339. X+ 
  1340. X+     if (!strncmp(opts, "DEC", 3)) {
  1341. X+         if(from_env) {
  1342. X+             flags.DECgraphics = !negated;
  1343. X+             if(flags.DECgraphics) assign_dec_graphics();
  1344. X+         } else {
  1345. X+ #ifdef MSDOS
  1346. X+           pline("\"DECgraphics\" settable only from %s.", configfile);
  1347. X+ #else
  1348. X+           pline("DECgraphics can be set only from NETHACKOPTIONS.");
  1349. X+ #endif
  1350. X+         }
  1351. X+         return;
  1352. X+     }
  1353. X+ 
  1354. X  #ifdef TEXTCOLOR
  1355. X      if (!strncmp(opts, "col", 3)) {
  1356. X          flags.use_color = !negated;
  1357. X***************
  1358. X*** 239,247 ****
  1359. X          return;
  1360. X      }
  1361. X  #endif
  1362. X! 
  1363. X  #ifdef DGK
  1364. X!     if (!strncmp(opts, "IBM", 3)) {
  1365. X          flags.IBMBIOS = !negated;
  1366. X          return;
  1367. X      }
  1368. X--- 341,354 ----
  1369. X          return;
  1370. X      }
  1371. X  #endif
  1372. X! #ifdef AMIFLUSH
  1373. X!     if (!strncmp(opts, "flus", 4)) {
  1374. X!         flags.amiflush = !negated;
  1375. X!         return;
  1376. X!     }
  1377. X! #endif
  1378. X  #ifdef DGK
  1379. X!     if (!strncmp(opts, "IBM_", 4)) {
  1380. X          flags.IBMBIOS = !negated;
  1381. X          return;
  1382. X      }
  1383. X***************
  1384. X*** 253,265 ****
  1385. X              pline("\"rawio\" settable only from %s.", configfile);
  1386. X          return;
  1387. X      }
  1388. X- 
  1389. X- #ifdef DECRAINBOW
  1390. X-     if (!strncmp(opts, "DEC", 3)) {
  1391. X-         flags.DECRainbow = !negated;
  1392. X-         return;
  1393. X-     }
  1394. X- #endif /* DECRAINBOW */
  1395. X  #endif
  1396. X  
  1397. X      if (!strncmp(opts, "sort", 4)) {
  1398. X--- 360,365 ----
  1399. X***************
  1400. X*** 335,340 ****
  1401. X--- 435,446 ----
  1402. X      if (!strncmp(opts, "name", 4)) {
  1403. X          if(!from_env) {
  1404. X  #ifdef MSDOS
  1405. X+ # ifdef AMIGA_WBENCH
  1406. X+          if(FromWBench){
  1407. X+           pline("\"name\" settable only from %s or in icon.",
  1408. X+             configfile);
  1409. X+          } else
  1410. X+ # endif
  1411. X            pline("\"name\" settable only from %s.", configfile);
  1412. X  #else
  1413. X            pline("The playername can be set only from NETHACKOPTIONS.");
  1414. X***************
  1415. X*** 413,418 ****
  1416. X--- 519,530 ----
  1417. X      if (!strncmp(opts, "dog", 3)) {
  1418. X          if(!from_env) {
  1419. X  #ifdef MSDOS
  1420. X+ # ifdef AMIGA_WBENCH
  1421. X+         if(FromWBench){
  1422. X+          pline("\"dogname\" settable only from %s or in icon.",
  1423. X+             configfile);
  1424. X+         } else
  1425. X+ # endif
  1426. X            pline("\"dogname\" settable only from %s.", configfile);
  1427. X  #else
  1428. X            Your("dog's name can be set only from NETHACKOPTIONS.");
  1429. X***************
  1430. X*** 427,432 ****
  1431. X--- 539,550 ----
  1432. X      if (!strncmp(opts, "cat", 3)) {
  1433. X          if(!from_env) {
  1434. X  #ifdef MSDOS
  1435. X+ # ifdef AMIGA_WBENCH
  1436. X+         if(FromWBench){
  1437. X+          pline("\"catname\" settable only from %s or in icon.",
  1438. X+             configfile);
  1439. X+         } else
  1440. X+ # endif
  1441. X            pline("\"catname\" settable only from %s.", configfile);
  1442. X  #else
  1443. X            Your("cat's name can be set only from NETHACKOPTIONS.");
  1444. X***************
  1445. X*** 505,510 ****
  1446. X--- 623,629 ----
  1447. X  #define EXPLORE_BOX 4
  1448. X  #define FEM_BOX 5
  1449. X  #define NEWS_BOX 6
  1450. X+ #define MIN_OK_CHECKBOX 7
  1451. X  #define FIXINV_BOX 7
  1452. X  #define TOMB_BOX 8
  1453. X  #define TIME_BOX 9
  1454. X***************
  1455. X*** 528,533 ****
  1456. X--- 647,654 ----
  1457. X  #define END_AROUND 27
  1458. X  #define FRUIT_TEXT 35
  1459. X  #define PACK_TEXT 34
  1460. X+ #define ENABLE_INFO_BOX 38
  1461. X+ #define ALT_CURS_BOX 41
  1462. X  #define ITEMTEXT(item,text) {GetDItem(optionDlg,item,&type,&ItemHndl,&box); \
  1463. X                               (void)CtoPstr(text); \
  1464. X                               SetIText(ItemHndl,text);\
  1465. X***************
  1466. X*** 546,552 ****
  1467. X                      tmp_name[tmp_name[0]+1] = 0;\
  1468. X                      if (tmp_name[0] > maxsize)\
  1469. X                          tmp_name[0] = maxsize;}
  1470. X!     static boolean *flag_ptrs[20] = {0, 0, 0, 0, &flags.explore,
  1471. X              &flags.female, &flags.nonews,&flags.invlet_constant,
  1472. X              &flags.notombstone, &flags.time, &flags.verbose,
  1473. X              &flags.silent, 0, &flags.standout, &flags.sortpack,
  1474. X--- 667,673 ----
  1475. X                      tmp_name[tmp_name[0]+1] = 0;\
  1476. X                      if (tmp_name[0] > maxsize)\
  1477. X                          tmp_name[0] = maxsize;}
  1478. X!     static boolean NEARDATA *flag_ptrs[20] = {0, 0, 0, 0, &flags.explore,
  1479. X              &flags.female, &flags.nonews,&flags.invlet_constant,
  1480. X              &flags.notombstone, &flags.time, &flags.verbose,
  1481. X              &flags.silent, 0, &flags.standout, &flags.sortpack,
  1482. X***************
  1483. X*** 558,563 ****
  1484. X--- 679,685 ----
  1485. X              &flags.pickup, &flags.confirm,
  1486. X              &flags.safe_dog, &flags.no_rest_on_space};
  1487. X      extern short macflags;
  1488. X+     extern short altCurs;
  1489. X      short dlgItem, type;
  1490. X      Rect box;
  1491. X      extern WindowPtr    HackWindow;
  1492. X***************
  1493. X*** 565,611 ****
  1494. X      unsigned num;
  1495. X      char *op;
  1496. X      char tmp_name[256];
  1497. X-     char savename[PL_NSIZ];
  1498. X-     char savedog[63];
  1499. X-     char savecat[63];
  1500. X-     char savefruit[PL_FSIZ];
  1501. X-     char saveorder[20];
  1502. X      DialogRecord    dlgR;
  1503. X      DialogPtr optionDlg;
  1504. X      DialogTHndl    th, centreDlgBox();
  1505. X      boolean done = FALSE;
  1506. X      short savemacflags = macflags;
  1507. X-     struct flag saveflags;
  1508. X      register char    *sp, *tmp;
  1509. X  
  1510. X      SetCursor(&ARROW_CURSOR);
  1511. X- 
  1512. X-     BlockMove(&flags, &saveflags, sizeof(struct flag));
  1513. X      
  1514. X      th = centreDlgBox(130, FALSE);
  1515. X  
  1516. X      optionDlg = GetNewDialog(130, (Ptr)&dlgR, (WindowPtr)-1);
  1517. X  /* set initial values of text items */
  1518. X-     nmcpy(savename,plname,sizeof(plname)-1);
  1519. X      ITEMTEXT(PLAYER_NAME,plname);
  1520. X!     if(*dogname){
  1521. X!         nmcpy(savedog,dogname,62);
  1522. X!         ITEMTEXT(DOG_NAME,dogname);
  1523. X!     }
  1524. X!     if(*catname){
  1525. X!         nmcpy(savecat,catname,62);
  1526. X!         ITEMTEXT(CAT_NAME,catname);
  1527. X!     }
  1528. X! #ifdef TUTTI_FRUTTI
  1529. X!     if(*pl_fruit){
  1530. X!         nmcpy(savefruit,pl_fruit,PL_FSIZ);
  1531. X!         ITEMTEXT(FRUIT_NAME,pl_fruit);
  1532. X!     }
  1533. X  #else
  1534. X      HIDETEXT(FRUIT_NAME);
  1535. X      HIDETEXT(FRUIT_TEXT);
  1536. X  #endif
  1537. X-     nmcpy(saveorder,inv_order,strlen(inv_order)+1);
  1538. X      ITEMTEXT(PACKORDER,inv_order);
  1539. X  /* set initial values of record items */
  1540. X      Sprintf(tmp_name,"%u",flags.end_top);
  1541. X--- 687,729 ----
  1542. X      unsigned num;
  1543. X      char *op;
  1544. X      char tmp_name[256];
  1545. X      DialogRecord    dlgR;
  1546. X      DialogPtr optionDlg;
  1547. X      DialogTHndl    th, centreDlgBox();
  1548. X      boolean done = FALSE;
  1549. X      short savemacflags = macflags;
  1550. X      register char    *sp, *tmp;
  1551. X+     char a_k_a[PL_NSIZ];
  1552. X+     boolean fairsex, debugger, explorer;
  1553. X  
  1554. X+ /* Option handling:
  1555. X+     Startup: read options from Prefs (making changes!)
  1556. X+     Save exit: write current options to prefs
  1557. X+     Cancel exit: revert to options as defined in Prefs
  1558. X+     Use exit: allow changes. erased at next dialog
  1559. X+ */
  1560. X+     strncpy(a_k_a, plname, strlen(plname));
  1561. X+     a_k_a[(int)strlen(plname)] = '\0';
  1562. X+     fairsex = flags.female;
  1563. X+     debugger = flags.debug;
  1564. X+     explorer = flags.explore;
  1565. X+     read_config_file();
  1566. X+     macflags = savemacflags;
  1567. X      SetCursor(&ARROW_CURSOR);
  1568. X      
  1569. X      th = centreDlgBox(130, FALSE);
  1570. X  
  1571. X      optionDlg = GetNewDialog(130, (Ptr)&dlgR, (WindowPtr)-1);
  1572. X  /* set initial values of text items */
  1573. X      ITEMTEXT(PLAYER_NAME,plname);
  1574. X!     if(*dogname) ITEMTEXT(DOG_NAME,dogname);
  1575. X!     if(*catname) ITEMTEXT(CAT_NAME,catname);
  1576. X! #ifdef TUTTI_FRUTTI
  1577. X!     if(*pl_fruit) ITEMTEXT(FRUIT_NAME,pl_fruit);
  1578. X  #else
  1579. X      HIDETEXT(FRUIT_NAME);
  1580. X      HIDETEXT(FRUIT_TEXT);
  1581. X  #endif
  1582. X      ITEMTEXT(PACKORDER,inv_order);
  1583. X  /* set initial values of record items */
  1584. X      Sprintf(tmp_name,"%u",flags.end_top);
  1585. X***************
  1586. X*** 621,630 ****
  1587. X                  HIDEITEM(NEWS_BOX);
  1588. X                  break;
  1589. X  #endif
  1590. X-             case TOMB_BOX:
  1591. X-             case REST_SPACE_BOX:
  1592. X-                 SetCtlValue(ItemHndl,!(*(flag_ptrs[dlgItem])));
  1593. X-                 break;
  1594. X              case AUTOZOOM_BOX:
  1595. X                  SetCtlValue(ItemHndl,macflags & fZoomOnContextSwitch);
  1596. X                  break;
  1597. X--- 739,744 ----
  1598. X***************
  1599. X*** 637,646 ****
  1600. X                  SetCtlValue(ItemHndl,*(flag_ptrs[dlgItem]));
  1601. X          }
  1602. X      }
  1603. X      SelIText(optionDlg, PLAYER_NAME, 0, 32767);
  1604. X-     
  1605. X      ShowWindow(optionDlg);
  1606. X!     GetDItem(optionDlg, OK, &type, &ItemHndl, &box);
  1607. X      SetPort (optionDlg);
  1608. X      PenSize(3, 3);
  1609. X      InsetRect (&box, -4, -4);
  1610. X--- 751,764 ----
  1611. X                  SetCtlValue(ItemHndl,*(flag_ptrs[dlgItem]));
  1612. X          }
  1613. X      }
  1614. X+     GetDItem(optionDlg, ENABLE_INFO_BOX, &type, &ItemHndl, &box);
  1615. X+     SetCtlValue(ItemHndl, (int)flags.help);
  1616. X+     GetDItem(optionDlg, ALT_CURS_BOX, &type, &ItemHndl, &box);
  1617. X+      SetCtlValue(ItemHndl, (short)altCurs);
  1618. X+ 
  1619. X      SelIText(optionDlg, PLAYER_NAME, 0, 32767);
  1620. X      ShowWindow(optionDlg);
  1621. X!     GetDItem(optionDlg, OK_BUTTON, &type, &ItemHndl, &box);
  1622. X      SetPort (optionDlg);
  1623. X      PenSize(3, 3);
  1624. X      InsetRect (&box, -4, -4);
  1625. X***************
  1626. X*** 649,663 ****
  1627. X      while(!done) {
  1628. X          ModalDialog((ProcPtr)0, &dlgItem);
  1629. X          GetDItem(optionDlg, dlgItem, &type, &ItemHndl, &box);
  1630. X!         if (dlgItem >= MIN_CHECKBOX && dlgItem <= MAX_CHECKBOX) {
  1631. X              SetCtlValue(ItemHndl, ! GetCtlValue (ItemHndl));
  1632. X-             if (dlgItem != AUTOZOOM_BOX)
  1633. X-                 *(flag_ptrs[dlgItem]) = !*(flag_ptrs[dlgItem]);
  1634. X-             else
  1635. X-                 macflags ^= fZoomOnContextSwitch;
  1636. X          }
  1637. X          else switch(dlgItem){
  1638. X              case SAVE_BUTTON:
  1639. X                  GETTEXT(PLAYER_NAME,PL_NSIZ-1);
  1640. X                  strncpy(plname, tmp_name, tmp_name[0]+1);
  1641. X                  (void)PtoCstr (plname);
  1642. X--- 767,794 ----
  1643. X      while(!done) {
  1644. X          ModalDialog((ProcPtr)0, &dlgItem);
  1645. X          GetDItem(optionDlg, dlgItem, &type, &ItemHndl, &box);
  1646. X!         if ((dlgItem >= MIN_CHECKBOX && dlgItem <= MAX_CHECKBOX)
  1647. X!             || dlgItem == ENABLE_INFO_BOX || dlgItem == ALT_CURS_BOX) {
  1648. X              SetCtlValue(ItemHndl, ! GetCtlValue (ItemHndl));
  1649. X          }
  1650. X          else switch(dlgItem){
  1651. X              case SAVE_BUTTON:
  1652. X+                 for(dlgItem = MIN_CHECKBOX; dlgItem <= MAX_CHECKBOX; dlgItem++) {
  1653. X+                     GetDItem(optionDlg, dlgItem, &type, &ItemHndl, &box);
  1654. X+                     if (dlgItem == AUTOZOOM_BOX) {
  1655. X+                         if ((boolean)GetCtlValue(ItemHndl)) {
  1656. X+                             macflags |= fZoomOnContextSwitch;
  1657. X+                         } else {
  1658. X+                             macflags &= ~fZoomOnContextSwitch;
  1659. X+                         }
  1660. X+                     } else {
  1661. X+                         *(flag_ptrs[dlgItem]) = GetCtlValue(ItemHndl);
  1662. X+                     }
  1663. X+                 }
  1664. X+                 GetDItem(optionDlg, ENABLE_INFO_BOX, &type, &ItemHndl, &box);
  1665. X+                 flags.help = GetCtlValue(ItemHndl);
  1666. X+                 GetDItem(optionDlg, ALT_CURS_BOX, &type, &ItemHndl, &box);
  1667. X+                 altCurs = (short)GetCtlValue(ItemHndl);
  1668. X                  GETTEXT(PLAYER_NAME,PL_NSIZ-1);
  1669. X                  strncpy(plname, tmp_name, tmp_name[0]+1);
  1670. X                  (void)PtoCstr (plname);
  1671. X***************
  1672. X*** 717,736 ****
  1673. X                      } else op++;
  1674. X                  }
  1675. X                  flags.end_around = num;
  1676. X                  write_opts();
  1677. X!                 nmcpy(dogname,savedog,62);
  1678. X!                 nmcpy(catname,savecat,62);
  1679. X!                 nmcpy(plname,savename,sizeof(plname)-1);
  1680. X! #ifdef TUTTI_FRUTTI
  1681. X!                 nmcpy(pl_fruit,savefruit,PL_FSIZ-1);
  1682. X! #endif
  1683. X!                 nmcpy(inv_order,saveorder,strlen(inv_order)+1);
  1684. X              case CANCEL_BUTTON:
  1685. X-                 flags = saveflags;
  1686. X-                 macflags = savemacflags;
  1687. X                  done = TRUE;
  1688. X                  break;
  1689. X              case OK_BUTTON:
  1690. X                  GETTEXT(END_TOP,5);
  1691. X                  op = tmp_name+1;
  1692. X                  while(*op) {
  1693. X--- 848,877 ----
  1694. X                      } else op++;
  1695. X                  }
  1696. X                  flags.end_around = num;
  1697. X+                 
  1698. X                  write_opts();
  1699. X!                 done = TRUE;
  1700. X!                 break;
  1701. X              case CANCEL_BUTTON:
  1702. X                  done = TRUE;
  1703. X                  break;
  1704. X              case OK_BUTTON:
  1705. X+                 for (dlgItem = MIN_OK_CHECKBOX; dlgItem <= MAX_CHECKBOX; dlgItem++) {
  1706. X+                     GetDItem(optionDlg, dlgItem, &type, &ItemHndl, &box);
  1707. X+                     if (dlgItem == AUTOZOOM_BOX) {
  1708. X+                         if ((boolean)GetCtlValue(ItemHndl)) {
  1709. X+                             macflags |= fZoomOnContextSwitch;
  1710. X+                         } else {
  1711. X+                             macflags &= ~fZoomOnContextSwitch;
  1712. X+                         }
  1713. X+                     } else {
  1714. X+                         *(flag_ptrs[dlgItem]) = GetCtlValue(ItemHndl);
  1715. X+                     }
  1716. X+                 }
  1717. X+                 GetDItem(optionDlg, ENABLE_INFO_BOX, &type, &ItemHndl, &box);
  1718. X+                 flags.help = GetCtlValue(ItemHndl);
  1719. X+                 GetDItem(optionDlg, ALT_CURS_BOX, &type, &ItemHndl, &box);
  1720. X+                 altCurs = (short)GetCtlValue(ItemHndl);
  1721. X                  GETTEXT(END_TOP,5);
  1722. X                  op = tmp_name+1;
  1723. X                  while(*op) {
  1724. X***************
  1725. X*** 757,765 ****
  1726. X                  (void)fruitadd(tmp_name);
  1727. X                  nmcpy(pl_fruit,tmp_name,PL_FSIZ-1);
  1728. X  #endif
  1729. X-                 nmcpy(dogname,savedog,62);
  1730. X-                 nmcpy(catname,savecat,62);
  1731. X-                 nmcpy(plname,savename,sizeof(plname)-1);
  1732. X                  GETTEXT(PACKORDER,19);
  1733. X                  op = tmp_name+1;
  1734. X                  /* Missing characters in new order are filled in at the end 
  1735. X--- 898,903 ----
  1736. X***************
  1737. X*** 780,792 ****
  1738. X                      }
  1739. X                  Strcpy(inv_order, tmp);
  1740. X                  free((genericptr_t)tmp);
  1741. X-                 flags.female = saveflags.female;
  1742. X-                 flags.explore = saveflags.explore;
  1743. X                  done = TRUE;
  1744. X                  break;
  1745. X              default:;
  1746. X          }
  1747. X      } 
  1748. X      HideWindow(optionDlg);
  1749. X      DisposDialog (optionDlg);
  1750. X      SetPort (HackWindow);
  1751. X--- 918,933 ----
  1752. X                      }
  1753. X                  Strcpy(inv_order, tmp);
  1754. X                  free((genericptr_t)tmp);
  1755. X                  done = TRUE;
  1756. X                  break;
  1757. X              default:;
  1758. X          }
  1759. X      } 
  1760. X+     flags.explore = explorer;
  1761. X+     flags.debug = debugger;
  1762. X+     flags.female = fairsex;
  1763. X+     strncpy(plname, a_k_a, strlen(a_k_a));
  1764. X+     plname[(int)strlen(a_k_a)] = '\0';
  1765. X      HideWindow(optionDlg);
  1766. X      DisposDialog (optionDlg);
  1767. X      SetPort (HackWindow);
  1768. X***************
  1769. X*** 803,811 ****
  1770. X          if (flags.rawio) Strcat(buf,"rawio,");
  1771. X          if (flags.IBMBIOS) Strcat(buf,"IBM_BIOS,");
  1772. X  #endif /* DGK */
  1773. X- #ifdef DECRAINBOW
  1774. X-         if (flags.DECRainbow) Strcat(buf,"DEC_Rainbow,");
  1775. X- #endif /* DECRAINBOW */
  1776. X  #else /* MSDOS */
  1777. X          Strcpy(buf,"NETHACKOPTIONS=");
  1778. X          if(flags.standout) Strcat(buf,"standout,");
  1779. X--- 944,949 ----
  1780. X***************
  1781. X*** 829,834 ****
  1782. X--- 967,978 ----
  1783. X  #ifdef TEXTCOLOR
  1784. X          if (flags.use_color) Strcat(buf, "color,");
  1785. X  #endif
  1786. X+ #ifdef AMIFLUSH
  1787. X+         if (flags.amiflush) Strcat(buf, "flush,");
  1788. X+ #endif
  1789. X+         if (!flags.help) Strcat(buf, "nohelp,");
  1790. X+         if (flags.IBMgraphics) Strcat(buf,"IBMgraphics,");
  1791. X+         if (flags.DECgraphics) Strcat(buf,"DECgraphics,");
  1792. X          if (flags.confirm) Strcat(buf,"confirm,");
  1793. X          if (flags.safe_dog) Strcat(buf,"safe_pet,");
  1794. X          if (flags.pickup) Strcat(buf,"pickup,");
  1795. X***************
  1796. X*** 875,880 ****
  1797. X--- 1019,1029 ----
  1798. X      if(page_line("") || page_line(buf) || page_line(""))     goto quit;
  1799. X  
  1800. X  #ifdef MSDOS
  1801. X+ # ifdef AMIGA_WBENCH
  1802. X+     if(FromWBench){
  1803. X+      Sprintf(buf,"Set options as OPTIONS= in %s or in icon;",configfile);
  1804. X+     } else
  1805. X+ # endif
  1806. X      Sprintf(buf, "To set options use OPTIONS=<options> in %s;", configfile);
  1807. X      Page_line(buf);
  1808. X  #else
  1809. X***************
  1810. X*** 886,897 ****
  1811. X      Page_line("");
  1812. X  
  1813. X      Page_line("Boolean options (which can be negated by prefixing them with '!' or \"no\"):");
  1814. X  #ifdef MSDOS
  1815. X- # ifdef DECRAINBOW
  1816. X-     Next_opt("DEC_Rainbow, ");
  1817. X- # endif
  1818. X      Next_opt("IBM_BIOS, ");
  1819. X  #endif
  1820. X  #ifdef TEXTCOLOR
  1821. X      Next_opt("color, ");
  1822. X  #endif
  1823. X--- 1035,1048 ----
  1824. X      Page_line("");
  1825. X  
  1826. X      Page_line("Boolean options (which can be negated by prefixing them with '!' or \"no\"):");
  1827. X+     Next_opt("DECgraphics, ");
  1828. X  #ifdef MSDOS
  1829. X      Next_opt("IBM_BIOS, ");
  1830. X  #endif
  1831. X+     Next_opt("IBMgraphics, ");
  1832. X+ #ifdef AMIFLUSH
  1833. X+     Next_opt("flush, ");
  1834. X+ #endif
  1835. X  #ifdef TEXTCOLOR
  1836. X      Next_opt("color, ");
  1837. X  #endif
  1838. X***************
  1839. X*** 900,905 ****
  1840. X--- 1051,1057 ----
  1841. X  #ifdef UNIX
  1842. X      Next_opt("ignintr, ");
  1843. X  #endif
  1844. X+     Next_opt("help, ");
  1845. X  #ifdef NEWS
  1846. X      Next_opt("news, ");
  1847. X  #endif
  1848. X***************
  1849. X*** 923,928 ****
  1850. X--- 1075,1081 ----
  1851. X      Page_line("Compound options:");
  1852. X      Page_line("`name'      - your character's name (e.g., name:Merlin-W),");
  1853. X      Page_line("`dogname'   - the name of your (first) dog (e.g., dogname:Fang),");
  1854. X+     Page_line("`catname'   - the name of your (first) cat (e.g., catname:Tabby),");
  1855. X  
  1856. X      Page_line("`packorder' - the inventory order of the items in your pack");
  1857. X      Sprintf(buf, "              (currently, packorder:%s ),", inv_order);
  1858. X
  1859. END_OF_FILE
  1860. if test 45498 -ne `wc -c <'patch8.05'`; then
  1861.     echo shar: \"'patch8.05'\" unpacked with wrong size!
  1862. fi
  1863. # end of 'patch8.05'
  1864. fi
  1865. echo shar: End of archive 1 \(of 24\).
  1866. cp /dev/null ark1isdone
  1867. MISSING=""
  1868. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 ; do
  1869.     if test ! -f ark${I}isdone ; then
  1870.     MISSING="${MISSING} ${I}"
  1871.     fi
  1872. done
  1873. if test "${MISSING}" = "" ; then
  1874.     echo You have unpacked all 24 archives.
  1875.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1876. else
  1877.     echo You still need to unpack the following archives:
  1878.     echo "        " ${MISSING}
  1879. fi
  1880. ##  End of shell archive.
  1881. exit 0
  1882.