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

  1. Path: uunet!news.tek.com!master!saab!billr
  2. From: billr@saab.CNA.TEK.COM (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v16i114:  nethack31 - display oriented dungeons & dragons (Ver. 3.1), Part106/108
  5. Message-ID: <4479@master.CNA.TEK.COM>
  6. Date: 5 Feb 93 22:04:08 GMT
  7. Sender: news@master.CNA.TEK.COM
  8. Lines: 1756
  9. Approved: billr@saab.CNA.TEK.COM
  10. Xref: uunet comp.sources.games:1665
  11.  
  12. Submitted-by: izchak@linc.cis.upenn.edu (Izchak Miller)
  13. Posting-number: Volume 16, Issue 114
  14. Archive-name: nethack31/Part106
  15. Supersedes: nethack3p9: Volume 10, Issue 46-108
  16. Environment: Amiga, Atari, Mac, MS-DOS, OS2, Unix, VMS, X11
  17.  
  18.  
  19.  
  20. #! /bin/sh
  21. # This is a shell archive.  Remove anything before this line, then unpack
  22. # it by saving it into a file and typing "sh file".  To overwrite existing
  23. # files, type "sh file -c".  You can also feed this as standard input via
  24. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  25. # will see the following message at the end:
  26. #        "End of archive 106 (of 108)."
  27. # Contents:  UPDATE0 dat/oracle.des include/artifact.h
  28. #   include/permonst.h include/qtext.h include/quest.h
  29. #   include/termcap.h include/tosconf.h include/winami.h src/rnd.c
  30. #   src/windows.c sys/amiga/NHinfo.uu sys/amiga/amii.hlp
  31. #   sys/amiga/dflticon.uu sys/amiga/hackwb.hlp sys/amiga/wbstruct.h
  32. #   sys/mac/macsnd.c sys/msdos/setup.bat sys/share/lev_comp.h
  33. #   sys/unix/Makefile.dat sys/vms/Makefile.doc util/panic.c
  34. # Wrapped by billr@saab on Wed Jan 27 16:09:33 1993
  35. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  36. if test -f 'UPDATE0' -a "${1}" != "-c" ; then 
  37.   echo shar: Will not clobber existing file \"'UPDATE0'\"
  38. else
  39. echo shar: Extracting \"'UPDATE0'\" \(2374 characters\)
  40. sed "s/^X//" >'UPDATE0' <<'END_OF_FILE'
  41. XNetHack 3.1 is a product of two years of intensive work by the NetHack
  42. XDevelopment Team and its Amiga, Atari, Macintosh, OS/2, MSDOS, and VMS
  43. Xports sub-teams.  These include over thirty members from different
  44. Xcountries.  The team wishes to express its gratitude to the management
  45. Xof linc.cis.upenn.edu for its generous support of this unique development
  46. Xactivity.
  47. X
  48. XNetHack 3.1 is a new generation of NetHack.  Here is a list of some of
  49. Xits main new features:
  50. X
  51. X* Unlike 3.0, NetHack 3.1 is a multi-dungeon game.  New dungeons "branch"
  52. X  off the main dungeon at different locations.
  53. X
  54. X* A unifying mythology was adopted for the game.  There are tasks which
  55. X  must be completed in various dungeons before the main task of capturing
  56. X  the Amulet can be undertaken.  There are different quests for the
  57. X  different character classes.
  58. X
  59. X* There is a new multi-level endgame full of surprises.
  60. X
  61. X* Many of the monsters in NetHack 3.1 now can wield weapons, zap wands,
  62. X  read scrolls, and cast spells.  Fighting them must take these special
  63. X  abilities into consideration.
  64. X
  65. X* The game's display was completely re-written.  It is now based on a
  66. X  line-of-sight principle, and it gives a new "feel" to the game.  The
  67. X  new display was written with a standardized window interface, which
  68. X  allows easy substitution and addition of windowing systems independent
  69. X  of operating system.  For example, the UNIX port now supports X11 as
  70. X  well as the traditional tty.
  71. X
  72. X* Numerous local changes were made, and many new monsters, objects, and
  73. X  intelligent artifacts were added.
  74. X
  75. XYou will discover the details and the rest of the changes for yourselves.
  76. X
  77. XAs we did with 3.0, we will periodically release patchlevel revisions of
  78. XNetHack 3.1, which will include bug fixes and further development results.
  79. XAvoid applying free-lanced patches, if you want to take advantage of these
  80. Xpatchlevel updates.
  81. X
  82. XDespite our effort, there are, no doubt, many bugs still in the code.
  83. XThe Amiga and Macintosh ports, in particular, still have rough edges due
  84. Xto time constraints on their port-team members.  A port to Windows NT is
  85. Xunderway but is not suitable for release at this time.  We call upon you
  86. Xto help in debugging both the game and the ports.  The address of the
  87. XNetHack development team remains nethack-bugs@linc.cis.upenn.edu.
  88. X
  89. XAs always, your comments and suggestions will be appreciated.  Enjoy.
  90. X
  91. END_OF_FILE
  92. if test 2374 -ne `wc -c <'UPDATE0'`; then
  93.     echo shar: \"'UPDATE0'\" unpacked with wrong size!
  94. fi
  95. # end of 'UPDATE0'
  96. fi
  97. if test -f 'dat/oracle.des' -a "${1}" != "-c" ; then 
  98.   echo shar: Will not clobber existing file \"'dat/oracle.des'\"
  99. else
  100. echo shar: Extracting \"'dat/oracle.des'\" \(1446 characters\)
  101. sed "s/^X//" >'dat/oracle.des' <<'END_OF_FILE'
  102. X#
  103. X# Oracle level
  104. X#
  105. X
  106. XLEVEL: "oracle"
  107. X
  108. XROOM: "ordinary" , lit, (3,3), (center,center), (11,9)
  109. XNAME: "central"
  110. XOBJECT:'`',"statue",(0,0),"forest centaur",0
  111. XOBJECT:'`',"statue",(0,8),"mountain centaur",0
  112. XOBJECT:'`',"statue",(10,0),"mountain centaur",0
  113. XOBJECT:'`',"statue",(10,8),"forest centaur",0
  114. XOBJECT:'`',"statue",(5,1),"plains centaur",0
  115. XOBJECT:'`',"statue",(5,7),"plains centaur",0
  116. XOBJECT:'`',"statue",(2,4),"plains centaur",0
  117. XOBJECT:'`',"statue",(8,4),"plains centaur",0
  118. XMONSTER: random, random, random
  119. XMONSTER: random, random, random
  120. X
  121. XSUBROOM: "delphi" , lit , (4,3) , (3,3), "central"
  122. XFOUNTAIN: (0, 1)
  123. XFOUNTAIN: (1, 0)
  124. XFOUNTAIN: (1, 2)
  125. XFOUNTAIN: (2, 1)
  126. XMONSTER: '@', "oracle", (1,1)
  127. XDOOR: false , nodoor , random, random
  128. X  
  129. XROOM: "ordinary" , random, random, random, random
  130. XSTAIR: random, up
  131. XOBJECT: random,random,random
  132. X
  133. XROOM: "ordinary" , random, random, random, random
  134. XSTAIR: random, down
  135. XOBJECT: random, random, random
  136. XTRAP: random, random
  137. XMONSTER: random, random, random
  138. XMONSTER: random, random, random
  139. X
  140. XROOM: "ordinary" , random, random, random, random
  141. XOBJECT: random, random, random
  142. XOBJECT: random, random, random
  143. XMONSTER: random, random, random
  144. X
  145. XROOM: "ordinary" , random, random, random, random
  146. XOBJECT: random, random, random
  147. XTRAP: random, random
  148. XMONSTER: random, random, random
  149. X
  150. XROOM: "ordinary" , random, random, random, random
  151. XOBJECT: random, random, random
  152. XTRAP: random, random
  153. XMONSTER: random, random, random
  154. X
  155. XRANDOM_CORRIDORS
  156. END_OF_FILE
  157. if test 1446 -ne `wc -c <'dat/oracle.des'`; then
  158.     echo shar: \"'dat/oracle.des'\" unpacked with wrong size!
  159. fi
  160. # end of 'dat/oracle.des'
  161. fi
  162. if test -f 'include/artifact.h' -a "${1}" != "-c" ; then 
  163.   echo shar: Will not clobber existing file \"'include/artifact.h'\"
  164. else
  165. echo shar: Extracting \"'include/artifact.h'\" \(2729 characters\)
  166. sed "s/^X//" >'include/artifact.h' <<'END_OF_FILE'
  167. X/*    SCCS Id: @(#)artifact.h    3.1    92/11/01    */
  168. X/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  169. X/* NetHack may be freely redistributed.  See license for details. */
  170. X
  171. X#ifndef ARTIFACT_H
  172. X#define ARTIFACT_H
  173. X
  174. X#define SPFX_NONE   0x0000000    /* no special effects, just a bonus */
  175. X#define SPFX_NOGEN  0x0000001    /* item is special, bequeathed by gods */
  176. X#define SPFX_RESTR  0x0000002    /* item is restricted - can't be named */
  177. X#define SPFX_INTEL  0x0000004    /* item is self-willed - intelligent */
  178. X#define SPFX_SPEEK  0x0000008    /* item can speak */
  179. X#define SPFX_SEEK   0x0000010    /* item helps you search for things */
  180. X#define SPFX_WARN   0x0000020    /* item warns you of danger */
  181. X#define SPFX_ATTK   0x0000040    /* item has a special attack (attk) */
  182. X#define SPFX_DEFN   0x0000080    /* item has a special defence (defn) */
  183. X#define SPFX_DRLI   0x0000100    /* drains a level from monsters */
  184. X#define SPFX_SEARCH 0x0000200    /* helps searching */
  185. X#define SPFX_BEHEAD 0x0000400    /* beheads monsters */
  186. X#define SPFX_HALRES 0x0000800    /* blocks hallucinations */
  187. X#define SPFX_ESP    0x0001000    /* ESP (like amulet of ESP) */
  188. X#define SPFX_STLTH  0x0002000    /* Stealth */
  189. X#define SPFX_REGEN  0x0004000    /* Regeneration */
  190. X#define SPFX_EREGEN 0x0008000    /* Energy Regeneration */
  191. X#define SPFX_HSPDAM 0x0010000    /* 1/2 spell damage (on player) in combat */
  192. X#define SPFX_HPHDAM 0x0020000    /* 1/2 physical damage (on player) in combat */
  193. X#define SPFX_TCTRL  0x0040000    /* Teleportation Control */
  194. X#define SPFX_LUCK   0x0080000    /* Increase Luck (like Luckstone) */
  195. X#define SPFX_DMONS  0x0100000    /* attack bonus on one monster type */
  196. X#define SPFX_DCLAS  0x0200000    /* attack bonus on monsters w/ symbol mtype */
  197. X#define SPFX_DFLAG1 0x0400000    /* attack bonus on monsters w/ mflags1 flag */
  198. X#define SPFX_DFLAG2 0x0800000    /* attack bonus on monsters w/ mflags2 flag */
  199. X#define SPFX_DALIGN 0x1000000    /* attack bonus on non-aligned monsters  */
  200. X
  201. X#define SPFX_DBONUS 0x1F00000    /* attack bonus mask */
  202. X
  203. Xstruct artifact {
  204. X    unsigned    otyp;
  205. X    const char  *name;
  206. X    unsigned long spfx;    /* special effect from wielding/wearing */
  207. X    unsigned long cspfx;    /* special effect just from carrying obj */
  208. X    unsigned long mtype;    /* monster type, symbol, or flag */
  209. X    struct attack attk, defn, cary;
  210. X    uchar        inv_prop;    /* property obtained by invoking artifact */
  211. X    aligntyp    alignment;    /* alignment of bequeathing gods */
  212. X    char        class;    /* character class associated with */
  213. X};
  214. X
  215. X/* invoked properties with special powers */
  216. X#define TAMING        (LAST_PROP+1)
  217. X#define HEALING        (LAST_PROP+2)
  218. X#define ENERGY_BOOST    (LAST_PROP+3)
  219. X#define UNTRAP        (LAST_PROP+4)
  220. X#define CHARGE_OBJ    (LAST_PROP+5)
  221. X#define LEV_TELE    (LAST_PROP+6)
  222. X#define CREATE_PORTAL    (LAST_PROP+7)
  223. X
  224. X#endif /* ARTIFACT_H */
  225. END_OF_FILE
  226. if test 2729 -ne `wc -c <'include/artifact.h'`; then
  227.     echo shar: \"'include/artifact.h'\" unpacked with wrong size!
  228. fi
  229. # end of 'include/artifact.h'
  230. fi
  231. if test -f 'include/permonst.h' -a "${1}" != "-c" ; then 
  232.   echo shar: Will not clobber existing file \"'include/permonst.h'\"
  233. else
  234. echo shar: Extracting \"'include/permonst.h'\" \(2130 characters\)
  235. sed "s/^X//" >'include/permonst.h' <<'END_OF_FILE'
  236. X/*    SCCS Id: @(#)permonst.h 3.1    92/11/21    */
  237. X/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  238. X/* NetHack may be freely redistributed.  See license for details. */
  239. X
  240. X#ifndef PERMONST_H
  241. X#define PERMONST_H
  242. X
  243. X/*    This structure covers all attack forms.
  244. X *    aatyp is the gross attack type (eg. claw, bite, breath, ...)
  245. X *    adtyp is the damage type (eg. physical, fire, cold, spell, ...)
  246. X *    damn is the number of hit dice of damage from the attack.
  247. X *    damd is the number of sides on each die.
  248. X *
  249. X *    Some attacks can do no points of damage.  Additionally, some can
  250. X *    have special effects *and* do damage as well.  If damn and damd
  251. X *    are set, they may have a special meaning.  For example, if set
  252. X *    for a blinding attack, they determine the amount of time blinded.
  253. X */
  254. X
  255. Xstruct attack {
  256. X    uchar        aatyp;
  257. X    uchar        adtyp, damn, damd;
  258. X};
  259. X
  260. X/*    Max # of attacks for any given monster.
  261. X */
  262. X
  263. X#define NATTK        6
  264. X
  265. X/*    Weight of a human body
  266. X */
  267. X
  268. X#define WT_HUMAN    1450
  269. X
  270. X#include "monattk.h"
  271. X#include "monflag.h"
  272. X#ifndef ALIGN_H
  273. X#include "align.h"
  274. X#endif
  275. X
  276. Xstruct permonst {
  277. X    const char    *mname;            /* full name */
  278. X    char        mlet;            /* symbol */
  279. X    schar        mlevel,            /* base monster level */
  280. X            mmove,            /* move speed */
  281. X            ac,            /* (base) armor class */
  282. X            mr;            /* (base) magic resistance */
  283. X    aligntyp    maligntyp;        /* basic monster alignment */
  284. X    unsigned    geno;            /* creation/geno mask value */
  285. X    struct    attack    mattk[NATTK];        /* attacks matrix */
  286. X    unsigned short    cwt,            /* weight of corpse */
  287. X            cnutrit;        /* its nutritional value */
  288. X    short        pxlth;            /* length of extension */
  289. X    uchar        msound;            /* noise it makes (6 bits) */
  290. X    uchar        msize;            /* physical size (3 bits) */
  291. X    uchar        mresists;        /* resistances */
  292. X    uchar        mconveys;        /* conveyed by eating */
  293. X    long        mflags1,        /* boolean bitflags */
  294. X            mflags2;        /* more boolean bitflags */
  295. X    uchar        mflags3;        /* yet more boolean bitflags */
  296. X# ifdef TEXTCOLOR
  297. X    uchar        mcolor;            /* color to use */
  298. X# endif
  299. X};
  300. X
  301. Xextern struct permonst
  302. X    NEARDATA    mons[];        /* the master list of monster types */
  303. Xextern struct permonst NEARDATA playermon, NEARDATA *uasmon;
  304. X                        /* you in the same terms */
  305. X
  306. X#endif /* PERMONST_H */
  307. END_OF_FILE
  308. if test 2130 -ne `wc -c <'include/permonst.h'`; then
  309.     echo shar: \"'include/permonst.h'\" unpacked with wrong size!
  310. fi
  311. # end of 'include/permonst.h'
  312. fi
  313. if test -f 'include/qtext.h' -a "${1}" != "-c" ; then 
  314.   echo shar: Will not clobber existing file \"'include/qtext.h'\"
  315. else
  316. echo shar: Extracting \"'include/qtext.h'\" \(2273 characters\)
  317. sed "s/^X//" >'include/qtext.h' <<'END_OF_FILE'
  318. X/*    SCCS Id: @(#)qtext.h    3.1    92/01/22    */
  319. X/* Copyright (c) Mike Stephenson 1991.                  */
  320. X/* NetHack may be freely redistributed.  See license for details. */
  321. X
  322. X#ifdef MULDGN
  323. X#ifndef QTEXT_H
  324. X#define QTEXT_H
  325. X
  326. X#define N_HDR    13        /* number of classes + 1 */
  327. X#define COMMON_ID    '-'    /* common message id value */
  328. X
  329. Xstruct qtmsg {
  330. X    int    msgnum;
  331. X    char    delivery;
  332. X    long    offset,
  333. X        size;
  334. X};
  335. X
  336. X#ifdef MAKEDEFS_C
  337. X
  338. X#define N_MSG    100        /* arbitrary */
  339. X
  340. Xstruct msghdr {
  341. X    int    n_msg;
  342. X    struct    qtmsg    qt_msg[N_MSG];
  343. X};
  344. X
  345. Xstruct    qthdr {
  346. X    int    n_hdr;
  347. X    char    id[N_HDR];
  348. X    long    offset[N_HDR];
  349. X};
  350. X
  351. X/* Error message macros */
  352. X#define CREC_IN_MSG    "Control record encountered during message - line %d\n"
  353. X#define DUP_MSG        "Duplicate message number at line %d\n"
  354. X#define END_NOT_IN_MSG    "End record encountered before message - line %d\n"
  355. X#define UNREC_CREC    "Unrecognized Control record at line %d\n"
  356. X#define OUT_OF_HEADERS    "Too many message types (line %d)\nAdjust N_HDR in qtext.h and recompile.\n"
  357. X#define OUT_OF_MESSAGES    "Too many messages in class (line %d)\nAdjust N_MSG in qtext.h and recompile.\n"
  358. X
  359. X#else    /* !MAKEDEFS_C */
  360. X
  361. Xstruct    qtlists {
  362. X    struct    qtmsg    *common,
  363. X            *chclass;
  364. X};
  365. X
  366. X
  367. X/*
  368. X *    Quest message defines.  Used in quest.c to trigger off "realistic"
  369. X *    dialogue to the player.
  370. X */
  371. X#define QT_FIRSTTIME     1
  372. X#define QT_NEXTTIME     2
  373. X#define QT_OTHERTIME     3
  374. X
  375. X#define QT_GUARDTALK     5    /* 5 random things for guards to say */
  376. X
  377. X#define QT_FIRSTLEADER    10
  378. X#define QT_NEXTLEADER    11
  379. X#define QT_OTHERLEADER    12
  380. X#define QT_LASTLEADER    13
  381. X#define QT_BADLEVEL    14
  382. X#define QT_BADALIGN    15
  383. X#define QT_ASSIGNQUEST    16
  384. X
  385. X#define QT_ENCOURAGE    20    /* 1-10 random encouragement messages */
  386. X
  387. X#define QT_FIRSTLOCATE    30
  388. X#define QT_NEXTLOCATE    31
  389. X
  390. X#define QT_FIRSTGOAL    40
  391. X#define QT_NEXTGOAL    41
  392. X
  393. X#define QT_FIRSTNEMESIS    50
  394. X#define QT_NEXTNEMESIS    51
  395. X#define QT_OTHERNEMESIS    52
  396. X#define QT_NEMWANTSIT    53    /* you somehow got the artifact */
  397. X
  398. X#define QT_DISCOURAGE    60    /* 1-10 random maledictive messages */
  399. X
  400. X#define QT_GOTIT    70
  401. X
  402. X#define QT_KILLEDNEM    80
  403. X#define QT_OFFEREDIT    81
  404. X
  405. X#define QT_POSTHANKS    90
  406. X#define QT_HASAMULET    91
  407. X
  408. X/*
  409. X *    Message defines for common text used in maledictions.
  410. X */
  411. X#define QT_ANGELIC    10
  412. X#define QTN_ANGELIC    10
  413. X
  414. X#define QT_DEMONIC    30
  415. X#define QTN_DEMONIC    20
  416. X
  417. X#endif    /* MAKEDEFS_C */
  418. X
  419. X#endif /* QTEXT_H */
  420. X#endif /* MULDGN */
  421. END_OF_FILE
  422. if test 2273 -ne `wc -c <'include/qtext.h'`; then
  423.     echo shar: \"'include/qtext.h'\" unpacked with wrong size!
  424. fi
  425. # end of 'include/qtext.h'
  426. fi
  427. if test -f 'include/quest.h' -a "${1}" != "-c" ; then 
  428.   echo shar: Will not clobber existing file \"'include/quest.h'\"
  429. else
  430. echo shar: Extracting \"'include/quest.h'\" \(1577 characters\)
  431. sed "s/^X//" >'include/quest.h' <<'END_OF_FILE'
  432. X/*    SCCS Id: @(#)quest.h    3.1    92/11/15    */
  433. X/* Copyright (c) Mike Stephenson 1991.                  */
  434. X/* NetHack may be freely redistributed.  See license for details. */
  435. X
  436. X#ifdef MULDGN
  437. X#ifndef QUEST_H
  438. X#define QUEST_H
  439. X
  440. Xstruct q_score {            /* Quest "scorecard" */
  441. X    Bitfield(first_start,1);    /* only set the first time */
  442. X    Bitfield(met_leader,1);        /* has met the leader */
  443. X    Bitfield(not_ready,3);        /* rejected due to alignment, etc. */
  444. X    Bitfield(pissed_off,1);        /* got the leader angry */
  445. X    Bitfield(got_quest,1);        /* got the quest assignment */
  446. X
  447. X    Bitfield(first_locate,1);    /* only set the first time */
  448. X    Bitfield(met_intermed,1);    /* used if the locate is a person. */
  449. X    Bitfield(got_final,1);        /* got the final quest assignment */
  450. X
  451. X    Bitfield(made_goal,3);        /* # of times on goal level */
  452. X    Bitfield(met_nemesis,1);    /* has met the nemesis before */
  453. X    Bitfield(killed_nemesis,1);    /* set when the nemesis is killed */
  454. X    Bitfield(in_battle,1);        /* set when nemesis fighting you */
  455. X
  456. X    Bitfield(cheater,1);        /* set if cheating detected */
  457. X    Bitfield(touched_artifact,1);    /* for a special message */
  458. X    Bitfield(offered_artifact,1);    /* offered to leader */
  459. X    Bitfield(got_thanks,1);        /* final message from leader */
  460. X};
  461. X
  462. X#define MAX_QUEST_TRIES     7    /* exceed this and you "fail" */
  463. X#define MIN_QUEST_ALIGN    20    /* at least this align.record to start */
  464. X  /* note: align 20 matches "pious" as reported by enlightenment (cmd.c) */
  465. X#define MIN_QUEST_LEVEL    14    /* at least this u.ulevel to start */
  466. X  /* note: exp.lev. 14 is threshold level for 5th rank (class title, botl.c) */
  467. X
  468. X#endif /* QUEST_H */
  469. X#endif /* MULDGN */
  470. END_OF_FILE
  471. if test 1577 -ne `wc -c <'include/quest.h'`; then
  472.     echo shar: \"'include/quest.h'\" unpacked with wrong size!
  473. fi
  474. # end of 'include/quest.h'
  475. fi
  476. if test -f 'include/termcap.h' -a "${1}" != "-c" ; then 
  477.   echo shar: Will not clobber existing file \"'include/termcap.h'\"
  478. else
  479. echo shar: Extracting \"'include/termcap.h'\" \(1489 characters\)
  480. sed "s/^X//" >'include/termcap.h' <<'END_OF_FILE'
  481. X/*    SCCS Id: @(#)termcap.h    3.1    92/10/21    */
  482. X/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1989. */
  483. X/* NetHack may be freely redistributed.  See license for details. */
  484. X
  485. X/* common #defines for print.c and termcap.c */
  486. X
  487. X#ifndef TERMCAP_H
  488. X#define TERMCAP_H
  489. X
  490. X#ifndef MICRO
  491. X#  define TERMLIB    /* include termcap code */
  492. X#endif
  493. X
  494. X/* might display need graphics code? */
  495. X#if !defined(AMIGA) && !defined(TOS)
  496. X# if defined(TERMLIB) || defined(OS2) || defined(MSDOS)
  497. X#  define ASCIIGRAPH
  498. X# endif
  499. X#endif
  500. X
  501. X#ifndef DECL_H
  502. Xextern struct tc_gbl_data {   /* also declared in decl.h; defined in decl.c */
  503. X    char *tc_AS, *tc_AE;    /* graphics start and end (tty font swapping) */
  504. X    int   tc_LI,  tc_CO;    /* lines and columns */
  505. X} tc_gbl_data;
  506. X#define AS tc_gbl_data.tc_AS
  507. X#define AE tc_gbl_data.tc_AE
  508. X#define LI tc_gbl_data.tc_LI
  509. X#define CO tc_gbl_data.tc_CO
  510. X#endif
  511. X
  512. Xextern struct tc_lcl_data {   /* defined and set up in termcap.c */
  513. X    char *tc_CM, *tc_ND, *tc_CD;
  514. X    char *tc_HI, *tc_HE, *tc_US, *tc_UE;
  515. X    boolean tc_ul_hack;
  516. X} tc_lcl_data;
  517. X#define CM tc_lcl_data.tc_CM
  518. X#define ND tc_lcl_data.tc_ND
  519. X#define CD tc_lcl_data.tc_CD
  520. X#define HI tc_lcl_data.tc_HI
  521. X#define HE tc_lcl_data.tc_HE
  522. X#define US tc_lcl_data.tc_US
  523. X#define UE tc_lcl_data.tc_UE
  524. X#define ul_hack tc_lcl_data.tc_ul_hack
  525. X
  526. Xextern short ospeed;        /* set up in termcap.c */
  527. X
  528. X#ifdef TEXTCOLOR
  529. X# ifdef TOS
  530. Xextern const char *hilites[MAXCOLORS];
  531. X# else
  532. Xextern char NEARDATA *hilites[MAXCOLORS];
  533. X# endif
  534. X#endif
  535. X
  536. X#endif /* TERMCAP_H */
  537. END_OF_FILE
  538. if test 1489 -ne `wc -c <'include/termcap.h'`; then
  539.     echo shar: \"'include/termcap.h'\" unpacked with wrong size!
  540. fi
  541. # end of 'include/termcap.h'
  542. fi
  543. if test -f 'include/tosconf.h' -a "${1}" != "-c" ; then 
  544.   echo shar: Will not clobber existing file \"'include/tosconf.h'\"
  545. else
  546. echo shar: Extracting \"'include/tosconf.h'\" \(1892 characters\)
  547. sed "s/^X//" >'include/tosconf.h' <<'END_OF_FILE'
  548. X/*    SCCS Id: @(#)tosconf.h    3.1    90/22/02    */
  549. X/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  550. X/* NetHack may be freely redistributed.  See license for details. */
  551. X
  552. X#ifdef TOS
  553. X#ifndef TOSCONF_H
  554. X#define TOSCONF_H
  555. X
  556. X#define MICRO        /* must be defined to allow some inclusions */
  557. X
  558. X/*
  559. X   Adjust these options to suit your compiler. The default here is for
  560. X   GNU C with the MiNT library.
  561. X*/
  562. X
  563. X/*#define NO_SIGNAL        /* library doesn't support signals    */
  564. X/*#define NO_FSTAT        /* library doesn't have fstat() call    */
  565. X#define MINT            /* library supports MiNT extensions to TOS */
  566. X
  567. X#ifdef __MINT__
  568. X#define MINT
  569. X#endif
  570. X
  571. X#ifdef O_BINARY
  572. X#define FCMASK     O_BINARY
  573. X#else
  574. X#define FCMASK    0660
  575. X#define O_BINARY 0
  576. X#endif
  577. X
  578. X#ifdef UNIXDEBUG
  579. X#define remove(x)    unlink(x)
  580. X#endif
  581. X
  582. X/* configurable options */
  583. X#define MFLOPPY            /* floppy support        */
  584. X#define RANDOM            /* improved random numbers     */
  585. X#define SHELL            /* allow spawning of shell     */
  586. X#define TERMLIB            /* use termcap            */
  587. X#define TEXTCOLOR        /* allow color             */
  588. X#ifdef MINT
  589. X#define SUSPEND            /* allow suspending the game    */
  590. X#endif
  591. X
  592. X#ifndef TERMLIB
  593. X#define ANSI_DEFAULT        /* use vt52 by default        */
  594. X#endif
  595. X
  596. X#if defined(__GNUC__) || defined(__TURBOC__) || defined(__MINT__)
  597. X/* actually, only more recent GNU C libraries have strcmpi
  598. X * on the other hand, they're free -- if yours is out of
  599. X * date, grab the most recent from atari.archive.umich.edu
  600. X */
  601. X#define STRNCMPI
  602. X#undef strcmpi
  603. Xextern int FDECL(strcmpi,(const char *, const char *));
  604. Xextern int FDECL(strncmpi,(const char *, const char *, size_t));
  605. X#endif
  606. X
  607. X#ifndef MICRO_H
  608. X#include "micro.h"
  609. X#endif
  610. X#ifndef PCCONF_H
  611. X#include "pcconf.h"          /* remainder of stuff is same as the PC */
  612. X#endif
  613. X
  614. X#ifdef TEXTCOLOR
  615. Xextern boolean colors_changed;    /* in tos.c */
  616. X#endif
  617. X
  618. X#ifdef __GNUC__
  619. X#define GCC_BUG        /* correct a gcc bug involving double for loops */
  620. X#endif
  621. X
  622. X#endif /* TOSCONF_H */
  623. X#endif /* TOS */
  624. END_OF_FILE
  625. if test 1892 -ne `wc -c <'include/tosconf.h'`; then
  626.     echo shar: \"'include/tosconf.h'\" unpacked with wrong size!
  627. fi
  628. # end of 'include/tosconf.h'
  629. fi
  630. if test -f 'include/winami.h' -a "${1}" != "-c" ; then 
  631.   echo shar: Will not clobber existing file \"'include/winami.h'\"
  632. else
  633. echo shar: Extracting \"'include/winami.h'\" \(2745 characters\)
  634. sed "s/^X//" >'include/winami.h' <<'END_OF_FILE'
  635. X/*    SCCS Id: @(#)winami.h    3.1    93/01/17    */
  636. X/* Copyright (c) Kenneth Lorber, Bethesda, Maryland, 1991. */
  637. X/* Copyright (c) Gregg Wonderly, Naperville, Illinois, 1992, 1993. */
  638. X/* NetHack may be freely redistributed.  See license for details. */
  639. X
  640. X#ifndef WINAMI_H
  641. X#define WINAMI_H
  642. X
  643. X/* descriptor for Amiga Intuition-based windows.  If we decide to cope with
  644. X * tty-style windows also, then things will need to change. */
  645. X/* per-window data */
  646. Xstruct WinDesc {
  647. X    xchar type;            /* type of window */
  648. X    boolean active;        /* true if window is active */
  649. X    xchar offx, offy;        /* offset from topleft of display */
  650. X    short rows, cols;        /* dimensions */
  651. X    short curx, cury;        /* current cursor position */
  652. X    short maxrow, maxcol;    /* the maximum size used -- for INVEN wins */
  653. X                /* maxcol is also used by WIN_MESSAGE for */
  654. X                /* tracking the ^P command */
  655. X    char **data;        /* window data [row][column] */
  656. X    char *resp;            /* valid menu responses (for NHW_INVEN) */
  657. X    char *canresp;        /* cancel responses; 1st is the return value */
  658. X    char *morestr;        /* string to display instead of default */
  659. X/* amiga stuff */
  660. X    struct Window *win;        /* Intuition window pointer */
  661. X#ifdef    INTUI_NEW_LOOK
  662. X    struct ExtNewWindow *newwin;    /* NewWindow alloc'd */
  663. X#else
  664. X    struct NewWindow *newwin;    /* ExtNewWindow alloc'd */
  665. X#endif
  666. X#define FLMAP_INGLYPH    1    /* An NHW_MAP window is in glyph mode */
  667. X#define FLMAP_CURSUP    2    /* An NHW_MAP window has the cursor displayed */
  668. X    long flags;
  669. X    short cursx, cursy;        /* Where the cursor is displayed at */
  670. X    short curs_apen,        /* Color cursor is displayed in */
  671. X      curs_bpen;
  672. X};
  673. X
  674. X/* descriptor for intuition-based displays -- all the per-display data */
  675. X/* this is a generic thing - think of it as Screen level */
  676. X
  677. Xstruct DisplayDesc {
  678. X/* we need this for Screen size (which will vary with display mode) */
  679. X    uchar rows, cols;        /* width & height of display in text units */
  680. X    short xpix, ypix;        /* width and height of display in pixels */
  681. X    int toplin;            /* flag for topl stuff */
  682. X    int rawprint;        /* number of raw_printed lines since synch */
  683. X    winid lastwin;        /* last window used for I/O */
  684. X};
  685. X
  686. Xtypedef enum {
  687. X    WEUNK, WEKEY, WEMOUSE, WEMENU,
  688. X} WETYPE;
  689. X
  690. Xtypedef struct WEVENT
  691. X{
  692. X    WETYPE type;
  693. X    union {
  694. X        int key;
  695. X        struct {
  696. X            int x, y;
  697. X            int qual;
  698. X        } mouse;
  699. X        long menucode;
  700. X    } u;
  701. X} WEVENT;
  702. X
  703. X#define MAXWIN 20        /* maximum number of windows, cop-out */
  704. X
  705. X/* port specific variable declarations */
  706. Xextern winid WIN_BASE;
  707. X#define NHW_BASE    6
  708. X
  709. Xextern struct WinDesc *wins[MAXWIN + 1];
  710. X
  711. Xextern struct DisplayDesc *amiIDisplay;    /* the Amiga Intuition descriptor */
  712. X
  713. Xextern char morc;        /* last character typed to xwaitforspace */
  714. Xextern char defmorestr[];    /* default --more-- prompt */
  715. X
  716. X#endif /* WINAMI_H */
  717. END_OF_FILE
  718. if test 2745 -ne `wc -c <'include/winami.h'`; then
  719.     echo shar: \"'include/winami.h'\" unpacked with wrong size!
  720. fi
  721. # end of 'include/winami.h'
  722. fi
  723. if test -f 'src/rnd.c' -a "${1}" != "-c" ; then 
  724.   echo shar: Will not clobber existing file \"'src/rnd.c'\"
  725. else
  726. echo shar: Extracting \"'src/rnd.c'\" \(2028 characters\)
  727. sed "s/^X//" >'src/rnd.c' <<'END_OF_FILE'
  728. X/*    SCCS Id: @(#)rnd.c    3.1    90/22/02
  729. X/* NetHack may be freely redistributed.  See license for details. */
  730. X
  731. X#include    "hack.h"
  732. X
  733. X#if defined(LINT) && defined(UNIX)    /* rand() is long... */
  734. Xextern int NDECL(rand);
  735. X#define RND(x)    (rand() % x)
  736. X#else /* LINT */
  737. X/* rand() is either random() or lrand48() - see config.h. */
  738. X#ifdef UNIX
  739. X#define RND(x)    (int)(Rand() % (long)(x))
  740. X#else
  741. X/* Good luck: the bottom order bits are cyclic. */
  742. X#define RND(x)    (int)((Rand()>>3) % (x))
  743. X#endif
  744. X#endif /* LINT */
  745. X
  746. X#ifdef OVL0
  747. X
  748. Xint
  749. Xrn2(x)        /* 0 <= rn2(x) < x */
  750. Xregister int x;
  751. X{
  752. X#ifdef DEBUG
  753. X    if (x == 0) {
  754. X        impossible("rn2(0) attempted");
  755. X        return(0);
  756. X    }
  757. X#endif
  758. X    return(RND(x));
  759. X}
  760. X
  761. X#endif /* OVL0 */
  762. X#ifdef OVLB
  763. X
  764. Xint
  765. Xrnl(x)        /* 0 <= rnl(x) < x; sometimes subtracting Luck */
  766. Xregister int x;    /* good luck approaches 0, bad luck approaches (x-1) */
  767. X{
  768. X    register int i;
  769. X
  770. X#ifdef DEBUG
  771. X    if (x == 0) {
  772. X        impossible("rnl(0) attempted");
  773. X        return(0);
  774. X    }
  775. X#endif
  776. X    i = RND(x);
  777. X
  778. X    if (Luck && rn2(50 - Luck)) {
  779. X        i -= (x <= 15 && Luck >= -5 ? Luck/3 : Luck);
  780. X        if (i < 0) i = 0;
  781. X        else if (i >= x) i = x-1;
  782. X    }
  783. X
  784. X    return i;
  785. X}
  786. X
  787. X#endif /* OVLB */
  788. X#ifdef OVL0
  789. X
  790. Xint
  791. Xrnd(x)        /* 1 <= rnd(x) <= x */
  792. Xregister int x;
  793. X{
  794. X#ifdef DEBUG
  795. X    if (x == 0) {
  796. X        impossible("rnd(0) attempted");
  797. X        return(1);
  798. X    }
  799. X#endif
  800. X    return(RND(x)+1);
  801. X}
  802. X
  803. X#endif /* OVL0 */
  804. X#ifdef OVL1
  805. X
  806. Xint
  807. Xd(n,x)        /* n <= d(n,x) <= (n*x) */
  808. Xregister int n, x;
  809. X{
  810. X    register int tmp = n;
  811. X
  812. X#ifdef DEBUG
  813. X    if (x == 0) {
  814. X        impossible("d(n,0) attempted");
  815. X        return(1);
  816. X    }
  817. X#endif
  818. X    while(n--) tmp += RND(x);
  819. X    return(tmp); /* Alea iacta est. -- J.C. */
  820. X}
  821. X
  822. X#endif /* OVL1 */
  823. X#ifdef OVLB
  824. X
  825. Xint
  826. Xrne(x)      /* by stewr 870807 */
  827. Xregister int x;
  828. X{
  829. X    register int tmp = 1;
  830. X    while(!rn2(x)) tmp++;
  831. X    return(min(tmp,(u.ulevel < 15) ? 5 : (int)u.ulevel/3));
  832. X}
  833. X
  834. Xint
  835. Xrnz(i)
  836. Xint i;
  837. X{
  838. X#ifdef LINT
  839. X    int x = i;
  840. X    int tmp = 1000;
  841. X#else
  842. X    register long x = i;
  843. X    register long tmp = 1000;
  844. X#endif
  845. X    tmp += rn2(1000);
  846. X    tmp *= rne(4);
  847. X    if (rn2(2)) { x *= tmp; x /= 1000; }
  848. X    else { x *= 1000; x /= tmp; }
  849. X    return((int)x);
  850. X}
  851. X
  852. X#endif /* OVLB */
  853. X
  854. X/*rnd.c*/
  855. END_OF_FILE
  856. if test 2028 -ne `wc -c <'src/rnd.c'`; then
  857.     echo shar: \"'src/rnd.c'\" unpacked with wrong size!
  858. fi
  859. # end of 'src/rnd.c'
  860. fi
  861. if test -f 'src/windows.c' -a "${1}" != "-c" ; then 
  862.   echo shar: Will not clobber existing file \"'src/windows.c'\"
  863. else
  864. echo shar: Extracting \"'src/windows.c'\" \(1473 characters\)
  865. sed "s/^X//" >'src/windows.c' <<'END_OF_FILE'
  866. X/*    SCCS Id: @(#)windows.c    3.1    93/01/08    */
  867. X/* Copyright (c) D. Cohrs, 1993. */
  868. X/* NetHack may be freely redistributed.  See license for details. */
  869. X
  870. X#include "hack.h"
  871. X#ifdef TTY_GRAPHICS
  872. X#include "wintty.h"
  873. X#endif
  874. X#ifdef X11_GRAPHICS
  875. X/* cannot just blindly include winX.h without including all of X11 stuff */
  876. X/* and must get the order of include files right.  Don't bother */
  877. Xextern struct window_procs X11_procs;
  878. Xextern void NDECL(win_X11_init);
  879. X#endif
  880. X#ifdef MAC
  881. Xextern struct window_procs mac_procs ;
  882. X#endif
  883. X#ifdef AMIGA_INTUITION
  884. Xextern struct window_procs amii_procs ;
  885. X#endif
  886. X
  887. Xstruct window_procs NEARDATA windowprocs;
  888. X
  889. Xstatic
  890. Xstruct win_choices {
  891. X    struct window_procs *procs;
  892. X    void NDECL((*ini_routine));        /* optional (can be 0) */
  893. X} winchoices[] = {
  894. X#ifdef TTY_GRAPHICS
  895. X    { &tty_procs, win_tty_init },
  896. X#endif
  897. X#ifdef X11_GRAPHICS
  898. X    { &X11_procs, win_X11_init },
  899. X#endif
  900. X#ifdef MAC
  901. X    { & mac_procs , NULL } ,
  902. X#endif
  903. X#ifdef AMIGA_INTUITION
  904. X    { & amii_procs , NULL } ,
  905. X#endif
  906. X    { 0, 0 }        /* must be last */
  907. X};
  908. X
  909. Xvoid
  910. Xchoose_windows(s)
  911. Xconst char *s;
  912. X{
  913. X    register int i;
  914. X
  915. X    for(i=0; winchoices[i].procs; i++)
  916. X    if (!strcmpi(s, winchoices[i].procs->name)) {
  917. X        windowprocs = *winchoices[i].procs;
  918. X        if (winchoices[i].ini_routine) (*winchoices[i].ini_routine)();
  919. X        return;
  920. X    }
  921. X
  922. X    raw_printf("Window type %s not recognized.  Choices are:", s);
  923. X    for(i=0; winchoices[i].procs; i++)
  924. X    raw_printf("        %s", winchoices[i].procs->name);
  925. X}
  926. X
  927. X/*windows.c*/
  928. END_OF_FILE
  929. if test 1473 -ne `wc -c <'src/windows.c'`; then
  930.     echo shar: \"'src/windows.c'\" unpacked with wrong size!
  931. fi
  932. # end of 'src/windows.c'
  933. fi
  934. if test -f 'sys/amiga/NHinfo.uu' -a "${1}" != "-c" ; then 
  935.   echo shar: Will not clobber existing file \"'sys/amiga/NHinfo.uu'\"
  936. else
  937. echo shar: Extracting \"'sys/amiga/NHinfo.uu'\" \(2167 characters\)
  938. sed "s/^X//" >'sys/amiga/NHinfo.uu' <<'END_OF_FILE'
  939. Xbegin 777 NetHack.info
  940. XMXQ```0``````=@`^`%``(@`&`0L``0`DT>``)4KX``````````````````0`
  941. XM```!!!@`)-O@`"69&(````"``````````````````)Q```````!0`"$``@`"
  942. XM_0@#```````````````````!`````````````P````````````,`````````
  943. XM```#`````````````P````````````,``!__@``````#``!U57```````P`!
  944. XMJJJH``````,``5557``````#``:JJJH``````P`%??WU``````,`!OJ[^P``
  945. XM```#``5O_=4``````P`&JJJK`````/L`!575U0'_[/_[``:OOJO_____XP`%
  946. XM5554>^```!L#_JZJJT%4F*=3'\5UWO7224```S`&N^^K!EPE]TL"M55556K6
  947. XMHL`#)6?___\#4Z^``SJG____X@`*E-,<D?____H#5*W3("L?___XR`<`<RO]
  948. XM[___Z.ZGW#,H(8#___.`>H(#%"$#?__`+`!-BP!!&/@/0`,D0!,V"`P,<WQX
  949. XM``9+*`%F`X!CG#F`ZW_________________________^P````````````,0!
  950. XM\$`(`````$#`#X`$``0`@!``P#\``$`@`@"``,!^`$``((``@(#$?A__L```
  951. XM`0``Q'_U57`!P````,(_JJJH8`@``0#`'5557`!`1```P`:JJJH!```"`,`5
  952. XM`0`%`````0#$1H**"R$#!@``Q@4!`%4``"```,`6JJJK`>@.LP#$%455%1``
  953. XM$P``P`:JHHH``````,$E5554``````#(!*JJJP``````P`4U`!4``````,`&
  954. XMJ`BK``````#`!5555```````P`?___\``````,````````````#`````````
  955. XM````P````````````,````````````#`````````````P````````````,``
  956. XM``````````#`````````````P````````````(```````````````````%``
  957. XM(0`"``1:T`,``````/_____________`````````````P````````````,``
  958. XM``````````#`````````````P````````````,````````````#`````````
  959. XM````P````````````,````````````#```/G@```````P`!^_>```````,``
  960. XM]SOX``````#``:_]W```````P`>JJJX`````^,`%5=74`?_L__C`!J^^JW__
  961. XM___@P`55551[X```&,-^KJJK0528IU#>!77>]=))0```\8:[[ZL&3"6W2,+5
  962. XM5555:M8BP`#D1____P-`#H``^V?____"``J4T-U!____Z@,4K=#@*Q___\B(
  963. XM!@!PZ]WH_\P([B?<,.@A@,$$<X!R``#4(`-$*T`D`$V(P$$8^`%``R1`$/8(
  964. XM#`QS;'@`!DCH`68#@&.<.8#H@```````````````````````````````````
  965. XM```#!`?X0`@`````0P`?_@0`!`"`$`,`/_\`0"`"`(`#`'__@``@@`"`@P1_
  966. XM_X`````!``,$?_^```'````#`C__``!@"``!`P`?_@```$!$``,`!_/G@`$`
  967. XM``(#`!!^_&`````!`P1`]PHX(0,&``,&`8$`7```(``#`!>JJJX!Z`ZS`P05
  968. XM1544$``3``,`!JJBB@`````#`255550``````P@$JJJK````"`,`!34`%0``
  969. XM```#``:H"*L```!``P`%5554`````(,`!____P`(`$`#````````$````P`0
  970. XM``````!```,````````!```#`"```````````P```````````@,``P````!"
  971. XM"``#`````````````P````````````,````````````#?____________P``
  972. XM`!!(86-K17AE.DYE=$AA8VL`````%````!%(04-+1$E2/4YE=$AA8VLZ````
  973. XM`!9,159%3%,]3F5T:&%C:SIL979E;',`````$E-!5D4]3F5T:&%C:SIS879E
  974. X3``````Y0051(/4YE=$AA8VLZ`'9E
  975. X`
  976. Xend
  977. END_OF_FILE
  978. if test 2167 -ne `wc -c <'sys/amiga/NHinfo.uu'`; then
  979.     echo shar: \"'sys/amiga/NHinfo.uu'\" unpacked with wrong size!
  980. fi
  981. # end of 'sys/amiga/NHinfo.uu'
  982. fi
  983. if test -f 'sys/amiga/amii.hlp' -a "${1}" != "-c" ; then 
  984.   echo shar: Will not clobber existing file \"'sys/amiga/amii.hlp'\"
  985. else
  986. echo shar: Extracting \"'sys/amiga/amii.hlp'\" \(2105 characters\)
  987. sed "s/^X//" >'sys/amiga/amii.hlp' <<'END_OF_FILE'
  988. X            Amiga specific help file for NetHack 3.1
  989. X
  990. XThe Amiga port of NetHack supports a number of additional commands
  991. Xand facilities specific to the Amiga.  Listed below are the things
  992. Xwhich are either specific to the Amiga port or might not appear
  993. Xin other ports.
  994. X
  995. XWhile playing NetHack you can press:
  996. X
  997. X        ALT-HELP                To activate the palette editing
  998. X                                requester.  Saved games include
  999. X                                these settings of the pens to allow
  1000. X                                the game to be resumed with the
  1001. X                                same palette at a later date.
  1002. X
  1003. XAmiga-specific run-time option:
  1004. X        flush                   throw away keyboard type-ahead
  1005. X
  1006. XRecognized ToolTypes entries include the following:
  1007. X
  1008. X        NAME=                   Character name.
  1009. X        SCORES                  Scores for all players.
  1010. X        SCORE=                  Scores for specified players.
  1011. X        CHARACTER=              Class of player (e.g. Rogue).
  1012. X        PENS=xxx,xxx,...        8 pen settings for game palette.
  1013. X        PATH=                   PATH for locating files.
  1014. X        OPTIONS=                Comma separated list of options.
  1015. X        HACKDIR=                Directory to play game in.
  1016. X        LEVELS=                 Where to store/create per level
  1017. X                                data files.
  1018. X        SAVE=                   Where to save games.
  1019. X        SCREEN=LACE|NOLACE      Whether or not to play on
  1020. X                                an interlaced screen.
  1021. X        CMDLINE=                CLI command line options
  1022. X                                can be specified here.
  1023. X
  1024. XCommand line options recognized are
  1025. X
  1026. X        -n                      No News at game startup.
  1027. X        -X                      Play in discovery mode.
  1028. X        -W                      Play as wizard.
  1029. X        -L                      Interlaced screen.
  1030. X        -l                      Never Interlaced screen.
  1031. X        -u                      Play as player given as
  1032. X                                an argument.
  1033. X        -?                      Gives command line usage.
  1034. X
  1035. END_OF_FILE
  1036. if test 2105 -ne `wc -c <'sys/amiga/amii.hlp'`; then
  1037.     echo shar: \"'sys/amiga/amii.hlp'\" unpacked with wrong size!
  1038. fi
  1039. # end of 'sys/amiga/amii.hlp'
  1040. fi
  1041. if test -f 'sys/amiga/dflticon.uu' -a "${1}" != "-c" ; then 
  1042.   echo shar: Will not clobber existing file \"'sys/amiga/dflticon.uu'\"
  1043. else
  1044. echo shar: Extracting \"'sys/amiga/dflticon.uu'\" \(1567 characters\)
  1045. sed "s/^X//" >'sys/amiga/dflticon.uu' <<'END_OF_FILE'
  1046. Xbegin 777 default.icon
  1047. XMXQ```0``````"@`/`%``&0`&`0H``0`V>1``-GJH``````````````````8`
  1048. XM```!!,P`(VS8`",5F(````"``````````````````,-0``````!0`!@``@``
  1049. XM;Z0#```````````````````!`````````````P````````````,'_@``````
  1050. XM```##_\&,`!'```'`P__!S``PP```P,/_P>QX?-AX>,S#_\&\S##L#,S8P_^
  1051. XM!G/PPS#S`\,#_`8S`-,S,S-C`?@&,>!G,=GG,P#_``````````,`?X``````
  1052. XM```#``?P`&&>``P``P``/@!ALP`<``,`_`<`,P,`#``#`_^'@#,.``P``P<`
  1053. XM`X`>`P`,``,#@`.`'C,,#``#`?Q_``P>##\``P`?_@````````,`````````
  1054. XM```#`````````````W_________________________^P````````````,``
  1055. XM``````````#`````````````P````````````,/\``````````#.9P``````
  1056. XM````SY\``````````,_^``````````###```````````P?@``````````,#_
  1057. XM``````````#`?X``````````P`?P`````````,``/@````````#`5`<`````
  1058. XM````PU0'@````````,<``X````````##@`.`````````P?Q_`````````,`?
  1059. XM_@````````#`````````````P````````````(```````````````````%``
  1060. XM&``"``/D3`,``````/____________[`````````````P````````````,``
  1061. XM``````````#```8P`$<```<`P/@',`##```#`,<SA['A\V'AXS#'SX;S,,.P
  1062. XM,S-@Q_\&<_##,/,#P,&,!C,`TS,S,V#`P`8QX&<QV><PP'```````````,`C
  1063. XM@`````````#`!_``89X`#```P%`^`&&S`!P``,-4!P`S`P`,``##``>`,PX`
  1064. XM#```QP`#@!X#``P``,.``X`>,PP,``#!_'\`#!X,/P``P!_^`````````,``
  1065. XM``````````#`````````````@`````````````````````````$`````````
  1066. XM```#`````````````P/_``````````,'_X`````````#!_^``````````P?_
  1067. XM@`````````,'_X`````````#!_\``````````P'\``````````,`_P``````
  1068. XM```#`'_@`````````P`_@`````````,`%_`````````#`/N^`````````P/_
  1069. XMAP````````,#``>````````#!P`#@````````P.``X````````,!_'\`````
  1070. XM```#`!_^`````````P````````````,````````````#?____________P``
  1071. XD``DO;F5T:&%C:P`````(````$4A!0TM$25(]3F5T2&%C:SH`
  1072. X`
  1073. Xend
  1074. END_OF_FILE
  1075. if test 1567 -ne `wc -c <'sys/amiga/dflticon.uu'`; then
  1076.     echo shar: \"'sys/amiga/dflticon.uu'\" unpacked with wrong size!
  1077. fi
  1078. # end of 'sys/amiga/dflticon.uu'
  1079. fi
  1080. if test -f 'sys/amiga/hackwb.hlp' -a "${1}" != "-c" ; then 
  1081.   echo shar: Will not clobber existing file \"'sys/amiga/hackwb.hlp'\"
  1082. else
  1083. echo shar: Extracting \"'sys/amiga/hackwb.hlp'\" \(2704 characters\)
  1084. sed "s/^X//" >'sys/amiga/hackwb.hlp' <<'END_OF_FILE'
  1085. XThe front end to NetHack, HackWB, provides a graphical
  1086. Xinterface to starting NetHack. Through some special features
  1087. Xprovided by 'splitter', HackWB also provides a faster game
  1088. Xrestart after the first game.
  1089. X
  1090. XWhen HackWB is first started, it will load the
  1091. XNetHack:NewGame.info icon and any icons in the SAVE
  1092. Xdirectory specified in the nethack.cnf file. To play, you
  1093. Xcan simply double click on the NewGame icon, or one of the
  1094. Xsaved game icons.
  1095. X
  1096. XThe NewGame icon can be populated with tooltypes entries
  1097. Xto tell NetHack how to configure the game for you.
  1098. XThe Project menu contains 2 things useful for configuring
  1099. XNetHack.  There is an "Edit Configuration" menu item
  1100. Xwhich allows you to override what is in the NetHack.cnf
  1101. Xfile.  The data in the requester brought up by this menu
  1102. Xitem is copied to the TOOLSTYPE entries of the NewGame
  1103. Xicon for subsequent games that are started by double
  1104. Xclicking on the NewGame icon.
  1105. X
  1106. XThe "Edit Default Game" selection is used to create new
  1107. Xcharacter preferences for subsequent games started by
  1108. Xdouble clicking on the NewGame icon. The initial requester
  1109. Xuses the "Player's Name:" string gadget contents to create
  1110. Xa file name which is <contents>.def.  When the game
  1111. Xfirst starts, WBDefaults.def is loaded.  When you type in
  1112. Xa character name and hit return, the definition associated
  1113. Xwith that file is loaded.
  1114. X
  1115. XFrom this requester, you can set the character's class
  1116. X(species, origin, whatever-your-term-is) by using the
  1117. XCharacter menu provided.  The selected 'class' is
  1118. Xdisplayed on the requester.  The options which are
  1119. Xusually selected in the OPTIONS= line in nethack.cnf
  1120. Xare accessed by clicking on the "Edit Options" gadget.
  1121. XSelect all of the various settings desired and close
  1122. Xthe requester by selecting Okay. Exit back out of
  1123. Xthese two requesters and any time that you double click
  1124. Xon the NewGame icon, the selected character and options
  1125. Xwill be copied into the NewGame icon.  That icon will
  1126. Xbe updated on disk and then passed to NetHack to tell
  1127. Xit how to configure the game.
  1128. X
  1129. XExisting games can be edited by selecting an icon with
  1130. Xa single click.  The "Game" menu will then become
  1131. Xungreyed.  The Game Menu has icon editing actions which
  1132. Xare...
  1133. X
  1134. XInfo            to browse through the icons tooltype
  1135. X                information.
  1136. XChange Comment  to edit the file comment.
  1137. XSet Options     to edit the OPTIONS string with the
  1138. X                requester.
  1139. XCopy Options    to create a new icon without a save file
  1140. X                which will allow you to play a similar
  1141. X                game under another name.
  1142. XDiscard         to remove the saved game/icon.
  1143. XRename          to change the icon name.
  1144. X
  1145. XOn the Project menu, there are other selections which
  1146. Xshould be self explanatory.
  1147. END_OF_FILE
  1148. if test 2704 -ne `wc -c <'sys/amiga/hackwb.hlp'`; then
  1149.     echo shar: \"'sys/amiga/hackwb.hlp'\" unpacked with wrong size!
  1150. fi
  1151. # end of 'sys/amiga/hackwb.hlp'
  1152. fi
  1153. if test -f 'sys/amiga/wbstruct.h' -a "${1}" != "-c" ; then 
  1154.   echo shar: Will not clobber existing file \"'sys/amiga/wbstruct.h'\"
  1155. else
  1156. echo shar: Extracting \"'sys/amiga/wbstruct.h'\" \(1950 characters\)
  1157. sed "s/^X//" >'sys/amiga/wbstruct.h' <<'END_OF_FILE'
  1158. X/*    SCCS Id: @(#)wbstruct.h   3.1    93/01/08
  1159. X/* Copyright (c) Kenneth Lorber, Bethesda, Maryland, 1992, 1993.  */
  1160. X/* NetHack may be freely redistributed.  See license for details. */
  1161. X
  1162. X/*
  1163. X * The NetHack WorkBench's typedef/struct definitions.
  1164. X */
  1165. Xtypedef unsigned char flag;
  1166. X
  1167. Xtypedef struct GAMEITEM
  1168. X{
  1169. X    struct DiskObject *dobj;    /* Icon structure pointer */
  1170. X    char
  1171. X    *gname,            /* Process name running this game */
  1172. X    *name,            /* name of icon without .info */
  1173. X    *dname,            /* Directory where save file is */
  1174. X    *fname;            /* File name on disk with .sav */
  1175. X    struct GAMEITEM *nextwgad;  /* Next in list current visible */
  1176. X    struct GAMEITEM *next;      /* Next in complete list */
  1177. X    struct Process *prc;        /* Process running this game */
  1178. X    struct MsgPort *port;       /* Port to send message to */
  1179. X    struct MsgPort *prcport;    /* Port for process termination */
  1180. X    long secs, mics;        /* Double click times */
  1181. X    long oact, oflag;        /* orig Flags and activation for diskobj */
  1182. X    struct WBStartup *wbs;    /* WorkBench startup message to send */
  1183. X    struct WBArg *wba;        /* WorkBench args */
  1184. X    char **otools;        /* Original dobj->do_ToolTypes pointer */
  1185. X    BPTR lock;            /* Lock on game file */
  1186. X    int toolcnt;        /* Number of pointers allocated in dobj */
  1187. X    BPTR seglist;        /* Seglist of loaded game */
  1188. X    flag talloc;        /* ToolTypes have been reallocated */
  1189. X    flag active;        /* Is this game active */
  1190. X} GAMEITEM, *GPTR;
  1191. X
  1192. Xtypedef struct OPTIONS
  1193. X{
  1194. X    char optval;        /* Options current boolean value */
  1195. X    char defval;        /* The default boolean value nethack assumes */
  1196. X    char *name;            /* Name of the option. */
  1197. X    char *optstr;        /* Options current string value or "" */
  1198. X    int id;            /* GadgetID of gadget manipulating this
  1199. X                 * options value.
  1200. X                 */
  1201. X} OPTIONS, *OPTR;
  1202. X
  1203. Xtypedef struct DEFAULTS
  1204. X{
  1205. X    int pltype;            /* Character class */
  1206. X    char *plname;        /* Players name */
  1207. X    char *options;        /* Preferred options string */
  1208. X} DEFAULTS;
  1209. END_OF_FILE
  1210. if test 1950 -ne `wc -c <'sys/amiga/wbstruct.h'`; then
  1211.     echo shar: \"'sys/amiga/wbstruct.h'\" unpacked with wrong size!
  1212. fi
  1213. # end of 'sys/amiga/wbstruct.h'
  1214. fi
  1215. if test -f 'sys/mac/macsnd.c' -a "${1}" != "-c" ; then 
  1216.   echo shar: Will not clobber existing file \"'sys/mac/macsnd.c'\"
  1217. else
  1218. echo shar: Extracting \"'sys/mac/macsnd.c'\" \(2302 characters\)
  1219. sed "s/^X//" >'sys/mac/macsnd.c' <<'END_OF_FILE'
  1220. X/*    SCCS Id: @(#)macsnd.c    3.1    92/11/28    */
  1221. X/*     Copyright (c) 1992 by Jon Watte */
  1222. X/* NetHack may be freely redistributed.  See license for details. */
  1223. X
  1224. X/*
  1225. X * This file contains music playing code.
  1226. X *
  1227. X * If we were REALLY determinated, we would make the sound play
  1228. X * asynchronously, but I'll save that one for a rainy day...
  1229. X *
  1230. X * This may break A/UX, since it defines MAC but we need to
  1231. X * check that the toolbox is booted. I'll defer that one too.
  1232. X *
  1233. X * - h+ 921128
  1234. X */
  1235. X
  1236. X#include "hack.h"
  1237. X#include <Sound.h>
  1238. X#include <Resources.h>
  1239. X
  1240. X#define SND_BUFFER(s) (&(*s)[20])
  1241. X#define SND_LEN(s) (GetHandleSize(s)-42)
  1242. X
  1243. Xvoid mac_speaker ( struct obj * instr , char * melody ) ;
  1244. X
  1245. Xvoid
  1246. Xmac_speaker ( struct obj * instr , char * melody )
  1247. X{
  1248. X    SndChannelPtr theChannel = NULL ;
  1249. X    SndCommand theCmd ;
  1250. X    Handle theSound ;
  1251. X    unsigned char theName [ 32 ] ;
  1252. X    char * n = ( char * ) & theName [ 1 ] ;
  1253. X    int typ = instr -> otyp ;
  1254. X    const char * actualn = OBJ_NAME ( objects [ typ ] ) ;
  1255. X
  1256. X    /*
  1257. X     * First: are we in the library ?
  1258. X     *
  1259. X     */
  1260. X    if ( flags . silent ) {
  1261. X
  1262. X        return ;
  1263. X    }
  1264. X
  1265. X    /*
  1266. X     * Is this a known instrument ?
  1267. X     *
  1268. X     */
  1269. X    strcpy ( n , actualn ) ;
  1270. X    theName [ 0 ] = strlen ( n ) ;
  1271. X    theSound = GetNamedResource ( 'snd ' , theName ) ;
  1272. X    if ( ! theSound ) {
  1273. X
  1274. X        return ;
  1275. X    }
  1276. X    HLock ( theSound ) ;
  1277. X
  1278. X    /*
  1279. X     * Set up the synth
  1280. X     *
  1281. X     */
  1282. X    if ( itworked ( SndNewChannel ( & theChannel , sampledSynth , initMono +
  1283. X        initNoInterp , ( void * ) NULL ) ) ) {
  1284. X
  1285. X        char midi_note [ ] = { 57 , 59 , 60 , 62 , 64 , 65 , 67 } ;
  1286. X
  1287. X        short err ;
  1288. X        short snd_len = SND_LEN ( theSound ) / 18 ;
  1289. X
  1290. X        theCmd . cmd = soundCmd ;
  1291. X        theCmd . param1 = 0 ;
  1292. X        theCmd . param2 = SND_BUFFER ( theSound ) ;
  1293. X        err = SndDoCommand ( theChannel , & theCmd , false ) ;
  1294. X
  1295. X    /*
  1296. X     * We rack 'em up all in a row
  1297. X     * The mac will play them correctly and then end, since
  1298. X     * we do a sync close below.
  1299. X     *
  1300. X     */
  1301. X        while ( * melody && ! err ) {
  1302. X
  1303. X            while ( * melody > 'G' ) {
  1304. X
  1305. X                * melody -= 8 ;
  1306. X            }
  1307. X            while ( * melody < 'A' ) {
  1308. X
  1309. X                * melody += 8 ;
  1310. X            }
  1311. X            theCmd . cmd = freqDurationCmd ;
  1312. X            theCmd . param1 = snd_len ;
  1313. X            theCmd . param2 = midi_note [ * melody - 'A' ] ;
  1314. X            err = SndDoCommand ( theChannel , & theCmd , false ) ;
  1315. X            melody ++ ;
  1316. X        }
  1317. X        SndDisposeChannel ( theChannel , false ) ;
  1318. X            /* Sync wait for completion */
  1319. X        ReleaseResource ( theSound ) ;
  1320. X
  1321. X        mustwork ( err ) ;
  1322. X    }
  1323. X}
  1324. END_OF_FILE
  1325. if test 2302 -ne `wc -c <'sys/mac/macsnd.c'`; then
  1326.     echo shar: \"'sys/mac/macsnd.c'\" unpacked with wrong size!
  1327. fi
  1328. # end of 'sys/mac/macsnd.c'
  1329. fi
  1330. if test -f 'sys/msdos/setup.bat' -a "${1}" != "-c" ; then 
  1331.   echo shar: Will not clobber existing file \"'sys/msdos/setup.bat'\"
  1332. else
  1333. echo shar: Extracting \"'sys/msdos/setup.bat'\" \(2012 characters\)
  1334. sed "s/^X//" >'sys/msdos/setup.bat' <<'END_OF_FILE'
  1335. Xecho off
  1336. XREM     SCCS Id: @(#)setup.bat   93/01/18
  1337. XREM     Copyright (c) NetHack PC Development Team 1990, 1991, 1992, 1993
  1338. X
  1339. XREM     NetHack may be freely redistributed.  See license for details.
  1340. X
  1341. XREM setup batch file for msdos, see Install.dos for details.
  1342. X
  1343. Xif not %1 .==. goto ok_parm
  1344. Xgoto err_set
  1345. X
  1346. X:ok_parm
  1347. Xecho Checking to see if directories are set up properly ...
  1348. Xif not exist ..\..\include\hack.h  goto err_dir
  1349. Xif not exist ..\..\src\hack.c      goto err_dir
  1350. Xif not exist ..\..\dat\wizard.des  goto err_dir
  1351. Xif not exist ..\..\util\makedefs.c goto err_dir
  1352. Xif not exist ..\share\lev_yacc.c   goto err_dir
  1353. Xecho Directories OK.
  1354. X
  1355. Xif %1 == MSC goto ok_msc
  1356. Xif %1 == msc goto ok_msc
  1357. Xif %1 == GCC goto ok_gcc
  1358. Xif %1 == gcc goto ok_gcc
  1359. Xgoto err_set
  1360. X
  1361. X:ok_gcc
  1362. Xecho Copying Makefiles.
  1363. Xecho "MakeGCC.src -> ..\..\src\makefile"
  1364. Xcopy makegcc.src ..\..\src\makefile
  1365. Xecho "MakeGCC.utl -> ..\..\util\makefile"
  1366. Xcopy makegcc.utl ..\..\util\makefile
  1367. Xecho "Makefile.dat -> ..\..\dat\makefile"
  1368. Xcopy makefile.dat ..\..\dat\makefile
  1369. Xgoto done
  1370. X
  1371. X:ok_msc
  1372. Xecho Setting Environment variables for Compiler.
  1373. Xset  CL= /AL /G2 /Oo /Gs /Gt18 /Zp1 /W0 /I..\include /nologo /DMOVERLAY
  1374. Xecho Copying Makefiles.
  1375. Xecho "MakeMSC.src -> ..\..\dat\makefile"
  1376. Xcopy makemsc.src ..\..\src\makefile
  1377. Xecho "MakeMSC.utl -> ..\..\dat\makefile"
  1378. Xcopy makemsc.utl ..\..\util\makefile
  1379. Xecho "Makefile.dat -> ..\..\dat\makefile"
  1380. Xcopy makefile.dat ..\..\dat\makefile
  1381. Xecho Copying in dungeon compiler files.
  1382. Xcopy ..\share\*.h    ..\..\include
  1383. Xcopy ..\share\lev*.c ..\..\util
  1384. Xcopy ..\share\dgn*.c ..\..\util
  1385. Xgoto done
  1386. X
  1387. X:err_set
  1388. Xecho Usage:
  1389. Xecho "%0 <MSC | GCC>"
  1390. Xecho -  Run this batch file with either MSC or GCC as the argument
  1391. Xecho    depending on which compiler you are using.
  1392. Xecho    Currently no support for the Borland set of compilers.
  1393. Xgoto end
  1394. X
  1395. X:err_dir
  1396. Xecho/
  1397. Xecho Your directories are not set up properly, please re-read the
  1398. Xecho Install.dos and README documentation.
  1399. Xgoto end
  1400. X
  1401. X:done
  1402. Xecho Setup Done!
  1403. Xecho Please continue with next step from Install.dos.
  1404. X
  1405. X:end
  1406. END_OF_FILE
  1407. if test 2012 -ne `wc -c <'sys/msdos/setup.bat'`; then
  1408.     echo shar: \"'sys/msdos/setup.bat'\" unpacked with wrong size!
  1409. fi
  1410. # end of 'sys/msdos/setup.bat'
  1411. fi
  1412. if test -f 'sys/share/lev_comp.h' -a "${1}" != "-c" ; then 
  1413.   echo shar: Will not clobber existing file \"'sys/share/lev_comp.h'\"
  1414. else
  1415. echo shar: Extracting \"'sys/share/lev_comp.h'\" \(1648 characters\)
  1416. sed "s/^X//" >'sys/share/lev_comp.h' <<'END_OF_FILE'
  1417. X
  1418. Xtypedef union 
  1419. X{
  1420. X    int    i;
  1421. X    char*    map;
  1422. X    struct {
  1423. X        xchar room;
  1424. X        xchar wall;
  1425. X        xchar door;
  1426. X    } corpos;
  1427. X} YYSTYPE;
  1428. Xextern YYSTYPE yylval;
  1429. X# define CHAR 257
  1430. X# define INTEGER 258
  1431. X# define BOOLEAN 259
  1432. X# define MESSAGE_ID 260
  1433. X# define MAZE_ID 261
  1434. X# define LEVEL_ID 262
  1435. X# define LEV_INIT_ID 263
  1436. X# define GEOMETRY_ID 264
  1437. X# define NOMAP_ID 265
  1438. X# define OBJECT_ID 266
  1439. X# define MONSTER_ID 267
  1440. X# define TRAP_ID 268
  1441. X# define DOOR_ID 269
  1442. X# define DRAWBRIDGE_ID 270
  1443. X# define MAZEWALK_ID 271
  1444. X# define WALLIFY_ID 272
  1445. X# define REGION_ID 273
  1446. X# define FILLING 274
  1447. X# define RANDOM_OBJECTS_ID 275
  1448. X# define RANDOM_MONSTERS_ID 276
  1449. X# define RANDOM_PLACES_ID 277
  1450. X# define ALTAR_ID 278
  1451. X# define LADDER_ID 279
  1452. X# define STAIR_ID 280
  1453. X# define NON_DIGGABLE_ID 281
  1454. X# define ROOM_ID 282
  1455. X# define PORTAL_ID 283
  1456. X# define TELEPRT_ID 284
  1457. X# define BRANCH_ID 285
  1458. X# define LEV 286
  1459. X# define CHANCE_ID 287
  1460. X# define CORRIDOR_ID 288
  1461. X# define GOLD_ID 289
  1462. X# define ENGRAVING_ID 290
  1463. X# define FOUNTAIN_ID 291
  1464. X# define POOL_ID 292
  1465. X# define SINK_ID 293
  1466. X# define NONE 294
  1467. X# define RAND_CORRIDOR_ID 295
  1468. X# define DOOR_STATE 296
  1469. X# define LIGHT_STATE 297
  1470. X# define CURSE_TYPE 298
  1471. X# define ENGRAVING_TYPE 299
  1472. X# define DIRECTION 300
  1473. X# define RANDOM_TYPE 301
  1474. X# define O_REGISTER 302
  1475. X# define M_REGISTER 303
  1476. X# define P_REGISTER 304
  1477. X# define A_REGISTER 305
  1478. X# define ALIGNMENT 306
  1479. X# define LEFT_OR_RIGHT 307
  1480. X# define CENTER 308
  1481. X# define TOP_OR_BOT 309
  1482. X# define ALTAR_TYPE 310
  1483. X# define UP_OR_DOWN 311
  1484. X# define SUBROOM_ID 312
  1485. X# define NAME_ID 313
  1486. X# define FLAGS_ID 314
  1487. X# define FLAG_TYPE 315
  1488. X# define MON_ATTITUDE 316
  1489. X# define MON_ALERTNESS 317
  1490. X# define MON_APPEARANCE 318
  1491. X# define STRING 319
  1492. X# define MAP_ID 320
  1493. END_OF_FILE
  1494. if test 1648 -ne `wc -c <'sys/share/lev_comp.h'`; then
  1495.     echo shar: \"'sys/share/lev_comp.h'\" unpacked with wrong size!
  1496. fi
  1497. # end of 'sys/share/lev_comp.h'
  1498. fi
  1499. if test -f 'sys/unix/Makefile.dat' -a "${1}" != "-c" ; then 
  1500.   echo shar: Will not clobber existing file \"'sys/unix/Makefile.dat'\"
  1501. else
  1502. echo shar: Extracting \"'sys/unix/Makefile.dat'\" \(1837 characters\)
  1503. sed "s/^X//" >'sys/unix/Makefile.dat' <<'END_OF_FILE'
  1504. X#    NetHack Makefile.
  1505. X#    SCCS Id: @(#)Makefile.dat    3.1    92/09/18
  1506. X
  1507. XVARDAT = data rumors quest.dat oracles options
  1508. X
  1509. Xall:    $(VARDAT) spec_levs quest_levs dungeon
  1510. X
  1511. X../util/makedefs:
  1512. X    (cd ../util ; make makedefs)
  1513. X
  1514. X../util/dgn_comp:
  1515. X    (cd ../util ; make dgn_comp)
  1516. X
  1517. X../util/lev_comp:
  1518. X    (cd ../util ; make lev_comp)
  1519. X
  1520. Xdata:    data.base ../util/makedefs
  1521. X    ../util/makedefs -d
  1522. X
  1523. Xrumors:    rumors.tru rumors.fal ../util/makedefs
  1524. X    ../util/makedefs -r
  1525. X
  1526. Xquest.dat:    quest.txt ../util/makedefs
  1527. X    ../util/makedefs -q
  1528. X
  1529. Xoracles:    oracles.txt ../util/makedefs
  1530. X    ../util/makedefs -h
  1531. X
  1532. X# note: 'options' should have already been made when include/date.h was created
  1533. Xoptions:    ../util/makedefs
  1534. X    ../util/makedefs -v
  1535. X
  1536. X
  1537. Xspec_levs: ../util/lev_comp \
  1538. X    bigroom.des castle.des endgame.des gehennom.des knox.des medusa.des \
  1539. X    mines.des oracle.des tower.des yendor.des
  1540. X    ../util/lev_comp bigroom.des
  1541. X    ../util/lev_comp castle.des
  1542. X    ../util/lev_comp endgame.des
  1543. X    ../util/lev_comp gehennom.des
  1544. X    ../util/lev_comp knox.des
  1545. X    ../util/lev_comp medusa.des
  1546. X    ../util/lev_comp mines.des
  1547. X    ../util/lev_comp oracle.des
  1548. X    ../util/lev_comp tower.des
  1549. X    ../util/lev_comp yendor.des
  1550. X    touch spec_levs
  1551. X
  1552. Xquest_levs: ../util/lev_comp \
  1553. X    Arch.des Barb.des Caveman.des Elf.des Healer.des Knight.des \
  1554. X    Priest.des Rogue.des Samurai.des Tourist.des Valkyrie.des Wizard.des
  1555. X    ../util/lev_comp Arch.des
  1556. X    ../util/lev_comp Barb.des
  1557. X    ../util/lev_comp Caveman.des
  1558. X    ../util/lev_comp Elf.des
  1559. X    ../util/lev_comp Healer.des
  1560. X    ../util/lev_comp Knight.des
  1561. X    ../util/lev_comp Priest.des
  1562. X    ../util/lev_comp Rogue.des
  1563. X    ../util/lev_comp Samurai.des
  1564. X    ../util/lev_comp Tourist.des
  1565. X    ../util/lev_comp Valkyrie.des
  1566. X    ../util/lev_comp Wizard.des
  1567. X    touch quest_levs
  1568. X
  1569. Xdungeon: dungeon.def ../util/makedefs ../util/dgn_comp
  1570. X    ../util/makedefs -e
  1571. X    ../util/dgn_comp dungeon.pdf
  1572. X
  1573. Xspotless:
  1574. X    -rm -f spec_levs quest_levs *.lev $(VARDAT) dungeon dungeon.pdf
  1575. END_OF_FILE
  1576. if test 1837 -ne `wc -c <'sys/unix/Makefile.dat'`; then
  1577.     echo shar: \"'sys/unix/Makefile.dat'\" unpacked with wrong size!
  1578. fi
  1579. # end of 'sys/unix/Makefile.dat'
  1580. fi
  1581. if test -f 'sys/vms/Makefile.doc' -a "${1}" != "-c" ; then 
  1582.   echo shar: Will not clobber existing file \"'sys/vms/Makefile.doc'\"
  1583. else
  1584. echo shar: Extracting \"'sys/vms/Makefile.doc'\" \(2248 characters\)
  1585. sed "s/^X//" >'sys/vms/Makefile.doc' <<'END_OF_FILE'
  1586. X#    NetHack Makefile (VMS) - for the [Unix] documentation.
  1587. X#    SCCS Id: @(#)Makefile.doc    3.1    93/01/06
  1588. X
  1589. X#  Copy this file to [.doc]Makefile. and edit it if needed.
  1590. X
  1591. XGUIDEBOOK = Guidebook.        # regular ASCII file
  1592. X#GUIDEBOOK = Guidebook.ps    # PostScript file
  1593. X#GUIDEBOOK = Guidebook.dvi    # TeX device-independent file
  1594. X
  1595. XALLDOCS = $(GUIDEBOOK)
  1596. X#ALLDOCS = $(GUIDEBOOK) manpages
  1597. X
  1598. XNOOP = !
  1599. X
  1600. XGuidebook :    $(GUIDEBOOK)
  1601. X    $(NOOP)
  1602. X
  1603. X# the basic guidebook
  1604. X#Guidebook. :    Guidebook.mn
  1605. X#    #tbl tmac.n Guidebook.mn | nroff | col > Guidebook
  1606. X#    write sys$output "Guidebook.mn cannot be processed under VMS."
  1607. XGuidebook. :    Guidebook.txt        # distributed version of plain text
  1608. X    copy Guidebook.txt Guidebook.
  1609. X
  1610. X# Fancier output for those with ditroff, psdit and a PostScript printer.
  1611. X#Guidebook.ps : Guidebook.mn
  1612. X#    #tbl tmac.n Guidebook.mn | ditroff | psdit > Guidebook.ps
  1613. X#    write sys$output "Guidebook.mn cannot be processed under VMS."
  1614. XGuidebook.ps :    Guidebook.dvi        # generated with LaTeX
  1615. X    dvi2ps Guidebook
  1616. X
  1617. X# Guidebook.tex is the same as Guidebook.mn but formatted with LaTeX.
  1618. X# - The invocation command for LaTeX may vary in different installations.
  1619. X# - To print Guidebook.dvi you need to use a suitable dvi-driver.
  1620. XGuidebook.dvi :  Guidebook.tex
  1621. X    latex Guidebook.tex
  1622. X
  1623. Xall : $(ALLDOCS)
  1624. X    $(NOOP)
  1625. X
  1626. XGAME    = nethack
  1627. XMANDIR    = HACKDIR:
  1628. XMANEXT    = man
  1629. X#MANDIR = /usr/man/man6
  1630. X#MANEXT = 6
  1631. X
  1632. X# manual non-installation; raw man pages may be better than nothing
  1633. XGAMEMANCREATE = copy nethack.6
  1634. XLEVMANCREATE = copy lev_comp.6
  1635. XDGNMANCREATE = copy dgn_comp.6
  1636. XRCVRMANCREATE = copy recover.6
  1637. X# GAMEMANCREATE = nroff -man nethack.6 >
  1638. X# LEVMANCREATE = nroff -man lev_comp.6 >
  1639. X# DGNMANCREATE = nroff -man dgn_comp.6 >
  1640. X# RCVRMANCREATE = nroff -man recover.6 >
  1641. X
  1642. Xmanpages :
  1643. X    - $(GAMEMANCREATE) $(MANDIR)$(GAME).$(MANEXT)
  1644. X    - $(LEVMANCREATE) $(MANDIR)lev_comp.$(MANEXT)
  1645. X    - $(DGNMANCREATE) $(MANDIR)dgn_comp.$(MANEXT)
  1646. X    - $(RCVRMANCREATE) $(MANDIR)recover.$(MANEXT)
  1647. X
  1648. Xspotless :
  1649. X    - if f$search("Guidebook.")   .nes."" then  delete Guidebook.;*
  1650. X    - if f$search("Guidebook.ps") .nes."" then  delete Guidebook.ps;*
  1651. X    - if f$search("Guidebook.dvi").nes."" then  delete Guidebook.dvi;*
  1652. X    - if f$search("Guidebook.aux").nes."" then  delete Guidebook.aux;*
  1653. X    - if f$search("Guidebook.log").nes."" then  delete Guidebook.log;*
  1654. END_OF_FILE
  1655. if test 2248 -ne `wc -c <'sys/vms/Makefile.doc'`; then
  1656.     echo shar: \"'sys/vms/Makefile.doc'\" unpacked with wrong size!
  1657. fi
  1658. # end of 'sys/vms/Makefile.doc'
  1659. fi
  1660. if test -f 'util/panic.c' -a "${1}" != "-c" ; then 
  1661.   echo shar: Will not clobber existing file \"'util/panic.c'\"
  1662. else
  1663. echo shar: Extracting \"'util/panic.c'\" \(1677 characters\)
  1664. sed "s/^X//" >'util/panic.c' <<'END_OF_FILE'
  1665. X/*    SCCS Id: @(#)panic.c    3.1    93/01/07    */
  1666. X/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  1667. X/* NetHack may be freely redistributed.  See license for details. */
  1668. X
  1669. X/*
  1670. X *    This code was adapted from the code in end.c to run in a standalone
  1671. X *    mode for the makedefs / drg code.
  1672. X */
  1673. X
  1674. X#define NEED_VARARGS
  1675. X#include    "config.h"
  1676. X
  1677. X#ifdef MICRO
  1678. X#undef exit
  1679. Xextern void FDECL(exit, (int));
  1680. X#endif
  1681. X#ifdef AZTEC
  1682. X#define abort() exit()
  1683. X#endif
  1684. X#ifdef VMS
  1685. Xextern void NDECL(vms_abort);
  1686. X#endif
  1687. X/*VARARGS1*/
  1688. Xboolean panicking;
  1689. Xvoid VDECL(panic, (char *,...));
  1690. X
  1691. Xvoid
  1692. Xpanic VA_DECL(char *,str)
  1693. X    VA_START(str);
  1694. X    VA_INIT(str, char *);
  1695. X    if(panicking++)
  1696. X#ifdef SYSV
  1697. X        (void)
  1698. X#endif
  1699. X        abort();    /* avoid loops - this should never happen*/
  1700. X
  1701. X    (void) fputs(" ERROR:  ", stderr);
  1702. X    Vfprintf(stderr, str, VA_ARGS);
  1703. X    (void) fflush(stderr);
  1704. X#if defined(UNIX) || defined(VMS)
  1705. X# ifdef SYSV
  1706. X        (void)
  1707. X# endif
  1708. X            abort();    /* generate core dump */
  1709. X#endif
  1710. X    VA_END();
  1711. X    exit(1);        /* redundant */
  1712. X    return;
  1713. X}
  1714. X
  1715. X#ifdef ALLOCA_HACK
  1716. Xextern long *alloc();
  1717. X/*
  1718. X * In case bison generated foo_yacc.c tries to use alloca(); if we don't
  1719. X * have it then just use malloc() instead.  This may not work on some
  1720. X * systems, but they should either use yacc or get a real alloca routine.
  1721. X */
  1722. Xlong *alloca(cnt)
  1723. Xunsigned cnt;
  1724. X{
  1725. X    static long dummy;
  1726. X    /*
  1727. X     * Assumption:  result returned by alloca() will never be freed.
  1728. X     *    alloca(0) may be used as a trigger to release memory; we cant
  1729. X     *    oblige it, and we don't want to attempt to allocate 0 bytes
  1730. X     *    or return a NULL pointer, so return pointer to `dummy' rather
  1731. X     *    than allocating at least one byte.
  1732. X     */
  1733. X    return cnt ? alloc(cnt) : &dummy;
  1734. X}
  1735. X#endif
  1736. X
  1737. X/*panic.c*/
  1738. END_OF_FILE
  1739. if test 1677 -ne `wc -c <'util/panic.c'`; then
  1740.     echo shar: \"'util/panic.c'\" unpacked with wrong size!
  1741. fi
  1742. # end of 'util/panic.c'
  1743. fi
  1744. echo shar: End of archive 106 \(of 108\).
  1745. cp /dev/null ark106isdone
  1746. MISSING=""
  1747. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 \
  1748. 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 \
  1749. 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 \
  1750. 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 \
  1751. 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 \
  1752. 101 102 103 104 105 106 107 108 ; do
  1753.     if test ! -f ark${I}isdone ; then
  1754.     MISSING="${MISSING} ${I}"
  1755.     fi
  1756. done
  1757. if test "${MISSING}" = "" ; then
  1758.     echo You have unpacked all 108 archives.
  1759.     echo "Now execute 'rebuild.sh'"
  1760.     rm -f ark10[0-8]isdone ark[1-9]isdone ark[1-9][0-9]isdone
  1761. else
  1762.     echo You still need to unpack the following archives:
  1763.     echo "        " ${MISSING}
  1764. fi
  1765. ##  End of shell archive.
  1766. exit 0
  1767.