home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / games / volume15 / dinkum / part02 < prev    next >
Encoding:
Internet Message Format  |  1993-01-26  |  52.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: v15i022:  dinkum - australian text adventure game, Part02/06
  5. Message-ID: <3980@master.CNA.TEK.COM>
  6. Date: 29 Nov 92 20:30:50 GMT
  7. Sender: news@master.CNA.TEK.COM
  8. Lines: 1383
  9. Approved: billr@saab.CNA.TEK.COM
  10. Xref: uunet comp.sources.games:1521
  11.  
  12. Submitted-by: Gary Allen <gary@sun.mech.uq.oz.au>
  13. Posting-number: Volume 15, Issue 22
  14. Archive-name: dinkum/Part02
  15. Environment: Unix, DOS
  16.  
  17.  
  18.  
  19. #! /bin/sh
  20. # This is a shell archive.  Remove anything before this line, then unpack
  21. # it by saving it into a file and typing "sh file".  To overwrite existing
  22. # files, type "sh file -c".  You can also feed this as standard input via
  23. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  24. # will see the following message at the end:
  25. #        "End of archive 2 (of 6)."
  26. # Contents:  longdsc.c makefile objlook.c
  27. # Wrapped by billr@saab on Sun Nov 29 12:25:48 1992
  28. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  29. if test -f 'longdsc.c' -a "${1}" != "-c" ; then 
  30.   echo shar: Will not clobber existing file \"'longdsc.c'\"
  31. else
  32. echo shar: Extracting \"'longdsc.c'\" \(33573 characters\)
  33. sed "s/^X//" >'longdsc.c' <<'END_OF_FILE'
  34. X#define LONG_DESCP
  35. X#include "dink_sym.h"
  36. X#include "dink_glb.h"
  37. X
  38. Xvoid long_descp(n)
  39. X/* long description routine */
  40. Xint n ;
  41. X{
  42. X#ifdef __TURBOC__
  43. Xvoid boom(void), describe(int), ender(int) ;
  44. X#endif
  45. X
  46. Xif (((object[O_torch][J_loc] == B_have)&&object[O_torch][J_property])|| 
  47. X    (n < 186)||(n > 202)) { 
  48. X
  49. X/* See if player entered the killing passage in the end game */
  50. Xif ((n >= 218)&&(n <= 227)) {
  51. Xprintf("As you're walking down the passage you feel the slight\n") ;
  52. Xprintf("tug of a trip wire on your leg.  Out the corner of your\n");
  53. Xprintf("eye you see the trip wire is connected to an olive green\n") ;
  54. Xprintf("cylinder attached to the wall of the tunnel....\n\n") ;
  55. Xboom() ;
  56. Xprintf("\nIn case you're wondering that was a booby trap which you\n") ;
  57. Xprintf("set off!\n") ;
  58. Xender(F_died) ;
  59. X}
  60. X
  61. X/* Select individual rooms */
  62. Xswitch (n) {
  63. Xcase R_river:      /* drowing in the river description */
  64. Xprintf ("As you approach the edge of the dike, there is a small\n");
  65. Xprintf ("earth slide which pitches you into the river.  You\n");
  66. Xprintf ("flounder around in the water for a short while.  Luckily\n");
  67. Xprintf ("before you have the chance to drown, a crocodile pulls\n") ;
  68. Xprintf ("you under, bringing you to a rather quick though painful\n");
  69. Xprintf ("end. \n") ;
  70. Xreturn ;
  71. X
  72. Xcase R_bunyip:      /* getting eaten by the bunyip */
  73. Xprintf ("The slimey tentacle suddenly tightens around your leg, and\n");
  74. Xprintf ("the water in the billabong starts to churn furiously. Then\n");
  75. Xprintf ("surfaces the one thing that all Australians fear the most...");
  76. Xprintf ("\n\nBefore you stands an enormous sickly green Queensland\n") ;
  77. Xprintf ("Bunyip in all its awesome horror. It does not make a quick\n");
  78. Xprintf ("end of you....  Such is not the way of Bunyips.  First it \n");
  79. Xprintf ("peels off your skin as if you where a banana.  After much\n");
  80. Xprintf ("fearful agony, comes release as you pass into death.\n");
  81. Xreturn ;
  82. X
  83. Xcase R_taipan:      /* getting bitten by a taipan */
  84. Xprintf ("As you wander aimlessly in the grass, you accidently step\n");
  85. Xprintf ("upon a taipan which is perhaps the most poisonous of Oz's \n");
  86. Xprintf ("snakes. The snake strikes upwards and bites you in the\n");
  87. Xprintf ("worst possible place.  You thrash around for a short while\n");
  88. Xprintf ("and then the venom takes hold. Your body begins to decompose");
  89. Xprintf ("\nbefore your very eyes.  Death comes only after an hour \n");
  90. Xprintf ("of the worst possible agony.  \n");
  91. Xreturn ;
  92. X
  93. Xcase R_mine_head:  /* Front of ACME Mine */
  94. Xroom[n][M_rm_type] = T_was_long;   /* turn off long description  */
  95. Xprintf ("East of you is a large iron open truss tower, topped with \n");
  96. Xprintf ("two rusting wheels holding a pair of thick steel cables.  \n");
  97. Xprintf ("This is the head gear of the once highly successful ACME \n"); 
  98. Xprintf ("Gold Mine, which now is completely mined out.  Where \n");
  99. Xprintf ("there were once rich veins of gold is now a honeycomb of \n");
  100. Xprintf ("tunnels and caverns.  There are stories about strange \n");
  101. Xprintf ("events in the old tunnels of the ACME mine and only fools \n");
  102. Xprintf ("or reckless adventurers would dare explore them. \n");
  103. Xprintf ("To the north is the old office building.  Rumor has it \n");
  104. Xprintf ("the safe in this building once had millions of dollars in \n");
  105. Xprintf ("gold  processed from the rich ore of the ACME mine.  To \n");
  106. Xprintf ("the south is the mine lift, which once transported up to \n");
  107. Xprintf ("twenty miners at a time down the long mine shaft to the \n");
  108. Xprintf ("working tunnels deep under the earth below \n");
  109. Xreturn ;
  110. X
  111. Xcase R_office_mang:  /* Manager's office */
  112. Xroom[n][M_rm_type] = T_action_obj ;
  113. Xprintf("You are in the Manager's office of the ACME Mine.  In \n");
  114. Xprintf("former times this room saw many lively meetings between \n"); 
  115. Xprintf("the Site Manager and Shift Bosses.  Fixed to the wall are\n");
  116. Xprintf("old production schedules and organizational charts. In\n");
  117. Xprintf("the middle of the room is a beautiful silky oak desk.\n");
  118. Xprintf("Unfortunately it is too heavy to move.  Attached to\n"); 
  119. Xprintf("the far wall is a curious picture of a platypus wearing a \n");
  120. Xprintf("hat with old wine corks dangling from the hat's brim. The\n");
  121. Xprintf("only exit is to the south.\n\n") ;
  122. Xreturn ;
  123. X
  124. Xcase R_geo_w:  /* Geologist's office */
  125. Xroom[n][M_rm_type] = T_unmovable_obj ;
  126. Xprintf("As you entered this room, huge cockroaches scuttled off ");
  127. Xprintf("in every \n"); 
  128. Xprintf("direction. On the far wall is a rather tasteless poster ");
  129. Xprintf("depicting \n");
  130. Xprintf("an extremely well endowed (unclad) young woman holding a ");
  131. Xprintf("mining \n"); 
  132. Xprintf("drill.  This office was once occupied by the mine ");
  133. Xprintf("geologist.  One \n");
  134. Xprintf("can still see traces of the office's former occupant.  ");
  135. Xprintf("There are only \n");
  136. Xprintf("two doors to this room.  Both go to the north. You entered ");
  137. Xprintf("through \n");
  138. Xprintf("the west door.  However there is another door in ");
  139. Xprintf("the eastern section \nof the office. \n");
  140. Xreturn ;
  141. X/* lift compartment */
  142. Xcase R_lift_inside:
  143. Xroom[n][M_rm_type] = T_action_obj ;
  144. Xprintf("You are inside the lift, which has only one ");   
  145. Xprintf("entrance doorway to the west. \n");
  146. Xprintf("To the left of the door is a panel of buttons.  Most of "); 
  147. Xprintf("the buttons are \ninoperative with tape over them.  However ");
  148. Xprintf("there are four buttons \nthat still work. Each of the four ");
  149. Xprintf("buttons have a number stamped on them.  \nThe numbers are ");
  150. Xprintf("zero, forty-nine, sixty-seven, and eighty-two. \n \n");
  151. Xreturn ;
  152. Xcase R_hideout_entr:  /* Ned Kelly's Hide Out */
  153. Xroom[n][M_rm_type] = T_was_long;   /* turn off long description  */
  154. X
  155. Xif (monster_flag == F_no_monster) {
  156. Xprintf ("Before you is a Queensland house with large verandas. ") ;
  157. Xprintf ("The front of\nthe house is to the east. The house ") ;
  158. Xprintf ("is painted fluorescent orange.\nOn the roof of the house is ");
  159. Xprintf ("a large, bright flashing neon sign which reads: \n\n");
  160. Xprintf("___________________________________________________________\n");
  161. Xprintf("|                                                         |\n");
  162. Xprintf("|            Ned Kelly's ---SECRET--- Hide Out            |\n");
  163. Xprintf("| Policemen, troopers, law enforcement officers and all   |\n");
  164. Xprintf("| other minions of the law and public decency are advised |\n");
  165. Xprintf("| to look else where for bush rangers, thieves, and other |\n");
  166. Xprintf("| larrikins, since ***only*** honest, law abiding         |\n");
  167. Xprintf("| Australians (loyal to Queen and Country) live here.     |\n");
  168. Xprintf("|                                                         |\n");
  169. Xprintf("___________________________________________________________\n");
  170. X}
  171. Xelse describe(n) ;
  172. Xreturn ;
  173. X
  174. Xcase R_foreman:
  175. Xroom[n][M_rm_type] = T_was_long;   /* turn off long description  */
  176. Xprintf("You have entered the office of the Level #67 Foreman. In ");
  177. Xprintf("the middle of the\nroom is the Foreman's large and immovable ");
  178. Xprintf("desk.  To one side can be seen an\nempty file cabinet and ");
  179. Xprintf("a series of pidgeon holes for holding mine worker's\nmail. ");
  180. Xprintf("The only exit is to the west.\n\n") ;
  181. Xreturn ;
  182. X
  183. Xcase R_no_treasure:
  184. Xroom[n][M_rm_type] = T_was_long;   /* turn off long description  */
  185. Xprintf("You are in a tunnel going east and west. Crude letters have\n");
  186. Xprintf("been scratched into the wall of the tunnel.  The following\n") ;
  187. Xprintf("was written:\n\n") ;
  188. Xprintf("Dear Treasure Hunter:\n") ;
  189. Xprintf("There was lots of treasure on this level when I first\n") ;
  190. Xprintf("discovered this mine.  However I have since carted it all\n") ;
  191. Xprintf("away.  You might try looking on another level.") ;
  192. Xprintf("\n\n                            Good Luck!\n") ;
  193. Xprintf("                         Dr. I. Jones, Ph.D.\n\n") ;
  194. Xreturn ;
  195. X
  196. Xcase R_gleep_tank:
  197. Xroom[n][M_rm_type] = T_was_long;   /* turn off long description  */
  198. Xprintf("You have walked into a room with a large plastic tank set "); 
  199. Xprintf("in the middle.\nThe tank is about two meters deep and ");
  200. Xprintf("full of dark blue liquid which\nsmells strongly of chlorine.");
  201. Xprintf(" The words \"Gleep Tank\" have been crudely\n");
  202. Xprintf("spray painted on the wall.\n") ;
  203. Xreturn ;
  204. Xcase R_ufo_e:
  205. Xroom[n][M_rm_type] = T_was_long;   /* turn off long description  */
  206. Xprintf("You crawl under a long thin sting that projects from the ");
  207. Xprintf("front of the\nspacecraft.  It's made from a different metal ");
  208. Xprintf("(stainless steel?), and appears\nto have been retractable. ");
  209. Xprintf("This was probably a Mach probe for measuring flight\n") ;
  210. Xprintf("speed. You can go north or south.\n") ;
  211. Xreturn ;
  212. Xcase R_ufo_w:
  213. Xroom[n][M_rm_type] = T_was_long;   /* turn off long description  */
  214. Xprintf("Before you is perhaps the real reason why the ACME Mine ");
  215. Xprintf("was closed. You see\nthe bent and twisted remains of what ");
  216. Xprintf("could only be an ancient spacecraft. It\nsits ") ;
  217. Xprintf("embedded within a gold bearing");
  218. Xprintf(" reef of conglomerate stone from the\nPrecambrain Period ");
  219. Xprintf("(hundreds of millions of years old).  The old spacecraft\n") ;
  220. Xprintf("was based on a delta wing design which the miners had ");
  221. Xprintf("chiped free from\nthe rock. You can see clearly the interior ");
  222. Xprintf("of the engine exhaust ducts.  The\nvehicle has air inlets ");
  223. Xprintf("so it must have been air breathing when it flew in\nthe ");
  224. Xprintf("atmosphere. ") ;
  225. Xprintf("The edges of the ducts appear to be made of titanium ");
  226. Xprintf("and are\nabout six centimeters thick. No wonder it could ");
  227. Xprintf("survive millions of years\nunder tons of stone. ") ;
  228. Xprintf("This spacecraft is literally built like a battleship!\nYou ") ;
  229. Xprintf("can climb over the vehicle to the north or go south.\n\n");
  230. Xreturn ;
  231. Xcase R_ufo_n:
  232. Xroom[n][M_rm_type] = T_was_long;   /* turn off long description  */
  233. Xprintf("You're now doing a tight squeeze between the tunnel wall ");
  234. Xprintf("and the leading\nedge of the wing.  You can see the titanium");
  235. Xprintf(" surface is covered with many\nregularly placed little ");
  236. Xprintf("holes, each about half a millimeter in diameter.\nThis ");
  237. Xprintf("was probably part of the wing's cooling system for ") ;
  238. Xprintf("atmospheric entry\nfrom orbit. You can go south-east or ");
  239. Xprintf("south-west.\n\n");
  240. Xreturn ;
  241. Xcase R_ufo_s:
  242. Xroom[n][M_rm_type] = T_was_long;   /* turn off long description  */
  243. Xprintf("You're crawling under the wing and next to the spacecraft's ");
  244. Xprintf("landing gear.\nThe landing gear strut is almost snapped ");
  245. Xprintf("off.  The tyre has long ago turned\nto dust, but the tyre ");
  246. Xprintf("rim is still in place.  The braking system used is\nquite ");
  247. Xprintf("odd.  The brake rotor is basicly a ring being gripped by ");
  248. Xprintf("a caliper with\nconcave brake pads.  You ") ;
  249. Xprintf("can go north-west or north-east.\n") ;
  250. Xreturn ;
  251. Xcase R_ufo_ne:
  252. Xroom[n][M_rm_type] = T_was_long;   /* turn off long description  */
  253. Xprintf("You are now near the nose of the derelict spacecraft.  You ");
  254. Xprintf("see a quartz\nwindow in the side of the vehicle.  It has been");
  255. Xprintf(" so scratched by the\ncenturies that it is now opaque.  ");
  256. Xprintf("You can go north-west or south.\n") ;
  257. Xreturn ;
  258. Xcase R_ufo_nw:
  259. Xroom[n][M_rm_type] = T_was_long;   /* turn off long description  */
  260. Xprintf("As you scrambled over the old derelict, you passed under ");
  261. Xprintf("the vertical\nstabilizer which centuries of geological ") ;
  262. Xprintf("forces had bent into what\nlooks like a sagging shark's ");
  263. Xprintf("fin. You can go south or do a tight squeeze\nto the ");
  264. Xprintf("north-east.\n\n");
  265. Xreturn ;
  266. Xcase R_ufo_se:
  267. Xroom[n][M_rm_type] = T_was_long;   /* turn off long description  */
  268. Xprintf("You are under the forward section of the spacecraft. ");
  269. Xprintf("Above you is an\nopened access hatch which leads into the ");
  270. Xprintf("dark interior of the derelict.\n");
  271. Xprintf("You can go north, up or crawl under the wing to the ");
  272. Xprintf("south-west\n") ;
  273. Xreturn ;
  274. Xcase R_ufo_sw:
  275. Xroom[n][M_rm_type] = T_was_long;   /* turn off long description  */
  276. Xprintf("You are hunching over as you scramble underneath the ");
  277. Xprintf("spacecraft's wing.\nNear the trailing edge of the wing ");
  278. Xprintf("you can see what is left of the\nwing flaps.  The flap ");
  279. Xprintf("was actuated by a very conventional hydraulic system.\n");
  280. Xprintf("Some of the metal tubing for the actuaters are still in ");
  281. Xprintf("place, though\nthe hydraulic fluid has long since ") ;
  282. Xprintf("fossilized into stone. You can\ngo north or south-east.\n") ;
  283. Xreturn ;
  284. Xcase R_air_lock:
  285. Xroom[n][M_rm_type] = T_was_long;   /* turn off long description  */
  286. Xprintf("You are inside what is obviously an airlock.  There are ");
  287. Xprintf("two hatchways\ninto this airlock.  One leads to the exterior ");
  288. Xprintf("while the other goes into\nthe spacecraft's interior.  Both ");
  289. Xprintf("hatches appear to have originally been\nleft open and not ");
  290. Xprintf("forced by the miners (the hinges are immovable). ");
  291. Xprintf("It\nappears that the ship's crew left in a hurry. ") ;
  292. Xprintf("You can go north or down.\n") ;
  293. Xreturn ;
  294. X
  295. Xcase R_ship_passage:
  296. Xroom[n][M_rm_type] = T_was_long;   /* turn off long description  */
  297. Xprintf("You've entered the intercompartment access passage.  To the ") ;
  298. Xprintf("south is an\nopen air tight door leading to the airlock. ");
  299. Xprintf("The access door to the east\nis open and recessed into the ");
  300. Xprintf("wall. The access door to the west has been\nforced open ");
  301. Xprintf("with a cutting torch and folded back with a pneumatic\n") ;
  302. Xprintf("hammer (obviously the work of the miners). ") ;
  303. Xprintf("The passage itself has about\nten centimeters of silt on the") ;
  304. Xprintf(" bottom and has the appearance of ancient\ndilapidation.\n") ;
  305. Xreturn ;
  306. X
  307. Xcase R_flight_deck:
  308. Xroom[n][M_rm_type] = T_was_long;   /* turn off long description  */
  309. Xprintf("You have made it to the flight deck. Unfortunately ");
  310. Xprintf("it's not much to\nwrite home about. Since the access door ");
  311. Xprintf("was open, this area has been full\nof water and silt for ");
  312. Xprintf("millennia.  The miners have shoveled out most of it.\nOnce ");
  313. Xprintf("the wall panels were covered with some kind of plastic which");
  314. Xprintf(" has long\nsince turned to dust.  There are three corroded ");
  315. Xprintf("frames which were once crew\nseats. The beings that flew ") ;
  316. Xprintf("this machine were taller and wider than humans\nbut they ");
  317. Xprintf("had anthropoid form. The flight controls are still here");
  318. Xprintf(" but they\nare so heavily corroded that they can no longer "); 
  319. Xprintf("be moved.  The only way out\nis to the west.\n\n") ;
  320. Xreturn ;
  321. X
  322. Xcase R_panel:
  323. Xroom[n][M_rm_type] = T_was_long;   /* turn off long description  */
  324. Xprintf("You are in a compartment that seems brand new, which is ");
  325. Xprintf("unbelievable.  Perhaps\nthe machinery in this ship was once ");
  326. Xprintf("self repairing.  Before you is a control\npanel with CRT type");
  327. Xprintf(" displays and buttons that still work.  Beneath each button\n");
  328. Xprintf("is a description written in a strange alien script ");
  329. Xprintf("vaguely like Sanskrit.\nI wouldn't dare ") ;
  330. Xprintf("press any button except one glowing pale green.  Beneath\n");
  331. Xprintf("this button is some masking tape that was obviously placed ") ;
  332. Xprintf("here by the miners.\nSomeone has written \"TEHR.\" on the ") ;
  333. Xprintf("masking tape with a pencil.\n\n") ;
  334. Xreturn ;
  335. X
  336. Xcase R_transport:
  337. Xroom[n][M_rm_type] = T_was_long;   /* turn off long description  */
  338. Xprintf("You have walked into an elevated chamber with strange ") ;
  339. Xprintf("glowing hexagons on\nthe floor which are about half a ") ;
  340. Xprintf("meter across.  The hexagon pattern on the\nfloor is ");
  341. Xprintf("matched by one on the ceiling which is also glowing.\n\n") ;
  342. Xreturn ;
  343. X
  344. Xcase R_prayer:
  345. Xroom[n][M_rm_type] = T_was_long;   /* turn off long description  */
  346. Xprintf("You are in a large and very grand room with walls made of\n");
  347. Xprintf("polished mahogany, and crystal chandeliers hanging from an\n");
  348. Xprintf("ornate ceiling.  There is a mihrab incongruously set in the\n");
  349. Xprintf("western wall of the building.  Also there are quotations\n");
  350. Xprintf("from the Quram written in golden letters along the top of\n") ;
  351. Xprintf("the walls near the ceiling.  On the floor are sumptuous\n") ;
  352. Xprintf("cushions made of silk and fine green velvet. Sitting on the\n");
  353. Xprintf("cushions are old men wearing black pajamas with white\n");
  354. Xprintf("towels wrapped around their heads. In the middle of the\n");
  355. Xprintf("floor is a raised dais, upon which is sitting a rather\n");
  356. Xprintf("stately old man wearing similar clothing. In the far corner\n");
  357. Xprintf("of the room is standing a wax dummy of the Ayatolla\n") ;
  358. Xprintf("Khomeini. His right arm is upright much like the Statue of\n") ;
  359. Xprintf("Liberty and in his right hand is a glowing 100 watt light\n") ;
  360. Xprintf("bulb.  I think this is the prayer room for the Iranian\n") ;
  361. Xprintf("Parliament!  You'll have to go west if you wish to leave.\n") ;
  362. Xreturn ;
  363. Xcase R_guard:
  364. Xroom[n][M_rm_type] = T_was_long;   /* turn off long description  */
  365. Xprintf("You are in a rather small room with a table in the ");
  366. Xprintf("middle that is covered\nwith half filled cups of tea, dirty ") ;
  367. Xprintf("ash trays, and a newspaper written in\nwhat appears to be ") ;
  368. Xprintf("Arabic.  There is ") ;
  369. Xprintf("a brightly coloured poster on the\nwall depicting the Kaba ") ;
  370. Xprintf("Stone of Mecca with a calendar below it.  The only\n") ;
  371. Xprintf("exits are through an open doorway to the east and through");
  372. Xprintf(" a curtain covered\ndoorway to the south.\n\n") ;
  373. Xreturn ;
  374. Xcase R_closet:
  375. Xroom[n][M_rm_type] = T_was_long;   /* turn off long description  */
  376. Xprintf("You are in a closet full of grubby, nondescript things not\n") ;
  377. Xprintf("worth taking. The closet stinks of moth balls. The only way\n");
  378. Xprintf("out is through a curtain covered doorway to the north.\n\n");
  379. Xreturn ;
  380. Xcase R_gong:
  381. Xroom[n][M_rm_type] = T_was_long;   /* turn off long description  */
  382. Xprintf("You have entered an enormous room which is walled with\n");
  383. Xprintf("polished black granite supported by vast curving arches\n");
  384. Xprintf("much like a gothic cathedral.  The cavernous room is\n");
  385. Xprintf("octogonal in layout with huge flaming torches set in brass\n");
  386. Xprintf("holders in every corner of the room.  In the flickering\n");
  387. Xprintf("light of the torches you see an enormous silver gong\n");
  388. Xprintf("weighing at least a ton.  The huge gong is suspended from\n");
  389. Xprintf("a finely polished red cedar frame, the top of which is\n");
  390. Xprintf("about four meters above the floor.  The room is deathly\n");
  391. Xprintf("quiet like an ancient tomb. The only sound you can hear is\n");
  392. Xprintf("your own heart beating.\n") ;
  393. Xreturn ;
  394. Xcase R_warning:
  395. Xroom[n][M_rm_type] = T_was_long;   /* turn off long description  */
  396. Xprintf("You have entered a passage with exits to the north, south,\n");
  397. Xprintf("and west.  There is a poster glued to the wall which reads:\n");
  398. Xprintf("+---------------------------------------------------------+\n");
  399. Xprintf("|                                                         |\n");
  400. Xprintf("|              ACME MINE IS UNFAIR TO WORKERS!!           |\n");
  401. Xprintf("|                                                         |\n");
  402. Xprintf("|                       ON STRIKE!!                       |\n");
  403. Xprintf("|                                                         |\n");
  404. Xprintf("| The Loyal Brotherhood of Australian Miners and Under-   |\n");
  405. Xprintf("| ground Workers is on strike against Acme Mines Ltd. due |\n");
  406. Xprintf("| to unfair treatment of its workers.  Our Union demands  |\n");
  407. Xprintf("| the following:  Worker's wages be increased by 30%%, the |");
  408. Xprintf("\n") ;
  409. Xprintf("| week shall have only 4 working days, the working day    |\n");
  410. Xprintf("| shall be reduced to 5 hours, triple wages for overtime  |\n");
  411. Xprintf("| work and immunity from sacking for all Union members.   |\n");
  412. Xprintf("| To discourage scabs and other strike breakers from      |\n");
  413. Xprintf("| working during the strike, we have planted booby traps  |\n");
  414. Xprintf("| through out the tunnels on this level.  We do hope you  |\n");
  415. Xprintf("| don't mind the mine being mined so it won't be mined.   |\n");
  416. Xprintf("+---------------------------------------------------------+\n");
  417. X    return ;
  418. X    } 
  419. X}
  420. Xelse describe(n) ;
  421. X
  422. X} /* end of long_descp subroutine */
  423. Xvoid pusher(n_arg) 
  424. X/********************************************************************/
  425. X/*                                                                  */
  426. X/*                  --- The Pusher Subroutine ---                   */
  427. X/*                                                                  */
  428. X/*  Software by Gary A. Allen, Jr. 14 June 1989,    Version: Mk 1.2 */
  429. X/*           (c) Copyright 1988 by Gary A. Allen, Jr.               */
  430. X/*                                                                  */
  431. X/********************************************************************/
  432. Xint *n_arg ;
  433. X{
  434. Xregister int i ;
  435. Xint n ;
  436. X/* pass the room pointer */
  437. Xn = *n_arg ;
  438. X
  439. X/* reject an isolated "push" command */
  440. Xif (tag[V_VERB_ONLY]) {
  441. X    printf ("What exactly do you want me to push? \n");
  442. X    return; 
  443. X}
  444. X
  445. Xswitch (n) {
  446. X    /* Lift entrance at the ground level */
  447. X    case R_lift_entr:
  448. X        if (tag[V_green_button]) goto no_green ;
  449. X        if (!tag[V_button]) {
  450. X            if (!tag[V_blue_button]) {
  451. Xprintf ("I don't see why I should push that! \n");
  452. X                return ; 
  453. X            }
  454. X            else goto nothing ;
  455. X        }
  456. X        if (room[R_lift_entr][M_rm_status] == S_flashing ) {
  457. Xprintf ("You push the call button and there is a loud \"whirr\" from ");
  458. Xprintf ("an electric motor. \nThe massive steel doors slide open ");
  459. Xprintf ("revealing a huge lift that could hold \ntwenty men at once. ");
  460. Xprintf ("The way is now open for you to enter. \n");
  461. X            room[R_lift_entr][M_rm_status] = S_open ;
  462. X            room[R_lift_entr][2] = R_lift_inside ;
  463. X            break ; }
  464. X        else {
  465. Xprintf("You pushed the lift call button, but nothing happened.\n");
  466. Xprintf("I think the electrical power has been turned off at the\n") ;
  467. Xprintf("circuit breaker.\n") ;
  468. X            break ; }
  469. X    /* Lift Compartment */
  470. X    case R_lift_inside:
  471. X        if (tag[V_green_button]) goto no_green ;
  472. X    /* scan push sentence */
  473. X        /* zero level */
  474. X        if (tag[V_0]) {
  475. X        if (room[R_lift_inside][M_rm_status]== S_L0) {
  476. Xprintf ("You pushed the flashing button, but nothing happened.\n");
  477. X        break ; }
  478. Xprintf ("The steel doors slam shut and you feel heavy as the lift ");
  479. Xprintf ("accelerates \nupwards.  Finally the lift jerks to a halt ");
  480. Xprintf ("and the doors whirr open.  \nSunlight is streaming in. ");
  481. Xprintf ("Once again you are breathing the fresh air.\n");
  482. X        room[R_lift_inside][M_rm_status] = S_L0;
  483. X        room[R_lift_inside][3] = R_lift_entr;
  484. X        room[R_lift_inside][7] = R_lift_entr;
  485. X        return ;
  486. X        }
  487. X        /* forty-ninth level */
  488. X        if (tag[V_49]) {
  489. X        if (room[R_lift_inside][M_rm_status]== S_L49) {
  490. Xprintf ("You pushed the forty-nine button, but nothing happened.\n");
  491. X            return ;
  492. X        }    
  493. X        room[R_lift_inside][M_rm_status] = S_L49 ;
  494. X        room[R_lift_inside][3] = R_L49_entr;
  495. X        room[R_lift_inside][7] = R_L49_entr;
  496. Xdecp2:
  497. Xprintf ("The steel doors slam shut and you feel the vibration of ");
  498. Xprintf ("the lift \nmoving in its shaft. Finally the lift jerks ");
  499. Xprintf ("to a halt and the doors whirr open. \n");
  500. X        return ;
  501. X        }
  502. X        /* sixty-seventh level */
  503. X        if (tag[V_67]) {
  504. X        if (room[R_lift_inside][M_rm_status]== S_L67) {
  505. Xprintf ("You pushed the sixty-seven button, but nothing happened.\n");
  506. X            return ;
  507. X        }    
  508. X        room[R_lift_inside][M_rm_status] = S_L67;
  509. X        room[R_lift_inside][3] = R_L67_entr;
  510. X        room[R_lift_inside][7] = R_L67_entr;
  511. X        goto decp2 ;
  512. X        }
  513. X
  514. X        /* eighty-second level */
  515. X        if (tag[V_82]) {
  516. X        if (room[R_lift_inside][M_rm_status]== S_L82) {
  517. Xprintf ("You pushed the eighty-two button, but nothing happened.\n");
  518. X            return ;
  519. X        }    
  520. X        room[R_lift_inside][M_rm_status] = S_L82;
  521. X        room[R_lift_inside][3] = R_L82_entr;
  522. X        room[R_lift_inside][7] = R_L82_entr;
  523. Xprintf ("The steel doors slam shut and you feel a sense of ");
  524. Xprintf ("weightlessness as \nthe lift plummets down the mine shaft. ");
  525. Xprintf ("Finally the lift comes to a halt \n");
  526. Xprintf ("and the doors whirr open. \n");
  527. X        return ;
  528. X        }
  529. X        if (tag[V_blue_button]) goto nothing ;
  530. Xprintf ("This lift can go only to levels 0, 49, 67, or 82 \n");
  531. X        return ;
  532. X
  533. X    /* inside the closet at the Iranian Parliament */
  534. X    case R_closet:
  535. X        if (tag[V_green_button]) goto no_green ;
  536. X        if (tag[V_blue_button]||tag[V_button]) {
  537. X            /* Is the command for the black cube */
  538. X            if (object[O_cube][J_loc] != B_have) 
  539. X                goto no_switch ;
  540. Xprintf("There is a bright flash of light! Then suddenly you are\n");
  541. Xprintf("back in the hexagon chamber of the ancient spaceship.\n\n");
  542. X            *n_arg = R_transport ;
  543. X            return ;
  544. X        }
  545. X        else goto no_switch ;
  546. X
  547. X    /* the transporter control panel room */
  548. X    case R_panel:
  549. X        if (tag[V_button]) {
  550. Xwhich_button:
  551. Xprintf("Which button do you want me to push? \n") ;
  552. X            return;
  553. X        }
  554. X        if (tag[V_blue_button]) {
  555. X            if (object[O_cube][J_loc]==B_have) goto cubic ;
  556. X            else goto no_cube ;
  557. X        }
  558. X        if (tag[V_green_button]) {
  559. X            if (sw_transport != TRUE) {
  560. Xprintf("Lots of the \"Sanskrit\" text is flashing by on the display\n");
  561. Xprintf("panel's CRTs.  There is a whirring noise coming out of the\n");
  562. Xprintf("equipment around you which is increasing in both loudness\n");
  563. Xprintf("and pitch. You've turned something on, that's for sure!\n") ;
  564. X                sw_transport = TRUE ;
  565. X                return ;
  566. X            }
  567. X            else goto nothing ;
  568. X        }
  569. X    default:
  570. X        /* Semtex explosive detector */
  571. X        if (tag[V_detector] || tag[V_yellow_button] ||
  572. X            ((object[O_cube][J_loc] != B_have) &&
  573. X            (object[O_detector][J_loc] == B_have))) { 
  574. X            if (object[O_detector][J_loc] == B_have) 
  575. X                goto semtex ;
  576. X            else {
  577. Xprintf("You don't have the detector in your possession.\n") ;
  578. X                return ;
  579. X            }
  580. X        }
  581. X        /* Transporter return device */
  582. X        if (object[O_cube][J_loc] == B_have) {
  583. X            if ((object[O_detector][J_loc] == B_have) && 
  584. X                (!tag[V_blue_button])) 
  585. X                    goto which_button ;
  586. X            goto cubic ;
  587. X        }
  588. X        if (tag[V_blue_button]) goto no_cube ;
  589. X        if (tag[V_green_button]) goto no_green ;
  590. X
  591. Xprintf ("You can push as much as you like, but nothing will happen.\n");
  592. X} /* end of the switch block */
  593. Xreturn; 
  594. X
  595. X/* press Semtex detector button */
  596. Xsemtex:
  597. Xprintf("You press the button on the Semtex explosive detector and\n");
  598. Xfor (i = 0; i <= 9; i++) if ((n == i+207)||(n == i+228)) {
  599. X    if (room[227-i][M_rm_type] == T_lethal) {
  600. X        printf("hear a \"beep, beep, beep\".\n") ;
  601. X        return ;
  602. X    }
  603. X}
  604. Xprintf("the yellow light flashed.\n") ;
  605. Xreturn; 
  606. X
  607. X/* press cube button in wrong place */
  608. Xcubic:
  609. Xprintf("You press the button on the cube but nothing happens.\n");
  610. Xreturn; 
  611. X
  612. X/*  no switch */
  613. Xno_switch:
  614. Xprintf("There is nothing here with a push button switch.\n");
  615. Xreturn; 
  616. X
  617. X/*  no cube */
  618. Xno_cube:
  619. Xprintf("You don't have the cube with the blue button in your") ;
  620. Xprintf(" possession!\n") ;
  621. Xreturn; 
  622. X
  623. X/*  no green button */
  624. Xno_green:
  625. Xprintf("I see no green button to push!\n");
  626. Xreturn; 
  627. X
  628. X/* black cube in wrong room routine or green button pushed twice */
  629. Xnothing:
  630. Xprintf("Nothing happens!\n");
  631. X} /* --- end of the "pusher" subroutine --- */
  632. Xvoid switcher(n) 
  633. X/********************************************************************/
  634. X/*                                                                  */
  635. X/*                --- The Switcher Subroutine ---                   */
  636. X/*                                                                  */
  637. X/*                                                                  */
  638. X/*  Software by Gary A. Allen, Jr. 29 October 1989  Version: Mk 1.4 */
  639. X/*           (c) Copyright 1988 by Gary A. Allen, Jr.               */
  640. X/*                                                                  */
  641. X/********************************************************************/
  642. Xint n ;
  643. X{
  644. Xint flag_switch, flag_rifle_md ;
  645. X
  646. X#ifdef __TURBOC__
  647. Xvoid dialer(int) ;
  648. X#endif
  649. X
  650. X/* deal with single verb commands */
  651. Xif (tag[V_VERB_ONLY]) {
  652. X    if (tag[V_turn]) printf("Turn what?\n") ;
  653. X    if (tag[V_set]) printf("Set what?\n") ;
  654. X    if (tag[V_select]) printf("Select what?\n") ;
  655. X    if (tag[V_switch]) printf("Switch what?\n") ;
  656. X    return ;
  657. X}
  658. X
  659. X/* Deal with changing the safety on the rifle */
  660. Xif (tag[V_safety]) {
  661. X    if (object[O_rifle][J_loc] == B_have) {
  662. X        if (tag[V_off]) {
  663. X            rifle_flag = F_single ;
  664. Xprintf("The M16 rifle is set to single shot mode ") ;
  665. Xprintf("with the safey off.\n") ;
  666. X            return ;
  667. X        }
  668. X        if (tag[V_on]) {
  669. X            rifle_flag = F_safety ;
  670. Xprintf("The M16 rifle's safety has been turned on.\n") ;
  671. X            return ;
  672. X        }
  673. X    printf("How do you want the safety set?\n") ;
  674. X    }
  675. X    else printf("You're not holding the rifle!\n") ;
  676. X    return ;
  677. X}
  678. X
  679. X/* deal with special case "turn (safe) dial 0 49 67 82" */
  680. Xif (tag[V_turn] && tag[V_dial] && (!tag[V_rifle])) {
  681. X    dialer(n) ;
  682. X    return ;
  683. X}
  684. X
  685. X/* deal with special case "turn safe ..." */
  686. Xif (tag[V_turn] && (!tag[V_dial]) && tag[V_safe]) {
  687. X    if (n != R_office_mang) {
  688. Xprintf("There is no safe here to turn!\n") ;
  689. X        return  ;
  690. X    }
  691. Xprintf("Since the safe is set in a concrete wall, turning it would\n");
  692. Xprintf("be rather difficult!  Perhaps I should turn the safe's\n") ;
  693. Xprintf("dial instead?\n") ;
  694. X    return ;
  695. X}
  696. X
  697. X/* initialize the local switches */
  698. Xflag_switch = F_no_argument ; 
  699. Xif (tag[V_on]) flag_switch = TRUE ;
  700. Xif (tag[V_off]) flag_switch = FALSE ;
  701. Xif (verb == V_light) flag_switch = TRUE ;
  702. X
  703. Xflag_rifle_md = F_no_argument ;
  704. Xif (tag[V_safe]) flag_rifle_md = F_safety ;
  705. Xif (tag[V_triple]) flag_rifle_md = F_triple ;
  706. Xif (tag[V_single]) flag_rifle_md = F_single ;
  707. Xif (tag[V_auto]) flag_rifle_md = F_auto ;
  708. X
  709. Xif ((flag_switch == F_no_argument)&&(flag_rifle_md == F_no_argument)) {
  710. Xprintf("You will have to be a little more specific than that. \n") ;
  711. X    return ;
  712. X}
  713. X
  714. X/* see if it is a simple "on/off" power equipment switch command */
  715. Xif ((!tag[V_torch])&&(!tag[V_rifle])&&
  716. X    (flag_rifle_md == F_no_argument)) {
  717. Xif (n == R_store_room) {
  718. X    /* The circuit breaker is switched off */
  719. X    if (flag_switch == FALSE) {
  720. X    if (room[R_store_room][M_rm_status] == S_off) {
  721. X    printf ("The circuit breaker is already turned off! \n");
  722. X    return ; }
  723. X    else {
  724. Xprintf ("As you pull the switch lever, there is a bright blue \n");
  725. Xprintf ("arc and then all of the lights go out. \n");
  726. X        room[R_store_room][M_rm_status] = S_off ;
  727. X        room[R_lift_entr][M_rm_status] = S_closed ;
  728. X        return; }
  729. X    }
  730. X    /* The circuit breaker is switched on */
  731. X    if (flag_switch == TRUE) {
  732. X    if (room[R_store_room][M_rm_status] == S_on) {
  733. X    printf ("The circuit breaker is already turned on! \n");
  734. X    return; }
  735. X    else {
  736. Xprintf ("As you pull the switch lever, there is a loud \"CLUNK\" \n");
  737. Xprintf ("and you see a POWER ON light glowing. \n");
  738. X        room[R_store_room][M_rm_status] = S_on ;
  739. X        room[R_lift_entr][M_rm_status] = S_flashing ;
  740. X        return; }
  741. X    }
  742. X}          
  743. Xgoto garbage_cmd ;
  744. X} /* end of the simple "on/off" switch group */
  745. X
  746. X/* the switch command is to select an M16 rifle firing mode */
  747. Xif (tag[V_rifle]) {
  748. X    if (object[O_rifle][J_loc] == B_have) {
  749. X
  750. X        /* turn the rifle on naively */
  751. X        if ((flag_switch==TRUE)||
  752. X               ((flag_rifle_md==F_safety)&&(flag_switch==FALSE))) {
  753. X            if (rifle_flag != F_safety) {
  754. Xprintf("The rifle's safety is already off! \n") ; 
  755. X                return;
  756. X            }
  757. X            rifle_flag = F_single ;
  758. Xprintf("The M16 rifle has been set to single shot mode. \n") ;
  759. X            return ;
  760. X        } 
  761. X/* turn on the safety */
  762. X    if ((flag_switch==FALSE)||
  763. X      ((flag_rifle_md==F_safety)&&((flag_switch==TRUE)||
  764. X      (flag_switch==F_no_argument)))) {
  765. X                if (rifle_flag == F_safety) {
  766. Xprintf("The rifle's safety is already on! \n") ; 
  767. X                return;
  768. X                }
  769. X            rifle_flag = F_safety ;
  770. Xprintf("The M16 rifle's safety has now been turned on. \n") ;
  771. X            return ;
  772. X    } 
  773. X        /* select single shot mode */  
  774. X        if (flag_rifle_md == F_single) {
  775. X            if (rifle_flag == F_single) {
  776. Xprintf("The rifle has already been set to single shot mode.\n");
  777. X                return;
  778. X            }
  779. X            rifle_flag = F_single ;
  780. Xprintf("The M16 rifle has been set to single shot mode. \n") ;
  781. X            return ;
  782. X        } 
  783. X        /* select triple fire mode */  
  784. X        if (flag_rifle_md == F_triple) {
  785. X            if (rifle_flag == F_triple) {
  786. Xprintf("The rifle has already been set to triple fire mode.\n");
  787. X                return;
  788. X            }
  789. X            rifle_flag = F_triple ;
  790. Xprintf("The M16 rifle has been set to triple fire mode. \n") ;
  791. X            return ;
  792. X        } 
  793. X        /* select to fully automatice mode */
  794. X        if (flag_rifle_md == F_auto) {
  795. X            if (rifle_flag == F_auto) {
  796. Xprintf("The rifle has already been set to fully automatic.\n");
  797. X                return;
  798. X            }
  799. X            rifle_flag = F_auto ;
  800. Xprintf("The M16 rifle has been set to fully automatic. \n") ;
  801. X            return ;
  802. X        } 
  803. X    }
  804. X    /* This is the rifle nonpossession error handler */
  805. X    else {
  806. Xprintf("You don't have a rifle in your possession! \n") ;
  807. X        return ;
  808. X    }
  809. X} /* end of the rifle mode switching block */
  810. X
  811. X/* the switch command is to turn the torch off or on. */
  812. Xif (tag[V_torch]) {
  813. X    if (object[O_torch][J_loc] == B_have) {
  814. X        /* "switch torch on" command */
  815. X        if (flag_switch==TRUE) {
  816. X            if (object[O_torch][J_property]) {
  817. Xprintf("The torch is already turned on.\n") ;
  818. X                return ;
  819. X            }
  820. Xprintf("An intense beam of light is projected from the torch.\n") ;
  821. X            object[O_torch][J_property] = TRUE ;
  822. X            return ;
  823. X        }
  824. X        /* "switch torch off" command */
  825. X        if (flag_switch==FALSE) {
  826. X            if (!object[O_torch][J_property]) {
  827. Xprintf("The torch isn't switched on.\n") ;
  828. X                return ;
  829. X            }
  830. Xprintf("The torch switches off with a \"click\".\n") ;
  831. X            object[O_torch][J_property] = FALSE ;
  832. X            return ;
  833. X        }
  834. X    }
  835. Xprintf("You don't have a torch in your possession to switch! \n") ;
  836. X    return ;
  837. X}
  838. X
  839. X/* Deal with a garbage command */
  840. Xgarbage_cmd :
  841. Xprintf("I don't understand what you want me to switch. \n") ;
  842. Xreturn ;
  843. X
  844. X} /* --- end of the "switcher" subroutine --- */
  845. X
  846. Xvoid new_score() 
  847. X/* This subroutine calculates the score based on treasure in the safe */
  848. X{
  849. Xint i ;
  850. X    score = 0 ;
  851. X for (i = 0; i <= objcnt; i++) if (object[i][J_loc] == B_in_safe)  {
  852. X        score += object[i][J_value] ;
  853. X    } ;
  854. X} /* --- end of the "new_score" subroutine --- */
  855. END_OF_FILE
  856. if test 33573 -ne `wc -c <'longdsc.c'`; then
  857.     echo shar: \"'longdsc.c'\" unpacked with wrong size!
  858. fi
  859. # end of 'longdsc.c'
  860. fi
  861. if test -f 'makefile' -a "${1}" != "-c" ; then 
  862.   echo shar: Will not clobber existing file \"'makefile'\"
  863. else
  864. echo shar: Extracting \"'makefile'\" \(701 characters\)
  865. sed "s/^X//" >'makefile' <<'END_OF_FILE'
  866. XCFLAGS =  -c
  867. XHEAD = dink_sym.h dink_glb.h
  868. XOBJECTS = dinkum.o describe.o longdsc.o objlook.o actor.o \
  869. Xmonster.o opener.o gleeper.o parse.o taker.o
  870. Xdinkum: $(OBJECTS)
  871. X    cc $(OBJECTS) -o dinkum
  872. Xdinkum.o: dinkum.c $(HEAD)
  873. X    cc $(CFLAGS) dinkum.c
  874. Xdescribe.o: describe.c $(HEAD)
  875. X    cc $(CFLAGS) describe.c
  876. Xlongdsc.o: longdsc.c $(HEAD)
  877. X    cc $(CFLAGS) longdsc.c
  878. Xobjlook.o: objlook.c $(HEAD)
  879. X    cc $(CFLAGS) objlook.c
  880. Xparse.o: parse.c $(HEAD)
  881. X    cc $(CFLAGS) parse.c
  882. Xactor.o: actor.c $(HEAD)
  883. X    cc $(CFLAGS) actor.c
  884. Xmonster.o: monster.c $(HEAD)
  885. X    cc $(CFLAGS) monster.c
  886. Xopener.o: opener.c $(HEAD)
  887. X    cc $(CFLAGS) opener.c
  888. Xgleeper.o: gleeper.c $(HEAD)
  889. X    cc $(CFLAGS) gleeper.c
  890. Xtaker.o: taker.c $(HEAD)
  891. X    cc $(CFLAGS) taker.c
  892. X
  893. END_OF_FILE
  894. if test 701 -ne `wc -c <'makefile'`; then
  895.     echo shar: \"'makefile'\" unpacked with wrong size!
  896. fi
  897. # end of 'makefile'
  898. fi
  899. if test -f 'objlook.c' -a "${1}" != "-c" ; then 
  900.   echo shar: Will not clobber existing file \"'objlook.c'\"
  901. else
  902. echo shar: Extracting \"'objlook.c'\" \(15834 characters\)
  903. sed "s/^X//" >'objlook.c' <<'END_OF_FILE'
  904. X#define OBJLKR
  905. X#include "dink_sym.h"
  906. X#include "dink_glb.h"
  907. X
  908. Xvoid objlooker(n)
  909. X/*********************************************************/
  910. X/*                                                       */
  911. X/*    --- Object in Room Examination Subroutine ---      */
  912. X/*                                                       */
  913. X/*      Program by Gary A. Allen, Jr.  18 May 1990       */
  914. X/*        (c) Copywrite 1989 by Gary A. Allen, Jr.       */
  915. X/*                                                       */
  916. X/*********************************************************/
  917. Xint n ;
  918. X{
  919. X#ifdef __TURBOC__
  920. Xvoid objector(int) ;
  921. X#endif
  922. X
  923. Xregister int i ;
  924. X
  925. Xif (((object[O_torch][J_loc] == B_have)&&object[O_torch][J_property])|| 
  926. X   (n < 186)||(n > 202)) { 
  927. X    if (room[n][M_obj_cnt] == 1) {
  928. X        for (i=0; i <= objcnt; i++) {
  929. X            if ((object[i][J_loc] == n) && 
  930. X                (object[i][J_type] != Z_unmovable)) {
  931. X                if (n == R_office_mang) {
  932. Xprintf ("On the floor you see ") ;
  933. X                    objector(i) ;
  934. X                    printf (".\n") ;
  935. X                }
  936. X                else {
  937. X                     printf ("You see ") ;
  938. X                    objector(i) ;
  939. X                    printf (".\n") ;
  940. X                }
  941. X            }
  942. X        }
  943. X    }
  944. X    if (room[n][M_obj_cnt] > 1) {
  945. X        if (n == R_office_mang) 
  946. Xprintf ("You see the following on the floor: \n");
  947. X        else printf ("You see the following: \n");
  948. X        for (i=0; i <= objcnt; i++) {
  949. X            if ((object[i][J_loc] == n) && 
  950. X                (object[i][J_type] != Z_unmovable)) {
  951. X                printf ("        ") ;
  952. X                objector(i) ;
  953. X                printf ("\n") ;
  954. X            }
  955. X        }
  956. X    }
  957. X}
  958. X} /* end of "objlooker" subroutine */
  959. Xvoid kelly(n) 
  960. X/********************************************************************/
  961. X/*                                                                  */
  962. X/*                  --- Ned Kelly Subroutine --                     */
  963. X/*                                                                  */
  964. X/* Software by Gary A. Allen, Jr. 5 November 1989  Version: Mk 1.2  */
  965. X/*           (c) Copyright 1989 by Gary A. Allen, Jr.               */
  966. X/*                                                                  */
  967. X/********************************************************************/
  968. Xint n ;
  969. X{
  970. Xregister int i, k ;
  971. Xstatic int ned_look = 0, sw_fiddle = TRUE ;
  972. Xint  sw_ned_look, sw_ned_set ;
  973. X
  974. X/* check if Ned  Kelly is dead */
  975. Xif (enemy[N_ned][E_location] == B_destroyed) return ;
  976. X
  977. X/* this switch is for Ned looking for treasure once per cycle */
  978. Xsw_ned_look = FALSE ;
  979. Xsw_ned_set = FALSE ;
  980. X
  981. X/* check if player is in Ned's trigger rooms */
  982. Xswitch (n) {
  983. X/* Cause Ned Kelly to steal */
  984. Xcase R_lift_inside:
  985. X    /* are there valuables in the safe and the safe open? */
  986. X    if ((score > 0)&&
  987. X        (room[R_office_mang][M_rm_status] >= S_dialed)) {
  988. X    /* is the office building open? */
  989. X        if ((ned_look > 4)||
  990. X            (room[R_office_entr][M_rm_status] == S_open)||
  991. X            (room[R_office_entr][M_rm_status] == S_kicked)||
  992. X        (room[R_office_entr][M_rm_status] == S_unlocked)) {
  993. X
  994. X            if (ned_look > 4) {
  995. X            room[R_office_entr][M_rm_status] = S_kicked ;
  996. X            room[R_office_entr][2] = R_office_hall ;
  997. X            }
  998. X/* scan the object list for treasure in safe and transfer to hideout */
  999. X            for (i=0; i <= objcnt; i++) {
  1000. X    if ((object[i][J_loc] == B_in_safe)&&(object[i][J_value] > 0)) {
  1001. X                    ++room[R_hideout][M_obj_cnt] ;
  1002. X                    object[i][J_loc] = R_hideout; 
  1003. X                    sw_ned_set = TRUE ;
  1004. X                }
  1005. X            }    
  1006. X        }
  1007. X/* the safe is open with treasure but the door is locked */
  1008. X        else {
  1009. X            ++ned_look ;
  1010. X            sw_ned_look = TRUE ;
  1011. X        }
  1012. X    } /* end of the block concerning Ned and the safe */
  1013. X
  1014. X    if (sw_valuable) {
  1015. X        for (i=0; i <= objcnt; i++) {
  1016. X/* scan for treasure laying around outside the building on surface */
  1017. X            for (k = 22; k <= 36; k++) { 
  1018. X                if ((object[i][J_loc] == k)&&
  1019. X                    (object[i][J_value] > 0)) {
  1020. X                    ++room[R_hideout][M_obj_cnt] ;
  1021. X                    --room[k][M_obj_cnt] ;
  1022. X                    object[i][J_loc] = R_hideout; 
  1023. X                    sw_ned_set = TRUE ;
  1024. X                    sw_valuable = FALSE ;
  1025. X                    break ;
  1026. X                }
  1027. X            }    
  1028. X            for (k = 144; k <= 145; k++) {
  1029. X                if ((object[i][J_loc] == k)&&
  1030. X                    (object[i][J_value] > 0)) {
  1031. X                    ++room[R_hideout][M_obj_cnt] ;
  1032. X                    --room[k][M_obj_cnt] ;
  1033. X                    object[i][J_loc] = R_hideout; 
  1034. X                    sw_valuable = FALSE ;
  1035. X                    sw_ned_set = TRUE ;
  1036. X                    break ;
  1037. X                }
  1038. X            }    
  1039. X        /* scan the office building for treasure on the floor */
  1040. X            for (k = 37; k <= 41; k++) { 
  1041. X                if ((object[i][J_loc] == k)&&
  1042. X                    (object[i][J_value] > 0)) {
  1043. X/* if the office bldg. door is open then Ned Kelly steals treasure */
  1044. X        if ((room[R_office_entr][M_rm_status] == S_open)||
  1045. X            (room[R_office_entr][M_rm_status] == S_unlocked)||
  1046. X          (room[R_office_entr][M_rm_status] == S_kicked)) {
  1047. X            ++room[R_hideout][M_obj_cnt] ;
  1048. X            --room[k][M_obj_cnt] ;
  1049. X            object[i][J_loc] = R_hideout; 
  1050. X            sw_valuable = FALSE ;
  1051. X            sw_ned_set = TRUE ;
  1052. X            break ;
  1053. X        }
  1054. X/* if Ned Kelly sees locked treasure four times, he kicks in the door */
  1055. X        if (ned_look > 4) {
  1056. X            room[R_office_entr][M_rm_status] = S_kicked ;
  1057. X            room[R_office_entr][2] = R_office_hall ;
  1058. X            ++room[R_hideout][M_obj_cnt] ;
  1059. X            --room[k][M_obj_cnt] ;
  1060. X            object[i][J_loc] = R_hideout; 
  1061. X            sw_valuable = FALSE ;
  1062. X            sw_ned_set = TRUE ;
  1063. X        }
  1064. X        else {
  1065. X            if (!sw_ned_look) ++ned_look ;
  1066. X            sw_ned_look = TRUE ;
  1067. X            break ; /* conclude the office bldg. loop */
  1068. X        }
  1069. X        break ;
  1070. X                }
  1071. X            }    
  1072. X        }    
  1073. X    } /* end of block concerning Ned and loose treasure */
  1074. X
  1075. X    if (sw_ned_set) {
  1076. X        enemy[N_ned][E_status] = F_stealing ; 
  1077. X        enemy[N_ned][E_location] = R_hideout ;
  1078. X        room[R_hideout][M_monster] = 1 ;
  1079. X        sw_ned_set = FALSE ;
  1080. X    }
  1081. X    return ;
  1082. X
  1083. Xcase R_office_entr:
  1084. X/* Cause Ned Kelly to run away with treasure */
  1085. X    if (enemy[N_ned][E_status] == F_stealing) {
  1086. X        enemy[N_ned][E_status] = F_asleep ;
  1087. Xprintf("There is an odd looking character with an iron bucket on his ");
  1088. Xprintf("head and a swag\n");
  1089. Xprintf("bag over his shoulder running away from the ");
  1090. Xprintf("office building towards\nthe desert. \n\n") ;
  1091. X        return ;
  1092. X    }
  1093. X    if ((ned_look == 3) && sw_fiddle && 
  1094. X        (room[R_office_entr][M_rm_status] != S_open) &&
  1095. X        (room[R_office_entr][M_rm_status] != S_kicked) &&
  1096. X        (room[R_office_entr][M_rm_status] != S_unlocked)) {
  1097. X        sw_fiddle = FALSE ;
  1098. Xprintf("As you approach the office building's door, you see a\n");
  1099. Xprintf("strange looking character with a bucket on his head and\n") ;
  1100. Xprintf("wearing an iron breast plate.  He is on his knees before\n") ;
  1101. Xprintf("the door trying to pick the lock with a bit of coat hanger\n") ;
  1102. Xprintf("wire. Suddenly, he turns and sees you coming. With amazing\n"); 
  1103. Xprintf("speed, he throws away his wire and runs off towards the\n") ;
  1104. Xprintf("open desert.\n\n") ;
  1105. X        return ;
  1106. X    }
  1107. X} /* end of the ned kelly room switch block */
  1108. X} /* --- end of the "kelly" subroutine  --- */ 
  1109. X
  1110. Xvoid sounder(n) 
  1111. X/********************************************************************/
  1112. X/*                                                                  */
  1113. X/*                  --- Gong Sounding Subroutine --                 */
  1114. X/*                                                                  */
  1115. X/* Software by Gary A. Allen, Jr. 21 June 1989     Version: Mk 1.0  */
  1116. X/*           (c) Copyright 1989 by Gary A. Allen, Jr.               */
  1117. X/*                                                                  */
  1118. X/********************************************************************/
  1119. Xint n ;
  1120. X{
  1121. X#ifdef __TURBOC__
  1122. Xvoid exit(int), hold_it(void) ;
  1123. Xchar getche(void) ;
  1124. X#endif
  1125. X
  1126. Xchar letter ;
  1127. X
  1128. X/* see if player is in the gong room */
  1129. Xif (n != R_gong) {
  1130. X    if (tag[V_gong]) printf("I don't see a gong here.\n") ;
  1131. X    else printf("I don't see how you can do that.\n") ;
  1132. X    return ;
  1133. X}
  1134. X
  1135. X/* The player is in the gong room. Does he have the clapper? */
  1136. Xif (tag[V_clapper]) {
  1137. X    if (object[O_clapper][J_loc] == B_have) {
  1138. X        if (!tag[V_gong]) {
  1139. Xprintf("With what are you going to do that with the clapper?\n") ;
  1140. X            return ;
  1141. X        }
  1142. Xprintf
  1143. X("\n  GGGGGGGG       OOOOOOOO     NN       NN     GGGGGGGG     !!!\n") ;
  1144. Xprintf
  1145. X("GG        GG   OO        OO   NNN      NN   GG        GG   !!!\n") ;
  1146. Xprintf
  1147. X("GG             OO        OO   NN N     NN   GG             !!!\n") ;
  1148. Xprintf
  1149. X("GG             OO        OO   NN  N    NN   GG             !!!\n") ;
  1150. Xprintf
  1151. X("GG   GGGGGGG   OO        OO   NN   N   NN   GG    GGGGGG   !!!\n") ;
  1152. Xprintf
  1153. X("GG        GG   OO        OO   NN    N  NN   GG        GG   !!!\n") ;
  1154. Xprintf
  1155. X("GG        GG   OO        OO   NN     N NN   GG        GG\n") ;
  1156. Xprintf
  1157. X("GG        GG   OO        OO   NN      NNN   GG        GG   000\n") ;
  1158. Xprintf
  1159. X("  GGGGGGGG       OOOOOOOO     NN       NN     GGGGGGGG     000\n\n") ;
  1160. X
  1161. X/* see if the "end game" can begine */
  1162. X        if ((score < max_score)||(gleep_score == 0)) {
  1163. Xprintf("You hear an ethereal voice which says:\n\n") ;
  1164. X            if (score < max_score) {
  1165. Xprintf("Sorry Mate!  You haven't put all of the treasure in the\n") ;
  1166. Xprintf("safe yet.  Find the rest, and then the secret of the gong\n") ;
  1167. Xprintf("will be revealed.\n") ;
  1168. X                return ;
  1169. X            }
  1170. X            if (gleep_score == 0) {
  1171. Xprintf("Good on you Mate!  You've found all of the treasure.\n") ;
  1172. Xprintf("However you haven't put a single gleep in the gleep tank!\n");
  1173. Xprintf("You're not a Fair Dinkum Adventurer until you've put at\n") ;
  1174. Xprintf("least one gleep in the tank.\n") ;
  1175. X                return ;
  1176. X            }
  1177. X        }
  1178. X        /* Begin the End Game */
  1179. Xprintf("There is a loud \"Fromp!\" as a portcullis crashes down and\n");
  1180. Xprintf("seals the northern (and only) exit.  The lights go dim and\n");
  1181. Xprintf("a hazy fog appears in the room.  Slowly this fog coalesces\n") ;
  1182. Xif (sw_warned) {
  1183. Xprintf("into the now familiar form of Banjo Patterson.  For some\n") ;
  1184. Xprintf("odd reason Banjo is holding in his right hand a sword of\n") ;
  1185. Xprintf("fire such as one reads about in Genesis. The deathly quiet\n");
  1186. Xprintf("is broken when Banjo begins to speak:\n") ;
  1187. X}
  1188. Xelse {
  1189. Xprintf("into a ghostly human form.  This ethereal being is wearing\n") ;
  1190. Xprintf("a grey flannel suit, a bowler hat, and has a gold pocket\n") ;
  1191. Xprintf("watch chain looped across the front of his waist coat.  He\n");
  1192. Xprintf("is holding in his right hand a sword of fire such as one\n") ;
  1193. Xprintf("reads about in Genesis.  You can hear \"Waltzing Matilda\"\n");
  1194. Xprintf("being played softly in the background.  You know what?\n");
  1195. Xprintf("I think this ethereal being is none other than the ghost\n") ;
  1196. Xprintf("of Banjo Patterson!  With this realization Banjo begins to\n") ;
  1197. Xprintf("speak:\n") ;
  1198. X}
  1199. X        hold_it() ;
  1200. Xprintf("\"Good on you, Fair Dinkum Adventurer!  You have braved\n") ; 
  1201. Xprintf("the perils of hoop snakes, drop bears, and mutant wombats.\n") ;
  1202. Xprintf("You have solved many riddles, collected much treasure and\n") ;
  1203. Xprintf("encountered true evil and dealt with it appropriately.\n");
  1204. Xprintf("However it has occured to us that you might not be one of\n") ;
  1205. Xprintf("the chosen few who can be admitted into the Land of the\n") ;
  1206. Xprintf("Blessed.  The possibility remains that you could be a\n") ;
  1207. Xprintf("whinging Pom or a bleeding Yank.  Therefore you will be\n") ;
  1208. Xprintf("tested with three questions.  If you answer correctly, you\n") ;
  1209. Xprintf("will be admitted into paradise. However should you answer\n");
  1210. Xprintf("falsely, you will be sent to another place, an abode of\n");
  1211. Xprintf("darkness and dread.  So answer wisely, for you will not be\n") ;
  1212. Xprintf("given a second chance!\"\n\n") ;
  1213. X
  1214. Xprintf("What is the capital of Australia?\n\n") ;
  1215. Xprintf("     A) Sydney\n") ;
  1216. Xprintf("     B) Canberra\n") ;
  1217. Xprintf("     C) Melbourne\n\n") ;
  1218. Xprintf("Answer A, B, or C:  ") ;
  1219. Xquest1:
  1220. X#ifndef __TURBOC__
  1221. X        letter = getchar() ;
  1222. X        if ((letter == '\n')||(letter == ' ')) goto quest1 ;
  1223. X        if (('b' == letter)||('B' == letter)) 
  1224. X            printf("\nCorrect!\n\n") ;
  1225. X#endif
  1226. X
  1227. X#ifdef __TURBOC__
  1228. X        letter = getche() ;
  1229. X        if ((letter == '\n')||(letter == ' ')) goto quest1 ;
  1230. X        if (('b' == letter)||('B' == letter)) 
  1231. X            printf("\n\nCorrect!\n\n") ;
  1232. X#endif
  1233. X        else goto la ;
  1234. X
  1235. Xprintf("In the Australian emblem there appears two animals on\n") ;
  1236. Xprintf("either side of a shield.  One of the two animals is a\n") ;
  1237. Xprintf("kangaroo.  What species is the other animal?\n\n") ;
  1238. Xprintf("     A) Koala Bear\n") ;
  1239. Xprintf("     B) Platypus\n") ;
  1240. Xprintf("     C) Emu\n\n") ;
  1241. Xprintf("Answer A, B, or C:  ") ;
  1242. Xquest2:
  1243. X#ifndef __TURBOC__
  1244. X        letter = getchar() ;
  1245. X        if ((letter == '\n')||(letter == ' ')) goto quest2 ;
  1246. X        if (('c' == letter)||('C' == letter)) 
  1247. X            printf("\nCorrect!\n\n") ;
  1248. X#endif
  1249. X
  1250. X#ifdef __TURBOC__
  1251. X        letter = getche() ;
  1252. X        if ((letter == '\n')||(letter == ' ')) goto quest2 ;
  1253. X        if (('c' == letter)||('C' == letter)) 
  1254. X            printf("\n\nCorrect!\n\n") ;
  1255. X#endif
  1256. X        else goto la ;
  1257. X
  1258. Xprintf("Which place is a state in Australia?\n\n") ;
  1259. Xprintf("     A) Arcadia\n") ;
  1260. Xprintf("     B) Patagonia\n") ;
  1261. Xprintf("     C) Tasmania\n\n") ;
  1262. Xprintf("Answer A, B, or C:  ") ;
  1263. Xquest3:
  1264. X#ifndef __TURBOC__
  1265. X        letter = getchar() ;
  1266. X        if ((letter == '\n')||(letter == ' ')) goto quest3 ;
  1267. X        if (('c' == letter)||('C' == letter)) 
  1268. X            printf("\nCorrect!\n\n") ;
  1269. X#endif
  1270. X
  1271. X#ifdef __TURBOC__
  1272. X        letter = getche() ;
  1273. X        if ((letter == '\n')||(letter == ' ')) goto quest3 ;
  1274. X        if (('c' == letter)||('C' == letter)) 
  1275. X            printf("\n\nCorrect!\n\n") ;
  1276. X#endif
  1277. X        else goto la ;
  1278. X
  1279. X/* Player has won the game */
  1280. Xprintf("You see Banjo Patterson with a beatific smile.  He waves\n") ;
  1281. Xprintf("his firey sword with a florish and the scene around you\n") ;
  1282. Xprintf("disolves into a million tiny motes of light.  You now\n") ;
  1283. Xprintf("find yourself wearing swimming togs.  You are being carried\n");
  1284. Xprintf("by a guard of honor made up of four sumptuous shielas\n") ;
  1285. Xprintf("dressed in string bikinis and four handsome lifeguards.\n") ;
  1286. Xprintf("They carry you to a perfect beach on South Stradbroke\n") ;
  1287. Xprintf("Island.  Off in the distance on the Queensland mainland\n") ;
  1288. Xprintf("you see the Gold Coast which vaguely resembles the Emerald\n") ;
  1289. Xprintf("City of the classic movie.  Your guard of honor sets you\n") ;
  1290. Xprintf("down and hands you a can of Power's Bitter.  Three\n") ;
  1291. Xprintf("beautiful white pelicans float over head in a clear blue\n") ;
  1292. Xprintf("sky completing a scene of exquisite beauty.\n\n") ;
  1293. Xprintf("You're in paradise Mate and you've also won the game!\n\n") ;
  1294. X
  1295. X/* deal with final gleep announcement */
  1296. Xif (gleep_score == 1) {
  1297. Xprintf("---- A hint for those who want to go on playing Dinkum ----\n");
  1298. Xprintf("In this game you only put the minimum single gleep in the\n");
  1299. Xprintf("gleep tank.  In future games try seeding fertile tunnels\n");
  1300. Xprintf("with gleeps and reproducing them.  Build up as many gleeps\n");
  1301. Xprintf("as you can and then hit the gong before Dinkum times out.\n");
  1302. X}
  1303. Xelse {
  1304. Xprintf("You won this game with %d gleeps in the gleep tank.\n\n",
  1305. X    gleep_score) ;
  1306. X}
  1307. X        if (sw_wizard) return ;
  1308. X        else exit(0) ;
  1309. X
  1310. X/* Player enters false answer and goes to Los Angeles */
  1311. Xla:
  1312. Xprintf("\n        -!-!-!-!-!-     Wrong!    -!-!-!-!-!-\n\n") ;
  1313. Xprintf("Banjo Patterson brings down the sword of fire onto your\n");
  1314. Xprintf("head. The scene around you disappears in a flash and you\n");
  1315. Xprintf("find yourself transported to.....\n\n") ;
  1316. Xprintf("             Pico Blvd., West Los Angeles\n\n") ;
  1317. Xprintf("L.A. is having a stage three smog alert.  The air is so\n");
  1318. Xprintf("foul you can taste it.  A Los Angeles municipal bus roars\n");
  1319. Xprintf("by covering you in soot.  Across the street you see a\n");
  1320. Xprintf("modern day Neanderthal selling vials of Crack to children.\n"); 
  1321. Xprintf("The person next to you has taken a definite physical\n");
  1322. Xprintf("interest in you.  She/he is wearing a short skirt and has a\n");
  1323. Xprintf("beehive hairdo.  He/she also has a five o'clock shadow, and\n");
  1324. Xprintf("bicepts so thick that he could collapse your skull with a\n");
  1325. Xprintf("single thump.\n\n") ; 
  1326. Xprintf("We now leave this unhappy scene.  Since you were sent to\n") ;
  1327. Xprintf("Los Angeles your score has been zeroed.\n\n") ; 
  1328. Xprintf("So ends yet another unsuccessful session at Dinkum!\n") ;
  1329. X
  1330. X        if (sw_wizard) return ;
  1331. X        else exit(0) ;
  1332. X    }
  1333. X    else {
  1334. X        printf("I don't have a clapper to hit it with! \n") ;
  1335. X        return ;
  1336. X    }
  1337. X}
  1338. Xelse {
  1339. X    printf("Thud! \n") ;
  1340. X    printf("Nothing happened.\n") ;
  1341. Xprintf("I think you'd have more success if you used a gong clapper.\n");
  1342. X    return ;
  1343. X}
  1344. X} /* --- end of the "sounder" subroutine  --- */ 
  1345. END_OF_FILE
  1346. if test 15834 -ne `wc -c <'objlook.c'`; then
  1347.     echo shar: \"'objlook.c'\" unpacked with wrong size!
  1348. fi
  1349. # end of 'objlook.c'
  1350. fi
  1351. echo shar: End of archive 2 \(of 6\).
  1352. cp /dev/null ark2isdone
  1353. MISSING=""
  1354. for I in 1 2 3 4 5 6 ; do
  1355.     if test ! -f ark${I}isdone ; then
  1356.     MISSING="${MISSING} ${I}"
  1357.     fi
  1358. done
  1359. if test "${MISSING}" = "" ; then
  1360.     echo You have unpacked all 6 archives.
  1361.     rm -f ark[1-9]isdone
  1362. else
  1363.     echo You still need to unpack the following archives:
  1364.     echo "        " ${MISSING}
  1365. fi
  1366. ##  End of shell archive.
  1367. exit 0
  1368.