home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / games / volume15 / dinkum / part01 < prev    next >
Encoding:
Internet Message Format  |  1993-01-26  |  54.7 KB

  1. Path: uunet!news.tek.com!master!saab!billr
  2. From: billr@saab.CNA.TEK.COM (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v15i021:  dinkum - australian text adventure game, Part01/06
  5. Message-ID: <3979@master.CNA.TEK.COM>
  6. Date: 29 Nov 92 20:30:35 GMT
  7. Sender: news@master.CNA.TEK.COM
  8. Lines: 1378
  9. Approved: billr@saab.CNA.TEK.COM
  10. Xref: uunet comp.sources.games:1520
  11.  
  12. Submitted-by: Gary Allen <gary@sun.mech.uq.oz.au>
  13. Posting-number: Volume 15, Issue 21
  14. Archive-name: dinkum/Part01
  15. Environment: Unix, DOS
  16.  
  17.     ["G'day Mate!  Welcome to 'Dinkum' the Australian adventure
  18.     game.  In Dinkum you'll search for treasure in the
  19.     Australian Outback.  You give the commands and I'll do the
  20.     dangerous work. I understand most plain English sentences."]
  21.  
  22. #! /bin/sh
  23. # This is a shell archive.  Remove anything before this line, then unpack
  24. # it by saving it into a file and typing "sh file".  To overwrite existing
  25. # files, type "sh file -c".  You can also feed this as standard input via
  26. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  27. # will see the following message at the end:
  28. #        "End of archive 1 (of 6)."
  29. # Contents:  README MANIFEST dink_glb.h gleeper.c
  30. # Wrapped by billr@saab on Sun Nov 29 12:25:48 1992
  31. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  32. if test -f 'README' -a "${1}" != "-c" ; then 
  33.   echo shar: Will not clobber existing file \"'README'\"
  34. else
  35. echo shar: Extracting \"'README'\" \(1857 characters\)
  36. sed "s/^X//" >'README' <<'END_OF_FILE'
  37. X                    --- Dinkum --- 
  38. X       (c) Copyright 1990 by Gary A. Allen, Jr.
  39. X   All Rights Reserved. Version: 1.27, 24 August 1992
  40. X
  41. X      Dinkum is a text style "adventure" game.
  42. X
  43. XYou are free to use, copy and distribute Dinkum provided:
  44. X       NO FEE IS CHARGED FOR USE, COPYING OR DISTRIBUTION.
  45. X       THIS PROGRAM IS FOR PRIVATE, NONCOMMERICAL USE ONLY.
  46. X       THE PROGRAM MAY NOT BE MODIFIED IN ANY WAY.
  47. X
  48. XThis program is provided AS IS without any warranty,
  49. Xexpressed or implied, including but not limited to fitness
  50. Xfor any particular purpose.
  51. X
  52. XWhen corresponding please state the current version of
  53. XDinkum which you are using.  Contributions and questions
  54. Xabout this program should be sent to the following address:
  55. X
  56. X          E-mail address:     gary@sun.mech.uq.oz.au
  57. X
  58. X          Postal address:     Gary A. Allen, Jr. 
  59. X                              P.O. Box 13
  60. X                              St. Lucia, Queensland  4067
  61. X                                            Australia
  62. X                
  63. X               -----------------------
  64. X
  65. XThe program has been tested to compile under DOS through Turbo-C or under Unix
  66. Xfor the IBM-RISC/6000, Sun and Iris. As far as I know it works and has no
  67. Xobvious bugs.  Of course with adventure games the word "bug" has a pretty
  68. Xloose meaning.
  69. X
  70. XThe C coding style is a little bit embarrassing for me.  I wrote this program
  71. Xafter I finally resolved to never again code in FORTRAN.  In fact I used this
  72. Xcode for learning C and exploring natural language. If you think this program
  73. Xis worth the trouble then I'll try and clean it up and get the source code
  74. Xinto a more presentable form.  Also if you should have any suggestions on
  75. Xways to improve this program then please feel free to suggest them.  However
  76. XI'll only invest another month on this thing (I wasted too much time on it
  77. Xalready).
  78. X
  79. X                               Gary Allen
  80. END_OF_FILE
  81. if test 1857 -ne `wc -c <'README'`; then
  82.     echo shar: \"'README'\" unpacked with wrong size!
  83. fi
  84. # end of 'README'
  85. fi
  86. if test -f 'MANIFEST' -a "${1}" != "-c" ; then 
  87.   echo shar: Will not clobber existing file \"'MANIFEST'\"
  88. else
  89. echo shar: Extracting \"'MANIFEST'\" \(579 characters\)
  90. sed "s/^X//" >'MANIFEST' <<'END_OF_FILE'
  91. X   File Name        Archive #    Description
  92. X-----------------------------------------------------------
  93. X MANIFEST                   1    This shipping list
  94. X README                     1    
  95. X actor.c                    5    
  96. X describe.c                 3    
  97. X dink_glb.h                 1    
  98. X dink_sym.h                 6    
  99. X dinkum.c                   4    
  100. X gleeper.c                  1    
  101. X longdsc.c                  2    
  102. X makefile                   2    
  103. X monster.c                  4    
  104. X objlook.c                  2    
  105. X opener.c                   5    
  106. X parse.c                    5    
  107. X taker.c                    3    
  108. END_OF_FILE
  109. if test 579 -ne `wc -c <'MANIFEST'`; then
  110.     echo shar: \"'MANIFEST'\" unpacked with wrong size!
  111. fi
  112. # end of 'MANIFEST'
  113. fi
  114. if test -f 'dink_glb.h' -a "${1}" != "-c" ; then 
  115.   echo shar: Will not clobber existing file \"'dink_glb.h'\"
  116. else
  117. echo shar: Extracting \"'dink_glb.h'\" \(35916 characters\)
  118. sed "s/^X//" >'dink_glb.h' <<'END_OF_FILE'
  119. X/***************************************************************/
  120. X/*                                                             */
  121. X/*             --- Global Variables Header File ---            */
  122. X/*                                                             */
  123. X/*     Software by Gary A. Allen, Jr.  20 May 1990             */
  124. X/*           (c) Copyright 1990 by Gary A. Allen, Jr.          */
  125. X/*                                                             */
  126. X/***************************************************************/
  127. X/* repeated global varaiable dimenions */
  128. X#define DM_letmax        310    /* DM_letmax = DM_vocab - 1 */
  129. X#define DM_vocab        311
  130. X#define DM_tag            312    /* DM_tag    = DM_vocab + 1 */
  131. X
  132. X#define DM_room             243
  133. X
  134. X#define DM_object        66
  135. X#define DM_objcnt        65    /* DM_objcnt = DM_object - 1 */
  136. X
  137. X#define DM_enemy_cnt_m1        14 
  138. X#define DM_enemy_cnt         15 
  139. X#define DM_enemy_cnt_p1        16 
  140. X
  141. X/***************************************************************/
  142. X
  143. X#ifdef DINKUM
  144. Xextern int room[DM_room][16] ;
  145. Xextern int objcnt ; 
  146. Xextern int object[DM_object][6] ;
  147. Xextern int tag[DM_tag] ;
  148. Xextern int sw_transport ;
  149. Xint gleep_count = 0 ; /* gleeps being carried */
  150. Xint verb, max_score = 1100 ;
  151. Xint sw_wizard = FALSE ;
  152. Xlong clock_explode ;
  153. Xint sw_warned, flag_clock, sw_clock = FALSE, i_poison = 0 ;
  154. X/* gleep initialization matrix */
  155. Xint gleep_init[10][4] = {
  156. X97,    98,    101,    102,
  157. X98,    99,    102,    103,
  158. X99,    100,    103,    96,
  159. X100,    101,    96,    97,
  160. X101,    102,    97,    98,
  161. X102,    103,    98,    99,
  162. X103,    96,    99,    100,
  163. X134,    132,    136,    137,
  164. X69,    66,    90,    89,
  165. X74,    72,    68,    92 
  166. X};
  167. Xint gleep_spot[10] ; /* gleep reproduction room pointer array */
  168. Xint gleep_score = 0 ; /* gleeps dropped in the gleep tank */
  169. X
  170. X/* monster matrix initialization matrix */
  171. Xint mon_init_max = DM_enemy_cnt_m1 ;
  172. Xint mon_init[DM_enemy_cnt][4] = {
  173. X/* Mutant Wombat */
  174. X139,    67,    86,    115,
  175. X/* Drop Bears    */
  176. X77,    75,    78,    79,
  177. X103,    97,    98,    71,
  178. X64,    60,    62,    93,
  179. X67,    69,    66,    75,
  180. X/* Hoop Snakes   */
  181. X93,    95,    94,    64,
  182. X75,    73,    76,    67,
  183. X71,    68,    67,    77,
  184. X52,    53,    51,    103,
  185. X115,    114,    113,    129,
  186. X131,    130,    129,    80,
  187. X119,    120,    118,    84,
  188. X109,    87,    84,    52,
  189. X/* Revolutionary Guards */
  190. X241,    241,    241,    241,
  191. X/* Chief Mullah */
  192. X242,    242,    242,    242
  193. X} ;
  194. X/* object matrix initialization matrix */
  195. Xint obj_init_max = 50 ;
  196. Xint obj_init[51][5] = {
  197. XO_can,        1,    1,    1,    1,
  198. XO_butt,        165,    166,    161,    152,
  199. XO_bottle,    11,    11,     11,    11,
  200. XO_gold,        54,    53,    55,    56,
  201. XO_dynamite,    78,    91,    69,    117,
  202. XO_clip,        48,    52,    52,    48,
  203. XO_org_clip,    117,    69,    113,    82,
  204. XO_rifle,    48,    56,    48,    52,
  205. XO_cap,        183,    184,    183,    184,
  206. XO_matches,    69,    85,    78,    121,
  207. XO_ring,        87,    135,    127,    105,
  208. XO_ruby,        99,    106,    114,    74,
  209. XO_coin,        127,    127,    87,    87,
  210. XO_bill,        135,    87,    135,    127,
  211. XO_pills,    85,    83,    91,    78,
  212. XO_saphire,    91,    78,    85,    69,
  213. XO_emerald,    68,    74,    117,    66,
  214. XO_letter,    177,    177,    177,    177,
  215. XO_torch,    92,    114,    66,    53,
  216. XO_cube,        202,    202,    202,    202,
  217. XO_wrapper,    171,    216,    239,    101,
  218. XO_tire,        47,    47,    47,    47,
  219. XO_shell,    82,    107,    213,    175,
  220. XO_brick,    33,    33,    33,    33,
  221. XO_rope,        209,    179,    181,    155,
  222. XO_package,    156,    137,    95,    113,
  223. XO_belt,        21,    21,    21,    21,
  224. XO_filter,    142,    142,    142,    142,
  225. XO_string,    204,    88,    118,    167,
  226. XO_umbrella,    37,    37,    37,    37,
  227. XO_tackle,    9,    9,    9,    9,
  228. XO_bit,        81,    117,    90,    184,
  229. XO_jack,        81,    81,    81,    81,
  230. XO_pen,        177,    177,    177,    177,
  231. XO_pencil,    202,    202,    202,    202,
  232. XO_wire,        214,    154,    159,    151,
  233. XO_pipe,        206,    239,    166,    151,
  234. XO_opener,    63,    62,    61,    60,
  235. XO_cord,        80,    131,    119,    79,
  236. XO_photo,    206,    160,    155,    180,
  237. XO_chair,    177,    177,    177,    177,
  238. XO_bulb,        154,    162,    164,    181,
  239. XO_rag,        92,    89,    73,    132,
  240. XO_tube,        139,    121,    129,    132,
  241. XO_carpet,    41,    41,    41,    41,
  242. XO_branch,    28,    28,    28,    28,
  243. XO_cork,        130,    122,    115,    109,
  244. XO_trap,        146,    146,    146,    146,
  245. XO_lighter,    210,    213,    46,    79,
  246. XO_lace,        126,    136,    67,    72,
  247. XO_comb,        164,    157,    156,    172
  248. X} ;
  249. X
  250. X/************************************************/
  251. X/*         --- Enemy/Monster matrix ---        */
  252. X/*  enemy[i][j]  description             */ 
  253. X/*    i = Monster Type              */
  254. X/*      = 0 = N_ned = Ned Kelly            */
  255. X/*      = 1 = N_wombat = Mutant Wombat        */
  256. X/*      = (2 - 5) = Drop Bears (four total)    */
  257. X/*      = (6 - 13) = Hoop Snakes (eight total)    */
  258. X/*      = 14 = Revolutionary Guards             */
  259. X/*      = 15 = Chief Mullah                        */
  260. X/*                        */
  261. X/*    j = 0 = E_location                         */
  262. X/*          = monster location or if negative    */
  263. X/*            can be B_unmade or B_destroyed    */
  264. X/*      = 1 = E_status                */
  265. X/*          = monster status             */
  266. X/*    = 2 = E_hits                           */
  267. X/*        = monster hits (times shot)        */
  268. X/************************************************/
  269. Xint enemy_max = DM_enemy_cnt ;
  270. Xint enemy [DM_enemy_cnt_p1][3] = {
  271. XB_unmade,    F_asleep,     0,
  272. XB_unmade,    F_asleep,     0,
  273. XB_unmade,    F_asleep,     0,
  274. XB_unmade,    F_asleep,     0,
  275. XB_unmade,    F_asleep,     0,
  276. XB_unmade,    F_asleep,     0,
  277. XB_unmade,    F_asleep,     0,
  278. XB_unmade,    F_asleep,     0,
  279. XB_unmade,    F_asleep,     0,
  280. XB_unmade,    F_asleep,     0,
  281. XB_unmade,    F_asleep,     0,
  282. XB_unmade,    F_asleep,     0,
  283. XB_unmade,    F_asleep,     0,
  284. XB_unmade,    F_asleep,     0,
  285. XB_unmade,    F_asleep,     0,
  286. XB_unmade,    F_asleep,     0
  287. X} ;
  288. X
  289. Xint score = 0 ;
  290. Xint monster_flag = F_no_monster ;
  291. Xint carry_count, carry_weight ;
  292. X#endif
  293. X
  294. X/***************************************************************/
  295. X
  296. X#ifdef OBJLKR
  297. Xextern int enemy[DM_enemy_cnt_p1][3] ;
  298. Xextern int tag[DM_tag] ;
  299. Xextern int sw_warned, score, gleep_score, max_score, sw_wizard ;
  300. X/* a switch used in the "kelly" subroutine */
  301. Xint sw_valuable = FALSE ;
  302. X
  303. X/* layout matrix for game */
  304. X/*   n = room number      */ 
  305. X
  306. X/*   The direction elements contain the adjoining room or a wall */
  307. X/*   if the element value is negative.                           */
  308. X/*     room[n][0] = north direction      */
  309. X/*     room[n][1] = south direction      */
  310. X/*     room[n][2] = east direction       */
  311. X/*     room[n][3] = west direction       */
  312. X/*     room[n][4] = up direction         */
  313. X/*     room[n][5] = down direction       */
  314. X/*     room[n][6] = north-east direction */
  315. X/*     room[n][7] = north-west direction */
  316. X/*     room[n][8] = south-east direction */
  317. X/*     room[n][9] = south-west direction */
  318. X
  319. X/*  room[n][10] points to the room type                      */
  320. X/*               = -1 == instantly lethal                    */
  321. X/*               =  1 == long description                    */
  322. X/*               =  2 == contains a nonmovable action device */
  323. X/*               =  3 == used to have a long description     */
  324. X/*               =  4 == contains a nonmovable device        */
  325. X/*               =  5 == room goes into itself (looping)     */
  326. X/*  room[n][11] flag indicates number of objects in room.    */
  327. X/*  room[n][12] is the room status number as refered by type */
  328. X/*  room[n][13] is the monster indicater, 0 = no monsters    */
  329. X/*  room[n][14] is the gleep count                           */
  330. X/*  room[n][15] points to the description text file          */
  331. X
  332. Xint room [DM_room][16] = {
  333. X  3,  2,  1, 15, -1, -1,  1, 15,  3,  2,  0,  0,  0,  0,  0,  0, 
  334. X  6,  2, 20,  0, -1, -1,  0,  3,  0,  2,  0,  0,  0,  0,  0,  1,
  335. X 28, 11, 29,148, -1, -1, 29, 11, 28,148,  0,  0,  0,  0,  0,  2, 
  336. X  4,  0,  6,  4, -1, -1,  2,  1,  4,  2,  0,  0,  0,  0,  0,  3, 
  337. X  5,  9,  4,  4, -1, -1,  5,  5,  9,  9,  5,  0,  0,  0,  0,  4,
  338. X -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  5,
  339. X  3, 14, 47,  3, -1, -1,  2,  3, 14,  3,  0,  0,  0,  0,  0,  6,
  340. X 14,  8, 14,  8, -1, -1, 14, 14,  8,  8,  0,  0,  0,  0,  0,  7,
  341. X -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  8,
  342. X  4,  1,  6,  4, -1, -1,  0,  2,  0,  1,  0,  0,  0,  0,  0,  9, 
  343. X 14,  6, 14,  3, -1, -1,  6, 14,  6, 14,  0,  0,  0,  0,  0, 10,
  344. X 28, 12, 28, 12, -1, -1, 12, 28,  3,  6,  0,  0,  0,  0,  0, 11,
  345. X 11, 13, 12, 13, -1, -1, 13, 12, 11, 13,  5,  0,  0,  0,  0, 12,
  346. X 13, 13, 13, 13, -1, -1, 13, 13, 13, 12,  5,  0,  0,  0,  0, 13,
  347. X  6,  7,  7, 10, -1, -1,  6, 10,  7,  7,  0,  0,  0,  0,  0, 14,
  348. X147,148,  0, 16, -1, -1,  0,147,  0,148,  4,  0,  0,  0,  0, 15,
  349. X 19, 19, 16, 17, -1, -1, 19, 19, 17, 17,  5,  0,  0,  0,  0, 16,
  350. X 16, 16, 16, 18, -1, -1, 16, 16, 18, 16,  0,  0,  0,  0,  0, 17,
  351. X -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0, 18,
  352. X  3,  2,  0, 16, -1, -1,  0, 16,  2, 16,  0,  0,  0,  0,  0, 19,
  353. X 21,142, 22,  1, -1, -1, 23,  2,141,  1,  0,  0,  0,  0,  0, 20,
  354. X 42, 20,145, 47, -1, -1,145,  1,145,  6,  0,  0,  0,  0,  0, 21,
  355. X 36, 27, -1, 20, -1, -1, -1, 20, -1, 20,  1,  0,  0,  0,  0, 22,
  356. X 25, 24, 25,145, -1, -1, 25,145, 25, 34,  4,  0,  0,  0,  0, 23,
  357. X 23, 26, 25, 33, -1, -1, 25, 33, 25, 32,  0,  0,  0,  0,  0, 24,
  358. X 25, 25, 25, 25, -1, -1,143, 23, 25, 26,  5,  0,  0,  0,  0, 25,
  359. X 24, 25, 25,141, -1, -1, 25, 31, 25,141,  4,  0,  0,  0,  0, 26,
  360. X 22, 30, -1, 20, -1, -1, -1, 20, -1, 20,  2,  0,  0,  0,  0, 27,
  361. X  0,  2, 29,148, -1, -1, 29, 11,  0,  2,  0,  0,  0,  0,  0, 28, 
  362. X142, 29,141,  2, -1, -1,141,  2,141,  2,  5,  0,  0,  0,  0, 29,
  363. X 27,141, 31, 20, -1, -1, -1, 20,141,141,  0,  0,  0,  0,  0, 30,
  364. X 32,141, 24, 30, -1, -1, 24, -1, 26,141,  0,  0,  0,  0,  0, 31,
  365. X 33, 31, 24, -1, -1, -1, 24, -1, 24, -1,  0,  0,  0,  0,  0, 32,
  366. X 34, 32, 24, -1, -1, -1, 24, -1, 24, -1,  0,  0,  0,  0,  0, 33,
  367. X145, 33, 24, 35, -1, -1, 23,145, 24, -1,  0,  0,  0,  0,  0, 34,
  368. X145, 36, 34, 20, -1, -1,145,145, -1, 20,  0,  0,  0,  0,  0, 35,
  369. X 35, 22, -1, 20, -1, -1, 35, 20, -1, 20,  2,  0,  0,  0,  0, 36,
  370. X 38, 39, -1, 36, -1, -1, 38, 36, 39, 36,  0,  0,  0,  0,  0, 37,
  371. X -1, 37, -1, -1, -1, -1, -1, -1, -1, 37,  1,  0,  0,  0,  0, 38,
  372. X 37, -1, 41, -1, -1, -1, -1, -1, -1, -1,  1,  0,  0,  0,  0, 39,
  373. X -1, 41, -1, -1, -1, -1, -1, -1, -1, 41,  2,  0,  0,  0,  0, 40,
  374. X 40, -1, -1, 39, -1, -1, 40, -1, -1, -1,  4,  0,  0,  0,  0, 41,
  375. X 42, 21,145,  6, -1, -1,145,  1,145,  6,  5,  0,  0,  0,  0, 42,
  376. X -1, -1, -1, 27, -1, -1, -1, 27, -1, -1,  1,  0,  4,  0,  0, 43,
  377. X -1, -1, 43, 48, -1, -1, -1, -1, 43, -1,  0,  0,  0,  0,  0, 44,
  378. X -1,204, 43,149, -1, -1, -1, -1, 43, -1,  0,  0,  0,  0,  0, 45,
  379. X239, -1, 43, -1, -1, -1, -1, -1, 43, -1,  0,  0,  0,  0,  0, 46,
  380. X  3, 20, 21,  6, -1, -1, 21,  3, 20,  6,  0,  0,  0,  0,  0, 47, 
  381. X 49, 50, 44, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 48, /*48*/
  382. X 51, 48, -1, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 55, /*49*/
  383. X 48, 56, -1, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 55, /*50*/
  384. X -1, 49, 52, 53, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 51, /*51*/
  385. X -1, -1, 54, 51, -1, 88, -1, -1, -1, -1,  0,  0,  0,  0,  0, 59, /*52*/
  386. X -1, -1, 51, 55, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 56, /*53*/
  387. X -1, -1, -1, 52, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 91, /*54*/
  388. X -1, -1, 53, -1, 57, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 62, /*54*/
  389. X 50, -1, -1, -1, -1, -1, -1, -1, 74, 72,  0,  0,  0,  0,  0, 64, /*56*/
  390. X -1, -1, -1, -1, -1, 55, -1, 58, -1, 59,  0,  0,  0,  0,  0, 76, /*57*/
  391. X -1, -1, -1, -1, -1, -1, -1, 60, 57, -1,  0,  0,  0,  0,  0, 57, /*58*/
  392. X -1, -1, -1, -1, -1, -1, 57, -1, -1, 61,  0,  0,  0,  0,  0, 58, /*59*/
  393. X -1, -1, -1, -1, -1, -1, -1, -1, 58, 62,  0,  0,  0,  0,  0, 84, /*60*/
  394. X -1, -1, -1, -1, -1, -1, 59, 63, -1, -1,  0,  0,  0,  0,  0, 87, /*61*/
  395. X -1, -1, -1, -1, -1, -1, 60, -1, -1, 64,  0,  0,  0,  0,  0, 58, /*62*/
  396. X -1, -1, -1, -1, -1, -1, -1, 64, 61, -1,  0,  0,  0,  0,  0, 57, /*63*/
  397. X -1, -1, -1, -1, -1, 65, 62, -1, 63, -1,  0,  0,  0,  0,  0, 77, /*64*/
  398. X -1, 66, -1, -1, 64, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 61, /*65*/
  399. X 65, 67, -1, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 55, /*66*/
  400. X 66, 69, 68, 70, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 78, /*67*/
  401. X -1, -1, 71, 67, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 56, /*68*/
  402. X 67, -1, -1, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 92, /*69*/
  403. X121,128, 67, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 48, /*70*/
  404. X -1, -1, -1, 68, -1, -1, 72, -1, 73, -1,  0,  0,  0,  0,  0, 66, /*71*/
  405. X -1, -1, -1, -1, -1, -1, 56, -1, -1, 71,  0,  0,  0,  0,  0, 58, /*72*/
  406. X -1, -1, -1, -1, -1, -1, -1, 71, 75, -1,  0,  0,  0,  0,  0, 57, /*73*/
  407. X -1, -1, -1, -1, -1, -1, -1, 56, 77, -1,  0,  0,  0,  0,  0, 57, /*74*/
  408. X -1, -1, -1, -1, -1, -1, 76, 73, -1, 80,  0,  0,  0,  0,  0, 52, /*75*/
  409. X -1, -1, -1, -1, -1, -1, 77, -1, -1, 75,  0,  0,  0,  0,  0, 58, /*76*/
  410. X -1, -1, -1, -1, -1, -1, 79, 74, 78, 76,  0,  0,  0,  0,  0, 79, /*77*/
  411. X -1, -1, -1, -1, -1, -1, -1, 77, -1, -1,  0,  0,  0,  0,  0, 90, /*78*/
  412. X -1, -1, -1, -1, -1, -1,108, -1, -1, 77,  0,  0,  0,  0,  0, 58, /*79*/
  413. X -1, -1, 81, 82, -1, -1, 75, -1, -1, -1,  0,  0,  0,  0,  0, 74, /*80*/
  414. X -1, -1, -1, 80, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 93, /*81*/
  415. X -1, -1, 80, 83, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 56, /*82*/
  416. X -1, 84, 82, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 81, /*83*/
  417. X 83, -1, 85, 86, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 50, /*84*/
  418. X -1, -1, -1, 84, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 90, /*85*/
  419. X 87, -1, 84, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 83, /*86*/
  420. X -1, 86, -1,109, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 94, /*87*/
  421. X -1, -1, -1, -1, 52, -1, 92, -1, -1, 89,  0,  0,  0,  0,  0, 96, /*88*/
  422. X -1, -1, -1, -1, -1, -1, 88, -1, -1, 90,  0,  0,  0,  0,  0, 58, /*89*/
  423. X -1, -1, -1, -1, -1, -1, 89, -1, -1, 91,  0,  0,  0,  0,  0, 58, /*90*/
  424. X -1, -1, -1, -1, -1, -1, 90, -1, -1, -1,  0,  0,  0,  0,  0, 90, /*91*/
  425. X -1, -1, -1, -1, -1, -1, 93, -1, -1, 88,  0,  0,  0,  0,  0, 58, /*92*/
  426. X -1, -1, -1, -1, -1, -1, -1, 94, 95, 92,  0,  0,  0,  0,  0, 95, /*93*/
  427. X -1, -1, -1, -1, 96, -1, -1, -1, 93, -1,  0,  0,  0,  0,  0, 60, /*94*/
  428. X -1, -1, -1, -1, -1, -1, -1, 93,104, -1,  0,  0,  0,  0,  0, 57, /*95*/
  429. X 97, -1,103, -1, -1, 94, -1, -1, -1, -1,  0,  0,  0,  0,  0, 97, /*96*/
  430. X 98, 96, -1, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 55, /*97*/
  431. X -1, 97, 99, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 81, /*98*/
  432. X -1, -1,100, 98, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 56, /*99*/
  433. X -1,101, -1, 99, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 80,/*100*/
  434. X100,102, -1, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 55,/*101*/
  435. X101, -1, -1,103, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 82,/*102*/
  436. X -1, -1,102, 96, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 56,/*103*/
  437. X -1, -1, -1, -1, -1, -1, -1, 95,105, -1,  0,  0,  0,  0,  0, 57,/*104*/
  438. X -1, -1, -1, -1, -1, -1, -1,104, -1,106,  0,  0,  0,  0,  0, 86,/*105*/
  439. X -1, -1, -1, -1, -1, -1,105, -1, -1,107,  0,  0,  0,  0,  0, 58,/*106*/
  440. X -1, -1, -1, -1, 79, -1,106, -1, -1, -1,  0,  0,  0,  0,  0, 89,/*107*/
  441. X -1, -1, -1, -1, -1,106, -1, -1, -1, 79,  0,  0,  0,  0,  0, 88,/*108*/
  442. X -1, -1, 87,110, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 56,/*109*/
  443. X -1, -1,109, -1, -1,140, -1, -1, -1, -1,  0,  0,  0,  0,  0, 99,/*110*/
  444. X -1, -1, -1,140,109, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 98,/*111*/
  445. X -1, -1,140, -1,113, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 62,/*112*/
  446. X114, -1, -1, -1, -1,112, -1, -1, -1, -1,  0,  0,  0,  0,  0,100,/*113*/
  447. X115,113, -1, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 55,/*114*/
  448. X -1,114,118,116, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 51,/*115*/
  449. X -1,117,115, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 81,/*116*/
  450. X116, -1, -1, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0,101,/*117*/
  451. X -1, -1,119,115, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 56,/*118*/
  452. X -1,125,120,118, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 51,/*119*/
  453. X -1,122, -1,119, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 80,/*120*/
  454. X -1, 70, -1,122, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 80,/*121*/
  455. X120,123,121, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 48,/*122*/
  456. X122, -1, -1,124, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 82,/*123*/
  457. X -1, -1,123, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 90,/*124*/
  458. X119, -1, -1,126, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 82,/*125*/
  459. X -1,127,125, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 81,/*126*/
  460. X126, -1, -1, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 90,/*127*/
  461. X 70, -1, -1,129, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 82,/*128*/
  462. X130,136,128, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 48,/*129*/
  463. X -1,129, -1,131, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 80,/*130*/
  464. X134,132,130, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 48,/*131*/
  465. X131, -1, -1,133, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 82,/*132*/
  466. X -1, -1,132, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 90,/*133*/
  467. X -1,131, -1,135, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 80,/*134*/
  468. X -1, -1,134, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 90,/*135*/
  469. X129, -1, -1,137, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 82,/*136*/
  470. X -1, -1,136,138, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 56,/*137*/
  471. X139, -1,137, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 83,/*138*/
  472. X -1,138, -1, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 90,/*139*/
  473. X -1, -1,111,112, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 56,/*140*/
  474. X 30, 26, 26,142, -1, -1, 24, 20, 26,142,  0,  0,  0,  0,  0,102,/*141*/
  475. X 20, 29,141,  2, -1, -1,141,  2,141,  2,  0,  0,  0,  0,  0,103,/*142*/
  476. X 25, 25, 25, 25, -1, -1, 25, 25,144, 25,  0,  0,  0,  0,  0,104,/*143*/
  477. X143,143,146,143, -1, -1,143,143,143,143,  1,  0,  0,  0,  0,105,/*144*/
  478. X 23, 35, 23, 21, -1, -1, 23, 21, 35, 34,  0,  0,  0,  0,  0,106,/*145*/
  479. X -1, -1, -1,144, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0,107,/*146*/
  480. X  3, 15,  3,  3, -1, -1,  3,  3, 15, 15,  0,  0,  0,  0,  0,108,/*147*/
  481. X 15,  2,  2, 15, -1, -1, 15, 15,  2,  2,  0,  0,  0,  0,  0,109,/*148*/
  482. X -1, -1, 45, -1, -1,150, -1, -1, -1, -1,  0,  0,  0,  0,  0,110,/*149*/
  483. X -1,151, -1, -1,149, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 61,/*150*/
  484. X150,152, -1, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 55,/*151*/
  485. X151,153, -1,159, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 49,/*152*/
  486. X152,154, -1, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 55,/*153*/
  487. X153, -1, -1,155, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 82,/*154*/
  488. X -1, -1,154,156, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 56,/*155*/
  489. X157, -1,155, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 83,/*156*/
  490. X158,156, -1, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 55,/*157*/
  491. X -1,157,159,160, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 51,/*158*/
  492. X -1, -1,152,158, -1, -1, -1, -1, -1, -1,  1,  0,  0,  0,  0,132,/*159*/
  493. X -1, -1,158,161, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 56,/*160*/
  494. X -1, -1,160,162, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 56,/*161*/
  495. X -1, -1,161,163, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 56,/*162*/
  496. X -1, -1,162,164, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 56,/*163*/
  497. X -1, -1,163,165, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 56,/*164*/
  498. X -1, -1,164, -1, -1,166, -1, -1, -1, -1,  0,  0,  0,  0,  0,110,/*165*/
  499. X -1, -1,167,178,165, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0,111,/*166*/
  500. X168, -1, -1,166, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 82,/*167*/
  501. X169,167, -1, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 55,/*168*/
  502. X170,168, -1, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 55,/*169*/
  503. X -1,169, -1, -1,171, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 61,/*170*/
  504. X -1, -1,172, -1, -1,170, -1, -1, -1, -1,  0,  0,  0,  0,  0,110,/*171*/
  505. X -1, -1,173,171, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 56,/*172*/
  506. X -1, -1,174,172, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 56,/*173*/
  507. X -1, -1,175,173, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 56,/*174*/
  508. X -1, -1,176,174, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 56,/*175*/
  509. X -1, -1,177,175, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 56,/*176*/
  510. X -1, -1, -1,176, -1, -1, -1, -1, -1, -1,  1,  0,  0,  0,  0,112,/*177*/
  511. X -1, -1,166,179, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 56,/*178*/
  512. X -1, -1,178,180, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 56,/*179*/
  513. X -1,181,179, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 81,/*180*/
  514. X180,182, -1, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 55,/*181*/
  515. X181,185,184,183, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 78,/*182*/
  516. X -1, -1,182, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 90,/*183*/
  517. X -1, -1, -1,182, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 90,/*184*/
  518. X182, -1, -1, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 90,/*185*/
  519. X185,187, -1, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 55,/*186*/
  520. X186,189,190,188, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 78,/*187*/
  521. X -1, -1,187, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 90,/*188*/
  522. X187, -1, -1, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 90,/*189*/
  523. X -1, -1,191,187, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 56,/*190*/
  524. X192,198, -1,190, -1, -1, -1, -1, -1, -1,  1,  0,  0,  0,  0,113,/*191*/
  525. X -1,191, -1, -1, -1, -1,193, -1, -1, -1,  1,  0,  0,  0,  0,114,/*192*/
  526. X -1, -1, -1, -1, -1, -1, -1, -1,194,192,  1,  0,  0,  0,  0,115,/*193*/
  527. X -1,195, -1, -1, -1, -1, -1,193, -1, -1,  1,  0,  0,  0,  0,116,/*194*/
  528. X194,196, -1, -1, -1, -1, -1, -1, -1, -1,  1,  0,  0,  0,  0,117,/*195*/
  529. X195, -1, -1, -1,199, -1, -1, -1, -1,197,  1,  0,  0,  0,  0,118,/*196*/
  530. X -1, -1, -1, -1, -1, -1,196,198, -1, -1,  1,  0,  0,  0,  0,119,/*197*/
  531. X191, -1, -1, -1, -1, -1, -1, -1,197, -1,  1,  0,  0,  0,  0,120,/*198*/
  532. X200, -1, -1, -1, -1,196, -1, -1, -1, -1,  1,  0,  0,  0,  0,121,/*199*/
  533. X -1,199,201,202, -1, -1, -1, -1, -1, -1,  1,  0,  0,  0,  0,122,/*200*/
  534. X -1, -1, -1,200, -1, -1, -1, -1, -1, -1,  1,  0,  0,  0,  0,123,/*201*/
  535. X -1, -1,200,203, -1, -1, -1, -1, -1, -1,  1,  0,  0,  0,  0,124,/*202*/
  536. X -1, -1,202, -1, -1, -1, -1, -1, -1, -1,  1,  0,  0,  0,  0,125,/*203*/
  537. X 45,205, -1, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 55,/*204*/
  538. X204, -1,206, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 83,/*205*/
  539. X -1, -1, -1,205, -1, -1, -1, -1, -1, -1,  1,  0,  0,  0,  0,126,/*206*/
  540. X -1,208,227, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 81,/*207*/
  541. X207,209,226, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 48,/*208*/
  542. X208,210,225, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 48,/*209*/
  543. X209,211,224, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 48,/*210*/
  544. X210,217,223, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 48,/*211*/
  545. X217,213,222, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 48,/*212*/
  546. X212,214,221, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 48,/*213*/
  547. X213,215,220, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 48,/*214*/
  548. X214,216,219, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 48,/*215*/
  549. X215, -1,218, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 83,/*216*/
  550. X211,212, -1,239, -1, -1, -1, -1, -1, -1,  1,  0,  0,  0,  0,128,/*217*/
  551. X -1, -1,237,216, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0, 56,/*218*/
  552. X -1, -1,236,215, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0, 56,/*219*/
  553. X -1, -1,235,214, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0, 56,/*220*/
  554. X -1, -1,234,213, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0, 56,/*221*/
  555. X -1, -1,233,212, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0, 56,/*222*/
  556. X -1, -1,232,211, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0, 56,/*223*/
  557. X -1, -1,231,210, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0, 56,/*224*/
  558. X -1, -1,230,209, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0, 56,/*225*/
  559. X -1, -1,229,208, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0, 56,/*226*/
  560. X -1, -1,228,207, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0, 56,/*227*/
  561. X -1,229, -1,227, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 80,/*228*/
  562. X228,230, -1,226, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 49,/*229*/
  563. X229,231, -1,225, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 49,/*230*/
  564. X230,232, -1,224, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 49,/*231*/
  565. X231,233, -1,223, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 49,/*232*/
  566. X232,234, -1,222, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 49,/*233*/
  567. X233,235, -1,221, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 49,/*234*/
  568. X234,236, -1,220, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 49,/*235*/
  569. X235,237, -1,219, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 49,/*236*/
  570. X236,238, -1,218, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 49,/*237*/
  571. X237, -1, -1, -1, -1, -1, -1, -1, -1, -1,  1,  0,  0,  0,  0,127,/*238*/
  572. X -1, 46,217, -1, -1, -1, -1, -1, -1, -1,  0,  0,  0,  0,  0, 81,/*239*/
  573. X241, -1, -1, -1, -1, -1, -1, -1, -1, -1,  1,  0,  0,  0,  0,129,/*240*/
  574. X -1,240,242, -1, -1, -1, -1, -1, -1, -1,  1,  0,  0,  0,  0,130,/*241*/
  575. X -1, -1, -1,241, -1, -1, -1, -1, -1, -1,  1,  0,  0,  0,  0,131 /*242*/
  576. X};
  577. X/* Object file */
  578. X/*    object [n][0] = room location if =>0, else =-1 is in possesion */
  579. X/*        of player, = -2 means unmade, = -3 means it is destroyed,  */
  580. X/*        = -5 means the object is in the safe.                      */
  581. X/*    object [n][1] = object's value                                 */
  582. X/*    object [n][2] = external property of the object                */
  583. X/*                  = 1  indicates special action on taking          */
  584. X/*                  = 2  alias                         */
  585. X/*                  = 3  nonmovable object which has no actions      */
  586. X/*    object [n][3] = object parse id name                           */
  587. X/*    object [n][4] = object's weight                                */
  588. X/*    object [n][5] = internal property of the object                */
  589. Xint objcnt = DM_objcnt;
  590. Xint object [DM_object][6] = {
  591. X 0, 0,      0,      V_can,        10,    0,        
  592. X 0, 0,      0,      V_butt,        1,     0,
  593. X 0, 0,      0,      V_bottle,    20,     0,
  594. X36, 0,  Z_transform,      V_mat,         300,     0,
  595. X-2, 0,      0,      V_key,         5,     0,
  596. X 0, 0,        0,    V_umbrella,    100,     0,
  597. X 0, 0,        0,    V_tackle,     50,     0,
  598. X 0, 0,        0,    V_bit,         10,     0,
  599. X38, 0,  Z_transform,      V_map,        10,     0,
  600. X-2, 0,      0,      V_map,        10,     0,
  601. X-5, 0,      0,      V_paper,    10,     0,
  602. X 0, 200,        0,    V_gold,     500,     0,
  603. X 0, 0,        0,    V_jack,        400,     0,
  604. X 0, 0,        0,    V_dynamite,    100,     0,
  605. X 0, 0,      0,    V_clip,     50,     150,
  606. X 0, 0,        0,    V_pen,         5,     0,
  607. X 0, 0,      0,    V_org_clip,    50,     5,
  608. X 0, 0,        0,    V_pencil,     5,     0,
  609. X 0, 0,      0,    V_rifle,     300,     0,
  610. X 0, 0,        0,    V_wire,     100,     0,
  611. X 0, 0,        0,    V_pipe,        200,     0,
  612. X 0, 0,      0,    V_cap,        5,     0,
  613. X 0, 0,      0,      V_matches,    2,     0,
  614. X 0, 100,      0,      V_ring,     5,     0,
  615. X 0, 0,        0,    V_opener,    10,     0,
  616. X 0, 100,      0,      V_ruby,     30,     0,
  617. X-2, 200,      0,      V_teapot,    50,     0,
  618. X 0, 150,      0,      V_coin,     7,     0,
  619. X 0, 0,        0,    V_cord,        70,     0,
  620. X 0, 100,    0,    V_bill,        5,     0,
  621. X 0, 0,        0,    V_photo,    5,     0,
  622. X 0, 0,        0,    V_chair,    500,     0,
  623. X 0, 0,        0,    V_bulb,        10,     0,
  624. X 0, 0,        0,      V_pills,    10,     0,
  625. X 0, 150,    0,      V_saphire,    30,     0,
  626. X 0, 100,    0,      V_emerald,    30,     0,
  627. X 0, 0,        0,    V_rag,          50,     0,
  628. X 0, 0,        0,    V_tube,        50,     0,
  629. X 0, 0,        0,    V_carpet,    400,     0,
  630. X 0, 0,        0,    V_branch,    400,     0,
  631. X 0, 0,        0,      V_letter,    10,     0,
  632. X 0, 0,        0,    V_cork,     5,     0,
  633. X 0, 0,        0,      V_torch,    100,     0,
  634. X 0, 0,        0,    V_trap,        5,     0,
  635. X 0, 0,        0,    V_lighter,    5,     0,
  636. X 0, 0,        0,      V_cube,     50,     0,
  637. X-2, 700,      0,      V_clapper,    100,     0,
  638. X-2, 0,      0,      V_detector,    100,     0,
  639. X 0, 0,        0,    V_lace,        2,     0,
  640. X 0, 0,        0,    V_comb,        5,     0,
  641. X 0, 0,        0,    V_wrapper,    3,     0,
  642. X 0, 0,        0,    V_tire,        400,     0,
  643. X 0, 0,        0,    V_shell,    3,     0,
  644. X 0, 0,        0,    V_brick,    100,     0,
  645. X 0, 0,        0,    V_rope,        100,     0,
  646. X 0, 0,        0,    V_package,    5,     0,
  647. X 0, 0,        0,    V_belt,        10,     0,
  648. X 0, 0,        0,    V_filter,    50,     0,
  649. X 0, 0,        0,    V_string,    5,    0,
  650. X39, 0,    Z_unmovable,    V_poster,    0,    0,
  651. X41, 0,    Z_unmovable,    V_poster,    0,    0,
  652. X39, 0,    Z_unmovable,    V_cockroach,    0,    0,
  653. X41, 0,    Z_unmovable,    V_cockroach,    0,    0,
  654. X15, 0,    Z_unmovable,    V_kangaroo,    0,    0,
  655. X26, 0,    Z_unmovable,    V_spinifex,    0,    0,
  656. X23, 0,    Z_unmovable,    V_bulldust,    0,    0
  657. X};     
  658. X
  659. X#endif
  660. X
  661. X/***************************************************************/
  662. X
  663. X#ifdef DSCRB
  664. Xint pill_count = 7 ;
  665. Xextern int room[DM_room][16] ;
  666. Xextern int enemy[DM_enemy_cnt_p1][3] ;
  667. Xextern int sw_active ;
  668. Xint rifle_flag = F_safety ;
  669. Xextern int clip_flag ;
  670. Xextern int object[DM_object][6] ;
  671. X#endif
  672. X
  673. X/***************************************************************/
  674. X
  675. X#ifdef LONG_DESCP
  676. X/* subroutines: new_score, pusher, switcher */
  677. Xextern int room[DM_room][16] ;
  678. Xextern int objcnt ; 
  679. Xextern int object[DM_object][6] ;
  680. Xextern int verb, score;
  681. Xextern int monster_flag, rifle_flag ;
  682. Xextern int tag[DM_tag] ;
  683. Xint sw_transport = FALSE ;
  684. X#endif
  685. X
  686. X/***************************************************************/
  687. X
  688. X#ifdef ACTOR
  689. Xextern int room[DM_room][16], enemy[DM_enemy_cnt_p1][3], tag[DM_tag] ;
  690. Xextern int objcnt, gleep_safe, object[DM_object][6], verb ;
  691. Xextern int clip_flag, rifle_flag, monster_flag ;
  692. X#endif
  693. X
  694. X/***************************************************************/
  695. X
  696. X#ifdef MNSTR
  697. Xextern int room[DM_room][16] ;
  698. Xextern int objcnt ; 
  699. Xextern int object[DM_object][6] ;
  700. Xextern int enemy_max ;
  701. Xextern int enemy[DM_enemy_cnt_p1][3] ;
  702. Xextern int monster_flag ;
  703. X#endif
  704. X
  705. X/***************************************************************/
  706. X
  707. X#ifdef OPNR
  708. Xint sw_active = FALSE ;
  709. Xextern int room[DM_room][16] ;
  710. Xextern int objcnt ; 
  711. Xextern int object[DM_object][6] ;
  712. Xextern int sent[20];
  713. Xextern int gleep_count ;
  714. Xextern int tag[DM_tag] ;
  715. X#endif
  716. X  
  717. X/***************************************************************/
  718. X
  719. X#ifdef GLPR
  720. Xextern int sw_active ;
  721. Xextern int room[DM_room][16] ;
  722. Xextern int object[DM_object][6] ;
  723. Xextern int sent[20], pill_count ;
  724. Xextern int tag[DM_tag] ;
  725. Xextern int gleep_spot[10] ;
  726. Xextern int score, gleep_score, clip_flag ;
  727. Xextern int carry_count, carry_weight ;
  728. Xextern long clock_explode ;
  729. Xextern int flag_clock, sw_clock, i_poison ;
  730. X#endif
  731. X  
  732. X/***************************************************************/
  733. X
  734. X#ifdef PARSE
  735. Xint sent[20];
  736. Xextern int verb ;
  737. Xextern int sw_wizard ; 
  738. Xextern int room[DM_room][16] ;
  739. Xextern int gleep_score ;
  740. Xextern int object[DM_object][6] ;
  741. Xint tag[DM_tag], tag_max = DM_vocab ;
  742. X
  743. X/* Game vocabulary */
  744. Xint letmax = DM_letmax ;
  745. Xchar *vocab[DM_vocab] = {
  746. X"north","south","east","west","up",
  747. X"down","northeast","northwest","southeast","southwest",
  748. X"n","s","e","w","u",                            /* "u"          = 15 */
  749. X"d","ne","nw","se","sw",                        /* "sw"         = 20 */
  750. X"quit","unlock","lock","take","leave",          /* "leave"      = 25 */
  751. X"drop","can","bottle","mat","key",              /* "key"        = 30 */
  752. X"butt","look","door","open","get",              /* "get"        = 35 */
  753. X"throw","turn","on","off","push",               /* "push"       = 40 */
  754. X"button","enter","switch","zero","forty-nine",  /* "forty-nine" = 45 */
  755. X"sixty-seven","eighty-two","0","49","67",       /* "67"         = 50 */
  756. X"82","beer","lager","doormat","lift",           /* "lift"       = 55 */ 
  757. X"'on'","'off'","SVC","map","picture",           /* "picture"    = 60 */
  758. X"safe","dial","paper","put","close",            /* "close"      = 65 */
  759. X"read","gold","bar","dynamite","rifle",         /* "rifle"      = 70 */
  760. X"M16","m16","cap","matches","diamond",          /* "diamond"    = 75 */
  761. X"ring","ruby","silver","coin","bill",           /* "bill"       = 80 */
  762. X"money","teapot","clip","ammo","box",           /* "box"        = 85 */
  763. X"stick","pills","orange","glowing","saphire",   /* "saphire"    = 90 */
  764. X"emerald","score","inventory","examine","describe",
  765. X"drink","fill","water","fourex","invent",    /* "invent"    = 100 */
  766. X"l","press","exit","all","Fourex",        /* "Fourex"    = 105 */
  767. X"everything","shoot","kill","ned","Ned",    /* "Ned"    = 110 */
  768. X"kelly","Kelly","pick","grab","combination",    /* "combination"= 115 */
  769. X"select","safety","SAFE","triple","III",    /* "III"    = 120 */
  770. X"single","I","auto","AUTO","automatic",        /* "automatic"    = 125 */
  771. X"set","insert","attach","plan","gun",           /* "gun"        = 130 */
  772. X"magazine","hoop","snake","bear","wombat",    /* "wombat"     = 135 */
  773. X"remove","eject","org_clip","shut","gleep",    /* "gleep"    = 140 */
  774. X"gleeps","letter","envelope","torch","mail",    /* "mail"       = 145 */
  775. X"tank","carefully","gently","softly","slow_drop",
  776. X"light","ignite","fuse","slowly","match",    /* "match"    = 155 */
  777. X"cube","blue","blue_button","green","green_button",
  778. X"clapper","sound","bang","hit","strike",    /* "strike"    = 160 */
  779. X"gong","detector","give","STATS","JSYS",
  780. X"SU","yellow","yellow_button","poster","eat",
  781. X"swallow","pill","atropine","packet","wrapper",
  782. X"tyre","shell","brick","rope","package",
  783. X"belt","filter","string","cabinet","calendar",
  784. X"tackle","bit","jack","pen","pencil",
  785. X"wire","pipe","panel","opener","cord",
  786. X"photo","chair","bulb","rag","tube",        /* "tube"    = 200 */
  787. X"carpet","branch","cork","trap","lighter",
  788. X"lace","comb","umbrella","meadow","billabong",
  789. X"river","road","forest","grass","stream",
  790. X"desert","building","office","hideout","dust",
  791. X"mine","tunnel","tree","spinifex","hexagon",
  792. X"spacecaft","airlock","wing","hole","tray",
  793. X"liquid","cockroach","go","scream","yell",
  794. X"bring","help","dump","attack","check",
  795. X"inspect","place","touch","pull","extinguish",
  796. X"ask","talk","tell","find","move",        /* "move"    = 250 */
  797. X"break","kick","smash","feed","taste",
  798. X"smell","slam","desk","in","into",
  799. X"under","out","from","by","with",
  800. X"fling","what","where","are","am",        /* "am"        = 275 */
  801. X"have","QUESTION","how","why","who",        /* "who"    = 280 */
  802. X"when","bop","walk","run","jump",        /* "jump"       = 285 */
  803. X"hop","stroll","saunter","swagger","swing",    /* "swing"        = 290 */
  804. X"dig","swim","depart","info","back",        /* "back"    = 295 */
  805. X"hold","fire","stand","painting","doors",    /* "doors"    = 300 */
  806. X"treasure","trigger","load","unload","sand",    /* "sand"    = 305 */
  807. X"cockroaches","kangaroo","climb","bulldust","kangaroos",
  808. X"spinifexes"
  809. X};
  810. X
  811. X/* Question Table */
  812. Xint quest_max = 8 ;
  813. Xint quest[9] = {
  814. XV_what, V_where, V_are, V_am, V_have,
  815. XV_how, V_why, V_who, V_when
  816. X} ;
  817. X
  818. X/* Adjective Table */
  819. Xint adj_max = 9 ;
  820. Xint adjective[10][4] = {  /* first element points to adjective */
  821. XV_drop, V_bear,F_ignore,F_ignore,        /* drop bear */
  822. XV_gold, V_bar,F_ignore,F_ignore,        /* gold bar */
  823. XV_orange,V_clip,V_org_clip,F_replace,        /* orange clip */
  824. XV_glowing, V_clip, V_org_clip,F_replace,    /* glowing clip */
  825. XV_blue,V_switch,V_blue_button,F_replace,    /* blue switch */
  826. XV_blue,V_button,V_blue_button,F_replace,    /* blue button */
  827. XV_green,V_switch,V_green_button,F_replace,    /* green switch */
  828. XV_green,V_button,V_green_button,F_replace,    /* green button */
  829. XV_yellow,V_switch,V_yellow_button,F_replace,    /* yellow switch */
  830. XV_yellow,V_button,V_yellow_button,F_replace    /* yellow button */
  831. X} ;
  832. X
  833. X/* Adverb Table */
  834. Xint adv_max = 29 ;
  835. Xint adverb[30][3] = { /* first element points to adverb */
  836. XV_down, V_put, V_drop,                /* put down */
  837. XV_down, V_set, V_drop,                /* set down */
  838. XV_carefully, V_drop, V_slow_drop,        /* drop carefully */
  839. XV_gently, V_drop, V_slow_drop,            /* drop slowly */
  840. XV_softly, V_drop, V_slow_drop,            /* drop softly */
  841. XV_slowly, V_drop, V_slow_drop,            /* drop slowly */
  842. XV_carefully, V_put, V_slow_drop,        /* put carefully */
  843. XV_gently, V_put, V_slow_drop,            /* put slowly */
  844. XV_softly, V_put, V_slow_drop,            /* put softly */
  845. XV_slowly, V_put, V_slow_drop,            /* put slowly */
  846. XV_in, V_go, V_enter,                /* go in */
  847. XV_in, V_move, V_enter,                /* move in */
  848. XV_in, V_bop, V_enter,                /* bop in */
  849. XV_in, V_walk, V_enter,                /* walk in */
  850. XV_in, V_run, V_enter,                /* run in */
  851. XV_in, V_jump, V_enter,                /* jump in */
  852. XV_in, V_hop, V_enter,                /* hop in */
  853. XV_in, V_stroll, V_enter,            /* stroll in */
  854. XV_in, V_saunter, V_enter,             /* saunter in */
  855. XV_in, V_swagger, V_enter,            /* swagger in */
  856. XV_out, V_go, V_exit,                /* go out */
  857. XV_out, V_move, V_exit,                /* move out */
  858. XV_out, V_bop, V_exit,                /* bop out */
  859. XV_out, V_walk, V_exit,                /* walk out */
  860. XV_out, V_run, V_exit,                /* run out */
  861. XV_out, V_jump, V_exit,                /* jump out */
  862. XV_out, V_hop, V_exit,                /* hop out */
  863. XV_out, V_stroll, V_exit,            /* stroll out */
  864. XV_out, V_saunter, V_exit,             /* saunter out */
  865. XV_out, V_swagger, V_exit            /* swagger out */
  866. X} ;
  867. X
  868. X/* Verb Table */
  869. Xint  verb_max = 78 ;
  870. Xint verb_table[79] = {
  871. XV_quit,V_unlock,V_lock,V_take,V_leave,
  872. XV_drop,V_look,V_open,V_get,V_throw,
  873. XV_turn,V_push,V_enter,V_switch,V_lift,
  874. XV_svc,V_dial,V_put,V_close,V_read,
  875. XV_score,V_inventory,V_examine,V_describe,V_drink,
  876. XV_fill,V_invent,V_l,V_press,V_exit,
  877. XV_shoot,V_kill,V_pick,V_grab,V_combination,
  878. XV_select,V_set,V_insert,V_attach,V_remove,
  879. XV_eject,V_shut,V_light,V_ignite,V_sound,
  880. XV_bang,V_hit,V_strike,V_give,V_stats,
  881. XV_jsys,V_su,V_eat,V_swallow,V_fling,
  882. XV_help,V_bop,V_walk,V_run,V_jump,
  883. XV_hop,V_stroll,V_saunter,V_swagger,V_go,
  884. XV_move,V_swing,V_dig,V_swim,V_depart,
  885. XV_info,V_back,V_hold,V_fire,V_pull,
  886. XV_stand,V_load,V_unload,V_climb
  887. X};
  888. X#endif
  889. X
  890. X/***************************************************************/
  891. X
  892. X#ifdef TAKER
  893. Xint clip_flag = F_no_clip ;
  894. X/* gleep_drop triggers gleep destruction */
  895. Xint gleep_safe, gleep_drop = FALSE ;
  896. Xextern char *vocab[DM_vocab] ;
  897. Xextern int room[DM_room][16] ;
  898. Xextern int objcnt, rifle_flag ; 
  899. Xextern int object[DM_object][6] ;
  900. Xextern int carry_count, carry_weight ;
  901. Xextern int gleep_count, gleep_score, verb, sent[20], tag[DM_tag] ;
  902. Xextern int sw_valuable ;
  903. X#endif
  904. END_OF_FILE
  905. if test 35916 -ne `wc -c <'dink_glb.h'`; then
  906.     echo shar: \"'dink_glb.h'\" unpacked with wrong size!
  907. fi
  908. # end of 'dink_glb.h'
  909. fi
  910. if test -f 'gleeper.c' -a "${1}" != "-c" ; then 
  911.   echo shar: Will not clobber existing file \"'gleeper.c'\"
  912. else
  913. echo shar: Extracting \"'gleeper.c'\" \(13259 characters\)
  914. sed "s/^X//" >'gleeper.c' <<'END_OF_FILE'
  915. X#define GLPR
  916. X#include "dink_sym.h"
  917. X#include "dink_glb.h"
  918. X
  919. Xvoid gleeper(n) 
  920. X/********************************************/
  921. X/*                                          */
  922. X/*           Gleeper Subroutine             */
  923. X/*                                          */
  924. X/*     Software by Gary A. Allen, Jr.       */
  925. X/*           Version: Mk 1.00               */
  926. X/* (c) Copyright 1989 by Gary A. Allen, Jr. */
  927. X/*                                          */
  928. X/********************************************/
  929. Xint n ;
  930. X{
  931. Xregister int i ;
  932. Xint count ;
  933. Xstatic int sw_glp_st = FALSE, cnt_down = 0 ;
  934. X
  935. X/* Gleep display routine */
  936. Xcount = room[n][M_gleep] ;
  937. X
  938. Xif (((object[O_torch][J_loc] == B_have)&&object[O_torch][J_property])|| 
  939. X    (n < 186)||(n > 202)) { 
  940. X    if (count != 0) {
  941. X        sw_glp_st = TRUE ; /*  gleeps can now multiply */
  942. X        if (count != 1) 
  943. X               printf("There are %d gleeps here. \n",count) ;
  944. X        else printf("There is a gleep here. \n") ;
  945. X        return ;
  946. X    }
  947. X}
  948. X
  949. X/* Gleep reproduction routine */
  950. Xif (sw_glp_st == TRUE) {
  951. X    if (++cnt_down > 5) {
  952. X        cnt_down = 0 ;
  953. X        for (i = 0; i <= 9; i++) {
  954. X            if (room[gleep_spot[i]][M_gleep] == 0) continue;
  955. X            if (room[gleep_spot[i]][M_gleep] > 10000) 
  956. X                ++room[gleep_spot[i]][M_gleep] ;
  957. X            else room[gleep_spot[i]][M_gleep] <<= 1 ;
  958. X        }
  959. X    }
  960. X}
  961. X} /* --- end of "gleeper" subroutine --- */
  962. X
  963. Xvoid ender(i_quit)
  964. X/********************************************/
  965. X/*                                          */
  966. X/*            Ender Subroutine              */
  967. X/*                                          */
  968. X/*     Software by Gary A. Allen, Jr.       */
  969. X/*           Version: Mk 1.00               */
  970. X/* (c) Copyright 1989 by Gary A. Allen, Jr. */
  971. X/*                                          */
  972. X/********************************************/
  973. Xint i_quit ;
  974. X{
  975. X#ifdef __TURBOC__
  976. Xvoid hold_it(void), new_score(void), exit(int) ;
  977. X#endif
  978. X
  979. X/* get last score */
  980. Xnew_score() ;
  981. X
  982. Xif (gleep_score != 0) sw_active = TRUE ; 
  983. X
  984. Xif (i_quit == F_died) { 
  985. X    hold_it() ;
  986. X    score -= 100 ;
  987. Xprintf ("\nOh Dear!  You've just turned yourself into a corpse! \n\n");
  988. Xprintf ("For getting killed you lose 100 points. \n\n") ;
  989. X}
  990. X
  991. Xif (!sw_active) {
  992. X    if (score == 0) { 
  993. X        printf("You concluded the game with no points.  ") ; 
  994. X        printf("What a pitiful performance!!\n") ;
  995. X    }
  996. X    else {
  997. Xprintf("You concluded the game with a miserable negative score\n") ;
  998. Xprintf("of %d points.  Your score was better BEFORE you \n",score);
  999. Xprintf("started playing (need I say more on how this reflects\n");
  1000. Xprintf("upon your limited aptitude at Dinkum).\n") ;
  1001. X    }
  1002. X    goto all_done ;
  1003. X}
  1004. X
  1005. Xif (score == 0)  {
  1006. Xprintf("You concluded the game with no points ") ;
  1007. X    if (gleep_score == 0) { 
  1008. Xprintf("and didn't drop a single gleep\n") ;
  1009. Xprintf("into the gleep tank. What a pitiful performance!!\n") ;
  1010. X    }
  1011. X    else {
  1012. X        if (gleep_score > 1) {
  1013. Xprintf("but you did put %d gleeps\n",gleep_score) ;
  1014. Xprintf("into the gleep tank.\n") ;
  1015. X        }
  1016. X        else {
  1017. Xprintf("but you did manage to find a gleep\n") ;
  1018. Xprintf("and put it in the gleep tank, (Hah!! What an achievement!).\n");
  1019. X        }
  1020. X    }
  1021. X}
  1022. X
  1023. Xelse {
  1024. Xif (score > 0)
  1025. Xprintf ("You concluded the game with %d points",score);
  1026. Xelse {
  1027. Xprintf("You concluded the game with a miserable negative score\n") ;
  1028. Xprintf("of %d points.  Your score was better BEFORE you \n",score);
  1029. Xprintf("started playing (need I say more on how this reflects\n");
  1030. Xprintf("upon your limited aptitude at Dinkum).  You ") ;
  1031. X    if (gleep_score == 0) { 
  1032. Xprintf("also failed to\nget any gleeps into the tank.  At least ");
  1033. Xprintf("you're consistent.\n\n") ;
  1034. X    }
  1035. X    else {
  1036. Xprintf("managed\nto get something into the gleep tank.  However ");
  1037. Xprintf("it hardly\nmatters, considering your poor score.\n\n") ;
  1038. X    }
  1039. X    goto all_done ;
  1040. X}
  1041. X    if (gleep_score == 0) 
  1042. Xprintf(".\nHowever you placed no gleeps in the gleep tank.\n") ;
  1043. X    else {
  1044. X        if (gleep_score > 1) {
  1045. Xprintf (" and placed %d gleeps\n",gleep_score) ;
  1046. Xprintf ("in the gleep tank.  Good on you, Mate!\n") ;
  1047. X        }
  1048. X        else {
  1049. Xprintf(" but you did manage to find a gleep\n") ;
  1050. Xprintf("and put it in the gleep tank.  ") ;
  1051. Xprintf("However any idiot could do that!\n") ;
  1052. X        }
  1053. X    }
  1054. X}
  1055. Xall_done:
  1056. Xprintf("\nDinkum has ended.  If you are interested in more ") ;
  1057. Xprintf("information\nabout this program type:    dinkum -h\n") ;
  1058. Xexit(0);
  1059. X} /* --- end of "ender" routine --- */
  1060. Xvoid clip_in(ammo_flag)
  1061. X/********************************************/
  1062. X/*                                          */
  1063. X/*            Clip_In Subroutine            */
  1064. X/*                                          */
  1065. X/*     Software by Gary A. Allen, Jr.       */
  1066. X/*           Version: Mk 2.00               */
  1067. X/* (c) Copyright 1990 by Gary A. Allen, Jr. */
  1068. X/*                                          */
  1069. X/********************************************/
  1070. X
  1071. Xint ammo_flag ;
  1072. X{
  1073. X/* ammo clip insertion routine */
  1074. Xif (object[O_rifle][J_loc] != B_have) {
  1075. Xprintf("Galah!!  You don't have a rifle to put an ammo clip into.\n");
  1076. X    return ;
  1077. X}
  1078. Xif (clip_flag != F_no_clip) {
  1079. Xprintf("There is already an ammo clip in the rifle. \n") ;
  1080. X    return ;
  1081. X}
  1082. Xif (((object[O_clip][J_loc] != B_have)&&(ammo_flag == F_normal_clip))||
  1083. X((object[O_org_clip][J_loc] != B_have)&&(ammo_flag == F_org_clip))) {
  1084. Xprintf("You don't possess an ammo clip to put into the rifle.\n");
  1085. X    return ;
  1086. X}
  1087. X/* actually load the clip into the rifle */
  1088. Xobject[O_rifle][J_type] = Z_alias ;
  1089. Xcarry_count-- ;
  1090. Xcarry_weight -= object[O_clip][J_weight]  ;
  1091. Xif (ammo_flag == F_normal_clip) {
  1092. X    object[O_clip][J_loc] = B_unmade ;
  1093. X    clip_flag = F_normal_clip ;
  1094. X    object[O_rifle][J_property]  = object[O_clip][J_property] ;
  1095. X}
  1096. Xelse {
  1097. X    object[O_org_clip][J_loc] = B_unmade ;
  1098. X    clip_flag = F_org_clip ;
  1099. X    object[O_rifle][J_property] = object[O_org_clip][J_property] ;
  1100. X}
  1101. Xprintf("The ammunition clip slides into the rifle with a \"click\".\n");
  1102. Xprintf("You have %d bullets in the clip \n",
  1103. X            object[O_rifle][J_property]) ;
  1104. Xif (object[O_rifle][J_property] > 0) 
  1105. X    printf("You cycle the M16's bolt once to chamber a round.\n");
  1106. Xreturn ;
  1107. X}
  1108. X
  1109. Xvoid clip_out(n)
  1110. X/********************************************/
  1111. X/*                                          */
  1112. X/*           Clip_Out Subroutine            */
  1113. X/*                                          */
  1114. X/*     Software by Gary A. Allen, Jr.       */
  1115. X/*           Version: Mk 1.00               */
  1116. X/* (c) Copyright 1989 by Gary A. Allen, Jr. */
  1117. X/*                                          */
  1118. X/********************************************/
  1119. Xint n ;
  1120. X{
  1121. Xint ammo_flag ; 
  1122. X
  1123. X/* remove clip from rifle */
  1124. Xif (object[O_rifle][J_loc] != B_have) {
  1125. X    printf("You Bloody Galah!  ") ;
  1126. X    printf("You don't have a rifle in your possession!\n");
  1127. Xreturn ;
  1128. X}
  1129. Xif (clip_flag == F_no_clip) {
  1130. X    printf("There is no clip in the rifle. \n") ;
  1131. Xreturn ;
  1132. X}
  1133. X/* eject the clip from the rifle */
  1134. Xobject[O_rifle][J_type] = Z_normal ;
  1135. Xif (clip_flag == F_normal_clip) {
  1136. X    object[O_clip][J_loc] = n ;
  1137. X    ammo_flag = F_normal_clip ;
  1138. X}
  1139. Xelse {
  1140. X    object[O_org_clip][J_loc] = n ;
  1141. X    ammo_flag = F_org_clip ;
  1142. X}
  1143. X++room[n][M_obj_cnt] ;
  1144. Xclip_flag = F_no_clip ;
  1145. Xprintf("You press the \"eject\" button on the rifle and the ") ;
  1146. Xprintf("magazine falls to the ground.\n") ;
  1147. Xif (object[O_rifle][J_property] > 0) {
  1148. Xprintf("You then cycle the M16's bolt once to clear the chamber. ");
  1149. Xprintf("The unfired round\n") ;
  1150. Xprintf("is ejected from the breech and rolls out of sight. \n") ;
  1151. X    if (ammo_flag == F_normal_clip) 
  1152. X        object[O_clip][J_property] = 
  1153. X            --object[O_rifle][J_property] ;
  1154. X        else object[O_org_clip][J_property] = 
  1155. X                --object[O_rifle][J_property] ;
  1156. X    object[O_rifle][J_property] = 0 ;
  1157. X}
  1158. Xreturn ;
  1159. X}
  1160. X
  1161. Xvoid igniter(n)
  1162. X/********************************************/
  1163. X/*                                          */
  1164. X/*           Igniter Subroutine             */
  1165. X/*                                          */
  1166. X/*     Software by Gary A. Allen, Jr.       */
  1167. X/*           Version: Mk 1.00               */
  1168. X/* (c) Copyright 1989 by Gary A. Allen, Jr. */
  1169. X/*                                          */
  1170. X/********************************************/
  1171. X
  1172. Xint n ;
  1173. X{
  1174. X#ifdef __TURBOC__
  1175. Xvoid switcher(int) ;
  1176. Xlong time(int) ;
  1177. X#endif
  1178. X
  1179. X/* reject single verb command */
  1180. Xif (tag[V_VERB_ONLY]) {
  1181. X    printf("What exactly do you want me to set alight?\n") ;
  1182. X    return ;
  1183. X}
  1184. X
  1185. X/* deal with 'light torch' command */
  1186. Xif (tag[V_torch]) {
  1187. X    switcher(n) ;
  1188. X    return ;
  1189. X}
  1190. X
  1191. X/* see if the user has or requested matches */
  1192. Xif (!tag[V_match]) {
  1193. Xprintf("What am I to light it with?\n") ;
  1194. Xprintf("(I am not prepared to rub two sticks together.)\n") ;
  1195. X    return ;
  1196. X}
  1197. Xif (object[O_matches][J_loc] != B_have) {
  1198. Xprintf("I have no matches!\n") ;
  1199. X    return ;
  1200. X}
  1201. Xelse {
  1202. X/* reject spurious "ignite" command */
  1203. X    if ((!tag[V_cap])&&(!tag[V_dynamite])&&
  1204. X        (sent[2] != V_LINE_END)) {
  1205. Xprintf("It would be a fire hazard to set that alight.\n");
  1206. X        return ;
  1207. X    }
  1208. X
  1209. X/* deal with spurious "light dynamite with match" */
  1210. Xif (tag[V_dynamite]&&(object[O_dynamite][J_loc] != B_have)) {
  1211. Xprintf("You have no dynamite to ignite.\n") ;
  1212. X    return ;
  1213. X}
  1214. X
  1215. X/* deal with spurious "light cap with match" */
  1216. Xif (tag[V_cap]&&(object[O_dynamite][J_loc] != B_have)&& 
  1217. X    (object[O_cap][J_loc] != B_have)) {
  1218. Xprintf("You don't have one to ignite.\n") ;
  1219. X    return ;
  1220. X}
  1221. X
  1222. X/* light up the match(es) */
  1223. X    if (tag[V_PLURAL]) {
  1224. Xprintf("You open up the match box and strike ALL of the matches.\n");
  1225. X        object[O_matches][J_loc] = B_destroyed ;
  1226. X    }
  1227. X    else {
  1228. Xprintf("You take one match from the match box and ignite it.\n") ;
  1229. X    }
  1230. X}
  1231. X
  1232. X/* see if user selected burnable objects */
  1233. Xif (tag[V_cap]&&(object[O_cap][J_loc] == B_have)) {
  1234. Xprintf("You then ignite the fuse of the blasting cap.\n\n"); 
  1235. Xprintf("Ssssssssssssssssssssssss........\n");
  1236. X    clock_explode = time(0) + 11 ;
  1237. X    sw_clock = TRUE ;
  1238. X    flag_clock = V_cap ;
  1239. X    return ;
  1240. X}
  1241. X
  1242. Xif ((tag[V_cap]||tag[V_dynamite])&&
  1243. X    (object[O_dynamite][J_loc] == B_have)) {
  1244. X    if (object[O_dynamite][J_type] == Z_alias) {
  1245. Xprintf("You then ignite the fuse of the dynamite's blasting cap....\n");
  1246. Xprintf("You need to very quickly get very far away from this thing!!");
  1247. Xprintf("\n\nSsssssssssssssssssssssss........\n");
  1248. X        clock_explode = time(0) + 11 ;
  1249. X        sw_clock = TRUE ;
  1250. X        flag_clock = V_dynamite ;
  1251. X         return ;
  1252. X    }
  1253. X    else {
  1254. Xprintf("You then ignite the dynamite. Which is an odd thing\n"); 
  1255. Xprintf("to do since it doesn't have a blasting cap in it.  The\n");
  1256. Xprintf
  1257. X  ("\"dynamite\" (which is actually a very safe mining explosive)\n");
  1258. Xprintf("burns for a few minutes, billowing out smelly black smoke\n");
  1259. Xprintf("and eventually goes out leaving a few scant ashes behind.\n") ;
  1260. X        object[O_dynamite][J_loc] = B_destroyed ;
  1261. X         return ;
  1262. X    }
  1263. X}
  1264. X
  1265. X} /* -- end of the "igniter" subroutine --- */
  1266. X
  1267. Xvoid hold_it()
  1268. X/********************************************/
  1269. X/*                                          */
  1270. X/*            Wait Subroutine               */
  1271. X/*                                          */
  1272. X/*     Software by Gary A. Allen, Jr.       */
  1273. X/*           Version: Mk 1.00               */
  1274. X/* (c) Copyright 1989 by Gary A. Allen, Jr. */
  1275. X/*                                          */
  1276. X/********************************************/
  1277. X
  1278. X{
  1279. X#ifdef __TURBOC__
  1280. Xchar getch(void) ;
  1281. X
  1282. X/* Stop scrolling the screen until the user is ready */
  1283. Xprintf("               [Press any key to continue]\r") ;
  1284. Xgetch() ;
  1285. Xprintf("                                          \n") ;
  1286. X#endif
  1287. X
  1288. X#ifndef __TURBOC__
  1289. Xprintf("               [Press RETURN to continue]\n") ;
  1290. Xgetchar() ;
  1291. X#endif
  1292. X
  1293. X} /* --- end of the "hold_it" subroutine --- */
  1294. X
  1295. Xvoid eater()
  1296. X/********************************************/
  1297. X/*                                          */
  1298. X/*            Eater Subroutine              */
  1299. X/*                                          */
  1300. X/*     Software by Gary A. Allen, Jr.       */
  1301. X/*           Version: Mk 1.00               */
  1302. X/* (c) Copyright 1989 by Gary A. Allen, Jr. */
  1303. X/*                                          */
  1304. X/********************************************/
  1305. X{
  1306. X
  1307. X#ifdef __TURBOC__
  1308. Xvoid ender(int) ;
  1309. X#endif
  1310. X
  1311. X/* reject single verb command */
  1312. Xif (tag[V_VERB_ONLY]) {
  1313. X    printf("What exactly do you want me to swallow?\n") ;
  1314. X    return ;
  1315. X}
  1316. X
  1317. X/* deal with "eat (atropine) pill(s)" command */
  1318. Xif (tag[V_pill]) {
  1319. X    if (object[O_pills][J_loc] != B_have) {
  1320. Xprintf("You don't have the atropine pills in your possesion!\n") ;
  1321. X        return ;
  1322. X    }
  1323. X    if (tag[V_PLURAL]) {
  1324. Xprintf("You remove ALL of the pills from the packet and swallow\n");
  1325. Xprintf("the lot.  For a couple of minutes nothing happens, then you\n");
  1326. Xprintf("start seeing double and have nervous twitches. You then\n");
  1327. Xprintf("start shaking violently and collapse to the ground.\n") ;
  1328. Xprintf("Eventually you pass out and expire from atropine poisoning.\n");
  1329. X        ender(F_died) ;
  1330. X    }
  1331. X    if (--pill_count <= 0 ) {
  1332. X        object[O_pills][J_loc] = B_destroyed ;
  1333. X        carry_count-- ;
  1334. X        carry_weight -= object[O_pills][J_weight]  ;
  1335. Xprintf("You swallow the last atropine pill and throw away the empty\n");
  1336. Xprintf("packet which disappears from sight.  ") ;
  1337. X    }
  1338. Xelse printf("You swallow one atropine pill.  ") ;
  1339. X        i_poison += 10 ;
  1340. X        if (i_poison >= 30) {
  1341. Xprintf("\nAfter a moment you have a violent seizure and die.\n") ;
  1342. X            ender(F_died) ;
  1343. X        }
  1344. X        if (i_poison >= 20) {
  1345. Xprintf("\nYou begin to shake violently and can barely stand.\n") ;
  1346. X            return ;
  1347. X        }
  1348. X        if (i_poison >= 15) {
  1349. Xprintf("\nYour hands become a bit jittery and your vision blurred.\n") ;
  1350. X            return ;
  1351. X        }
  1352. X        printf("The drug has no ill effect.\n") ;
  1353. X    return ;
  1354. X}
  1355. Xelse 
  1356. Xprintf("I am not inclined towards putting that into my mouth!\n") ;
  1357. X
  1358. X} /* --- end of the "eater" subroutine --- */
  1359. END_OF_FILE
  1360. if test 13259 -ne `wc -c <'gleeper.c'`; then
  1361.     echo shar: \"'gleeper.c'\" unpacked with wrong size!
  1362. fi
  1363. # end of 'gleeper.c'
  1364. fi
  1365. echo shar: End of archive 1 \(of 6\).
  1366. cp /dev/null ark1isdone
  1367. MISSING=""
  1368. for I in 1 2 3 4 5 6 ; do
  1369.     if test ! -f ark${I}isdone ; then
  1370.     MISSING="${MISSING} ${I}"
  1371.     fi
  1372. done
  1373. if test "${MISSING}" = "" ; then
  1374.     echo You have unpacked all 6 archives.
  1375.     rm -f ark[1-9]isdone
  1376. else
  1377.     echo You still need to unpack the following archives:
  1378.     echo "        " ${MISSING}
  1379. fi
  1380. ##  End of shell archive.
  1381. exit 0
  1382.