home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / games / volume16 / nethack31 / part63 < prev    next >
Internet Message Format  |  1993-02-04  |  59KB

  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: v16i071:  nethack31 - display oriented dungeons & dragons (Ver. 3.1), Part63/108
  5. Message-ID: <4374@master.CNA.TEK.COM>
  6. Date: 1 Feb 93 19:50:09 GMT
  7. Sender: news@master.CNA.TEK.COM
  8. Lines: 2011
  9. Approved: billr@saab.CNA.TEK.COM
  10. Xref: uunet comp.sources.games:1621
  11.  
  12. Submitted-by: izchak@linc.cis.upenn.edu (Izchak Miller)
  13. Posting-number: Volume 16, Issue 71
  14. Archive-name: nethack31/Part63
  15. Supersedes: nethack3p9: Volume 10, Issue 46-102
  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 63 (of 108)."
  27. # Contents:  src/restore.c sys/amiga/Makefile.ami
  28. # Wrapped by billr@saab on Wed Jan 27 16:09:11 1993
  29. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  30. if test -f 'src/restore.c' -a "${1}" != "-c" ; then 
  31.   echo shar: Will not clobber existing file \"'src/restore.c'\"
  32. else
  33. echo shar: Extracting \"'src/restore.c'\" \(21955 characters\)
  34. sed "s/^X//" >'src/restore.c' <<'END_OF_FILE'
  35. X/*    SCCS Id: @(#)restore.c    3.1    93/01/23    */
  36. X/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  37. X/* NetHack may be freely redistributed.  See license for details. */
  38. X
  39. X#include "hack.h"
  40. X#include "lev.h"
  41. X#include "termcap.h" /* for TERMLIB and ASCIIGRAPH */
  42. X
  43. X#ifdef MICRO
  44. Xextern int dotcnt;    /* shared with save */
  45. X#endif
  46. X
  47. X#ifdef ZEROCOMP
  48. Xstatic int NDECL(mgetc);
  49. X#endif
  50. Xstatic void NDECL(find_lev_obj);
  51. X#ifndef NO_SIGNAL
  52. Xstatic void NDECL(inven_inuse);
  53. X#endif
  54. Xstatic void FDECL(restlevchn, (int));
  55. Xstatic void FDECL(restdamage, (int,BOOLEAN_P));
  56. Xstatic struct obj * FDECL(restobjchn, (int,BOOLEAN_P));
  57. Xstatic struct monst * FDECL(restmonchn, (int,BOOLEAN_P));
  58. Xstatic void FDECL(restgenoinfo, (int));
  59. Xstatic boolean FDECL(restgamestate, (int, unsigned int *));
  60. Xstatic int FDECL(restlevelfile, (int,XCHAR_P));
  61. X
  62. X#ifdef MULDGN
  63. X#include "quest.h"
  64. X#endif
  65. X
  66. Xboolean restoring = FALSE;
  67. X#ifdef TUTTI_FRUTTI
  68. Xstatic struct fruit NEARDATA *oldfruit;
  69. X#endif
  70. Xstatic long NEARDATA omoves;
  71. X
  72. X/* Recalculate level.objects[x][y], since this info was not saved. */
  73. Xstatic void
  74. Xfind_lev_obj()
  75. X{
  76. X    register struct obj *fobjtmp = (struct obj *)0;
  77. X    register struct obj *otmp;
  78. X    int x,y;
  79. X
  80. X    for(x=0; x<COLNO; x++) for(y=0; y<ROWNO; y++)
  81. X        level.objects[x][y] = (struct obj *)0;
  82. X
  83. X    /* Reverse the entire fobj chain, which is necessary so that we can
  84. X     * place the objects in the proper order.
  85. X     */
  86. X    while ((otmp = fobj) != 0) {
  87. X        fobj = otmp->nobj;
  88. X        otmp->nobj = fobjtmp;
  89. X        fobjtmp = otmp;
  90. X    }
  91. X    /* Set level.objects (as well as reversing the chain back again) */
  92. X    while ((otmp = fobjtmp) != 0) {
  93. X        place_object(otmp, otmp->ox, otmp->oy);
  94. X        fobjtmp = otmp->nobj;
  95. X        otmp->nobj = fobj;
  96. X        fobj = otmp;
  97. X    }
  98. X}
  99. X
  100. X#ifndef NO_SIGNAL
  101. Xstatic void
  102. Xinven_inuse()
  103. X/* Things that were marked "in_use" when the game was saved (ex. via the
  104. X * infamous "HUP" cheat) get used up here.
  105. X */
  106. X{
  107. X    register struct obj *otmp, *otmp2;
  108. X
  109. X    for(otmp = invent; otmp; otmp = otmp2) {
  110. X        otmp2 = otmp->nobj;
  111. X        if(otmp->in_use) {
  112. X            /* in_use and oldcorpse share a bit, but we don't
  113. X             * want nasty messages for old corpses --
  114. X             * remove_cadavers() will clean them up nicely
  115. X             */
  116. X            if (otmp->otyp == CORPSE &&
  117. X                    mons[otmp->corpsenm].mlet == S_TROLL)
  118. X                continue;
  119. X            pline("Finishing off %s...", xname(otmp));
  120. X            useup(otmp);
  121. X        }
  122. X    }
  123. X}
  124. X#endif
  125. X
  126. Xstatic void
  127. Xrestlevchn(fd)
  128. Xregister int fd;
  129. X{
  130. X    int cnt;
  131. X    s_level    *tmplev, *x;
  132. X
  133. X    sp_levchn = (s_level *) 0;
  134. X    mread(fd, (genericptr_t) &cnt, sizeof(int));
  135. X    for(; cnt > 0; cnt--) {
  136. X
  137. X        tmplev = (s_level *)alloc(sizeof(s_level));
  138. X        mread(fd, (genericptr_t) tmplev, sizeof(s_level));
  139. X        if(!sp_levchn) sp_levchn = tmplev;
  140. X        else {
  141. X
  142. X        for(x = sp_levchn; x->next; x = x->next);
  143. X        x->next = tmplev;
  144. X        }
  145. X        tmplev->next = (s_level *)0;
  146. X    }
  147. X}
  148. X
  149. Xstatic void
  150. Xrestdamage(fd, ghostly)
  151. Xint fd;
  152. Xboolean ghostly;
  153. X{
  154. X    int counter;
  155. X    struct damage *tmp_dam;
  156. X
  157. X    mread(fd, (genericptr_t) &counter, sizeof(counter));
  158. X    if (!counter)
  159. X        return;
  160. X    tmp_dam = (struct damage *)alloc(sizeof(struct damage));
  161. X    while (1) {
  162. X        char damaged_shops[5], *shp = NULL;
  163. X
  164. X        mread(fd, (genericptr_t) tmp_dam, sizeof(*tmp_dam));
  165. X        if (ghostly)
  166. X        tmp_dam->when += (monstermoves - omoves);
  167. X        Strcpy(damaged_shops,
  168. X           in_rooms(tmp_dam->place.x, tmp_dam->place.y, SHOPBASE));
  169. X        if (u.uz.dlevel) {
  170. X        /* when restoring, there are two passes over the current
  171. X         * level.  the first time, u.uz isn't set, so neither is
  172. X         * shop_keeper().  just wait and process the damage on
  173. X         * the second pass.
  174. X         */
  175. X        for (shp = damaged_shops; *shp; shp++) {
  176. X            struct monst *shkp = shop_keeper(*shp);
  177. X
  178. X            if (shkp && inhishop(shkp) && repair_damage(shkp, tmp_dam))
  179. X            break;
  180. X        }
  181. X        }
  182. X        if (!shp || !*shp) {
  183. X        tmp_dam->next = level.damagelist;
  184. X        level.damagelist = tmp_dam;
  185. X        tmp_dam = (struct damage *)alloc(sizeof(*tmp_dam));
  186. X        }
  187. X        if (!(--counter)) {
  188. X        free((genericptr_t)tmp_dam);
  189. X        return;
  190. X        }
  191. X    }
  192. X}
  193. X
  194. Xstatic struct obj *
  195. Xrestobjchn(fd, ghostly)
  196. Xregister int fd;
  197. Xboolean ghostly;
  198. X{
  199. X    register struct obj *otmp, *otmp2;
  200. X    register struct obj *first = (struct obj *)0;
  201. X#ifdef TUTTI_FRUTTI
  202. X    register struct fruit *oldf;
  203. X#endif
  204. X    int xl;
  205. X
  206. X#if defined(LINT) || defined(GCC_WARN)
  207. X    /* suppress "used before set" warning from lint */
  208. X    otmp2 = 0;
  209. X#endif
  210. X    while(1) {
  211. X        mread(fd, (genericptr_t) &xl, sizeof(xl));
  212. X        if(xl == -1) break;
  213. X        otmp = newobj(xl);
  214. X        if(!first) first = otmp;
  215. X        else otmp2->nobj = otmp;
  216. X        mread(fd, (genericptr_t) otmp,
  217. X                    (unsigned) xl + sizeof(struct obj));
  218. X        if(!otmp->o_id) otmp->o_id = flags.ident++;
  219. X#ifdef TUTTI_FRUTTI
  220. X        if(ghostly && otmp->otyp == SLIME_MOLD) {
  221. X            for(oldf=oldfruit; oldf; oldf=oldf->nextf)
  222. X                if (oldf->fid == otmp->spe) break;
  223. X            if(!oldf) impossible("no old fruit?");
  224. X            else otmp->spe = fruitadd(oldf->fname);
  225. X        }
  226. X#endif
  227. X        /* Ghost levels get object age shifted from old player's clock
  228. X         * to new player's clock.  Assumption: new player arrived
  229. X         * immediately after old player died.
  230. X         */
  231. X        if (ghostly && otmp->otyp != OIL_LAMP
  232. X                && otmp->otyp != BRASS_LANTERN
  233. X                && otmp->otyp != CANDELABRUM_OF_INVOCATION
  234. X                && !Is_candle(otmp))
  235. X            otmp->age = monstermoves-omoves+otmp->age;
  236. X
  237. X        /* get contents of the container */
  238. X        if (Is_container(otmp) || otmp->otyp == STATUE)
  239. X            otmp->cobj = restobjchn(fd,ghostly);
  240. X
  241. X        otmp2 = otmp;
  242. X    }
  243. X    if(first && otmp2->nobj){
  244. X        impossible("Restobjchn: error reading objchn.");
  245. X        otmp2->nobj = 0;
  246. X    }
  247. X
  248. X    return(first);
  249. X}
  250. X
  251. Xstatic struct monst *
  252. Xrestmonchn(fd, ghostly)
  253. Xregister int fd;
  254. Xboolean ghostly;
  255. X{
  256. X    register struct monst *mtmp, *mtmp2;
  257. X    register struct monst *first = (struct monst *)0;
  258. X    int xl;
  259. X    struct permonst *monbegin;
  260. X    boolean moved;
  261. X
  262. X    /* get the original base address */
  263. X    mread(fd, (genericptr_t)&monbegin, sizeof(monbegin));
  264. X    moved = (monbegin != mons);
  265. X
  266. X#if defined(LINT) || defined(GCC_WARN)
  267. X    /* suppress "used before set" warning from lint */
  268. X    mtmp2 = 0;
  269. X#endif
  270. X    while(1) {
  271. X        mread(fd, (genericptr_t) &xl, sizeof(xl));
  272. X        if(xl == -1) break;
  273. X        mtmp = newmonst(xl);
  274. X        if(!first) first = mtmp;
  275. X        else mtmp2->nmon = mtmp;
  276. X        mread(fd, (genericptr_t) mtmp, (unsigned) xl + sizeof(struct monst));
  277. X        if(!mtmp->m_id)
  278. X            mtmp->m_id = flags.ident++;
  279. X        if (moved && mtmp->data) {
  280. X            int offset = mtmp->data - monbegin;    /*(ptrdiff_t)*/
  281. X            mtmp->data = mons + offset;  /* new permonst location */
  282. X        }
  283. X        if(mtmp->minvent)
  284. X            mtmp->minvent = restobjchn(fd, ghostly);
  285. X#ifdef MUSE
  286. X        if (mtmp->mw) mtmp->mw = mtmp->minvent;    /* wield 1st obj in inventory */
  287. X#endif
  288. X        if (mtmp->isshk) restshk(mtmp);
  289. X
  290. X        mtmp2 = mtmp;
  291. X    }
  292. X    if(first && mtmp2->nmon){
  293. X        impossible("Restmonchn: error reading monchn.");
  294. X        mtmp2->nmon = 0;
  295. X    }
  296. X    return(first);
  297. X}
  298. X
  299. Xstatic void
  300. Xrestgenoinfo(fd)
  301. Xregister int fd;
  302. X{
  303. X    register int i;
  304. X    unsigned genolist[NUMMONS];
  305. X
  306. X    mread(fd, (genericptr_t) genolist, sizeof(genolist));
  307. X
  308. X    for (i = 0; i < NUMMONS; i++)
  309. X        mons[i].geno = genolist[i];
  310. X}
  311. X
  312. Xstatic
  313. Xboolean
  314. Xrestgamestate(fd, mid)
  315. Xregister int fd;
  316. Xunsigned int *mid;
  317. X{
  318. X    struct obj *otmp;
  319. X    int tmp;        /* not a register ! */
  320. X    struct flag oldflags;
  321. X#ifdef TUTTI_FRUTTI
  322. X    struct fruit *fruit;
  323. X#endif
  324. X
  325. X    invent = restobjchn(fd, FALSE);
  326. X    migrating_objs = restobjchn(fd, FALSE);
  327. X    migrating_mons = restmonchn(fd, FALSE);
  328. X    restgenoinfo(fd);
  329. X
  330. X    mread(fd, (genericptr_t) &tmp, sizeof tmp);
  331. X#ifdef WIZARD
  332. X    if(!wizard)
  333. X#endif
  334. X        if(tmp != getuid()) {        /* strange ... */
  335. X        pline("Saved game was not yours.");
  336. X        return(FALSE);
  337. X        }
  338. X
  339. X    oldflags = flags;
  340. X    mread(fd, (genericptr_t) &flags, sizeof(struct flag));
  341. X    /* Some config file and command line OPTIONS take precedence over
  342. X     * those in save file.
  343. X     */
  344. X#ifdef TERMLIB
  345. X    flags.DECgraphics = oldflags.DECgraphics;
  346. X#endif
  347. X#ifdef ASCIIGRAPH
  348. X    flags.IBMgraphics = oldflags.IBMgraphics;
  349. X#endif
  350. X#ifdef MICRO
  351. X    flags.rawio = oldflags.rawio;
  352. X    flags.BIOS = oldflags.BIOS;
  353. X#endif
  354. X#ifdef TEXTCOLOR
  355. X    flags.use_color = oldflags.use_color;
  356. X    flags.hilite_pet = oldflags.hilite_pet;
  357. X#endif
  358. X#ifdef MAC_GRAPHICS_ENV
  359. X    flags.MACgraphics = oldflags.MACgraphics;
  360. X    flags.large_font = oldflags.large_font;
  361. X#endif
  362. X    /* these come from the current environment; ignore saved values */
  363. X    flags.window_inited = oldflags.window_inited;
  364. X    flags.msg_history = oldflags.msg_history;
  365. X    flags.echo = oldflags.echo;
  366. X    flags.cbreak = oldflags.cbreak;
  367. X
  368. X    mread(fd, (genericptr_t) &u, sizeof(struct you));
  369. X    if(u.uhp <= 0) {
  370. X        You("were not healthy enough to survive restoration.");
  371. X        /* wiz1_level.dlevel is used by mklev.c to see if lots of stuff is
  372. X         * uninitialized, so we only have to set it and not the other stuff.
  373. X         */
  374. X        wiz1_level.dlevel = 0;
  375. X        u.uz.dnum = 0;
  376. X        u.uz.dlevel = 1;
  377. X        return(FALSE);
  378. X    }
  379. X
  380. X    /* don't do this earlier to avoid complicating abort above */
  381. X    for(otmp = invent; otmp; otmp = otmp->nobj)
  382. X        if(otmp->owornmask)
  383. X            setworn(otmp, otmp->owornmask);
  384. X
  385. X    restore_dungeon(fd);
  386. X    mread(fd, (genericptr_t) &inv_pos, sizeof inv_pos);
  387. X    restlevchn(fd);
  388. X    mread(fd, (genericptr_t) &moves, sizeof moves);
  389. X    mread(fd, (genericptr_t) &monstermoves, sizeof monstermoves);
  390. X#ifdef MULDGN
  391. X    mread(fd, (genericptr_t) &quest_status, sizeof(struct q_score));
  392. X#endif
  393. X    mread(fd, (genericptr_t) spl_book,
  394. X                sizeof(struct spell) * (MAXSPELL + 1));
  395. X    restore_artifacts(fd);
  396. X    restore_oracles(fd);
  397. X    if(u.ustuck)
  398. X        mread(fd, (genericptr_t) mid, sizeof (*mid));
  399. X    mread(fd, (genericptr_t) pl_character, sizeof pl_character);
  400. X
  401. X#ifdef TUTTI_FRUTTI
  402. X    mread(fd, (genericptr_t) pl_fruit, sizeof pl_fruit);
  403. X    mread(fd, (genericptr_t) ¤t_fruit, sizeof current_fruit);
  404. X    ffruit = 0;
  405. X    while (fruit = newfruit(),
  406. X           mread(fd, (genericptr_t)fruit, sizeof(struct fruit)),
  407. X           fruit->fid) {
  408. X        fruit->nextf = ffruit;
  409. X        ffruit = fruit;
  410. X    }
  411. X    dealloc_fruit(fruit);
  412. X#endif
  413. X    restnames(fd);
  414. X    restore_waterlevel(fd);
  415. X    return(TRUE);
  416. X}
  417. X
  418. X/*ARGSUSED*/    /* fd used in MFLOPPY only */
  419. Xstatic int
  420. Xrestlevelfile(fd, ltmp)
  421. Xregister int fd;
  422. Xxchar ltmp;
  423. X{
  424. X    register int nfd;
  425. X
  426. X    nfd = create_levelfile(ltmp);
  427. X
  428. X    if (nfd < 0)    panic("Cannot open temp level %d!", ltmp);
  429. X#ifdef MFLOPPY
  430. X    if (!savelev(nfd, ltmp, COUNT_SAVE)) {
  431. X
  432. X        /* The savelev can't proceed because the size required
  433. X         * is greater than the available disk space.
  434. X         */
  435. X        pline("Not enough space on `%s' to restore your game.",
  436. X            levels);
  437. X
  438. X        /* Remove levels and bones that may have been created.
  439. X         */
  440. X        (void) close(nfd);
  441. X        eraseall(levels, alllevels);
  442. X# ifndef AMIGA
  443. X        eraseall(levels, allbones);
  444. X
  445. X        /* Perhaps the person would like to play without a
  446. X         * RAMdisk.
  447. X         */
  448. X        if (ramdisk) {
  449. X            /* PlaywoRAMdisk may not return, but if it does
  450. X             * it is certain that ramdisk will be 0.
  451. X             */
  452. X            playwoRAMdisk();
  453. X            /* Rewind save file and try again */
  454. X            (void) lseek(fd, (off_t)0, 0);
  455. X            return dorecover(fd);    /* 0 or 1 */
  456. X        } else {
  457. X# endif
  458. X            pline("Be seeing you...");
  459. X            terminate(0);
  460. X# ifndef AMIGA
  461. X        }
  462. X# endif
  463. X    }
  464. X#endif
  465. X    bufon(nfd);
  466. X    savelev(nfd, ltmp, WRITE_SAVE | FREE_SAVE);
  467. X    bclose(nfd);
  468. X    return(2);
  469. X}
  470. X
  471. Xint
  472. Xdorecover(fd)
  473. Xregister int fd;
  474. X{
  475. X    unsigned int mid;        /* not a register */
  476. X    xchar ltmp;
  477. X    int rtmp;
  478. X    struct obj *otmp;
  479. X
  480. X    minit();    /* ZEROCOMP */
  481. X    restoring = TRUE;
  482. X    getlev(fd, 0, (xchar)0, FALSE);
  483. X    if (!restgamestate(fd, &mid)) {
  484. X        (void) close(fd);
  485. X        (void) delete_savefile();
  486. X        restoring = FALSE;
  487. X        return(0);
  488. X    }
  489. X#ifdef INSURANCE
  490. X    savestateinlock();
  491. X#endif
  492. X    rtmp = restlevelfile(fd, ledger_no(&u.uz));
  493. X    if (rtmp < 2) return(rtmp);  /* dorecover called recursively */
  494. X
  495. X#ifdef MICRO
  496. X# ifdef AMIGA
  497. X    {
  498. X    extern winid WIN_BASE;
  499. X    clear_nhwindow(WIN_BASE);    /* hack until there's a hook for this */
  500. X    }
  501. X# else
  502. X    clear_nhwindow(WIN_MAP);
  503. X# endif
  504. X    clear_nhwindow(WIN_MESSAGE);
  505. X    You("got as far as level %d in %s%s.",
  506. X        depth(&u.uz), dungeons[u.uz.dnum].dname,
  507. X        flags.debug ? " while in WIZARD mode" :
  508. X        flags.explore ? " while in discovery mode" : "");
  509. X    curs(WIN_MAP, 1, 1);
  510. X    dotcnt = 0;
  511. X    putstr(WIN_MAP, 0, "Restoring:");
  512. X#endif
  513. X    while(1) {
  514. X#ifdef ZEROCOMP
  515. X        if(mread(fd, (genericptr_t) <mp, sizeof ltmp) < 0)
  516. X#else
  517. X        if(read(fd, (genericptr_t) <mp, sizeof ltmp) != sizeof ltmp)
  518. X#endif
  519. X            break;
  520. X        getlev(fd, 0, ltmp, FALSE);
  521. X#ifdef MICRO
  522. X        curs(WIN_MAP, 11 + dotcnt++, 1);
  523. X        putstr(WIN_MAP, 0, ".");
  524. X#endif
  525. X        rtmp = restlevelfile(fd, ltmp);
  526. X        if (rtmp < 2) return(rtmp);  /* dorecover called recursively */
  527. X    }
  528. X
  529. X#ifdef BSD
  530. X    (void) lseek(fd, 0L, 0);
  531. X#else
  532. X    (void) lseek(fd, (off_t)0, 0);
  533. X#endif
  534. X    minit();    /* ZEROCOMP */
  535. X    getlev(fd, 0, (xchar)0, FALSE);
  536. X    (void) close(fd);
  537. X
  538. X#if defined(WIZARD) || defined(EXPLORE_MODE)
  539. X    if(
  540. X# ifdef WIZARD
  541. X       !wizard
  542. X#  ifdef EXPLORE_MODE
  543. X           &&
  544. X#  endif
  545. X# endif
  546. X# ifdef EXPLORE_MODE
  547. X              !discover
  548. X# endif
  549. X                )
  550. X#endif
  551. X        (void) delete_savefile();
  552. X#ifdef REINCARNATION
  553. X    if (Is_rogue_level(&u.uz)) assign_rogue_graphics(TRUE);
  554. X#endif
  555. X    if(u.ustuck) {
  556. X        register struct monst *mtmp;
  557. X
  558. X        for(mtmp = fmon; mtmp; mtmp = mtmp->nmon)
  559. X            if(mtmp->m_id == mid) goto monfnd;
  560. X        panic("Cannot find the monster ustuck.");
  561. X    monfnd:
  562. X        u.ustuck = mtmp;
  563. X    }
  564. X#ifdef MFLOPPY
  565. X    gameDiskPrompt();
  566. X#endif
  567. X    max_rank_sz(); /* to recompute mrank_sz (botl.c) */
  568. X#ifdef POLYSELF
  569. X    set_uasmon();
  570. X#endif
  571. X    /* take care of iron ball & chain */
  572. X    for(otmp = fobj; otmp; otmp = otmp->nobj)
  573. X        if(otmp->owornmask)
  574. X            setworn(otmp, otmp->owornmask);
  575. X#ifndef NO_SIGNAL
  576. X    /* in_use processing must be after:
  577. X     *    + The inventory has been read so that freeinv() works.
  578. X     *    + The current level has been restored so billing information
  579. X     *    is available.
  580. X     */
  581. X    inven_inuse();
  582. X#endif
  583. X#ifdef MULDGN
  584. X    load_qtlist();    /* re-load the quest text info */
  585. X#endif
  586. X    /* Set up the vision internals, after levl[] data is loaded */
  587. X    /* but before docrt().                        */
  588. X    vision_reset();
  589. X    vision_full_recalc = 1;    /* recompute vision (not saved) */
  590. X    docrt();
  591. X    restoring = FALSE;
  592. X    clear_nhwindow(WIN_MESSAGE);
  593. X    return(1);
  594. X}
  595. X
  596. Xvoid
  597. Xtrickery()
  598. X{
  599. X    pline("Strange, this map is not as I remember it.");
  600. X    pline("Somebody is trying some trickery here...");
  601. X    pline("This game is void.");
  602. X    done(TRICKED);
  603. X}
  604. X
  605. Xvoid
  606. Xgetlev(fd, pid, lev, ghostly)
  607. Xint fd, pid;
  608. Xxchar lev;
  609. Xboolean ghostly;
  610. X{
  611. X    register struct trap *trap;
  612. X    register struct monst *mtmp;
  613. X    branch *br;
  614. X    int hpid;
  615. X    xchar dlvl;
  616. X    int x, y;
  617. X#ifdef TOS
  618. X    short tlev;
  619. X#endif
  620. X
  621. X#if defined(MSDOS) || defined(OS2)
  622. X    setmode(fd, O_BINARY);
  623. X#endif
  624. X#ifdef TUTTI_FRUTTI
  625. X    /* Load the old fruit info.  We have to do it first, so the
  626. X     * information is available when restoring the objects.
  627. X     */
  628. X    if (ghostly) {
  629. X        struct fruit *fruit;
  630. X
  631. X        oldfruit = 0;
  632. X        while (fruit = newfruit(),
  633. X               mread(fd, (genericptr_t)fruit, sizeof(struct fruit)),
  634. X               fruit->fid) {
  635. X            fruit->nextf = oldfruit;
  636. X            oldfruit = fruit;
  637. X        }
  638. X        dealloc_fruit(fruit);
  639. X    }
  640. X#endif
  641. X
  642. X    /* First some sanity checks */
  643. X    mread(fd, (genericptr_t) &hpid, sizeof(hpid));
  644. X/* CHECK:  This may prevent restoration */
  645. X#ifdef TOS
  646. X    mread(fd, (genericptr_t) &tlev, sizeof(tlev));
  647. X    dlvl=tlev&0x00ff;
  648. X#else
  649. X    mread(fd, (genericptr_t) &dlvl, sizeof(dlvl));
  650. X#endif
  651. X    if((pid && pid != hpid) || (lev && dlvl != lev)) {
  652. X#ifdef WIZARD
  653. X        if (wizard) {
  654. X            if (pid && pid != hpid)
  655. X                pline("PID (%d) doesn't match saved PID (%d)!", hpid, pid);
  656. X            else if (lev && dlvl != lev)
  657. X                pline("This is level %d, not %d!", dlvl, lev);
  658. X        }
  659. X#endif
  660. X        trickery();
  661. X    }
  662. X
  663. X#ifdef RLECOMP
  664. X    {
  665. X        short    i, j;
  666. X        uchar    len;
  667. X        struct rm r;
  668. X        
  669. X        i = 0; j = 0; len = 0;
  670. X        while(i < ROWNO) {
  671. X            while(j < COLNO) {
  672. X            if(len > 0) {
  673. X                levl[j][i] = r;
  674. X                len -= 1;
  675. X                j += 1;
  676. X            } else {
  677. X                mread(fd, (genericptr_t)&len, sizeof(uchar));
  678. X                mread(fd, (genericptr_t)&r, sizeof(struct rm));
  679. X            }
  680. X            }
  681. X            j = 0;
  682. X            i += 1;
  683. X        }
  684. X    }
  685. X#else
  686. X    mread(fd, (genericptr_t) levl, sizeof(levl));
  687. X#endif    /* RLECOMP */
  688. X
  689. X    mread(fd, (genericptr_t)&omoves, sizeof(omoves));
  690. X    mread(fd, (genericptr_t)&upstair, sizeof(stairway));
  691. X    mread(fd, (genericptr_t)&dnstair, sizeof(stairway));
  692. X    mread(fd, (genericptr_t)&upladder, sizeof(stairway));
  693. X    mread(fd, (genericptr_t)&dnladder, sizeof(stairway));
  694. X    mread(fd, (genericptr_t)&sstairs, sizeof(stairway));
  695. X    mread(fd, (genericptr_t)&updest, sizeof(dest_area));
  696. X    mread(fd, (genericptr_t)&dndest, sizeof(dest_area));
  697. X    mread(fd, (genericptr_t)&level.flags, sizeof(level.flags));
  698. X
  699. X    fmon = restmonchn(fd, ghostly);
  700. X
  701. X    /* regenerate animals while on another level */
  702. X    { long tmoves = (monstermoves > omoves) ? monstermoves-omoves : 0;
  703. X      register struct monst *mtmp2;
  704. X
  705. X      for(mtmp = fmon; mtmp; mtmp = mtmp2) {
  706. X        mtmp2 = mtmp->nmon;
  707. X        if(mtmp->data->geno & G_GENOD) {
  708. X            /* mondead() would try to link the monster's objects
  709. X             * into fobj and the appropriate nexthere chain.
  710. X             * unfortunately, such things will not have sane
  711. X             * values until after find_lev_obj() well below
  712. X             * here, so we'd go chasing random pointers if we
  713. X             * tried that.  we could save the monster's objects
  714. X             * in another chain and insert them in the level
  715. X             * later, but that's a lot of work for very little
  716. X             * gain.  hence, just throw the objects away via
  717. X             * mongone() and pretend the monster wandered off
  718. X             * somewhere private before the genocide.
  719. X             */
  720. X            mongone(mtmp);
  721. X            continue;
  722. X        }
  723. X
  724. X        if (ghostly) {
  725. X            /* reset peaceful/malign relative to new character */
  726. X            if(!mtmp->isshk)
  727. X                /* shopkeepers will reset based on name */
  728. X                mtmp->mpeaceful = peace_minded(mtmp->data);
  729. X            set_malign(mtmp);
  730. X        } else if (mtmp->mtame && tmoves > 250)
  731. X            mtmp->mtame = mtmp->mpeaceful = 0;
  732. X
  733. X        /* restore shape changers - Maarten Jan Huisjes */
  734. X        if (mtmp->data == &mons[PM_CHAMELEON]
  735. X            && !Protection_from_shape_changers
  736. X            && !mtmp->cham)
  737. X            mtmp->cham = 1;
  738. X        else if(Protection_from_shape_changers) {
  739. X            if (mtmp->cham) {
  740. X                mtmp->cham = 0;
  741. X                (void) newcham(mtmp, &mons[PM_CHAMELEON]);
  742. X            } else if(is_were(mtmp->data) && !is_human(mtmp->data))
  743. X                new_were(mtmp);
  744. X        }
  745. X
  746. X        if (!ghostly) {
  747. X            long nhp = mtmp->mhp +
  748. X                (regenerates(mtmp->data) ? tmoves : tmoves/20);
  749. X
  750. X            if(!mtmp->mcansee && mtmp->mblinded) {
  751. X                if ((long) mtmp->mblinded <= tmoves) {
  752. X                    mtmp->mblinded = 0;
  753. X                    mtmp->mcansee = 1;
  754. X                } else mtmp->mblinded -= tmoves;
  755. X            }
  756. X            if(!mtmp->mcanmove && mtmp->mfrozen) {
  757. X                if ((long) mtmp->mfrozen <= tmoves) {
  758. X                    mtmp->mfrozen = 0;
  759. X                    mtmp->mcanmove = 1;
  760. X                } else mtmp->mfrozen -= tmoves;
  761. X            }
  762. X            if(mtmp->mflee && mtmp->mfleetim) {
  763. X                if ((long) mtmp->mfleetim <= tmoves) {
  764. X                    mtmp->mfleetim = 0;
  765. X                    mtmp->mflee = 0;
  766. X                } else mtmp->mfleetim -= tmoves;
  767. X            }
  768. X            if(nhp >= mtmp->mhpmax)
  769. X                mtmp->mhp = mtmp->mhpmax;
  770. X            else
  771. X                mtmp->mhp = nhp;
  772. X        }
  773. X      }
  774. X    }
  775. X
  776. X    rest_worm(fd);    /* restore worm information */
  777. X    ftrap = 0;
  778. X    while (trap = newtrap(),
  779. X           mread(fd, (genericptr_t)trap, sizeof(struct trap)),
  780. X           trap->tx) {
  781. X        trap->ntrap = ftrap;
  782. X        ftrap = trap;
  783. X    }
  784. X    dealloc_trap(trap);
  785. X    fobj = restobjchn(fd, ghostly);
  786. X    find_lev_obj();
  787. X    billobjs = restobjchn(fd, ghostly);
  788. X    rest_engravings(fd);
  789. X    rest_rooms(fd);        /* No joke :-) */
  790. X    mread(fd, (genericptr_t)doors, sizeof(doors));
  791. X
  792. X    /* reset level.monsters for new level */
  793. X    for (x = 0; x < COLNO; x++)
  794. X        for (y = 0; y < ROWNO; y++)
  795. X        level.monsters[x][y] = (struct monst *) 0;
  796. X    for (mtmp = level.monlist; mtmp; mtmp = mtmp->nmon) {
  797. X        if (mtmp->isshk)
  798. X        set_residency(mtmp, FALSE);
  799. X        place_monster(mtmp, mtmp->mx, mtmp->my);
  800. X        if (mtmp->wormno) place_wsegs(mtmp);
  801. X    }
  802. X    restdamage(fd, ghostly);
  803. X
  804. X
  805. X#ifdef TUTTI_FRUTTI
  806. X    /* Now get rid of all the temp fruits... */
  807. X    if (ghostly) {
  808. X        struct fruit *fruit;
  809. X
  810. X        while(oldfruit) {
  811. X            fruit = oldfruit->nextf;
  812. X            dealloc_fruit(oldfruit);
  813. X            oldfruit = fruit;
  814. X        }
  815. X    }
  816. X#endif
  817. X    if (ghostly && lev > ledger_no(&medusa_level) &&
  818. X            lev < ledger_no(&stronghold_level) && xdnstair == 0) {
  819. X        coord cc;
  820. X
  821. X        mazexy(&cc);
  822. X        xdnstair = cc.x;
  823. X        ydnstair = cc.y;
  824. X        levl[cc.x][cc.y].typ = STAIRS;
  825. X    }
  826. X    if (ghostly && (br = Is_branchlev(&u.uz)) && u.uz.dlevel == 1) {
  827. X        d_level ltmp;
  828. X
  829. X        if (on_level(&u.uz, &br->end1))
  830. X        assign_level(<mp, &br->end2);
  831. X        else
  832. X        assign_level(<mp, &br->end1);
  833. X
  834. X        switch(br->type) {
  835. X        case BR_STAIR:
  836. X        case BR_NO_END1:
  837. X        case BR_NO_END2: /* OK to assign to sstairs if it's not used */
  838. X        assign_level(&sstairs.tolev, <mp);
  839. X        break;        
  840. X        case BR_PORTAL: /* max of 1 portal per level */
  841. X        {
  842. X            register struct trap *ttmp;
  843. X            for(ttmp = ftrap; ttmp; ttmp = ttmp->ntrap)
  844. X            if (ttmp->ttyp == MAGIC_PORTAL)
  845. X                break;
  846. X            if (!ttmp) panic("getlev: need portal but none found");
  847. X            assign_level(&ttmp->dst, <mp);
  848. X        }
  849. X        break;
  850. X        }
  851. X    }
  852. X}
  853. X
  854. X#ifdef ZEROCOMP
  855. X#define RLESC '\0'    /* Leading character for run of RLESC's */
  856. X
  857. X#ifndef ZEROCOMP_BUFSIZ
  858. X#define ZEROCOMP_BUFSIZ BUFSZ
  859. X#endif
  860. Xstatic unsigned char NEARDATA inbuf[ZEROCOMP_BUFSIZ];
  861. Xstatic unsigned short NEARDATA inbufp = 0;
  862. Xstatic unsigned short NEARDATA inbufsz = 0;
  863. Xstatic short NEARDATA inrunlength = -1;
  864. Xstatic int NEARDATA mreadfd;
  865. X
  866. Xstatic int
  867. Xmgetc()
  868. X{
  869. X    if (inbufp >= inbufsz) {
  870. X    inbufsz = read(mreadfd, (genericptr_t)inbuf, sizeof inbuf);
  871. X    if (!inbufsz) {
  872. X        if (inbufp > sizeof inbuf)
  873. X        error("EOF on file #%d.\n", mreadfd);
  874. X        inbufp = 1 + sizeof inbuf;  /* exactly one warning :-) */
  875. X        return -1;
  876. X    }
  877. X    inbufp = 0;
  878. X    }
  879. X    return inbuf[inbufp++];
  880. X}
  881. X
  882. Xvoid
  883. Xminit()
  884. X{
  885. X    inbufsz = 0;
  886. X    inbufp = 0;
  887. X    inrunlength = -1;
  888. X}
  889. X
  890. Xint
  891. Xmread(fd, buf, len)
  892. Xint fd;
  893. Xgenericptr_t buf;
  894. Xregister unsigned len;
  895. X{
  896. X    /*register int readlen = 0;*/
  897. X    mreadfd = fd;
  898. X    while (len--) {
  899. X    if (inrunlength > 0) {
  900. X        inrunlength--;
  901. X        *(*((char **)&buf))++ = '\0';
  902. X    } else {
  903. X        register short ch = mgetc();
  904. X        if (ch < 0) return -1; /*readlen;*/
  905. X        if ((*(*(char **)&buf)++ = ch) == RLESC) {
  906. X        inrunlength = mgetc();
  907. X        }
  908. X    }
  909. X    /*readlen++;*/
  910. X    }
  911. X    return 0; /*readlen;*/
  912. X}
  913. X
  914. X#else /* ZEROCOMP */
  915. X
  916. Xvoid
  917. Xminit()
  918. X{
  919. X    return;
  920. X}
  921. X
  922. Xvoid
  923. Xmread(fd, buf, len)
  924. Xregister int fd;
  925. Xregister genericptr_t buf;
  926. Xregister unsigned int len;
  927. X{
  928. X    register int rlen;
  929. X
  930. X#if defined(BSD) || defined(ULTRIX)
  931. X    rlen = read(fd, buf, (int) len);
  932. X    if(rlen != len){
  933. X#else /* e.g. SYSV, __TURBOC__ */
  934. X    rlen = read(fd, buf, (unsigned) len);
  935. X    if((unsigned)rlen != len){
  936. X#endif
  937. X        pline("Read %d instead of %u bytes.", rlen, len);
  938. X        if(restoring) {
  939. X            (void) close(fd);
  940. X            (void) delete_savefile();
  941. X            error("Error restoring old game.");
  942. X        }
  943. X        panic("Error reading level file.");
  944. X    }
  945. X}
  946. X#endif /* ZEROCOMP */
  947. X
  948. X/*restore.c*/
  949. END_OF_FILE
  950. if test 21955 -ne `wc -c <'src/restore.c'`; then
  951.     echo shar: \"'src/restore.c'\" unpacked with wrong size!
  952. fi
  953. # end of 'src/restore.c'
  954. fi
  955. if test -f 'sys/amiga/Makefile.ami' -a "${1}" != "-c" ; then 
  956.   echo shar: Will not clobber existing file \"'sys/amiga/Makefile.ami'\"
  957. else
  958. echo shar: Extracting \"'sys/amiga/Makefile.ami'\" \(32666 characters\)
  959. sed "s/^X//" >'sys/amiga/Makefile.ami' <<'END_OF_FILE'
  960. X#    NetHack Makefile.
  961. X#    SCCS Id: @(#)Makefile.ami    3.3    93/01/08
  962. X# Copyright (c) Kenneth Lorber, Bethesda, Maryland, 1991, 1992, 1993.
  963. X# NetHack may be freely redistributed.  See license for details.
  964. X
  965. X# This makefile is arranged for compiling for the Amiga with SAS/C 5.10b but
  966. X# can be configured for compiling with Manx C 5, SAS/C 6.1, or registered DICE
  967. X# with simple changes.  The appropriate changes are identified by #[compiler]
  968. X# where compiler is one of: SAS5, SAS6, MANX, or DICE; the options in
  969. X# this makefile as should be set according to the compiler being used.
  970. X
  971. X# Note: When using the Manx compiler, an alternate make utility is
  972. X# required. The bundled Aztec make is just too damaged.
  973. X
  974. X# The following assignments should be made before using this makefile:
  975. X#
  976. X#   HackExe:    directory where final executable should go
  977. X#   NetHack:    directory where other runtime support files should go
  978. X#   Amiga:    "amiga" directory
  979. X#   Dat:    "dat" directory
  980. X#   Doc:    "doc" directory
  981. X#   Incl:    "include" directory
  982. X#   Share:    "share" directory
  983. X#   NHS:    "src" directory
  984. X#   Util:    "util" directory
  985. X#   OBJ:    destination for object files for main binary
  986. X#   OBJO:    destination for object files for everything else
  987. X#        NB: OBJ and OBJO MUST be different directories
  988. X#
  989. X# Startup makefile with:
  990. X#
  991. X#[SAS6]
  992. X#    cd OBJ:
  993. X#    smake -f Amiga:Makefile.ami
  994. X#    cd NetHack:
  995. X#    smake -f Amiga:Makefile.ami install
  996. X#
  997. X#[SAS5]
  998. X#    cd OBJ:
  999. X#    lmk -f Amiga:Makefile.ami
  1000. X#    cd NetHack:
  1001. X#    lmk -f Amiga:Makefile.ami install
  1002. X#
  1003. X#[MANX]
  1004. X#    cd OBJ:
  1005. X#    make -f Amiga:Makefile.ami
  1006. X#    cd NetHack:
  1007. X#    make -f Amiga:Makefile.ami install
  1008. X#
  1009. X#[DICE]
  1010. X#    cd OBJ:
  1011. X#    make -f Amiga:Makefile.ami
  1012. X#    cd NetHack:
  1013. X#    make -f Amiga:Makefile.ami install
  1014. X#
  1015. X# You may use following targets on lmk/make command lines:
  1016. X#   all        do it all (default)
  1017. X#   link    just create $(GAME) from object files
  1018. X#   obj        just create common object files
  1019. X#   obja    just create amiga object files
  1020. X#   objs    just create shared object files
  1021. X#   clean    deletes the object files
  1022. X#   spotless    deletes the object files, $(GAME), and more
  1023. X#
  1024. X# Note:  We do not build the Guidebook here since it needs tbl
  1025. X# (See the file sys/unix/Makefile.doc for more information)
  1026. X
  1027. X# Precompiled header files:
  1028. X#   $(HDEP) should appear in any dependency list for an object file where
  1029. X#   we would want to make use of the precompiled version of Incl:hack.h,
  1030. X#   while $(CSYM) should appear in the C compiler command line that creates
  1031. X#   any such object file.  (Changes made here should agree with the $(HDEP):
  1032. X#   target that appears later in this makefile.)
  1033. X#
  1034. X#   Notice that since this file would be created on Ram: that we would
  1035. X#   end up recompiling everything if we followed the normal make sequence.
  1036. X#   Thus, we could use:
  1037. X#
  1038. X#[SAS6]
  1039. X#    cd NetHack:
  1040. X#    smake -f Amiga:Makefile.ami Ram:hack.sym
  1041. X#    setdate Ram:hack.sym {date & time of Incl:hack.h}
  1042. X#    smake -f Amiga:Makefile.ami
  1043. X#
  1044. X#[SAS5]
  1045. X#    cd NetHack:
  1046. X#    lmk -f Amiga:Makefile.ami Ram:hack.sym
  1047. X#    setdate Ram:hack.sym {date & time of Incl:hack.h}
  1048. X#    lmk -f Amiga:Makefile.ami
  1049. X#
  1050. X#[MANX]
  1051. X#    cd NetHack:
  1052. X#    make -f Amiga:Makefile.ami Ram:hack.sym
  1053. X#    setdate Ram:hack.sym {date & time of Incl:hack.h}
  1054. X#    make -f Amiga:Makefile.ami
  1055. X
  1056. X#[SAS5]
  1057. X#   If we were to use the precompiled header file feature, we would uncomment
  1058. X#   these following two lines.  However, there are still problems in the
  1059. X#   behavior of this feature in version 5.04, so these lines are commented
  1060. X#   out for now.
  1061. X
  1062. X#HDEP    = Ram:hack.sym
  1063. X#CSYM    = -HRam:hack.sym
  1064. X
  1065. X#[SAS5]
  1066. X#   If we were to use the precompiled header file feature in a newer version
  1067. X#   of SAS/C, we would comment out these following two lines.
  1068. X#   If we don't use precompiled header files, we uncomment it as well.
  1069. X
  1070. XHDEP    = Incl:hack.h
  1071. XCSYM    =
  1072. X
  1073. X#[MANX]
  1074. X#   If we were compiling with Aztec, and wanted to use the symbol table
  1075. X#   pre-loading feature, we would uncomment these following two lines.
  1076. X
  1077. X#HDEP    = Ram:hack.sym
  1078. X#CSYM    = +IRam:hack.sym
  1079. X
  1080. X#[DICE]
  1081. X#   If we were compiling with DICE and wanted to use the symbol table
  1082. X#   pre-loading feature, we would uncomment these following two lines.
  1083. X
  1084. X#HDEP    = Incl:hack.sym
  1085. X#CSYM    = -HIncl:hack.sym=Incl:hack.h
  1086. X
  1087. X# [OPTION] Pathname for (optional) uudecode program:
  1088. X#   If uudecode is available for use by this makefile, give its name below.
  1089. X#   Use a harmless command (like echo) otherwise.
  1090. X
  1091. X#UUDEC    = echo
  1092. XUUDEC    = uudecode
  1093. X
  1094. X# Flex/Bison command assignments -- Useful only if you have flex/bison
  1095. XFLEX    = flex
  1096. XBISON    = bison
  1097. X# FBFIL and FBLIB may be used, if required by your version of flex or bison,
  1098. X# to specify additional files or libraries to be linked with
  1099. XFBFIL    =
  1100. XFBLIB    = lib:compat.lib
  1101. X
  1102. X# If you're compiling this on a 1.3 system, you'll have to uncomment the
  1103. X# following (for use with the ifchange script below).  Also useful instead of
  1104. X# "protect +s ifchange"
  1105. XEXECUTE = execute
  1106. X
  1107. X# Pathname for the C compiler being used.
  1108. X
  1109. X#[SAS6]
  1110. X#CC    = sc
  1111. X
  1112. X#[SAS5]
  1113. XCC    = lc
  1114. X
  1115. X#[MANX]
  1116. X#CC    = cc
  1117. X
  1118. X#[DICE]
  1119. X#CC    = dcc
  1120. X
  1121. X# Compilation flags for selected C Compiler:
  1122. X#   $(CFLAGS) should appear before filename arguments of $(CC) command line.
  1123. X
  1124. X#[SAS6]
  1125. X#   Note: make sure your CLI stack size is large (at least 50K) or lev_comp
  1126. X#   and makedefs may fail terribly - stack checking is disabled.
  1127. X#
  1128. X#  **** WARNING ****    GST support is not fool proof.  You must make makedefs
  1129. X#            without a GST first so that the generated headers
  1130. X#            that are part of the GST can be made.
  1131. X#
  1132. X#GSTSRC=Amiga:amigst.c
  1133. X#
  1134. X#GSTHEAD=Incl:hack.h Incl:pm.h Incl:trap.h Incl:onames.h \
  1135. X#    Amiga:winami.p Amiga:amidos.p Amiga:amiwind.p
  1136. X#
  1137. X#GSTFILE=OBJ:NetHack.gst
  1138. X#MKGSTFILE=OBJ:MakeDefs.gst
  1139. X#NHGSTFILE=OBJ:Game.gst
  1140. X#COPYMGST=copymgst
  1141. X#COPYNGST=copyngst
  1142. X# undefine this to not compile with GSTs
  1143. X#GST=gst=$(GSTFILE)
  1144. X#
  1145. X#DEBUG=l
  1146. X#CFLAGS    = data=far nminc debug=$(DEBUG) idir=incl: cpu=any nostkchk ign=104 \
  1147. X#        ignore=85,62 strmerge optsize ppbuf=8000 afp $(ERRREXX) $(GST)
  1148. X# for files that are too large for the standard flags:
  1149. X#CFLAGS2 = code=far nostrmerge
  1150. X#WBCFLAGS = ignore=217,62 data=far ansi nminc code=far debug=sf $(ERRREXX) $(GST)
  1151. X#WBC2FLAGS = define=CLI
  1152. X#WBLFLAGS =
  1153. X#CCFLAGS = define=
  1154. X#SPLFLAGS = ignore=77 define=SPLIT
  1155. X
  1156. X#[SAS5]
  1157. X#   Note: make sure your CLI stack size is large (at least 50K) or lev_comp
  1158. X#   and makedefs may fail terribly - stack checking is disabled.
  1159. XCFLAGS    = -b0 -cfi -d1 -iIncl: -ma -v -cs -ms -z8000 -r0 #-O
  1160. X# for files that are too large for the standard flags: 
  1161. XCFLAGS2 = -r0
  1162. XCCDEF = -d
  1163. XWBCFLAGS = -r0 -b0 -cafis -d1 #-O
  1164. XWBC2FLAGS = -dCLI
  1165. XWBLFLAGS =
  1166. XSPLFLAGS = -cd -dSPLIT
  1167. X
  1168. X#[MANX]
  1169. X#CFLAGS = -iincl: -mc -md -ms -pa -ps -bs -wo -qq
  1170. X#WBCFLAGS = -mc -md -ms -pa -ps -bs -wo -qq -pp
  1171. X#WBLFLAGS = +cd
  1172. X
  1173. X#[DICE]
  1174. X#CFLAGS = -c -Iincl: -mD -mC -ms
  1175. X#WBCFLAGS = -c -ms
  1176. X#WBLFLAGS =
  1177. X
  1178. X# Components of varous link command lines:
  1179. X#   $(LINK) should be the pathname of the linker being used (with any options
  1180. X#   that should appear at the beginning of the command line).  The name of the
  1181. X#   output file should appear immediately after $(LINK).  $(LIN) should appear
  1182. X#   before the list of object files in each link command.  $(LLINK) should
  1183. X#   appear as the list of object files in the link command line that creates
  1184. X#   the NetHack executable.  $(LLIB) should appear at the end of each link
  1185. X#   command line.
  1186. X
  1187. X# Note: amiga.lib added due to missing prototypes/pragmas.
  1188. X# Should be deleted when this is resolved.
  1189. X
  1190. X#[SAS6]
  1191. X
  1192. X#LINK    = sc link
  1193. X#LIN    = startup=catch
  1194. X#LLINK    = with Amiga:ami.lnk
  1195. X#LLIB    = lib=Lib:sc.lib lib=lib:amiga.lib BATCH #scnb.lib or sc.lib
  1196. X#FLLIB    = lib=$(FBLIB) Lib:sc.lib BATCH
  1197. X#OBJSPEC = objname=
  1198. X#PNSPEC = pname=
  1199. X#INCLSPEC = idir=
  1200. X#DEFSPEC = define=
  1201. X#IGNSPEC = ignore=
  1202. X#COMPACT_HEADERS=$(GSTFILE) $(COPYNGST)
  1203. X
  1204. X#[SAS5]
  1205. X
  1206. XLINK    = Blink to
  1207. XLIN    = from Lib:catch.o
  1208. XLLINK    = with Amiga:ami.lnk
  1209. XLLIB    = lib Lib:lc.lib lib:amiga.lib BATCH #lcnb.lib or lc.lib
  1210. XFLLIB    = lib $(FBLIB) Lib:lc.lib BATCH
  1211. XOBJSPEC = -o
  1212. XPNSPEC =
  1213. XINCLSPEC = -i
  1214. XDEFSPEC = -d
  1215. XIGNSPEC = -j
  1216. X
  1217. X#[MANX]
  1218. X
  1219. X#LINK    = ln -g +q +ss -o
  1220. X#LIN    =
  1221. X#LLINK    = -f Amiga:ami.lnk
  1222. X#LLIB    = -lcl16
  1223. X#FLLIB  = -lcl16
  1224. X#OBJSPEC = -o
  1225. X#PNSPEC = -o
  1226. X#INCLSPEC = -i
  1227. X#DEFSPEC = -d
  1228. X#IGNSPEC = -j
  1229. X
  1230. X#[DICE]
  1231. X
  1232. X#LINK     = dcc -s -o -frag
  1233. X#LIN     =
  1234. X#LLINK     = @Amiga:ami.lnk
  1235. X#LLIB     =
  1236. X#FLLIB     = -l$(FBLIB)
  1237. X#OBJSPEC = -o
  1238. X#PNSPEC = -o
  1239. X#INCLSPEC = -i
  1240. X#DEFSPEC = -d
  1241. X#IGNSPEC = -j
  1242. X
  1243. X# Name of the game:
  1244. X
  1245. XGAME    = HackExe:NetHack
  1246. X
  1247. X# A more reasonable random number generator (recommended for the Amiga):
  1248. X
  1249. XRANDOBJ    = OBJ:random.o
  1250. X
  1251. X.PRECIOUS:  Incl:config.h Incl:decl.h Incl:hack.h Incl:permonst.h Incl:you.h
  1252. X
  1253. X# Almost nothing below this line should have to be changed.
  1254. X# (Exceptions are marked by [SAS6], [MANX], etc.)
  1255. X#
  1256. X# Other things that have to be reconfigured are in config.h,
  1257. X# (amiconf.h, pcconf.h), and possibly system.h, tradstdc.h.
  1258. X
  1259. X# Object files for makedefs:
  1260. X
  1261. XMAKEOBJS = \
  1262. X    OBJO:makedefs.o OBJ:monst.o OBJ:objects.o
  1263. X
  1264. X# Object files for special levels compiler:
  1265. X
  1266. XSPLEVOBJS = \
  1267. X    OBJO:lev_yacc.o OBJO:lev_lex.o    OBJO:lev_main.o \
  1268. X    OBJ:decl.o     OBJ:drawing.o    OBJ:monst.o \
  1269. X    OBJ:objects.o
  1270. X
  1271. X# Object files for dungeon compiler
  1272. X
  1273. XDGNCOMPOBJS = \
  1274. X    OBJO:dgn_yacc.o    OBJO:dgn_lex.o    OBJO:dgn_main.o OBJ:alloc.o OBJO:panic.o
  1275. X
  1276. X# Object files for NetHack:
  1277. X
  1278. XCOMMOBJ = \
  1279. X    OBJ:allmain.o    OBJ:alloc.o    OBJ:apply.o     OBJ:artifact.o    \
  1280. X    OBJ:attrib.o    OBJ:ball.o    OBJ:bones.o    OBJ:botl.o    \
  1281. X    OBJ:cmd.o    OBJ:dbridge.o    OBJ:decl.o    OBJ:detect.o    \
  1282. X    OBJ:display.o    OBJ:do.o    OBJ:do_name.o    OBJ:do_wear.o    \
  1283. X    OBJ:dog.o    OBJ:dogmove.o    OBJ:dokick.o    OBJ:dothrow.o    \
  1284. X    OBJ:drawing.o    OBJ:dungeon.o    OBJ:eat.o    OBJ:end.o    \
  1285. X    OBJ:engrave.o    OBJ:exper.o    OBJ:explode.o    OBJ:extralev.o    \
  1286. X    OBJ:files.o    OBJ:fountain.o     OBJ:hack.o    OBJ:invent.o    \
  1287. X     OBJ:lock.o    OBJ:mail.o    OBJ:makemon.o    OBJ:mcastu.o    \
  1288. X    OBJ:mhitm.o    OBJ:mhitu.o    OBJ:minion.o    OBJ:mklev.o    \
  1289. X    OBJ:mkmap.o    OBJ:mkmaze.o    OBJ:mkobj.o    OBJ:mkroom.o    \
  1290. X    OBJ:mon.o    OBJ:mondata.o    OBJ:monmove.o    OBJ:monst.o    \
  1291. X    OBJ:mplayer.o    OBJ:mthrowu.o    OBJ:muse.o    OBJ:music.o    \
  1292. X    OBJ:o_init.o    OBJ:objects.o    OBJ:objnam.o    OBJ:options.o    \
  1293. X    OBJ:pager.o    OBJ:pickup.o    OBJ:polyself.o    OBJ:potion.o    \
  1294. X    OBJ:pline.o     OBJ:hacklib.o    OBJ:pray.o    OBJ:priest.o    \
  1295. X    OBJ:quest.o    OBJ:questpgr.o    OBJ:read.o    OBJ:rect.o    \
  1296. X    OBJ:restore.o    OBJ:rnd.o    OBJ:rumors.o    OBJ:save.o    \
  1297. X    OBJ:shk.o    OBJ:shknam.o    OBJ:sit.o    OBJ:sounds.o    \
  1298. X    OBJ:sp_lev.o    OBJ:spell.o    OBJ:steal.o    OBJ:timeout.o    \
  1299. X    OBJ:topten.o    OBJ:track.o    OBJ:trap.o    OBJ:u_init.o    \
  1300. X    OBJ:uhitm.o    OBJ:vault.o    OBJ:version.o    OBJ:vision.o    \
  1301. X    OBJ:weapon.o    OBJ:were.o    OBJ:wield.o    OBJ:windows.o    \
  1302. X    OBJ:wizard.o    OBJ:worm.o    OBJ:worn.o    OBJ:write.o    \
  1303. X    OBJ:zap.o
  1304. X
  1305. XMAKEDEFOBJ = \
  1306. X    OBJ:monstr.o
  1307. X
  1308. XAMIGAOBJ = \
  1309. X    OBJ:amidos.o    OBJ:amirip.o     OBJ:amiwbench.o OBJ:amiwind.o    \
  1310. X    OBJ:winami.o
  1311. X
  1312. XSHAREOBJ = \
  1313. X    OBJ:pcmain.o    $(RANDOBJ)
  1314. X
  1315. X
  1316. X# All the object files for NetHack:
  1317. X
  1318. XHOBJ = $(COMMOBJ) $(AMIGAOBJ) $(SHAREOBJ) $(MAKEDEFOBJ)
  1319. X
  1320. X# Getting down to business:
  1321. X
  1322. Xall:  $(COMPACT_HEADERS) NetHack:lev_comp NetHack:dgn_comp $(GAME) \
  1323. X    NetHack:HackWB NetHack:recover NetHack:HackCli NetHack:splitter
  1324. X
  1325. Xinstall: inst-data inst-dungeon inst-icons inst-fonts HackExe:NetHack.dir
  1326. X
  1327. XAmiga:compacted:
  1328. X    lmk -f compact.lmk DST=$(COMPACT_DEST) SRC=$(COMPACT_SRC)
  1329. X
  1330. X$(GAME):  $(HOBJ) Amiga:ami.lnk
  1331. X    $(LINK) $(PNSPEC)$(GAME) $(LIN) $(LLINK) $(LLIB)
  1332. X
  1333. Xlink:
  1334. X    $(LINK) $(PNSPEC)$(GAME) $(LIN) $(LLINK) $(LLIB)
  1335. X
  1336. XOBJ:Game.gst: $(GSTHEAD)
  1337. X    $(CC) $(CFLAGS) makegst $(NHGSTFILE) $(GSTSRC)
  1338. X
  1339. XOBJ:MakeDefs.gst: $(GSTSRC)
  1340. X    $(CC) $(CFLAGS) define=TEMP_BUILD makegst $(MKGSTFILE) $(GSTSRC)
  1341. X
  1342. Xcopymgst:
  1343. X    copy $(MKGSTFILE) to $(GSTFILE)
  1344. X
  1345. Xcopyngst:
  1346. X    copy $(NHGSTFILE) to $(GSTFILE)
  1347. X
  1348. XAmiga:ami.lnk: Amiga:Makefile.ami
  1349. X    list to Amiga:ami.lnk OBJ:\#?.o QUICK NOHEAD
  1350. X
  1351. Xobj:  $(HOBJ)
  1352. Xobja:  $(AMIGAOBJ)
  1353. Xobjs:  $(SHAREOBJ)
  1354. X
  1355. X# The default method for creating object files:
  1356. X
  1357. X#[SAS6]
  1358. X#[SAS5]
  1359. X
  1360. X.c.o:
  1361. X    $(CC) $(CFLAGS) $(CSYM) $(OBJSPEC)$@ $<
  1362. X
  1363. X#[DICE]
  1364. X
  1365. X#$(COMMOBJ):
  1366. X#    $(CC) $(CFLAGS) $(CSYM) $(OBJSPEC)$@ NHS:$*.c
  1367. X
  1368. X#$(AMIGAOBJ):
  1369. X#    $(CC) $(CFLAGS) $(CSYM) $(OBJSPEC)$@ Amiga:$*.c
  1370. X
  1371. X#$(SHAREOBJ):
  1372. X#    $(CC) $(CFLAGS) $(CSYM) $(OBJSPEC)$@ Share:$*.c
  1373. X
  1374. Xclean:
  1375. X    -delete OBJ:\#?.o OBJO:\#?.o
  1376. X
  1377. Xspotless:  clean
  1378. X    -delete $(GAME) NetHack:lev_comp NetHack:makedefs NetHack:dgn_comp
  1379. X    -delete Amiga:8
  1380. X    -delete Amiga:hack.font
  1381. X    -delete Dat:data Dat:rumors
  1382. X    -delete NetHack:data NetHack:rumors
  1383. X    -delete NetHack:castle.lev NetHack:dungeon
  1384. X    -delete NetHack:earth.lev NetHack:air.lev NetHack:fire.lev
  1385. X    -delete NetHack:water.lev NetHack:astral.lev
  1386. X    -delete NetHack:tower1.lev NetHack:tower2.lev NetHack:tower3.lev
  1387. X    -delete NetHack:fakewiz1.lev NetHack:fakewiz2.lev
  1388. X    -delete NetHack:medusa-1.lev NetHack:medusa-2.lev
  1389. X    -delete NetHack:oracle.lev NetHack:wizard1.lev NetHack:wizard2.lev
  1390. X    -delete NetHack:wizard3.lev NetHack:dungeon.pdf NetHack:valley.lev
  1391. X    -delete NetHack:minetown.lev NetHack:minefill.lev
  1392. X    -delete $(ADFILES)
  1393. X    -delete $(BDFILES)
  1394. X    -delete $(CDFILES)
  1395. X    -delete $(EDFILES)
  1396. X    -delete $(HDFILES)
  1397. X    -delete $(KDFILES)
  1398. X    -delete $(PDFILES)
  1399. X    -delete $(RDFILES)
  1400. X    -delete $(SDFILES)
  1401. X    -delete $(TDFILES)
  1402. X    -delete $(VDFILES)
  1403. X    -delete $(WDFILES)
  1404. X    -delete Incl:onames.h Incl:pm.h
  1405. X    -echo to Incl:onames.h "" noline
  1406. X    -wait 2
  1407. X    -echo to Incl:pm.h "" noline
  1408. X    -wait 2
  1409. X    -setdate NHS:makedefs.c
  1410. X    -wait 2
  1411. X
  1412. X# Creating precompiled version of Incl:hack.h to save disk I/O.
  1413. X
  1414. X#[SAS5]
  1415. X#   If we were to use the precompiled header file feature of SAS/C, we
  1416. X#   would uncomment the following lines.  (Also see defines for HDEP and
  1417. X#   CSYM near the beginning of this file, as these should be appropriately
  1418. X#   defined.)
  1419. X
  1420. X#$(HDEP):  Incl:hack.h NetHack:makedefs
  1421. X#    echo to Ram:hackincl.c "#include <Incl:hack.h>"
  1422. X#    $(CC) $(CFLAGS) -ph $(OBJSPEC)$@ Ram:hackincl.c
  1423. X#    -delete Ram:hackincl.c
  1424. X
  1425. X#[MANX]
  1426. X#   If we were compiling with Aztec, and wanted to use the symbol table
  1427. X#   pre-loading feature, we would uncomment these following two lines.
  1428. X
  1429. X#$(HDEP):  Incl:hack.h NetHack:makedefs
  1430. X#    $(CC) $(CFLAGS) -a $(OBJSPEC)Ram:hack.asm +h$@ Incl:hack.h
  1431. X#    -delete Ram:hack.asm
  1432. X
  1433. X#[DICE]
  1434. X#   If we were compiling with DICE and wanted to use the symbol table
  1435. X#   pre-loading feature, we would not need a rule to make the
  1436. X#   precompiled header file, because DCC handles this automatically.
  1437. X
  1438. X#
  1439. X#    Please note:    The dependency lines for the modules here are
  1440. X#            deliberately incorrect.  Including "hack.h" in
  1441. X#            the dependency list would cause a dependency
  1442. X#            loop.
  1443. X#
  1444. X
  1445. XNetHack:makedefs:  $(MKGSTFILE) $(COPYMGST) $(MAKEOBJS)
  1446. X    $(LINK) $(PNSPEC)NetHack:makedefs $(LIN) $(MAKEOBJS) $(LLIB)
  1447. X
  1448. XOBJO:makedefs.o:  Util:makedefs.c Incl:config.h Incl:permonst.h Incl:objclass.h  Incl:patchlevel.h Incl:qtext.h Incl:artilist.h
  1449. X    $(CC) $(DEFSPEC)MAKEDEFS_C $(CFLAGS) $(OBJSPEC)$@ Util:makedefs.c
  1450. X
  1451. XNetHack:lev_comp:  $(SPLEVOBJS)
  1452. X    $(LINK) $(PNSPEC)NetHack:lev_comp $(LIN) $(SPLEVOBJS) $(FBFIL) $(FLLIB)
  1453. X
  1454. XNetHack:dgn_comp:  $(DGNCOMPOBJS)
  1455. X    $(LINK) $(PNSPEC)NetHack:dgn_comp $(LIN) $(DGNCOMPOBJS) $(FBFIL) $(FLLIB)
  1456. X
  1457. XOBJO:lev_yacc.o:  Util:lev_yacc.c $(HDEP) Incl:sp_lev.h Incl:pm.h Incl:onames.h
  1458. X    setdate Util:lev_yacc.c
  1459. X    $(CC) $(DEFSPEC)LEV_LEX_C $(CFLAGS) $(OBJSPEC)$@ Util:lev_yacc.c
  1460. X
  1461. XOBJO:lev_lex.o: Util:lev_lex.c $(HDEP) Incl:lev_comp.h Incl:sp_lev.h
  1462. X    $(CC) $(DEFSPEC)LEV_LEX_C $(CFLAGS) $(OBJSPEC)$@ Util:lev_lex.c
  1463. X
  1464. XOBJO:lev_main.o:  Util:lev_main.c $(HDEP)
  1465. X    $(CC) $(DEFSPEC)LEV_LEX_C $(DEFSPEC)AMIGA $(CFLAGS) $(OBJSPEC)$@ Util:lev_main.c
  1466. X
  1467. XOBJO:dgn_yacc.o:  Util:dgn_yacc.c $(HDEP) Incl:dgn_file.h
  1468. X    $(CC) $(DEFSPEC)LEV_LEX_C $(CFLAGS) $(OBJSPEC)$@ Util:dgn_yacc.c
  1469. X
  1470. XOBJO:dgn_lex.o: Util:dgn_lex.c $(HDEP) Incl:dgn_comp.h
  1471. X    $(CC) $(DEFSPEC)LEV_LEX_C $(CFLAGS) $(OBJSPEC)$@ Util:dgn_lex.c
  1472. X
  1473. XOBJO:dgn_main.o: Util:dgn_main.c $(HDEP)
  1474. X    $(CC) $(DEFSPEC)LEV_LEX_C $(DEFSPEC)AMIGA $(CFLAGS) $(OBJSPEC)$@ Util:dgn_main.c
  1475. X
  1476. XOBJO:panic.o: Util:panic.c $(HDEP)
  1477. X
  1478. XOBJO:recover.o: Util:recover.c $(HDEP)
  1479. X    $(CC) $(DEFSPEC)LEV_LEX_C $(DEFSPEC)AMIGA $(CFLAGS) $(OBJSPEC)$@ Util:recover.c
  1480. X
  1481. XNetHack:recover: OBJO:recover.o
  1482. X    $(LINK) $(PNSPEC)NetHack:recover $(LIN) OBJO:recover.o $(LLIB)
  1483. X
  1484. X# [OPTION] -- If you have flex/bison, leave these uncommented.  Otherwise,
  1485. X# comment them out and be careful! (You're not guaranteed to have the most
  1486. X# up to date *_comp.c, *_comp.h and *_lex.c)
  1487. X
  1488. XIncl:lev_comp.h: Util:lev_yacc.c
  1489. X
  1490. XUtil:lev_yacc.c:  Util:lev_comp.y
  1491. X    $(BISON) -d Util:lev_comp.y
  1492. X    copy Util:lev_comp.tab.c Util:lev_yacc.c
  1493. X    copy Util:lev_comp.tab.h Incl:lev_comp.h
  1494. X    delete Util:lev_comp.tab.c
  1495. X    delete Util:lev_comp.tab.h
  1496. X
  1497. XUtil:lev_lex.c:  Util:lev_comp.l
  1498. X    $(FLEX) Util:lev_comp.l
  1499. X    copy lex.yy.c Util:lev_lex.c
  1500. X    delete lex.yy.c
  1501. X
  1502. XIncl:dgn_comp.h: Util:dgn_yacc.c
  1503. X
  1504. XUtil:dgn_yacc.c:  Util:dgn_comp.y
  1505. X    $(BISON) -d Util:dgn_comp.y
  1506. X    copy Util:dgn_comp.tab.c Util:dgn_yacc.c
  1507. X    copy Util:dgn_comp.tab.h Incl:dgn_comp.h
  1508. X    delete Util:dgn_comp.tab.c
  1509. X    delete Util:dgn_comp.tab.h
  1510. X
  1511. XUtil:dgn_lex.c:  Util:dgn_comp.l
  1512. X    $(FLEX) Util:dgn_comp.l
  1513. X    copy lex.yy.c Util:dgn_lex.c
  1514. X    delete lex.yy.c
  1515. X
  1516. X#
  1517. X#    The following include files depend on makedefs to be created.
  1518. X#    As a result, they are not defined in HACKINCL, instead, their
  1519. X#    dependencies are explicitly outlined here.
  1520. X#
  1521. X
  1522. X#
  1523. X#    date.h should be remade any time any of the source or include code
  1524. X#    is modified.  Unfortunately, this would make the contents of this
  1525. X#    file far more complex.    Since "hack.h" depends on most of the include
  1526. X#    files, we kludge around this by making date.h dependent on hack.h,
  1527. X#    even though it doesn't include this file.
  1528. X#
  1529. X
  1530. XIncl:date.h Dat:options:  $(HDEP) NetHack:makedefs $(AMIGAOBJ)
  1531. X    NetHack:makedefs -v
  1532. X    $(EXECUTE) Amiga:ifchange MOVE Incl:t.date.h Incl:date.h
  1533. X    -wait 2
  1534. X
  1535. XIncl:onames.h:  NetHack:makedefs
  1536. X    NetHack:makedefs -o
  1537. X    $(EXECUTE) Amiga:ifchange TOUCH Incl:t.onames.h Incl:onames.h Incl:decl.h
  1538. X    $(EXECUTE) Amiga:ifchange MOVE Incl:t.onames.h Incl:onames.h
  1539. X    -wait 2
  1540. X
  1541. XIncl:pm.h:  NetHack:makedefs
  1542. X    NetHack:makedefs -p
  1543. X    $(EXECUTE) Amiga:ifchange TOUCH Incl:t.pm.h Incl:pm.h Incl:decl.h Incl:youprop.h
  1544. X    $(EXECUTE) Amiga:ifchange MOVE Incl:t.pm.h Incl:pm.h
  1545. X    -wait 2
  1546. X
  1547. XNetHack:quest.dat:    Dat:quest.dat
  1548. X    copy Dat:quest.dat $@
  1549. X
  1550. XDat:quest.dat:    Dat:quest.txt NetHack:makedefs
  1551. X    NetHack:makedefs -q
  1552. X
  1553. XNHS:monstr.c:  $(HDEP) NetHack:makedefs
  1554. X    NetHack:makedefs -m
  1555. X    -wait 2
  1556. X
  1557. XDat:oracles:    Dat:oracles.txt NetHack:makedefs
  1558. X    NetHack:makedefs -h
  1559. X    -wait 2
  1560. X
  1561. X#
  1562. X#    The following programs vary depending on what OS you are using.
  1563. X#    As a result, they are not defined in HACKSRC and their dependancies
  1564. X#    are explicitly outlined here.
  1565. X#
  1566. X
  1567. XOBJ:amidos.o:  Amiga:amidos.c $(HDEP)
  1568. X
  1569. XOBJ:amirip.o:  Amiga:amirip.c $(HDEP)
  1570. X
  1571. XOBJ:amiwind.o:  Amiga:amiwind.c Amiga:amimenu.c $(HDEP)
  1572. X
  1573. XOBJ:winami.o:    Amiga:winami.c $(HDEP) Amiga:char.c Amiga:colorwin.c Amiga:randwin.c
  1574. X
  1575. XOBJ:amiwbench.o:  Amiga:amiwbench.c $(HDEP)
  1576. X
  1577. XOBJ:random.o:  Share:random.c
  1578. X
  1579. XOBJ:pcmain.o:  Share:pcmain.c $(HDEP)
  1580. X
  1581. X# Stuff to build the front ends
  1582. XNetHack:HackWB: OBJO:wb.o OBJO:wbx.o OBJO:loader.o OBJO:multi.o
  1583. X    $(LINK) $(PNSPEC)NetHack:HackWB $(LIN) OBJO:wb.o OBJO:wbx.o OBJO:loader.o OBJO:multi.o $(LLIB)
  1584. X
  1585. XNetHack:HackCli: OBJO:cli.o OBJO:loader.o OBJO:multi.o
  1586. X    $(LINK) $(PNSPEC)NetHack:HackCli $(LIN) OBJO:cli.o OBJO:loader.o OBJO:multi.o $(LLIB)
  1587. X
  1588. X# This needs to exist to eliminate the HackWB startup message
  1589. XNetHack:WBDefaults.def:
  1590. X    echo to NetHack:WBDefaults.def
  1591. X
  1592. XWBH    = Amiga:wbdefs.h Amiga:wbstruct.h Amiga:wbprotos.h
  1593. XASP    = Amiga:splitter
  1594. XOBJO:wb.o: $(WBH) Amiga:wb.c Amiga:wbwin.c Amiga:wbdata.c
  1595. X    $(CC) $(WBCFLAGS) $(SPLFLAGS) $(OBJSPEC)OBJO:wb.o Amiga:wb.c
  1596. XOBJO:wbx.o: $(WBH) Amiga:wbcli.c Amiga:wbwin.c Amiga:wbdata.c Incl:date.h
  1597. X    $(CC) $(WBCFLAGS) $(SPLFLAGS) $(OBJSPEC)OBJO:wbx.o Amiga:wbcli.c
  1598. XOBJO:loader.o: $(ASP)/loader.c $(ASP)/split.h $(ASP)/amiout.h $(ASP)/multi.h
  1599. X    $(CC) $(WBCFLAGS) $(SPLFLAGS) $(OBJSPEC)OBJO:loader.o $(ASP)/loader.c
  1600. XOBJO:multi.o: $(ASP)/multi.c $(ASP)/multi.h
  1601. X    $(CC) $(WBCFLAGS) $(SPLFLAGS) $(OBJSPEC)OBJO:multi.o $(ASP)/multi.c
  1602. XOBJO:cli.o: $(WBH) Amiga:wbcli.c Incl:date.h
  1603. X    $(CC) $(WBCFLAGS) $(WBC2FLAGS) $(SPLFLAGS) $(OBJSPEC)OBJO:cli.o Amiga:wbcli.c
  1604. X####
  1605. X# splitter support
  1606. XNetHack:splitter:    OBJO:splitter.o OBJO:arg.o
  1607. X    $(LINK) $(PNSPEC)NetHack:splitter $(LIN) OBJO:splitter.o OBJO:arg.o $(LLIB)
  1608. XHackExe:NetHack.dir:    NetHack:splitter Hackexe:NetHack
  1609. X    NetHack:splitter $(GAME)
  1610. X
  1611. XOBJO:splitter.o:    $(ASP)/splitter.c $(ASP)/split.h $(ASP)/amiout.h $(ASP)/arg.h
  1612. X    $(CC) $(WBCFLAGS) $(SPLFLAGS) $(OBJSPEC)OBJO:splitter.o $(ASP)/splitter.c
  1613. XOBJO:arg.o:    $(ASP)/arg.c $(ASP)/arg.h
  1614. X    $(CC) $(WBCFLAGS) $(SPLFLAGS) $(OBJSPEC)OBJO:arg.o $(ASP)/arg.c 
  1615. X
  1616. X# Create/copy other stuff into NetHack: directory:
  1617. X
  1618. X# quest files
  1619. XADFILES= NetHack:A-goal.lev NetHack:A-fill.lev NetHack:A-locate.lev NetHack:A-start.lev
  1620. XBDFILES= NetHack:B-goal.lev NetHack:B-fill.lev NetHack:B-locate.lev NetHack:B-start.lev
  1621. XCDFILES= NetHack:C-goal.lev NetHack:C-fill.lev NetHack:C-locate.lev NetHack:C-start.lev
  1622. XEDFILES= NetHack:E-goal.lev NetHack:E-fill.lev NetHack:E-locate.lev NetHack:E-start.lev
  1623. XHDFILES= NetHack:H-goal.lev NetHack:H-fill.lev NetHack:H-locate.lev NetHack:H-start.lev
  1624. XKDFILES= NetHack:K-goal.lev NetHack:K-fill.lev NetHack:K-locate.lev NetHack:K-start.lev
  1625. XPDFILES= NetHack:P-goal.lev NetHack:P-fill.lev NetHack:P-locate.lev NetHack:P-start.lev
  1626. XRDFILES= NetHack:R-goal.lev NetHack:R-fill.lev NetHack:R-locate.lev NetHack:R-start.lev
  1627. XSDFILES= NetHack:S-goal.lev NetHack:S-fill.lev NetHack:S-locate.lev NetHack:S-start.lev
  1628. XTDFILES= NetHack:T-goal.lev NetHack:T-fill.lev NetHack:T-locate.lev NetHack:T-start.lev
  1629. XVDFILES= NetHack:V-goal.lev NetHack:V-fill.lev NetHack:V-locate.lev NetHack:V-start.lev
  1630. XWDFILES= NetHack:W-goal.lev NetHack:W-fill.lev NetHack:W-locate.lev NetHack:W-start.lev
  1631. X
  1632. XXDFILES=    $(ADFILES) $(BDFILES) $(CDFILES) $(EDFILES) $(HDFILES) \
  1633. X        $(KDFILES) $(PDFILES) $(RDFILES) $(SDFILES) $(TDFILES) \
  1634. X        $(VDFILES) $(WDFILES)
  1635. X
  1636. XINSTDUNGEONFILES= \
  1637. X    NetHack:NetHack.cnf NetHack:air.lev NetHack:asmodeus.lev \
  1638. X    NetHack:astral.lev NetHack:baalz.lev NetHack:bigroom.lev \
  1639. X    NetHack:castle.lev NetHack:dungeon NetHack:earth.lev \
  1640. X    NetHack:fakewiz1.lev NetHack:fakewiz2.lev NetHack:fire.lev \
  1641. X    NetHack:juiblex.lev NetHack:knox.lev NetHack:medusa-1.lev \
  1642. X    NetHack:medusa-2.lev NetHack:mine_end.lev NetHack:minefill.lev \
  1643. X    NetHack:minetown.lev NetHack:options NetHack:oracle.lev \
  1644. X    NetHack:orcus.lev NetHack:sanctum.lev NetHack:tower1.lev \
  1645. X    NetHack:tower2.lev NetHack:tower3.lev NetHack:valley.lev \
  1646. X    NetHack:water.lev NetHack:wizard1.lev NetHack:wizard2.lev \
  1647. X    NetHack:wizard3.lev $(XDFILES)
  1648. X
  1649. XDUNGEONTOOLS= \
  1650. X    NetHack:lev_comp NetHack:dgn_comp NetHack:makedefs
  1651. X
  1652. Xinst-dungeon: $(INSTDUNGEONFILES)
  1653. X
  1654. XNetHack:options : Dat:options
  1655. X    copy Dat:options $@
  1656. X
  1657. X# Create compiled dungeon files
  1658. XNetHack:bigroom.lev:    Dat:bigroom.des NetHack:lev_comp
  1659. X    NetHack:lev_comp Dat:bigroom.des
  1660. X
  1661. XNetHack:castle.lev:  Dat:castle.des NetHack:lev_comp
  1662. X    NetHack:lev_comp Dat:castle.des
  1663. X
  1664. XNetHack:air.lev NetHack:earth.lev NetHack:fire.lev NetHack:water.lev NetHack:astral.lev:    Dat:endgame.des NetHack:lev_comp
  1665. X    NetHack:lev_comp Dat:endgame.des
  1666. X
  1667. XNetHack:asmodeus.lev NetHack:baalz.lev NetHack:juiblex.lev NetHack:orcus.lev NetHack:sanctum.lev NetHack:valley.lev:    Dat:gehennom.des NetHack:lev_comp
  1668. X    NetHack:lev_comp Dat:gehennom.des
  1669. X
  1670. XNetHack:knox.lev: Dat:knox.des NetHack:lev_comp
  1671. X    NetHack:lev_comp Dat:knox.des
  1672. X
  1673. XNetHack:mine_end.lev NetHack:minetown.lev NetHack:minefill.lev: Dat:mines.des NetHack:lev_comp
  1674. X    NetHack:lev_comp Dat:mines.des
  1675. X
  1676. XNetHack:oracle.lev: Dat:oracle.des NetHack:lev_comp
  1677. X    NetHack:lev_comp Dat:oracle.des
  1678. X
  1679. XNetHack:tower1.lev NetHack:tower2.lev NetHack:tower3.lev:  Dat:tower.des NetHack:lev_comp
  1680. X    NetHack:lev_comp Dat:tower.des
  1681. X
  1682. XNetHack:wizard1.lev NetHack:wizard2.lev NetHack:wizard3.lev NetHack:fakewiz1.lev NetHack:fakewiz2.lev:   Dat:yendor.des NetHack:lev_comp
  1683. X    NetHack:lev_comp Dat:yendor.des
  1684. X
  1685. XNetHack:medusa-1.lev NetHack:medusa-2.lev: Dat:medusa.des NetHack:lev_comp
  1686. X    NetHack:lev_comp Dat:medusa.des
  1687. X
  1688. X$(ADFILES):    Dat:Arch.des NetHack:lev_comp
  1689. X    NetHack:lev_comp Dat:Arch.des
  1690. X
  1691. X$(BDFILES):    Dat:Barb.des NetHack:lev_comp
  1692. X    NetHack:lev_comp Dat:Barb.des
  1693. X
  1694. X$(CDFILES):    Dat:Caveman.des NetHack:lev_comp
  1695. X    NetHack:lev_comp Dat:Caveman.des
  1696. X
  1697. X$(EDFILES):    Dat:Elf.des NetHack:lev_comp
  1698. X    NetHack:lev_comp Dat:Elf.des
  1699. X
  1700. X$(HDFILES):    Dat:Healer.des NetHack:lev_comp
  1701. X    NetHack:lev_comp Dat:Healer.des
  1702. X
  1703. X$(KDFILES):    Dat:Knight.des NetHack:lev_comp
  1704. X    NetHack:lev_comp Dat:Knight.des
  1705. X
  1706. X$(PDFILES):    Dat:Priest.des NetHack:lev_comp
  1707. X    NetHack:lev_comp Dat:Priest.des
  1708. X
  1709. X$(RDFILES):    Dat:Rogue.des NetHack:lev_comp
  1710. X    NetHack:lev_comp Dat:Rogue.des
  1711. X
  1712. X$(SDFILES):    Dat:Samurai.des NetHack:lev_comp
  1713. X    NetHack:lev_comp Dat:Samurai.des
  1714. X
  1715. X$(TDFILES):    Dat:Tourist.des NetHack:lev_comp
  1716. X    NetHack:lev_comp Dat:Tourist.des
  1717. X
  1718. X$(VDFILES):    Dat:Valkyrie.des NetHack:lev_comp
  1719. X    NetHack:lev_comp Dat:Valkyrie.des
  1720. X
  1721. X$(WDFILES):    Dat:Wizard.des NetHack:lev_comp
  1722. X    NetHack:lev_comp Dat:Wizard.des
  1723. X
  1724. X
  1725. XNetHack:dungeon:  Dat:dungeon.def NetHack:makedefs NetHack:dgn_comp
  1726. X    NetHack:makedefs -e
  1727. X    NetHack:dgn_comp Dat:dungeon.pdf
  1728. X    copy Dat:dungeon NetHack:dungeon
  1729. X    delete Dat:dungeon
  1730. X
  1731. XDATAFILES= \
  1732. X    Dat:data Dat:rumors Dat:cmdhelp Dat:quest.dat
  1733. XINSTDATAFILES= \
  1734. X    NetHack:cmdhelp NetHack:data NetHack:help NetHack:hh NetHack:history \
  1735. X    NetHack:license NetHack:logfile NetHack:opthelp NetHack:oracles \
  1736. X    NetHack:perm NetHack:quest.dat NetHack:record NetHack:rumors \
  1737. X    NetHack:wizhelp NetHack:HackWB.hlp NetHack:WBDefaults.def \
  1738. X    NetHack:amii.hlp
  1739. X
  1740. Xinst-data: $(INSTDATAFILES)
  1741. X
  1742. XNetHack:amii.hlp: Amiga:amii.hlp
  1743. X    copy Amiga:amii.hlp $@
  1744. X
  1745. XNetHack:data:  Dat:data
  1746. X    copy Dat:data $@
  1747. X
  1748. XDat:data:  Dat:data.base Incl:config.h NetHack:makedefs
  1749. X    NetHack:makedefs -d
  1750. X
  1751. XNetHack:rumors:  Dat:rumors
  1752. X    copy Dat:rumors $@
  1753. X
  1754. XDat:rumors:  Dat:rumors.tru Dat:rumors.fal NetHack:makedefs
  1755. X    NetHack:makedefs -r
  1756. X
  1757. XNetHack:cmdhelp:  Dat:cmdhelp
  1758. X    copy Dat:cmdhelp $@
  1759. X
  1760. XNetHack:help:  Dat:help
  1761. X    copy Dat:help $@
  1762. X
  1763. XNetHack:hh:  Dat:hh
  1764. X    copy Dat:hh $@
  1765. X
  1766. XNetHack:HackWB.hlp: Amiga:HackWB.hlp
  1767. X    copy Amiga:HackWB.hlp $@
  1768. X
  1769. XNetHack:history:  Dat:history
  1770. X    copy Dat:history $@
  1771. X
  1772. XNetHack:license:  Dat:license
  1773. X    copy Dat:license $@
  1774. X
  1775. XNetHack:opthelp:  Dat:opthelp
  1776. X    copy Dat:opthelp $@
  1777. X
  1778. XNetHack:oracles:  Dat:oracles
  1779. X    copy Dat:oracles $@
  1780. X
  1781. XNetHack:perm:
  1782. X    echo to $@
  1783. X
  1784. XNetHack:logfile:
  1785. X    echo to $@
  1786. X
  1787. XNetHack:record:
  1788. X    echo to $@
  1789. X
  1790. XNetHack:wizhelp:
  1791. X    copy Dat:wizhelp $@
  1792. X
  1793. X# Create the directories here because NetHack.cnf puts them there by default
  1794. XNetHack:NetHack.cnf:  Amiga:NetHack.cnf
  1795. X    copy Amiga:NetHack.cnf $@
  1796. X    -makedir nethack:save
  1797. X    -makedir nethack:levels
  1798. X
  1799. X# Unpack and install fonts
  1800. X
  1801. XINSTFONTFILES= \
  1802. X    NetHack:hack.font NetHack:hack NetHack:hack/8
  1803. Xinst-fonts: $(INSTFONTFILES)
  1804. X
  1805. XNetHack:hack/8:  Amiga:amifont8.uu NetHack:hack
  1806. X    $(UUDEC) Amiga:amifont8.uu
  1807. X    -rename 8 hack/8
  1808. X
  1809. XNetHack:hack.font:  Amiga:amifont.uu
  1810. X    $(UUDEC) Amiga:amifont.uu
  1811. X
  1812. XNetHack:hack:
  1813. X    makedir $@
  1814. X
  1815. XINSTICONFILES= \
  1816. X    NetHack:default.icon NetHack:NetHack.info NetHack:NewGame.info \
  1817. X    NetHack:HackWB.info
  1818. X
  1819. Xinst-icons: $(INSTICONFILES)
  1820. X
  1821. X# Unpack the icons into place
  1822. X
  1823. XNetHack:default.icon:  Amiga:dflticon.uu
  1824. X    $(UUDEC) Amiga:dflticon.uu
  1825. X
  1826. XNetHack:NetHack.info:  Amiga:NHinfo.uu
  1827. X    $(UUDEC) Amiga:NHinfo.uu
  1828. X
  1829. XNetHack:NewGame.info:  Amiga:NewGame.uu
  1830. X    $(UUDEC) Amiga:NewGame.uu
  1831. X
  1832. XNetHack:HackWB.info:  Amiga:HackWB.uu
  1833. X    $(UUDEC) Amiga:HackWB.uu
  1834. X
  1835. X# DO NOT DELETE THIS LINE
  1836. X
  1837. XOBJ:allmain.o:  NHS:allmain.c $(HDEP)
  1838. XOBJ:alloc.o:  NHS:alloc.c Incl:config.h
  1839. XOBJ:apply.o:  NHS:apply.c $(HDEP) Incl:edog.h
  1840. X    $(CC) $(CFLAGS) $(CFLAGS2) $(OBJSPEC)$@ NHS:apply.c
  1841. XOBJ:artifact.o:  NHS:artifact.c $(HDEP) Incl:artifact.h Incl:artilist.h
  1842. XOBJ:attrib.o:  NHS:attrib.c $(HDEP)
  1843. XOBJ:ball.o: NHS:ball.c $(HDEP)
  1844. XOBJ:bones.o:  NHS:bones.c $(HDEP) Incl:lev.h
  1845. XOBJ:botl.o:    NHS:botl.c $(HDEP)
  1846. XOBJ:cmd.o:  NHS:cmd.c $(HDEP) Incl:func_tab.h
  1847. XOBJ:dbridge.o:  NHS:dbridge.c $(HDEP)
  1848. XOBJ:decl.o:  NHS:decl.c $(HDEP) Incl:quest.h
  1849. XOBJ:detect.o: NHS:detect.c $(HDEP) Incl:artifact.h
  1850. XOBJ:display.o:  NHS:display.c $(HDEP)
  1851. XOBJ:do.o:  NHS:do.c $(HDEP) Incl:lev.h
  1852. XOBJ:do_name.o:  NHS:do_name.c $(HDEP)
  1853. XOBJ:do_wear.o:  NHS:do_wear.c $(HDEP)
  1854. XOBJ:dog.o:  NHS:dog.c $(HDEP) Incl:edog.h
  1855. XOBJ:dogmove.o:  NHS:dogmove.c $(HDEP) Incl:mfndpos.h Incl:edog.h
  1856. XOBJ:dokick.o:  NHS:dokick.c $(HDEP) Incl:eshk.h
  1857. XOBJ:dothrow.o:  NHS:dothrow.c $(HDEP)
  1858. XOBJ:drawing.o:  NHS:drawing.c $(HDEP) Incl:termcap.h
  1859. XOBJ:dungeon.o:  NHS:dungeon.c $(HDEP) Incl:dgn_file.h
  1860. XOBJ:eat.o:  NHS:eat.c $(HDEP)
  1861. XOBJ:end.o:  NHS:end.c $(HDEP) Incl:eshk.h
  1862. XOBJ:engrave.o:  NHS:engrave.c $(HDEP) Incl:lev.h
  1863. XOBJ:exper.o:  NHS:exper.c $(HDEP)
  1864. XOBJ:explode.o:  NHS:explode.c $(HDEP)
  1865. XOBJ:extralev.o:  NHS:extralev.c $(HDEP)
  1866. XOBJ:files.o:  NHS:files.c $(HDEP)
  1867. XOBJ:fountain.o:  NHS:fountain.c $(HDEP)
  1868. XOBJ:hack.o:  NHS:hack.c $(HDEP)
  1869. XOBJ:invent.o:  NHS:invent.c $(HDEP)
  1870. XOBJ:lock.o:  NHS:lock.c $(HDEP)
  1871. XOBJ:mail.o:  NHS:mail.c $(HDEP) Incl:mail.h
  1872. XOBJ:makemon.o:  NHS:makemon.c $(HDEP) Incl:epri.h Incl:emin.h
  1873. XOBJ:mcastu.o:  NHS:mcastu.c $(HDEP)
  1874. XOBJ:mhitm.o:  NHS:mhitm.c $(HDEP) Incl:artifact.h Incl:edog.h
  1875. XOBJ:mhitu.o:  NHS:mhitu.c $(HDEP) Incl:artifact.h Incl:edog.h
  1876. XOBJ:minion.o:  NHS:minion.c $(HDEP) Incl:emin.h Incl:epri.h
  1877. XOBJ:mklev.o:  NHS:mklev.c $(HDEP)
  1878. XOBJ:mkmap.o:  NHS:mkmap.c $(HDEP)
  1879. XOBJ:mkmaze.o:  NHS:mkmaze.c $(HDEP) Incl:sp_lev.h
  1880. XOBJ:mkobj.o:  NHS:mkobj.c $(HDEP) Incl:artifact.h Incl:prop.h
  1881. XOBJ:mkroom.o:  NHS:mkroom.c $(HDEP)
  1882. XOBJ:mon.o:  NHS:mon.c $(HDEP) Incl:mfndpos.h
  1883. XOBJ:mondata.o:  NHS:mondata.c $(HDEP) Incl:eshk.h Incl:epri.h
  1884. XOBJ:monmove.o:  NHS:monmove.c $(HDEP) Incl:mfndpos.h Incl:artifact.h
  1885. XOBJ:monst.o:  NHS:monst.c Incl:config.h Incl:permonst.h Incl:monsym.h Incl:eshk.h Incl:vault.h Incl:epri.h Incl:color.h
  1886. XOBJ:monstr.o:  NHS:monstr.c $(HDEP)
  1887. XOBJ:mplayer.o:    NHS:mplayer.c $(HDEP)
  1888. XOBJ:mthrowu.o:  NHS:mthrowu.c $(HDEP)
  1889. XOBJ:hacklib.o:  NHS:hacklib.c $(HDEP)
  1890. XOBJ:muse.o:    NHS:muse.c $(HDEP)
  1891. XOBJ:music.o:  NHS:music.c $(HDEP)
  1892. XOBJ:o_init.o:  NHS:o_init.c $(HDEP)
  1893. XOBJ:objects.o:  NHS:objects.c Incl:config.h Incl:obj.h Incl:objclass.h Incl:prop.h Incl:color.h
  1894. X    $(CC) $(CFLAGS) $(INCLSPEC)NHS: $(OBJSPEC)$@ NHS:objects.c
  1895. XOBJ:objnam.o:  NHS:objnam.c $(HDEP)
  1896. XOBJ:options.o:  NHS:options.c $(HDEP) Incl:termcap.h
  1897. XOBJ:pager.o:  NHS:pager.c $(HDEP)
  1898. XOBJ:pickup.o:  NHS:pickup.c $(HDEP)
  1899. XOBJ:pline.o:    NHS:pline.c $(HDEP) Incl:epri.h
  1900. XOBJ:polyself.o:  NHS:polyself.c $(HDEP)
  1901. XOBJ:potion.o:  NHS:potion.c $(HDEP)
  1902. XOBJ:pray.o:  NHS:pray.c $(HDEP) Incl:epri.h
  1903. XOBJ:priest.o:  NHS:priest.c $(HDEP) Incl:mfndpos.h Incl:eshk.h Incl:epri.h Incl:emin.h
  1904. XOBJ:quest.o:    NHS:quest.c $(HDEP) Incl:quest.h Incl:qtext.h
  1905. XOBJ:questpgr.o: NHS:questpgr.c $(HDEP) Incl:qtext.h
  1906. XOBJ:read.o:  NHS:read.c $(HDEP)
  1907. XOBJ:rect.o:    NHS:rect.c $(HDEP)
  1908. XOBJ:restore.o:  NHS:restore.c $(HDEP) Incl:lev.h Incl:termcap.h Incl:quest.h
  1909. XOBJ:rnd.o:  NHS:rnd.c $(HDEP)
  1910. XOBJ:rumors.o:  NHS:rumors.c $(HDEP)
  1911. XOBJ:save.o:  NHS:save.c $(HDEP) Incl:lev.h Incl:quest.h
  1912. XOBJ:shk.o:  NHS:shk.c $(HDEP) Incl:eshk.h
  1913. XOBJ:shknam.o:  NHS:shknam.c $(HDEP) Incl:eshk.h
  1914. XOBJ:sit.o:  NHS:sit.c $(HDEP)
  1915. XOBJ:sounds.o:  NHS:sounds.c $(HDEP) Incl:edog.h Incl:eshk.h
  1916. XOBJ:sp_lev.o:  NHS:sp_lev.c $(HDEP) Incl:sp_lev.h Incl:rect.h
  1917. XOBJ:spell.o:  NHS:spell.c $(HDEP)
  1918. XOBJ:steal.o:  NHS:steal.c $(HDEP)
  1919. XOBJ:timeout.o:  NHS:timeout.c $(HDEP)
  1920. XOBJ:topten.o:  NHS:topten.c $(HDEP)
  1921. XOBJ:track.o:  NHS:track.c $(HDEP)
  1922. XOBJ:trap.o:  NHS:trap.c $(HDEP) Incl:edog.h
  1923. XOBJ:u_init.o:  NHS:u_init.c $(HDEP)
  1924. XOBJ:uhitm.o:  NHS:uhitm.c $(HDEP)
  1925. XOBJ:vault.o:  NHS:vault.c $(HDEP) Incl:vault.h
  1926. XOBJ:version.o:  NHS:version.c $(HDEP) Incl:date.h Incl:patchlevel.h
  1927. XOBJ:vision.o:  NHS:vision.c $(HDEP)
  1928. XOBJ:weapon.o:  NHS:weapon.c $(HDEP)
  1929. XOBJ:were.o:  NHS:were.c $(HDEP)
  1930. XOBJ:wield.o:  NHS:wield.c $(HDEP)
  1931. XOBJ:wizard.o:  NHS:wizard.c $(HDEP) Incl:qtext.h
  1932. XOBJ:windows.o:  NHS:windows.c $(HDEP)
  1933. XOBJ:worm.o:  NHS:worm.c $(HDEP) Incl:lev.h
  1934. XOBJ:worn.o:  NHS:worn.c $(HDEP)
  1935. XOBJ:write.o:  NHS:write.c $(HDEP)
  1936. XOBJ:zap.o:  NHS:zap.c $(HDEP)
  1937. XIncl:config.h:  Incl:tradstdc.h Incl:global.h
  1938. X    -setdate Incl:config.h
  1939. X    -wait 2
  1940. X# onames.h handled at onames.h target, pm.h
  1941. XIncl:decl.h:  Incl:quest.h Incl:spell.h Incl:color.h Incl:obj.h Incl:you.h
  1942. X    -setdate Incl:decl.h
  1943. X    -wait 2
  1944. XIncl:global.h:  Incl:coord.h Incl:pcconf.h Incl:amiconf.h
  1945. X    -setdate Incl:global.h
  1946. X    -wait 2
  1947. X
  1948. XIncl:hack.h:  Incl:config.h Incl:trap.h Incl:decl.h Incl:dungeon.h Incl:monsym.h Incl:mkroom.h Incl:objclass.h Incl:flag.h Incl:rm.h Incl:vision.h Incl:display.h Incl:wintype.h Incl:engrave.h Incl:rect.h Incl:trampoli.h
  1949. X    -setdate Incl:hack.h
  1950. X    -wait 2
  1951. XIncl:permonst.h:  Incl:monattk.h Incl:monflag.h Incl:align.h
  1952. X    -setdate Incl:permonst.h
  1953. X    -wait 2
  1954. XIncl:you.h:  Incl:align.h Incl:attrib.h Incl:monst.h Incl:youprop.h
  1955. X    -setdate Incl:you.h
  1956. X    -wait 2
  1957. X# pm.h handled at target
  1958. XIncl:youprop.h:  Incl:prop.h Incl:permonst.h Incl:mondata.h
  1959. X    -setdate Incl:youprop.h
  1960. X    -wait 2
  1961. XIncl:display.h: Incl:vision.h Incl:mondata.h
  1962. X    -setdate Incl:display.h
  1963. X    -wait 2
  1964. XIncl:dungeon.h: Incl:align.h
  1965. X    -setdate Incl:dungeon.h
  1966. X    -wait 2
  1967. XIncl:emin.h: Incl:dungeon.h
  1968. X    -setdate Incl:emin.h
  1969. X    -wait 2
  1970. XIncl:epri.h: Incl:dungeon.h Incl:align.h
  1971. X    -setdate Incl:epri.h
  1972. X    -wait 2
  1973. XIncl:eshk: Incl:Inl:dungeon.h
  1974. X    -setdate Incl:eshk.h
  1975. X    -wait 2
  1976. XIncl:engrave.h: Incl:trampoli.h Incl:rect.h
  1977. X    -setdate Incl:engrave.h
  1978. X    -wait 2
  1979. XIncl:mondata.h: Incl:align.h
  1980. X    -setdate Incl:mondata.h
  1981. X    -wait 2
  1982. XIncl:monst.h: Incl:align.h
  1983. X    -setdate Incl:monst.h
  1984. X    -wait 2
  1985. XIncl:pcconf.h: Incl:micro.h Incl:system.h
  1986. X    -setdate Incl:pcconf.h
  1987. X    -wait 2
  1988. XIncl:rm.h: Incl:align.h
  1989. X    -setdate Incl:rm.h
  1990. X    -wait 2
  1991. XIncl:vault.h: Incl:dungeon.h
  1992. X    -setdate Incl:vault.h
  1993. X    -wait 2
  1994. END_OF_FILE
  1995. if test 32666 -ne `wc -c <'sys/amiga/Makefile.ami'`; then
  1996.     echo shar: \"'sys/amiga/Makefile.ami'\" unpacked with wrong size!
  1997. fi
  1998. # end of 'sys/amiga/Makefile.ami'
  1999. fi
  2000. echo shar: End of archive 63 \(of 108\).
  2001. cp /dev/null ark63isdone
  2002. MISSING=""
  2003. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 \
  2004. 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 \
  2005. 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 \
  2006. 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 \
  2007. 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 \
  2008. 101 102 103 104 105 106 107 108 ; do
  2009.     if test ! -f ark${I}isdone ; then
  2010.     MISSING="${MISSING} ${I}"
  2011.     fi
  2012. done
  2013. if test "${MISSING}" = "" ; then
  2014.     echo You have unpacked all 108 archives.
  2015.     echo "Now execute 'rebuild.sh'"
  2016.     rm -f ark10[0-8]isdone ark[1-9]isdone ark[1-9][0-9]isdone
  2017. else
  2018.     echo You still need to unpack the following archives:
  2019.     echo "        " ${MISSING}
  2020. fi
  2021. ##  End of shell archive.
  2022. exit 0
  2023.