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: v15i022: dinkum - australian text adventure game, Part02/06
- Message-ID: <3980@master.CNA.TEK.COM>
- Date: 29 Nov 92 20:30:50 GMT
- Sender: news@master.CNA.TEK.COM
- Lines: 1383
- Approved: billr@saab.CNA.TEK.COM
- Xref: uunet comp.sources.games:1521
-
- Submitted-by: Gary Allen <gary@sun.mech.uq.oz.au>
- Posting-number: Volume 15, Issue 22
- Archive-name: dinkum/Part02
- 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 2 (of 6)."
- # Contents: longdsc.c makefile objlook.c
- # Wrapped by billr@saab on Sun Nov 29 12:25:48 1992
- 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'\" \(33573 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/* long description routine */
- Xint n ;
- X{
- X#ifdef __TURBOC__
- 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_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; /* turn off long description */
- 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; /* turn off long description */
- 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; /* turn off long description */
- 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; /* turn off long description */
- 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; /* turn off long description */
- Xprintf("You have walked into a room with a large plastic tank set ");
- Xprintf("in the middle.\nThe tank is about two meters 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; /* turn off long description */
- 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; /* turn off long description */
- 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 centimeters 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; /* turn off long description */
- 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 millimeter 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; /* turn off long description */
- 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; /* turn off long description */
- 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; /* turn off long description */
- 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; /* turn off long description */
- 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; /* turn off long description */
- 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; /* turn off long description */
- 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; /* turn off long description */
- 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 centimeters 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; /* turn off long description */
- 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; /* turn off long description */
- 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 one glowing pale green. Beneath\n");
- Xprintf("this button is some masking tape that was obviously placed ") ;
- Xprintf("here 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; /* turn off long description */
- Xprintf("You have walked into an elevated chamber with strange ") ;
- Xprintf("glowing hexagons on\nthe floor which are about half a ") ;
- Xprintf("meter 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_was_long; /* turn off 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") ;
- Xreturn ;
- X
- Xcase R_guard:
- Xroom[n][M_rm_type] = T_was_long; /* turn off long description */
- 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; /* turn off long description */
- 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_was_long; /* turn off long description */
- 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\n");
- Xprintf("octogonal in layout with huge flaming torches set in brass\n");
- Xprintf("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 meters 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; /* turn off long description */
- 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 */
- X
- Xvoid pusher(n_arg)
- X/********************************************************************/
- X/* */
- X/* --- The Pusher Subroutine --- */
- X/* */
- X/* Software by Gary A. Allen, Jr. 14 June 1989, Version: Mk 1.2 */
- X/* (c) Copyright 1988 by Gary A. Allen, Jr. */
- X/* */
- X/********************************************************************/
- Xint *n_arg ;
- X{
- Xregister int i ;
- Xint n ;
- X
- X/* pass the room pointer */
- Xn = *n_arg ;
- X
- X/* reject an isolated "push" command */
- Xif (tag[V_VERB_ONLY]) {
- X printf ("What exactly do you want me to push? \n");
- X return;
- X}
- X
- Xswitch (n) {
- X
- X /* Lift entrance at the ground level */
- X case R_lift_entr:
- X if (tag[V_green_button]) goto no_green ;
- X if (!tag[V_button]) {
- X if (!tag[V_blue_button]) {
- Xprintf ("I don't see why I should push that! \n");
- X return ;
- X }
- X else goto nothing ;
- X }
- X if (room[R_lift_entr][M_rm_status] == S_flashing ) {
- Xprintf ("You push the call button and there is a loud \"whirr\" from ");
- Xprintf ("an electric motor. \nThe massive steel doors slide open ");
- Xprintf ("revealing a huge lift that could hold \ntwenty men at once. ");
- Xprintf ("The way is now open for you to enter. \n");
- X room[R_lift_entr][M_rm_status] = S_open ;
- X room[R_lift_entr][2] = R_lift_inside ;
- X break ; }
- X else {
- Xprintf("You pushed the lift call button, but nothing happened.\n");
- Xprintf("I think the electrical power has been turned off at the\n") ;
- Xprintf("circuit breaker.\n") ;
- X break ; }
- X
- X /* Lift Compartment */
- X case R_lift_inside:
- X if (tag[V_green_button]) goto no_green ;
- X
- X /* scan push sentence */
- X /* zero level */
- X if (tag[V_0]) {
- X if (room[R_lift_inside][M_rm_status]== S_L0) {
- Xprintf ("You pushed the flashing button, but nothing happened.\n");
- X break ; }
- Xprintf ("The steel doors slam shut and you feel heavy as the lift ");
- Xprintf ("accelerates \nupwards. Finally the lift jerks to a halt ");
- Xprintf ("and the doors whirr open. \nSunlight is streaming in. ");
- Xprintf ("Once again you are breathing the fresh air.\n");
- X room[R_lift_inside][M_rm_status] = S_L0;
- X room[R_lift_inside][3] = R_lift_entr;
- X room[R_lift_inside][7] = R_lift_entr;
- X return ;
- X }
- X
- X /* forty-ninth level */
- X if (tag[V_49]) {
- X if (room[R_lift_inside][M_rm_status]== S_L49) {
- Xprintf ("You pushed the forty-nine button, but nothing happened.\n");
- X return ;
- X }
- X room[R_lift_inside][M_rm_status] = S_L49 ;
- X room[R_lift_inside][3] = R_L49_entr;
- X room[R_lift_inside][7] = R_L49_entr;
- Xdecp2:
- Xprintf ("The steel doors slam shut and you feel the vibration of ");
- Xprintf ("the lift \nmoving in its shaft. Finally the lift jerks ");
- Xprintf ("to a halt and the doors whirr open. \n");
- X return ;
- X }
- X
- X /* sixty-seventh level */
- X if (tag[V_67]) {
- X if (room[R_lift_inside][M_rm_status]== S_L67) {
- Xprintf ("You pushed the sixty-seven button, but nothing happened.\n");
- X return ;
- X }
- X room[R_lift_inside][M_rm_status] = S_L67;
- X room[R_lift_inside][3] = R_L67_entr;
- X room[R_lift_inside][7] = R_L67_entr;
- X goto decp2 ;
- X }
- X
- X /* eighty-second level */
- X if (tag[V_82]) {
- X if (room[R_lift_inside][M_rm_status]== S_L82) {
- Xprintf ("You pushed the eighty-two button, but nothing happened.\n");
- X return ;
- X }
- X room[R_lift_inside][M_rm_status] = S_L82;
- X room[R_lift_inside][3] = R_L82_entr;
- X room[R_lift_inside][7] = R_L82_entr;
- Xprintf ("The steel doors slam shut and you feel a sense of ");
- Xprintf ("weightlessness as \nthe lift plummets down the mine shaft. ");
- Xprintf ("Finally the lift comes to a halt \n");
- Xprintf ("and the doors whirr open. \n");
- X return ;
- X }
- X if (tag[V_blue_button]) goto nothing ;
- Xprintf ("This lift can go only to levels 0, 49, 67, or 82 \n");
- X return ;
- X
- X /* inside the closet at the Iranian Parliament */
- X case R_closet:
- X if (tag[V_green_button]) goto no_green ;
- X if (tag[V_blue_button]||tag[V_button]) {
- X /* Is the command for the black cube */
- X if (object[O_cube][J_loc] != B_have)
- X goto no_switch ;
- Xprintf("There is a bright flash of light! Then suddenly you are\n");
- Xprintf("back in the hexagon chamber of the ancient spaceship.\n\n");
- X *n_arg = R_transport ;
- X return ;
- X }
- X else goto no_switch ;
- X
- X
- X /* the transporter control panel room */
- X case R_panel:
- X if (tag[V_button]) {
- Xwhich_button:
- Xprintf("Which button do you want me to push? \n") ;
- X return;
- X }
- X if (tag[V_blue_button]) {
- X if (object[O_cube][J_loc]==B_have) goto cubic ;
- X else goto no_cube ;
- X }
- X if (tag[V_green_button]) {
- X if (sw_transport != TRUE) {
- Xprintf("Lots of the \"Sanskrit\" text is flashing by on the display\n");
- Xprintf("panel's CRTs. There is a whirring noise coming out of the\n");
- Xprintf("equipment around you which is increasing in both loudness\n");
- Xprintf("and pitch. You've turned something on, that's for sure!\n") ;
- X sw_transport = TRUE ;
- X return ;
- X }
- X else goto nothing ;
- X }
- X default:
- X /* Semtex explosive detector */
- X if (tag[V_detector] || tag[V_yellow_button] ||
- X ((object[O_cube][J_loc] != B_have) &&
- X (object[O_detector][J_loc] == B_have))) {
- X if (object[O_detector][J_loc] == B_have)
- X goto semtex ;
- X else {
- Xprintf("You don't have the detector in your possession.\n") ;
- X return ;
- X }
- X }
- X /* Transporter return device */
- X if (object[O_cube][J_loc] == B_have) {
- X if ((object[O_detector][J_loc] == B_have) &&
- X (!tag[V_blue_button]))
- X goto which_button ;
- X goto cubic ;
- X }
- X if (tag[V_blue_button]) goto no_cube ;
- X if (tag[V_green_button]) goto no_green ;
- X
- Xprintf ("You can push as much as you like, but nothing will happen.\n");
- X} /* end of the switch block */
- Xreturn;
- X
- X/* press Semtex detector button */
- Xsemtex:
- Xprintf("You press the button on the Semtex explosive detector and\n");
- Xfor (i = 0; i <= 9; i++) if ((n == i+207)||(n == i+228)) {
- X if (room[227-i][M_rm_type] == T_lethal) {
- X printf("hear a \"beep, beep, beep\".\n") ;
- X return ;
- X }
- X}
- Xprintf("the yellow light flashed.\n") ;
- Xreturn;
- X
- X/* press cube button in wrong place */
- Xcubic:
- Xprintf("You press the button on the cube but nothing happens.\n");
- Xreturn;
- X
- X/* no switch */
- Xno_switch:
- Xprintf("There is nothing here with a push button switch.\n");
- Xreturn;
- X
- X/* no cube */
- Xno_cube:
- Xprintf("You don't have the cube with the blue button in your") ;
- Xprintf(" possession!\n") ;
- Xreturn;
- X
- X/* no green button */
- Xno_green:
- Xprintf("I see no green button to push!\n");
- Xreturn;
- X
- X/* black cube in wrong room routine or green button pushed twice */
- Xnothing:
- Xprintf("Nothing happens!\n");
- X} /* --- end of the "pusher" subroutine --- */
- X
- X
- Xvoid switcher(n)
- X/********************************************************************/
- X/* */
- X/* --- The Switcher Subroutine --- */
- X/* */
- X/* */
- X/* Software by Gary A. Allen, Jr. 29 October 1989 Version: Mk 1.4 */
- X/* (c) Copyright 1988 by Gary A. Allen, Jr. */
- X/* */
- X/********************************************************************/
- Xint n ;
- X{
- Xint flag_switch, flag_rifle_md ;
- X
- X#ifdef __TURBOC__
- Xvoid dialer(int) ;
- X#endif
- X
- X/* deal with single verb commands */
- Xif (tag[V_VERB_ONLY]) {
- X if (tag[V_turn]) printf("Turn what?\n") ;
- X if (tag[V_set]) printf("Set what?\n") ;
- X if (tag[V_select]) printf("Select what?\n") ;
- X if (tag[V_switch]) printf("Switch what?\n") ;
- X return ;
- X}
- X
- X/* Deal with changing the safety on the rifle */
- Xif (tag[V_safety]) {
- X if (object[O_rifle][J_loc] == B_have) {
- X if (tag[V_off]) {
- X rifle_flag = F_single ;
- Xprintf("The M16 rifle is set to single shot mode ") ;
- Xprintf("with the safey off.\n") ;
- X return ;
- X }
- X if (tag[V_on]) {
- X rifle_flag = F_safety ;
- Xprintf("The M16 rifle's safety has been turned on.\n") ;
- X return ;
- X }
- X printf("How do you want the safety set?\n") ;
- X }
- X else printf("You're not holding the rifle!\n") ;
- X return ;
- X}
- X
- X/* deal with special case "turn (safe) dial 0 49 67 82" */
- Xif (tag[V_turn] && tag[V_dial] && (!tag[V_rifle])) {
- X dialer(n) ;
- X return ;
- X}
- X
- X/* deal with special case "turn safe ..." */
- Xif (tag[V_turn] && (!tag[V_dial]) && tag[V_safe]) {
- X if (n != R_office_mang) {
- Xprintf("There is no safe here to turn!\n") ;
- X return ;
- X }
- Xprintf("Since the safe is set in a concrete wall, turning it would\n");
- Xprintf("be rather difficult! Perhaps I should turn the safe's\n") ;
- Xprintf("dial instead?\n") ;
- X return ;
- X}
- X
- X/* initialize the local switches */
- Xflag_switch = F_no_argument ;
- Xif (tag[V_on]) flag_switch = TRUE ;
- Xif (tag[V_off]) flag_switch = FALSE ;
- Xif (verb == V_light) flag_switch = TRUE ;
- X
- Xflag_rifle_md = F_no_argument ;
- Xif (tag[V_safe]) flag_rifle_md = F_safety ;
- Xif (tag[V_triple]) flag_rifle_md = F_triple ;
- Xif (tag[V_single]) flag_rifle_md = F_single ;
- Xif (tag[V_auto]) flag_rifle_md = F_auto ;
- X
- Xif ((flag_switch == F_no_argument)&&(flag_rifle_md == F_no_argument)) {
- Xprintf("You will have to be a little more specific than that. \n") ;
- X return ;
- X}
- X
- X/* see if it is a simple "on/off" power equipment switch command */
- Xif ((!tag[V_torch])&&(!tag[V_rifle])&&
- X (flag_rifle_md == F_no_argument)) {
- Xif (n == R_store_room) {
- X /* The circuit breaker is switched off */
- X if (flag_switch == FALSE) {
- X if (room[R_store_room][M_rm_status] == S_off) {
- X printf ("The circuit breaker is already turned off! \n");
- X return ; }
- X else {
- Xprintf ("As you pull the switch lever, there is a bright blue \n");
- Xprintf ("arc and then all of the lights go out. \n");
- X room[R_store_room][M_rm_status] = S_off ;
- X room[R_lift_entr][M_rm_status] = S_closed ;
- X return; }
- X }
- X /* The circuit breaker is switched on */
- X if (flag_switch == TRUE) {
- X if (room[R_store_room][M_rm_status] == S_on) {
- X printf ("The circuit breaker is already turned on! \n");
- X return; }
- X else {
- Xprintf ("As you pull the switch lever, there is a loud \"CLUNK\" \n");
- Xprintf ("and you see a POWER ON light glowing. \n");
- X room[R_store_room][M_rm_status] = S_on ;
- X room[R_lift_entr][M_rm_status] = S_flashing ;
- X return; }
- X }
- X}
- Xgoto garbage_cmd ;
- X} /* end of the simple "on/off" switch group */
- X
- X/* the switch command is to select an M16 rifle firing mode */
- Xif (tag[V_rifle]) {
- X if (object[O_rifle][J_loc] == B_have) {
- X
- X /* turn the rifle on naively */
- X if ((flag_switch==TRUE)||
- X ((flag_rifle_md==F_safety)&&(flag_switch==FALSE))) {
- X if (rifle_flag != F_safety) {
- Xprintf("The rifle's safety is already off! \n") ;
- X return;
- X }
- X rifle_flag = F_single ;
- Xprintf("The M16 rifle has been set to single shot mode. \n") ;
- X return ;
- X }
- X/* turn on the safety */
- X if ((flag_switch==FALSE)||
- X ((flag_rifle_md==F_safety)&&((flag_switch==TRUE)||
- X (flag_switch==F_no_argument)))) {
- X if (rifle_flag == F_safety) {
- Xprintf("The rifle's safety is already on! \n") ;
- X return;
- X }
- X rifle_flag = F_safety ;
- Xprintf("The M16 rifle's safety has now been turned on. \n") ;
- X return ;
- X }
- X /* select single shot mode */
- X if (flag_rifle_md == F_single) {
- X if (rifle_flag == F_single) {
- Xprintf("The rifle has already been set to single shot mode.\n");
- X return;
- X }
- X rifle_flag = F_single ;
- Xprintf("The M16 rifle has been set to single shot mode. \n") ;
- X return ;
- X }
- X /* select triple fire mode */
- X if (flag_rifle_md == F_triple) {
- X if (rifle_flag == F_triple) {
- Xprintf("The rifle has already been set to triple fire mode.\n");
- X return;
- X }
- X rifle_flag = F_triple ;
- Xprintf("The M16 rifle has been set to triple fire mode. \n") ;
- X return ;
- X }
- X /* select to fully automatice mode */
- X if (flag_rifle_md == F_auto) {
- X if (rifle_flag == F_auto) {
- Xprintf("The rifle has already been set to fully automatic.\n");
- X return;
- X }
- X rifle_flag = F_auto ;
- Xprintf("The M16 rifle has been set to fully automatic. \n") ;
- X return ;
- X }
- X }
- X /* This is the rifle nonpossession error handler */
- X else {
- Xprintf("You don't have a rifle in your possession! \n") ;
- X return ;
- X }
- X} /* end of the rifle mode switching block */
- X
- X/* the switch command is to turn the torch off or on. */
- Xif (tag[V_torch]) {
- X if (object[O_torch][J_loc] == B_have) {
- X /* "switch torch on" command */
- X if (flag_switch==TRUE) {
- X if (object[O_torch][J_property]) {
- Xprintf("The torch is already turned on.\n") ;
- X return ;
- X }
- Xprintf("An intense beam of light is projected from the torch.\n") ;
- X object[O_torch][J_property] = TRUE ;
- X return ;
- X }
- X /* "switch torch off" command */
- X if (flag_switch==FALSE) {
- X if (!object[O_torch][J_property]) {
- Xprintf("The torch isn't switched on.\n") ;
- X return ;
- X }
- Xprintf("The torch switches off with a \"click\".\n") ;
- X object[O_torch][J_property] = FALSE ;
- X return ;
- X }
- X }
- Xprintf("You don't have a torch in your possession to switch! \n") ;
- X return ;
- X}
- X
- X/* Deal with a garbage command */
- Xgarbage_cmd :
- Xprintf("I don't understand what you want me to switch. \n") ;
- Xreturn ;
- X
- X} /* --- end of the "switcher" subroutine --- */
- X
- Xvoid new_score()
- X/* This subroutine calculates the score based on treasure in the safe */
- X{
- Xint i ;
- X score = 0 ;
- X for (i = 0; i <= objcnt; i++) if (object[i][J_loc] == B_in_safe) {
- X score += object[i][J_value] ;
- X } ;
- X} /* --- end of the "new_score" subroutine --- */
- END_OF_FILE
- if test 33573 -ne `wc -c <'longdsc.c'`; then
- echo shar: \"'longdsc.c'\" unpacked with wrong size!
- fi
- # end of 'longdsc.c'
- fi
- if test -f 'makefile' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'makefile'\"
- else
- echo shar: Extracting \"'makefile'\" \(701 characters\)
- sed "s/^X//" >'makefile' <<'END_OF_FILE'
- XCFLAGS = -c
- XHEAD = dink_sym.h dink_glb.h
- XOBJECTS = dinkum.o describe.o longdsc.o objlook.o actor.o \
- Xmonster.o opener.o gleeper.o parse.o taker.o
- Xdinkum: $(OBJECTS)
- X cc $(OBJECTS) -o dinkum
- Xdinkum.o: dinkum.c $(HEAD)
- X cc $(CFLAGS) dinkum.c
- Xdescribe.o: describe.c $(HEAD)
- X cc $(CFLAGS) describe.c
- Xlongdsc.o: longdsc.c $(HEAD)
- X cc $(CFLAGS) longdsc.c
- Xobjlook.o: objlook.c $(HEAD)
- X cc $(CFLAGS) objlook.c
- Xparse.o: parse.c $(HEAD)
- X cc $(CFLAGS) parse.c
- Xactor.o: actor.c $(HEAD)
- X cc $(CFLAGS) actor.c
- Xmonster.o: monster.c $(HEAD)
- X cc $(CFLAGS) monster.c
- Xopener.o: opener.c $(HEAD)
- X cc $(CFLAGS) opener.c
- Xgleeper.o: gleeper.c $(HEAD)
- X cc $(CFLAGS) gleeper.c
- Xtaker.o: taker.c $(HEAD)
- X cc $(CFLAGS) taker.c
- X
- END_OF_FILE
- if test 701 -ne `wc -c <'makefile'`; then
- echo shar: \"'makefile'\" unpacked with wrong size!
- fi
- # end of 'makefile'
- fi
- if test -f 'objlook.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'objlook.c'\"
- else
- echo shar: Extracting \"'objlook.c'\" \(15834 characters\)
- sed "s/^X//" >'objlook.c' <<'END_OF_FILE'
- X#define OBJLKR
- X#include "dink_sym.h"
- X#include "dink_glb.h"
- X
- Xvoid objlooker(n)
- X/*********************************************************/
- X/* */
- X/* --- Object in Room Examination Subroutine --- */
- X/* */
- X/* Program by Gary A. Allen, Jr. 18 May 1990 */
- X/* (c) Copywrite 1989 by Gary A. Allen, Jr. */
- X/* */
- X/*********************************************************/
- Xint n ;
- X{
- X#ifdef __TURBOC__
- Xvoid objector(int) ;
- X#endif
- X
- Xregister int i ;
- X
- Xif (((object[O_torch][J_loc] == B_have)&&object[O_torch][J_property])||
- X (n < 186)||(n > 202)) {
- X if (room[n][M_obj_cnt] == 1) {
- X for (i=0; i <= objcnt; i++) {
- X if ((object[i][J_loc] == n) &&
- X (object[i][J_type] != Z_unmovable)) {
- X if (n == R_office_mang) {
- Xprintf ("On the floor you see ") ;
- X objector(i) ;
- X printf (".\n") ;
- X }
- X else {
- X printf ("You see ") ;
- X objector(i) ;
- X printf (".\n") ;
- X }
- X }
- X }
- X }
- X if (room[n][M_obj_cnt] > 1) {
- X if (n == R_office_mang)
- Xprintf ("You see the following on the floor: \n");
- X else printf ("You see the following: \n");
- X for (i=0; i <= objcnt; i++) {
- X if ((object[i][J_loc] == n) &&
- X (object[i][J_type] != Z_unmovable)) {
- X printf (" ") ;
- X objector(i) ;
- X printf ("\n") ;
- X }
- X }
- X }
- X}
- X} /* end of "objlooker" subroutine */
- X
- Xvoid kelly(n)
- X/********************************************************************/
- X/* */
- X/* --- Ned Kelly Subroutine -- */
- X/* */
- X/* Software by Gary A. Allen, Jr. 5 November 1989 Version: Mk 1.2 */
- X/* (c) Copyright 1989 by Gary A. Allen, Jr. */
- X/* */
- X/********************************************************************/
- Xint n ;
- X{
- Xregister int i, k ;
- Xstatic int ned_look = 0, sw_fiddle = TRUE ;
- Xint sw_ned_look, sw_ned_set ;
- X
- X/* check if Ned Kelly is dead */
- Xif (enemy[N_ned][E_location] == B_destroyed) return ;
- X
- X/* this switch is for Ned looking for treasure once per cycle */
- Xsw_ned_look = FALSE ;
- Xsw_ned_set = FALSE ;
- X
- X/* check if player is in Ned's trigger rooms */
- Xswitch (n) {
- X/* Cause Ned Kelly to steal */
- Xcase R_lift_inside:
- X /* are there valuables in the safe and the safe open? */
- X if ((score > 0)&&
- X (room[R_office_mang][M_rm_status] >= S_dialed)) {
- X /* is the office building open? */
- X if ((ned_look > 4)||
- X (room[R_office_entr][M_rm_status] == S_open)||
- X (room[R_office_entr][M_rm_status] == S_kicked)||
- X (room[R_office_entr][M_rm_status] == S_unlocked)) {
- X
- X if (ned_look > 4) {
- X room[R_office_entr][M_rm_status] = S_kicked ;
- X room[R_office_entr][2] = R_office_hall ;
- X }
- X/* scan the object list for treasure in safe and transfer to hideout */
- X for (i=0; i <= objcnt; i++) {
- X if ((object[i][J_loc] == B_in_safe)&&(object[i][J_value] > 0)) {
- X ++room[R_hideout][M_obj_cnt] ;
- X object[i][J_loc] = R_hideout;
- X sw_ned_set = TRUE ;
- X }
- X }
- X }
- X/* the safe is open with treasure but the door is locked */
- X else {
- X ++ned_look ;
- X sw_ned_look = TRUE ;
- X }
- X } /* end of the block concerning Ned and the safe */
- X
- X if (sw_valuable) {
- X for (i=0; i <= objcnt; i++) {
- X/* scan for treasure laying around outside the building on surface */
- X for (k = 22; k <= 36; k++) {
- X if ((object[i][J_loc] == k)&&
- X (object[i][J_value] > 0)) {
- X ++room[R_hideout][M_obj_cnt] ;
- X --room[k][M_obj_cnt] ;
- X object[i][J_loc] = R_hideout;
- X sw_ned_set = TRUE ;
- X sw_valuable = FALSE ;
- X break ;
- X }
- X }
- X for (k = 144; k <= 145; k++) {
- X if ((object[i][J_loc] == k)&&
- X (object[i][J_value] > 0)) {
- X ++room[R_hideout][M_obj_cnt] ;
- X --room[k][M_obj_cnt] ;
- X object[i][J_loc] = R_hideout;
- X sw_valuable = FALSE ;
- X sw_ned_set = TRUE ;
- X break ;
- X }
- X }
- X /* scan the office building for treasure on the floor */
- X for (k = 37; k <= 41; k++) {
- X if ((object[i][J_loc] == k)&&
- X (object[i][J_value] > 0)) {
- X/* if the office bldg. door is open then Ned Kelly steals treasure */
- X if ((room[R_office_entr][M_rm_status] == S_open)||
- X (room[R_office_entr][M_rm_status] == S_unlocked)||
- X (room[R_office_entr][M_rm_status] == S_kicked)) {
- X ++room[R_hideout][M_obj_cnt] ;
- X --room[k][M_obj_cnt] ;
- X object[i][J_loc] = R_hideout;
- X sw_valuable = FALSE ;
- X sw_ned_set = TRUE ;
- X break ;
- X }
- X/* if Ned Kelly sees locked treasure four times, he kicks in the door */
- X if (ned_look > 4) {
- X room[R_office_entr][M_rm_status] = S_kicked ;
- X room[R_office_entr][2] = R_office_hall ;
- X ++room[R_hideout][M_obj_cnt] ;
- X --room[k][M_obj_cnt] ;
- X object[i][J_loc] = R_hideout;
- X sw_valuable = FALSE ;
- X sw_ned_set = TRUE ;
- X }
- X else {
- X if (!sw_ned_look) ++ned_look ;
- X sw_ned_look = TRUE ;
- X break ; /* conclude the office bldg. loop */
- X }
- X break ;
- X }
- X }
- X }
- X } /* end of block concerning Ned and loose treasure */
- X
- X if (sw_ned_set) {
- X enemy[N_ned][E_status] = F_stealing ;
- X enemy[N_ned][E_location] = R_hideout ;
- X room[R_hideout][M_monster] = 1 ;
- X sw_ned_set = FALSE ;
- X }
- X return ;
- X
- Xcase R_office_entr:
- X/* Cause Ned Kelly to run away with treasure */
- X if (enemy[N_ned][E_status] == F_stealing) {
- X enemy[N_ned][E_status] = F_asleep ;
- Xprintf("There is an odd looking character with an iron bucket on his ");
- Xprintf("head and a swag\n");
- Xprintf("bag over his shoulder running away from the ");
- Xprintf("office building towards\nthe desert. \n\n") ;
- X return ;
- X }
- X if ((ned_look == 3) && sw_fiddle &&
- X (room[R_office_entr][M_rm_status] != S_open) &&
- X (room[R_office_entr][M_rm_status] != S_kicked) &&
- X (room[R_office_entr][M_rm_status] != S_unlocked)) {
- X sw_fiddle = FALSE ;
- Xprintf("As you approach the office building's door, you see a\n");
- Xprintf("strange looking character with a bucket on his head and\n") ;
- Xprintf("wearing an iron breast plate. He is on his knees before\n") ;
- Xprintf("the door trying to pick the lock with a bit of coat hanger\n") ;
- Xprintf("wire. Suddenly, he turns and sees you coming. With amazing\n");
- Xprintf("speed, he throws away his wire and runs off towards the\n") ;
- Xprintf("open desert.\n\n") ;
- X return ;
- X }
- X} /* end of the ned kelly room switch block */
- X} /* --- end of the "kelly" subroutine --- */
- X
- Xvoid sounder(n)
- X/********************************************************************/
- X/* */
- X/* --- Gong Sounding Subroutine -- */
- X/* */
- X/* Software by Gary A. Allen, Jr. 21 June 1989 Version: Mk 1.0 */
- X/* (c) Copyright 1989 by Gary A. Allen, Jr. */
- X/* */
- X/********************************************************************/
- Xint n ;
- X{
- X#ifdef __TURBOC__
- Xvoid exit(int), hold_it(void) ;
- Xchar getche(void) ;
- X#endif
- X
- Xchar letter ;
- X
- X/* see if player is in the gong room */
- Xif (n != R_gong) {
- X if (tag[V_gong]) printf("I don't see a gong here.\n") ;
- X else printf("I don't see how you can do that.\n") ;
- X return ;
- X}
- X
- X/* The player is in the gong room. Does he have the clapper? */
- Xif (tag[V_clapper]) {
- X if (object[O_clapper][J_loc] == B_have) {
- X if (!tag[V_gong]) {
- Xprintf("With what are you going to do that with the clapper?\n") ;
- X return ;
- X }
- Xprintf
- X("\n GGGGGGGG OOOOOOOO NN NN GGGGGGGG !!!\n") ;
- Xprintf
- X("GG GG OO OO NNN NN GG GG !!!\n") ;
- Xprintf
- X("GG OO OO NN N NN GG !!!\n") ;
- Xprintf
- X("GG OO OO NN N NN GG !!!\n") ;
- Xprintf
- X("GG GGGGGGG OO OO NN N NN GG GGGGGG !!!\n") ;
- Xprintf
- X("GG GG OO OO NN N NN GG GG !!!\n") ;
- Xprintf
- X("GG GG OO OO NN N NN GG GG\n") ;
- Xprintf
- X("GG GG OO OO NN NNN GG GG 000\n") ;
- Xprintf
- X(" GGGGGGGG OOOOOOOO NN NN GGGGGGGG 000\n\n") ;
- X
- X/* see if the "end game" can begine */
- X if ((score < max_score)||(gleep_score == 0)) {
- Xprintf("You hear an ethereal voice which says:\n\n") ;
- X if (score < max_score) {
- Xprintf("Sorry Mate! You haven't put all of the treasure in the\n") ;
- Xprintf("safe yet. Find the rest, and then the secret of the gong\n") ;
- Xprintf("will be revealed.\n") ;
- X return ;
- X }
- X if (gleep_score == 0) {
- Xprintf("Good on you Mate! You've found all of the treasure.\n") ;
- Xprintf("However you haven't put a single gleep in the gleep tank!\n");
- Xprintf("You're not a Fair Dinkum Adventurer until you've put at\n") ;
- Xprintf("least one gleep in the tank.\n") ;
- X return ;
- X }
- X }
- X /* Begin the End Game */
- Xprintf("There is a loud \"Fromp!\" as a portcullis crashes down and\n");
- Xprintf("seals the northern (and only) exit. The lights go dim and\n");
- Xprintf("a hazy fog appears in the room. Slowly this fog coalesces\n") ;
- Xif (sw_warned) {
- Xprintf("into the now familiar form of Banjo Patterson. For some\n") ;
- Xprintf("odd reason Banjo is holding in his right hand a sword of\n") ;
- Xprintf("fire such as one reads about in Genesis. The deathly quiet\n");
- Xprintf("is broken when Banjo begins to speak:\n") ;
- X}
- Xelse {
- Xprintf("into a ghostly human form. This ethereal being is wearing\n") ;
- Xprintf("a grey flannel suit, a bowler hat, and has a gold pocket\n") ;
- Xprintf("watch chain looped across the front of his waist coat. He\n");
- Xprintf("is holding in his right hand a sword of fire such as one\n") ;
- Xprintf("reads about in Genesis. You can hear \"Waltzing Matilda\"\n");
- Xprintf("being played softly in the background. You know what?\n");
- Xprintf("I think this ethereal being is none other than the ghost\n") ;
- Xprintf("of Banjo Patterson! With this realization Banjo begins to\n") ;
- Xprintf("speak:\n") ;
- X}
- X hold_it() ;
- Xprintf("\"Good on you, Fair Dinkum Adventurer! You have braved\n") ;
- Xprintf("the perils of hoop snakes, drop bears, and mutant wombats.\n") ;
- Xprintf("You have solved many riddles, collected much treasure and\n") ;
- Xprintf("encountered true evil and dealt with it appropriately.\n");
- Xprintf("However it has occured to us that you might not be one of\n") ;
- Xprintf("the chosen few who can be admitted into the Land of the\n") ;
- Xprintf("Blessed. The possibility remains that you could be a\n") ;
- Xprintf("whinging Pom or a bleeding Yank. Therefore you will be\n") ;
- Xprintf("tested with three questions. If you answer correctly, you\n") ;
- Xprintf("will be admitted into paradise. However should you answer\n");
- Xprintf("falsely, you will be sent to another place, an abode of\n");
- Xprintf("darkness and dread. So answer wisely, for you will not be\n") ;
- Xprintf("given a second chance!\"\n\n") ;
- X
- Xprintf("What is the capital of Australia?\n\n") ;
- Xprintf(" A) Sydney\n") ;
- Xprintf(" B) Canberra\n") ;
- Xprintf(" C) Melbourne\n\n") ;
- Xprintf("Answer A, B, or C: ") ;
- Xquest1:
- X#ifndef __TURBOC__
- X letter = getchar() ;
- X if ((letter == '\n')||(letter == ' ')) goto quest1 ;
- X if (('b' == letter)||('B' == letter))
- X printf("\nCorrect!\n\n") ;
- X#endif
- X
- X#ifdef __TURBOC__
- X letter = getche() ;
- X if ((letter == '\n')||(letter == ' ')) goto quest1 ;
- X if (('b' == letter)||('B' == letter))
- X printf("\n\nCorrect!\n\n") ;
- X#endif
- X else goto la ;
- X
- Xprintf("In the Australian emblem there appears two animals on\n") ;
- Xprintf("either side of a shield. One of the two animals is a\n") ;
- Xprintf("kangaroo. What species is the other animal?\n\n") ;
- Xprintf(" A) Koala Bear\n") ;
- Xprintf(" B) Platypus\n") ;
- Xprintf(" C) Emu\n\n") ;
- Xprintf("Answer A, B, or C: ") ;
- Xquest2:
- X#ifndef __TURBOC__
- X letter = getchar() ;
- X if ((letter == '\n')||(letter == ' ')) goto quest2 ;
- X if (('c' == letter)||('C' == letter))
- X printf("\nCorrect!\n\n") ;
- X#endif
- X
- X#ifdef __TURBOC__
- X letter = getche() ;
- X if ((letter == '\n')||(letter == ' ')) goto quest2 ;
- X if (('c' == letter)||('C' == letter))
- X printf("\n\nCorrect!\n\n") ;
- X#endif
- X else goto la ;
- X
- Xprintf("Which place is a state in Australia?\n\n") ;
- Xprintf(" A) Arcadia\n") ;
- Xprintf(" B) Patagonia\n") ;
- Xprintf(" C) Tasmania\n\n") ;
- Xprintf("Answer A, B, or C: ") ;
- Xquest3:
- X#ifndef __TURBOC__
- X letter = getchar() ;
- X if ((letter == '\n')||(letter == ' ')) goto quest3 ;
- X if (('c' == letter)||('C' == letter))
- X printf("\nCorrect!\n\n") ;
- X#endif
- X
- X#ifdef __TURBOC__
- X letter = getche() ;
- X if ((letter == '\n')||(letter == ' ')) goto quest3 ;
- X if (('c' == letter)||('C' == letter))
- X printf("\n\nCorrect!\n\n") ;
- X#endif
- X else goto la ;
- X
- X/* Player has won the game */
- Xprintf("You see Banjo Patterson with a beatific smile. He waves\n") ;
- Xprintf("his firey sword with a florish and the scene around you\n") ;
- Xprintf("disolves into a million tiny motes of light. You now\n") ;
- Xprintf("find yourself wearing swimming togs. You are being carried\n");
- Xprintf("by a guard of honor made up of four sumptuous shielas\n") ;
- Xprintf("dressed in string bikinis and four handsome lifeguards.\n") ;
- Xprintf("They carry you to a perfect beach on South Stradbroke\n") ;
- Xprintf("Island. Off in the distance on the Queensland mainland\n") ;
- Xprintf("you see the Gold Coast which vaguely resembles the Emerald\n") ;
- Xprintf("City of the classic movie. Your guard of honor sets you\n") ;
- Xprintf("down and hands you a can of Power's Bitter. Three\n") ;
- Xprintf("beautiful white pelicans float over head in a clear blue\n") ;
- Xprintf("sky completing a scene of exquisite beauty.\n\n") ;
- Xprintf("You're in paradise Mate and you've also won the game!\n\n") ;
- X
- X/* deal with final gleep announcement */
- Xif (gleep_score == 1) {
- Xprintf("---- A hint for those who want to go on playing Dinkum ----\n");
- Xprintf("In this game you only put the minimum single gleep in the\n");
- Xprintf("gleep tank. In future games try seeding fertile tunnels\n");
- Xprintf("with gleeps and reproducing them. Build up as many gleeps\n");
- Xprintf("as you can and then hit the gong before Dinkum times out.\n");
- X}
- Xelse {
- Xprintf("You won this game with %d gleeps in the gleep tank.\n\n",
- X gleep_score) ;
- X}
- X if (sw_wizard) return ;
- X else exit(0) ;
- X
- X/* Player enters false answer and goes to Los Angeles */
- Xla:
- Xprintf("\n -!-!-!-!-!- Wrong! -!-!-!-!-!-\n\n") ;
- Xprintf("Banjo Patterson brings down the sword of fire onto your\n");
- Xprintf("head. The scene around you disappears in a flash and you\n");
- Xprintf("find yourself transported to.....\n\n") ;
- Xprintf(" Pico Blvd., West Los Angeles\n\n") ;
- Xprintf("L.A. is having a stage three smog alert. The air is so\n");
- Xprintf("foul you can taste it. A Los Angeles municipal bus roars\n");
- Xprintf("by covering you in soot. Across the street you see a\n");
- Xprintf("modern day Neanderthal selling vials of Crack to children.\n");
- Xprintf("The person next to you has taken a definite physical\n");
- Xprintf("interest in you. She/he is wearing a short skirt and has a\n");
- Xprintf("beehive hairdo. He/she also has a five o'clock shadow, and\n");
- Xprintf("bicepts so thick that he could collapse your skull with a\n");
- Xprintf("single thump.\n\n") ;
- Xprintf("We now leave this unhappy scene. Since you were sent to\n") ;
- Xprintf("Los Angeles your score has been zeroed.\n\n") ;
- Xprintf("So ends yet another unsuccessful session at Dinkum!\n") ;
- X
- X if (sw_wizard) return ;
- X else exit(0) ;
- X }
- X else {
- X printf("I don't have a clapper to hit it with! \n") ;
- X return ;
- X }
- X}
- Xelse {
- X printf("Thud! \n") ;
- X printf("Nothing happened.\n") ;
- Xprintf("I think you'd have more success if you used a gong clapper.\n");
- X return ;
- X}
- X} /* --- end of the "sounder" subroutine --- */
- END_OF_FILE
- if test 15834 -ne `wc -c <'objlook.c'`; then
- echo shar: \"'objlook.c'\" unpacked with wrong size!
- fi
- # end of 'objlook.c'
- fi
- echo shar: End of archive 2 \(of 6\).
- cp /dev/null ark2isdone
- MISSING=""
- for I in 1 2 3 4 5 6 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 6 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
-