home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / games / volume15 / dinkum2 / part05 < prev    next >
Encoding:
Internet Message Format  |  1993-01-26  |  52.4 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: v15i040:  dinkum2 - australian text adventure game, Part05/07
  5. Message-ID: <4196@master.CNA.TEK.COM>
  6. Date: 14 Jan 93 03:26:08 GMT
  7. Sender: news@master.CNA.TEK.COM
  8. Lines: 1479
  9. Approved: billr@saab.CNA.TEK.COM
  10. Xref: uunet comp.sources.games:1539
  11.  
  12. Submitted-by: Gary Allen <gary@sun.mech.uq.oz.au>
  13. Posting-number: Volume 15, Issue 40
  14. Archive-name: dinkum2/Part05
  15. Supersedes: dinkum: Volume 15, Issue 21-26
  16. Environment: Unix, DOS
  17.  
  18.  
  19.  
  20. #! /bin/sh
  21. # This is a shell archive.  Remove anything before this line, then unpack
  22. # it by saving it into a file and typing "sh file".  To overwrite existing
  23. # files, type "sh file -c".  You can also feed this as standard input via
  24. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  25. # will see the following message at the end:
  26. #        "End of archive 5 (of 7)."
  27. # Contents:  longdsc.c opener.c
  28. # Wrapped by billr@saab on Wed Jan 13 19:20:19 1993
  29. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  30. if test -f 'longdsc.c' -a "${1}" != "-c" ; then 
  31.   echo shar: Will not clobber existing file \"'longdsc.c'\"
  32. else
  33. echo shar: Extracting \"'longdsc.c'\" \(23440 characters\)
  34. sed "s/^X//" >'longdsc.c' <<'END_OF_FILE'
  35. X#define LONG_DESCP
  36. X#include "dink_sym.h"
  37. X#include "dink_glb.h"
  38. X
  39. Xvoid long_descp(n)
  40. X/*********************************************************************/
  41. X/*                                                                   */
  42. X/*               --- Long Description Subroutine ---                 */
  43. X/*                                                                   */
  44. X/* Software by Gary A. Allen, Jr. 23 December 1992  Version: Mk 2.0  */
  45. X/*            (c) Copyright 1992 by Gary A. Allen, Jr.               */
  46. X/*                                                                   */
  47. X/*********************************************************************/
  48. X
  49. Xint n ;
  50. X{
  51. Xstatic int sw_bend = TRUE, sw_mob = TRUE ;
  52. X
  53. X#if (PROTOTYPE)
  54. Xvoid boom(void), describe(int), ender(int) ;
  55. X#endif
  56. X
  57. Xif (((object[O_torch][J_loc] == B_have)&&object[O_torch][J_property])|| 
  58. X    (n < 186)||(n > 202)) { 
  59. X
  60. X/* See if player entered the killing passage in the end game */
  61. Xif ((n >= 218)&&(n <= 227)) {
  62. Xprintf("As you're walking down the passage you feel the slight\n") ;
  63. Xprintf("tug of a trip wire on your leg.  Out the corner of your\n");
  64. Xprintf("eye you see the trip wire is connected to an olive green\n") ;
  65. Xprintf("cylinder attached to the wall of the tunnel....\n\n") ;
  66. Xboom() ;
  67. Xprintf("\nIn case you're wondering that was a booby trap which you\n") ;
  68. Xprintf("set off!\n") ;
  69. Xender(F_died) ;
  70. X}
  71. X
  72. X/* Select individual rooms */
  73. Xswitch (n) {
  74. Xcase R_river:      /* drowing in the river description */
  75. Xprintf ("As you approach the edge of the dike, there is a small\n");
  76. Xprintf ("earth slide which pitches you into the river.  You\n");
  77. Xprintf ("flounder around in the water for a short while.  Luckily\n");
  78. Xprintf ("before you have the chance to drown, a crocodile pulls\n") ;
  79. Xprintf ("you under, bringing you to a rather quick though painful\n");
  80. Xprintf ("end. \n") ;
  81. Xreturn ;
  82. X
  83. Xcase R_bunyip:      /* getting eaten by the bunyip */
  84. Xprintf ("The slimey tentacle suddenly tightens around your leg, and\n");
  85. Xprintf ("the water in the billabong starts to churn furiously. Then\n");
  86. Xprintf ("surfaces the one thing that all Australians fear the most...");
  87. Xprintf ("\n\nBefore you stands an enormous sickly green Queensland\n") ;
  88. Xprintf ("Bunyip in all its awesome horror. It does not make a quick\n");
  89. Xprintf ("end of you....  Such is not the way of Bunyips.  First it \n");
  90. Xprintf ("peels off your skin as if you where a banana.  After much\n");
  91. Xprintf ("fearful agony, comes release as you pass into death.\n");
  92. Xreturn ;
  93. X
  94. Xcase R_road_kill_n:  /* getting run over by a road train */
  95. Xcase R_road_kill_s: 
  96. Xprintf("The distant rumble becomes a loud roar.  Suddenly a huge Mack\n") ;
  97. Xprintf("truck pulling three carriages packed with cattle leaps over the\n") ;
  98. Xprintf("low rise, filling the narrow country road.  You stand terrified\n") ;
  99. Xprintf("in the middle of the road with the metal monster bearing down\n") ;
  100. Xprintf("at 120 km/hr.  The last thing you see before being flattened\n") ;
  101. Xprintf("like a cockroach is a sign on the truck's roo bar saying:\n") ;
  102. Xprintf("                 \"CAUTION:  ROAD TRAIN\"\n\n") ;
  103. Xreturn ;
  104. X
  105. Xcase R_forest:
  106. Xroom[n][M_rm_type] = T_was_long;   /* long description only on request  */
  107. Xprintf("You are in a forest thickly wooded with gum trees.  The forest\n") ;
  108. Xprintf("floor is covered with long thin leaves from gum trees mixed\n") ;
  109. Xprintf("with their seed pods.  There is a strong eucalytus smell in the\n") ;
  110. Xprintf("air.  Up in the forest canopy you can hear kookaburras engaged\n") ;
  111. Xprintf("in their raucous cackling.\n") ;
  112. Xreturn ;
  113. X
  114. Xcase R_bend:
  115. Xroom[n][M_rm_type] = T_was_long;   /* long description only on request  */
  116. Xprintf("You are north of the grassy area in the bend of a great meandering\n") ;
  117. Xprintf("river.  All around you are the tall black fronds of grass trees.\n") ;
  118. Xif (sw_bend) {
  119. X    sw_bend = FALSE ;
  120. Xprintf("Off in the distance you can see a mob of emus striding out of\n") ;
  121. Xprintf("sight.\n") ;
  122. X}
  123. Xreturn ;
  124. X
  125. Xcase R_bitumen:
  126. Xroom[n][M_rm_type] = T_was_long;   /* long description only on request  */
  127. Xprintf("You are on a narrow country road made out of potholed bitumen.\n") ;
  128. Xprintf("The road's shoulders are of soft red earth which could cause\n") ;
  129. Xprintf("a driver to lose control of his car if he took a wheel off the\n") ;
  130. Xprintf("bitumen.  ") ;
  131. Xif (sw_mob) {
  132. X    sw_mob = FALSE ;
  133. Xprintf("A few metres away is a mob of grey kangroos grazing\n") ;
  134. Xprintf("on grass by the road.  A huge buck looks up at you and doesn't\n") ;
  135. Xprintf("like what he sees.  He bounds off with the rest of the mob\n") ;
  136. Xprintf("following.  You can see the heads of joeys protruding from\n") ;
  137. Xprintf("their mother's pouches as the mob leaps off into the bush and\n") ;
  138. Xprintf("out of sight.\n") ;
  139. X}
  140. Xelse printf("\n") ;
  141. Xreturn ;
  142. X
  143. Xcase R_stream:
  144. Xroom[n][M_rm_type] = T_was_long;   /* long description only on request  */
  145. Xprintf("You approach a billabong with a small stream flowing into it.\n") ;
  146. Xprintf("Cane toads can be heard croaking nearby and you see countless\n") ;
  147. Xprintf("numbers of their tadpoles swimming in the stream.\n") ;
  148. Xreturn ;
  149. X
  150. Xcase R_taipan:      /* getting bitten by a taipan */
  151. Xprintf("As you wander aimlessly in the grass, you accidently step\n");
  152. Xprintf("upon a taipan which is perhaps the most poisonous of Oz's \n");
  153. Xprintf("snakes. The snake strikes upwards and bites you in the\n");
  154. Xprintf("worst possible place.  You thrash around for a short while\n");
  155. Xprintf("and then the venom takes hold. Your body begins to decompose");
  156. Xprintf("\nbefore your very eyes.  Death comes only after an hour \n");
  157. Xprintf("of the worst possible agony.  \n");
  158. Xreturn ;
  159. X
  160. Xcase R_mine_head:  /* Front of ACME Mine */
  161. Xroom[n][M_rm_type] = T_was_long;   /* long description only on request  */
  162. Xprintf ("East of you is a large iron open truss tower, topped with \n");
  163. Xprintf ("two rusting wheels holding a pair of thick steel cables.  \n");
  164. Xprintf ("This is the head gear of the once highly successful ACME \n"); 
  165. Xprintf ("Gold Mine, which now is completely mined out.  Where \n");
  166. Xprintf ("there were once rich veins of gold is now a honeycomb of \n");
  167. Xprintf ("tunnels and caverns.  There are stories about strange \n");
  168. Xprintf ("events in the old tunnels of the ACME mine and only fools \n");
  169. Xprintf ("or reckless adventurers would dare explore them. \n");
  170. Xprintf ("To the north is the old office building.  Rumor has it \n");
  171. Xprintf ("the safe in this building once had millions of dollars in \n");
  172. Xprintf ("gold processed from the rich ore of the ACME mine.  To \n");
  173. Xprintf ("the south is the mine lift, which once transported up to \n");
  174. Xprintf ("twenty miners at a time down the long mine shaft to the \n");
  175. Xprintf ("working tunnels deep under the earth below.\n");
  176. Xreturn ;
  177. X
  178. Xcase R_office_mang:  /* Manager's office */
  179. Xroom[n][M_rm_type] = T_action_obj ;
  180. Xprintf("You are in the Manager's office of the ACME Mine.  In \n");
  181. Xprintf("former times this room saw many lively meetings between \n"); 
  182. Xprintf("the Site Manager and Shift Bosses.  Fixed to the wall are\n");
  183. Xprintf("old production schedules and organizational charts. In\n");
  184. Xprintf("the middle of the room is a beautiful silky oak desk.\n");
  185. Xprintf("Unfortunately it is too heavy to move.  Attached to\n"); 
  186. Xprintf("the far wall is a curious picture of a platypus wearing a \n");
  187. Xprintf("hat with old wine corks dangling from the hat's brim. The\n");
  188. Xprintf("only exit is to the south.\n\n") ;
  189. Xreturn ;
  190. X
  191. Xcase R_geo_w:  /* Geologist's office */
  192. Xroom[n][M_rm_type] = T_unmovable_obj ;
  193. Xprintf("As you entered this room, huge cockroaches scuttled off ");
  194. Xprintf("in every \n"); 
  195. Xprintf("direction. On the far wall is a rather tasteless poster ");
  196. Xprintf("depicting \n");
  197. Xprintf("an extremely well endowed (unclad) young woman holding a ");
  198. Xprintf("mining \n"); 
  199. Xprintf("drill.  This office was once occupied by the mine ");
  200. Xprintf("geologist.  One \n");
  201. Xprintf("can still see traces of the office's former occupant.  ");
  202. Xprintf("There are only \n");
  203. Xprintf("two doors to this room.  Both go to the north. You entered ");
  204. Xprintf("through \n");
  205. Xprintf("the west door.  However there is another door in ");
  206. Xprintf("the eastern section \nof the office. \n");
  207. Xreturn ;
  208. X/* lift compartment */
  209. Xcase R_lift_inside:
  210. Xroom[n][M_rm_type] = T_action_obj ;
  211. Xprintf("You are inside the lift, which has only one ");   
  212. Xprintf("entrance doorway to the west. \n");
  213. Xprintf("To the left of the door is a panel of buttons.  Most of "); 
  214. Xprintf("the buttons are \ninoperative with tape over them.  However ");
  215. Xprintf("there are four buttons \nthat still work. Each of the four ");
  216. Xprintf("buttons have a number stamped on them.  \nThe numbers are ");
  217. Xprintf("zero, forty-nine, sixty-seven, and eighty-two. \n \n");
  218. Xreturn ;
  219. Xcase R_hideout_entr:  /* Ned Kelly's Hide Out */
  220. Xroom[n][M_rm_type] = T_was_long;   /* long description only on request  */
  221. X
  222. Xif (monster_flag == F_no_monster) {
  223. Xprintf ("Before you is a Queensland house with large verandas. ") ;
  224. Xprintf ("The front of\nthe house is to the east. The house ") ;
  225. Xprintf ("is painted fluorescent orange.\nOn the roof of the house is ");
  226. Xprintf ("a large, bright flashing neon sign which reads: \n\n");
  227. Xprintf("___________________________________________________________\n");
  228. Xprintf("|                                                         |\n");
  229. Xprintf("|            Ned Kelly's ---SECRET--- Hide Out            |\n");
  230. Xprintf("| Policemen, troopers, law enforcement officers and all   |\n");
  231. Xprintf("| other minions of the law and public decency are advised |\n");
  232. Xprintf("| to look else where for bush rangers, thieves, and other |\n");
  233. Xprintf("| larrikins, since ***only*** honest, law abiding         |\n");
  234. Xprintf("| Australians (loyal to Queen and Country) live here.     |\n");
  235. Xprintf("|                                                         |\n");
  236. Xprintf("___________________________________________________________\n");
  237. X}
  238. Xelse describe(n) ;
  239. Xreturn ;
  240. X
  241. Xcase R_foreman:
  242. Xroom[n][M_rm_type] = T_was_long;   /* long description only on request  */
  243. Xprintf("You have entered the office of the Level #67 Foreman. In ");
  244. Xprintf("the middle of the\nroom is the Foreman's large and immovable ");
  245. Xprintf("desk.  To one side can be seen an\nempty file cabinet and ");
  246. Xprintf("a series of pidgeon holes for holding mine worker's\nmail. ");
  247. Xprintf("The only exit is to the west.\n\n") ;
  248. Xreturn ;
  249. X
  250. Xcase R_no_treasure:
  251. Xroom[n][M_rm_type] = T_was_long;   /* long description only on request  */
  252. Xprintf("You are in a tunnel going east and west. Crude letters have\n");
  253. Xprintf("been scratched into the wall of the tunnel.  The following\n") ;
  254. Xprintf("was written:\n\n") ;
  255. Xprintf("Dear Treasure Hunter:\n") ;
  256. Xprintf("There was lots of treasure on this level when I first\n") ;
  257. Xprintf("discovered this mine.  However I have since carted it all\n") ;
  258. Xprintf("away.  You might try looking on another level.") ;
  259. Xprintf("\n\n                            Good Luck!\n") ;
  260. Xprintf("                         Dr. I. Jones, Ph.D.\n\n") ;
  261. Xreturn ;
  262. X
  263. Xcase R_gleep_tank:
  264. Xroom[n][M_rm_type] = T_was_long;   /* long description only on request  */
  265. Xprintf("You have walked into a room with a large plastic tank set "); 
  266. Xprintf("in the middle.\nThe tank is about two metres deep and ");
  267. Xprintf("full of dark blue liquid which\nsmells strongly of chlorine.");
  268. Xprintf(" The words \"Gleep Tank\" have been crudely\n");
  269. Xprintf("spray painted on the wall.\n") ;
  270. Xreturn ;
  271. Xcase R_ufo_e:
  272. Xroom[n][M_rm_type] = T_was_long;   /* long description only on request  */
  273. Xprintf("You crawl under a long thin sting that projects from the ");
  274. Xprintf("front of the\nspacecraft.  It's made from a different metal ");
  275. Xprintf("(stainless steel?), and appears\nto have been retractable. ");
  276. Xprintf("This was probably a Mach probe for measuring flight\n") ;
  277. Xprintf("speed. You can go north or south.\n") ;
  278. Xreturn ;
  279. Xcase R_ufo_w:
  280. Xroom[n][M_rm_type] = T_was_long;   /* long description only on request  */
  281. Xprintf("Before you is perhaps the real reason why the ACME Mine ");
  282. Xprintf("was closed. You see\nthe bent and twisted remains of what ");
  283. Xprintf("could only be an ancient spacecraft. It\nsits ") ;
  284. Xprintf("embedded within a gold bearing");
  285. Xprintf(" reef of conglomerate stone from the\nPrecambrain Period ");
  286. Xprintf("(hundreds of millions of years old).  The old spacecraft\n") ;
  287. Xprintf("was based on a delta wing design which the miners had ");
  288. Xprintf("chiped free from\nthe rock. You can see clearly the interior ");
  289. Xprintf("of the engine exhaust ducts.  The\nvehicle has air inlets ");
  290. Xprintf("so it must have been air breathing when it flew in\nthe ");
  291. Xprintf("atmosphere. ") ;
  292. Xprintf("The edges of the ducts appear to be made of titanium ");
  293. Xprintf("and are\nabout six centimetres thick. No wonder it could ");
  294. Xprintf("survive millions of years\nunder tons of stone. ") ;
  295. Xprintf("This spacecraft is literally built like a battleship!\nYou ") ;
  296. Xprintf("can climb over the vehicle to the north or go south.\n\n");
  297. Xreturn ;
  298. Xcase R_ufo_n:
  299. Xroom[n][M_rm_type] = T_was_long;   /* long description only on request  */
  300. Xprintf("You're now doing a tight squeeze between the tunnel wall ");
  301. Xprintf("and the leading\nedge of the wing.  You can see the titanium");
  302. Xprintf(" surface is covered with many\nregularly placed little ");
  303. Xprintf("holes, each about half a millimetre in diameter.\nThis ");
  304. Xprintf("was probably part of the wing's cooling system for ") ;
  305. Xprintf("atmospheric entry\nfrom orbit. You can go south-east or ");
  306. Xprintf("south-west.\n\n");
  307. Xreturn ;
  308. Xcase R_ufo_s:
  309. Xroom[n][M_rm_type] = T_was_long;   /* long description only on request  */
  310. Xprintf("You're crawling under the wing and next to the spacecraft's ");
  311. Xprintf("landing gear.\nThe landing gear strut is almost snapped ");
  312. Xprintf("off.  The tyre has long ago turned\nto dust, but the tyre ");
  313. Xprintf("rim is still in place.  The braking system used is\nquite ");
  314. Xprintf("odd.  The brake rotor is basicly a ring being gripped by ");
  315. Xprintf("a caliper with\nconcave brake pads.  You ") ;
  316. Xprintf("can go north-west or north-east.\n") ;
  317. Xreturn ;
  318. Xcase R_ufo_ne:
  319. Xroom[n][M_rm_type] = T_was_long;   /* long description only on request  */
  320. Xprintf("You are now near the nose of the derelict spacecraft.  You ");
  321. Xprintf("see a quartz\nwindow in the side of the vehicle.  It has been");
  322. Xprintf(" so scratched by the\ncenturies that it is now opaque.  ");
  323. Xprintf("You can go north-west or south.\n") ;
  324. Xreturn ;
  325. Xcase R_ufo_nw:
  326. Xroom[n][M_rm_type] = T_was_long;   /* long description only on request  */
  327. Xprintf("As you scrambled over the old derelict, you passed under ");
  328. Xprintf("the vertical\nstabilizer which centuries of geological ") ;
  329. Xprintf("forces had bent into what\nlooks like a sagging shark's ");
  330. Xprintf("fin. You can go south or do a tight squeeze\nto the ");
  331. Xprintf("north-east.\n\n");
  332. Xreturn ;
  333. Xcase R_ufo_se:
  334. Xroom[n][M_rm_type] = T_was_long;   /* long description only on request  */
  335. Xprintf("You are under the forward section of the spacecraft. ");
  336. Xprintf("Above you is an\nopened access hatch which leads into the ");
  337. Xprintf("dark interior of the derelict.\n");
  338. Xprintf("You can go north, up or crawl under the wing to the ");
  339. Xprintf("south-west\n") ;
  340. Xreturn ;
  341. Xcase R_ufo_sw:
  342. Xroom[n][M_rm_type] = T_was_long;   /* long description only on request  */
  343. Xprintf("You are hunching over as you scramble underneath the ");
  344. Xprintf("spacecraft's wing.\nNear the trailing edge of the wing ");
  345. Xprintf("you can see what is left of the\nwing flaps.  The flap ");
  346. Xprintf("was actuated by a very conventional hydraulic system.\n");
  347. Xprintf("Some of the metal tubing for the actuaters are still in ");
  348. Xprintf("place, though\nthe hydraulic fluid has long since ") ;
  349. Xprintf("fossilized into stone. You can\ngo north or south-east.\n") ;
  350. Xreturn ;
  351. Xcase R_air_lock:
  352. Xroom[n][M_rm_type] = T_was_long;   /* long description only on request  */
  353. Xprintf("You are inside what is obviously an airlock.  There are ");
  354. Xprintf("two hatchways\ninto this airlock.  One leads to the exterior ");
  355. Xprintf("while the other goes into\nthe spacecraft's interior.  Both ");
  356. Xprintf("hatches appear to have originally been\nleft open and not ");
  357. Xprintf("forced by the miners (the hinges are immovable). ");
  358. Xprintf("It\nappears that the ship's crew left in a hurry. ") ;
  359. Xprintf("You can go north or down.\n") ;
  360. Xreturn ;
  361. X
  362. Xcase R_ship_passage:
  363. Xroom[n][M_rm_type] = T_was_long;   /* long description only on request  */
  364. Xprintf("You've entered the intercompartment access passage.  To the ") ;
  365. Xprintf("south is an\nopen air tight door leading to the airlock. ");
  366. Xprintf("The access door to the east\nis open and recessed into the ");
  367. Xprintf("wall. The access door to the west has been\nforced open ");
  368. Xprintf("with a cutting torch and folded back with a pneumatic\n") ;
  369. Xprintf("hammer (obviously the work of the miners). ") ;
  370. Xprintf("The passage itself has about\nten centimetres of silt on the") ;
  371. Xprintf(" bottom and has the appearance of ancient\ndilapidation.\n") ;
  372. Xreturn ;
  373. X
  374. Xcase R_flight_deck:
  375. Xroom[n][M_rm_type] = T_was_long;   /* long description only on request  */
  376. Xprintf("You have made it to the flight deck. Unfortunately ");
  377. Xprintf("it's not much to\nwrite home about. Since the access door ");
  378. Xprintf("was open, this area has been full\nof water and silt for ");
  379. Xprintf("millennia.  The miners have shoveled out most of it.\nOnce ");
  380. Xprintf("the wall panels were covered with some kind of plastic which");
  381. Xprintf(" has long\nsince turned to dust.  There are three corroded ");
  382. Xprintf("frames which were once crew\nseats. The beings that flew ") ;
  383. Xprintf("this machine were taller and wider than humans\nbut they ");
  384. Xprintf("had anthropoid form. The flight controls are still here");
  385. Xprintf(" but they\nare so heavily corroded that they can no longer "); 
  386. Xprintf("be moved.  The only way out\nis to the west.\n\n") ;
  387. Xreturn ;
  388. X
  389. Xcase R_panel:
  390. Xroom[n][M_rm_type] = T_was_long;   /* long description only on request  */
  391. Xprintf("You are in a compartment that seems brand new, which is ");
  392. Xprintf("unbelievable.  Perhaps\nthe machinery in this ship was once ");
  393. Xprintf("self repairing.  Before you is a control\npanel with CRT type");
  394. Xprintf(" displays and buttons that still work.  Beneath each button\n");
  395. Xprintf("is a description written in a strange alien script ");
  396. Xprintf("vaguely like Sanskrit.\nI wouldn't dare ") ;
  397. Xprintf("press any button except for a gray button.  Beneath\n");
  398. Xprintf("this button is some masking tape that was obviously placed ") ;
  399. Xprintf("there by the miners.\nSomeone has written \"TEHR.\" on the ") ;
  400. Xprintf("masking tape with a pencil.\n\n") ;
  401. Xreturn ;
  402. X
  403. Xcase R_transport:
  404. Xroom[n][M_rm_type] = T_was_long;   /* long description only on request  */
  405. Xprintf("You have walked into an elevated chamber with strange ") ;
  406. Xprintf("glowing hexagons on\nthe floor which are about half a ") ;
  407. Xprintf("metre across.  The hexagon pattern on the\nfloor is ");
  408. Xprintf("matched by one on the ceiling which is also glowing.\n\n") ;
  409. Xreturn ;
  410. X
  411. Xcase R_prayer:
  412. Xroom[n][M_rm_type] = T_short_descp ;   /* disable long description  */
  413. Xprintf("You are in a large and very grand room with walls made of\n");
  414. Xprintf("polished mahogany, and crystal chandeliers hanging from an\n");
  415. Xprintf("ornate ceiling.  There is a mihrab incongruously set in the\n");
  416. Xprintf("western wall of the building.  Also there are quotations\n");
  417. Xprintf("from the Quram written in golden letters along the top of\n") ;
  418. Xprintf("the walls near the ceiling.  On the floor are sumptuous\n") ;
  419. Xprintf("cushions made of silk and fine green velvet. Sitting on the\n");
  420. Xprintf("cushions are old men wearing black pajamas with white\n");
  421. Xprintf("towels wrapped around their heads. In the middle of the\n");
  422. Xprintf("floor is a raised dais, upon which is sitting a rather\n");
  423. Xprintf("stately old man wearing similar clothing. In the far corner\n");
  424. Xprintf("of the room is standing a wax dummy of the Ayatolla\n") ;
  425. Xprintf("Khomeini. His right arm is upright much like the Statue of\n") ;
  426. Xprintf("Liberty and in his right hand is a glowing 100 watt light\n") ;
  427. Xprintf("bulb.  I think this is the prayer room for the Iranian\n") ;
  428. Xprintf("Parliament!  You'll have to go west if you wish to leave.\n\n") ;
  429. Xreturn ;
  430. Xcase R_guard:
  431. Xroom[n][M_rm_type] = T_was_long;   /* long description only on request  */
  432. Xprintf("You are in a rather small room with a table in the ");
  433. Xprintf("middle that is covered\nwith half filled cups of tea, dirty ") ;
  434. Xprintf("ash trays, and a newspaper written in\nwhat appears to be ") ;
  435. Xprintf("Arabic.  There is ") ;
  436. Xprintf("a brightly coloured poster on the\nwall depicting the Kaba ") ;
  437. Xprintf("Stone of Mecca with a calendar below it.  The only\n") ;
  438. Xprintf("exits are through an open doorway to the east and through");
  439. Xprintf(" a curtain covered\ndoorway to the south.\n\n") ;
  440. Xreturn ;
  441. Xcase R_closet:
  442. Xroom[n][M_rm_type] = T_was_long;   /* long description only on request  */
  443. Xprintf("You are in a closet full of grubby, nondescript things not\n") ;
  444. Xprintf("worth taking. The closet stinks of moth balls. The only way\n");
  445. Xprintf("out is through a curtain covered doorway to the north.\n\n");
  446. Xreturn ;
  447. Xcase R_gong:
  448. Xroom[n][M_rm_type] = T_unmovable_obj ;
  449. Xprintf("You have entered an enormous room which is walled with\n");
  450. Xprintf("polished black granite supported by vast curving arches\n");
  451. Xprintf("much like a gothic cathedral.  The cavernous room is a seven\n");
  452. Xprintf("sided polygon in layout with huge flaming torches set in\n");
  453. Xprintf("brass holders in every corner of the room.  In the flickering\n");
  454. Xprintf("light of the torches you see an enormous silver gong\n");
  455. Xprintf("weighing at least a ton.  The huge gong is suspended from\n");
  456. Xprintf("a finely polished red cedar frame, the top of which is\n");
  457. Xprintf("about four metres above the floor.  The room is deathly\n");
  458. Xprintf("quiet like an ancient tomb. The only sound you can hear is\n");
  459. Xprintf("your own heart beating.\n") ;
  460. Xreturn ;
  461. Xcase R_warning:
  462. Xroom[n][M_rm_type] = T_was_long;   /* long description only on request  */
  463. Xprintf("You have entered a passage with exits to the north, south,\n");
  464. Xprintf("and west.  There is a poster glued to the wall which reads:\n");
  465. Xprintf("+---------------------------------------------------------+\n");
  466. Xprintf("|                                                         |\n");
  467. Xprintf("|              ACME MINE IS UNFAIR TO WORKERS!!           |\n");
  468. Xprintf("|                                                         |\n");
  469. Xprintf("|                       ON STRIKE!!                       |\n");
  470. Xprintf("|                                                         |\n");
  471. Xprintf("| The Loyal Brotherhood of Australian Miners and Under-   |\n");
  472. Xprintf("| ground Workers is on strike against Acme Mines Ltd. due |\n");
  473. Xprintf("| to unfair treatment of its workers.  Our Union demands  |\n");
  474. Xprintf("| the following:  Worker's wages be increased by 30%%, the |");
  475. Xprintf("\n") ;
  476. Xprintf("| week shall have only 4 working days, the working day    |\n");
  477. Xprintf("| shall be reduced to 5 hours, triple wages for overtime  |\n");
  478. Xprintf("| work and immunity from sacking for all Union members.   |\n");
  479. Xprintf("| To discourage scabs and other strike breakers from      |\n");
  480. Xprintf("| working during the strike, we have planted booby traps  |\n");
  481. Xprintf("| through out the tunnels on this level.  We do hope you  |\n");
  482. Xprintf("| don't mind the mine being mined so it won't be mined.   |\n");
  483. Xprintf("+---------------------------------------------------------+\n");
  484. X    return ;
  485. X    } 
  486. X}
  487. Xelse describe(n) ;
  488. X
  489. X} /* end of long_descp subroutine */
  490. END_OF_FILE
  491. if test 23440 -ne `wc -c <'longdsc.c'`; then
  492.     echo shar: \"'longdsc.c'\" unpacked with wrong size!
  493. fi
  494. # end of 'longdsc.c'
  495. fi
  496. if test -f 'opener.c' -a "${1}" != "-c" ; then 
  497.   echo shar: Will not clobber existing file \"'opener.c'\"
  498. else
  499. echo shar: Extracting \"'opener.c'\" \(26609 characters\)
  500. sed "s/^X//" >'opener.c' <<'END_OF_FILE'
  501. X#define OPNR
  502. X#include "dink_sym.h"
  503. X#include "dink_glb.h"
  504. X
  505. Xvoid dialer(n)
  506. X/*****************************/
  507. X/*      "dial" command"      */
  508. X/*     Version:  Mk 1.1      */
  509. X/*      29 October 1989      */
  510. X/*****************************/
  511. Xint n ;
  512. X{
  513. X
  514. X/* deal with the question of "What is the combination?" */
  515. Xif (tag[V_what]) {
  516. Xprintf("I really don't know.  You might try looking around for a\n") ;
  517. Xprintf("series of numbers. Sometimes that can be a clue to the\n") ;
  518. Xprintf("actual combination.\n") ;
  519. X    return ;
  520. X}
  521. X
  522. X/* See if the combination was dialed in the right place */
  523. Xif ((n == R_office_mang)&&
  524. X    (room[R_office_mang][M_rm_status] >= S_revealed)) {
  525. X    if (tag[V_0] && tag[V_49] && tag[V_67] && tag[V_82]) {
  526. X        printf ("Click!! \n");
  527. X        room[R_office_mang][M_rm_status] = S_dialed ;
  528. X        return ; 
  529. X    }
  530. Xprintf ("You turned the dial but nothing happened.  I think you \n");   
  531. Xprintf ("dialed the wrong thing. \n");
  532. X    return ; 
  533. X}
  534. Xprintf ("How am I supposed to dial that? \n");
  535. X} /* --- end of the "dialer" subroutine --- */
  536. X
  537. Xvoid inventer()
  538. X/*****************************/
  539. X/*   "inventory" command     */
  540. X/*     Version:  Mk 1.0      */
  541. X/*       11 March 1989       */
  542. X/*****************************/
  543. X{
  544. X#if (PROTOTYPE)
  545. Xvoid objector(int) ;
  546. X#endif
  547. X
  548. Xregister int i;
  549. Xint i_ws, j_ws ;
  550. Xi_ws = 0 ;
  551. Xj_ws = 0 ;
  552. Xfor (i = 0; i <= objcnt; i++) if (object[i][J_loc] == B_have)  {
  553. X    ++j_ws;
  554. X    i_ws = i ;
  555. X    } ;
  556. Xif ((j_ws == 0)&&(gleep_count == 0)) {
  557. X    printf("You've got NOTHING!! \n") ;
  558. X    return ;
  559. X}
  560. Xif (j_ws >= 1) {
  561. X    if (j_ws == 1) {
  562. X        printf("You are carrying ") ;
  563. X        objector(i_ws);
  564. X        printf ("\n") ;
  565. X    }
  566. X    else {
  567. X        printf ("You are carrying the following: \n");
  568. X        for (i = 0; i <= objcnt; i++) {
  569. X            if (object[i][J_loc] == B_have) {
  570. X                printf ("        ") ;
  571. X                objector(i);
  572. X                printf ("\n") ;
  573. X            }
  574. X        }
  575. X    }
  576. X}
  577. Xif (gleep_count > 0) {
  578. X    if (gleep_count == 1) {
  579. X        printf("You have one gleep.\n") ;
  580. X        return ;
  581. X    }
  582. X    printf("You are carrying %d gleeps. \n",gleep_count) ;
  583. X}
  584. X
  585. X} /* --- end of the "inventor" subroutine --- */
  586. Xvoid drinker()
  587. X/*****************************/
  588. X/*     "drink" command       */
  589. X/*     Version:  Mk 1.0      */
  590. X/*       11 March 1989       */
  591. X/*****************************/
  592. X{
  593. X#if (PROTOTYPE)
  594. Xvoid no_booze(void) ;
  595. X#endif
  596. X
  597. Xif (tag[V_can]) {
  598. X    if (object[O_can][J_loc] == B_have) {
  599. X        printf("The XXXX keeps on coming on ? \n") ;
  600. Xprintf("I think not, for there is no Fourex left for me to drink!\n") ;
  601. X    }
  602. X    else no_booze() ;
  603. X    return ;
  604. X}
  605. X
  606. Xif (tag[V_bottle]) {
  607. X    if (object[O_bottle][J_loc] == B_have) {
  608. Xprintf("Some greedy larrikin has drunk up all of the Black Swan! \n") ;
  609. X    printf("Bad on Him! There is none left for me! \n") ;
  610. X    return ;
  611. X    }
  612. X    no_booze() ;
  613. X    return ;
  614. X}
  615. X
  616. Xif (tag[V_water]) {
  617. X    printf("There is no water here that I am willing to drink.\n") ;
  618. X    return ;
  619. X}
  620. X    
  621. Xprintf ("What exactly do you want me to drink? \n");
  622. Xreturn; 
  623. X
  624. X} /* --- end of the "drinker" subroutine --- */
  625. X
  626. Xvoid no_booze()
  627. X/*****************************/
  628. X/*     Version:  Mk 1.0      */
  629. X/*     7 December 1992       */
  630. X/*****************************/
  631. X{
  632. Xprintf ("You don't have it in your possession to drink!\n");
  633. Xreturn ;
  634. X} /* --- end of the "no_booze" subroutine --- */
  635. X
  636. Xvoid reader(n)
  637. X/*****************************/
  638. X/*      "read" command       */
  639. X/*     Version:  Mk 1.2      */
  640. X/*      23 December 1992     */
  641. X/*****************************/
  642. X
  643. Xint n ;
  644. X{
  645. Xint k ;
  646. X
  647. X#if (PROTOTYPE)
  648. Xvoid rdtxt(int) ;
  649. X#endif
  650. X
  651. X/* reject an isolated "read" command */
  652. Xif (tag[V_VERB_ONLY]) { 
  653. X        printf ("What exactly do you want me to read? \n");
  654. X        return;
  655. X}
  656. X
  657. Xfor (;;) {
  658. X    /* map from the manager's office */
  659. X    if (tag[V_map]) {
  660. X        k = O_map_frag ;
  661. X        break;
  662. X    }
  663. X
  664. X    /* Qadaffi's letter */
  665. X    if (tag[V_letter]) {
  666. X        k = O_letter ;
  667. X        break ;
  668. X    }
  669. X
  670. X    /* paper from the safe */
  671. X    if (tag[V_paper]) {
  672. X        k = O_paper ;
  673. X        break;
  674. X    }
  675. X
  676. X    /* Message on wall */
  677. X    if ((tag[V_message] || tag[V_wall]) && (n == R_no_treasure)) {
  678. X        k = O_message ;
  679. X        rdtxt(k) ;
  680. X        return ;
  681. X    }
  682. X
  683. X    /* Deal with unreadable objects */
  684. X    printf("There is no way in which I can read that. \n");
  685. X        return ;
  686. X} /* end of the infinite for loop */
  687. X
  688. Xif (object[k][J_loc] == B_have) rdtxt(k) ;
  689. Xelse printf ("I can't read it because it isn't in my possession. \n");
  690. X}         /* --- end of the subroutine "reader" --- */
  691. X
  692. Xvoid unlocker(n)
  693. X/*****************************/
  694. X/*     "unlock" command      */
  695. X/*      Version: Mk 1.1      */
  696. X/*      16 September 1989    */
  697. X/*****************************/
  698. Xint n ;
  699. X{
  700. Xif (tag[V_VERB_ONLY]) {
  701. X    printf ("What do you want me to unlock? \n");
  702. X    return; 
  703. X}
  704. X
  705. Xif (room[n][M_rm_type] == T_action_obj) {
  706. X    switch (n) {
  707. X
  708. X    /* Managers office */
  709. X    case R_office_mang:
  710. X        if (tag[V_safe]) {
  711. Xprintf("This is a combination type safe (no key hole).  You must\n");
  712. Xprintf("dial a combination in order to open this safe. \n");
  713. X        }
  714. X        else 
  715. Xprintf("You're wasting your time.  You can't unlock that! \n");
  716. X        return;
  717. X
  718. X    /* office entrance */
  719. X    case R_office_entr:
  720. X    if (tag[V_door]) {
  721. X        if (room[R_office_entr][M_rm_status] == S_open) {
  722. X            printf("The door is already open! \n");
  723. X            return;
  724. X        }
  725. X        if (room[R_office_entr][M_rm_status] == S_kicked) {
  726. X            printf("The door has been kicked in! \n");
  727. X            return;
  728. X        }
  729. X        if (room[R_office_entr][M_rm_status] == S_unlocked) {
  730. Xprintf("The door is already unlocked.  However it is still closed! \n");
  731. X            return;
  732. X        }
  733. X        /* The door has to still be unlocked */
  734. X        if (tag[V_key]) {
  735. X        if (object[O_key][J_loc] != B_have) {
  736. Xprintf("You don't have the key to this door in your possession! \n");
  737. X        }
  738. X        else {
  739. X            printf("You turn the key in the lock and ") ;
  740. X            printf("hear a satisfying \"click\".\n");
  741. X            room[R_office_entr][M_rm_status] = S_unlocked ;
  742. X        }
  743. X        }
  744. X        else printf ("With what shall I unlock the door? \n");
  745. X        return; 
  746. X    }
  747. X
  748. X    default:
  749. Xprintf("I don't think that is the sort of thing one unlocks.\n") ;
  750. X    }  /* end of "unlock" room scan switch */
  751. X} /* end of "unmovable action device" block */
  752. Xelse printf("There is nothing here that can be unlocked! \n");
  753. Xreturn ;
  754. X}  /* --- end of the "unlocker" subroutine --- */
  755. X
  756. Xvoid closer(n)
  757. X/*****************************/
  758. X/*     "close" command       */
  759. X/*     Version:  Mk 1.0      */
  760. X/*     12 November 1988      */
  761. X/*****************************/
  762. Xint n ;
  763. X{
  764. X/* scan "close" sentence */
  765. Xif (room[n][M_rm_type] != T_action_obj) {
  766. Xprintf("There is nothing here that can be closed! \n");
  767. X    return; 
  768. X}
  769. X
  770. Xif (tag[V_VERB_ONLY]) {
  771. X    printf ("What exactly do you want me to close? \n");
  772. X    return; 
  773. X}
  774. X
  775. Xswitch (n) {
  776. X    /* office door */
  777. X    case R_office_entr:
  778. X        if (!tag[V_door]) break ;
  779. X        if (room[R_office_entr][M_rm_status] == S_kicked) {
  780. Xprintf("The door has been kicked in!  It'll never be closed again.\n");
  781. X            return;
  782. X        }
  783. X        if (room[R_office_entr][M_rm_status] == S_open) {
  784. X        printf("The office door closes with a slam. \n");
  785. X            room[R_office_entr][2] = R_wall ;
  786. X            room[R_office_entr][M_rm_status] = S_closed ;
  787. X            return ;
  788. X        }
  789. X        else printf("The office door is already closed! \n");
  790. X        return ;
  791. X
  792. X    /* managers office */
  793. X    case R_office_mang:
  794. X    if ((!tag[V_picture])&&(!tag[V_safe])) break;
  795. X    if (tag[V_safe]) {
  796. X        if (room[R_office_mang][M_rm_status] < S_dialed) 
  797. X        printf("The safe is already closed. \n");
  798. X        else {
  799. X    printf("The safe door closes and locks with a \"click\". \n");
  800. X            room[R_office_mang][M_rm_status] = S_revealed ;
  801. X        }
  802. X    }
  803. X    if (tag[V_picture]) {
  804. X        if (room[R_office_mang][M_rm_status] == S_closed) 
  805. X        printf("The platypus picture is already closed. \n");
  806. X        else  {
  807. Xprintf("The picture swings flush against the wall, hiding the safe.\n");
  808. X            room[R_office_mang][M_rm_status] = S_closed ;
  809. X        }
  810. X    }
  811. X    return ;
  812. X
  813. X} /* end of the "close" switch */
  814. Xprintf ("I really don't see how one would close that? \n");
  815. Xreturn; 
  816. X} /* --- end of the "closer" subroutine --- */
  817. X
  818. Xvoid opener(n)
  819. X/*****************************/
  820. X/*      "open" command       */
  821. X/*     Version:  Mk 2.1      */
  822. X/*     25 April 1990         */
  823. X/*****************************/
  824. Xint n ;
  825. X{
  826. Xregister int i ;
  827. X
  828. X#if (PROTOTYPE)
  829. Xvoid boom(void), ender(int), objector(int) ;
  830. X#endif
  831. X
  832. X/* deal with a terse command */
  833. Xif (tag[V_VERB_ONLY]) {
  834. X    printf ("What exactly do you want me to open? \n");
  835. X    return;
  836. X}
  837. Xif (tag[V_can]) {
  838. X    if (object[O_can][J_loc] == B_have) 
  839. Xprintf("Some bugger has already drunk it up. The stubee is empty!\n");
  840. X    else printf("You don't have a can to open! \n") ;
  841. X    return; 
  842. X}
  843. X
  844. Xif (tag[V_letter]) {
  845. X    if (object[O_letter][J_loc] == B_have) {
  846. X        boom() ; /* cause an explosion */
  847. Xprintf("It's not polite to read other people's mail!!  As you lay\n") ;
  848. Xprintf("bleeding on the floor with your hands and arms blown away,\n") ;
  849. Xprintf("you realize that envelope actually contained a letter bomb!\n");
  850. Xprintf("(A trick widely used by terrorists in the 1970s).  However\n");
  851. Xprintf("the knowledge does you little good since your spirit soon\n");
  852. Xprintf("departs this mortal coil.\n");
  853. X        ender(F_died) ;
  854. X    }
  855. X    else printf("You don't have a letter to open!\n") ;
  856. X    return ;
  857. X}
  858. X
  859. Xif (tag[V_bottle]) {
  860. X    if (object[O_bottle][J_loc] == B_have)
  861. Xprintf("Some bugger has already drunk it up. The bottle is Empty! \n");
  862. X    else printf("You don't have a bottle to open! \n") ;
  863. X    return; 
  864. X}
  865. X
  866. Xif (tag[V_umbrella]) {
  867. X    if (object[O_umbrella][J_loc] == B_have) {
  868. Xprintf("You open the umbrella but find it's full of holes and\n");
  869. Xprintf("its clasp is broken.  As soon as you release it, the\n");
  870. Xprintf("umbrella snaps shut.\n") ;
  871. X    }
  872. X    else printf("You don't have an umbrella to open! \n") ;
  873. X    return; 
  874. X}
  875. X/* Now check to see if the location is consistent with the command */
  876. Xif (room[n][M_rm_type] != T_action_obj) { 
  877. X    printf ("I don't understand what you want me to open. \n") ;
  878. X    return ;
  879. X}
  880. X
  881. Xswitch (n) {
  882. X    /* office entrance (door) */
  883. X    case R_office_entr:
  884. X        if (tag[V_door]) {
  885. X        switch (room[R_office_entr][M_rm_status]) {
  886. X            case S_kicked:
  887. Xprintf("The door has been kicked in!  You don't need to open it.\n");
  888. X                return;
  889. X        
  890. X            case S_open:
  891. X                printf("The door is already open! \n");
  892. X                return ;
  893. X        
  894. X            case S_unlocked:
  895. Xprintf("As you push open the office door, the rusty hinges creak \n");
  896. Xprintf("from long disuse.  Darkness and stale air seem to exude \n");
  897. Xprintf("from the vacant office.  The way is free for you to enter. \n");
  898. X                room[R_office_entr][2] = R_office_hall ;
  899. X            room[R_office_entr][M_rm_status] = S_open ;
  900. X                return ;
  901. X        
  902. X            case S_closed:
  903. Xprintf("The office door is locked tight.");
  904. Xprintf("  You need to unlock it with a key. \n");
  905. X                return ;
  906. X        } /* end of room status switch */
  907. X        } /* end of the door "if" block */
  908. X        break ;
  909. X
  910. X    /* managers office */
  911. X    case R_office_mang:
  912. X        if ((!tag[V_picture])&&(!tag[V_safe])) {
  913. Xprintf("I don't understand how I would open that.\n") ;
  914. X            return ;
  915. X        }
  916. X
  917. X        if (tag[V_picture]) {
  918. X        switch (room[R_office_mang][M_rm_status]) {
  919. X        case S_closed:
  920. Xprintf("You swing open the platypus picture revealing a large wall \n");
  921. Xprintf("safe with a combination dial. \n");
  922. X            room[R_office_mang][M_rm_status] = S_revealed ;
  923. X            break ;
  924. X        default:
  925. Xprintf("The picture is already swung out.  The problem is to open \n");
  926. Xprintf("the safe!!  Hint:  Dial in a combination. \n");
  927. X            return ;
  928. X        }
  929. X        } /* end of the picture "if" block */
  930. X
  931. X        if (tag[V_safe]) {
  932. X        switch (room[R_office_mang][M_rm_status]) {
  933. X        case S_closed:
  934. Xprintf("I can see no safe in this office for me to open.  Perhaps\n");
  935. Xprintf("there is a safe hidden in this office somewhere.\n");
  936. X            return ;
  937. X
  938. X        case S_revealed:
  939. Xprintf("The safe is locked.  You must first dial the combination\n");
  940. Xprintf("in order to open it.  See if you can find the combination. \n");
  941. X            return ;
  942. X        
  943. X        case S_dialed:
  944. X    printf("The safe door swings open smoothly and easily. \n");
  945. X            room[R_office_mang][M_rm_status] = S_open ;
  946. X            sw_active = TRUE ;
  947. X            for (i=0; i <= objcnt; i++) 
  948. X            if (object[i][J_loc] == B_in_safe) {
  949. Xprintf ("Inside the safe, you see the following: \n");
  950. X                for (i=0; i <= objcnt; i++) {
  951. X                if (object[i][J_loc] == B_in_safe) {
  952. X                    printf ("        ") ;
  953. X                    objector(i);
  954. X                    printf ("\n") ;
  955. X                }
  956. X                }                
  957. X                return ;
  958. X            }
  959. X        printf("---The safe is empty.--- \n");
  960. X            return ;
  961. X
  962. X        case S_open:
  963. X            printf("The safe is already open! \n");
  964. X            return ;
  965. X        } /* end of the "safe" status switch */
  966. X        } /* end of the safe "if" block */
  967. X        return ; /* this return statement must remain */
  968. X
  969. X    /* Lift door(s) */
  970. X    case R_lift_entr:
  971. X        if (tag[V_door]||tag[V_lift]) {
  972. Xprintf("It is not exactly clear how I would open these doors.\n") ;
  973. Xprintf("However I see a push button next to the lift doors.\n") ;
  974. Xprintf("Perhaps if I pressed the button something would happen.\n") ;
  975. X        }
  976. X        else printf("I'm confused about what I should open.\n");
  977. X        return ;
  978. X        
  979. X} /* end of the "open" room switch */
  980. Xprintf ("I see nothing here that I can open. \n") ;
  981. X} /* --- end of the "opener" subroutine --- */
  982. X
  983. Xvoid boom()
  984. X{
  985. Xprintf("\n\n");
  986. Xprintf("BBBBBB      OOOOO        OOOOO      MM        MM      !!!\n");
  987. Xprintf("B    BB   OO     OO    OO     OO    M M      M M      !!!\n");
  988. Xprintf("B    BB   OO     OO    OO     OO    M  M    M  M      !!!\n");
  989. Xprintf("BBBBBB    OO     OO    OO     OO    M   M  M   M      !!!\n");
  990. Xprintf("B    BB   OO     OO    OO     OO    M    MM    M      !!!\n");
  991. Xprintf("B    BB   OO     OO    OO     OO    M          M\n");
  992. Xprintf("BBBBBB      OOOOO        OOOOO      M          M      !!!\n\n");
  993. X} /* --- end of the "boom" subroutine --- */
  994. X
  995. Xvoid gleeper(n) 
  996. X/********************************************/
  997. X/*                                          */
  998. X/*           Gleeper Subroutine             */
  999. X/*                                          */
  1000. X/*     Software by Gary A. Allen, Jr.       */
  1001. X/*           Version: Mk 1.00               */
  1002. X/* (c) Copyright 1989 by Gary A. Allen, Jr. */
  1003. X/*                                          */
  1004. X/********************************************/
  1005. Xint n ;
  1006. X{
  1007. Xregister int i ;
  1008. Xint count ;
  1009. Xstatic int sw_glp_st = FALSE, cnt_down = 0 ;
  1010. X
  1011. X/* Gleep display routine */
  1012. Xcount = room[n][M_gleep] ;
  1013. X
  1014. Xif (((object[O_torch][J_loc] == B_have)&&object[O_torch][J_property])|| 
  1015. X    (n < 186)||(n > 202)) { 
  1016. X    if (count != 0) {
  1017. X        sw_glp_st = TRUE ; /*  gleeps can now multiply */
  1018. X        if (count != 1) 
  1019. X               printf("There are %d gleeps here. \n",count) ;
  1020. X        else printf("There is a gleep here. \n") ;
  1021. X        return ;
  1022. X    }
  1023. X}
  1024. X
  1025. X/* Gleep reproduction routine */
  1026. Xif (sw_glp_st == TRUE) {
  1027. X    if (++cnt_down > 5) {
  1028. X        cnt_down = 0 ;
  1029. X        for (i = 0; i <= 9; i++) {
  1030. X            if (room[gleep_spot[i]][M_gleep] == 0) continue;
  1031. X            if (room[gleep_spot[i]][M_gleep] > 10000) 
  1032. X                ++room[gleep_spot[i]][M_gleep] ;
  1033. X            else room[gleep_spot[i]][M_gleep] <<= 1 ;
  1034. X        }
  1035. X    }
  1036. X}
  1037. X} /* --- end of "gleeper" subroutine --- */
  1038. X
  1039. Xvoid clip_in(ammo_flag)
  1040. X/********************************************/
  1041. X/*                                          */
  1042. X/*            Clip_In Subroutine            */
  1043. X/*                                          */
  1044. X/*     Software by Gary A. Allen, Jr.       */
  1045. X/*           Version: Mk 2.00               */
  1046. X/* (c) Copyright 1990 by Gary A. Allen, Jr. */
  1047. X/*                                          */
  1048. X/********************************************/
  1049. X
  1050. Xint ammo_flag ;
  1051. X{
  1052. X/* ammo clip insertion routine */
  1053. Xif (object[O_rifle][J_loc] != B_have) {
  1054. Xprintf("Galah!!  You don't have a rifle to put an ammo clip into.\n");
  1055. X    return ;
  1056. X}
  1057. Xif (clip_flag != F_no_clip) {
  1058. Xprintf("There is already an ammo clip in the rifle. \n") ;
  1059. X    return ;
  1060. X}
  1061. Xif (((object[O_clip][J_loc] != B_have)&&(ammo_flag == F_normal_clip))||
  1062. X((object[O_org_clip][J_loc] != B_have)&&(ammo_flag == F_org_clip))) {
  1063. Xprintf("You don't possess an ammo clip to put into the rifle.\n");
  1064. X    return ;
  1065. X}
  1066. X/* actually load the clip into the rifle */
  1067. Xobject[O_rifle][J_type] = Z_alias ;
  1068. Xcarry_count-- ;
  1069. Xcarry_weight -= object[O_clip][J_weight]  ;
  1070. Xif (ammo_flag == F_normal_clip) {
  1071. X    object[O_clip][J_loc] = B_unmade ;
  1072. X    clip_flag = F_normal_clip ;
  1073. X    object[O_rifle][J_property]  = object[O_clip][J_property] ;
  1074. X}
  1075. Xelse {
  1076. X    object[O_org_clip][J_loc] = B_unmade ;
  1077. X    clip_flag = F_org_clip ;
  1078. X    object[O_rifle][J_property] = object[O_org_clip][J_property] ;
  1079. X}
  1080. Xprintf("The ammunition clip slides into the rifle with a \"click\".\n");
  1081. Xprintf("You have %d bullets in the clip \n",
  1082. X            object[O_rifle][J_property]) ;
  1083. Xif (object[O_rifle][J_property] > 0) 
  1084. X    printf("You cycle the M16's bolt once to chamber a round.\n");
  1085. Xreturn ;
  1086. X} /* --- end of the "clip_in" subroutine --- */
  1087. X
  1088. Xvoid clip_out(n)
  1089. X/********************************************/
  1090. X/*                                          */
  1091. X/*           Clip_Out Subroutine            */
  1092. X/*                                          */
  1093. X/*     Software by Gary A. Allen, Jr.       */
  1094. X/*           Version: Mk 1.00               */
  1095. X/* (c) Copyright 1989 by Gary A. Allen, Jr. */
  1096. X/*                                          */
  1097. X/********************************************/
  1098. Xint n ;
  1099. X{
  1100. Xint ammo_flag ; 
  1101. X
  1102. X/* remove clip from rifle */
  1103. Xif (object[O_rifle][J_loc] != B_have) {
  1104. X    printf("You Bloody Galah!  ") ;
  1105. X    printf("You don't have a rifle in your possession!\n");
  1106. Xreturn ;
  1107. X}
  1108. Xif (clip_flag == F_no_clip) {
  1109. X    printf("There is no clip in the rifle. \n") ;
  1110. Xreturn ;
  1111. X}
  1112. X/* eject the clip from the rifle */
  1113. Xobject[O_rifle][J_type] = Z_normal ;
  1114. Xif (clip_flag == F_normal_clip) {
  1115. X    object[O_clip][J_loc] = n ;
  1116. X    ammo_flag = F_normal_clip ;
  1117. X}
  1118. Xelse {
  1119. X    object[O_org_clip][J_loc] = n ;
  1120. X    ammo_flag = F_org_clip ;
  1121. X}
  1122. X++room[n][M_obj_cnt] ;
  1123. Xclip_flag = F_no_clip ;
  1124. Xprintf("You press the \"eject\" button on the rifle and the ") ;
  1125. Xprintf("magazine falls to the ground.\n") ;
  1126. Xif (object[O_rifle][J_property] > 0) {
  1127. Xprintf("You then cycle the M16's bolt once to clear the chamber. ");
  1128. Xprintf("The unfired round\n") ;
  1129. Xprintf("is ejected from the breech and rolls out of sight. \n") ;
  1130. X    if (ammo_flag == F_normal_clip) 
  1131. X        object[O_clip][J_property] = 
  1132. X            --object[O_rifle][J_property] ;
  1133. X        else object[O_org_clip][J_property] = 
  1134. X                --object[O_rifle][J_property] ;
  1135. X    object[O_rifle][J_property] = 0 ;
  1136. X}
  1137. Xreturn ;
  1138. X} /* --- end of the "clip_out" subroutine --- */
  1139. X
  1140. Xvoid igniter(n)
  1141. X/********************************************/
  1142. X/*                                          */
  1143. X/*           Igniter Subroutine             */
  1144. X/*                                          */
  1145. X/*     Software by Gary A. Allen, Jr.       */
  1146. X/*           Version: Mk 1.00               */
  1147. X/* (c) Copyright 1989 by Gary A. Allen, Jr. */
  1148. X/*                                          */
  1149. X/********************************************/
  1150. X
  1151. Xint n ;
  1152. X{
  1153. X#if (PROTOTYPE)
  1154. Xvoid switcher(int) ;
  1155. Xlong time(int) ;
  1156. X#endif
  1157. X
  1158. X/* reject single verb command */
  1159. Xif (tag[V_VERB_ONLY]) {
  1160. X    printf("What exactly do you want me to set alight?\n") ;
  1161. X    return ;
  1162. X}
  1163. X
  1164. X/* deal with 'light torch' command */
  1165. Xif (tag[V_torch]) {
  1166. X    switcher(n) ;
  1167. X    return ;
  1168. X}
  1169. X
  1170. X/* see if the player has or requested matches */
  1171. Xif (!tag[V_match]) {
  1172. Xprintf("What am I to light it with?\n") ;
  1173. Xprintf("(I am not prepared to rub two sticks together.)\n") ;
  1174. X    return ;
  1175. X}
  1176. Xif (object[O_matches][J_loc] != B_have) {
  1177. Xprintf("I have no matches!\n") ;
  1178. X    return ;
  1179. X}
  1180. Xelse {
  1181. X/* reject spurious "ignite" command */
  1182. X    if ((!tag[V_cap])&&(!tag[V_dynamite])&&
  1183. X        (sent[2] != V_LINE_END)) {
  1184. Xprintf("It would be a fire hazard to set that alight.\n");
  1185. X        return ;
  1186. X    }
  1187. X
  1188. X/* deal with spurious "light dynamite with match" */
  1189. Xif (tag[V_dynamite]&&(object[O_dynamite][J_loc] != B_have)) {
  1190. Xprintf("You have no dynamite to ignite.\n") ;
  1191. X    return ;
  1192. X}
  1193. X
  1194. X/* deal with spurious "light cap with match" */
  1195. Xif (tag[V_cap]&&(object[O_dynamite][J_loc] != B_have)&& 
  1196. X    (object[O_cap][J_loc] != B_have)) {
  1197. Xprintf("You don't have one to ignite.\n") ;
  1198. X    return ;
  1199. X}
  1200. X
  1201. X/* light up the match(es) */
  1202. X    if (tag[V_PLURAL]) {
  1203. Xprintf("You open up the match box and strike ALL of the matches.\n");
  1204. X        object[O_matches][J_loc] = B_destroyed ;
  1205. X    }
  1206. X    else {
  1207. Xprintf("You take one match from the match box and ignite it.\n") ;
  1208. X    }
  1209. X}
  1210. X
  1211. X/* see if player selected burnable objects */
  1212. Xif (tag[V_cap]&&(object[O_cap][J_loc] == B_have)) {
  1213. Xprintf("You then ignite the fuse of the blasting cap.\n\n"); 
  1214. Xprintf("Ssssssssssssssssssssssss........\n");
  1215. X    clock_explode = time(0) + 11 ;
  1216. X    sw_clock = TRUE ;
  1217. X    flag_clock = V_cap ;
  1218. X    return ;
  1219. X}
  1220. X
  1221. Xif ((tag[V_cap]||tag[V_dynamite])&&
  1222. X    (object[O_dynamite][J_loc] == B_have)) {
  1223. X    if (object[O_dynamite][J_type] == Z_alias) {
  1224. Xprintf("You then ignite the fuse of the dynamite's blasting cap....\n");
  1225. Xprintf("You need to very quickly get very far away from this thing!!");
  1226. Xprintf("\n\nSsssssssssssssssssssssss........\n");
  1227. X        clock_explode = time(0) + 11 ;
  1228. X        sw_clock = TRUE ;
  1229. X        flag_clock = V_dynamite ;
  1230. X         return ;
  1231. X    }
  1232. X    else {
  1233. Xprintf("You then ignite the dynamite. Which is an odd thing\n"); 
  1234. Xprintf("to do since it doesn't have a blasting cap in it.  The\n");
  1235. Xprintf
  1236. X  ("\"dynamite\" (which is actually a very safe mining explosive)\n");
  1237. Xprintf("burns for a few minutes, billowing out smelly black smoke\n");
  1238. Xprintf("and eventually goes out leaving a few scant ashes behind.\n") ;
  1239. X        object[O_dynamite][J_loc] = B_destroyed ;
  1240. X         return ;
  1241. X    }
  1242. X}
  1243. X
  1244. X} /* -- end of the "igniter" subroutine --- */
  1245. X
  1246. Xvoid hold_it()
  1247. X/********************************************/
  1248. X/*                                          */
  1249. X/*            Wait Subroutine               */
  1250. X/*                                          */
  1251. X/*     Software by Gary A. Allen, Jr.       */
  1252. X/*           Version: Mk 1.00               */
  1253. X/* (c) Copyright 1989 by Gary A. Allen, Jr. */
  1254. X/*                                          */
  1255. X/********************************************/
  1256. X
  1257. X{
  1258. X#if (PROTOTYPE)
  1259. Xchar getch(void) ;
  1260. X#endif
  1261. X
  1262. X#ifdef __TURBOC__
  1263. X/* Stop scrolling the screen until the user is ready */
  1264. Xprintf("               [Press any key to continue]\r") ;
  1265. Xgetch() ;
  1266. Xprintf("                                          \n") ;
  1267. X#endif
  1268. X
  1269. X#ifndef __TURBOC__
  1270. Xprintf("               [Press RETURN to continue]\n") ;
  1271. Xgetchar() ;
  1272. X#endif
  1273. X
  1274. X} /* --- end of the "hold_it" subroutine --- */
  1275. X
  1276. Xvoid eater()
  1277. X/********************************************/
  1278. X/*                                          */
  1279. X/*            Eater Subroutine              */
  1280. X/*                                          */
  1281. X/*     Software by Gary A. Allen, Jr.       */
  1282. X/*           Version: Mk 1.00               */
  1283. X/* (c) Copyright 1989 by Gary A. Allen, Jr. */
  1284. X/*                                          */
  1285. X/********************************************/
  1286. X{
  1287. X
  1288. X#if (PROTOTYPE)
  1289. Xvoid ender(int) ;
  1290. X#endif
  1291. X
  1292. X/* reject single verb command */
  1293. Xif (tag[V_VERB_ONLY]) {
  1294. X    printf("What exactly do you want me to swallow?\n") ;
  1295. X    return ;
  1296. X}
  1297. X
  1298. X/* deal with "eat (atropine) pill(s)" command */
  1299. Xif (tag[V_pill]) {
  1300. X    if (object[O_pills][J_loc] != B_have) {
  1301. Xprintf("You don't have the atropine pills in your possesion!\n") ;
  1302. X        return ;
  1303. X    }
  1304. X    if (tag[V_PLURAL]) {
  1305. Xprintf("You remove ALL of the pills from the packet and swallow\n");
  1306. Xprintf("the lot.  For a couple of minutes nothing happens, then you\n");
  1307. Xprintf("start seeing double and have nervous twitches. You then\n");
  1308. Xprintf("start shaking violently and collapse to the ground.\n") ;
  1309. Xprintf("Eventually you pass out and expire from atropine poisoning.\n");
  1310. X        ender(F_died) ;
  1311. X    }
  1312. X    if (--pill_count <= 0 ) {
  1313. X        object[O_pills][J_loc] = B_destroyed ;
  1314. X        carry_count-- ;
  1315. X        carry_weight -= object[O_pills][J_weight]  ;
  1316. Xprintf("You swallow the last atropine pill and throw away the empty\n");
  1317. Xprintf("packet which disappears from sight.  ") ;
  1318. X    }
  1319. Xelse printf("You swallow one atropine pill.  ") ;
  1320. X        i_poison += 10 ;
  1321. X        if (i_poison >= 30) {
  1322. Xprintf("\nAfter a moment you have a violent seizure and die.\n") ;
  1323. X            ender(F_died) ;
  1324. X        }
  1325. X        if (i_poison >= 20) {
  1326. Xprintf("\nYou begin to shake violently and can barely stand.\n") ;
  1327. X            return ;
  1328. X        }
  1329. X        if (i_poison >= 15) {
  1330. Xprintf("\nYour hands become a bit jittery and your vision blurred.\n") ;
  1331. X            return ;
  1332. X        }
  1333. X        printf("The drug has no ill effect.\n") ;
  1334. X    return ;
  1335. X}
  1336. Xelse 
  1337. Xprintf("I am not inclined towards putting that into my mouth!\n") ;
  1338. X
  1339. X} /* --- end of the "eater" subroutine --- */
  1340. X
  1341. Xvoid ender(i_quit)
  1342. X/********************************************/
  1343. X/*                                          */
  1344. X/*            Ender Subroutine              */
  1345. X/*                                          */
  1346. X/*     Software by Gary A. Allen, Jr.       */
  1347. X/*           Version: Mk 1.00               */
  1348. X/* (c) Copyright 1989 by Gary A. Allen, Jr. */
  1349. X/*                                          */
  1350. X/********************************************/
  1351. Xint i_quit ;
  1352. X{
  1353. X#if (PROTOTYPE)
  1354. Xvoid hold_it(void), new_score(void), exit(int) ;
  1355. X#endif
  1356. X
  1357. X/* get last score */
  1358. Xnew_score() ;
  1359. X
  1360. Xif (gleep_score != 0) sw_active = TRUE ; 
  1361. X
  1362. Xif (i_quit == F_died) { 
  1363. X    hold_it() ;
  1364. X    score -= 100 ;
  1365. Xprintf ("\nOh Dear!  You've just turned yourself into a corpse! \n\n");
  1366. Xprintf ("For getting killed you lose 100 points. \n\n") ;
  1367. X}
  1368. X
  1369. X/* Scoring Block */
  1370. Xfor(;;) {
  1371. Xif (!sw_active) {
  1372. X    if (score == 0) { 
  1373. X        printf("You concluded the game with no points.  ") ; 
  1374. X        printf("What a pitiful performance!!\n") ;
  1375. X    }
  1376. X    else {
  1377. Xprintf("You concluded the game with a miserable negative score\n") ;
  1378. Xprintf("of %d points.  Your score was better BEFORE you \n",score);
  1379. Xprintf("started playing (need I say more on how this reflects\n");
  1380. Xprintf("upon your limited aptitude at Dinkum).\n") ;
  1381. X    }
  1382. X    break ;  /* drop out of the scoring block */
  1383. X}
  1384. X
  1385. Xif (score == 0)  {
  1386. Xprintf("You concluded the game with no points ") ;
  1387. X    if (gleep_score == 0) { 
  1388. Xprintf("and didn't drop a single gleep\n") ;
  1389. Xprintf("into the gleep tank. The word \"embarrassing\" sums it up!\n") ;
  1390. X    }
  1391. X    else {
  1392. X        if (gleep_score > 1) {
  1393. Xprintf("but you did put %d gleeps\n",gleep_score) ;
  1394. Xprintf("into the gleep tank.\n") ;
  1395. X        }
  1396. X        else {
  1397. Xprintf("but you did manage to find a gleep\n") ;
  1398. Xprintf("and put it in the gleep tank, (Hah!! What an achievement!).\n");
  1399. X        }
  1400. X    }
  1401. X}
  1402. X
  1403. Xelse {
  1404. Xif (score > 0)
  1405. Xprintf ("You concluded the game with %d points",score);
  1406. Xelse {
  1407. Xprintf("You concluded the game with a miserable negative score\n") ;
  1408. Xprintf("of %d points.  Your score was better BEFORE you \n",score);
  1409. Xprintf("started playing (need I say more on how this reflects\n");
  1410. Xprintf("upon your limited aptitude at Dinkum).  You ") ;
  1411. X    if (gleep_score == 0) { 
  1412. Xprintf("also failed to\nget any gleeps into the tank.  At least ");
  1413. Xprintf("you're consistent.\n\n") ;
  1414. X    }
  1415. X    else {
  1416. Xprintf("managed\nto get something into the gleep tank.  However ");
  1417. Xprintf("it hardly\nmatters, considering your poor score.\n\n") ;
  1418. X    }
  1419. X    break ;  /* drop out of the scoring block */
  1420. X}
  1421. X    if (gleep_score == 0) 
  1422. Xprintf(".\nHowever you placed no gleeps in the gleep tank.\n") ;
  1423. X    else {
  1424. X        if (gleep_score > 1) {
  1425. Xprintf (" and placed %d gleeps\n",gleep_score) ;
  1426. Xprintf ("in the gleep tank.  Good on you, Mate!\n") ;
  1427. X        }
  1428. X        else {
  1429. Xprintf(" but you did manage to find a gleep\n") ;
  1430. Xprintf("and put it in the gleep tank.\n") ;
  1431. X        }
  1432. X    }
  1433. X}
  1434. Xbreak ;  /* drop out of the scoring block */
  1435. X} /* end of the scoring block */
  1436. X
  1437. X/* Closing Remark */
  1438. Xprintf("\nDinkum has ended.  If you are interested in more ") ;
  1439. Xprintf("information\nabout this program type:    dinkum -h\n") ;
  1440. Xexit(0);
  1441. X
  1442. X} /* --- end of "ender" routine --- */
  1443. END_OF_FILE
  1444. if test 26609 -ne `wc -c <'opener.c'`; then
  1445.     echo shar: \"'opener.c'\" unpacked with wrong size!
  1446. fi
  1447. # end of 'opener.c'
  1448. fi
  1449. echo shar: End of archive 5 \(of 7\).
  1450. cp /dev/null ark5isdone
  1451. MISSING=""
  1452. for I in 1 2 3 4 5 6 7 ; do
  1453.     if test ! -f ark${I}isdone ; then
  1454.     MISSING="${MISSING} ${I}"
  1455.     fi
  1456. done
  1457. if test "${MISSING}" = "" ; then
  1458.     echo You have unpacked all 7 archives.
  1459.     rm -f ark[1-9]isdone
  1460. else
  1461.     echo You still need to unpack the following archives:
  1462.     echo "        " ${MISSING}
  1463. fi
  1464. ##  End of shell archive.
  1465. exit 0
  1466.