home *** CD-ROM | disk | FTP | other *** search
/ Giga Games 1 / Giga Games.iso / net / usenet / volume7 / nethack3 / patch1e < prev    next >
Encoding:
Internet Message Format  |  1989-08-08  |  58.3 KB

  1. Path: uunet!zephyr.ens.tek.com!tekgen!tekred!saab!billr
  2. From: billr@saab.CNA.TEK.COM (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v07i098:  NetHack3 -  display oriented dungeons & dragons (Ver. 3.0), Patch1e
  5. Message-ID: <4392@tekred.CNA.TEK.COM>
  6. Date: 3 Aug 89 16:59:44 GMT
  7. Sender: nobody@tekred.CNA.TEK.COM
  8. Lines: 2202
  9. Approved: billr@saab.CNA.TEK.COM
  10.  
  11. Submitted-by: Izchak Miller <izchak@linc.cis.upenn.edu>
  12. Posting-number: Volume 7, Issue 98
  13. Archive-name: NetHack3/Patch1e
  14. Patch-To: NetHack3: Volume 7, Issue 56-93
  15.  
  16.  
  17.  
  18. #! /bin/sh
  19. # This is a shell archive.  Remove anything before this line, then unpack
  20. # it by saving it into a file and typing "sh file".  To overwrite existing
  21. # files, type "sh file -c".  You can also feed this as standard input via
  22. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  23. # will see the following message at the end:
  24. #        "End of archive 5 (of 6)."
  25. # Contents:  src3.diff
  26. # Wrapped by billr@saab on Thu Aug  3 09:57:35 1989
  27. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  28. if test -f 'src3.diff' -a "${1}" != "-c" ; then 
  29.   echo shar: Will not clobber existing file \"'src3.diff'\"
  30. else
  31. echo shar: Extracting \"'src3.diff'\" \(55712 characters\)
  32. sed "s/^X//" >'src3.diff' <<'END_OF_FILE'
  33. XSource patches, part 3
  34. X
  35. X-----------------------------------Cut---------------------------------
  36. X*** src/Old/objnam.c    Mon Jul 31 14:24:55 1989
  37. X--- src/objnam.c    Sun Jul 30 11:30:32 1989
  38. X***************
  39. X*** 3,8 ****
  40. X--- 3,9 ----
  41. X  /* NetHack may be freely redistributed.  See license for details. */
  42. X  
  43. X  #include    "hack.h"
  44. X+ #include <ctype.h>    /* for isalpha() */
  45. X  
  46. X  #define    PREFIX    30
  47. X  
  48. X***************
  49. X*** 157,163 ****
  50. X  
  51. X      long save_Blinded = Blinded;
  52. X      Blinded = 1;
  53. X!     str = func(obj);
  54. X      Blinded = save_Blinded;
  55. X      return str;
  56. X  }
  57. X--- 158,164 ----
  58. X  
  59. X      long save_Blinded = Blinded;
  60. X      Blinded = 1;
  61. X!     str = (*func)(obj);
  62. X      Blinded = save_Blinded;
  63. X      return str;
  64. X  }
  65. X***************
  66. X*** 237,242 ****
  67. X--- 238,244 ----
  68. X          } else    Strcat(buf, dn);
  69. X          break;
  70. X          case FOOD_SYM:
  71. X+ #ifdef TUTTI_FRUTTI
  72. X          if (obj->otyp == SLIME_MOLD) {
  73. X              register struct fruit *f;
  74. X  
  75. X***************
  76. X*** 249,254 ****
  77. X--- 251,257 ----
  78. X              if (!f) impossible("Bad fruit #%d?", obj->spe);
  79. X              break;
  80. X          }
  81. X+ #endif
  82. X          Strcpy(buf, an);
  83. X          if(obj->otyp == TIN && obj->known) {
  84. X              if(obj->spe > 0)
  85. X***************
  86. X*** 519,525 ****
  87. X              break;
  88. X      }
  89. X  
  90. X!     if(obj->owornmask & W_WEP) {
  91. X          Strcat(bp, " (weapon in ");
  92. X          Strcat(bp, body_part(HAND));
  93. X          Strcat(bp, ")");
  94. X--- 522,528 ----
  95. X              break;
  96. X      }
  97. X  
  98. X!     if((obj->owornmask & W_WEP) && !mrg_to_wielded) {
  99. X          Strcat(bp, " (weapon in ");
  100. X          Strcat(bp, body_part(HAND));
  101. X          Strcat(bp, ")");
  102. X***************
  103. X*** 631,649 ****
  104. X  
  105. X      /* Search for common compounds, i.e. lump of royal jelly */
  106. X      for(excess=0, spot=str; *spot; spot++) {
  107. X!         if (!strncmp(spot, " of ", 4) || !strncmp(spot, " with ", 6)
  108. X!                 || !strncmp(spot, " a la ", 6)
  109. X!                 || !strncmp(spot, " from ", 6)
  110. X!                 || !strncmp(spot, " in ", 4)
  111. X                  || !strncmp(spot, " labeled ", 9)
  112. X                  || !strncmp(spot, " called ", 8)
  113. X                  || !strncmp(spot, " named ", 7)
  114. X-                 || !strncmp(spot, " on ", 4)
  115. X                  || !strcmp(spot, " above") /* lurkers above */
  116. X                  || !strncmp(spot, " versus ", 8)
  117. X                  || !strncmp(spot, " de ", 4)
  118. X                  || !strncmp(spot, " d'", 3)
  119. X!                 || !strncmp(spot, " du ", 4)) {
  120. X              excess = oldstr + (spot - str);
  121. X              *spot = 0;
  122. X              break;
  123. X--- 634,656 ----
  124. X  
  125. X      /* Search for common compounds, i.e. lump of royal jelly */
  126. X      for(excess=0, spot=str; *spot; spot++) {
  127. X!         if (!strncmp(spot, " of ", 4)
  128. X                  || !strncmp(spot, " labeled ", 9)
  129. X                  || !strncmp(spot, " called ", 8)
  130. X                  || !strncmp(spot, " named ", 7)
  131. X                  || !strcmp(spot, " above") /* lurkers above */
  132. X                  || !strncmp(spot, " versus ", 8)
  133. X+ #ifdef TUTTI_FRUTTI
  134. X+                 || !strncmp(spot, " from ", 6)
  135. X+                 || !strncmp(spot, " in ", 4)
  136. X+                 || !strncmp(spot, " on ", 4)
  137. X+                 || !strncmp(spot, " a la ", 6)
  138. X+                 || !strncmp(spot, " with", 5)
  139. X                  || !strncmp(spot, " de ", 4)
  140. X                  || !strncmp(spot, " d'", 3)
  141. X!                 || !strncmp(spot, " du ", 4)
  142. X! #endif
  143. X!                 ) {
  144. X              excess = oldstr + (spot - str);
  145. X              *spot = 0;
  146. X              break;
  147. X***************
  148. X*** 654,665 ****
  149. X      *(spot+1) = 0;
  150. X      /* Now spot is the last character of the string */
  151. X  
  152. X-     /* Single letters */
  153. X      len = strlen(str);
  154. X!     if (len==1) {
  155. X          Strcpy(spot+1, "'s");
  156. X          goto bottom;
  157. X      }
  158. X  
  159. X      /* man/men ("Wiped out all cavemen.") */
  160. X      if (len >= 3 && !strcmp(spot-2, "man") &&
  161. X--- 661,674 ----
  162. X      *(spot+1) = 0;
  163. X      /* Now spot is the last character of the string */
  164. X  
  165. X      len = strlen(str);
  166. X! #ifdef TUTTI_FRUTTI
  167. X!     /* Single letters */
  168. X!     if (len==1 || !isalpha(*spot)) {
  169. X          Strcpy(spot+1, "'s");
  170. X          goto bottom;
  171. X      }
  172. X+ #endif
  173. X  
  174. X      /* man/men ("Wiped out all cavemen.") */
  175. X      if (len >= 3 && !strcmp(spot-2, "man") &&
  176. X***************
  177. X*** 669,692 ****
  178. X          goto bottom;
  179. X      }
  180. X  
  181. X-     /* mouse/mice,louse/lice (not a monster, but possible in a food name) */
  182. X-     if (len >= 5 && !strcmp(spot-3, "ouse") && index("MmLl", *(spot-4))) {
  183. X-         Strcpy(spot-3, "ice");
  184. X-         goto bottom;
  185. X-     }
  186. X- 
  187. X-     /* matzoh/matzot, possible food name */
  188. X-     if (len >= 6 && !strcmp(spot-5, "matzoh")) {
  189. X-         *(spot) = 't';
  190. X-         goto bottom;
  191. X-     }
  192. X- 
  193. X-     /* child/children (for the wise guys who give their food funny names) */
  194. X-     if (len >= 5 && !strcmp(spot-4, "child")) {
  195. X-         Strcpy(spot, "dren");
  196. X-         goto bottom;
  197. X-     }
  198. X- 
  199. X      /* tooth/teeth */
  200. X      if (len >= 5 && !strcmp(spot-4, "tooth")) {
  201. X          Strcpy(spot-3, "eeth");
  202. X--- 678,683 ----
  203. X***************
  204. X*** 716,724 ****
  205. X--- 707,719 ----
  206. X      }
  207. X  
  208. X      /* algae, larvae, hyphae (another fungus part) */
  209. X+ #ifdef TUTTI_FRUTTI
  210. X      if ((len >= 4 && !strcmp(spot-3, "alga")) ||
  211. X          (len >= 5 &&
  212. X           (!strcmp(spot-4, "hypha") || !strcmp(spot-4, "larva")))) {
  213. X+ #else
  214. X+     if (len >= 5 && (!strcmp(spot-4, "hypha"))) {
  215. X+ #endif
  216. X          Strcpy(spot, "ae");
  217. X          goto bottom;
  218. X      }
  219. X***************
  220. X*** 746,761 ****
  221. X      /* note: also swine, trout, grouse */
  222. X      if ((len >= 7 && !strcmp(spot-6, "samurai")) ||
  223. X          (len >= 5 &&
  224. X           (!strcmp(spot-4, "manes") || !strcmp(spot-4, "sheep"))) ||
  225. X          (len >= 4 &&
  226. X           (!strcmp(spot-3, "fish") || !strcmp(spot-3, "tuna") ||
  227. X            !strcmp(spot-3, "deer"))))
  228. X          goto bottom;
  229. X  
  230. X!     /* Aren't the following two going a bit far?  --KAA */
  231. X!     /* eau/eaux (gateau) */
  232. X!     if (len >= 3 && !strcmp(spot-2, "eau")) {
  233. X!         Strcpy(spot, "ux");
  234. X          goto bottom;
  235. X      }
  236. X  
  237. X--- 741,772 ----
  238. X      /* note: also swine, trout, grouse */
  239. X      if ((len >= 7 && !strcmp(spot-6, "samurai")) ||
  240. X          (len >= 5 &&
  241. X+ #ifdef TUTTI_FRUTTI
  242. X           (!strcmp(spot-4, "manes") || !strcmp(spot-4, "sheep"))) ||
  243. X          (len >= 4 &&
  244. X           (!strcmp(spot-3, "fish") || !strcmp(spot-3, "tuna") ||
  245. X            !strcmp(spot-3, "deer"))))
  246. X+ #else
  247. X+          !strcmp(spot-4, "manes")))
  248. X+ #endif
  249. X+         goto bottom;
  250. X+ 
  251. X+ #ifdef TUTTI_FRUTTI
  252. X+     /* mouse/mice,louse/lice (not a monster, but possible in a food name) */
  253. X+     if (len >= 5 && !strcmp(spot-3, "ouse") && index("MmLl", *(spot-4))) {
  254. X+         Strcpy(spot-3, "ice");
  255. X+         goto bottom;
  256. X+     }
  257. X+ 
  258. X+     /* matzoh/matzot, possible food name */
  259. X+     if (len >= 6 && !strcmp(spot-5, "matzoh")) {
  260. X+         *(spot) = 't';
  261. X          goto bottom;
  262. X+     }
  263. X  
  264. X!     /* child/children (for the wise guys who give their food funny names) */
  265. X!     if (len >= 5 && !strcmp(spot-4, "child")) {
  266. X!         Strcpy(spot, "dren");
  267. X          goto bottom;
  268. X      }
  269. X  
  270. X***************
  271. X*** 765,783 ****
  272. X          goto bottom;
  273. X      }
  274. X  
  275. X      /* note: ox/oxen, VAX/VAXen, goose/geese */
  276. X  
  277. X      /* Ends in z, x, s, ch, sh; add an "es" */
  278. X!     if (index("zxsv", *spot) || (*spot=='h' && index("cs", *(spot-1))) ||
  279. X      /* Kludge to get "tomatoes" and "potatoes" right */
  280. X!                 (len >= 4 && !strcmp(spot-2, "ato"))) {
  281. X          Strcpy(spot+1, "es");
  282. X          goto bottom;
  283. X      }
  284. X  
  285. X!     /* Ends in y preceded by consonant or "qu"; change to "ies" */
  286. X      if (*spot == 'y' &&
  287. X!         (!index(vowels, *(spot-1)) || !strncmp("qu", spot-2, 2))) {
  288. X          Strcpy(spot, "ies");
  289. X          goto bottom;
  290. X      }
  291. X--- 776,799 ----
  292. X          goto bottom;
  293. X      }
  294. X  
  295. X+     /* note: -eau/-eaux (gateau, bordeau...) */
  296. X      /* note: ox/oxen, VAX/VAXen, goose/geese */
  297. X+ #endif
  298. X  
  299. X      /* Ends in z, x, s, ch, sh; add an "es" */
  300. X!     if (index("zxsv", *spot) || (*spot=='h' && index("cs", *(spot-1)))
  301. X! #ifdef TUTTI_FRUTTI
  302. X      /* Kludge to get "tomatoes" and "potatoes" right */
  303. X!                 || (len >= 4 && !strcmp(spot-2, "ato"))
  304. X! #endif
  305. X!                                     ) {
  306. X          Strcpy(spot+1, "es");
  307. X          goto bottom;
  308. X      }
  309. X  
  310. X!     /* Ends in y preceded by consonant (note: also "qu"); change to "ies" */
  311. X      if (*spot == 'y' &&
  312. X!         (!index(vowels, *(spot-1)))) {
  313. X          Strcpy(spot, "ies");
  314. X          goto bottom;
  315. X      }
  316. X***************
  317. X*** 808,817 ****
  318. X      register char *p;
  319. X      register int i;
  320. X      register struct obj *otmp;
  321. X-     struct fruit *f;
  322. X      int cnt, spe, spesgn, typ, heavy, blessed, uncursed;
  323. X      int iscursed, ispoisoned, mntmp, contents, iskey=0;
  324. X!     int  isnamedbox=0, ftype = current_fruit;
  325. X      char let;
  326. X      char *un, *dn, *an;
  327. X      char *name=0;
  328. X--- 824,836 ----
  329. X      register char *p;
  330. X      register int i;
  331. X      register struct obj *otmp;
  332. X      int cnt, spe, spesgn, typ, heavy, blessed, uncursed;
  333. X      int iscursed, ispoisoned, mntmp, contents, iskey=0;
  334. X!     int  isnamedbox=0;
  335. X! #ifdef TUTTI_FRUTTI
  336. X!     struct fruit *f;
  337. X!     int ftype = current_fruit;
  338. X! #endif
  339. X      char let;
  340. X      char *un, *dn, *an;
  341. X      char *name=0;
  342. X***************
  343. X*** 946,951 ****
  344. X--- 965,971 ----
  345. X      if(cnt == 1 && !strncmp(bp, "pair of ",8)) {
  346. X          bp += 8;
  347. X          cnt = 2;
  348. X+         goto sing;
  349. X          /* cnt is ignored for armor and other non-stackable objects;
  350. X             DTRT for stackable objects */
  351. X      } else if(cnt > 1 && !strncmp(bp, "pairs of ",9)) {
  352. X***************
  353. X*** 996,1001 ****
  354. X--- 1016,1026 ----
  355. X                      goto sing;
  356. X                  }
  357. X  
  358. X+                 if(!strcmp(p-6, "staves")) {
  359. X+                     Strcpy(p-3, "ff");
  360. X+                     goto sing;
  361. X+                 }
  362. X+ 
  363. X                  /* note: nurses, axes but boxes */
  364. X                  if(!strcmp(p-5, "boxes")) {
  365. X                      p[-2] = 0;
  366. X***************
  367. X*** 1194,1199 ****
  368. X--- 1219,1225 ----
  369. X          }
  370. X          i++;
  371. X      }
  372. X+ #ifdef TUTTI_FRUTTI
  373. X      for(f=ffruit; f; f = f->nextf) {
  374. X          char *f1 = f->fname, *f2 = makeplural(f->fname);
  375. X  
  376. X***************
  377. X*** 1204,1209 ****
  378. X--- 1230,1236 ----
  379. X              goto typfnd;
  380. X          }
  381. X      }
  382. X+ #endif
  383. X      if(!let) return((struct obj *)0);
  384. X  any:
  385. X      if(!let) let = wrpsym[rn2(sizeof(wrpsym))];
  386. X***************
  387. X*** 1273,1280 ****
  388. X--- 1300,1309 ----
  389. X                  otmp->spe = 1;
  390. X              }
  391. X              break;
  392. X+ #ifdef TUTTI_FRUTTI
  393. X          case SLIME_MOLD: otmp->spe = ftype;
  394. X              /* Fall through */
  395. X+ #endif
  396. X          case SKELETON_KEY: case KEY: case CHEST: case LARGE_BOX:
  397. X          case HEAVY_IRON_BALL: case IRON_CHAIN: case STATUE:
  398. X              /* otmp->spe already done in mksobj() */
  399. X*** src/Old/options.c    Mon Jul 31 14:26:18 1989
  400. X--- src/options.c    Fri Jul 28 17:53:32 1989
  401. X***************
  402. X*** 24,30 ****
  403. X--- 24,32 ----
  404. X      flags.confirm = TRUE;
  405. X      flags.safe_dog = TRUE;
  406. X      flags.silent =     flags.pickup = TRUE;
  407. X+ #ifdef TUTTI_FRUTTI
  408. X      nmcpy(pl_fruit, objects[SLIME_MOLD].oc_name, PL_FSIZ);
  409. X+ #endif
  410. X      flags.num_pad = FALSE;
  411. X  #ifdef MSDOS
  412. X  #ifdef DECRAINBOW
  413. X***************
  414. X*** 32,37 ****
  415. X--- 34,42 ----
  416. X  #endif
  417. X  #ifdef DGK
  418. X      flags.IBMBIOS =
  419. X+ #ifdef TOS
  420. X+     TRUE;            /* BIOS might as well always be on for TOS */
  421. X+ #endif
  422. X      flags.rawio = FALSE;
  423. X  #endif
  424. X      read_config_file();
  425. X***************
  426. X*** 38,47 ****
  427. X--- 43,54 ----
  428. X  #endif /* MSDOS */
  429. X      if(opts = getenv("NETHACKOPTIONS"))
  430. X          parseoptions(opts,TRUE);
  431. X+ #ifdef TUTTI_FRUTTI
  432. X      (void)fruitadd(pl_fruit);
  433. X      objects[SLIME_MOLD].oc_name = "\033";
  434. X      /* Put something untypable in there */
  435. X      /* We cannot just use NULL because that marks the end of objects */
  436. X+ #endif
  437. X  }
  438. X  
  439. X  static void
  440. X***************
  441. X*** 154,160 ****
  442. X      }
  443. X      
  444. X  #ifndef MSDOS
  445. X!     if (!strncmp(opts, "standout", 4)) {
  446. X          flags.standout = !negated;
  447. X          return;
  448. X      }
  449. X--- 161,167 ----
  450. X      }
  451. X      
  452. X  #ifndef MSDOS
  453. X!     if (!strncmp(opts, "stan", 4)) {
  454. X          flags.standout = !negated;
  455. X          return;
  456. X      }
  457. X***************
  458. X*** 165,176 ****
  459. X      }
  460. X  #endif
  461. X  
  462. X!     if (!strncmp(opts, "ignintr", 3)) {
  463. X          flags.ignintr = !negated;
  464. X          return;
  465. X      }
  466. X  
  467. X!     if (!strncmp(opts, "tombstone", 4)) {
  468. X          flags.notombstone = negated;
  469. X          return;
  470. X      }
  471. X--- 172,183 ----
  472. X      }
  473. X  #endif
  474. X  
  475. X!     if (!strncmp(opts, "ign", 3)) {
  476. X          flags.ignintr = !negated;
  477. X          return;
  478. X      }
  479. X  
  480. X!     if (!strncmp(opts, "tomb", 4)) {
  481. X          flags.notombstone = negated;
  482. X          return;
  483. X      }
  484. X***************
  485. X*** 182,188 ****
  486. X      }
  487. X  #endif
  488. X  
  489. X!     if (!strncmp(opts, "confirm", 4)) {
  490. X          flags.confirm = !negated;
  491. X          return;
  492. X      }
  493. X--- 189,195 ----
  494. X      }
  495. X  #endif
  496. X  
  497. X!     if (!strncmp(opts, "conf", 4)) {
  498. X          flags.confirm = !negated;
  499. X          return;
  500. X      }
  501. X***************
  502. X*** 191,212 ****
  503. X          return;
  504. X      }
  505. X  
  506. X!     if (!strncmp(opts, "silent", 4)) {
  507. X          flags.silent = !negated;
  508. X          return;
  509. X      }
  510. X  
  511. X!     if (!strncmp(opts, "verbose", 4)) {
  512. X          flags.verbose = !negated;
  513. X          return;
  514. X      }
  515. X  
  516. X!     if (!strncmp(opts, "pickup", 4)) {
  517. X          flags.pickup = !negated;
  518. X          return;
  519. X      }
  520. X  
  521. X!     if (!strncmp(opts, "number_pad", 4)) {
  522. X          flags.num_pad = !negated;
  523. X          return;
  524. X      }
  525. X--- 198,219 ----
  526. X          return;
  527. X      }
  528. X  
  529. X!     if (!strncmp(opts, "sil", 3)) {
  530. X          flags.silent = !negated;
  531. X          return;
  532. X      }
  533. X  
  534. X!     if (!strncmp(opts, "verb", 4)) {
  535. X          flags.verbose = !negated;
  536. X          return;
  537. X      }
  538. X  
  539. X!     if (!strncmp(opts, "pick", 4)) {
  540. X          flags.pickup = !negated;
  541. X          return;
  542. X      }
  543. X  
  544. X!     if (!strncmp(opts, "numb", 4)) {
  545. X          flags.num_pad = !negated;
  546. X          return;
  547. X      }
  548. X***************
  549. X*** 217,223 ****
  550. X          return;
  551. X      }
  552. X  
  553. X!     if (!strncmp(opts, "rawio", 4)) {
  554. X          if (from_env)
  555. X              flags.rawio = !negated;
  556. X          else
  557. X--- 224,230 ----
  558. X          return;
  559. X      }
  560. X  
  561. X!     if (!strncmp(opts, "raw", 3)) {
  562. X          if (from_env)
  563. X              flags.rawio = !negated;
  564. X          else
  565. X***************
  566. X*** 241,247 ****
  567. X      /*
  568. X       * the order to list the pack
  569. X       */
  570. X!     if (!strncmp(opts, "packorder", 4)) {
  571. X          register char    *sp, *tmp;
  572. X          int tmpend;
  573. X  
  574. X--- 248,254 ----
  575. X      /*
  576. X       * the order to list the pack
  577. X       */
  578. X!     if (!strncmp(opts, "pack", 4)) {
  579. X          register char    *sp, *tmp;
  580. X          int tmpend;
  581. X  
  582. X***************
  583. X*** 276,287 ****
  584. X          return;
  585. X      }
  586. X  
  587. X!     if (!strncmp(opts, "rest_on_space", 4)) {
  588. X          flags.no_rest_on_space = negated;
  589. X          return;
  590. X      }
  591. X  
  592. X!     if (!strncmp(opts, "fixinv", 3)) {
  593. X          flags.invlet_constant = !negated;
  594. X          if(!from_env && flags.invlet_constant) reassign ();
  595. X          return;
  596. X--- 283,294 ----
  597. X          return;
  598. X      }
  599. X  
  600. X!     if (!strncmp(opts, "rest", 4)) {
  601. X          flags.no_rest_on_space = negated;
  602. X          return;
  603. X      }
  604. X  
  605. X!     if (!strncmp(opts, "fix", 3)) {
  606. X          flags.invlet_constant = !negated;
  607. X          if(!from_env && flags.invlet_constant) reassign ();
  608. X          return;
  609. X***************
  610. X*** 294,300 ****
  611. X              flags.female = negated;
  612. X          return;
  613. X      }
  614. X!     if (!strncmp(opts, "female", 3)) {
  615. X          if(!from_env && flags.female == negated)
  616. X              pline("That is not anatomically possible.");
  617. X          else
  618. X--- 301,307 ----
  619. X              flags.female = negated;
  620. X          return;
  621. X      }
  622. X!     if (!strncmp(opts, "fem", 3)) {
  623. X          if(!from_env && flags.female == negated)
  624. X              pline("That is not anatomically possible.");
  625. X          else
  626. X***************
  627. X*** 319,325 ****
  628. X      }
  629. X  
  630. X      /* graphics:string */
  631. X!     if (!strncmp(opts, "graphics", 4)) {
  632. X          if(!from_env) {
  633. X  #ifdef MSDOS
  634. X            pline("\"graphics\" settable only from %s.", configfile);
  635. X--- 326,332 ----
  636. X      }
  637. X  
  638. X      /* graphics:string */
  639. X!     if (!strncmp(opts, "gr", 2)) {
  640. X          if(!from_env) {
  641. X  #ifdef MSDOS
  642. X            pline("\"graphics\" settable only from %s.", configfile);
  643. X***************
  644. X*** 382,388 ****
  645. X      }
  646. X  
  647. X      /* endgame:5t[op] 5a[round] o[wn] */
  648. X!     if (!strncmp(opts, "endgame", 3)) {
  649. X          op = index(opts,':');
  650. X          if(!op) goto bad;
  651. X          op++;
  652. X--- 389,395 ----
  653. X      }
  654. X  
  655. X      /* endgame:5t[op] 5a[round] o[wn] */
  656. X!     if (!strncmp(opts, "end", 3)) {
  657. X          op = index(opts,':');
  658. X          if(!op) goto bad;
  659. X          op++;
  660. X***************
  661. X*** 414,420 ****
  662. X          }
  663. X          return;
  664. X      }
  665. X!     if (!strncmp(opts, "dogname", 3)) {
  666. X          if(!from_env) {
  667. X  #ifdef MSDOS
  668. X            pline("\"dogname\" settable only from %s.", configfile);
  669. X--- 421,427 ----
  670. X          }
  671. X          return;
  672. X      }
  673. X!     if (!strncmp(opts, "dog", 3)) {
  674. X          if(!from_env) {
  675. X  #ifdef MSDOS
  676. X            pline("\"dogname\" settable only from %s.", configfile);
  677. X***************
  678. X*** 428,434 ****
  679. X          nmcpy(dogname, ++op, 62);
  680. X          return;
  681. X      }
  682. X!     if (!strncmp(opts, "catname", 3)) {
  683. X          if(!from_env) {
  684. X  #ifdef MSDOS
  685. X            pline("\"catname\" settable only from %s.", configfile);
  686. X--- 435,441 ----
  687. X          nmcpy(dogname, ++op, 62);
  688. X          return;
  689. X      }
  690. X!     if (!strncmp(opts, "cat", 3)) {
  691. X          if(!from_env) {
  692. X  #ifdef MSDOS
  693. X            pline("\"catname\" settable only from %s.", configfile);
  694. X***************
  695. X*** 442,448 ****
  696. X          nmcpy(catname, ++op, 62);
  697. X          return;
  698. X      }
  699. X!     if (!strncmp(opts, "fruit", 2)) {
  700. X          op = index(opts, ':');
  701. X          if (!op++) goto bad;
  702. X          if (!from_env) {
  703. X--- 449,456 ----
  704. X          nmcpy(catname, ++op, 62);
  705. X          return;
  706. X      }
  707. X! #ifdef TUTTI_FRUTTI
  708. X!     if (!strncmp(opts, "fr", 2)) {
  709. X          op = index(opts, ':');
  710. X          if (!op++) goto bad;
  711. X          if (!from_env) {
  712. X***************
  713. X*** 469,474 ****
  714. X--- 477,483 ----
  715. X           */
  716. X          return;
  717. X      }
  718. X+ #endif
  719. X  bad:
  720. X      if(!from_env) {
  721. X          if(!strncmp(opts, "h", 1) ||
  722. X***************
  723. X*** 534,540 ****
  724. X--- 543,551 ----
  725. X          if (flags.silent) Strcat(buf,"silent,");
  726. X          if (flags.time) Strcat(buf,"time,");
  727. X          if (flags.verbose) Strcat(buf,"verbose,");
  728. X+ #ifdef TUTTI_FRUTTI
  729. X          Sprintf(eos(buf), "fruit:%s,", pl_fruit);
  730. X+ #endif
  731. X          if(flags.end_top != 5 || flags.end_around != 4 || flags.end_own){
  732. X          Sprintf(eos(buf), "endgame: %u top scores/%u around me",
  733. X              flags.end_top, flags.end_around);
  734. X***************
  735. X*** 559,570 ****
  736. X      return 0;
  737. X  }
  738. X  
  739. X- char    packorder[] =    {
  740. X-     AMULET_SYM, WEAPON_SYM, ARMOR_SYM, FOOD_SYM, SCROLL_SYM,
  741. X- # ifdef SPELLS
  742. X-     SPBOOK_SYM,
  743. X- # endif
  744. X-     WAND_SYM, RING_SYM, POTION_SYM, TOOL_SYM, GEM_SYM, BALL_SYM, ROCK_SYM };
  745. X  #define Page_line(x)    if(page_line(x)) goto quit
  746. X  
  747. X  void
  748. X--- 570,575 ----
  749. X***************
  750. X*** 611,619 ****
  751. X      Page_line("`dogname'   - the name of your (first) dog (e.g., dogname:Fang),");
  752. X  
  753. X      Page_line("`packorder' - the inventory order of the items in your pack");
  754. X!     Sprintf(buf, "              (currently, packorder:%s ),", packorder);
  755. X      Page_line(buf);
  756. X      Page_line("`fruit'     - the name of a fruit you enjoy eating,");
  757. X  
  758. X      Page_line("`endgame'   - the parts of the score list you wish to see,");
  759. X  
  760. X--- 616,626 ----
  761. X      Page_line("`dogname'   - the name of your (first) dog (e.g., dogname:Fang),");
  762. X  
  763. X      Page_line("`packorder' - the inventory order of the items in your pack");
  764. X!     Sprintf(buf, "              (currently, packorder:%s ),", inv_order);
  765. X      Page_line(buf);
  766. X+ #ifdef TUTTI_FRUTTI
  767. X      Page_line("`fruit'     - the name of a fruit you enjoy eating,");
  768. X+ #endif
  769. X  
  770. X      Page_line("`endgame'   - the parts of the score list you wish to see,");
  771. X  
  772. X***************
  773. X*** 628,633 ****
  774. X--- 635,641 ----
  775. X      return;
  776. X  }
  777. X  
  778. X+ #ifdef TUTTI_FRUTTI
  779. X  /* Returns the fid of the fruit type; if that type already exists, it
  780. X   * returns the fid of that one; if it does not exist, it adds a new fruit
  781. X   * type to the chain and returns the new one.
  782. X***************
  783. X*** 666,672 ****
  784. X              (!strncmp(buf, "tin of ", 7) && name_to_mon(buf+7) > -1) ||
  785. X              !strcmp(buf, "empty tin") ||
  786. X              !strcmp(buf, "tin of spinach") ||
  787. X!             (!strncmp(eos(buf)-6," corpse",6) && name_to_mon(buf) > -1))
  788. X              {
  789. X                  Strcpy(buf, pl_fruit);
  790. X                  Strcpy(pl_fruit, "candied ");
  791. X--- 674,682 ----
  792. X              (!strncmp(buf, "tin of ", 7) && name_to_mon(buf+7) > -1) ||
  793. X              !strcmp(buf, "empty tin") ||
  794. X              !strcmp(buf, "tin of spinach") ||
  795. X!             ((!strncmp(eos(buf)-6," corpse",6) ||
  796. X!                         !strncmp(eos(buf)-3, " egg",3))
  797. X!             && name_to_mon(buf) > -1))
  798. X              {
  799. X                  Strcpy(buf, pl_fruit);
  800. X                  Strcpy(pl_fruit, "candied ");
  801. X***************
  802. X*** 693,695 ****
  803. X--- 703,706 ----
  804. X      if (user_specified) current_fruit = highest_fruit_id;
  805. X      return f->fid;
  806. X  }
  807. X+ #endif
  808. X*** src/Old/pager.c    Mon Jul 31 14:27:19 1989
  809. X--- src/pager.c    Fri Jul 28 17:53:34 1989
  810. X***************
  811. X*** 10,16 ****
  812. X  #define MONATTK_H
  813. X  #include     "hack.h"
  814. X  
  815. X! #ifndef TOS
  816. X  #include <signal.h>
  817. X  #endif
  818. X  #if defined(BSD) || defined(ULTRIX)
  819. X--- 10,16 ----
  820. X  #define MONATTK_H
  821. X  #include     "hack.h"
  822. X  
  823. X! #ifndef NO_SIGNAL
  824. X  #include <signal.h>
  825. X  #endif
  826. X  #if defined(BSD) || defined(ULTRIX)
  827. X*** src/Old/pickup.c    Mon Jul 31 14:28:29 1989
  828. X--- src/pickup.c    Sun Jul 30 11:30:32 1989
  829. X***************
  830. X*** 241,260 ****
  831. X                  obj->quan = savequan;
  832. X                  qq--;
  833. X                  /* we can carry qq of them */
  834. X!                 if(!qq) goto too_heavy;
  835. X!             You("can only carry %s of the %s lying here.",
  836. X!                     (qq == 1) ? "one" : "some",
  837. X!                     doname(obj));
  838. X!                 {
  839. X!                 register struct obj *obj3;
  840. X  
  841. X!                 obj3 = splitobj(obj, qq);
  842. X!                 if(obj3->otyp == SCR_SCARE_MONSTER)
  843. X!                     if(obj3->spe) obj->spe = 0;
  844. X                  }
  845. X-                 goto lift_some;
  846. X              }
  847. X-         too_heavy:
  848. X              pline("There %s %s here, but %s.",
  849. X                  (obj->quan == 1) ? "is" : "are",
  850. X                  doname(obj),
  851. X--- 241,258 ----
  852. X                  obj->quan = savequan;
  853. X                  qq--;
  854. X                  /* we can carry qq of them */
  855. X!                 if(qq) {
  856. X!                     register struct obj *obj3;
  857. X  
  858. X!                 You("can only carry %s of the %s lying here.",
  859. X!                         (qq == 1) ? "one" : "some",
  860. X!                         doname(obj));
  861. X!                     obj3 = splitobj(obj, qq);
  862. X!                     if(obj3->otyp == SCR_SCARE_MONSTER)
  863. X!                         if(obj3->spe) obj->spe = 0;
  864. X!                     goto lift_some;
  865. X                  }
  866. X              }
  867. X              pline("There %s %s here, but %s.",
  868. X                  (obj->quan == 1) ? "is" : "are",
  869. X                  doname(obj),
  870. X***************
  871. X*** 267,274 ****
  872. X      lift_some:
  873. X          if(inv_cnt() >= 52) {
  874. X              Your("knapsack cannot accommodate any more items.");
  875. X!                 if(obj->otyp == SCR_SCARE_MONSTER)
  876. X!                     if(obj->spe) obj->spe = 0;
  877. X              break;
  878. X          }
  879. X          freeobj(obj);
  880. X--- 265,272 ----
  881. X      lift_some:
  882. X          if(inv_cnt() >= 52) {
  883. X              Your("knapsack cannot accommodate any more items.");
  884. X!             if(obj->otyp == SCR_SCARE_MONSTER)
  885. X!                 if(obj->spe) obj->spe = 0;
  886. X              break;
  887. X          }
  888. X          freeobj(obj);
  889. X***************
  890. X*** 277,287 ****
  891. X          if(wt > -5) You("have a little trouble lifting");
  892. X          { int pickquan = obj->quan;
  893. X            int mergquan;
  894. X!         if(!Blind) obj->dknown = 1;
  895. X!         obj = addinv(obj);    /* might merge it with other objects */
  896. X            mergquan = obj->quan;
  897. X            obj->quan = pickquan; /* to fool prinv() */
  898. X!         prinv(obj);
  899. X            obj->quan = mergquan;
  900. X          }
  901. X          }
  902. X--- 275,287 ----
  903. X          if(wt > -5) You("have a little trouble lifting");
  904. X          { int pickquan = obj->quan;
  905. X            int mergquan;
  906. X!           if(!Blind) obj->dknown = 1;
  907. X!           obj = addinv(obj);    /* might merge it with other objects */
  908. X            mergquan = obj->quan;
  909. X            obj->quan = pickquan; /* to fool prinv() */
  910. X!           if(uwep && uwep == obj) mrg_to_wielded = TRUE;
  911. X!           prinv(obj);
  912. X!           if(mrg_to_wielded) mrg_to_wielded = FALSE;
  913. X            obj->quan = mergquan;
  914. X          }
  915. X          }
  916. X*** src/Old/potion.c    Mon Jul 31 14:30:21 1989
  917. X--- src/potion.c    Thu Jul 27 15:51:29 1989
  918. X***************
  919. X*** 349,356 ****
  920. X--- 349,361 ----
  921. X                Hallucination ? "overripe" : "rotten"
  922. X               );
  923. X          else pline (Hallucination ?
  924. X+ #ifdef TUTTI_FRUTTI
  925. X             "This tastes like 10%% real %s juice all-natural beverage." :
  926. X             "This tastes like %s juice.", pl_fruit);
  927. X+ #else
  928. X+            "This tastes like 10%% real fruit juice all-natural beverage." :
  929. X+            "This tastes like fruit juice.");
  930. X+ #endif
  931. X          if (otmp->otyp == POT_FRUIT_JUICE) {
  932. X              lesshungry(10 * (2 + bcsign(otmp)));
  933. X              break;
  934. X***************
  935. X*** 391,403 ****
  936. X      case POT_SICKNESS:
  937. X          pline("Yecch!  This stuff tastes like poison.");
  938. X          if (otmp->blessed) {
  939. X!             pline("(But in fact it was mildly stale %s juice.)",
  940. X!                                 pl_fruit);
  941. X              if (pl_character[0] != 'H')
  942. X                  losehp(1, "mildly contaminated potion");
  943. X          } else {
  944. X              if(Poison_resistance)
  945. X      pline("(But in fact it was biologically contaminated %s juice.)",pl_fruit);
  946. X              if (pl_character[0] == 'H')
  947. X              pline("Fortunately, you have been immunized.");
  948. X              else {
  949. X--- 396,415 ----
  950. X      case POT_SICKNESS:
  951. X          pline("Yecch!  This stuff tastes like poison.");
  952. X          if (otmp->blessed) {
  953. X! #ifdef TUTTI_FRUTTI
  954. X!         pline("(But in fact it was mildly stale %s juice.)", pl_fruit);
  955. X! #else
  956. X!         pline("(But in fact it was mildly stale orange juice.)");
  957. X! #endif
  958. X              if (pl_character[0] != 'H')
  959. X                  losehp(1, "mildly contaminated potion");
  960. X          } else {
  961. X              if(Poison_resistance)
  962. X+ #ifdef TUTTI_FRUTTI
  963. X      pline("(But in fact it was biologically contaminated %s juice.)",pl_fruit);
  964. X+ #else
  965. X+     pline("(But in fact it was biologically contaminated orange juice.)");
  966. X+ #endif
  967. X              if (pl_character[0] == 'H')
  968. X              pline("Fortunately, you have been immunized.");
  969. X              else {
  970. X***************
  971. X*** 1077,1081 ****
  972. X--- 1089,1164 ----
  973. X          more();
  974. X          docrt();
  975. X      }
  976. X+     return(0);
  977. X+ }
  978. X+ 
  979. X+ /* the detections are pulled out so they can    */
  980. X+ /* also be used in the crystal ball routine    */
  981. X+ /* returns 1 if nothing was detected        */
  982. X+ /* returns 0 if something was detected        */
  983. X+ int
  984. X+ trap_detect(sobj)
  985. X+ register struct obj    *sobj;
  986. X+ /* sobj is null if crystal ball, *scroll if gold detection scroll */
  987. X+ {
  988. X+     register struct trap *ttmp;
  989. X+     register struct obj *obj;
  990. X+     register int door;
  991. X+     boolean found = FALSE;
  992. X+     coord cc;
  993. X+ 
  994. X+     for(ttmp = ftrap; ttmp; ttmp = ttmp->ntrap) {
  995. X+         if(ttmp->tx != u.ux || ttmp->ty != u.uy)
  996. X+             goto outtrapmap;
  997. X+         else found = TRUE;
  998. X+     }
  999. X+     for(obj = fobj; obj; obj = obj->nobj) {
  1000. X+         if ((obj->otyp==LARGE_BOX || obj->otyp==CHEST) && obj->otrapped)
  1001. X+             if (obj->ox != u.ux || obj->oy != u.uy)
  1002. X+                 goto outtrapmap;
  1003. X+             else found = TRUE;
  1004. X+     }
  1005. X+     for(door=0; door<=doorindex; door++) {
  1006. X+         cc = doors[door];
  1007. X+         if (levl[cc.x][cc.y].doormask & D_TRAPPED)
  1008. X+             if (cc.x != u.ux || cc.x != u.uy)
  1009. X+                 goto outtrapmap;
  1010. X+             else found = TRUE;
  1011. X+     }
  1012. X+     if(!found) {
  1013. X+         char buf[42];
  1014. X+         Sprintf(buf, "Your %s stop itching.",
  1015. X+             makeplural(body_part(TOE)));
  1016. X+         strange_feeling(sobj,buf);
  1017. X+         return(1);
  1018. X+     }
  1019. X+     /* traps exist, but only under me - no separate display required */
  1020. X+     Your("%s itch.", makeplural(body_part(TOE)));
  1021. X+     return(0);
  1022. X+ outtrapmap:
  1023. X+     cls();
  1024. X+ #define SYMBOL (uchar)(Hallucination ? rndobjsym() : \
  1025. X+         (sobj && sobj->cursed) ? GOLD_SYM : TRAP_SYM)
  1026. X+ #define AT Hallucination || (sobj && sobj->cursed) ? AT_OBJ : AT_MAP
  1027. X+     for(ttmp = ftrap; ttmp; ttmp = ttmp->ntrap)
  1028. X+         at(ttmp->tx, ttmp->ty, SYMBOL, AT);
  1029. X+     for(obj = fobj; obj; obj = obj->nobj) {
  1030. X+         if ((obj->otyp==LARGE_BOX || obj->otyp==CHEST) && obj->otrapped)
  1031. X+             at(obj->ox, obj->oy, SYMBOL, AT);
  1032. X+     }
  1033. X+     for(door=0; door<=doorindex; door++) {
  1034. X+         cc = doors[door];
  1035. X+         if (levl[cc.x][cc.y].doormask & D_TRAPPED)
  1036. X+             at(cc.x, cc.y, SYMBOL, AT);
  1037. X+     }
  1038. X+ #undef SYMBOL
  1039. X+ #undef AT
  1040. X+     prme();
  1041. X+     if (sobj && sobj->cursed)
  1042. X+         You("feel very greedy.");
  1043. X+     else
  1044. X+         You("feel entrapped.");
  1045. X+     more();
  1046. X+     docrt();
  1047. X      return(0);
  1048. X  }
  1049. X*** src/Old/pray.c    Mon Jul 31 14:31:50 1989
  1050. X--- src/pray.c    Mon Jul 31 09:21:03 1989
  1051. X***************
  1052. X*** 43,48 ****
  1053. X--- 43,50 ----
  1054. X  #define TROUBLE_STARVING 4
  1055. X  #define TROUBLE_HIT 5
  1056. X  #define TROUBLE_STUCK_IN_WALL 6
  1057. X+ #define TROUBLE_LEVITATED_FOREVER 7
  1058. X+ #define TROUBLE_BLINDED_FOREVER 8
  1059. X  
  1060. X  #define TROUBLE_PUNISHED (-1)
  1061. X  #define TROUBLE_LYCANTHROPE (-2)
  1062. X***************
  1063. X*** 104,109 ****
  1064. X--- 106,117 ----
  1065. X          && !passes_walls(uasmon)
  1066. X  #endif
  1067. X          ) return(TROUBLE_STUCK_IN_WALL);
  1068. X+     if((uarmf && uarmf->otyp==LEVITATION_BOOTS && uarmf->cursed) ||
  1069. X+         (uleft && uleft->otyp==RIN_LEVITATION && uleft->cursed) ||
  1070. X+         (uright && uright->otyp==RIN_LEVITATION && uleft->cursed))
  1071. X+         return(TROUBLE_LEVITATED_FOREVER);
  1072. X+     if(ublindf && ublindf->cursed) return(TROUBLE_BLINDED_FOREVER);
  1073. X+ 
  1074. X      if(Punished) return(TROUBLE_PUNISHED);
  1075. X  #ifdef POLYSELF
  1076. X      if(u.ulycn >= 0) return(TROUBLE_LYCANTHROPE);
  1077. X***************
  1078. X*** 117,133 ****
  1079. X         (uarmg && uarmg->cursed) ||    /* gloves */
  1080. X         (uarm && uarm->cursed) ||    /* armor */
  1081. X         (uarmc && uarmc->cursed) ||    /* cloak */
  1082. X!        (uarmf && uarmf->cursed) ||    /* boots */
  1083. X  #ifdef SHIRT
  1084. X         (uarmu && uarmu->cursed) ||  /* shirt */
  1085. X  #endif
  1086. X!        (uwep && (uwep->olet == WEAPON_SYM || uwep->otyp==PICK_AXE
  1087. X!         || uwep->otyp==TIN_OPENER || uwep->otyp==HEAVY_IRON_BALL) &&
  1088. X!         (uwep->cursed)) ||
  1089. X!        (uleft && uleft->cursed) ||
  1090. X!        (uright && uright->cursed) ||
  1091. X!        (uamul && uamul->cursed) ||
  1092. X!        (ublindf && ublindf->cursed))
  1093. X  
  1094. X         return(TROUBLE_CURSED_ITEMS);
  1095. X  
  1096. X--- 125,139 ----
  1097. X         (uarmg && uarmg->cursed) ||    /* gloves */
  1098. X         (uarm && uarm->cursed) ||    /* armor */
  1099. X         (uarmc && uarmc->cursed) ||    /* cloak */
  1100. X!        (uarmf && uarmf->cursed && uarmf->otyp != LEVITATION_BOOTS) ||
  1101. X!                     /* boots */
  1102. X  #ifdef SHIRT
  1103. X         (uarmu && uarmu->cursed) ||  /* shirt */
  1104. X  #endif
  1105. X!        (uwep && welded(uwep)) ||
  1106. X!        (uleft && uleft->cursed && uleft->otyp != RIN_LEVITATION) ||
  1107. X!        (uright && uright->cursed && uright->otyp != RIN_LEVITATION) ||
  1108. X!        (uamul && uamul->cursed))
  1109. X  
  1110. X         return(TROUBLE_CURSED_ITEMS);
  1111. X  
  1112. X***************
  1113. X*** 143,153 ****
  1114. X--- 149,165 ----
  1115. X      return(0);
  1116. X  }
  1117. X  
  1118. X+ const char leftglow[] = "left ring softly glows";
  1119. X+ const char rightglow[] = "right ring softly glows";
  1120. X+ 
  1121. X  static void
  1122. X  fix_worst_trouble(trouble)
  1123. X  register int trouble;
  1124. X  {
  1125. X      int i;
  1126. X+     struct obj *otmp = (struct obj *)0;
  1127. X+     char *what = NULL;
  1128. X+ 
  1129. X      u.ublesscnt += rnz(100);
  1130. X      switch (trouble) {
  1131. X          case TROUBLE_STONED:
  1132. X***************
  1133. X*** 182,187 ****
  1134. X--- 194,217 ----
  1135. X              Your("surroundings change.");
  1136. X              tele();
  1137. X              break;
  1138. X+         case TROUBLE_LEVITATED_FOREVER:
  1139. X+             if (uarmf && uarmf->otyp==LEVITATION_BOOTS
  1140. X+                         && uarmf->cursed)
  1141. X+             otmp = uarmf;
  1142. X+             else if (uleft && uleft->otyp==RIN_LEVITATION
  1143. X+                         && uleft->cursed) {
  1144. X+             otmp = uleft;
  1145. X+             what = leftglow;
  1146. X+             } else {
  1147. X+             otmp = uright;
  1148. X+             what = rightglow;
  1149. X+             }
  1150. X+             goto decurse;
  1151. X+             break;
  1152. X+         case TROUBLE_BLINDED_FOREVER:
  1153. X+             otmp = ublindf;
  1154. X+             goto decurse;
  1155. X+             break;
  1156. X          case TROUBLE_PUNISHED:
  1157. X              Your("chain disappears.");
  1158. X              unpunish();
  1159. X***************
  1160. X*** 195,246 ****
  1161. X              break;
  1162. X  #endif
  1163. X          case TROUBLE_CURSED_ITEMS:
  1164. X!             {    struct obj *otmp;
  1165. X!             char * what;
  1166. X!             otmp = (struct obj *)0;
  1167. X!             what = NULL;
  1168. X!             if (uarmh && uarmh->cursed)     /* helmet */
  1169. X                  otmp = uarmh;
  1170. X!             else if (uarms && uarms->cursed) /* shield */
  1171. X                  otmp = uarms;
  1172. X!             else if (uarmg && uarmg->cursed) /* gloves */
  1173. X                  otmp = uarmg;
  1174. X!             else if (uarm && uarm->cursed) /* armor */
  1175. X                  otmp = uarm;
  1176. X!             else if (uarmc && uarmc->cursed) /* cloak */
  1177. X                  otmp = uarmc;
  1178. X!             else if (uarmf && uarmf->cursed) /* boots */
  1179. X                  otmp = uarmf;
  1180. X  #ifdef SHIRT
  1181. X!             else if (uarmu && uarmu->cursed) /* shirt */
  1182. X                  otmp = uarmu;
  1183. X  #endif
  1184. X!             else if (uleft && uleft->cursed) {
  1185. X                  otmp = uleft;
  1186. X!                 what = "left ring softly glows";
  1187. X!             } else if (uright && uright->cursed) {
  1188. X                  otmp = uright;
  1189. X!                 what = "right ring softly glows";
  1190. X!             } else if (uamul && uamul->cursed) /* amulet */
  1191. X                  otmp = uamul;
  1192. X!             else if (ublindf && ublindf->cursed) /* blindfold */
  1193. X                  otmp = ublindf;
  1194. X!             else if (welded(uwep)) otmp = uwep;
  1195. X!             else {
  1196. X                  for(otmp=invent; otmp; otmp=otmp->nobj)
  1197. X                  if ((otmp->otyp==LOADSTONE ||
  1198. X                       otmp->otyp==LUCKSTONE) && otmp->cursed)
  1199. X                      break;
  1200. X!             }
  1201. X! 
  1202. X!             otmp->cursed = 0;
  1203. X!             otmp->bknown = 1;
  1204. X!             if (!Blind)
  1205. X                  Your("%s %s.",
  1206. X                     what ? what : aobjnam (otmp, "softly glow"),
  1207. X                     Hallucination ? hcolor() : amber);
  1208. X!             break;
  1209. X!             }
  1210. X          case TROUBLE_HALLUCINATION:
  1211. X              pline ("Looks like you are back in Kansas.");
  1212. X              make_hallucinated(0L,FALSE);
  1213. X--- 225,271 ----
  1214. X              break;
  1215. X  #endif
  1216. X          case TROUBLE_CURSED_ITEMS:
  1217. X!             if (uarmh && uarmh->cursed)     /* helmet */
  1218. X                  otmp = uarmh;
  1219. X!             else if (uarms && uarms->cursed) /* shield */
  1220. X                  otmp = uarms;
  1221. X!             else if (uarmg && uarmg->cursed) /* gloves */
  1222. X                  otmp = uarmg;
  1223. X!             else if (uarm && uarm->cursed) /* armor */
  1224. X                  otmp = uarm;
  1225. X!             else if (uarmc && uarmc->cursed) /* cloak */
  1226. X                  otmp = uarmc;
  1227. X!             else if (uarmf && uarmf->cursed) /* boots */
  1228. X                  otmp = uarmf;
  1229. X  #ifdef SHIRT
  1230. X!             else if (uarmu && uarmu->cursed) /* shirt */
  1231. X                  otmp = uarmu;
  1232. X  #endif
  1233. X!             else if (uleft && uleft->cursed) {
  1234. X                  otmp = uleft;
  1235. X!                 what = leftglow;
  1236. X!             } else if (uright && uright->cursed) {
  1237. X                  otmp = uright;
  1238. X!                 what = rightglow;
  1239. X!             } else if (uamul && uamul->cursed) /* amulet */
  1240. X                  otmp = uamul;
  1241. X!             else if (ublindf && ublindf->cursed) /* blindfold */
  1242. X                  otmp = ublindf;
  1243. X!             else if (welded(uwep)) otmp = uwep;
  1244. X!             else {
  1245. X                  for(otmp=invent; otmp; otmp=otmp->nobj)
  1246. X                  if ((otmp->otyp==LOADSTONE ||
  1247. X                       otmp->otyp==LUCKSTONE) && otmp->cursed)
  1248. X                      break;
  1249. X!             }
  1250. X! decurse:
  1251. X!             otmp->cursed = 0;
  1252. X!             otmp->bknown = 1;
  1253. X!             if (!Blind)
  1254. X                  Your("%s %s.",
  1255. X                     what ? what : aobjnam (otmp, "softly glow"),
  1256. X                     Hallucination ? hcolor() : amber);
  1257. X!             break;
  1258. X          case TROUBLE_HALLUCINATION:
  1259. X              pline ("Looks like you are back in Kansas.");
  1260. X              make_hallucinated(0L,FALSE);
  1261. X***************
  1262. X*** 713,721 ****
  1263. X              register struct monst *dmon;
  1264. X              const char *color = Hallucination ? hcolor() : black;
  1265. X      /* Human sacrifice on a chaotic altar is equivalent to demon summoning */
  1266. X      pline("The blood floods over the altar, which vanishes in a%s %s cloud!",
  1267. X!                 index(vowels, *color) ? "n" : "", color);
  1268. X!             levl[u.ux][u.uy].typ = ROOM;
  1269. X              if(Invisible) newsym(u.ux, u.uy);
  1270. X              if(dmon = makemon(&mons[dlord()], u.ux, u.uy)) {
  1271. X                  You("have summoned a demon lord!");
  1272. X--- 738,755 ----
  1273. X              register struct monst *dmon;
  1274. X              const char *color = Hallucination ? hcolor() : black;
  1275. X      /* Human sacrifice on a chaotic altar is equivalent to demon summoning */
  1276. X+ #ifdef THEOLOGY
  1277. X+             if (levl[u.ux][u.uy].altarmask & A_SHRINE)
  1278. X+                 pline("The blood covers the altar!");
  1279. X+             else {
  1280. X+ #endif
  1281. X      pline("The blood floods over the altar, which vanishes in a%s %s cloud!",
  1282. X!                   index(vowels, *color) ? "n" : "", color);
  1283. X!                 levl[u.ux][u.uy].typ = ROOM;
  1284. X! #ifdef THEOLOGY
  1285. X!             }
  1286. X! #endif
  1287. X!             change_luck(2);
  1288. X              if(Invisible) newsym(u.ux, u.uy);
  1289. X              if(dmon = makemon(&mons[dlord()], u.ux, u.uy)) {
  1290. X                  You("have summoned a demon lord!");
  1291. X*** src/Old/pri.c    Mon Jul 31 14:33:30 1989
  1292. X--- src/pri.c    Mon Jul 31 09:37:35 1989
  1293. X***************
  1294. X*** 6,11 ****
  1295. X--- 6,14 ----
  1296. X  #define MONATTK_H
  1297. X  #include "hack.h"
  1298. X  #include <ctype.h>  /* for isalpha() */
  1299. X+ #if defined(ALTARS) && defined(THEOLOGY)
  1300. X+ #include "epri.h"
  1301. X+ #endif
  1302. X  
  1303. X  static void hilite P((uchar, uchar));
  1304. X  static void cornbot P((int));
  1305. X***************
  1306. X*** 147,153 ****
  1307. X  #ifdef POLYSELF
  1308. X              && !u.uundetected
  1309. X  #endif
  1310. X!                     ) at(u.ux,u.uy,u.usym,AT_U);
  1311. X  }
  1312. X  
  1313. X  void
  1314. X--- 150,156 ----
  1315. X  #ifdef POLYSELF
  1316. X              && !u.uundetected
  1317. X  #endif
  1318. X!                     ) atl(u.ux,u.uy,(char)u.usym);
  1319. X  }
  1320. X  
  1321. X  void
  1322. X***************
  1323. X*** 213,219 ****
  1324. X  /* Some ridiculous code to get display of @ and monsters (almost) right */
  1325. X      if(!Invisible
  1326. X  #ifdef POLYSELF
  1327. X!             || u.uundetected
  1328. X  #endif
  1329. X                      ) {
  1330. X          levl[(u.udisx = u.ux)][(u.udisy = u.uy)].scrsym = u.usym;
  1331. X--- 216,222 ----
  1332. X  /* Some ridiculous code to get display of @ and monsters (almost) right */
  1333. X      if(!Invisible
  1334. X  #ifdef POLYSELF
  1335. X!             && !u.uundetected
  1336. X  #endif
  1337. X                      ) {
  1338. X          levl[(u.udisx = u.ux)][(u.udisy = u.uy)].scrsym = u.usym;
  1339. X***************
  1340. X*** 233,243 ****
  1341. X          for(y = 0; y < ROWNO; y++) {
  1342. X              char buf[COLNO+1];
  1343. X              int start, end;
  1344. X! #ifdef TOS
  1345. X              setmem(buf, COLNO, ' ');
  1346. X  #else
  1347. X              memset(buf, ' ', COLNO);
  1348. X! #endif /* TOS */
  1349. X              for(x = 0, start = -1, end = -1; x < COLNO; x++)
  1350. X                  if((room = &levl[x][y])->new) {
  1351. X                      room->new = 0;
  1352. X--- 236,246 ----
  1353. X          for(y = 0; y < ROWNO; y++) {
  1354. X              char buf[COLNO+1];
  1355. X              int start, end;
  1356. X! #ifdef OLD_TOS
  1357. X              setmem(buf, COLNO, ' ');
  1358. X  #else
  1359. X              memset(buf, ' ', COLNO);
  1360. X! #endif /* OLD_TOS */
  1361. X              for(x = 0, start = -1, end = -1; x < COLNO; x++)
  1362. X                  if((room = &levl[x][y])->new) {
  1363. X                      room->new = 0;
  1364. X***************
  1365. X*** 971,979 ****
  1366. X  mstatusline(mtmp)
  1367. X  register struct monst *mtmp;
  1368. X  {
  1369. X      pline("Status of %s (%s): ", mon_nam(mtmp),
  1370. X!         (mtmp->data->maligntyp <= -1) ? "chaotic" :
  1371. X!         mtmp->data->maligntyp ? "lawful" : "neutral");
  1372. X      pline("Level %d  Gold %lu  HP %d(%d)",
  1373. X          mtmp->m_lev, mtmp->mgold, mtmp->mhp, mtmp->mhpmax);
  1374. X      pline("AC %d%s%s", mtmp->data->ac,
  1375. X--- 974,989 ----
  1376. X  mstatusline(mtmp)
  1377. X  register struct monst *mtmp;
  1378. X  {
  1379. X+ #if defined(ALTARS) && defined(THEOLOGY)
  1380. X+     int align = mtmp->ispriest
  1381. X+         ? ((EPRI(mtmp)->shralign & ~A_SHRINE)-1) :
  1382. X+         mtmp->data->maligntyp;
  1383. X+ #else
  1384. X+     int align = mtmp->data->maligntyp;
  1385. X+ #endif
  1386. X      pline("Status of %s (%s): ", mon_nam(mtmp),
  1387. X!         (align <= -1) ? "chaotic" :
  1388. X!         align ? "lawful" : "neutral");
  1389. X      pline("Level %d  Gold %lu  HP %d(%d)",
  1390. X          mtmp->m_lev, mtmp->mgold, mtmp->mhp, mtmp->mhpmax);
  1391. X      pline("AC %d%s%s", mtmp->data->ac,
  1392. X*** src/Old/read.c    Mon Jul 31 14:35:59 1989
  1393. X--- src/read.c    Mon Jul 31 09:13:43 1989
  1394. X***************
  1395. X*** 339,345 ****
  1396. X          }
  1397. X  /*        break;    /*NOTREACHED*/
  1398. X      case SCR_ENCHANT_WEAPON:
  1399. X!         if(uwep && (uwep->olet == WEAPON_SYM || uwep->olet == PICK_AXE)
  1400. X                              && confused) {
  1401. X          /* olet check added 10/25/86 GAN */
  1402. X              if(Blind)
  1403. X--- 339,345 ----
  1404. X          }
  1405. X  /*        break;    /*NOTREACHED*/
  1406. X      case SCR_ENCHANT_WEAPON:
  1407. X!         if(uwep && (uwep->olet == WEAPON_SYM || uwep->otyp == PICK_AXE)
  1408. X                              && confused) {
  1409. X          /* olet check added 10/25/86 GAN */
  1410. X              if(Blind)
  1411. X***************
  1412. X*** 476,492 ****
  1413. X              case MAGIC_LAMP:
  1414. X              if (sobj->cursed) stripspe(obj);
  1415. X              else if (sobj->blessed) {
  1416. X!                 if (obj->spe == 1) pline(nothing_happens);
  1417. X                  else {
  1418. X                  obj->spe = 1;
  1419. X                  p_glow1(obj);
  1420. X                  }
  1421. X              } else {
  1422. X!                 if (obj->spe == 1) pline(nothing_happens);
  1423. X                  else {
  1424. X                  n = rn2(2);
  1425. X                  if (!n) {
  1426. X                      obj->spe = 1;
  1427. X                      p_glow1(obj);
  1428. X                  } else pline(nothing_happens);
  1429. X                  }
  1430. X--- 476,496 ----
  1431. X              case MAGIC_LAMP:
  1432. X              if (sobj->cursed) stripspe(obj);
  1433. X              else if (sobj->blessed) {
  1434. X!                 if (obj->spe == 1 || obj->recharged)
  1435. X!                 pline(nothing_happens);
  1436. X                  else {
  1437. X                  obj->spe = 1;
  1438. X+                 obj->recharged = 1;
  1439. X                  p_glow1(obj);
  1440. X                  }
  1441. X              } else {
  1442. X!                 if (obj->spe == 1 || obj->recharged)
  1443. X!                 pline(nothing_happens);
  1444. X                  else {
  1445. X                  n = rn2(2);
  1446. X                  if (!n) {
  1447. X                      obj->spe = 1;
  1448. X+                     obj->recharged = 1;
  1449. X                      p_glow1(obj);
  1450. X                  } else pline(nothing_happens);
  1451. X                  }
  1452. X***************
  1453. X*** 1020,1096 ****
  1454. X      } else     return(0);        /* could not destroy anything */
  1455. X  
  1456. X      return(1);
  1457. X- }
  1458. X- 
  1459. X- /* the detections are pulled out so they can    */
  1460. X- /* also be used in the crystal ball routine    */
  1461. X- /* returns 1 if nothing was detected        */
  1462. X- /* returns 0 if something was detected        */
  1463. X- int
  1464. X- trap_detect(sobj)
  1465. X- register struct obj    *sobj;
  1466. X- /* sobj is null if crystal ball, *scroll if gold detection scroll */
  1467. X- {
  1468. X-     register struct trap *ttmp;
  1469. X-     register struct obj *obj;
  1470. X-     register int door;
  1471. X-     boolean found = FALSE;
  1472. X-     coord cc;
  1473. X- 
  1474. X-     for(ttmp = ftrap; ttmp; ttmp = ttmp->ntrap) {
  1475. X-         if(ttmp->tx != u.ux || ttmp->ty != u.uy)
  1476. X-             goto outtrapmap;
  1477. X-         else found = TRUE;
  1478. X-     }
  1479. X-     for(obj = fobj; obj; obj = obj->nobj) {
  1480. X-         if ((obj->otyp==LARGE_BOX || obj->otyp==CHEST) && obj->otrapped)
  1481. X-             if (obj->ox != u.ux || obj->oy != u.uy)
  1482. X-                 goto outtrapmap;
  1483. X-             else found = TRUE;
  1484. X-     }
  1485. X-     for(door=0; door<=doorindex; door++) {
  1486. X-         cc = doors[door];
  1487. X-         if (levl[cc.x][cc.y].doormask & D_TRAPPED)
  1488. X-             if (cc.x != u.ux || cc.x != u.uy)
  1489. X-                 goto outtrapmap;
  1490. X-             else found = TRUE;
  1491. X-     }
  1492. X-     if(!found) {
  1493. X-         char buf[42];
  1494. X-         Sprintf(buf, "Your %s stop itching.",
  1495. X-             makeplural(body_part(TOE)));
  1496. X-         strange_feeling(sobj,buf);
  1497. X-         return(1);
  1498. X-     }
  1499. X-     /* traps exist, but only under me - no separate display required */
  1500. X-     Your("%s itch.", makeplural(body_part(TOE)));
  1501. X-     return(0);
  1502. X- outtrapmap:
  1503. X-     cls();
  1504. X- #define SYMBOL (uchar)(Hallucination ? rndobjsym() : \
  1505. X-         (sobj && sobj->cursed) ? GOLD_SYM : TRAP_SYM)
  1506. X- #define AT Hallucination || (sobj && sobj->cursed) ? AT_OBJ : AT_MAP
  1507. X-     for(ttmp = ftrap; ttmp; ttmp = ttmp->ntrap)
  1508. X-         at(ttmp->tx, ttmp->ty, SYMBOL, AT);
  1509. X-     for(obj = fobj; obj; obj = obj->nobj) {
  1510. X-         if ((obj->otyp==LARGE_BOX || obj->otyp==CHEST) && obj->otrapped)
  1511. X-             at(obj->ox, obj->oy, SYMBOL, AT);
  1512. X-     }
  1513. X-     for(door=0; door<=doorindex; door++) {
  1514. X-         cc = doors[door];
  1515. X-         if (levl[cc.x][cc.y].doormask & D_TRAPPED)
  1516. X-             at(cc.x, cc.y, SYMBOL, AT);
  1517. X-     }
  1518. X- #undef SYMBOL
  1519. X- #undef AT
  1520. X-     prme();
  1521. X-     if (sobj && sobj->cursed)
  1522. X-         You("feel very greedy.");
  1523. X-     else
  1524. X-         You("feel entrapped.");
  1525. X-     more();
  1526. X-     docrt();
  1527. X-     return(0);
  1528. X  }
  1529. X  
  1530. X  int
  1531. X--- 1024,1029 ----
  1532. X*** src/Old/restore.c    Mon Jul 31 14:37:16 1989
  1533. X--- src/restore.c    Fri Jul 28 17:54:07 1989
  1534. X***************
  1535. X*** 10,16 ****
  1536. X--- 10,18 ----
  1537. X  #endif
  1538. X  
  1539. X  boolean restoring = FALSE;
  1540. X+ #ifdef TUTTI_FRUTTI
  1541. X  static struct fruit *oldfruit;
  1542. X+ #endif
  1543. X  static long omoves;
  1544. X  
  1545. X  /*
  1546. X***************
  1547. X*** 44,50 ****
  1548. X--- 46,54 ----
  1549. X  {
  1550. X      register struct obj *otmp, *otmp2;
  1551. X      register struct obj *first = 0;
  1552. X+ #ifdef TUTTI_FRUTTI
  1553. X      register struct fruit *oldf;
  1554. X+ #endif
  1555. X      int xl;
  1556. X  #ifdef LINT
  1557. X      /* suppress "used before set" warning from lint */
  1558. X***************
  1559. X*** 58,63 ****
  1560. X--- 62,68 ----
  1561. X          else otmp2->nobj = otmp;
  1562. X          mread(fd, (genericptr_t) otmp, (unsigned) xl + sizeof(struct obj));
  1563. X          if(!otmp->o_id) otmp->o_id = flags.ident++;
  1564. X+ #ifdef TUTTI_FRUTTI
  1565. X          if(ghostly && otmp->otyp == SLIME_MOLD) {
  1566. X              for(oldf=oldfruit; oldf; oldf=oldf->nextf)
  1567. X                  if (oldf->fid == otmp->spe) break;
  1568. X***************
  1569. X*** 64,69 ****
  1570. X--- 69,75 ----
  1571. X              if(!oldf) impossible("no old fruit?");
  1572. X              else otmp->spe = fruitadd(oldf->fname);
  1573. X          }
  1574. X+ #endif
  1575. X      /* Ghost levels get object age shifted from old player's clock to
  1576. X       * new player's clock.  Assumption: new player arrived immediately
  1577. X       * after old player died.
  1578. X***************
  1579. X*** 158,164 ****
  1580. X--- 164,172 ----
  1581. X      xchar ltmp;
  1582. X      unsigned int mid;        /* idem */
  1583. X      struct obj *otmp;
  1584. X+ #ifdef TUTTI_FRUTTI
  1585. X      struct fruit *fruit;
  1586. X+ #endif
  1587. X  #ifdef MSDOS
  1588. X      struct flag oldflags;
  1589. X  
  1590. X***************
  1591. X*** 227,232 ****
  1592. X--- 235,241 ----
  1593. X      if(u.ustuck)
  1594. X          mread(fd, (genericptr_t) &mid, sizeof mid);
  1595. X      mread(fd, (genericptr_t) pl_character, sizeof pl_character);
  1596. X+ #ifdef TUTTI_FRUTTI
  1597. X      mread(fd, (genericptr_t) pl_fruit, sizeof pl_fruit);
  1598. X      mread(fd, (genericptr_t) ¤t_fruit, sizeof current_fruit);
  1599. X      ffruit = 0;
  1600. X***************
  1601. X*** 237,242 ****
  1602. X--- 246,252 ----
  1603. X          ffruit = fruit;
  1604. X      }
  1605. X      free((genericptr_t) fruit);
  1606. X+ #endif
  1607. X  
  1608. X      restnames(fd);
  1609. X  #ifdef DGK
  1610. X***************
  1611. X*** 266,272 ****
  1612. X          nfd = creat(lock, FCMASK);
  1613. X  #endif
  1614. X          if (nfd < 0)    panic("Cannot open temp file %s!\n", lock);
  1615. X! #if defined(DGK) && !defined(TOS)
  1616. X          if (!savelev(nfd, ltmp, COUNT | WRITE)) {
  1617. X  
  1618. X              /* The savelev can't proceed because the size required
  1619. X--- 276,282 ----
  1620. X          nfd = creat(lock, FCMASK);
  1621. X  #endif
  1622. X          if (nfd < 0)    panic("Cannot open temp file %s!\n", lock);
  1623. X! #if defined(DGK) && !defined(OLD_TOS)
  1624. X          if (!savelev(nfd, ltmp, COUNT | WRITE)) {
  1625. X  
  1626. X              /* The savelev can't proceed because the size required
  1627. X***************
  1628. X*** 373,381 ****
  1629. X      short tlev;
  1630. X  #endif
  1631. X  
  1632. X! #ifdef MSDOS
  1633. X!     setmode(fd, O_BINARY);        /* is this required for TOS??? */
  1634. X  #endif
  1635. X      /* Load the old fruit info.  We have to do it first, so the infor-
  1636. X       * mation is available when restoring the objects.  
  1637. X       */
  1638. X--- 383,392 ----
  1639. X      short tlev;
  1640. X  #endif
  1641. X  
  1642. X! #if defined(MSDOS) && !defined(TOS)
  1643. X!     setmode(fd, O_BINARY);        /* is this required for TOS??? NO --ERS */
  1644. X  #endif
  1645. X+ #ifdef TUTTI_FRUTTI
  1646. X      /* Load the old fruit info.  We have to do it first, so the infor-
  1647. X       * mation is available when restoring the objects.  
  1648. X       */
  1649. X***************
  1650. X*** 391,406 ****
  1651. X          }
  1652. X          free((genericptr_t) fruit);
  1653. X      }
  1654. X  
  1655. X      /* First some sanity checks */
  1656. X      mread(fd, (genericptr_t) &hpid, sizeof(hpid));
  1657. X  #ifdef TOS
  1658. X      mread(fd, (genericptr_t) &tlev, sizeof(tlev));
  1659. X!     dlvl=tlev&0xff;
  1660. X  #else
  1661. X      mread(fd, (genericptr_t) &dlvl, sizeof(dlvl));
  1662. X  #endif
  1663. X      if((pid && pid != hpid) || (lev && dlvl != lev)) {
  1664. X          pline("Strange, this map is not as I remember it.");
  1665. X          pline("Somebody is trying some trickery here...");
  1666. X          pline("This game is void.");
  1667. X--- 402,426 ----
  1668. X          }
  1669. X          free((genericptr_t) fruit);
  1670. X      }
  1671. X+ #endif
  1672. X  
  1673. X      /* First some sanity checks */
  1674. X      mread(fd, (genericptr_t) &hpid, sizeof(hpid));
  1675. X  #ifdef TOS
  1676. X      mread(fd, (genericptr_t) &tlev, sizeof(tlev));
  1677. X!     dlvl=tlev&0x00ff;
  1678. X  #else
  1679. X      mread(fd, (genericptr_t) &dlvl, sizeof(dlvl));
  1680. X  #endif
  1681. X      if((pid && pid != hpid) || (lev && dlvl != lev)) {
  1682. X+ #ifdef WIZARD
  1683. X+         if (wizard) {
  1684. X+             if (pid && pid != hpid)
  1685. X+                 pline("PID (%d) doesn't match saved PID (%d)!", hpid, pid);
  1686. X+             else if (lev && dlvl != lev)
  1687. X+                 pline("This is level %d, not %d!", dlvl, lev);
  1688. X+         }
  1689. X+ #endif
  1690. X          pline("Strange, this map is not as I remember it.");
  1691. X          pline("Somebody is trying some trickery here...");
  1692. X          pline("This game is void.");
  1693. X***************
  1694. X*** 654,659 ****
  1695. X--- 674,680 ----
  1696. X      }
  1697. X      mread(fd, (genericptr_t)wgrowtime, sizeof(wgrowtime));
  1698. X  #endif
  1699. X+ #ifdef TUTTI_FRUTTI
  1700. X      /* Now get rid of all the temp fruits... */
  1701. X      if (ghostly) {
  1702. X          struct fruit *fruit;
  1703. X***************
  1704. X*** 664,669 ****
  1705. X--- 685,691 ----
  1706. X              oldfruit = fruit;
  1707. X          }
  1708. X      }
  1709. X+ #endif
  1710. X  }
  1711. X  
  1712. X  #ifdef ZEROCOMP
  1713. X*** src/Old/save.c    Mon Jul 31 14:39:09 1989
  1714. X--- src/save.c    Fri Jul 28 17:54:12 1989
  1715. X***************
  1716. X*** 11,19 ****
  1717. X  #include "wseg.h"
  1718. X  #endif
  1719. X  
  1720. X! #ifndef TOS
  1721. X  #include <signal.h>
  1722. X! #endif /* !TOS */
  1723. X  #ifdef EXPLORE_MODE
  1724. X  #include <fcntl.h>
  1725. X  #endif /* EXPLORE_MODE */
  1726. X--- 11,19 ----
  1727. X  #include "wseg.h"
  1728. X  #endif
  1729. X  
  1730. X! #ifndef NO_SIGNAL
  1731. X  #include <signal.h>
  1732. X! #endif /* !NO_SIGNAL */
  1733. X  #ifdef EXPLORE_MODE
  1734. X  #include <fcntl.h>
  1735. X  #endif /* EXPLORE_MODE */
  1736. X***************
  1737. X*** 20,26 ****
  1738. X  
  1739. X  boolean hu;        /* set during hang-up */
  1740. X  
  1741. X! #if defined(DGK) && !defined(TOS)
  1742. X  struct finfo fileinfo[MAXLEVEL+1];
  1743. X  long bytes_counted;
  1744. X  int count_only;
  1745. X--- 20,26 ----
  1746. X  
  1747. X  boolean hu;        /* set during hang-up */
  1748. X  
  1749. X! #if defined(DGK) && !defined(OLD_TOS)
  1750. X  struct finfo fileinfo[MAXLEVEL+1];
  1751. X  long bytes_counted;
  1752. X  int count_only;
  1753. X***************
  1754. X*** 28,49 ****
  1755. X  boolean level_exists[MAXLEVEL+1];
  1756. X  #endif
  1757. X  
  1758. X! #if defined(DGK) && !defined(TOS)
  1759. X  static void savelev0();
  1760. X! #endif /* DGK && !TOS */
  1761. X  static void saveobjchn();
  1762. X  static void savemonchn();
  1763. X  static void savegoldchn();
  1764. X  static void savetrapchn();
  1765. X  static void savegenoinfo();
  1766. X! #if defined(DGK) && !defined(TOS)
  1767. X  static boolean swapout_oldest();
  1768. X  static void copyfile();
  1769. X! #endif /* defined(DGK) && !defined(TOS) */
  1770. X  static void spill_objs();
  1771. X  
  1772. X  int
  1773. X  dosave(){
  1774. X      pline("Really save? ");    /* especially useful if COMPRESS defined */
  1775. X      if(yn() == 'n') {
  1776. X          clrlin();
  1777. X--- 28,50 ----
  1778. X  boolean level_exists[MAXLEVEL+1];
  1779. X  #endif
  1780. X  
  1781. X! #if defined(DGK) && !defined(OLD_TOS)
  1782. X  static void savelev0();
  1783. X! #endif /* DGK && !OLD_TOS */
  1784. X  static void saveobjchn();
  1785. X  static void savemonchn();
  1786. X  static void savegoldchn();
  1787. X  static void savetrapchn();
  1788. X  static void savegenoinfo();
  1789. X! #if defined(DGK) && !defined(OLD_TOS)
  1790. X  static boolean swapout_oldest();
  1791. X  static void copyfile();
  1792. X! #endif /* defined(DGK) && !defined(OLD_TOS) */
  1793. X  static void spill_objs();
  1794. X  
  1795. X  int
  1796. X  dosave(){
  1797. X+     clrlin();
  1798. X      pline("Really save? ");    /* especially useful if COMPRESS defined */
  1799. X      if(yn() == 'n') {
  1800. X          clrlin();
  1801. X***************
  1802. X*** 83,89 ****
  1803. X      register int fd, ofd;
  1804. X      int tmp;        /* not register ! */
  1805. X      xchar ltmp;
  1806. X! #if defined(DGK) && !defined(TOS)
  1807. X      long fds, needed;
  1808. X      int mode;
  1809. X  #endif
  1810. X--- 84,90 ----
  1811. X      register int fd, ofd;
  1812. X      int tmp;        /* not register ! */
  1813. X      xchar ltmp;
  1814. X! #if defined(DGK) && !defined(OLD_TOS)
  1815. X      long fds, needed;
  1816. X      int mode;
  1817. X  #endif
  1818. X***************
  1819. X*** 93,99 ****
  1820. X  #ifdef UNIX
  1821. X      (void) signal(SIGHUP, SIG_IGN);
  1822. X  #endif
  1823. X! #if !defined(__TURBOC__) && !defined(TOS)
  1824. X      (void) signal(SIGINT, SIG_IGN);
  1825. X  #endif
  1826. X  
  1827. X--- 94,100 ----
  1828. X  #ifdef UNIX
  1829. X      (void) signal(SIGHUP, SIG_IGN);
  1830. X  #endif
  1831. X! #if !defined(__TURBOC__) && !defined(OLD_TOS)
  1832. X      (void) signal(SIGINT, SIG_IGN);
  1833. X  #endif
  1834. X  
  1835. X***************
  1836. X*** 141,147 ****
  1837. X          change_luck(-1);        /* and unido!ab */
  1838. X      home();
  1839. X      cl_end();
  1840. X! #if defined(DGK) && !defined(TOS)
  1841. X      if(!hu) msmsg("Saving: ");
  1842. X      mode = COUNT;
  1843. X  again:
  1844. X--- 142,148 ----
  1845. X          change_luck(-1);        /* and unido!ab */
  1846. X      home();
  1847. X      cl_end();
  1848. X! #if defined(DGK) && !defined(OLD_TOS)
  1849. X      if(!hu) msmsg("Saving: ");
  1850. X      mode = COUNT;
  1851. X  again:
  1852. X***************
  1853. X*** 183,193 ****
  1854. X      if(u.ustuck)
  1855. X          bwrite(fd, (genericptr_t) &(u.ustuck->m_id), sizeof u.ustuck->m_id);
  1856. X      bwrite(fd, (genericptr_t) pl_character, sizeof pl_character);
  1857. X      bwrite(fd, (genericptr_t) pl_fruit, sizeof pl_fruit);
  1858. X      bwrite(fd, (genericptr_t) ¤t_fruit, sizeof current_fruit);
  1859. X      savefruitchn(fd);
  1860. X      savenames(fd);
  1861. X! #if defined(DGK) && !defined(TOS)
  1862. X      if (mode == COUNT) {
  1863. X  # ifdef ZEROCOMP
  1864. X          bflush(fd);
  1865. X--- 184,196 ----
  1866. X      if(u.ustuck)
  1867. X          bwrite(fd, (genericptr_t) &(u.ustuck->m_id), sizeof u.ustuck->m_id);
  1868. X      bwrite(fd, (genericptr_t) pl_character, sizeof pl_character);
  1869. X+ #ifdef TUTTI_FRUTTI
  1870. X      bwrite(fd, (genericptr_t) pl_fruit, sizeof pl_fruit);
  1871. X      bwrite(fd, (genericptr_t) ¤t_fruit, sizeof current_fruit);
  1872. X      savefruitchn(fd);
  1873. X+ #endif
  1874. X      savenames(fd);
  1875. X! #if defined(DGK) && !defined(OLD_TOS)
  1876. X      if (mode == COUNT) {
  1877. X  # ifdef ZEROCOMP
  1878. X          bflush(fd);
  1879. X***************
  1880. X*** 214,220 ****
  1881. X      }
  1882. X  #endif
  1883. X      for(ltmp = (xchar)1; ltmp <= maxdlevel; ltmp++) {
  1884. X! #if defined(DGK) && !defined(TOS)
  1885. X          if (ltmp == dlevel || !fileinfo[ltmp].where) continue;
  1886. X          if (fileinfo[ltmp].where != ACTIVE)
  1887. X              swapin_file(ltmp);
  1888. X--- 217,223 ----
  1889. X      }
  1890. X  #endif
  1891. X      for(ltmp = (xchar)1; ltmp <= maxdlevel; ltmp++) {
  1892. X! #if defined(DGK) && !defined(OLD_TOS)
  1893. X          if (ltmp == dlevel || !fileinfo[ltmp].where) continue;
  1894. X          if (fileinfo[ltmp].where != ACTIVE)
  1895. X              swapin_file(ltmp);
  1896. X***************
  1897. X*** 238,244 ****
  1898. X          getlev(ofd, hackpid, ltmp, FALSE);
  1899. X          (void) close(ofd);
  1900. X          bwrite(fd, (genericptr_t) <mp, sizeof ltmp);  /* level number */
  1901. X! #if defined(DGK) && !defined(TOS)
  1902. X          savelev(fd, ltmp, WRITE);            /* actual level */
  1903. X  #else
  1904. X          savelev(fd, ltmp);            /* actual level */
  1905. X--- 241,247 ----
  1906. X          getlev(ofd, hackpid, ltmp, FALSE);
  1907. X          (void) close(ofd);
  1908. X          bwrite(fd, (genericptr_t) <mp, sizeof ltmp);  /* level number */
  1909. X! #if defined(DGK) && !defined(OLD_TOS)
  1910. X          savelev(fd, ltmp, WRITE);            /* actual level */
  1911. X  #else
  1912. X          savelev(fd, ltmp);            /* actual level */
  1913. X***************
  1914. X*** 266,272 ****
  1915. X      return(1);
  1916. X  }
  1917. X  
  1918. X! #if defined(DGK) && !defined(TOS)
  1919. X  boolean
  1920. X  savelev(fd, lev, mode)
  1921. X  int fd;
  1922. X--- 269,275 ----
  1923. X      return(1);
  1924. X  }
  1925. X  
  1926. X! #if defined(DGK) && !defined(OLD_TOS)
  1927. X  boolean
  1928. X  savelev(fd, lev, mode)
  1929. X  int fd;
  1930. X***************
  1931. X*** 320,332 ****
  1932. X  #endif
  1933. X  
  1934. X      if(fd < 0) panic("Save on bad file!");    /* impossible */
  1935. X! #if !defined(DGK) || defined(TOS)
  1936. X      if(lev >= 0 && lev <= MAXLEVEL)
  1937. X          level_exists[lev] = TRUE;
  1938. X  #endif
  1939. X      bwrite(fd,(genericptr_t) &hackpid,sizeof(hackpid));
  1940. X  #ifdef TOS
  1941. X!     tlev=lev;
  1942. X      bwrite(fd,(genericptr_t) &tlev,sizeof(tlev));
  1943. X  #else
  1944. X      bwrite(fd,(genericptr_t) &lev,sizeof(lev));
  1945. X--- 323,335 ----
  1946. X  #endif
  1947. X  
  1948. X      if(fd < 0) panic("Save on bad file!");    /* impossible */
  1949. X! #if !defined(DGK) || defined(OLD_TOS)
  1950. X      if(lev >= 0 && lev <= MAXLEVEL)
  1951. X          level_exists[lev] = TRUE;
  1952. X  #endif
  1953. X      bwrite(fd,(genericptr_t) &hackpid,sizeof(hackpid));
  1954. X  #ifdef TOS
  1955. X!     tlev=lev; tlev &= 0x00ff;
  1956. X      bwrite(fd,(genericptr_t) &tlev,sizeof(tlev));
  1957. X  #else
  1958. X      bwrite(fd,(genericptr_t) &lev,sizeof(lev));
  1959. X***************
  1960. X*** 376,382 ****
  1961. X          for(wtmp = wsegs[tmp]; wtmp; wtmp = wtmp->nseg){
  1962. X              bwrite(fd,(genericptr_t) wtmp,sizeof(struct wseg));
  1963. X          }
  1964. X! #if defined(DGK) && !defined(TOS)
  1965. X          if (!count_only)
  1966. X  #endif
  1967. X              wsegs[tmp] = 0;
  1968. X--- 379,385 ----
  1969. X          for(wtmp = wsegs[tmp]; wtmp; wtmp = wtmp->nseg){
  1970. X              bwrite(fd,(genericptr_t) wtmp,sizeof(struct wseg));
  1971. X          }
  1972. X! #if defined(DGK) && !defined(OLD_TOS)
  1973. X          if (!count_only)
  1974. X  #endif
  1975. X              wsegs[tmp] = 0;
  1976. X***************
  1977. X*** 383,389 ****
  1978. X      }
  1979. X      bwrite(fd,(genericptr_t) wgrowtime,sizeof(wgrowtime));
  1980. X  #endif /* WORM /**/
  1981. X! #if defined(DGK) && !defined(TOS)
  1982. X      if (count_only)    return;
  1983. X  #endif
  1984. X      billobjs = 0;
  1985. X--- 386,392 ----
  1986. X      }
  1987. X      bwrite(fd,(genericptr_t) wgrowtime,sizeof(wgrowtime));
  1988. X  #endif /* WORM /**/
  1989. X! #if defined(DGK) && !defined(OLD_TOS)
  1990. X      if (count_only)    return;
  1991. X  #endif
  1992. X      billobjs = 0;
  1993. X***************
  1994. X*** 432,438 ****
  1995. X        flushoutrun(outrunlength);
  1996. X        }
  1997. X        if (outbufp) {
  1998. X! #ifdef    DGK
  1999. X        if (!count_only)    /* flush buffer */
  2000. X  #endif
  2001. X            (void) write(fd, outbuf, outbufp);
  2002. X--- 435,441 ----
  2003. X        flushoutrun(outrunlength);
  2004. X        }
  2005. X        if (outbufp) {
  2006. X! #if defined(DGK) && !defined(OLD_TOS)
  2007. X        if (!count_only)    /* flush buffer */
  2008. X  #endif
  2009. X            (void) write(fd, outbuf, outbufp);
  2010. X***************
  2011. X*** 470,476 ****
  2012. X  register genericptr_t loc;
  2013. X  register unsigned num;
  2014. X  {
  2015. X! #if defined(DGK) && !defined(TOS)
  2016. X      bytes_counted += num;
  2017. X      if (!count_only)
  2018. X  #endif
  2019. X--- 473,479 ----
  2020. X  register genericptr_t loc;
  2021. X  register unsigned num;
  2022. X  {
  2023. X! #if defined(DGK) && !defined(OLD_TOS)
  2024. X      bytes_counted += num;
  2025. X      if (!count_only)
  2026. X  #endif
  2027. X***************
  2028. X*** 503,509 ****
  2029. X          xl = otmp->onamelth;
  2030. X          bwrite(fd, (genericptr_t) &xl, sizeof(int));
  2031. X          bwrite(fd, (genericptr_t) otmp, xl + sizeof(struct obj));
  2032. X! #if defined(DGK) && !defined(TOS)
  2033. X          if (!count_only)
  2034. X  #endif
  2035. X          free((genericptr_t) otmp);
  2036. X--- 506,512 ----
  2037. X          xl = otmp->onamelth;
  2038. X          bwrite(fd, (genericptr_t) &xl, sizeof(int));
  2039. X          bwrite(fd, (genericptr_t) otmp, xl + sizeof(struct obj));
  2040. X! #if defined(DGK) && !defined(OLD_TOS)
  2041. X          if (!count_only)
  2042. X  #endif
  2043. X          free((genericptr_t) otmp);
  2044. X***************
  2045. X*** 530,536 ****
  2046. X          bwrite(fd, (genericptr_t) &xl, sizeof(int));
  2047. X          bwrite(fd, (genericptr_t) mtmp, xl + sizeof(struct monst));
  2048. X          if(mtmp->minvent) saveobjchn(fd,mtmp->minvent);
  2049. X! #if defined(DGK) && !defined(TOS)
  2050. X          if (!count_only)
  2051. X  #endif
  2052. X          free((genericptr_t) mtmp);
  2053. X--- 533,539 ----
  2054. X          bwrite(fd, (genericptr_t) &xl, sizeof(int));
  2055. X          bwrite(fd, (genericptr_t) mtmp, xl + sizeof(struct monst));
  2056. X          if(mtmp->minvent) saveobjchn(fd,mtmp->minvent);
  2057. X! #if defined(DGK) && !defined(OLD_TOS)
  2058. X          if (!count_only)
  2059. X  #endif
  2060. X          free((genericptr_t) mtmp);
  2061. X***************
  2062. X*** 548,554 ****
  2063. X      while(gold) {
  2064. X          gold2 = gold->ngold;
  2065. X          bwrite(fd, (genericptr_t) gold, sizeof(struct gold));
  2066. X! #if defined(DGK) && !defined(TOS)
  2067. X          if (!count_only)
  2068. X  #endif
  2069. X              free((genericptr_t) gold);
  2070. X--- 551,557 ----
  2071. X      while(gold) {
  2072. X          gold2 = gold->ngold;
  2073. X          bwrite(fd, (genericptr_t) gold, sizeof(struct gold));
  2074. X! #if defined(DGK) && !defined(OLD_TOS)
  2075. X          if (!count_only)
  2076. X  #endif
  2077. X              free((genericptr_t) gold);
  2078. X***************
  2079. X*** 566,572 ****
  2080. X      while(trap) {
  2081. X          trap2 = trap->ntrap;
  2082. X          bwrite(fd, (genericptr_t) trap, sizeof(struct trap));
  2083. X! #if defined(DGK) && !defined(TOS)
  2084. X          if (!count_only)
  2085. X  #endif
  2086. X              free((genericptr_t) trap);
  2087. X--- 569,575 ----
  2088. X      while(trap) {
  2089. X          trap2 = trap->ntrap;
  2090. X          bwrite(fd, (genericptr_t) trap, sizeof(struct trap));
  2091. X! #if defined(DGK) && !defined(OLD_TOS)
  2092. X          if (!count_only)
  2093. X  #endif
  2094. X              free((genericptr_t) trap);
  2095. X***************
  2096. X*** 575,580 ****
  2097. X--- 578,584 ----
  2098. X      bwrite(fd, (genericptr_t)nul, sizeof(struct trap));
  2099. X  }
  2100. X  
  2101. X+ #ifdef TUTTI_FRUTTI
  2102. X  /* save all the fruit names and ID's; this is used only in saving whole games
  2103. X   * (not levels) and in saving bones levels.  When saving a bones level,
  2104. X   * we only want to save the fruits which exist on the bones level; the bones
  2105. X***************
  2106. X*** 584,599 ****
  2107. X  savefruitchn(fd)
  2108. X  register int fd;
  2109. X  {
  2110. X!     register struct fruit *f2;
  2111. X!     while(ffruit) {
  2112. X!         f2 = ffruit->nextf;
  2113. X!         if (ffruit->fid >= 0)
  2114. X!             bwrite(fd, (genericptr_t) ffruit, sizeof(struct fruit));
  2115. X!         free((genericptr_t) ffruit);
  2116. X!         ffruit = f2;
  2117. X      }
  2118. X      bwrite(fd, (genericptr_t)nul, sizeof(struct fruit));
  2119. X  }
  2120. X  
  2121. X  static void
  2122. X  savegenoinfo(fd)
  2123. X--- 588,610 ----
  2124. X  savefruitchn(fd)
  2125. X  register int fd;
  2126. X  {
  2127. X!     register struct fruit *f2, *f1;
  2128. X! 
  2129. X!     f1 = ffruit;
  2130. X!     while(f1) {
  2131. X!         f2 = f1->nextf;
  2132. X!         if (f1->fid >= 0) {
  2133. X!             bwrite(fd, (genericptr_t) f1, sizeof(struct fruit));
  2134. X!         }
  2135. X! #if defined(DGK) && !defined(OLD_TOS)
  2136. X!         if (!count_only)
  2137. X! #endif
  2138. X!             free((genericptr_t) f1);
  2139. X!         f1 = f2;
  2140. X      }
  2141. X      bwrite(fd, (genericptr_t)nul, sizeof(struct fruit));
  2142. X  }
  2143. X+ #endif
  2144. X  
  2145. X  static void
  2146. X  savegenoinfo(fd)
  2147. X***************
  2148. X*** 605,611 ****
  2149. X          bwrite(fd, (genericptr_t) &(mons[i].geno), sizeof(unsigned));
  2150. X  }
  2151. X  
  2152. X! #if defined(DGK) && !defined(TOS)
  2153. X  boolean
  2154. X  swapin_file(lev)
  2155. X  int lev;
  2156. X--- 616,622 ----
  2157. X          bwrite(fd, (genericptr_t) &(mons[i].geno), sizeof(unsigned));
  2158. X  }
  2159. X  
  2160. X! #if defined(DGK) && !defined(OLD_TOS)
  2161. X  boolean
  2162. X  swapin_file(lev)
  2163. X  int lev;
  2164. X***************
  2165. X*** 668,673 ****
  2166. X--- 679,690 ----
  2167. X  copyfile(from, to)
  2168. X  char *from, *to;
  2169. X  {
  2170. X+ #ifdef TOS
  2171. X+     extern int _copyfile();
  2172. X+ 
  2173. X+     if (_copyfile(from, to))
  2174. X+         panic("Can't copy %s to %s\n", from, to);
  2175. X+ #else
  2176. X      char buf[BUFSIZ];
  2177. X      int nfrom, nto, fdfrom, fdto;
  2178. X  
  2179. X***************
  2180. X*** 683,688 ****
  2181. X--- 700,706 ----
  2182. X      } while (nfrom == BUFSIZ);
  2183. X      (void) close(fdfrom);
  2184. X      (void) close(fdto);
  2185. X+ #endif /* TOS */
  2186. X  }
  2187. X  #endif
  2188. X  
  2189. END_OF_FILE
  2190. if test 55712 -ne `wc -c <'src3.diff'`; then
  2191.     echo shar: \"'src3.diff'\" unpacked with wrong size!
  2192. fi
  2193. # end of 'src3.diff'
  2194. fi
  2195. echo shar: End of archive 5 \(of 6\).
  2196. cp /dev/null ark5isdone
  2197. MISSING=""
  2198. for I in 1 2 3 4 5 6 ; do
  2199.     if test ! -f ark${I}isdone ; then
  2200.     MISSING="${MISSING} ${I}"
  2201.     fi
  2202. done
  2203. if test "${MISSING}" = "" ; then
  2204.     echo You have unpacked all 6 archives.
  2205.     echo "now type ./do_patch.sh"
  2206.     rm -f ark[1-9]isdone
  2207. else
  2208.     echo You still need to unpack the following archives:
  2209.     echo "        " ${MISSING}
  2210. fi
  2211. ##  End of shell archive.
  2212. exit 0
  2213.