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

  1. Path: uunet!news.tek.com!saab!billr
  2. From: billr@saab.CNA.TEK.COM (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v17i087:  nethack31 - display oriented dungeons & dragons (Ver. 3.1), Patch2l/33
  5. Date: 11 Jun 1993 00:10:40 GMT
  6. Organization: Tektronix, Inc, Redmond, OR, USA
  7. Lines: 2259
  8. Approved: billr@saab.CNA.TEK.COM
  9. Message-ID: <1v8ii0$j18@ying.cna.tek.com>
  10. NNTP-Posting-Host: saab.cna.tek.com
  11. Xref: uunet comp.sources.games:1775
  12.  
  13. Submitted-by: izchak@linc.cis.upenn.edu (Izchak Miller)
  14. Posting-number: Volume 17, Issue 87
  15. Archive-name: nethack31/Patch2l
  16. Patch-To: nethack31: Volume 16, Issue 1-116
  17. Environment: Amiga, Atari, Mac, MS-DOS, Windows-NT, OS2, Unix, VMS, X11
  18.  
  19.  
  20.  
  21. #! /bin/sh
  22. # This is a shell archive.  Remove anything before this line, then unpack
  23. # it by saving it into a file and typing "sh file".  To overwrite existing
  24. # files, type "sh file -c".  You can also feed this as standard input via
  25. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  26. # will see the following message at the end:
  27. #        "End of archive 12 (of 33)."
  28. # Contents:  patches02s
  29. # Wrapped by billr@saab on Thu Jun 10 16:55:03 1993
  30. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  31. if test -f 'patches02s' -a "${1}" != "-c" ; then 
  32.   echo shar: Renaming existing file \"'patches02s'\" to \"'patches02s.orig'\"
  33.   mv -f 'patches02s' 'patches02s.orig'
  34. fi
  35. echo shar: Extracting \"'patches02s'\" \(55034 characters\)
  36. sed "s/^X//" >'patches02s' <<'END_OF_FILE'
  37. X*** /tmp/da14212    Tue Jun  1 20:16:50 1993
  38. X--- sys/share/NetHack.cnf    Mon Mar 29 14:33:37 1993
  39. X***************
  40. X*** 1,8 ****
  41. X--- 1,17 ----
  42. X+ #    SCSS Id: @(#)Nethack.cnf    3.1        93/03/26
  43. X+ #    Copyright (c) NetHack PC Development Team 1990, 1991, 1992, 1993
  44. X+ #    NetHack may be freely redistributed.  See license for details.
  45. X+ #
  46. X  # A '#' at the beginning of a line means the rest of the line is a comment.
  47. X  #
  48. X  # This configuration file is set up for two cases, for a hard disk
  49. X  # (as drive C:), and for two floppy disks.
  50. X  #
  51. X+ # Some options MUST be set in this file, other options can be toggled while
  52. X+ # playing.  For a list of options available see the <opthelp.> file.  If
  53. X+ # the game plays slowly you might notice some improvement by setting
  54. X+ # !time and !showexp, which will reduce screen I/O somewhat.
  55. X+ #
  56. X  # To change the configuration, comment out the unwanted lines, and
  57. X  # uncomment the configuration you want.
  58. X  
  59. X***************
  60. X*** 28,34 ****
  61. X  # Other general options.  You might also set "silent" so as not to attract
  62. X  # the boss's attention.
  63. X  #
  64. X! OPTIONS=time,rest_on_space,nopickup,number_pad
  65. X  
  66. X  
  67. X  # *** HARD DISK CONFIGURATION ***
  68. X--- 37,43 ----
  69. X  # Other general options.  You might also set "silent" so as not to attract
  70. X  # the boss's attention.
  71. X  #
  72. X! OPTIONS=time,rest_on_space,noautopickup,number_pad
  73. X  
  74. X  
  75. X  # *** HARD DISK CONFIGURATION ***
  76. X*** /tmp/da14236    Tue Jun  1 20:16:56 1993
  77. X--- sys/share/dgn_yacc.c    Tue Jun  1 20:09:28 1993
  78. X***************
  79. X*** 1,7 ****
  80. X  extern char *malloc(), *realloc();
  81. X! 
  82. X! # line 2 "dgn_comp.y"
  83. X! /*    SCCS Id: @(#)dgn_comp.c    3.1    93/01/17    */
  84. X  /*    Copyright (c) 1989 by Jean-Christophe Collet */
  85. X  /*    Copyright (c) 1990 by M. Stephenson                  */
  86. X  /* NetHack may be freely redistributed.  See license for details. */
  87. X--- 1,5 ----
  88. X  extern char *malloc(), *realloc();
  89. X! /*    SCCS Id: @(#)dgn_comp.c    3.1    93/05/15    */
  90. X  /*    Copyright (c) 1989 by Jean-Christophe Collet */
  91. X  /*    Copyright (c) 1990 by M. Stephenson                  */
  92. X  /* NetHack may be freely redistributed.  See license for details. */
  93. X***************
  94. X*** 27,34 ****
  95. X  #include "config.h"
  96. X  #include "dgn_file.h"
  97. X  
  98. X! void FDECL(yyerror, (char *));
  99. X! void FDECL(yywarning, (char *));
  100. X  int NDECL(yylex);
  101. X  int NDECL(yyparse);
  102. X  int FDECL(getchain, (char *));
  103. X--- 25,32 ----
  104. X  #include "config.h"
  105. X  #include "dgn_file.h"
  106. X  
  107. X! void FDECL(yyerror, (const char *));
  108. X! void FDECL(yywarning, (const char *));
  109. X  int NDECL(yylex);
  110. X  int NDECL(yyparse);
  111. X  int FDECL(getchain, (char *));
  112. X***************
  113. X*** 64,73 ****
  114. X  static int in_dungeon = 0, n_dgns = -1, n_levs = -1, n_brs = -1;
  115. X  
  116. X  extern int fatal_error;
  117. X! extern char* fname;
  118. X  
  119. X- 
  120. X- # line 69 "dgn_comp.y"
  121. X  typedef union 
  122. X  {
  123. X      int    i;
  124. X--- 62,69 ----
  125. X  static int in_dungeon = 0, n_dgns = -1, n_levs = -1, n_brs = -1;
  126. X  
  127. X  extern int fatal_error;
  128. X! extern const char *fname;
  129. X  
  130. X  typedef union 
  131. X  {
  132. X      int    i;
  133. X***************
  134. X*** 104,112 ****
  135. X  YYSTYPE yylval, yyval;
  136. X  # define YYERRCODE 256
  137. X  
  138. X- # line 450 "dgn_comp.y"
  139. X  
  140. X- 
  141. X  void
  142. X  init_dungeon()
  143. X  {
  144. X--- 100,106 ----
  145. X***************
  146. X*** 946,959 ****
  147. X      switch( yytmp )
  148. X      {
  149. X          
  150. X! case 2:
  151. X! # line 86 "dgn_comp.y"
  152. X! {
  153. X              output_dgn();
  154. X            } break;
  155. X! case 9:
  156. X! # line 102 "dgn_comp.y"
  157. X! {
  158. X              init_dungeon();
  159. X              strcpy(tmpdungeon[n_dgns].name, yypvt[-3].str);
  160. X              if (!strcmp(yypvt[-2].str, "none"))
  161. X--- 940,949 ----
  162. X      switch( yytmp )
  163. X      {
  164. X          
  165. X! case 2:{
  166. X              output_dgn();
  167. X            } break;
  168. X! case 9:{
  169. X              init_dungeon();
  170. X              strcpy(tmpdungeon[n_dgns].name, yypvt[-3].str);
  171. X              if (!strcmp(yypvt[-2].str, "none"))
  172. X***************
  173. X*** 966,1010 ****
  174. X              tmpdungeon[n_dgns].lev.rand = couple.rand;
  175. X              tmpdungeon[n_dgns].chance = yypvt[-0].i;
  176. X            } break;
  177. X! case 10:
  178. X! # line 118 "dgn_comp.y"
  179. X! {
  180. X              yyval.i = 0;
  181. X            } break;
  182. X! case 11:
  183. X! # line 122 "dgn_comp.y"
  184. X! {
  185. X              yyval.i = yypvt[-0].i;
  186. X            } break;
  187. X! case 15:
  188. X! # line 133 "dgn_comp.y"
  189. X! {
  190. X              tmpdungeon[n_dgns].entry_lev = yypvt[-0].i;
  191. X            } break;
  192. X! case 17:
  193. X! # line 142 "dgn_comp.y"
  194. X! {
  195. X              if(yypvt[-0].i <= TOWN || yypvt[-0].i >= D_ALIGN_CHAOTIC)
  196. X                  yyerror("Illegal description - ignoring!");
  197. X              else
  198. X                  tmpdungeon[n_dgns].flags |= yypvt[-0].i ;
  199. X            } break;
  200. X! case 18:
  201. X! # line 149 "dgn_comp.y"
  202. X! {
  203. X              if(yypvt[-0].i && yypvt[-0].i < D_ALIGN_CHAOTIC)
  204. X                  yyerror("Illegal alignment - ignoring!");
  205. X              else
  206. X                  tmpdungeon[n_dgns].flags |= yypvt[-0].i ;
  207. X            } break;
  208. X! case 19:
  209. X! # line 158 "dgn_comp.y"
  210. X! {
  211. X              strcpy(tmpdungeon[n_dgns].protoname, yypvt[-0].str);
  212. X            } break;
  213. X! case 25:
  214. X! # line 171 "dgn_comp.y"
  215. X! {
  216. X              init_level();
  217. X              strcpy(tmplevel[n_levs].name, yypvt[-3].str);
  218. X              if (!strcmp(yypvt[-2].str, "none"))
  219. X--- 956,986 ----
  220. X              tmpdungeon[n_dgns].lev.rand = couple.rand;
  221. X              tmpdungeon[n_dgns].chance = yypvt[-0].i;
  222. X            } break;
  223. X! case 10:{
  224. X              yyval.i = 0;
  225. X            } break;
  226. X! case 11:{
  227. X              yyval.i = yypvt[-0].i;
  228. X            } break;
  229. X! case 15:{
  230. X              tmpdungeon[n_dgns].entry_lev = yypvt[-0].i;
  231. X            } break;
  232. X! case 17:{
  233. X              if(yypvt[-0].i <= TOWN || yypvt[-0].i >= D_ALIGN_CHAOTIC)
  234. X                  yyerror("Illegal description - ignoring!");
  235. X              else
  236. X                  tmpdungeon[n_dgns].flags |= yypvt[-0].i ;
  237. X            } break;
  238. X! case 18:{
  239. X              if(yypvt[-0].i && yypvt[-0].i < D_ALIGN_CHAOTIC)
  240. X                  yyerror("Illegal alignment - ignoring!");
  241. X              else
  242. X                  tmpdungeon[n_dgns].flags |= yypvt[-0].i ;
  243. X            } break;
  244. X! case 19:{
  245. X              strcpy(tmpdungeon[n_dgns].protoname, yypvt[-0].str);
  246. X            } break;
  247. X! case 25:{
  248. X              init_level();
  249. X              strcpy(tmplevel[n_levs].name, yypvt[-3].str);
  250. X              if (!strcmp(yypvt[-2].str, "none"))
  251. X***************
  252. X*** 1017,1025 ****
  253. X              tmplevel[n_levs].lev.rand = couple.rand;
  254. X              tmpdungeon[n_dgns].levels++;
  255. X            } break;
  256. X! case 26:
  257. X! # line 185 "dgn_comp.y"
  258. X! {
  259. X              init_level();
  260. X              strcpy(tmplevel[n_levs].name, yypvt[-4].str);
  261. X              if (!strcmp(yypvt[-3].str, "none"))
  262. X--- 993,999 ----
  263. X              tmplevel[n_levs].lev.rand = couple.rand;
  264. X              tmpdungeon[n_dgns].levels++;
  265. X            } break;
  266. X! case 26:{
  267. X              init_level();
  268. X              strcpy(tmplevel[n_levs].name, yypvt[-4].str);
  269. X              if (!strcmp(yypvt[-3].str, "none"))
  270. X***************
  271. X*** 1033,1041 ****
  272. X              tmplevel[n_levs].rndlevs = yypvt[-0].i;
  273. X              tmpdungeon[n_dgns].levels++;
  274. X            } break;
  275. X! case 27:
  276. X! # line 202 "dgn_comp.y"
  277. X! {
  278. X              init_level();
  279. X              strcpy(tmplevel[n_levs].name, yypvt[-4].str);
  280. X              if (!strcmp(yypvt[-3].str, "none"))
  281. X--- 1007,1013 ----
  282. X              tmplevel[n_levs].rndlevs = yypvt[-0].i;
  283. X              tmpdungeon[n_dgns].levels++;
  284. X            } break;
  285. X! case 27:{
  286. X              init_level();
  287. X              strcpy(tmplevel[n_levs].name, yypvt[-4].str);
  288. X              if (!strcmp(yypvt[-3].str, "none"))
  289. X***************
  290. X*** 1049,1057 ****
  291. X              tmplevel[n_levs].chance = yypvt[-0].i;
  292. X              tmpdungeon[n_dgns].levels++;
  293. X            } break;
  294. X! case 28:
  295. X! # line 217 "dgn_comp.y"
  296. X! {
  297. X              init_level();
  298. X              strcpy(tmplevel[n_levs].name, yypvt[-5].str);
  299. X              if (!strcmp(yypvt[-4].str, "none"))
  300. X--- 1021,1027 ----
  301. X              tmplevel[n_levs].chance = yypvt[-0].i;
  302. X              tmpdungeon[n_dgns].levels++;
  303. X            } break;
  304. X! case 28:{
  305. X              init_level();
  306. X              strcpy(tmplevel[n_levs].name, yypvt[-5].str);
  307. X              if (!strcmp(yypvt[-4].str, "none"))
  308. X***************
  309. X*** 1066,1090 ****
  310. X              tmplevel[n_levs].rndlevs = yypvt[-0].i;
  311. X              tmpdungeon[n_dgns].levels++;
  312. X            } break;
  313. X! case 29:
  314. X! # line 235 "dgn_comp.y"
  315. X! {
  316. X              if(yypvt[-0].i >= D_ALIGN_CHAOTIC)
  317. X                  yyerror("Illegal description - ignoring!");
  318. X              else
  319. X                  tmplevel[n_levs].flags |= yypvt[-0].i ;
  320. X            } break;
  321. X! case 30:
  322. X! # line 242 "dgn_comp.y"
  323. X! {
  324. X              if(yypvt[-0].i && yypvt[-0].i < D_ALIGN_CHAOTIC)
  325. X                  yyerror("Illegal alignment - ignoring!");
  326. X              else
  327. X                  tmplevel[n_levs].flags |= yypvt[-0].i ;
  328. X            } break;
  329. X! case 31:
  330. X! # line 251 "dgn_comp.y"
  331. X! {
  332. X              init_level();
  333. X              strcpy(tmplevel[n_levs].name, yypvt[-4].str);
  334. X              if (!strcmp(yypvt[-3].str, "none"))
  335. X--- 1036,1054 ----
  336. X              tmplevel[n_levs].rndlevs = yypvt[-0].i;
  337. X              tmpdungeon[n_dgns].levels++;
  338. X            } break;
  339. X! case 29:{
  340. X              if(yypvt[-0].i >= D_ALIGN_CHAOTIC)
  341. X                  yyerror("Illegal description - ignoring!");
  342. X              else
  343. X                  tmplevel[n_levs].flags |= yypvt[-0].i ;
  344. X            } break;
  345. X! case 30:{
  346. X              if(yypvt[-0].i && yypvt[-0].i < D_ALIGN_CHAOTIC)
  347. X                  yyerror("Illegal alignment - ignoring!");
  348. X              else
  349. X                  tmplevel[n_levs].flags |= yypvt[-0].i ;
  350. X            } break;
  351. X! case 31:{
  352. X              init_level();
  353. X              strcpy(tmplevel[n_levs].name, yypvt[-4].str);
  354. X              if (!strcmp(yypvt[-3].str, "none"))
  355. X***************
  356. X*** 1099,1107 ****
  357. X              if(!check_level()) n_levs--;
  358. X              else tmpdungeon[n_dgns].levels++;
  359. X            } break;
  360. X! case 32:
  361. X! # line 267 "dgn_comp.y"
  362. X! {
  363. X              init_level();
  364. X              strcpy(tmplevel[n_levs].name, yypvt[-5].str);
  365. X              if (!strcmp(yypvt[-4].str, "none"))
  366. X--- 1063,1069 ----
  367. X              if(!check_level()) n_levs--;
  368. X              else tmpdungeon[n_dgns].levels++;
  369. X            } break;
  370. X! case 32:{
  371. X              init_level();
  372. X              strcpy(tmplevel[n_levs].name, yypvt[-5].str);
  373. X              if (!strcmp(yypvt[-4].str, "none"))
  374. X***************
  375. X*** 1117,1125 ****
  376. X              if(!check_level()) n_levs--;
  377. X              else tmpdungeon[n_dgns].levels++;
  378. X            } break;
  379. X! case 33:
  380. X! # line 286 "dgn_comp.y"
  381. X! {
  382. X              init_level();
  383. X              strcpy(tmplevel[n_levs].name, yypvt[-5].str);
  384. X              if (!strcmp(yypvt[-4].str, "none"))
  385. X--- 1079,1085 ----
  386. X              if(!check_level()) n_levs--;
  387. X              else tmpdungeon[n_dgns].levels++;
  388. X            } break;
  389. X! case 33:{
  390. X              init_level();
  391. X              strcpy(tmplevel[n_levs].name, yypvt[-5].str);
  392. X              if (!strcmp(yypvt[-4].str, "none"))
  393. X***************
  394. X*** 1135,1143 ****
  395. X              if(!check_level()) n_levs--;
  396. X              else tmpdungeon[n_dgns].levels++;
  397. X            } break;
  398. X! case 34:
  399. X! # line 303 "dgn_comp.y"
  400. X! {
  401. X              init_level();
  402. X              strcpy(tmplevel[n_levs].name, yypvt[-6].str);
  403. X              if (!strcmp(yypvt[-5].str, "none"))
  404. X--- 1095,1101 ----
  405. X              if(!check_level()) n_levs--;
  406. X              else tmpdungeon[n_dgns].levels++;
  407. X            } break;
  408. X! case 34:{
  409. X              init_level();
  410. X              strcpy(tmplevel[n_levs].name, yypvt[-6].str);
  411. X              if (!strcmp(yypvt[-5].str, "none"))
  412. X***************
  413. X*** 1154,1162 ****
  414. X              if(!check_level()) n_levs--;
  415. X              else tmpdungeon[n_dgns].levels++;
  416. X            } break;
  417. X! case 37:
  418. X! # line 327 "dgn_comp.y"
  419. X! {
  420. X              init_branch();
  421. X              strcpy(tmpbranch[n_brs].name, yypvt[-4].str);
  422. X              tmpbranch[n_brs].lev.base = couple.base;
  423. X--- 1112,1118 ----
  424. X              if(!check_level()) n_levs--;
  425. X              else tmpdungeon[n_dgns].levels++;
  426. X            } break;
  427. X! case 37:{
  428. X              init_branch();
  429. X              strcpy(tmpbranch[n_brs].name, yypvt[-4].str);
  430. X              tmpbranch[n_brs].lev.base = couple.base;
  431. X***************
  432. X*** 1166,1174 ****
  433. X              if(!check_branch()) n_brs--;
  434. X              else tmpdungeon[n_dgns].branches++;
  435. X            } break;
  436. X! case 38:
  437. X! # line 340 "dgn_comp.y"
  438. X! {
  439. X              init_branch();
  440. X              strcpy(tmpbranch[n_brs].name, yypvt[-5].str);
  441. X              tmpbranch[n_brs].chain = getchain(yypvt[-4].str);
  442. X--- 1122,1128 ----
  443. X              if(!check_branch()) n_brs--;
  444. X              else tmpdungeon[n_dgns].branches++;
  445. X            } break;
  446. X! case 38:{
  447. X              init_branch();
  448. X              strcpy(tmpbranch[n_brs].name, yypvt[-5].str);
  449. X              tmpbranch[n_brs].chain = getchain(yypvt[-4].str);
  450. X***************
  451. X*** 1179,1222 ****
  452. X              if(!check_branch()) n_brs--;
  453. X              else tmpdungeon[n_dgns].branches++;
  454. X            } break;
  455. X! case 39:
  456. X! # line 354 "dgn_comp.y"
  457. X! {
  458. X              yyval.i = TBR_STAIR;    /* two way stair */
  459. X            } break;
  460. X! case 40:
  461. X! # line 358 "dgn_comp.y"
  462. X! {
  463. X              yyval.i = TBR_STAIR;    /* two way stair */
  464. X            } break;
  465. X! case 41:
  466. X! # line 362 "dgn_comp.y"
  467. X! {
  468. X              yyval.i = TBR_NO_UP;    /* no up staircase */
  469. X            } break;
  470. X! case 42:
  471. X! # line 366 "dgn_comp.y"
  472. X! {
  473. X              yyval.i = TBR_NO_DOWN;    /* no down staircase */
  474. X            } break;
  475. X! case 43:
  476. X! # line 370 "dgn_comp.y"
  477. X! {
  478. X              yyval.i = TBR_PORTAL;    /* portal connection */
  479. X            } break;
  480. X! case 44:
  481. X! # line 376 "dgn_comp.y"
  482. X! {
  483. X              yyval.i = 0;    /* defaults to down */
  484. X            } break;
  485. X! case 45:
  486. X! # line 380 "dgn_comp.y"
  487. X! {
  488. X              yyval.i = yypvt[-0].i;
  489. X            } break;
  490. X! case 46:
  491. X! # line 403 "dgn_comp.y"
  492. X! {
  493. X              if (yypvt[-3].i < -MAXLEVEL || yypvt[-3].i > MAXLEVEL) {
  494. X                  yyerror("Abs base out of dlevel range - zeroing!");
  495. X                  couple.base = couple.rand = 0;
  496. X--- 1133,1160 ----
  497. X              if(!check_branch()) n_brs--;
  498. X              else tmpdungeon[n_dgns].branches++;
  499. X            } break;
  500. X! case 39:{
  501. X              yyval.i = TBR_STAIR;    /* two way stair */
  502. X            } break;
  503. X! case 40:{
  504. X              yyval.i = TBR_STAIR;    /* two way stair */
  505. X            } break;
  506. X! case 41:{
  507. X              yyval.i = TBR_NO_UP;    /* no up staircase */
  508. X            } break;
  509. X! case 42:{
  510. X              yyval.i = TBR_NO_DOWN;    /* no down staircase */
  511. X            } break;
  512. X! case 43:{
  513. X              yyval.i = TBR_PORTAL;    /* portal connection */
  514. X            } break;
  515. X! case 44:{
  516. X              yyval.i = 0;    /* defaults to down */
  517. X            } break;
  518. X! case 45:{
  519. X              yyval.i = yypvt[-0].i;
  520. X            } break;
  521. X! case 46:{
  522. X              if (yypvt[-3].i < -MAXLEVEL || yypvt[-3].i > MAXLEVEL) {
  523. X                  yyerror("Abs base out of dlevel range - zeroing!");
  524. X                  couple.base = couple.rand = 0;
  525. X***************
  526. X*** 1230,1238 ****
  527. X                  couple.rand = yypvt[-1].i;
  528. X              }
  529. X            } break;
  530. X! case 47:
  531. X! # line 440 "dgn_comp.y"
  532. X! {
  533. X              if (yypvt[-3].i < -MAXLEVEL || yypvt[-3].i > MAXLEVEL) {
  534. X                  yyerror("Rel base out of dlevel range - zeroing!");
  535. X                  couple.base = couple.rand = 0;
  536. X--- 1168,1174 ----
  537. X                  couple.rand = yypvt[-1].i;
  538. X              }
  539. X            } break;
  540. X! case 47:{
  541. X              if (yypvt[-3].i < -MAXLEVEL || yypvt[-3].i > MAXLEVEL) {
  542. X                  yyerror("Rel base out of dlevel range - zeroing!");
  543. X                  couple.base = couple.rand = 0;
  544. X*** /tmp/da14268    Tue Jun  1 20:17:11 1993
  545. X--- sys/share/lev_yacc.c    Tue Jun  1 20:09:04 1993
  546. X***************
  547. X*** 1,7 ****
  548. X  extern char *malloc(), *realloc();
  549. X! 
  550. X! # line 2 "lev_comp.y"
  551. X! /*    SCCS Id: @(#)lev_comp.c    3.1    93/02/13    */
  552. X  /*    Copyright (c) 1989 by Jean-Christophe Collet */
  553. X  /* NetHack may be freely redistributed.  See license for details. */
  554. X  
  555. X--- 1,5 ----
  556. X  extern char *malloc(), *realloc();
  557. X! /*    SCCS Id: @(#)lev_comp.c    3.1    93/05/15    */
  558. X  /*    Copyright (c) 1989 by Jean-Christophe Collet */
  559. X  /* NetHack may be freely redistributed.  See license for details. */
  560. X  
  561. X***************
  562. X*** 53,60 ****
  563. X  extern void FDECL(exit, (int));
  564. X  #endif
  565. X  
  566. X! extern void FDECL(yyerror, (char *));
  567. X! extern void FDECL(yywarning, (char *));
  568. X  extern int NDECL(yylex);
  569. X  int NDECL(yyparse);
  570. X  
  571. X--- 51,58 ----
  572. X  extern void FDECL(exit, (int));
  573. X  #endif
  574. X  
  575. X! extern void FDECL(yyerror, (const char *));
  576. X! extern void FDECL(yywarning, (const char *));
  577. X  extern int NDECL(yylex);
  578. X  int NDECL(yyparse);
  579. X  
  580. X***************
  581. X*** 70,76 ****
  582. X  extern void FDECL(scan_map, (char *));
  583. X  extern void NDECL(wallify_map);
  584. X  extern boolean NDECL(check_subrooms);
  585. X! extern void FDECL(check_coord, (int, int, char *));
  586. X  extern void NDECL(store_part);
  587. X  extern void NDECL(store_room);
  588. X  extern void FDECL(write_maze, (int, specialmaze *));
  589. X--- 68,74 ----
  590. X  extern void FDECL(scan_map, (char *));
  591. X  extern void NDECL(wallify_map);
  592. X  extern boolean NDECL(check_subrooms);
  593. X! extern void FDECL(check_coord, (int, int, const char *));
  594. X  extern void NDECL(store_part);
  595. X  extern void NDECL(store_room);
  596. X  extern void FDECL(write_maze, (int, specialmaze *));
  597. X***************
  598. X*** 139,148 ****
  599. X  
  600. X  extern int fatal_error;
  601. X  extern int want_warnings;
  602. X! extern char* fname;
  603. X  
  604. X- 
  605. X- # line 144 "lev_comp.y"
  606. X  typedef union 
  607. X  {
  608. X      int    i;
  609. X--- 137,144 ----
  610. X  
  611. X  extern int fatal_error;
  612. X  extern int want_warnings;
  613. X! extern const char *fname;
  614. X  
  615. X  typedef union 
  616. X  {
  617. X      int    i;
  618. X***************
  619. X*** 228,235 ****
  620. X  YYSTYPE yylval, yyval;
  621. X  # define YYERRCODE 256
  622. X  
  623. X- # line 1542 "lev_comp.y"
  624. X- 
  625. X  int yyexca[] ={
  626. X  -1, 1,
  627. X      0, -1,
  628. X--- 224,229 ----
  629. X***************
  630. X*** 1238,1246 ****
  631. X      switch( yytmp )
  632. X      {
  633. X          
  634. X! case 7:
  635. X! # line 194 "lev_comp.y"
  636. X! {
  637. X                int fout, i;
  638. X  
  639. X              if (fatal_error > 0) {
  640. X--- 1232,1238 ----
  641. X      switch( yytmp )
  642. X      {
  643. X          
  644. X! case 7:{
  645. X                int fout, i;
  646. X  
  647. X              if (fatal_error > 0) {
  648. X***************
  649. X*** 1272,1280 ****
  650. X                  npart = 0;
  651. X              }
  652. X            } break;
  653. X! case 8:
  654. X! # line 229 "lev_comp.y"
  655. X! {
  656. X              int fout, i;
  657. X  
  658. X              if (fatal_error > 0) {
  659. X--- 1264,1270 ----
  660. X                  npart = 0;
  661. X              }
  662. X            } break;
  663. X! case 8:{
  664. X              int fout, i;
  665. X  
  666. X              if (fatal_error > 0) {
  667. X***************
  668. X*** 1313,1321 ****
  669. X                  (void) close(fout);
  670. X              }
  671. X            } break;
  672. X! case 9:
  673. X! # line 271 "lev_comp.y"
  674. X! {
  675. X              if (index(yypvt[-0].map, '.'))
  676. X                  yyerror("Invalid dot ('.') in level name.");
  677. X              if (strlen(yypvt[-0].map) > 8)
  678. X--- 1303,1309 ----
  679. X                  (void) close(fout);
  680. X              }
  681. X            } break;
  682. X! case 9:{
  683. X              if (index(yypvt[-0].map, '.'))
  684. X                  yyerror("Invalid dot ('.') in level name.");
  685. X              if (strlen(yypvt[-0].map) > 8)
  686. X***************
  687. X*** 1324,1338 ****
  688. X              special_lev.nrobjects = 0;
  689. X              special_lev.nrmonst = 0;
  690. X            } break;
  691. X! case 10:
  692. X! # line 283 "lev_comp.y"
  693. X! {
  694. X              init_lev.init_present = FALSE;
  695. X              yyval.i = 0;
  696. X            } break;
  697. X! case 11:
  698. X! # line 288 "lev_comp.y"
  699. X! {
  700. X              init_lev.init_present = TRUE;
  701. X              if((init_lev.fg = what_map_char(yypvt[-10].i)) == INVALID_TYPE)
  702. X                  yyerror("Invalid foreground type.");
  703. X--- 1312,1322 ----
  704. X              special_lev.nrobjects = 0;
  705. X              special_lev.nrmonst = 0;
  706. X            } break;
  707. X! case 10:{
  708. X              init_lev.init_present = FALSE;
  709. X              yyval.i = 0;
  710. X            } break;
  711. X! case 11:{
  712. X              init_lev.init_present = TRUE;
  713. X              if((init_lev.fg = what_map_char(yypvt[-10].i)) == INVALID_TYPE)
  714. X                  yyerror("Invalid foreground type.");
  715. X***************
  716. X*** 1344,1373 ****
  717. X              init_lev.walled = yypvt[-0].i;
  718. X              yyval.i = 1;
  719. X            } break;
  720. X! case 14:
  721. X! # line 307 "lev_comp.y"
  722. X! {
  723. X              yyval.i = 0;
  724. X            } break;
  725. X! case 15:
  726. X! # line 311 "lev_comp.y"
  727. X! {
  728. X              yyval.i = lev_flags;
  729. X              lev_flags = 0;    /* clear for next user */
  730. X            } break;
  731. X! case 16:
  732. X! # line 318 "lev_comp.y"
  733. X! {
  734. X              lev_flags |= yypvt[-2].i;
  735. X            } break;
  736. X! case 17:
  737. X! # line 322 "lev_comp.y"
  738. X! {
  739. X              lev_flags |= yypvt[-0].i;
  740. X            } break;
  741. X! case 20:
  742. X! # line 332 "lev_comp.y"
  743. X! {
  744. X              int i, j;
  745. X  
  746. X              i = strlen(yypvt[-0].map) + 1;
  747. X--- 1328,1347 ----
  748. X              init_lev.walled = yypvt[-0].i;
  749. X              yyval.i = 1;
  750. X            } break;
  751. X! case 14:{
  752. X              yyval.i = 0;
  753. X            } break;
  754. X! case 15:{
  755. X              yyval.i = lev_flags;
  756. X              lev_flags = 0;    /* clear for next user */
  757. X            } break;
  758. X! case 16:{
  759. X              lev_flags |= yypvt[-2].i;
  760. X            } break;
  761. X! case 17:{
  762. X              lev_flags |= yypvt[-0].i;
  763. X            } break;
  764. X! case 20:{
  765. X              int i, j;
  766. X  
  767. X              i = strlen(yypvt[-0].map) + 1;
  768. X***************
  769. X*** 1380,1388 ****
  770. X                  tmpmessage[j+i-1] = 0;
  771. X              }
  772. X            } break;
  773. X! case 23:
  774. X! # line 352 "lev_comp.y"
  775. X! {
  776. X              if(special_lev.nrobjects) {
  777. X                  yyerror("Object registers already initialized!");
  778. X              } else {
  779. X--- 1354,1360 ----
  780. X                  tmpmessage[j+i-1] = 0;
  781. X              }
  782. X            } break;
  783. X! case 23:{
  784. X              if(special_lev.nrobjects) {
  785. X                  yyerror("Object registers already initialized!");
  786. X              } else {
  787. X***************
  788. X*** 1392,1400 ****
  789. X                        (genericptr_t)olist, n_olist);
  790. X              }
  791. X            } break;
  792. X! case 24:
  793. X! # line 363 "lev_comp.y"
  794. X! {
  795. X              if(special_lev.nrmonst) {
  796. X                  yyerror("Monster registers already initialized!");
  797. X              } else {
  798. X--- 1364,1370 ----
  799. X                        (genericptr_t)olist, n_olist);
  800. X              }
  801. X            } break;
  802. X! case 24:{
  803. X              if(special_lev.nrmonst) {
  804. X                  yyerror("Monster registers already initialized!");
  805. X              } else {
  806. X***************
  807. X*** 1404,1412 ****
  808. X                        (genericptr_t)mlist, n_mlist);
  809. X                }
  810. X            } break;
  811. X! case 25:
  812. X! # line 376 "lev_comp.y"
  813. X! {
  814. X              tmproom[nrooms] = New(room);
  815. X              (void) memset((genericptr_t) tmproom[nrooms], 0,
  816. X                      sizeof *tmproom[nrooms]);
  817. X--- 1374,1380 ----
  818. X                        (genericptr_t)mlist, n_mlist);
  819. X                }
  820. X            } break;
  821. X! case 25:{
  822. X              tmproom[nrooms] = New(room);
  823. X              (void) memset((genericptr_t) tmproom[nrooms], 0,
  824. X                      sizeof *tmproom[nrooms]);
  825. X***************
  826. X*** 1422,1437 ****
  827. X              tmproom[nrooms]->h = 2;
  828. X              in_room = 1;
  829. X            } break;
  830. X! case 31:
  831. X! # line 404 "lev_comp.y"
  832. X! {
  833. X              tmpcor[0] = New(corridor);
  834. X              tmpcor[0]->src.room = -1;
  835. X              ncorridor = 1;
  836. X            } break;
  837. X! case 34:
  838. X! # line 416 "lev_comp.y"
  839. X! {
  840. X              tmpcor[ncorridor] = New(corridor);
  841. X              tmpcor[ncorridor]->src.room = yypvt[-2].corpos.room;
  842. X              tmpcor[ncorridor]->src.wall = yypvt[-2].corpos.wall;
  843. X--- 1390,1401 ----
  844. X              tmproom[nrooms]->h = 2;
  845. X              in_room = 1;
  846. X            } break;
  847. X! case 31:{
  848. X              tmpcor[0] = New(corridor);
  849. X              tmpcor[0]->src.room = -1;
  850. X              ncorridor = 1;
  851. X            } break;
  852. X! case 34:{
  853. X              tmpcor[ncorridor] = New(corridor);
  854. X              tmpcor[ncorridor]->src.room = yypvt[-2].corpos.room;
  855. X              tmpcor[ncorridor]->src.wall = yypvt[-2].corpos.wall;
  856. X***************
  857. X*** 1441,1449 ****
  858. X              tmpcor[ncorridor]->dest.door = yypvt[-0].corpos.door;
  859. X              ncorridor++;
  860. X            } break;
  861. X! case 35:
  862. X! # line 427 "lev_comp.y"
  863. X! {
  864. X              tmpcor[ncorridor]->src.room = yypvt[-2].corpos.room;
  865. X              tmpcor[ncorridor]->src.wall = yypvt[-2].corpos.wall;
  866. X              tmpcor[ncorridor]->src.door = yypvt[-2].corpos.door;
  867. X--- 1405,1411 ----
  868. X              tmpcor[ncorridor]->dest.door = yypvt[-0].corpos.door;
  869. X              ncorridor++;
  870. X            } break;
  871. X! case 35:{
  872. X              tmpcor[ncorridor]->src.room = yypvt[-2].corpos.room;
  873. X              tmpcor[ncorridor]->src.wall = yypvt[-2].corpos.wall;
  874. X              tmpcor[ncorridor]->src.door = yypvt[-2].corpos.door;
  875. X***************
  876. X*** 1451,1459 ****
  877. X              tmpcor[ncorridor]->dest.wall = yypvt[-0].i;
  878. X              ncorridor++;
  879. X            } break;
  880. X! case 36:
  881. X! # line 438 "lev_comp.y"
  882. X! {
  883. X              if (yypvt[-5].i >= nrooms)
  884. X                  yyerror("Wrong room number!");
  885. X              yyval.corpos.room = yypvt[-5].i;
  886. X--- 1413,1419 ----
  887. X              tmpcor[ncorridor]->dest.wall = yypvt[-0].i;
  888. X              ncorridor++;
  889. X            } break;
  890. X! case 36:{
  891. X              if (yypvt[-5].i >= nrooms)
  892. X                  yyerror("Wrong room number!");
  893. X              yyval.corpos.room = yypvt[-5].i;
  894. X***************
  895. X*** 1460,1478 ****
  896. X              yyval.corpos.wall = yypvt[-3].i;
  897. X              yyval.corpos.door = yypvt[-1].i;
  898. X            } break;
  899. X! case 37:
  900. X! # line 448 "lev_comp.y"
  901. X! {
  902. X              store_room();
  903. X            } break;
  904. X! case 38:
  905. X! # line 452 "lev_comp.y"
  906. X! {
  907. X              store_room();
  908. X            } break;
  909. X! case 39:
  910. X! # line 458 "lev_comp.y"
  911. X! {
  912. X              tmproom[nrooms] = New(room);
  913. X              (void) memset((genericptr_t) tmproom[nrooms], 0,
  914. X                      sizeof *tmproom[nrooms]);
  915. X--- 1420,1432 ----
  916. X              yyval.corpos.wall = yypvt[-3].i;
  917. X              yyval.corpos.door = yypvt[-1].i;
  918. X            } break;
  919. X! case 37:{
  920. X              store_room();
  921. X            } break;
  922. X! case 38:{
  923. X              store_room();
  924. X            } break;
  925. X! case 39:{
  926. X              tmproom[nrooms] = New(room);
  927. X              (void) memset((genericptr_t) tmproom[nrooms], 0,
  928. X                      sizeof *tmproom[nrooms]);
  929. X***************
  930. X*** 1489,1497 ****
  931. X              tmproom[nrooms]->h = current_size.height;
  932. X              in_room = 1;
  933. X            } break;
  934. X! case 40:
  935. X! # line 478 "lev_comp.y"
  936. X! {
  937. X              tmproom[nrooms] = New(room);
  938. X              (void) memset((genericptr_t) tmproom[nrooms], 0,
  939. X                      sizeof *tmproom[nrooms]);
  940. X--- 1443,1449 ----
  941. X              tmproom[nrooms]->h = current_size.height;
  942. X              in_room = 1;
  943. X            } break;
  944. X! case 40:{
  945. X              tmproom[nrooms] = New(room);
  946. X              (void) memset((genericptr_t) tmproom[nrooms], 0,
  947. X                      sizeof *tmproom[nrooms]);
  948. X***************
  949. X*** 1508,1526 ****
  950. X              tmproom[nrooms]->h = current_size.height;
  951. X              in_room = 1;
  952. X            } break;
  953. X! case 41:
  954. X! # line 498 "lev_comp.y"
  955. X! {
  956. X              yyval.i = 1;
  957. X            } break;
  958. X! case 42:
  959. X! # line 502 "lev_comp.y"
  960. X! {
  961. X              yyval.i = yypvt[-0].i;
  962. X            } break;
  963. X! case 43:
  964. X! # line 508 "lev_comp.y"
  965. X! {
  966. X              if ( yypvt[-3].i < 1 || yypvt[-3].i > 5 ||
  967. X                  yypvt[-1].i < 1 || yypvt[-1].i > 5 ) {
  968. X                  yyerror("Room position should be between 1 & 5!");
  969. X--- 1460,1472 ----
  970. X              tmproom[nrooms]->h = current_size.height;
  971. X              in_room = 1;
  972. X            } break;
  973. X! case 41:{
  974. X              yyval.i = 1;
  975. X            } break;
  976. X! case 42:{
  977. X              yyval.i = yypvt[-0].i;
  978. X            } break;
  979. X! case 43:{
  980. X              if ( yypvt[-3].i < 1 || yypvt[-3].i > 5 ||
  981. X                  yypvt[-1].i < 1 || yypvt[-1].i > 5 ) {
  982. X                  yyerror("Room position should be between 1 & 5!");
  983. X***************
  984. X*** 1529,1542 ****
  985. X                  current_coord.y = yypvt[-1].i;
  986. X              }
  987. X            } break;
  988. X! case 44:
  989. X! # line 518 "lev_comp.y"
  990. X! {
  991. X              current_coord.x = current_coord.y = ERR;
  992. X            } break;
  993. X! case 45:
  994. X! # line 524 "lev_comp.y"
  995. X! {
  996. X              if ( yypvt[-3].i < 0 || yypvt[-1].i < 0) {
  997. X                  yyerror("Invalid subroom position !");
  998. X              } else {
  999. X--- 1475,1484 ----
  1000. X                  current_coord.y = yypvt[-1].i;
  1001. X              }
  1002. X            } break;
  1003. X! case 44:{
  1004. X              current_coord.x = current_coord.y = ERR;
  1005. X            } break;
  1006. X! case 45:{
  1007. X              if ( yypvt[-3].i < 0 || yypvt[-1].i < 0) {
  1008. X                  yyerror("Invalid subroom position !");
  1009. X              } else {
  1010. X***************
  1011. X*** 1544,1587 ****
  1012. X                  current_coord.y = yypvt[-1].i;
  1013. X              }
  1014. X            } break;
  1015. X! case 46:
  1016. X! # line 533 "lev_comp.y"
  1017. X! {
  1018. X              current_coord.x = current_coord.y = ERR;
  1019. X            } break;
  1020. X! case 47:
  1021. X! # line 539 "lev_comp.y"
  1022. X! {
  1023. X              current_align.x = yypvt[-3].i;
  1024. X              current_align.y = yypvt[-1].i;
  1025. X            } break;
  1026. X! case 48:
  1027. X! # line 544 "lev_comp.y"
  1028. X! {
  1029. X              current_align.x = current_align.y = ERR;
  1030. X            } break;
  1031. X! case 49:
  1032. X! # line 550 "lev_comp.y"
  1033. X! {
  1034. X              current_size.width = yypvt[-3].i;
  1035. X              current_size.height = yypvt[-1].i;
  1036. X            } break;
  1037. X! case 50:
  1038. X! # line 555 "lev_comp.y"
  1039. X! {
  1040. X              current_size.height = current_size.width = ERR;
  1041. X            } break;
  1042. X! case 66:
  1043. X! # line 580 "lev_comp.y"
  1044. X! {
  1045. X              if (tmproom[nrooms]->name)
  1046. X                  yyerror("This room already has a name!");
  1047. X              else
  1048. X                  tmproom[nrooms]->name = dup_string(yypvt[-0].map);
  1049. X            } break;
  1050. X! case 67:
  1051. X! # line 589 "lev_comp.y"
  1052. X! {
  1053. X              if (tmproom[nrooms]->chance)
  1054. X                  yyerror("This room already assigned a chance!");
  1055. X              else if (tmproom[nrooms]->rtype == OROOM)
  1056. X--- 1486,1515 ----
  1057. X                  current_coord.y = yypvt[-1].i;
  1058. X              }
  1059. X            } break;
  1060. X! case 46:{
  1061. X              current_coord.x = current_coord.y = ERR;
  1062. X            } break;
  1063. X! case 47:{
  1064. X              current_align.x = yypvt[-3].i;
  1065. X              current_align.y = yypvt[-1].i;
  1066. X            } break;
  1067. X! case 48:{
  1068. X              current_align.x = current_align.y = ERR;
  1069. X            } break;
  1070. X! case 49:{
  1071. X              current_size.width = yypvt[-3].i;
  1072. X              current_size.height = yypvt[-1].i;
  1073. X            } break;
  1074. X! case 50:{
  1075. X              current_size.height = current_size.width = ERR;
  1076. X            } break;
  1077. X! case 66:{
  1078. X              if (tmproom[nrooms]->name)
  1079. X                  yyerror("This room already has a name!");
  1080. X              else
  1081. X                  tmproom[nrooms]->name = dup_string(yypvt[-0].map);
  1082. X            } break;
  1083. X! case 67:{
  1084. X              if (tmproom[nrooms]->chance)
  1085. X                  yyerror("This room already assigned a chance!");
  1086. X              else if (tmproom[nrooms]->rtype == OROOM)
  1087. X***************
  1088. X*** 1591,1599 ****
  1089. X              else
  1090. X                  tmproom[nrooms]->chance = yypvt[-0].i;
  1091. X             } break;
  1092. X! case 68:
  1093. X! # line 602 "lev_comp.y"
  1094. X! {
  1095. X              /* ERR means random here */
  1096. X              if (yypvt[-2].i == ERR && yypvt[-0].i != ERR) {
  1097. X               yyerror("If the door wall is random, so must be its pos!");
  1098. X--- 1519,1525 ----
  1099. X              else
  1100. X                  tmproom[nrooms]->chance = yypvt[-0].i;
  1101. X             } break;
  1102. X! case 68:{
  1103. X              /* ERR means random here */
  1104. X              if (yypvt[-2].i == ERR && yypvt[-0].i != ERR) {
  1105. X               yyerror("If the door wall is random, so must be its pos!");
  1106. X***************
  1107. X*** 1606,1614 ****
  1108. X                  ndoor++;
  1109. X              }
  1110. X            } break;
  1111. X! case 75:
  1112. X! # line 630 "lev_comp.y"
  1113. X! {
  1114. X              maze.filling = yypvt[-0].i;
  1115. X              if (index(yypvt[-2].map, '.'))
  1116. X                  yyerror("Invalid dot ('.') in level name.");
  1117. X--- 1532,1538 ----
  1118. X                  ndoor++;
  1119. X              }
  1120. X            } break;
  1121. X! case 75:{
  1122. X              maze.filling = yypvt[-0].i;
  1123. X              if (index(yypvt[-2].map, '.'))
  1124. X                  yyerror("Invalid dot ('.') in level name.");
  1125. X***************
  1126. X*** 1617,1640 ****
  1127. X              yyval.map = yypvt[-2].map;
  1128. X              in_room = 0;
  1129. X            } break;
  1130. X! case 76:
  1131. X! # line 642 "lev_comp.y"
  1132. X! {
  1133. X              yyval.i = get_floor_type((char)yypvt[-0].i);
  1134. X            } break;
  1135. X! case 77:
  1136. X! # line 646 "lev_comp.y"
  1137. X! {
  1138. X              yyval.i = -1;
  1139. X            } break;
  1140. X! case 80:
  1141. X! # line 656 "lev_comp.y"
  1142. X! {
  1143. X              store_part();
  1144. X            } break;
  1145. X! case 81:
  1146. X! # line 662 "lev_comp.y"
  1147. X! {
  1148. X              tmppart[npart] = New(mazepart);
  1149. X              tmppart[npart]->halign = 1;
  1150. X              tmppart[npart]->valign = 1;
  1151. X--- 1541,1556 ----
  1152. X              yyval.map = yypvt[-2].map;
  1153. X              in_room = 0;
  1154. X            } break;
  1155. X! case 76:{
  1156. X              yyval.i = get_floor_type((char)yypvt[-0].i);
  1157. X            } break;
  1158. X! case 77:{
  1159. X              yyval.i = -1;
  1160. X            } break;
  1161. X! case 80:{
  1162. X              store_part();
  1163. X            } break;
  1164. X! case 81:{
  1165. X              tmppart[npart] = New(mazepart);
  1166. X              tmppart[npart]->halign = 1;
  1167. X              tmppart[npart]->valign = 1;
  1168. X***************
  1169. X*** 1649,1657 ****
  1170. X              max_x_map = COLNO-1;
  1171. X              max_y_map = ROWNO;
  1172. X            } break;
  1173. X! case 82:
  1174. X! # line 678 "lev_comp.y"
  1175. X! {
  1176. X              tmppart[npart] = New(mazepart);
  1177. X              tmppart[npart]->halign = yypvt[-1].i % 10;
  1178. X              tmppart[npart]->valign = yypvt[-1].i / 10;
  1179. X--- 1565,1571 ----
  1180. X              max_x_map = COLNO-1;
  1181. X              max_y_map = ROWNO;
  1182. X            } break;
  1183. X! case 82:{
  1184. X              tmppart[npart] = New(mazepart);
  1185. X              tmppart[npart]->halign = yypvt[-1].i % 10;
  1186. X              tmppart[npart]->valign = yypvt[-1].i / 10;
  1187. X***************
  1188. X*** 1660,1673 ****
  1189. X              tmppart[npart]->nrmonst = 0;
  1190. X              scan_map(yypvt[-0].map);
  1191. X            } break;
  1192. X! case 83:
  1193. X! # line 690 "lev_comp.y"
  1194. X! {
  1195. X              yyval.i = yypvt[-2].i + (yypvt[-0].i * 10);
  1196. X            } break;
  1197. X! case 90:
  1198. X! # line 708 "lev_comp.y"
  1199. X! {
  1200. X              if (tmppart[npart]->nrobjects) {
  1201. X                  yyerror("Object registers already initialized!");
  1202. X              } else {
  1203. X--- 1574,1583 ----
  1204. X              tmppart[npart]->nrmonst = 0;
  1205. X              scan_map(yypvt[-0].map);
  1206. X            } break;
  1207. X! case 83:{
  1208. X              yyval.i = yypvt[-2].i + (yypvt[-0].i * 10);
  1209. X            } break;
  1210. X! case 90:{
  1211. X              if (tmppart[npart]->nrobjects) {
  1212. X                  yyerror("Object registers already initialized!");
  1213. X              } else {
  1214. X***************
  1215. X*** 1677,1685 ****
  1216. X                  tmppart[npart]->nrobjects = n_olist;
  1217. X              }
  1218. X            } break;
  1219. X! case 91:
  1220. X! # line 719 "lev_comp.y"
  1221. X! {
  1222. X              if (tmppart[npart]->nloc) {
  1223. X                  yyerror("Location registers already initialized!");
  1224. X              } else {
  1225. X--- 1587,1593 ----
  1226. X                  tmppart[npart]->nrobjects = n_olist;
  1227. X              }
  1228. X            } break;
  1229. X! case 91:{
  1230. X              if (tmppart[npart]->nloc) {
  1231. X                  yyerror("Location registers already initialized!");
  1232. X              } else {
  1233. X***************
  1234. X*** 1693,1701 ****
  1235. X                  tmppart[npart]->nloc = n_plist;
  1236. X              }
  1237. X            } break;
  1238. X! case 92:
  1239. X! # line 734 "lev_comp.y"
  1240. X! {
  1241. X              if (tmppart[npart]->nrmonst) {
  1242. X                  yyerror("Monster registers already initialized!");
  1243. X              } else {
  1244. X--- 1601,1607 ----
  1245. X                  tmppart[npart]->nloc = n_plist;
  1246. X              }
  1247. X            } break;
  1248. X! case 92:{
  1249. X              if (tmppart[npart]->nrmonst) {
  1250. X                  yyerror("Monster registers already initialized!");
  1251. X              } else {
  1252. X***************
  1253. X*** 1705,1761 ****
  1254. X                  tmppart[npart]->nrmonst = n_mlist;
  1255. X              }
  1256. X            } break;
  1257. X! case 93:
  1258. X! # line 747 "lev_comp.y"
  1259. X! {
  1260. X              if (n_olist < MAX_REGISTERS)
  1261. X                  olist[n_olist++] = yypvt[-0].i;
  1262. X              else
  1263. X                  yyerror("Object list too long!");
  1264. X            } break;
  1265. X! case 94:
  1266. X! # line 754 "lev_comp.y"
  1267. X! {
  1268. X              if (n_olist < MAX_REGISTERS)
  1269. X                  olist[n_olist++] = yypvt[-2].i;
  1270. X              else
  1271. X                  yyerror("Object list too long!");
  1272. X            } break;
  1273. X! case 95:
  1274. X! # line 763 "lev_comp.y"
  1275. X! {
  1276. X              if (n_mlist < MAX_REGISTERS)
  1277. X                  mlist[n_mlist++] = yypvt[-0].i;
  1278. X              else
  1279. X                  yyerror("Monster list too long!");
  1280. X            } break;
  1281. X! case 96:
  1282. X! # line 770 "lev_comp.y"
  1283. X! {
  1284. X              if (n_mlist < MAX_REGISTERS)
  1285. X                  mlist[n_mlist++] = yypvt[-2].i;
  1286. X              else
  1287. X                  yyerror("Monster list too long!");
  1288. X            } break;
  1289. X! case 97:
  1290. X! # line 779 "lev_comp.y"
  1291. X! {
  1292. X              if (n_plist < MAX_REGISTERS)
  1293. X                  plist[n_plist++] = current_coord;
  1294. X              else
  1295. X                  yyerror("Location list too long!");
  1296. X            } break;
  1297. X! case 98:
  1298. X! # line 786 "lev_comp.y"
  1299. X! {
  1300. X              if (n_plist < MAX_REGISTERS)
  1301. X                  plist[n_plist++] = current_coord;
  1302. X              else
  1303. X                  yyerror("Location list too long!");
  1304. X            } break;
  1305. X! case 122:
  1306. X! # line 822 "lev_comp.y"
  1307. X! {
  1308. X              tmpmonst[nmons] = New(monster);
  1309. X              tmpmonst[nmons]->x = current_coord.x;
  1310. X              tmpmonst[nmons]->y = current_coord.y;
  1311. X--- 1611,1653 ----
  1312. X                  tmppart[npart]->nrmonst = n_mlist;
  1313. X              }
  1314. X            } break;
  1315. X! case 93:{
  1316. X              if (n_olist < MAX_REGISTERS)
  1317. X                  olist[n_olist++] = yypvt[-0].i;
  1318. X              else
  1319. X                  yyerror("Object list too long!");
  1320. X            } break;
  1321. X! case 94:{
  1322. X              if (n_olist < MAX_REGISTERS)
  1323. X                  olist[n_olist++] = yypvt[-2].i;
  1324. X              else
  1325. X                  yyerror("Object list too long!");
  1326. X            } break;
  1327. X! case 95:{
  1328. X              if (n_mlist < MAX_REGISTERS)
  1329. X                  mlist[n_mlist++] = yypvt[-0].i;
  1330. X              else
  1331. X                  yyerror("Monster list too long!");
  1332. X            } break;
  1333. X! case 96:{
  1334. X              if (n_mlist < MAX_REGISTERS)
  1335. X                  mlist[n_mlist++] = yypvt[-2].i;
  1336. X              else
  1337. X                  yyerror("Monster list too long!");
  1338. X            } break;
  1339. X! case 97:{
  1340. X              if (n_plist < MAX_REGISTERS)
  1341. X                  plist[n_plist++] = current_coord;
  1342. X              else
  1343. X                  yyerror("Location list too long!");
  1344. X            } break;
  1345. X! case 98:{
  1346. X              if (n_plist < MAX_REGISTERS)
  1347. X                  plist[n_plist++] = current_coord;
  1348. X              else
  1349. X                  yyerror("Location list too long!");
  1350. X            } break;
  1351. X! case 122:{
  1352. X              tmpmonst[nmons] = New(monster);
  1353. X              tmpmonst[nmons]->x = current_coord.x;
  1354. X              tmpmonst[nmons]->y = current_coord.y;
  1355. X***************
  1356. X*** 1780,1819 ****
  1357. X                      tmpmonst[nmons]->id = token;
  1358. X              }
  1359. X            } break;
  1360. X! case 123:
  1361. X! # line 848 "lev_comp.y"
  1362. X! {
  1363. X              nmons++;
  1364. X            } break;
  1365. X! case 126:
  1366. X! # line 858 "lev_comp.y"
  1367. X! {
  1368. X              tmpmonst[nmons]->name = dup_string(yypvt[-0].map);
  1369. X            } break;
  1370. X! case 127:
  1371. X! # line 862 "lev_comp.y"
  1372. X! {
  1373. X              tmpmonst[nmons]->peaceful = yypvt[-0].i;
  1374. X            } break;
  1375. X! case 128:
  1376. X! # line 866 "lev_comp.y"
  1377. X! {
  1378. X              tmpmonst[nmons]->asleep = yypvt[-0].i;
  1379. X            } break;
  1380. X! case 129:
  1381. X! # line 870 "lev_comp.y"
  1382. X! {
  1383. X              tmpmonst[nmons]->align = yypvt[-0].i;
  1384. X            } break;
  1385. X! case 130:
  1386. X! # line 874 "lev_comp.y"
  1387. X! {
  1388. X              tmpmonst[nmons]->appear = yypvt[-1].i;
  1389. X              tmpmonst[nmons]->appear_as = dup_string(yypvt[-0].map);
  1390. X            } break;
  1391. X! case 131:
  1392. X! # line 881 "lev_comp.y"
  1393. X! {
  1394. X              tmpobj[nobj] = New(object);
  1395. X              tmpobj[nobj]->x = current_coord.x;
  1396. X              tmpobj[nobj]->y = current_coord.y;
  1397. X--- 1672,1697 ----
  1398. X                      tmpmonst[nmons]->id = token;
  1399. X              }
  1400. X            } break;
  1401. X! case 123:{
  1402. X              nmons++;
  1403. X            } break;
  1404. X! case 126:{
  1405. X              tmpmonst[nmons]->name = dup_string(yypvt[-0].map);
  1406. X            } break;
  1407. X! case 127:{
  1408. X              tmpmonst[nmons]->peaceful = yypvt[-0].i;
  1409. X            } break;
  1410. X! case 128:{
  1411. X              tmpmonst[nmons]->asleep = yypvt[-0].i;
  1412. X            } break;
  1413. X! case 129:{
  1414. X              tmpmonst[nmons]->align = yypvt[-0].i;
  1415. X            } break;
  1416. X! case 130:{
  1417. X              tmpmonst[nmons]->appear = yypvt[-1].i;
  1418. X              tmpmonst[nmons]->appear_as = dup_string(yypvt[-0].map);
  1419. X            } break;
  1420. X! case 131:{
  1421. X              tmpobj[nobj] = New(object);
  1422. X              tmpobj[nobj]->x = current_coord.x;
  1423. X              tmpobj[nobj]->y = current_coord.y;
  1424. X***************
  1425. X*** 1835,1853 ****
  1426. X                      tmpobj[nobj]->id = token;
  1427. X              }
  1428. X            } break;
  1429. X! case 132:
  1430. X! # line 904 "lev_comp.y"
  1431. X! {
  1432. X              nobj++;
  1433. X            } break;
  1434. X! case 133:
  1435. X! # line 910 "lev_comp.y"
  1436. X! {
  1437. X              tmpobj[nobj]->spe = -127;
  1438. X            } break;
  1439. X! case 134:
  1440. X! # line 914 "lev_comp.y"
  1441. X! {
  1442. X              int token = get_monster_id(yypvt[-2].map, (char)0);
  1443. X              if (token == ERR)    /* "random" */
  1444. X                  tmpobj[nobj]->corpsenm = -2;
  1445. X--- 1713,1725 ----
  1446. X                      tmpobj[nobj]->id = token;
  1447. X              }
  1448. X            } break;
  1449. X! case 132:{
  1450. X              nobj++;
  1451. X            } break;
  1452. X! case 133:{
  1453. X              tmpobj[nobj]->spe = -127;
  1454. X            } break;
  1455. X! case 134:{
  1456. X              int token = get_monster_id(yypvt[-2].map, (char)0);
  1457. X              if (token == ERR)    /* "random" */
  1458. X                  tmpobj[nobj]->corpsenm = -2;
  1459. X***************
  1460. X*** 1855,1863 ****
  1461. X                  tmpobj[nobj]->corpsenm = token;
  1462. X              tmpobj[nobj]->spe = yypvt[-0].i;
  1463. X            } break;
  1464. X! case 135:
  1465. X! # line 923 "lev_comp.y"
  1466. X! {
  1467. X              tmpobj[nobj]->curse_state = yypvt[-4].i;
  1468. X              tmpobj[nobj]->spe = yypvt[-2].i;
  1469. X              if (yypvt[-0].map)
  1470. X--- 1727,1733 ----
  1471. X                  tmpobj[nobj]->corpsenm = token;
  1472. X              tmpobj[nobj]->spe = yypvt[-0].i;
  1473. X            } break;
  1474. X! case 135:{
  1475. X              tmpobj[nobj]->curse_state = yypvt[-4].i;
  1476. X              tmpobj[nobj]->spe = yypvt[-2].i;
  1477. X              if (yypvt[-0].map)
  1478. X***************
  1479. X*** 1865,1878 ****
  1480. X              else
  1481. X                  tmpobj[nobj]->name = (char *) 0;
  1482. X            } break;
  1483. X! case 139:
  1484. X! # line 939 "lev_comp.y"
  1485. X! {
  1486. X              yyval.i = -127;
  1487. X            } break;
  1488. X! case 140:
  1489. X! # line 945 "lev_comp.y"
  1490. X! {
  1491. X              tmpdoor[ndoor] = New(door);
  1492. X              tmpdoor[ndoor]->x = current_coord.x;
  1493. X              tmpdoor[ndoor]->y = current_coord.y;
  1494. X--- 1735,1744 ----
  1495. X              else
  1496. X                  tmpobj[nobj]->name = (char *) 0;
  1497. X            } break;
  1498. X! case 139:{
  1499. X              yyval.i = -127;
  1500. X            } break;
  1501. X! case 140:{
  1502. X              tmpdoor[ndoor] = New(door);
  1503. X              tmpdoor[ndoor]->x = current_coord.x;
  1504. X              tmpdoor[ndoor]->y = current_coord.y;
  1505. X***************
  1506. X*** 1883,1891 ****
  1507. X                  yyerror("Door decl doesn't match the map");
  1508. X              ndoor++;
  1509. X            } break;
  1510. X! case 141:
  1511. X! # line 959 "lev_comp.y"
  1512. X! {
  1513. X              tmptrap[ntrap] = New(trap);
  1514. X              tmptrap[ntrap]->x = current_coord.x;
  1515. X              tmptrap[ntrap]->y = current_coord.y;
  1516. X--- 1749,1755 ----
  1517. X                  yyerror("Door decl doesn't match the map");
  1518. X              ndoor++;
  1519. X            } break;
  1520. X! case 141:{
  1521. X              tmptrap[ntrap] = New(trap);
  1522. X              tmptrap[ntrap]->x = current_coord.x;
  1523. X              tmptrap[ntrap]->y = current_coord.y;
  1524. X***************
  1525. X*** 1895,1903 ****
  1526. X                      "Trap");
  1527. X              ntrap++;
  1528. X            } break;
  1529. X! case 142:
  1530. X! # line 972 "lev_comp.y"
  1531. X! {
  1532. X                  int x, y, dir;
  1533. X  
  1534. X              tmpdb[ndb] = New(drawbridge);
  1535. X--- 1759,1765 ----
  1536. X                      "Trap");
  1537. X              ntrap++;
  1538. X            } break;
  1539. X! case 142:{
  1540. X                  int x, y, dir;
  1541. X  
  1542. X              tmpdb[ndb] = New(drawbridge);
  1543. X***************
  1544. X*** 1932,1940 ****
  1545. X                  yyerror("A drawbridge can only be open or closed!");
  1546. X              ndb++;
  1547. X             } break;
  1548. X! case 143:
  1549. X! # line 1010 "lev_comp.y"
  1550. X! {
  1551. X              tmpwalk[nwalk] = New(walk);
  1552. X              tmpwalk[nwalk]->x = current_coord.x;
  1553. X              tmpwalk[nwalk]->y = current_coord.y;
  1554. X--- 1794,1800 ----
  1555. X                  yyerror("A drawbridge can only be open or closed!");
  1556. X              ndb++;
  1557. X             } break;
  1558. X! case 143:{
  1559. X              tmpwalk[nwalk] = New(walk);
  1560. X              tmpwalk[nwalk]->x = current_coord.x;
  1561. X              tmpwalk[nwalk]->y = current_coord.y;
  1562. X***************
  1563. X*** 1941,1954 ****
  1564. X              tmpwalk[nwalk]->dir = yypvt[-0].i;
  1565. X              nwalk++;
  1566. X            } break;
  1567. X! case 144:
  1568. X! # line 1020 "lev_comp.y"
  1569. X! {
  1570. X              wallify_map();
  1571. X            } break;
  1572. X! case 145:
  1573. X! # line 1026 "lev_comp.y"
  1574. X! {
  1575. X              tmplad[nlad] = New(lad);
  1576. X              tmplad[nlad]->x = current_coord.x;
  1577. X              tmplad[nlad]->y = current_coord.y;
  1578. X--- 1801,1810 ----
  1579. X              tmpwalk[nwalk]->dir = yypvt[-0].i;
  1580. X              nwalk++;
  1581. X            } break;
  1582. X! case 144:{
  1583. X              wallify_map();
  1584. X            } break;
  1585. X! case 145:{
  1586. X              tmplad[nlad] = New(lad);
  1587. X              tmplad[nlad]->x = current_coord.x;
  1588. X              tmplad[nlad]->y = current_coord.y;
  1589. X***************
  1590. X*** 1958,1966 ****
  1591. X                      "Ladder");
  1592. X              nlad++;
  1593. X            } break;
  1594. X! case 146:
  1595. X! # line 1039 "lev_comp.y"
  1596. X! {
  1597. X              tmpstair[nstair] = New(stair);
  1598. X              tmpstair[nstair]->x = current_coord.x;
  1599. X              tmpstair[nstair]->y = current_coord.y;
  1600. X--- 1814,1820 ----
  1601. X                      "Ladder");
  1602. X              nlad++;
  1603. X            } break;
  1604. X! case 146:{
  1605. X              tmpstair[nstair] = New(stair);
  1606. X              tmpstair[nstair]->x = current_coord.x;
  1607. X              tmpstair[nstair]->y = current_coord.y;
  1608. X***************
  1609. X*** 1970,1978 ****
  1610. X                      "Stairway");
  1611. X              nstair++;
  1612. X            } break;
  1613. X! case 147:
  1614. X! # line 1052 "lev_comp.y"
  1615. X! {
  1616. X              tmplreg[nlreg] = New(lev_region);
  1617. X              tmplreg[nlreg]->in_islev = yypvt[-0].i;
  1618. X              tmplreg[nlreg]->inarea.x1 = current_region.x1;
  1619. X--- 1824,1830 ----
  1620. X                      "Stairway");
  1621. X              nstair++;
  1622. X            } break;
  1623. X! case 147:{
  1624. X              tmplreg[nlreg] = New(lev_region);
  1625. X              tmplreg[nlreg]->in_islev = yypvt[-0].i;
  1626. X              tmplreg[nlreg]->inarea.x1 = current_region.x1;
  1627. X***************
  1628. X*** 1980,1988 ****
  1629. X              tmplreg[nlreg]->inarea.x2 = current_region.x2;
  1630. X              tmplreg[nlreg]->inarea.y2 = current_region.y2;
  1631. X            } break;
  1632. X! case 148:
  1633. X! # line 1061 "lev_comp.y"
  1634. X! {
  1635. X              tmplreg[nlreg]->del_islev = yypvt[-2].i;
  1636. X              tmplreg[nlreg]->delarea.x1 = current_region.x1;
  1637. X              tmplreg[nlreg]->delarea.y1 = current_region.y1;
  1638. X--- 1832,1838 ----
  1639. X              tmplreg[nlreg]->inarea.x2 = current_region.x2;
  1640. X              tmplreg[nlreg]->inarea.y2 = current_region.y2;
  1641. X            } break;
  1642. X! case 148:{
  1643. X              tmplreg[nlreg]->del_islev = yypvt[-2].i;
  1644. X              tmplreg[nlreg]->delarea.x1 = current_region.x1;
  1645. X              tmplreg[nlreg]->delarea.y1 = current_region.y1;
  1646. X***************
  1647. X*** 1995,2003 ****
  1648. X              tmplreg[nlreg]->rname = 0;
  1649. X              nlreg++;
  1650. X            } break;
  1651. X! case 149:
  1652. X! # line 1077 "lev_comp.y"
  1653. X! {
  1654. X              tmplreg[nlreg] = New(lev_region);
  1655. X              tmplreg[nlreg]->in_islev = yypvt[-0].i;
  1656. X              tmplreg[nlreg]->inarea.x1 = current_region.x1;
  1657. X--- 1845,1851 ----
  1658. X              tmplreg[nlreg]->rname = 0;
  1659. X              nlreg++;
  1660. X            } break;
  1661. X! case 149:{
  1662. X              tmplreg[nlreg] = New(lev_region);
  1663. X              tmplreg[nlreg]->in_islev = yypvt[-0].i;
  1664. X              tmplreg[nlreg]->inarea.x1 = current_region.x1;
  1665. X***************
  1666. X*** 2005,2013 ****
  1667. X              tmplreg[nlreg]->inarea.x2 = current_region.x2;
  1668. X              tmplreg[nlreg]->inarea.y2 = current_region.y2;
  1669. X            } break;
  1670. X! case 150:
  1671. X! # line 1086 "lev_comp.y"
  1672. X! {
  1673. X              tmplreg[nlreg]->del_islev = yypvt[-2].i;
  1674. X              tmplreg[nlreg]->delarea.x1 = current_region.x1;
  1675. X              tmplreg[nlreg]->delarea.y1 = current_region.y1;
  1676. X--- 1853,1859 ----
  1677. X              tmplreg[nlreg]->inarea.x2 = current_region.x2;
  1678. X              tmplreg[nlreg]->inarea.y2 = current_region.y2;
  1679. X            } break;
  1680. X! case 150:{
  1681. X              tmplreg[nlreg]->del_islev = yypvt[-2].i;
  1682. X              tmplreg[nlreg]->delarea.x1 = current_region.x1;
  1683. X              tmplreg[nlreg]->delarea.y1 = current_region.y1;
  1684. X***************
  1685. X*** 2017,2025 ****
  1686. X              tmplreg[nlreg]->rname = yypvt[-0].map;
  1687. X              nlreg++;
  1688. X            } break;
  1689. X! case 151:
  1690. X! # line 1099 "lev_comp.y"
  1691. X! {
  1692. X              tmplreg[nlreg] = New(lev_region);
  1693. X              tmplreg[nlreg]->in_islev = yypvt[-0].i;
  1694. X              tmplreg[nlreg]->inarea.x1 = current_region.x1;
  1695. X--- 1863,1869 ----
  1696. X              tmplreg[nlreg]->rname = yypvt[-0].map;
  1697. X              nlreg++;
  1698. X            } break;
  1699. X! case 151:{
  1700. X              tmplreg[nlreg] = New(lev_region);
  1701. X              tmplreg[nlreg]->in_islev = yypvt[-0].i;
  1702. X              tmplreg[nlreg]->inarea.x1 = current_region.x1;
  1703. X***************
  1704. X*** 2027,2035 ****
  1705. X              tmplreg[nlreg]->inarea.x2 = current_region.x2;
  1706. X              tmplreg[nlreg]->inarea.y2 = current_region.y2;
  1707. X            } break;
  1708. X! case 152:
  1709. X! # line 1108 "lev_comp.y"
  1710. X! {
  1711. X              tmplreg[nlreg]->del_islev = yypvt[-0].i;
  1712. X              tmplreg[nlreg]->delarea.x1 = current_region.x1;
  1713. X              tmplreg[nlreg]->delarea.y1 = current_region.y1;
  1714. X--- 1871,1877 ----
  1715. X              tmplreg[nlreg]->inarea.x2 = current_region.x2;
  1716. X              tmplreg[nlreg]->inarea.y2 = current_region.y2;
  1717. X            } break;
  1718. X! case 152:{
  1719. X              tmplreg[nlreg]->del_islev = yypvt[-0].i;
  1720. X              tmplreg[nlreg]->delarea.x1 = current_region.x1;
  1721. X              tmplreg[nlreg]->delarea.y1 = current_region.y1;
  1722. X***************
  1723. X*** 2036,2044 ****
  1724. X              tmplreg[nlreg]->delarea.x2 = current_region.x2;
  1725. X              tmplreg[nlreg]->delarea.y2 = current_region.y2;
  1726. X            } break;
  1727. X! case 153:
  1728. X! # line 1116 "lev_comp.y"
  1729. X! {
  1730. X              switch(yypvt[-0].i) {
  1731. X              case -1: tmplreg[nlreg]->rtype = LR_TELE; break;
  1732. X              case 0: tmplreg[nlreg]->rtype = LR_DOWNTELE; break;
  1733. X--- 1878,1884 ----
  1734. X              tmplreg[nlreg]->delarea.x2 = current_region.x2;
  1735. X              tmplreg[nlreg]->delarea.y2 = current_region.y2;
  1736. X            } break;
  1737. X! case 153:{
  1738. X              switch(yypvt[-0].i) {
  1739. X              case -1: tmplreg[nlreg]->rtype = LR_TELE; break;
  1740. X              case 0: tmplreg[nlreg]->rtype = LR_DOWNTELE; break;
  1741. X***************
  1742. X*** 2047,2055 ****
  1743. X              tmplreg[nlreg]->rname = 0;
  1744. X              nlreg++;
  1745. X            } break;
  1746. X! case 154:
  1747. X! # line 1128 "lev_comp.y"
  1748. X! {
  1749. X              tmplreg[nlreg] = New(lev_region);
  1750. X              tmplreg[nlreg]->in_islev = yypvt[-0].i;
  1751. X              tmplreg[nlreg]->inarea.x1 = current_region.x1;
  1752. X--- 1887,1893 ----
  1753. X              tmplreg[nlreg]->rname = 0;
  1754. X              nlreg++;
  1755. X            } break;
  1756. X! case 154:{
  1757. X              tmplreg[nlreg] = New(lev_region);
  1758. X              tmplreg[nlreg]->in_islev = yypvt[-0].i;
  1759. X              tmplreg[nlreg]->inarea.x1 = current_region.x1;
  1760. X***************
  1761. X*** 2057,2065 ****
  1762. X              tmplreg[nlreg]->inarea.x2 = current_region.x2;
  1763. X              tmplreg[nlreg]->inarea.y2 = current_region.y2;
  1764. X            } break;
  1765. X! case 155:
  1766. X! # line 1137 "lev_comp.y"
  1767. X! {
  1768. X              tmplreg[nlreg]->del_islev = yypvt[-0].i;
  1769. X              tmplreg[nlreg]->delarea.x1 = current_region.x1;
  1770. X              tmplreg[nlreg]->delarea.y1 = current_region.y1;
  1771. X--- 1895,1901 ----
  1772. X              tmplreg[nlreg]->inarea.x2 = current_region.x2;
  1773. X              tmplreg[nlreg]->inarea.y2 = current_region.y2;
  1774. X            } break;
  1775. X! case 155:{
  1776. X              tmplreg[nlreg]->del_islev = yypvt[-0].i;
  1777. X              tmplreg[nlreg]->delarea.x1 = current_region.x1;
  1778. X              tmplreg[nlreg]->delarea.y1 = current_region.y1;
  1779. X***************
  1780. X*** 2069,2092 ****
  1781. X              tmplreg[nlreg]->rname = 0;
  1782. X              nlreg++;
  1783. X            } break;
  1784. X! case 156:
  1785. X! # line 1150 "lev_comp.y"
  1786. X! {
  1787. X              yyval.i = -1;
  1788. X            } break;
  1789. X! case 157:
  1790. X! # line 1154 "lev_comp.y"
  1791. X! {
  1792. X              yyval.i = yypvt[-0].i;
  1793. X            } break;
  1794. X! case 158:
  1795. X! # line 1160 "lev_comp.y"
  1796. X! {
  1797. X              yyval.i = 0;
  1798. X            } break;
  1799. X! case 159:
  1800. X! # line 1164 "lev_comp.y"
  1801. X! {
  1802. X  /* This series of if statements is a hack for MSC 5.1.  It seems that its
  1803. X     tiny little brain cannot compile if these are all one big if statement. */
  1804. X              if (yypvt[-7].i <= 0 || yypvt[-7].i >= COLNO)
  1805. X--- 1905,1920 ----
  1806. X              tmplreg[nlreg]->rname = 0;
  1807. X              nlreg++;
  1808. X            } break;
  1809. X! case 156:{
  1810. X              yyval.i = -1;
  1811. X            } break;
  1812. X! case 157:{
  1813. X              yyval.i = yypvt[-0].i;
  1814. X            } break;
  1815. X! case 158:{
  1816. X              yyval.i = 0;
  1817. X            } break;
  1818. X! case 159:{
  1819. X  /* This series of if statements is a hack for MSC 5.1.  It seems that its
  1820. X     tiny little brain cannot compile if these are all one big if statement. */
  1821. X              if (yypvt[-7].i <= 0 || yypvt[-7].i >= COLNO)
  1822. X***************
  1823. X*** 2103,2111 ****
  1824. X              current_region.y2 = yypvt[-1].i;
  1825. X              yyval.i = 1;
  1826. X            } break;
  1827. X! case 160:
  1828. X! # line 1184 "lev_comp.y"
  1829. X! {
  1830. X              tmpfountain[nfountain] = New(fountain);
  1831. X              tmpfountain[nfountain]->x = current_coord.x;
  1832. X              tmpfountain[nfountain]->y = current_coord.y;
  1833. X--- 1931,1937 ----
  1834. X              current_region.y2 = yypvt[-1].i;
  1835. X              yyval.i = 1;
  1836. X            } break;
  1837. X! case 160:{
  1838. X              tmpfountain[nfountain] = New(fountain);
  1839. X              tmpfountain[nfountain]->x = current_coord.x;
  1840. X              tmpfountain[nfountain]->y = current_coord.y;
  1841. X***************
  1842. X*** 2114,2138 ****
  1843. X                      "Fountain");
  1844. X              nfountain++;
  1845. X            } break;
  1846. X! case 161:
  1847. X! # line 1196 "lev_comp.y"
  1848. X! {
  1849. X              tmpsink[nsink] = New(sink);
  1850. X              tmpsink[nsink]->x = current_coord.x;
  1851. X              tmpsink[nsink]->y = current_coord.y;
  1852. X              nsink++;
  1853. X            } break;
  1854. X! case 162:
  1855. X! # line 1205 "lev_comp.y"
  1856. X! {
  1857. X              tmppool[npool] = New(pool);
  1858. X              tmppool[npool]->x = current_coord.x;
  1859. X              tmppool[npool]->y = current_coord.y;
  1860. X              npool++;
  1861. X            } break;
  1862. X! case 163:
  1863. X! # line 1214 "lev_comp.y"
  1864. X! {
  1865. X              tmpdig[ndig] = New(digpos);
  1866. X              tmpdig[ndig]->x1 = current_region.x1;
  1867. X              tmpdig[ndig]->y1 = current_region.y1;
  1868. X--- 1940,1958 ----
  1869. X                      "Fountain");
  1870. X              nfountain++;
  1871. X            } break;
  1872. X! case 161:{
  1873. X              tmpsink[nsink] = New(sink);
  1874. X              tmpsink[nsink]->x = current_coord.x;
  1875. X              tmpsink[nsink]->y = current_coord.y;
  1876. X              nsink++;
  1877. X            } break;
  1878. X! case 162:{
  1879. X              tmppool[npool] = New(pool);
  1880. X              tmppool[npool]->x = current_coord.x;
  1881. X              tmppool[npool]->y = current_coord.y;
  1882. X              npool++;
  1883. X            } break;
  1884. X! case 163:{
  1885. X              tmpdig[ndig] = New(digpos);
  1886. X              tmpdig[ndig]->x1 = current_region.x1;
  1887. X              tmpdig[ndig]->y1 = current_region.y1;
  1888. X***************
  1889. X*** 2140,2148 ****
  1890. X              tmpdig[ndig]->y2 = current_region.y2;
  1891. X              ndig++;
  1892. X            } break;
  1893. X! case 164:
  1894. X! # line 1225 "lev_comp.y"
  1895. X! {
  1896. X              tmppass[npass] = New(digpos);
  1897. X              tmppass[npass]->x1 = current_region.x1;
  1898. X              tmppass[npass]->y1 = current_region.y1;
  1899. X--- 1960,1966 ----
  1900. X              tmpdig[ndig]->y2 = current_region.y2;
  1901. X              ndig++;
  1902. X            } break;
  1903. X! case 164:{
  1904. X              tmppass[npass] = New(digpos);
  1905. X              tmppass[npass]->x1 = current_region.x1;
  1906. X              tmppass[npass]->y1 = current_region.y1;
  1907. X***************
  1908. X*** 2150,2158 ****
  1909. X              tmppass[npass]->y2 = current_region.y2;
  1910. X              npass++;
  1911. X            } break;
  1912. X! case 165:
  1913. X! # line 1236 "lev_comp.y"
  1914. X! {
  1915. X              tmpreg[nreg] = New(region);
  1916. X              tmpreg[nreg]->x1 = current_region.x1;
  1917. X              tmpreg[nreg]->y1 = current_region.y1;
  1918. X--- 1968,1974 ----
  1919. X              tmppass[npass]->y2 = current_region.y2;
  1920. X              npass++;
  1921. X            } break;
  1922. X! case 165:{
  1923. X              tmpreg[nreg] = New(region);
  1924. X              tmpreg[nreg]->x1 = current_region.x1;
  1925. X              tmpreg[nreg]->y1 = current_region.y1;
  1926. X***************
  1927. X*** 2211,2219 ****
  1928. X              }
  1929. X              nreg++;
  1930. X            } break;
  1931. X! case 166:
  1932. X! # line 1298 "lev_comp.y"
  1933. X! {
  1934. X              tmpaltar[naltar] = New(altar);
  1935. X              tmpaltar[naltar]->x = current_coord.x;
  1936. X              tmpaltar[naltar]->y = current_coord.y;
  1937. X--- 2027,2033 ----
  1938. X              }
  1939. X              nreg++;
  1940. X            } break;
  1941. X! case 166:{
  1942. X              tmpaltar[naltar] = New(altar);
  1943. X              tmpaltar[naltar]->x = current_coord.x;
  1944. X              tmpaltar[naltar]->y = current_coord.y;
  1945. X***************
  1946. X*** 2224,2232 ****
  1947. X                      "Altar");
  1948. X              naltar++;
  1949. X            } break;
  1950. X! case 167:
  1951. X! # line 1312 "lev_comp.y"
  1952. X! {
  1953. X              tmpgold[ngold] = New(gold);
  1954. X              tmpgold[ngold]->x = current_coord.x;
  1955. X              tmpgold[ngold]->y = current_coord.y;
  1956. X--- 2038,2044 ----
  1957. X                      "Altar");
  1958. X              naltar++;
  1959. X            } break;
  1960. X! case 167:{
  1961. X              tmpgold[ngold] = New(gold);
  1962. X              tmpgold[ngold]->x = current_coord.x;
  1963. X              tmpgold[ngold]->y = current_coord.y;
  1964. X***************
  1965. X*** 2236,2244 ****
  1966. X                      "Gold");
  1967. X              ngold++;
  1968. X            } break;
  1969. X! case 168:
  1970. X! # line 1325 "lev_comp.y"
  1971. X! {
  1972. X              tmpengraving[nengraving] = New(engraving);
  1973. X              tmpengraving[nengraving]->x = current_coord.x;
  1974. X              tmpengraving[nengraving]->y = current_coord.y;
  1975. X--- 2048,2054 ----
  1976. X                      "Gold");
  1977. X              ngold++;
  1978. X            } break;
  1979. X! case 168:{
  1980. X              tmpengraving[nengraving] = New(engraving);
  1981. X              tmpengraving[nengraving]->x = current_coord.x;
  1982. X              tmpengraving[nengraving]->y = current_coord.y;
  1983. X***************
  1984. X*** 2249,2285 ****
  1985. X                      "Engraving");
  1986. X              nengraving++;
  1987. X            } break;
  1988. X! case 170:
  1989. X! # line 1340 "lev_comp.y"
  1990. X! {
  1991. X              yyval.i = - MAX_REGISTERS - 1;
  1992. X            } break;
  1993. X! case 173:
  1994. X! # line 1348 "lev_comp.y"
  1995. X! {
  1996. X              yyval.i = - MAX_REGISTERS - 1;
  1997. X            } break;
  1998. X! case 176:
  1999. X! # line 1356 "lev_comp.y"
  2000. X! {
  2001. X              yyval.map = (char *) 0;
  2002. X            } break;
  2003. X! case 178:
  2004. X! # line 1363 "lev_comp.y"
  2005. X! {
  2006. X              yyval.map = (char *) 0;
  2007. X            } break;
  2008. X! case 179:
  2009. X! # line 1369 "lev_comp.y"
  2010. X! {
  2011. X              int token = get_trap_type(yypvt[-0].map);
  2012. X              if (token == ERR)
  2013. X                  yyerror("Unknown trap type!");
  2014. X              yyval.i = token;
  2015. X            } break;
  2016. X! case 181:
  2017. X! # line 1379 "lev_comp.y"
  2018. X! {
  2019. X              int token = get_room_type(yypvt[-0].map);
  2020. X              if (token == ERR) {
  2021. X                  yywarning("Unknown room type!  Making ordinary room...");
  2022. X--- 2059,2083 ----
  2023. X                      "Engraving");
  2024. X              nengraving++;
  2025. X            } break;
  2026. X! case 170:{
  2027. X              yyval.i = - MAX_REGISTERS - 1;
  2028. X            } break;
  2029. X! case 173:{
  2030. X              yyval.i = - MAX_REGISTERS - 1;
  2031. X            } break;
  2032. X! case 176:{
  2033. X              yyval.map = (char *) 0;
  2034. X            } break;
  2035. X! case 178:{
  2036. X              yyval.map = (char *) 0;
  2037. X            } break;
  2038. X! case 179:{
  2039. X              int token = get_trap_type(yypvt[-0].map);
  2040. X              if (token == ERR)
  2041. X                  yyerror("Unknown trap type!");
  2042. X              yyval.i = token;
  2043. X            } break;
  2044. X! case 181:{
  2045. X              int token = get_room_type(yypvt[-0].map);
  2046. X              if (token == ERR) {
  2047. X                  yywarning("Unknown room type!  Making ordinary room...");
  2048. X***************
  2049. X*** 2287,2352 ****
  2050. X              } else
  2051. X                  yyval.i = token;
  2052. X            } break;
  2053. X! case 183:
  2054. X! # line 1391 "lev_comp.y"
  2055. X! {
  2056. X              yyval.i = 0;
  2057. X            } break;
  2058. X! case 184:
  2059. X! # line 1395 "lev_comp.y"
  2060. X! {
  2061. X              yyval.i = yypvt[-0].i;
  2062. X            } break;
  2063. X! case 185:
  2064. X! # line 1399 "lev_comp.y"
  2065. X! {
  2066. X              yyval.i = yypvt[-2].i + (yypvt[-0].i << 1);
  2067. X            } break;
  2068. X! case 188:
  2069. X! # line 1407 "lev_comp.y"
  2070. X! {
  2071. X              current_coord.x = current_coord.y = -MAX_REGISTERS-1;
  2072. X            } break;
  2073. X! case 195:
  2074. X! # line 1423 "lev_comp.y"
  2075. X! {
  2076. X              yyval.i = - MAX_REGISTERS - 1;
  2077. X            } break;
  2078. X! case 198:
  2079. X! # line 1433 "lev_comp.y"
  2080. X! {
  2081. X              if ( yypvt[-1].i >= MAX_REGISTERS )
  2082. X                  yyerror("Register Index overflow!");
  2083. X              else
  2084. X                  current_coord.x = current_coord.y = - yypvt[-1].i - 1;
  2085. X            } break;
  2086. X! case 199:
  2087. X! # line 1442 "lev_comp.y"
  2088. X! {
  2089. X              if ( yypvt[-1].i >= MAX_REGISTERS )
  2090. X                  yyerror("Register Index overflow!");
  2091. X              else
  2092. X                  yyval.i = - yypvt[-1].i - 1;
  2093. X            } break;
  2094. X! case 200:
  2095. X! # line 1451 "lev_comp.y"
  2096. X! {
  2097. X              if ( yypvt[-1].i >= MAX_REGISTERS )
  2098. X                  yyerror("Register Index overflow!");
  2099. X              else
  2100. X                  yyval.i = - yypvt[-1].i - 1;
  2101. X            } break;
  2102. X! case 201:
  2103. X! # line 1460 "lev_comp.y"
  2104. X! {
  2105. X              if ( yypvt[-1].i >= 3 )
  2106. X                  yyerror("Register Index overflow!");
  2107. X              else
  2108. X                  yyval.i = - yypvt[-1].i - 1;
  2109. X            } break;
  2110. X! case 203:
  2111. X! # line 1472 "lev_comp.y"
  2112. X! {
  2113. X              if (check_monster_char((char) yypvt[-0].i))
  2114. X                  yyval.i = yypvt[-0].i ;
  2115. X              else {
  2116. X--- 2085,2130 ----
  2117. X              } else
  2118. X                  yyval.i = token;
  2119. X            } break;
  2120. X! case 183:{
  2121. X              yyval.i = 0;
  2122. X            } break;
  2123. X! case 184:{
  2124. X              yyval.i = yypvt[-0].i;
  2125. X            } break;
  2126. X! case 185:{
  2127. X              yyval.i = yypvt[-2].i + (yypvt[-0].i << 1);
  2128. X            } break;
  2129. X! case 188:{
  2130. X              current_coord.x = current_coord.y = -MAX_REGISTERS-1;
  2131. X            } break;
  2132. X! case 195:{
  2133. X              yyval.i = - MAX_REGISTERS - 1;
  2134. X            } break;
  2135. X! case 198:{
  2136. X              if ( yypvt[-1].i >= MAX_REGISTERS )
  2137. X                  yyerror("Register Index overflow!");
  2138. X              else
  2139. X                  current_coord.x = current_coord.y = - yypvt[-1].i - 1;
  2140. X            } break;
  2141. X! case 199:{
  2142. X              if ( yypvt[-1].i >= MAX_REGISTERS )
  2143. X                  yyerror("Register Index overflow!");
  2144. X              else
  2145. X                  yyval.i = - yypvt[-1].i - 1;
  2146. X            } break;
  2147. X! case 200:{
  2148. X              if ( yypvt[-1].i >= MAX_REGISTERS )
  2149. X                  yyerror("Register Index overflow!");
  2150. X              else
  2151. X                  yyval.i = - yypvt[-1].i - 1;
  2152. X            } break;
  2153. X! case 201:{
  2154. X              if ( yypvt[-1].i >= 3 )
  2155. X                  yyerror("Register Index overflow!");
  2156. X              else
  2157. X                  yyval.i = - yypvt[-1].i - 1;
  2158. X            } break;
  2159. X! case 203:{
  2160. X              if (check_monster_char((char) yypvt[-0].i))
  2161. X                  yyval.i = yypvt[-0].i ;
  2162. X              else {
  2163. X***************
  2164. X*** 2354,2362 ****
  2165. X                  yyval.i = ERR;
  2166. X              }
  2167. X            } break;
  2168. X! case 204:
  2169. X! # line 1483 "lev_comp.y"
  2170. X! {
  2171. X              char c = yypvt[-0].i;
  2172. X              if (check_object_char(c))
  2173. X                  yyval.i = c;
  2174. X--- 2132,2138 ----
  2175. X                  yyval.i = ERR;
  2176. X              }
  2177. X            } break;
  2178. X! case 204:{
  2179. X              char c = yypvt[-0].i;
  2180. X              if (check_object_char(c))
  2181. X                  yyval.i = c;
  2182. X***************
  2183. X*** 2365,2378 ****
  2184. X                  yyval.i = ERR;
  2185. X              }
  2186. X            } break;
  2187. X! case 207:
  2188. X! # line 1499 "lev_comp.y"
  2189. X! {
  2190. X              yyval.map = (char *) 0;
  2191. X            } break;
  2192. X! case 212:
  2193. X! # line 1513 "lev_comp.y"
  2194. X! {
  2195. X              if (!in_room && !init_lev.init_present &&
  2196. X                  (yypvt[-3].i < 0 || yypvt[-3].i > max_x_map ||
  2197. X                   yypvt[-1].i < 0 || yypvt[-1].i > max_y_map))
  2198. X--- 2141,2150 ----
  2199. X                  yyval.i = ERR;
  2200. X              }
  2201. X            } break;
  2202. X! case 207:{
  2203. X              yyval.map = (char *) 0;
  2204. X            } break;
  2205. X! case 212:{
  2206. X              if (!in_room && !init_lev.init_present &&
  2207. X                  (yypvt[-3].i < 0 || yypvt[-3].i > max_x_map ||
  2208. X                   yypvt[-1].i < 0 || yypvt[-1].i > max_y_map))
  2209. X***************
  2210. X*** 2380,2388 ****
  2211. X              current_coord.x = yypvt[-3].i;
  2212. X              current_coord.y = yypvt[-1].i;
  2213. X            } break;
  2214. X! case 213:
  2215. X! # line 1524 "lev_comp.y"
  2216. X! {
  2217. X  /* This series of if statements is a hack for MSC 5.1.  It seems that its
  2218. X     tiny little brain cannot compile if these are all one big if statement. */
  2219. X              if (yypvt[-7].i < 0 || yypvt[-7].i > max_x_map)
  2220. X--- 2152,2158 ----
  2221. X              current_coord.x = yypvt[-3].i;
  2222. X              current_coord.y = yypvt[-1].i;
  2223. X            } break;
  2224. X! case 213:{
  2225. X  /* This series of if statements is a hack for MSC 5.1.  It seems that its
  2226. X     tiny little brain cannot compile if these are all one big if statement. */
  2227. X              if (yypvt[-7].i < 0 || yypvt[-7].i > max_x_map)
  2228. X*** /tmp/da14276    Tue Jun  1 20:17:15 1993
  2229. X--- sys/share/pcmain.c    Mon Mar 29 12:22:59 1993
  2230. X***************
  2231. X*** 435,444 ****
  2232. X--- 435,450 ----
  2233. X  #ifdef NEWS
  2234. X              (void) printf(" [-n]");
  2235. X  #endif
  2236. X+ #ifndef AMIGA
  2237. X+             (void) printf(" [-I] [-i] [-d]");
  2238. X+ #endif
  2239. X  #ifdef MFLOPPY
  2240. X  # ifndef AMIGA
  2241. X              (void) printf(" [-r]");
  2242. X  # endif
  2243. X+ #endif
  2244. X+ #ifdef AMIGA
  2245. X+             (void) printf(" [-[lL]]");
  2246. X  #endif
  2247. X              putchar('\n');
  2248. X              exit(0);
  2249. END_OF_FILE
  2250. if test 55034 -ne `wc -c <'patches02s'`; then
  2251.     echo shar: \"'patches02s'\" unpacked with wrong size!
  2252. fi
  2253. # end of 'patches02s'
  2254. echo shar: End of archive 12 \(of 33\).
  2255. cp /dev/null ark12isdone
  2256. MISSING=""
  2257. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 ; do
  2258.     if test ! -f ark${I}isdone ; then
  2259.     MISSING="${MISSING} ${I}"
  2260.     fi
  2261. done
  2262. if test "${MISSING}" = "" ; then
  2263.     echo You have unpacked all 33 archives.
  2264.     echo "Now execute ./patchit.sh"
  2265.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  2266. else
  2267.     echo You still need to unpack the following archives:
  2268.     echo "        " ${MISSING}
  2269. fi
  2270. ##  End of shell archive.
  2271. exit 0
  2272.