home *** CD-ROM | disk | FTP | other *** search
- Path: uunet!news.tek.com!master!saab!billr
- From: billr@saab.CNA.TEK.COM (Bill Randle)
- Newsgroups: comp.sources.games
- Subject: v15i040: dinkum2 - australian text adventure game, Part05/07
- Message-ID: <4196@master.CNA.TEK.COM>
- Date: 14 Jan 93 03:26:08 GMT
- Sender: news@master.CNA.TEK.COM
- Lines: 1479
- Approved: billr@saab.CNA.TEK.COM
- Xref: uunet comp.sources.games:1539
-
- Submitted-by: Gary Allen <gary@sun.mech.uq.oz.au>
- Posting-number: Volume 15, Issue 40
- Archive-name: dinkum2/Part05
- Supersedes: dinkum: Volume 15, Issue 21-26
- Environment: Unix, DOS
-
-
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then unpack
- # it by saving it into a file and typing "sh file". To overwrite existing
- # files, type "sh file -c". You can also feed this as standard input via
- # unshar, or by typing "sh <file", e.g.. If this archive is complete, you
- # will see the following message at the end:
- # "End of archive 5 (of 7)."
- # Contents: longdsc.c opener.c
- # Wrapped by billr@saab on Wed Jan 13 19:20:19 1993
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f 'longdsc.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'longdsc.c'\"
- else
- echo shar: Extracting \"'longdsc.c'\" \(23440 characters\)
- sed "s/^X//" >'longdsc.c' <<'END_OF_FILE'
- X#define LONG_DESCP
- X#include "dink_sym.h"
- X#include "dink_glb.h"
- X
- Xvoid long_descp(n)
- X/*********************************************************************/
- X/* */
- X/* --- Long Description Subroutine --- */
- X/* */
- X/* Software by Gary A. Allen, Jr. 23 December 1992 Version: Mk 2.0 */
- X/* (c) Copyright 1992 by Gary A. Allen, Jr. */
- X/* */
- X/*********************************************************************/
- X
- Xint n ;
- X{
- Xstatic int sw_bend = TRUE, sw_mob = TRUE ;
- X
- X#if (PROTOTYPE)
- Xvoid boom(void), describe(int), ender(int) ;
- X#endif
- X
- Xif (((object[O_torch][J_loc] == B_have)&&object[O_torch][J_property])||
- X (n < 186)||(n > 202)) {
- X
- X/* See if player entered the killing passage in the end game */
- Xif ((n >= 218)&&(n <= 227)) {
- Xprintf("As you're walking down the passage you feel the slight\n") ;
- Xprintf("tug of a trip wire on your leg. Out the corner of your\n");
- Xprintf("eye you see the trip wire is connected to an olive green\n") ;
- Xprintf("cylinder attached to the wall of the tunnel....\n\n") ;
- Xboom() ;
- Xprintf("\nIn case you're wondering that was a booby trap which you\n") ;
- Xprintf("set off!\n") ;
- Xender(F_died) ;
- X}
- X
- X/* Select individual rooms */
- Xswitch (n) {
- Xcase R_river: /* drowing in the river description */
- Xprintf ("As you approach the edge of the dike, there is a small\n");
- Xprintf ("earth slide which pitches you into the river. You\n");
- Xprintf ("flounder around in the water for a short while. Luckily\n");
- Xprintf ("before you have the chance to drown, a crocodile pulls\n") ;
- Xprintf ("you under, bringing you to a rather quick though painful\n");
- Xprintf ("end. \n") ;
- Xreturn ;
- X
- Xcase R_bunyip: /* getting eaten by the bunyip */
- Xprintf ("The slimey tentacle suddenly tightens around your leg, and\n");
- Xprintf ("the water in the billabong starts to churn furiously. Then\n");
- Xprintf ("surfaces the one thing that all Australians fear the most...");
- Xprintf ("\n\nBefore you stands an enormous sickly green Queensland\n") ;
- Xprintf ("Bunyip in all its awesome horror. It does not make a quick\n");
- Xprintf ("end of you.... Such is not the way of Bunyips. First it \n");
- Xprintf ("peels off your skin as if you where a banana. After much\n");
- Xprintf ("fearful agony, comes release as you pass into death.\n");
- Xreturn ;
- X
- Xcase R_road_kill_n: /* getting run over by a road train */
- Xcase R_road_kill_s:
- Xprintf("The distant rumble becomes a loud roar. Suddenly a huge Mack\n") ;
- Xprintf("truck pulling three carriages packed with cattle leaps over the\n") ;
- Xprintf("low rise, filling the narrow country road. You stand terrified\n") ;
- Xprintf("in the middle of the road with the metal monster bearing down\n") ;
- Xprintf("at 120 km/hr. The last thing you see before being flattened\n") ;
- Xprintf("like a cockroach is a sign on the truck's roo bar saying:\n") ;
- Xprintf(" \"CAUTION: ROAD TRAIN\"\n\n") ;
- Xreturn ;
- X
- Xcase R_forest:
- Xroom[n][M_rm_type] = T_was_long; /* long description only on request */
- Xprintf("You are in a forest thickly wooded with gum trees. The forest\n") ;
- Xprintf("floor is covered with long thin leaves from gum trees mixed\n") ;
- Xprintf("with their seed pods. There is a strong eucalytus smell in the\n") ;
- Xprintf("air. Up in the forest canopy you can hear kookaburras engaged\n") ;
- Xprintf("in their raucous cackling.\n") ;
- Xreturn ;
- X
- Xcase R_bend:
- Xroom[n][M_rm_type] = T_was_long; /* long description only on request */
- Xprintf("You are north of the grassy area in the bend of a great meandering\n") ;
- Xprintf("river. All around you are the tall black fronds of grass trees.\n") ;
- Xif (sw_bend) {
- X sw_bend = FALSE ;
- Xprintf("Off in the distance you can see a mob of emus striding out of\n") ;
- Xprintf("sight.\n") ;
- X}
- Xreturn ;
- X
- Xcase R_bitumen:
- Xroom[n][M_rm_type] = T_was_long; /* long description only on request */
- Xprintf("You are on a narrow country road made out of potholed bitumen.\n") ;
- Xprintf("The road's shoulders are of soft red earth which could cause\n") ;
- Xprintf("a driver to lose control of his car if he took a wheel off the\n") ;
- Xprintf("bitumen. ") ;
- Xif (sw_mob) {
- X sw_mob = FALSE ;
- Xprintf("A few metres away is a mob of grey kangroos grazing\n") ;
- Xprintf("on grass by the road. A huge buck looks up at you and doesn't\n") ;
- Xprintf("like what he sees. He bounds off with the rest of the mob\n") ;
- Xprintf("following. You can see the heads of joeys protruding from\n") ;
- Xprintf("their mother's pouches as the mob leaps off into the bush and\n") ;
- Xprintf("out of sight.\n") ;
- X}
- Xelse printf("\n") ;
- Xreturn ;
- X
- Xcase R_stream:
- Xroom[n][M_rm_type] = T_was_long; /* long description only on request */
- Xprintf("You approach a billabong with a small stream flowing into it.\n") ;
- Xprintf("Cane toads can be heard croaking nearby and you see countless\n") ;
- Xprintf("numbers of their tadpoles swimming in the stream.\n") ;
- Xreturn ;
- X
- Xcase R_taipan: /* getting bitten by a taipan */
- Xprintf("As you wander aimlessly in the grass, you accidently step\n");
- Xprintf("upon a taipan which is perhaps the most poisonous of Oz's \n");
- Xprintf("snakes. The snake strikes upwards and bites you in the\n");
- Xprintf("worst possible place. You thrash around for a short while\n");
- Xprintf("and then the venom takes hold. Your body begins to decompose");
- Xprintf("\nbefore your very eyes. Death comes only after an hour \n");
- Xprintf("of the worst possible agony. \n");
- Xreturn ;
- X
- Xcase R_mine_head: /* Front of ACME Mine */
- Xroom[n][M_rm_type] = T_was_long; /* long description only on request */
- Xprintf ("East of you is a large iron open truss tower, topped with \n");
- Xprintf ("two rusting wheels holding a pair of thick steel cables. \n");
- Xprintf ("This is the head gear of the once highly successful ACME \n");
- Xprintf ("Gold Mine, which now is completely mined out. Where \n");
- Xprintf ("there were once rich veins of gold is now a honeycomb of \n");
- Xprintf ("tunnels and caverns. There are stories about strange \n");
- Xprintf ("events in the old tunnels of the ACME mine and only fools \n");
- Xprintf ("or reckless adventurers would dare explore them. \n");
- Xprintf ("To the north is the old office building. Rumor has it \n");
- Xprintf ("the safe in this building once had millions of dollars in \n");
- Xprintf ("gold processed from the rich ore of the ACME mine. To \n");
- Xprintf ("the south is the mine lift, which once transported up to \n");
- Xprintf ("twenty miners at a time down the long mine shaft to the \n");
- Xprintf ("working tunnels deep under the earth below.\n");
- Xreturn ;
- X
- Xcase R_office_mang: /* Manager's office */
- Xroom[n][M_rm_type] = T_action_obj ;
- Xprintf("You are in the Manager's office of the ACME Mine. In \n");
- Xprintf("former times this room saw many lively meetings between \n");
- Xprintf("the Site Manager and Shift Bosses. Fixed to the wall are\n");
- Xprintf("old production schedules and organizational charts. In\n");
- Xprintf("the middle of the room is a beautiful silky oak desk.\n");
- Xprintf("Unfortunately it is too heavy to move. Attached to\n");
- Xprintf("the far wall is a curious picture of a platypus wearing a \n");
- Xprintf("hat with old wine corks dangling from the hat's brim. The\n");
- Xprintf("only exit is to the south.\n\n") ;
- Xreturn ;
- X
- Xcase R_geo_w: /* Geologist's office */
- Xroom[n][M_rm_type] = T_unmovable_obj ;
- Xprintf("As you entered this room, huge cockroaches scuttled off ");
- Xprintf("in every \n");
- Xprintf("direction. On the far wall is a rather tasteless poster ");
- Xprintf("depicting \n");
- Xprintf("an extremely well endowed (unclad) young woman holding a ");
- Xprintf("mining \n");
- Xprintf("drill. This office was once occupied by the mine ");
- Xprintf("geologist. One \n");
- Xprintf("can still see traces of the office's former occupant. ");
- Xprintf("There are only \n");
- Xprintf("two doors to this room. Both go to the north. You entered ");
- Xprintf("through \n");
- Xprintf("the west door. However there is another door in ");
- Xprintf("the eastern section \nof the office. \n");
- Xreturn ;
- X
- X/* lift compartment */
- Xcase R_lift_inside:
- Xroom[n][M_rm_type] = T_action_obj ;
- Xprintf("You are inside the lift, which has only one ");
- Xprintf("entrance doorway to the west. \n");
- Xprintf("To the left of the door is a panel of buttons. Most of ");
- Xprintf("the buttons are \ninoperative with tape over them. However ");
- Xprintf("there are four buttons \nthat still work. Each of the four ");
- Xprintf("buttons have a number stamped on them. \nThe numbers are ");
- Xprintf("zero, forty-nine, sixty-seven, and eighty-two. \n \n");
- Xreturn ;
- X
- Xcase R_hideout_entr: /* Ned Kelly's Hide Out */
- Xroom[n][M_rm_type] = T_was_long; /* long description only on request */
- X
- Xif (monster_flag == F_no_monster) {
- Xprintf ("Before you is a Queensland house with large verandas. ") ;
- Xprintf ("The front of\nthe house is to the east. The house ") ;
- Xprintf ("is painted fluorescent orange.\nOn the roof of the house is ");
- Xprintf ("a large, bright flashing neon sign which reads: \n\n");
- Xprintf("___________________________________________________________\n");
- Xprintf("| |\n");
- Xprintf("| Ned Kelly's ---SECRET--- Hide Out |\n");
- Xprintf("| Policemen, troopers, law enforcement officers and all |\n");
- Xprintf("| other minions of the law and public decency are advised |\n");
- Xprintf("| to look else where for bush rangers, thieves, and other |\n");
- Xprintf("| larrikins, since ***only*** honest, law abiding |\n");
- Xprintf("| Australians (loyal to Queen and Country) live here. |\n");
- Xprintf("| |\n");
- Xprintf("___________________________________________________________\n");
- X}
- Xelse describe(n) ;
- Xreturn ;
- X
- Xcase R_foreman:
- Xroom[n][M_rm_type] = T_was_long; /* long description only on request */
- Xprintf("You have entered the office of the Level #67 Foreman. In ");
- Xprintf("the middle of the\nroom is the Foreman's large and immovable ");
- Xprintf("desk. To one side can be seen an\nempty file cabinet and ");
- Xprintf("a series of pidgeon holes for holding mine worker's\nmail. ");
- Xprintf("The only exit is to the west.\n\n") ;
- Xreturn ;
- X
- Xcase R_no_treasure:
- Xroom[n][M_rm_type] = T_was_long; /* long description only on request */
- Xprintf("You are in a tunnel going east and west. Crude letters have\n");
- Xprintf("been scratched into the wall of the tunnel. The following\n") ;
- Xprintf("was written:\n\n") ;
- Xprintf("Dear Treasure Hunter:\n") ;
- Xprintf("There was lots of treasure on this level when I first\n") ;
- Xprintf("discovered this mine. However I have since carted it all\n") ;
- Xprintf("away. You might try looking on another level.") ;
- Xprintf("\n\n Good Luck!\n") ;
- Xprintf(" Dr. I. Jones, Ph.D.\n\n") ;
- Xreturn ;
- X
- Xcase R_gleep_tank:
- Xroom[n][M_rm_type] = T_was_long; /* long description only on request */
- Xprintf("You have walked into a room with a large plastic tank set ");
- Xprintf("in the middle.\nThe tank is about two metres deep and ");
- Xprintf("full of dark blue liquid which\nsmells strongly of chlorine.");
- Xprintf(" The words \"Gleep Tank\" have been crudely\n");
- Xprintf("spray painted on the wall.\n") ;
- Xreturn ;
- X
- Xcase R_ufo_e:
- Xroom[n][M_rm_type] = T_was_long; /* long description only on request */
- Xprintf("You crawl under a long thin sting that projects from the ");
- Xprintf("front of the\nspacecraft. It's made from a different metal ");
- Xprintf("(stainless steel?), and appears\nto have been retractable. ");
- Xprintf("This was probably a Mach probe for measuring flight\n") ;
- Xprintf("speed. You can go north or south.\n") ;
- Xreturn ;
- X
- Xcase R_ufo_w:
- Xroom[n][M_rm_type] = T_was_long; /* long description only on request */
- Xprintf("Before you is perhaps the real reason why the ACME Mine ");
- Xprintf("was closed. You see\nthe bent and twisted remains of what ");
- Xprintf("could only be an ancient spacecraft. It\nsits ") ;
- Xprintf("embedded within a gold bearing");
- Xprintf(" reef of conglomerate stone from the\nPrecambrain Period ");
- Xprintf("(hundreds of millions of years old). The old spacecraft\n") ;
- Xprintf("was based on a delta wing design which the miners had ");
- Xprintf("chiped free from\nthe rock. You can see clearly the interior ");
- Xprintf("of the engine exhaust ducts. The\nvehicle has air inlets ");
- Xprintf("so it must have been air breathing when it flew in\nthe ");
- Xprintf("atmosphere. ") ;
- Xprintf("The edges of the ducts appear to be made of titanium ");
- Xprintf("and are\nabout six centimetres thick. No wonder it could ");
- Xprintf("survive millions of years\nunder tons of stone. ") ;
- Xprintf("This spacecraft is literally built like a battleship!\nYou ") ;
- Xprintf("can climb over the vehicle to the north or go south.\n\n");
- Xreturn ;
- X
- Xcase R_ufo_n:
- Xroom[n][M_rm_type] = T_was_long; /* long description only on request */
- Xprintf("You're now doing a tight squeeze between the tunnel wall ");
- Xprintf("and the leading\nedge of the wing. You can see the titanium");
- Xprintf(" surface is covered with many\nregularly placed little ");
- Xprintf("holes, each about half a millimetre in diameter.\nThis ");
- Xprintf("was probably part of the wing's cooling system for ") ;
- Xprintf("atmospheric entry\nfrom orbit. You can go south-east or ");
- Xprintf("south-west.\n\n");
- Xreturn ;
- X
- Xcase R_ufo_s:
- Xroom[n][M_rm_type] = T_was_long; /* long description only on request */
- Xprintf("You're crawling under the wing and next to the spacecraft's ");
- Xprintf("landing gear.\nThe landing gear strut is almost snapped ");
- Xprintf("off. The tyre has long ago turned\nto dust, but the tyre ");
- Xprintf("rim is still in place. The braking system used is\nquite ");
- Xprintf("odd. The brake rotor is basicly a ring being gripped by ");
- Xprintf("a caliper with\nconcave brake pads. You ") ;
- Xprintf("can go north-west or north-east.\n") ;
- Xreturn ;
- X
- Xcase R_ufo_ne:
- Xroom[n][M_rm_type] = T_was_long; /* long description only on request */
- Xprintf("You are now near the nose of the derelict spacecraft. You ");
- Xprintf("see a quartz\nwindow in the side of the vehicle. It has been");
- Xprintf(" so scratched by the\ncenturies that it is now opaque. ");
- Xprintf("You can go north-west or south.\n") ;
- Xreturn ;
- X
- Xcase R_ufo_nw:
- Xroom[n][M_rm_type] = T_was_long; /* long description only on request */
- Xprintf("As you scrambled over the old derelict, you passed under ");
- Xprintf("the vertical\nstabilizer which centuries of geological ") ;
- Xprintf("forces had bent into what\nlooks like a sagging shark's ");
- Xprintf("fin. You can go south or do a tight squeeze\nto the ");
- Xprintf("north-east.\n\n");
- Xreturn ;
- X
- Xcase R_ufo_se:
- Xroom[n][M_rm_type] = T_was_long; /* long description only on request */
- Xprintf("You are under the forward section of the spacecraft. ");
- Xprintf("Above you is an\nopened access hatch which leads into the ");
- Xprintf("dark interior of the derelict.\n");
- Xprintf("You can go north, up or crawl under the wing to the ");
- Xprintf("south-west\n") ;
- Xreturn ;
- X
- Xcase R_ufo_sw:
- Xroom[n][M_rm_type] = T_was_long; /* long description only on request */
- Xprintf("You are hunching over as you scramble underneath the ");
- Xprintf("spacecraft's wing.\nNear the trailing edge of the wing ");
- Xprintf("you can see what is left of the\nwing flaps. The flap ");
- Xprintf("was actuated by a very conventional hydraulic system.\n");
- Xprintf("Some of the metal tubing for the actuaters are still in ");
- Xprintf("place, though\nthe hydraulic fluid has long since ") ;
- Xprintf("fossilized into stone. You can\ngo north or south-east.\n") ;
- Xreturn ;
- X
- Xcase R_air_lock:
- Xroom[n][M_rm_type] = T_was_long; /* long description only on request */
- Xprintf("You are inside what is obviously an airlock. There are ");
- Xprintf("two hatchways\ninto this airlock. One leads to the exterior ");
- Xprintf("while the other goes into\nthe spacecraft's interior. Both ");
- Xprintf("hatches appear to have originally been\nleft open and not ");
- Xprintf("forced by the miners (the hinges are immovable). ");
- Xprintf("It\nappears that the ship's crew left in a hurry. ") ;
- Xprintf("You can go north or down.\n") ;
- Xreturn ;
- X
- Xcase R_ship_passage:
- Xroom[n][M_rm_type] = T_was_long; /* long description only on request */
- Xprintf("You've entered the intercompartment access passage. To the ") ;
- Xprintf("south is an\nopen air tight door leading to the airlock. ");
- Xprintf("The access door to the east\nis open and recessed into the ");
- Xprintf("wall. The access door to the west has been\nforced open ");
- Xprintf("with a cutting torch and folded back with a pneumatic\n") ;
- Xprintf("hammer (obviously the work of the miners). ") ;
- Xprintf("The passage itself has about\nten centimetres of silt on the") ;
- Xprintf(" bottom and has the appearance of ancient\ndilapidation.\n") ;
- Xreturn ;
- X
- Xcase R_flight_deck:
- Xroom[n][M_rm_type] = T_was_long; /* long description only on request */
- Xprintf("You have made it to the flight deck. Unfortunately ");
- Xprintf("it's not much to\nwrite home about. Since the access door ");
- Xprintf("was open, this area has been full\nof water and silt for ");
- Xprintf("millennia. The miners have shoveled out most of it.\nOnce ");
- Xprintf("the wall panels were covered with some kind of plastic which");
- Xprintf(" has long\nsince turned to dust. There are three corroded ");
- Xprintf("frames which were once crew\nseats. The beings that flew ") ;
- Xprintf("this machine were taller and wider than humans\nbut they ");
- Xprintf("had anthropoid form. The flight controls are still here");
- Xprintf(" but they\nare so heavily corroded that they can no longer ");
- Xprintf("be moved. The only way out\nis to the west.\n\n") ;
- Xreturn ;
- X
- Xcase R_panel:
- Xroom[n][M_rm_type] = T_was_long; /* long description only on request */
- Xprintf("You are in a compartment that seems brand new, which is ");
- Xprintf("unbelievable. Perhaps\nthe machinery in this ship was once ");
- Xprintf("self repairing. Before you is a control\npanel with CRT type");
- Xprintf(" displays and buttons that still work. Beneath each button\n");
- Xprintf("is a description written in a strange alien script ");
- Xprintf("vaguely like Sanskrit.\nI wouldn't dare ") ;
- Xprintf("press any button except for a gray button. Beneath\n");
- Xprintf("this button is some masking tape that was obviously placed ") ;
- Xprintf("there by the miners.\nSomeone has written \"TEHR.\" on the ") ;
- Xprintf("masking tape with a pencil.\n\n") ;
- Xreturn ;
- X
- Xcase R_transport:
- Xroom[n][M_rm_type] = T_was_long; /* long description only on request */
- Xprintf("You have walked into an elevated chamber with strange ") ;
- Xprintf("glowing hexagons on\nthe floor which are about half a ") ;
- Xprintf("metre across. The hexagon pattern on the\nfloor is ");
- Xprintf("matched by one on the ceiling which is also glowing.\n\n") ;
- Xreturn ;
- X
- Xcase R_prayer:
- Xroom[n][M_rm_type] = T_short_descp ; /* disable long description */
- Xprintf("You are in a large and very grand room with walls made of\n");
- Xprintf("polished mahogany, and crystal chandeliers hanging from an\n");
- Xprintf("ornate ceiling. There is a mihrab incongruously set in the\n");
- Xprintf("western wall of the building. Also there are quotations\n");
- Xprintf("from the Quram written in golden letters along the top of\n") ;
- Xprintf("the walls near the ceiling. On the floor are sumptuous\n") ;
- Xprintf("cushions made of silk and fine green velvet. Sitting on the\n");
- Xprintf("cushions are old men wearing black pajamas with white\n");
- Xprintf("towels wrapped around their heads. In the middle of the\n");
- Xprintf("floor is a raised dais, upon which is sitting a rather\n");
- Xprintf("stately old man wearing similar clothing. In the far corner\n");
- Xprintf("of the room is standing a wax dummy of the Ayatolla\n") ;
- Xprintf("Khomeini. His right arm is upright much like the Statue of\n") ;
- Xprintf("Liberty and in his right hand is a glowing 100 watt light\n") ;
- Xprintf("bulb. I think this is the prayer room for the Iranian\n") ;
- Xprintf("Parliament! You'll have to go west if you wish to leave.\n\n") ;
- Xreturn ;
- X
- Xcase R_guard:
- Xroom[n][M_rm_type] = T_was_long; /* long description only on request */
- Xprintf("You are in a rather small room with a table in the ");
- Xprintf("middle that is covered\nwith half filled cups of tea, dirty ") ;
- Xprintf("ash trays, and a newspaper written in\nwhat appears to be ") ;
- Xprintf("Arabic. There is ") ;
- Xprintf("a brightly coloured poster on the\nwall depicting the Kaba ") ;
- Xprintf("Stone of Mecca with a calendar below it. The only\n") ;
- Xprintf("exits are through an open doorway to the east and through");
- Xprintf(" a curtain covered\ndoorway to the south.\n\n") ;
- Xreturn ;
- X
- Xcase R_closet:
- Xroom[n][M_rm_type] = T_was_long; /* long description only on request */
- Xprintf("You are in a closet full of grubby, nondescript things not\n") ;
- Xprintf("worth taking. The closet stinks of moth balls. The only way\n");
- Xprintf("out is through a curtain covered doorway to the north.\n\n");
- Xreturn ;
- X
- Xcase R_gong:
- Xroom[n][M_rm_type] = T_unmovable_obj ;
- Xprintf("You have entered an enormous room which is walled with\n");
- Xprintf("polished black granite supported by vast curving arches\n");
- Xprintf("much like a gothic cathedral. The cavernous room is a seven\n");
- Xprintf("sided polygon in layout with huge flaming torches set in\n");
- Xprintf("brass holders in every corner of the room. In the flickering\n");
- Xprintf("light of the torches you see an enormous silver gong\n");
- Xprintf("weighing at least a ton. The huge gong is suspended from\n");
- Xprintf("a finely polished red cedar frame, the top of which is\n");
- Xprintf("about four metres above the floor. The room is deathly\n");
- Xprintf("quiet like an ancient tomb. The only sound you can hear is\n");
- Xprintf("your own heart beating.\n") ;
- Xreturn ;
- X
- Xcase R_warning:
- Xroom[n][M_rm_type] = T_was_long; /* long description only on request */
- Xprintf("You have entered a passage with exits to the north, south,\n");
- Xprintf("and west. There is a poster glued to the wall which reads:\n");
- Xprintf("+---------------------------------------------------------+\n");
- Xprintf("| |\n");
- Xprintf("| ACME MINE IS UNFAIR TO WORKERS!! |\n");
- Xprintf("| |\n");
- Xprintf("| ON STRIKE!! |\n");
- Xprintf("| |\n");
- Xprintf("| The Loyal Brotherhood of Australian Miners and Under- |\n");
- Xprintf("| ground Workers is on strike against Acme Mines Ltd. due |\n");
- Xprintf("| to unfair treatment of its workers. Our Union demands |\n");
- Xprintf("| the following: Worker's wages be increased by 30%%, the |");
- Xprintf("\n") ;
- Xprintf("| week shall have only 4 working days, the working day |\n");
- Xprintf("| shall be reduced to 5 hours, triple wages for overtime |\n");
- Xprintf("| work and immunity from sacking for all Union members. |\n");
- Xprintf("| To discourage scabs and other strike breakers from |\n");
- Xprintf("| working during the strike, we have planted booby traps |\n");
- Xprintf("| through out the tunnels on this level. We do hope you |\n");
- Xprintf("| don't mind the mine being mined so it won't be mined. |\n");
- Xprintf("+---------------------------------------------------------+\n");
- X return ;
- X
- X }
- X}
- Xelse describe(n) ;
- X
- X} /* end of long_descp subroutine */
- END_OF_FILE
- if test 23440 -ne `wc -c <'longdsc.c'`; then
- echo shar: \"'longdsc.c'\" unpacked with wrong size!
- fi
- # end of 'longdsc.c'
- fi
- if test -f 'opener.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'opener.c'\"
- else
- echo shar: Extracting \"'opener.c'\" \(26609 characters\)
- sed "s/^X//" >'opener.c' <<'END_OF_FILE'
- X#define OPNR
- X#include "dink_sym.h"
- X#include "dink_glb.h"
- X
- Xvoid dialer(n)
- X/*****************************/
- X/* "dial" command" */
- X/* Version: Mk 1.1 */
- X/* 29 October 1989 */
- X/*****************************/
- Xint n ;
- X{
- X
- X/* deal with the question of "What is the combination?" */
- Xif (tag[V_what]) {
- Xprintf("I really don't know. You might try looking around for a\n") ;
- Xprintf("series of numbers. Sometimes that can be a clue to the\n") ;
- Xprintf("actual combination.\n") ;
- X return ;
- X}
- X
- X/* See if the combination was dialed in the right place */
- Xif ((n == R_office_mang)&&
- X (room[R_office_mang][M_rm_status] >= S_revealed)) {
- X if (tag[V_0] && tag[V_49] && tag[V_67] && tag[V_82]) {
- X printf ("Click!! \n");
- X room[R_office_mang][M_rm_status] = S_dialed ;
- X return ;
- X }
- Xprintf ("You turned the dial but nothing happened. I think you \n");
- Xprintf ("dialed the wrong thing. \n");
- X return ;
- X}
- Xprintf ("How am I supposed to dial that? \n");
- X} /* --- end of the "dialer" subroutine --- */
- X
- X
- Xvoid inventer()
- X/*****************************/
- X/* "inventory" command */
- X/* Version: Mk 1.0 */
- X/* 11 March 1989 */
- X/*****************************/
- X{
- X#if (PROTOTYPE)
- Xvoid objector(int) ;
- X#endif
- X
- Xregister int i;
- Xint i_ws, j_ws ;
- X
- Xi_ws = 0 ;
- Xj_ws = 0 ;
- Xfor (i = 0; i <= objcnt; i++) if (object[i][J_loc] == B_have) {
- X ++j_ws;
- X i_ws = i ;
- X } ;
- Xif ((j_ws == 0)&&(gleep_count == 0)) {
- X printf("You've got NOTHING!! \n") ;
- X return ;
- X}
- Xif (j_ws >= 1) {
- X if (j_ws == 1) {
- X printf("You are carrying ") ;
- X objector(i_ws);
- X printf ("\n") ;
- X }
- X else {
- X printf ("You are carrying the following: \n");
- X for (i = 0; i <= objcnt; i++) {
- X if (object[i][J_loc] == B_have) {
- X printf (" ") ;
- X objector(i);
- X printf ("\n") ;
- X }
- X }
- X }
- X}
- Xif (gleep_count > 0) {
- X if (gleep_count == 1) {
- X printf("You have one gleep.\n") ;
- X return ;
- X }
- X printf("You are carrying %d gleeps. \n",gleep_count) ;
- X}
- X
- X} /* --- end of the "inventor" subroutine --- */
- X
- Xvoid drinker()
- X/*****************************/
- X/* "drink" command */
- X/* Version: Mk 1.0 */
- X/* 11 March 1989 */
- X/*****************************/
- X{
- X#if (PROTOTYPE)
- Xvoid no_booze(void) ;
- X#endif
- X
- Xif (tag[V_can]) {
- X if (object[O_can][J_loc] == B_have) {
- X printf("The XXXX keeps on coming on ? \n") ;
- Xprintf("I think not, for there is no Fourex left for me to drink!\n") ;
- X }
- X else no_booze() ;
- X return ;
- X}
- X
- Xif (tag[V_bottle]) {
- X if (object[O_bottle][J_loc] == B_have) {
- Xprintf("Some greedy larrikin has drunk up all of the Black Swan! \n") ;
- X printf("Bad on Him! There is none left for me! \n") ;
- X return ;
- X }
- X no_booze() ;
- X return ;
- X}
- X
- Xif (tag[V_water]) {
- X printf("There is no water here that I am willing to drink.\n") ;
- X return ;
- X}
- X
- Xprintf ("What exactly do you want me to drink? \n");
- Xreturn;
- X
- X} /* --- end of the "drinker" subroutine --- */
- X
- Xvoid no_booze()
- X/*****************************/
- X/* Version: Mk 1.0 */
- X/* 7 December 1992 */
- X/*****************************/
- X{
- Xprintf ("You don't have it in your possession to drink!\n");
- Xreturn ;
- X} /* --- end of the "no_booze" subroutine --- */
- X
- X
- Xvoid reader(n)
- X/*****************************/
- X/* "read" command */
- X/* Version: Mk 1.2 */
- X/* 23 December 1992 */
- X/*****************************/
- X
- Xint n ;
- X{
- Xint k ;
- X
- X#if (PROTOTYPE)
- Xvoid rdtxt(int) ;
- X#endif
- X
- X/* reject an isolated "read" command */
- Xif (tag[V_VERB_ONLY]) {
- X printf ("What exactly do you want me to read? \n");
- X return;
- X}
- X
- Xfor (;;) {
- X /* map from the manager's office */
- X if (tag[V_map]) {
- X k = O_map_frag ;
- X break;
- X }
- X
- X /* Qadaffi's letter */
- X if (tag[V_letter]) {
- X k = O_letter ;
- X break ;
- X }
- X
- X /* paper from the safe */
- X if (tag[V_paper]) {
- X k = O_paper ;
- X break;
- X }
- X
- X /* Message on wall */
- X if ((tag[V_message] || tag[V_wall]) && (n == R_no_treasure)) {
- X k = O_message ;
- X rdtxt(k) ;
- X return ;
- X }
- X
- X /* Deal with unreadable objects */
- X printf("There is no way in which I can read that. \n");
- X return ;
- X} /* end of the infinite for loop */
- X
- Xif (object[k][J_loc] == B_have) rdtxt(k) ;
- Xelse printf ("I can't read it because it isn't in my possession. \n");
- X} /* --- end of the subroutine "reader" --- */
- X
- Xvoid unlocker(n)
- X/*****************************/
- X/* "unlock" command */
- X/* Version: Mk 1.1 */
- X/* 16 September 1989 */
- X/*****************************/
- Xint n ;
- X{
- X
- Xif (tag[V_VERB_ONLY]) {
- X printf ("What do you want me to unlock? \n");
- X return;
- X}
- X
- Xif (room[n][M_rm_type] == T_action_obj) {
- X switch (n) {
- X
- X /* Managers office */
- X case R_office_mang:
- X if (tag[V_safe]) {
- Xprintf("This is a combination type safe (no key hole). You must\n");
- Xprintf("dial a combination in order to open this safe. \n");
- X }
- X else
- Xprintf("You're wasting your time. You can't unlock that! \n");
- X return;
- X
- X /* office entrance */
- X case R_office_entr:
- X if (tag[V_door]) {
- X if (room[R_office_entr][M_rm_status] == S_open) {
- X printf("The door is already open! \n");
- X return;
- X }
- X if (room[R_office_entr][M_rm_status] == S_kicked) {
- X printf("The door has been kicked in! \n");
- X return;
- X }
- X if (room[R_office_entr][M_rm_status] == S_unlocked) {
- Xprintf("The door is already unlocked. However it is still closed! \n");
- X return;
- X }
- X /* The door has to still be unlocked */
- X if (tag[V_key]) {
- X if (object[O_key][J_loc] != B_have) {
- Xprintf("You don't have the key to this door in your possession! \n");
- X }
- X else {
- X printf("You turn the key in the lock and ") ;
- X printf("hear a satisfying \"click\".\n");
- X room[R_office_entr][M_rm_status] = S_unlocked ;
- X }
- X }
- X else printf ("With what shall I unlock the door? \n");
- X return;
- X }
- X
- X default:
- Xprintf("I don't think that is the sort of thing one unlocks.\n") ;
- X } /* end of "unlock" room scan switch */
- X} /* end of "unmovable action device" block */
- Xelse printf("There is nothing here that can be unlocked! \n");
- Xreturn ;
- X} /* --- end of the "unlocker" subroutine --- */
- X
- Xvoid closer(n)
- X/*****************************/
- X/* "close" command */
- X/* Version: Mk 1.0 */
- X/* 12 November 1988 */
- X/*****************************/
- Xint n ;
- X{
- X
- X/* scan "close" sentence */
- Xif (room[n][M_rm_type] != T_action_obj) {
- Xprintf("There is nothing here that can be closed! \n");
- X return;
- X}
- X
- Xif (tag[V_VERB_ONLY]) {
- X printf ("What exactly do you want me to close? \n");
- X return;
- X}
- X
- Xswitch (n) {
- X /* office door */
- X case R_office_entr:
- X if (!tag[V_door]) break ;
- X if (room[R_office_entr][M_rm_status] == S_kicked) {
- Xprintf("The door has been kicked in! It'll never be closed again.\n");
- X return;
- X }
- X if (room[R_office_entr][M_rm_status] == S_open) {
- X printf("The office door closes with a slam. \n");
- X room[R_office_entr][2] = R_wall ;
- X room[R_office_entr][M_rm_status] = S_closed ;
- X return ;
- X }
- X else printf("The office door is already closed! \n");
- X return ;
- X
- X /* managers office */
- X case R_office_mang:
- X if ((!tag[V_picture])&&(!tag[V_safe])) break;
- X if (tag[V_safe]) {
- X if (room[R_office_mang][M_rm_status] < S_dialed)
- X printf("The safe is already closed. \n");
- X else {
- X printf("The safe door closes and locks with a \"click\". \n");
- X room[R_office_mang][M_rm_status] = S_revealed ;
- X }
- X }
- X if (tag[V_picture]) {
- X if (room[R_office_mang][M_rm_status] == S_closed)
- X printf("The platypus picture is already closed. \n");
- X else {
- Xprintf("The picture swings flush against the wall, hiding the safe.\n");
- X room[R_office_mang][M_rm_status] = S_closed ;
- X }
- X }
- X return ;
- X
- X} /* end of the "close" switch */
- Xprintf ("I really don't see how one would close that? \n");
- Xreturn;
- X} /* --- end of the "closer" subroutine --- */
- X
- Xvoid opener(n)
- X/*****************************/
- X/* "open" command */
- X/* Version: Mk 2.1 */
- X/* 25 April 1990 */
- X/*****************************/
- Xint n ;
- X{
- Xregister int i ;
- X
- X#if (PROTOTYPE)
- Xvoid boom(void), ender(int), objector(int) ;
- X#endif
- X
- X/* deal with a terse command */
- Xif (tag[V_VERB_ONLY]) {
- X printf ("What exactly do you want me to open? \n");
- X return;
- X}
- X
- Xif (tag[V_can]) {
- X if (object[O_can][J_loc] == B_have)
- Xprintf("Some bugger has already drunk it up. The stubee is empty!\n");
- X else printf("You don't have a can to open! \n") ;
- X return;
- X}
- X
- Xif (tag[V_letter]) {
- X if (object[O_letter][J_loc] == B_have) {
- X boom() ; /* cause an explosion */
- Xprintf("It's not polite to read other people's mail!! As you lay\n") ;
- Xprintf("bleeding on the floor with your hands and arms blown away,\n") ;
- Xprintf("you realize that envelope actually contained a letter bomb!\n");
- Xprintf("(A trick widely used by terrorists in the 1970s). However\n");
- Xprintf("the knowledge does you little good since your spirit soon\n");
- Xprintf("departs this mortal coil.\n");
- X ender(F_died) ;
- X }
- X else printf("You don't have a letter to open!\n") ;
- X return ;
- X}
- X
- Xif (tag[V_bottle]) {
- X if (object[O_bottle][J_loc] == B_have)
- Xprintf("Some bugger has already drunk it up. The bottle is Empty! \n");
- X else printf("You don't have a bottle to open! \n") ;
- X return;
- X}
- X
- Xif (tag[V_umbrella]) {
- X if (object[O_umbrella][J_loc] == B_have) {
- Xprintf("You open the umbrella but find it's full of holes and\n");
- Xprintf("its clasp is broken. As soon as you release it, the\n");
- Xprintf("umbrella snaps shut.\n") ;
- X }
- X else printf("You don't have an umbrella to open! \n") ;
- X return;
- X}
- X
- X/* Now check to see if the location is consistent with the command */
- Xif (room[n][M_rm_type] != T_action_obj) {
- X printf ("I don't understand what you want me to open. \n") ;
- X return ;
- X}
- X
- Xswitch (n) {
- X /* office entrance (door) */
- X case R_office_entr:
- X if (tag[V_door]) {
- X switch (room[R_office_entr][M_rm_status]) {
- X case S_kicked:
- Xprintf("The door has been kicked in! You don't need to open it.\n");
- X return;
- X
- X case S_open:
- X printf("The door is already open! \n");
- X return ;
- X
- X case S_unlocked:
- Xprintf("As you push open the office door, the rusty hinges creak \n");
- Xprintf("from long disuse. Darkness and stale air seem to exude \n");
- Xprintf("from the vacant office. The way is free for you to enter. \n");
- X room[R_office_entr][2] = R_office_hall ;
- X room[R_office_entr][M_rm_status] = S_open ;
- X return ;
- X
- X case S_closed:
- Xprintf("The office door is locked tight.");
- Xprintf(" You need to unlock it with a key. \n");
- X return ;
- X } /* end of room status switch */
- X } /* end of the door "if" block */
- X break ;
- X
- X /* managers office */
- X case R_office_mang:
- X if ((!tag[V_picture])&&(!tag[V_safe])) {
- Xprintf("I don't understand how I would open that.\n") ;
- X return ;
- X }
- X
- X if (tag[V_picture]) {
- X switch (room[R_office_mang][M_rm_status]) {
- X case S_closed:
- Xprintf("You swing open the platypus picture revealing a large wall \n");
- Xprintf("safe with a combination dial. \n");
- X room[R_office_mang][M_rm_status] = S_revealed ;
- X break ;
- X default:
- Xprintf("The picture is already swung out. The problem is to open \n");
- Xprintf("the safe!! Hint: Dial in a combination. \n");
- X return ;
- X }
- X } /* end of the picture "if" block */
- X
- X if (tag[V_safe]) {
- X switch (room[R_office_mang][M_rm_status]) {
- X case S_closed:
- Xprintf("I can see no safe in this office for me to open. Perhaps\n");
- Xprintf("there is a safe hidden in this office somewhere.\n");
- X return ;
- X
- X case S_revealed:
- Xprintf("The safe is locked. You must first dial the combination\n");
- Xprintf("in order to open it. See if you can find the combination. \n");
- X return ;
- X
- X case S_dialed:
- X printf("The safe door swings open smoothly and easily. \n");
- X room[R_office_mang][M_rm_status] = S_open ;
- X sw_active = TRUE ;
- X for (i=0; i <= objcnt; i++)
- X if (object[i][J_loc] == B_in_safe) {
- Xprintf ("Inside the safe, you see the following: \n");
- X for (i=0; i <= objcnt; i++) {
- X if (object[i][J_loc] == B_in_safe) {
- X printf (" ") ;
- X objector(i);
- X printf ("\n") ;
- X }
- X }
- X return ;
- X }
- X printf("---The safe is empty.--- \n");
- X return ;
- X
- X case S_open:
- X printf("The safe is already open! \n");
- X return ;
- X } /* end of the "safe" status switch */
- X } /* end of the safe "if" block */
- X return ; /* this return statement must remain */
- X
- X /* Lift door(s) */
- X case R_lift_entr:
- X if (tag[V_door]||tag[V_lift]) {
- Xprintf("It is not exactly clear how I would open these doors.\n") ;
- Xprintf("However I see a push button next to the lift doors.\n") ;
- Xprintf("Perhaps if I pressed the button something would happen.\n") ;
- X }
- X else printf("I'm confused about what I should open.\n");
- X return ;
- X
- X} /* end of the "open" room switch */
- Xprintf ("I see nothing here that I can open. \n") ;
- X} /* --- end of the "opener" subroutine --- */
- X
- Xvoid boom()
- X{
- Xprintf("\n\n");
- Xprintf("BBBBBB OOOOO OOOOO MM MM !!!\n");
- Xprintf("B BB OO OO OO OO M M M M !!!\n");
- Xprintf("B BB OO OO OO OO M M M M !!!\n");
- Xprintf("BBBBBB OO OO OO OO M M M M !!!\n");
- Xprintf("B BB OO OO OO OO M MM M !!!\n");
- Xprintf("B BB OO OO OO OO M M\n");
- Xprintf("BBBBBB OOOOO OOOOO M M !!!\n\n");
- X} /* --- end of the "boom" subroutine --- */
- X
- Xvoid gleeper(n)
- X/********************************************/
- X/* */
- X/* Gleeper Subroutine */
- X/* */
- X/* Software by Gary A. Allen, Jr. */
- X/* Version: Mk 1.00 */
- X/* (c) Copyright 1989 by Gary A. Allen, Jr. */
- X/* */
- X/********************************************/
- Xint n ;
- X{
- Xregister int i ;
- Xint count ;
- Xstatic int sw_glp_st = FALSE, cnt_down = 0 ;
- X
- X/* Gleep display routine */
- Xcount = room[n][M_gleep] ;
- X
- Xif (((object[O_torch][J_loc] == B_have)&&object[O_torch][J_property])||
- X (n < 186)||(n > 202)) {
- X if (count != 0) {
- X sw_glp_st = TRUE ; /* gleeps can now multiply */
- X if (count != 1)
- X printf("There are %d gleeps here. \n",count) ;
- X else printf("There is a gleep here. \n") ;
- X return ;
- X }
- X}
- X
- X/* Gleep reproduction routine */
- Xif (sw_glp_st == TRUE) {
- X if (++cnt_down > 5) {
- X cnt_down = 0 ;
- X for (i = 0; i <= 9; i++) {
- X if (room[gleep_spot[i]][M_gleep] == 0) continue;
- X if (room[gleep_spot[i]][M_gleep] > 10000)
- X ++room[gleep_spot[i]][M_gleep] ;
- X else room[gleep_spot[i]][M_gleep] <<= 1 ;
- X }
- X }
- X}
- X} /* --- end of "gleeper" subroutine --- */
- X
- Xvoid clip_in(ammo_flag)
- X/********************************************/
- X/* */
- X/* Clip_In Subroutine */
- X/* */
- X/* Software by Gary A. Allen, Jr. */
- X/* Version: Mk 2.00 */
- X/* (c) Copyright 1990 by Gary A. Allen, Jr. */
- X/* */
- X/********************************************/
- X
- Xint ammo_flag ;
- X{
- X/* ammo clip insertion routine */
- Xif (object[O_rifle][J_loc] != B_have) {
- Xprintf("Galah!! You don't have a rifle to put an ammo clip into.\n");
- X return ;
- X}
- Xif (clip_flag != F_no_clip) {
- Xprintf("There is already an ammo clip in the rifle. \n") ;
- X return ;
- X}
- Xif (((object[O_clip][J_loc] != B_have)&&(ammo_flag == F_normal_clip))||
- X((object[O_org_clip][J_loc] != B_have)&&(ammo_flag == F_org_clip))) {
- Xprintf("You don't possess an ammo clip to put into the rifle.\n");
- X return ;
- X}
- X/* actually load the clip into the rifle */
- Xobject[O_rifle][J_type] = Z_alias ;
- Xcarry_count-- ;
- Xcarry_weight -= object[O_clip][J_weight] ;
- Xif (ammo_flag == F_normal_clip) {
- X object[O_clip][J_loc] = B_unmade ;
- X clip_flag = F_normal_clip ;
- X object[O_rifle][J_property] = object[O_clip][J_property] ;
- X}
- Xelse {
- X object[O_org_clip][J_loc] = B_unmade ;
- X clip_flag = F_org_clip ;
- X object[O_rifle][J_property] = object[O_org_clip][J_property] ;
- X}
- Xprintf("The ammunition clip slides into the rifle with a \"click\".\n");
- Xprintf("You have %d bullets in the clip \n",
- X object[O_rifle][J_property]) ;
- Xif (object[O_rifle][J_property] > 0)
- X printf("You cycle the M16's bolt once to chamber a round.\n");
- Xreturn ;
- X} /* --- end of the "clip_in" subroutine --- */
- X
- Xvoid clip_out(n)
- X/********************************************/
- X/* */
- X/* Clip_Out Subroutine */
- X/* */
- X/* Software by Gary A. Allen, Jr. */
- X/* Version: Mk 1.00 */
- X/* (c) Copyright 1989 by Gary A. Allen, Jr. */
- X/* */
- X/********************************************/
- Xint n ;
- X{
- Xint ammo_flag ;
- X
- X/* remove clip from rifle */
- Xif (object[O_rifle][J_loc] != B_have) {
- X printf("You Bloody Galah! ") ;
- X printf("You don't have a rifle in your possession!\n");
- Xreturn ;
- X}
- Xif (clip_flag == F_no_clip) {
- X printf("There is no clip in the rifle. \n") ;
- Xreturn ;
- X}
- X/* eject the clip from the rifle */
- Xobject[O_rifle][J_type] = Z_normal ;
- Xif (clip_flag == F_normal_clip) {
- X object[O_clip][J_loc] = n ;
- X ammo_flag = F_normal_clip ;
- X}
- Xelse {
- X object[O_org_clip][J_loc] = n ;
- X ammo_flag = F_org_clip ;
- X}
- X++room[n][M_obj_cnt] ;
- Xclip_flag = F_no_clip ;
- Xprintf("You press the \"eject\" button on the rifle and the ") ;
- Xprintf("magazine falls to the ground.\n") ;
- Xif (object[O_rifle][J_property] > 0) {
- Xprintf("You then cycle the M16's bolt once to clear the chamber. ");
- Xprintf("The unfired round\n") ;
- Xprintf("is ejected from the breech and rolls out of sight. \n") ;
- X if (ammo_flag == F_normal_clip)
- X object[O_clip][J_property] =
- X --object[O_rifle][J_property] ;
- X else object[O_org_clip][J_property] =
- X --object[O_rifle][J_property] ;
- X object[O_rifle][J_property] = 0 ;
- X}
- Xreturn ;
- X} /* --- end of the "clip_out" subroutine --- */
- X
- Xvoid igniter(n)
- X/********************************************/
- X/* */
- X/* Igniter Subroutine */
- X/* */
- X/* Software by Gary A. Allen, Jr. */
- X/* Version: Mk 1.00 */
- X/* (c) Copyright 1989 by Gary A. Allen, Jr. */
- X/* */
- X/********************************************/
- X
- Xint n ;
- X{
- X#if (PROTOTYPE)
- Xvoid switcher(int) ;
- Xlong time(int) ;
- X#endif
- X
- X/* reject single verb command */
- Xif (tag[V_VERB_ONLY]) {
- X printf("What exactly do you want me to set alight?\n") ;
- X return ;
- X}
- X
- X/* deal with 'light torch' command */
- Xif (tag[V_torch]) {
- X switcher(n) ;
- X return ;
- X}
- X
- X/* see if the player has or requested matches */
- Xif (!tag[V_match]) {
- Xprintf("What am I to light it with?\n") ;
- Xprintf("(I am not prepared to rub two sticks together.)\n") ;
- X return ;
- X}
- Xif (object[O_matches][J_loc] != B_have) {
- Xprintf("I have no matches!\n") ;
- X return ;
- X}
- Xelse {
- X/* reject spurious "ignite" command */
- X if ((!tag[V_cap])&&(!tag[V_dynamite])&&
- X (sent[2] != V_LINE_END)) {
- Xprintf("It would be a fire hazard to set that alight.\n");
- X return ;
- X }
- X
- X/* deal with spurious "light dynamite with match" */
- Xif (tag[V_dynamite]&&(object[O_dynamite][J_loc] != B_have)) {
- Xprintf("You have no dynamite to ignite.\n") ;
- X return ;
- X}
- X
- X/* deal with spurious "light cap with match" */
- Xif (tag[V_cap]&&(object[O_dynamite][J_loc] != B_have)&&
- X (object[O_cap][J_loc] != B_have)) {
- Xprintf("You don't have one to ignite.\n") ;
- X return ;
- X}
- X
- X/* light up the match(es) */
- X if (tag[V_PLURAL]) {
- Xprintf("You open up the match box and strike ALL of the matches.\n");
- X object[O_matches][J_loc] = B_destroyed ;
- X }
- X else {
- Xprintf("You take one match from the match box and ignite it.\n") ;
- X }
- X}
- X
- X/* see if player selected burnable objects */
- Xif (tag[V_cap]&&(object[O_cap][J_loc] == B_have)) {
- Xprintf("You then ignite the fuse of the blasting cap.\n\n");
- Xprintf("Ssssssssssssssssssssssss........\n");
- X clock_explode = time(0) + 11 ;
- X sw_clock = TRUE ;
- X flag_clock = V_cap ;
- X return ;
- X}
- X
- Xif ((tag[V_cap]||tag[V_dynamite])&&
- X (object[O_dynamite][J_loc] == B_have)) {
- X if (object[O_dynamite][J_type] == Z_alias) {
- Xprintf("You then ignite the fuse of the dynamite's blasting cap....\n");
- Xprintf("You need to very quickly get very far away from this thing!!");
- Xprintf("\n\nSsssssssssssssssssssssss........\n");
- X clock_explode = time(0) + 11 ;
- X sw_clock = TRUE ;
- X flag_clock = V_dynamite ;
- X return ;
- X }
- X else {
- Xprintf("You then ignite the dynamite. Which is an odd thing\n");
- Xprintf("to do since it doesn't have a blasting cap in it. The\n");
- Xprintf
- X ("\"dynamite\" (which is actually a very safe mining explosive)\n");
- Xprintf("burns for a few minutes, billowing out smelly black smoke\n");
- Xprintf("and eventually goes out leaving a few scant ashes behind.\n") ;
- X object[O_dynamite][J_loc] = B_destroyed ;
- X return ;
- X }
- X}
- X
- X} /* -- end of the "igniter" subroutine --- */
- X
- Xvoid hold_it()
- X/********************************************/
- X/* */
- X/* Wait Subroutine */
- X/* */
- X/* Software by Gary A. Allen, Jr. */
- X/* Version: Mk 1.00 */
- X/* (c) Copyright 1989 by Gary A. Allen, Jr. */
- X/* */
- X/********************************************/
- X
- X{
- X#if (PROTOTYPE)
- Xchar getch(void) ;
- X#endif
- X
- X#ifdef __TURBOC__
- X/* Stop scrolling the screen until the user is ready */
- Xprintf(" [Press any key to continue]\r") ;
- Xgetch() ;
- Xprintf(" \n") ;
- X#endif
- X
- X#ifndef __TURBOC__
- Xprintf(" [Press RETURN to continue]\n") ;
- Xgetchar() ;
- X#endif
- X
- X} /* --- end of the "hold_it" subroutine --- */
- X
- Xvoid eater()
- X/********************************************/
- X/* */
- X/* Eater Subroutine */
- X/* */
- X/* Software by Gary A. Allen, Jr. */
- X/* Version: Mk 1.00 */
- X/* (c) Copyright 1989 by Gary A. Allen, Jr. */
- X/* */
- X/********************************************/
- X{
- X
- X#if (PROTOTYPE)
- Xvoid ender(int) ;
- X#endif
- X
- X/* reject single verb command */
- Xif (tag[V_VERB_ONLY]) {
- X printf("What exactly do you want me to swallow?\n") ;
- X return ;
- X}
- X
- X/* deal with "eat (atropine) pill(s)" command */
- Xif (tag[V_pill]) {
- X if (object[O_pills][J_loc] != B_have) {
- Xprintf("You don't have the atropine pills in your possesion!\n") ;
- X return ;
- X }
- X if (tag[V_PLURAL]) {
- Xprintf("You remove ALL of the pills from the packet and swallow\n");
- Xprintf("the lot. For a couple of minutes nothing happens, then you\n");
- Xprintf("start seeing double and have nervous twitches. You then\n");
- Xprintf("start shaking violently and collapse to the ground.\n") ;
- Xprintf("Eventually you pass out and expire from atropine poisoning.\n");
- X ender(F_died) ;
- X }
- X if (--pill_count <= 0 ) {
- X object[O_pills][J_loc] = B_destroyed ;
- X carry_count-- ;
- X carry_weight -= object[O_pills][J_weight] ;
- Xprintf("You swallow the last atropine pill and throw away the empty\n");
- Xprintf("packet which disappears from sight. ") ;
- X }
- Xelse printf("You swallow one atropine pill. ") ;
- X i_poison += 10 ;
- X if (i_poison >= 30) {
- Xprintf("\nAfter a moment you have a violent seizure and die.\n") ;
- X ender(F_died) ;
- X }
- X if (i_poison >= 20) {
- Xprintf("\nYou begin to shake violently and can barely stand.\n") ;
- X return ;
- X }
- X if (i_poison >= 15) {
- Xprintf("\nYour hands become a bit jittery and your vision blurred.\n") ;
- X return ;
- X }
- X printf("The drug has no ill effect.\n") ;
- X return ;
- X}
- Xelse
- Xprintf("I am not inclined towards putting that into my mouth!\n") ;
- X
- X} /* --- end of the "eater" subroutine --- */
- X
- Xvoid ender(i_quit)
- X/********************************************/
- X/* */
- X/* Ender Subroutine */
- X/* */
- X/* Software by Gary A. Allen, Jr. */
- X/* Version: Mk 1.00 */
- X/* (c) Copyright 1989 by Gary A. Allen, Jr. */
- X/* */
- X/********************************************/
- X
- Xint i_quit ;
- X{
- X#if (PROTOTYPE)
- Xvoid hold_it(void), new_score(void), exit(int) ;
- X#endif
- X
- X/* get last score */
- Xnew_score() ;
- X
- Xif (gleep_score != 0) sw_active = TRUE ;
- X
- Xif (i_quit == F_died) {
- X hold_it() ;
- X score -= 100 ;
- Xprintf ("\nOh Dear! You've just turned yourself into a corpse! \n\n");
- Xprintf ("For getting killed you lose 100 points. \n\n") ;
- X}
- X
- X/* Scoring Block */
- Xfor(;;) {
- Xif (!sw_active) {
- X if (score == 0) {
- X printf("You concluded the game with no points. ") ;
- X printf("What a pitiful performance!!\n") ;
- X }
- X else {
- Xprintf("You concluded the game with a miserable negative score\n") ;
- Xprintf("of %d points. Your score was better BEFORE you \n",score);
- Xprintf("started playing (need I say more on how this reflects\n");
- Xprintf("upon your limited aptitude at Dinkum).\n") ;
- X }
- X break ; /* drop out of the scoring block */
- X}
- X
- Xif (score == 0) {
- Xprintf("You concluded the game with no points ") ;
- X if (gleep_score == 0) {
- Xprintf("and didn't drop a single gleep\n") ;
- Xprintf("into the gleep tank. The word \"embarrassing\" sums it up!\n") ;
- X }
- X else {
- X if (gleep_score > 1) {
- Xprintf("but you did put %d gleeps\n",gleep_score) ;
- Xprintf("into the gleep tank.\n") ;
- X }
- X else {
- Xprintf("but you did manage to find a gleep\n") ;
- Xprintf("and put it in the gleep tank, (Hah!! What an achievement!).\n");
- X }
- X }
- X}
- X
- Xelse {
- Xif (score > 0)
- Xprintf ("You concluded the game with %d points",score);
- Xelse {
- Xprintf("You concluded the game with a miserable negative score\n") ;
- Xprintf("of %d points. Your score was better BEFORE you \n",score);
- Xprintf("started playing (need I say more on how this reflects\n");
- Xprintf("upon your limited aptitude at Dinkum). You ") ;
- X if (gleep_score == 0) {
- Xprintf("also failed to\nget any gleeps into the tank. At least ");
- Xprintf("you're consistent.\n\n") ;
- X }
- X else {
- Xprintf("managed\nto get something into the gleep tank. However ");
- Xprintf("it hardly\nmatters, considering your poor score.\n\n") ;
- X }
- X break ; /* drop out of the scoring block */
- X}
- X if (gleep_score == 0)
- Xprintf(".\nHowever you placed no gleeps in the gleep tank.\n") ;
- X else {
- X if (gleep_score > 1) {
- Xprintf (" and placed %d gleeps\n",gleep_score) ;
- Xprintf ("in the gleep tank. Good on you, Mate!\n") ;
- X }
- X else {
- Xprintf(" but you did manage to find a gleep\n") ;
- Xprintf("and put it in the gleep tank.\n") ;
- X }
- X }
- X}
- Xbreak ; /* drop out of the scoring block */
- X} /* end of the scoring block */
- X
- X/* Closing Remark */
- Xprintf("\nDinkum has ended. If you are interested in more ") ;
- Xprintf("information\nabout this program type: dinkum -h\n") ;
- Xexit(0);
- X
- X} /* --- end of "ender" routine --- */
- END_OF_FILE
- if test 26609 -ne `wc -c <'opener.c'`; then
- echo shar: \"'opener.c'\" unpacked with wrong size!
- fi
- # end of 'opener.c'
- fi
- echo shar: End of archive 5 \(of 7\).
- cp /dev/null ark5isdone
- MISSING=""
- for I in 1 2 3 4 5 6 7 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 7 archives.
- rm -f ark[1-9]isdone
- else
- echo You still need to unpack the following archives:
- echo " " ${MISSING}
- fi
- ## End of shell archive.
- exit 0
-