integer robrm_(integer rm, integer pr, integer nr, integer nc, integer na) { /* System generated locals */ integer ret_val; /* Local variables */ integer i; ret_val = 0; /* !COUNT OBJECTS */ for (i = 1; i <= objcts_1.olnt; ++i) { /* !LOOP ON OBJECTS. */ if (! qhere_(i, rm)) { continue; } if (objcts_1.otval[i - 1] <= 0 || (objcts_1.oflag2[i - 1] & SCRDBT) != 0 || (objcts_1.oflag1[i - 1] & VISIBT) == 0 || ! prob_(pr, pr)) { if ((objcts_1.oflag2[i - 1] & ACTRBT) != 0) { ret_val += robadv_(oactor_(i), nr, nc, na); } } else { newsta_(i, 0, nr, nc, na); ++ret_val; objcts_1.oflag2[i - 1] |= TCHBT; continue; } } return ret_val; } /* robrm_ */
integer robadv_(integer adv, integer nr, integer nc, integer na) { /* System generated locals */ integer ret_val; /* Local variables */ integer i; ret_val = 0; /* !COUNT OBJECTS */ for (i = 1; i <= objcts_1.olnt; ++i) { if (objcts_1.oadv[i - 1] != adv || objcts_1.otval[i - 1] <= 0 || ( objcts_1.oflag2[i - 1] & SCRDBT) != 0) { continue; } newsta_(i, 0, nr, nc, na); /* !STEAL OBJECT */ ++ret_val; } return ret_val; } /* robadv_ */
integer blow_(integer h, integer v, integer rmk, integer hflg, integer out) { /* Initialized data */ const integer rmiss = 0; const integer rout = 1; const integer rkill = 2; const integer rstag = 5; const integer rlose = 6; const integer rhes = 7; const integer rsit = 8; static const integer def1r[3] = { 1,2,3 }; static const integer def2r[4] = { 13,23,24,25 }; static const integer def3r[5] = { 35,36,46,47,57 }; static const integer rvectr[66] = { 0,0,0,0,5,5,1,1,2,2,2,2,0,0,0,0,0,5, 5,3,3,1,0,0,0,5,5,3,3,3,1,2,2,2,0,0,0,0,0,5,5,3,3,4,4,0,0,0,5,5, 3,3,3,4,4,4,0,5,5,3,3,3,3,4,4,4 }; static const integer rstate[45] = { 5000,3005,3008,4011,3015,3018,1021, 0,0,5022,3027,3030,4033,3037,3040,1043,0,0,4044,2048,4050,4054, 5058,4063,4067,3071,1074,4075,1079,4080,4084,4088,4092,4096,4100, 1104,4105,2109,4111,4115,4119,4123,4127,3131,3134 }; /* System generated locals */ integer ret_val, i__1, i__2; /* Local variables */ logical f; integer i, j, oa, ra, od, mi, dv, def; integer tbl; integer att, res; integer dweap; integer pblose; ra = objcts_1.oactio[v - 1]; /* !GET VILLAIN ACTION, */ dv = objcts_1.odesc2[v - 1]; /* !DESCRIPTION. */ ret_val = rmiss; /* !ASSUME NO RESULT. */ if (! (hflg)) { goto L1000; } /* !HERO STRIKING BLOW? */ /* HERO IS ATTACKER, VILLAIN IS DEFENDER. */ pblose = 10; /* !BAD LK PROB. */ objcts_1.oflag2[v - 1] |= FITEBT; if ((advs_1.aflag[h - 1] & aflags_1.astag) == 0) { goto L100; } rspeak_(591); /* !YES, CANT FIGHT. */ advs_1.aflag[h - 1] &= ~ aflags_1.astag; return ret_val; L100: att = fights_(h, 1); /* !GET HIS STRENGTH. */ oa = att; def = vilstr_(v); /* !GET VILL STRENGTH. */ od = def; dweap = 0; /* !ASSUME NO WEAPON. */ i__1 = objcts_1.olnt; for (i = 1; i <= i__1; ++i) { /* !SEARCH VILLAIN. */ if (objcts_1.ocan[i - 1] == v && (objcts_1.oflag2[i - 1] & WEAPBT) != 0) { dweap = i; } /* L200: */ } if (v == advs_1.aobj[aindex_1.player - 1]) { goto L300; } /* !KILLING SELF? */ if (def != 0) { goto L2000; } /* !DEFENDER ALIVE? */ rspsub_(592, dv); /* !VILLAIN DEAD. */ return ret_val; L300: jigsup_(593); /* !KILLING SELF. */ return ret_val; /* VILLAIN IS ATTACKER, HERO IS DEFENDER. */ L1000: pblose = 50; /* !BAD LK PROB. */ advs_1.aflag[h - 1] &= ~ aflags_1.astag; if ((objcts_1.oflag2[v - 1] & STAGBT) == 0) { goto L1200; } objcts_1.oflag2[v - 1] &= ~ STAGBT; rspsub_(594, dv); /* !DESCRIBE. */ return ret_val; L1200: att = vilstr_(v); /* !SET UP ATT, DEF. */ oa = att; def = fights_(h, 1); if (def <= 0) { return ret_val; } /* !DONT ALLOW DEAD DEF. */ od = fights_(h, 0); dweap = (i__1 = fwim_(0, WEAPBT, 0, 0, h, 1), abs(i__1)); /* !FIND A WEAPON. */ /* BLOW, PAGE 4 */ /* PARTIES ARE NOW EQUIPPED. DEF CANNOT BE ZERO. */ /* ATT MUST BE > 0. */ L2000: if (def > 0) { goto L2100; } /* !DEF ALIVE? */ res = rkill; if (hflg) { rspsub_(595, dv); } /* !DEADER. */ goto L3000; L2100: if ((i__1 = def - 2) < 0) { goto L2200; } else if (i__1 == 0) { goto L2300; } else { goto L2400; } /* !DEF <2,=2,>2 */ L2200: att = min(att,3); /* !SCALE ATT. */ tbl = def1r[att - 1]; /* !CHOOSE TABLE. */ goto L2500; L2300: att = min(att,4); /* !SCALE ATT. */ tbl = def2r[att - 1]; /* !CHOOSE TABLE. */ goto L2500; L2400: att -= def; /* !SCALE ATT. */ /* Computing MIN */ i__1 = 2, i__2 = max(-2,att); att = min(i__1,i__2) + 3; tbl = def3r[att - 1]; L2500: res = rvectr[tbl + rnd_(10) - 1]; /* !GET RESULT. */ if (out == 0) { goto L2600; } /* !WAS HE OUT? */ if (res == rstag) { goto L2550; } /* !YES, STAG--> HES. */ res = rsit; /* !OTHERWISE, SITTING. */ goto L2600; L2550: res = rhes; L2600: if (res == rstag && dweap != 0 && prob_(25, pblose)) { res = rlose; } mi = rstate[(rmk - 1) * 9 + res]; /* !CHOOSE TABLE ENTRY. */ if (mi == 0) { goto L3000; } i__1 = mi / 1000; i = mi % 1000 + rnd_(i__1) + star_1.mbase + 1; j = dv; if (! (hflg) && dweap != 0) { j = objcts_1.odesc2[dweap - 1]; } rspsub_(i, j); /* !PRESENT RESULT. */ /* BLOW, PAGE 5 */ /* NOW APPLY RESULT */ L3000: switch (res + 1) { case 1: goto L4000; case 2: goto L3100; case 3: goto L3200; case 4: goto L3300; case 5: goto L3400; case 6: goto L3500; case 7: goto L3600; case 8: goto L4000; case 9: goto L3200; } L3100: if (hflg) { def = -def; } /* !UNCONSCIOUS. */ goto L4000; L3200: def = 0; /* !KILLED OR SITTING DUCK. */ goto L4000; L3300: /* Computing MAX */ i__1 = 0, i__2 = def - 1; def = max(i__1,i__2); /* !LIGHT WOUND. */ goto L4000; L3400: /* Computing MAX */ i__1 = 0, i__2 = def - 2; def = max(i__1,i__2); /* !SERIOUS WOUND. */ goto L4000; L3500: if (hflg) { goto L3550; } /* !STAGGERED. */ advs_1.aflag[h - 1] |= aflags_1.astag; goto L4000; L3550: objcts_1.oflag2[v - 1] |= STAGBT; goto L4000; L3600: newsta_(dweap, 0, play_1.here, 0, 0); /* !LOSE WEAPON. */ dweap = 0; if (hflg) { goto L4000; } /* !IF HERO, DONE. */ dweap = (i__1 = fwim_(0, WEAPBT, 0, 0, h, 1), abs(i__1)); /* !GET NEW. */ if (dweap != 0) { rspsub_(605, objcts_1.odesc2[dweap - 1]); } /* BLOW, PAGE 6 */ L4000: ret_val = res; /* !RETURN RESULT. */ if (! (hflg)) { goto L4500; } /* !HERO? */ objcts_1.ocapac[v - 1] = def; /* !STORE NEW CAPACITY. */ if (def != 0) { goto L4100; } /* !DEAD? */ objcts_1.oflag2[v - 1] &= ~ FITEBT; rspsub_(572, dv); /* !HE DIES. */ newsta_(v, 0, 0, 0, 0); /* !MAKE HIM DISAPPEAR. */ if (ra == 0) { return ret_val; } /* !IF NX TO DO, EXIT. */ prsvec_1.prsa = vindex_1.deadxw; /* !LET HIM KNOW. */ f = oappli_(ra, 0); return ret_val; L4100: if (res != rout || ra == 0) { return ret_val; } prsvec_1.prsa = vindex_1.outxw; /* !LET HIM BE OUT. */ f = oappli_(ra, 0); return ret_val; L4500: advs_1.astren[h - 1] = -10000; /* !ASSUME DEAD. */ if (def != 0) { advs_1.astren[h - 1] = def - od; } if (def >= od) { goto L4600; } cevent_1.ctick[cindex_1.cevcur - 1] = 30; cevent_1.cflag[cindex_1.cevcur - 1] = TRUE_; L4600: if (fights_(h, 1) > 0) { return ret_val; } advs_1.astren[h - 1] = 1 - fights_(h, 0); /* !HE'S DEAD. */ jigsup_(596); ret_val = -1; return ret_val; } /* blow_ */
void cevapp_(integer ri) { /* Initialized data */ static const integer cndtck[10] = { 50,20,10,5,0,156,156,156,157,0 }; static const integer lmptck[12] = { 50,30,20,10,4,0,154,154,154,154,155,0 }; /* System generated locals */ integer i__1, i__2; /* Local variables */ logical f; integer i, j, bc, br; if (ri == 0) return; /* !IGNORE DISABLED. */ switch (ri) { case 1: goto L1000; case 2: goto L2000; case 3: goto L3000; case 4: goto L4000; case 5: goto L5000; case 6: goto L6000; case 7: goto L7000; case 8: goto L8000; case 9: goto L9000; case 10: goto L10000; case 11: goto L11000; case 12: goto L12000; case 13: goto L13000; case 14: goto L14000; case 15: goto L15000; case 16: goto L16000; case 17: goto L17000; case 18: goto L18000; case 19: goto L19000; case 20: goto L20000; case 21: goto L21000; case 22: goto L22000; case 23: goto L23000; case 24: goto L24000; } bug_(3, ri); /* CEV1-- CURE CLOCK. LET PLAYER SLOWLY RECOVER. */ L1000: /* Computing MIN */ i__1 = 0, i__2 = advs_1.astren[aindex_1.player - 1] + 1; advs_1.astren[aindex_1.player - 1] = min(i__1,i__2); /* !RECOVER. */ if (advs_1.astren[aindex_1.player - 1] >= 0) return; /* !FULLY RECOVERED? */ cevent_1.ctick[cindex_1.cevcur - 1] = 30; /* !NO, WAIT SOME MORE. */ return; /* CEV2-- MAINT-ROOM WITH LEAK. RAISE THE WATER LEVEL. */ L2000: if (play_1.here == rindex_1.maint) { i__1 = findex_1.rvmnt / 2 + 71; rspeak_(i__1); } /* !DESCRIBE. */ ++findex_1.rvmnt; /* !RAISE WATER LEVEL. */ if (findex_1.rvmnt <= 16) return; /* !IF NOT FULL, EXIT. */ cevent_1.ctick[cindex_1.cevmnt - 1] = 0; /* !FULL, DISABLE CLOCK. */ rooms_1.rflag[rindex_1.maint - 1] |= RMUNG; rrand[rindex_1.maint - 1] = 80; /* !SAY IT IS FULL OF WATER. */ if (play_1.here == rindex_1.maint) jigsup_(81); /* !DROWN HIM IF PRESENT. */ return; /* CEV3-- LANTERN. DESCRIBE GROWING DIMNESS. */ L3000: litint_(oindex_1.lamp, &findex_1.orlamp, cindex_1.cevlnt, lmptck, 12); /* !DO LIGHT INTERRUPT. */ return; /* CEV4-- MATCH. OUT IT GOES. */ L4000: rspeak_(153); /* !MATCH IS OUT. */ objcts_1.oflag1[oindex_1.match - 1] &= ~ ONBT; return; /* CEV5-- CANDLE. DESCRIBE GROWING DIMNESS. */ L5000: litint_(oindex_1.candl, &findex_1.orcand, cindex_1.cevcnd, cndtck, 10); /* !DO CANDLE INTERRUPT. */ return; /* CEVAPP, PAGE 3 */ /* CEV6-- BALLOON */ L6000: cevent_1.ctick[cindex_1.cevbal - 1] = 3; /* !RESCHEDULE INTERRUPT. */ f = advs_1.avehic[play_1.winner - 1] == oindex_1.ballo; /* !SEE IF IN BALLOON. */ if (state_1.bloc == rindex_1.vlbot) goto L6800; /* !AT BOTTOM? */ if (state_1.bloc == rindex_1.ledg2 || state_1.bloc == rindex_1.ledg3 || state_1.bloc == rindex_1.ledg4 || state_1.bloc == rindex_1.vlbot) goto L6700; /* !ON LEDGE? */ if ((objcts_1.oflag2[oindex_1.recep - 1] & OPENBT) != 0 && findex_1.binff != 0) goto L6500; /* BALLOON IS IN MIDAIR AND IS DEFLATED (OR HAS RECEPTACLE CLOSED). */ /* FALL TO NEXT ROOM. */ if (state_1.bloc != rindex_1.vair1) goto L6300; /* !IN VAIR1? */ state_1.bloc = rindex_1.vlbot; /* !YES, NOW AT VLBOT. */ newsta_(oindex_1.ballo, 0, state_1.bloc, 0, 0); if (f) goto L6200; /* !IN BALLOON? */ if (play_1.here == rindex_1.ledg2 || play_1.here == rindex_1.ledg3 || play_1.here == rindex_1.ledg4 || play_1.here == rindex_1.vlbot) rspeak_(530); /* !ON LEDGE, DESCRIBE. */ return; L6200: f = moveto_(state_1.bloc, play_1.winner); /* !MOVE HIM. */ if (findex_1.binff == 0) goto L6250; /* !IN BALLOON. INFLATED? */ rspeak_(531); /* !YES, LANDED. */ f = rmdesc_(0); /* !DESCRIBE. */ return; L6250: newsta_(oindex_1.ballo, 532, 0, 0, 0); /* !NO, BALLOON & CONTENTS DIE. */ newsta_(oindex_1.dball, 0, state_1.bloc, 0, 0); /* !INSERT DEAD BALLOON. */ advs_1.avehic[play_1.winner - 1] = 0; /* !NOT IN VEHICLE. */ cevent_1.cflag[cindex_1.cevbal - 1] = FALSE_; /* !DISABLE INTERRUPTS. */ cevent_1.cflag[cindex_1.cevbrn - 1] = FALSE_; findex_1.binff = 0; findex_1.btief = 0; return; L6300: --state_1.bloc; /* !NOT IN VAIR1, DESCEND. */ newsta_(oindex_1.ballo, 0, state_1.bloc, 0, 0); if (f) goto L6400; /* !IS HE IN BALLOON? */ if (play_1.here == rindex_1.ledg2 || play_1.here == rindex_1.ledg3 || play_1.here == rindex_1.ledg4 || play_1.here == rindex_1.vlbot) rspeak_(533); /* !IF ON LEDGE, DESCRIBE. */ return; L6400: f = moveto_(state_1.bloc, play_1.winner); /* !IN BALLOON, MOVE HIM. */ rspeak_(534); /* !DESCRIBE. */ f = rmdesc_(0); return; /* BALLOON IS IN MIDAIR AND IS INFLATED, UP-UP-AND-AWAY */ /* ! */ L6500: if (state_1.bloc != rindex_1.vair4) goto L6600; /* !AT VAIR4? */ cevent_1.ctick[cindex_1.cevbrn - 1] = 0; cevent_1.ctick[cindex_1.cevbal - 1] = 0; findex_1.binff = 0; findex_1.btief = 0; state_1.bloc = rindex_1.vlbot; /* !FALL TO BOTTOM. */ newsta_(oindex_1.ballo, 0, 0, 0, 0); /* !BALLOON & CONTENTS DIE. */ newsta_(oindex_1.dball, 0, state_1.bloc, 0, 0); /* !SUBSTITUTE DEAD BALLOON. */ if (f) goto L6550; /* !WAS HE IN IT? */ if (play_1.here == rindex_1.ledg2 || play_1.here == rindex_1.ledg3 || play_1.here == rindex_1.ledg4 || play_1.here == rindex_1.vlbot) rspeak_(535); /* !IF HE CAN SEE, DESCRIBE. */ return; L6550: jigsup_(536); /* !IN BALLOON AT CRASH, DIE. */ return; L6600: ++state_1.bloc; /* !NOT AT VAIR4, GO UP. */ newsta_(oindex_1.ballo, 0, state_1.bloc, 0, 0); if (f) goto L6650; /* !IN BALLOON? */ if (play_1.here == rindex_1.ledg2 || play_1.here == rindex_1.ledg3 || play_1.here == rindex_1.ledg4 || play_1.here == rindex_1.vlbot) rspeak_(537); /* !CAN HE SEE IT? */ return; L6650: f = moveto_(state_1.bloc, play_1.winner); /* !MOVE PLAYER. */ rspeak_(538); /* !DESCRIBE. */ f = rmdesc_(0); return; /* ON LEDGE, GOES TO MIDAIR ROOM WHETHER INFLATED OR NOT. */ L6700: state_1.bloc += rindex_1.vair2 - rindex_1.ledg2; /* !MOVE TO MIDAIR. */ newsta_(oindex_1.ballo, 0, state_1.bloc, 0, 0); if (f) goto L6750; /* !IN BALLOON? */ if (play_1.here == rindex_1.ledg2 || play_1.here == rindex_1.ledg3 || play_1.here == rindex_1.ledg4 || play_1.here == rindex_1.vlbot) rspeak_(539); /* !NO, STRANDED. */ cevent_1.ctick[cindex_1.cevvlg - 1] = 10; /* !MATERIALIZE GNOME. */ return; L6750: f = moveto_(state_1.bloc, play_1.winner); /* !MOVE TO NEW ROOM. */ rspeak_(540); /* !DESCRIBE. */ f = rmdesc_(0); return; /* AT BOTTOM, GO UP IF INFLATED, DO NOTHING IF DEFLATED. */ L6800: if (findex_1.binff == 0 || ! ((objcts_1.oflag2[oindex_1.recep - 1] & OPENBT) != 0)) return; state_1.bloc = rindex_1.vair1; /* !INFLATED AND OPEN, */ newsta_(oindex_1.ballo, 0, state_1.bloc, 0, 0); /* !GO UP TO VAIR1. */ if (f) goto L6850; /* !IN BALLOON? */ if (play_1.here == rindex_1.ledg2 || play_1.here == rindex_1.ledg3 || play_1.here == rindex_1.ledg4 || play_1.here == rindex_1.vlbot) rspeak_(541); /* !IF CAN SEE, DESCRIBE. */ return; L6850: f = moveto_(state_1.bloc, play_1.winner); /* !MOVE PLAYER. */ rspeak_(542); f = rmdesc_(0); return; /* CEVAPP, PAGE 4 */ /* CEV7-- BALLOON BURNUP */ L7000: i__1 = objcts_1.olnt; for (i = 1; i <= i__1; ++i) { /* !FIND BURNING OBJECT */ if (oindex_1.recep == objcts_1.ocan[i - 1] && (objcts_1.oflag1[i - 1] & FLAMBT) != 0) goto L7200; /* L7100: */ } bug_(4, 0); L7200: newsta_(i, 0, 0, 0, 0); /* !VANISH OBJECT. */ findex_1.binff = 0; /* !UNINFLATED. */ if (play_1.here == state_1.bloc) rspsub_(292, objcts_1.odesc2[i - 1]); /* !DESCRIBE. */ return; /* CEV8-- FUSE FUNCTION */ L8000: if (objcts_1.ocan[oindex_1.fuse - 1] != oindex_1.brick) goto L8500; /* !IGNITED BRICK? */ br = objcts_1.oroom[oindex_1.brick - 1]; /* !GET BRICK ROOM. */ bc = objcts_1.ocan[oindex_1.brick - 1]; /* !GET CONTAINER. */ if (br == 0 && bc != 0) br = objcts_1.oroom[bc - 1]; newsta_(oindex_1.fuse, 0, 0, 0, 0); /* !KILL FUSE. */ newsta_(oindex_1.brick, 0, 0, 0, 0); /* !KILL BRICK. */ if (br != 0 && br != play_1.here) goto L8100; /* !BRICK ELSEWHERE? */ rooms_1.rflag[play_1.here - 1] |= RMUNG; rrand[play_1.here - 1] = 114; /* !MUNG ROOM. */ jigsup_(150); /* !DEAD. */ return; L8100: rspeak_(151); /* !BOOM. */ state_1.mungrm = br; /* !SAVE ROOM THAT BLEW. */ cevent_1.ctick[cindex_1.cevsaf - 1] = 5; /* !SET SAFE INTERRUPT. */ if (br != rindex_1.msafe) goto L8200; /* !BLEW SAFE ROOM? */ if (bc != oindex_1.sslot) return; /* !WAS BRICK IN SAFE? */ newsta_(oindex_1.sslot, 0, 0, 0, 0); /* !KILL SLOT. */ objcts_1.oflag2[oindex_1.safe - 1] |= OPENBT; findex_1.safef = TRUE_; /* !INDICATE SAFE BLOWN. */ return; L8200: i__1 = objcts_1.olnt; for (i = 1; i <= i__1; ++i) { /* !BLEW WRONG ROOM. */ if (qhere_(i, br) && (objcts_1.oflag1[i - 1] & TAKEBT) != 0) newsta_(i, 0, 0, 0, 0); /* L8250: */ } if (br != rindex_1.lroom) return; /* !BLEW LIVING ROOM? */ i__1 = objcts_1.olnt; for (i = 1; i <= i__1; ++i) { if (objcts_1.ocan[i - 1] == oindex_1.tcase) newsta_(i, 0, 0, 0, 0); /* !KILL TROPHY CASE. */ /* L8300: */ } return; L8500: if (qhere_(oindex_1.fuse, play_1.here) || objcts_1.oadv[oindex_1.fuse - 1] == play_1.winner) rspeak_(152); newsta_(oindex_1.fuse, 0, 0, 0, 0); /* !KILL FUSE. */ return; /* CEVAPP, PAGE 5 */ /* CEV9-- LEDGE MUNGE. */ L9000: rooms_1.rflag[rindex_1.ledg4 - 1] |= RMUNG; rrand[rindex_1.ledg4 - 1] = 109; if (play_1.here == rindex_1.ledg4) goto L9100; /* !WAS HE THERE? */ rspeak_(110); /* !NO, NARROW ESCAPE. */ return; L9100: if (advs_1.avehic[play_1.winner - 1] != 0) goto L9200; /* !IN VEHICLE? */ jigsup_(111); /* !NO, DEAD. */ return; L9200: if (findex_1.btief != 0) goto L9300; /* !TIED TO LEDGE? */ rspeak_(112); /* !NO, NO PLACE TO LAND. */ return; L9300: state_1.bloc = rindex_1.vlbot; /* !YES, CRASH BALLOON. */ newsta_(oindex_1.ballo, 0, 0, 0, 0); /* !BALLOON & CONTENTS DIE. */ newsta_(oindex_1.dball, 0, state_1.bloc, 0, 0); /* !INSERT DEAD BALLOON. */ findex_1.btief = 0; findex_1.binff = 0; cevent_1.cflag[cindex_1.cevbal - 1] = FALSE_; cevent_1.cflag[cindex_1.cevbrn - 1] = FALSE_; jigsup_(113); /* !DEAD */ return; /* CEV10-- SAFE MUNG. */ L10000: rooms_1.rflag[state_1.mungrm - 1] |= RMUNG; rrand[state_1.mungrm - 1] = 114; if (play_1.here == state_1.mungrm) goto L10100; /* !IS HE PRESENT? */ rspeak_(115); /* !LET HIM KNOW. */ if (state_1.mungrm == rindex_1.msafe) cevent_1.ctick[cindex_1.cevled - 1] = 8; /* !START LEDGE CLOCK. */ return; L10100: i = 116; /* !HE'S DEAD, */ if ((rooms_1.rflag[play_1.here - 1] & RHOUSE) != 0) i = 117; jigsup_(i); /* !LET HIM KNOW. */ return; /* CEVAPP, PAGE 6 */ /* CEV11-- VOLCANO GNOME */ L11000: if (play_1.here == rindex_1.ledg2 || play_1.here == rindex_1.ledg3 || play_1.here == rindex_1.ledg4 || play_1.here == rindex_1.vlbot) goto L11100; /* !IS HE ON LEDGE? */ cevent_1.ctick[cindex_1.cevvlg - 1] = 1; /* !NO, WAIT A WHILE. */ return; L11100: newsta_(oindex_1.gnome, 118, play_1.here, 0, 0); /* !YES, MATERIALIZE GNOME. */ return; /* CEV12-- VOLCANO GNOME DISAPPEARS */ L12000: newsta_(oindex_1.gnome, 149, 0, 0, 0); /* !DISAPPEAR THE GNOME. */ return; /* CEV13-- BUCKET. */ L13000: if (objcts_1.ocan[oindex_1.water - 1] == oindex_1.bucke) newsta_(oindex_1.water, 0, 0, 0, 0); return; /* CEV14-- SPHERE. IF EXPIRES, HE'S TRAPPED. */ L14000: rooms_1.rflag[rindex_1.cager - 1] |= RMUNG; rrand[rindex_1.cager - 1] = 147; jigsup_(148); /* !MUNG PLAYER. */ return; /* CEV15-- END GAME HERALD. */ L15000: findex_1.endgmf = TRUE_; /* !WE'RE IN ENDGAME. */ rspeak_(119); /* !INFORM OF ENDGAME. */ return; /* CEVAPP, PAGE 7 */ /* CEV16-- FOREST MURMURS */ L16000: cevent_1.cflag[cindex_1.cevfor - 1] = play_1.here == rindex_1.mtree || (play_1.here >= rindex_1.fore1 && play_1.here < rindex_1.clear); if (cevent_1.cflag[cindex_1.cevfor - 1] && prob_(10, 10)) rspeak_(635); return; /* CEV17-- SCOL ALARM */ L17000: if (play_1.here == rindex_1.bktwi) cevent_1.cflag[cindex_1.cevzgi - 1] = TRUE_; /* !IF IN TWI, GNOME. */ if (play_1.here == rindex_1.bkvau) jigsup_(636); /* !IF IN VAU, DEAD. */ return; /* CEV18-- ENTER GNOME OF ZURICH */ L18000: cevent_1.cflag[cindex_1.cevzgo - 1] = TRUE_; /* !EXITS, TOO. */ newsta_(oindex_1.zgnom, 0, rindex_1.bktwi, 0, 0); /* !PLACE IN TWI. */ if (play_1.here == rindex_1.bktwi) rspeak_(637); /* !ANNOUNCE. */ return; /* CEV19-- EXIT GNOME */ L19000: newsta_(oindex_1.zgnom, 0, 0, 0, 0); /* !VANISH. */ if (play_1.here == rindex_1.bktwi) rspeak_(638); /* !ANNOUNCE. */ return; /* CEVAPP, PAGE 8 */ /* CEV20-- START OF ENDGAME */ L20000: if (findex_1.spellf) goto L20200; /* !SPELL HIS WAY IN? */ if (play_1.here != rindex_1.crypt) return; /* !NO, STILL IN TOMB? */ if (! lit_(play_1.here)) goto L20100; /* !LIGHTS OFF? */ cevent_1.ctick[cindex_1.cevste - 1] = 3; /* !RESCHEDULE. */ return; L20100: rspeak_(727); /* !ANNOUNCE. */ L20200: i__1 = objcts_1.olnt; for (i = 1; i <= i__1; ++i) { /* !STRIP HIM OF OBJS. */ newsta_(i, 0, objcts_1.oroom[i - 1], objcts_1.ocan[i - 1], 0); /* L20300: */ } newsta_(oindex_1.lamp, 0, 0, 0, aindex_1.player); /* !GIVE HIM LAMP. */ newsta_(oindex_1.sword, 0, 0, 0, aindex_1.player); /* !GIVE HIM SWORD. */ objcts_1.oflag1[oindex_1.lamp - 1] = (objcts_1.oflag1[oindex_1.lamp - 1] | LITEBT) & ~ ONBT; objcts_1.oflag2[oindex_1.lamp - 1] |= TCHBT; cevent_1.cflag[cindex_1.cevlnt - 1] = FALSE_; /* !LAMP IS GOOD AS NEW. */ cevent_1.ctick[cindex_1.cevlnt - 1] = 350; findex_1.orlamp = 0; objcts_1.oflag2[oindex_1.sword - 1] |= TCHBT; hack_1.swdact = TRUE_; hack_1.swdsta = 0; hack_1.thfact = FALSE_; /* !THIEF GONE. */ findex_1.endgmf = TRUE_; /* !ENDGAME RUNNING. */ cevent_1.cflag[cindex_1.cevmat - 1] = FALSE_; /* !MATCHES GONE, */ cevent_1.cflag[cindex_1.cevcnd - 1] = FALSE_; /* !CANDLES GONE. */ scrupd_(rooms_1.rval[rindex_1.crypt - 1]); /* !SCORE CRYPT, */ rooms_1.rval[rindex_1.crypt - 1] = 0; /* !BUT ONLY ONCE. */ f = moveto_(rindex_1.tstrs, play_1.winner); /* !TO TOP OF STAIRS, */ f = rmdesc_(3); /* !AND DESCRIBE. */ return; /* !BAM */ /* ! */ /* CEV21-- MIRROR CLOSES. */ L21000: findex_1.mrpshf = FALSE_; /* !BUTTON IS OUT. */ findex_1.mropnf = FALSE_; /* !MIRROR IS CLOSED. */ if (play_1.here == rindex_1.mrant) rspeak_(728); /* !DESCRIBE BUTTON. */ if (play_1.here == rindex_1.inmir || mrhere_(play_1.here) == 1) rspeak_(729); return; /* CEVAPP, PAGE 9 */ /* CEV22-- DOOR CLOSES. */ L22000: if (findex_1.wdopnf) rspeak_(730); /* !DESCRIBE. */ findex_1.wdopnf = FALSE_; /* !CLOSED. */ return; /* CEV23-- INQUISITOR'S QUESTION */ L23000: if (advs_1.aroom[aindex_1.player - 1] != rindex_1.fdoor) return; /* !IF PLAYER LEFT, DIE. */ rspeak_(769); i__1 = findex_1.quesno + 770; rspeak_(i__1); cevent_1.ctick[cindex_1.cevinq - 1] = 2; return; /* CEV24-- MASTER FOLLOWS */ L24000: if (advs_1.aroom[aindex_1.amastr - 1] == play_1.here) return; /* !NO MOVEMENT, DONE. */ if (play_1.here != rindex_1.cell && play_1.here != rindex_1.pcell) goto L24100; if (findex_1.follwf) rspeak_(811); /* !WONT GO TO CELLS. */ findex_1.follwf = FALSE_; return; L24100: findex_1.follwf = TRUE_; /* !FOLLOWING. */ i = 812; /* !ASSUME CATCHES UP. */ i__1 = xsrch_1.xmax; i__2 = xsrch_1.xmin; for (j = xsrch_1.xmin; i__2 < 0 ? j >= i__1 : j <= i__1; j += i__2) { if (findxt_(j, advs_1.aroom[aindex_1.amastr - 1]) && curxt_1.xroom1 == play_1.here) i = 813; /* L24200: */ } rspeak_(i); newsta_(oindex_1.master, 0, play_1.here, 0, 0); /* !MOVE MASTER OBJECT. */ advs_1.aroom[aindex_1.amastr - 1] = play_1.here; /* !MOVE MASTER PLAYER. */ return; } /* cevapp_ */
logical nobjs_(integer ri, integer arg) { /* System generated locals */ // TODO See if arg is needed integer i__1, i__2 = arg; logical ret_val; /* Local variables */ integer target; integer i; integer j; integer wl; integer nxt, odi2 = 0, odo2 = 0; if (prsvec_1.prso != 0) { odo2 = objcts_1.odesc2[prsvec_1.prso - 1]; } if (prsvec_1.prsi != 0) { odi2 = objcts_1.odesc2[prsvec_1.prsi - 1]; } ret_val = TRUE_; switch (ri - 31) { case 1: goto L1000; case 2: goto L2000; case 3: goto L3000; case 4: goto L4000; case 5: goto L5000; case 6: goto L6000; case 7: goto L7000; case 8: goto L8000; case 9: goto L9000; case 10: goto L10000; case 11: goto L11000; case 12: goto L12000; case 13: goto L13000; case 14: goto L14000; case 15: goto L15000; case 16: goto L16000; case 17: goto L17000; case 18: goto L18000; case 19: goto L19000; case 20: goto L20000; case 21: goto L21000; } bug_(6, ri); /* RETURN HERE TO DECLARE FALSE RESULT */ L10: ret_val = FALSE_; return ret_val; /* O32-- BILLS */ L1000: if (prsvec_1.prsa != vindex_1.eatw) { goto L1100; } /* !EAT? */ rspeak_(639); /* !JOKE. */ return ret_val; L1100: if (prsvec_1.prsa == vindex_1.burnw) { rspeak_(640); } /* !BURN? JOKE. */ goto L10; /* !LET IT BE HANDLED. */ /* NOBJS, PAGE 3 */ /* O33-- SCREEN OF LIGHT */ L2000: target = oindex_1.scol; /* !TARGET IS SCOL. */ L2100: if (prsvec_1.prso != target) { goto L2400; } /* !PRSO EQ TARGET? */ if (prsvec_1.prsa != vindex_1.pushw && prsvec_1.prsa != vindex_1.movew && prsvec_1.prsa != vindex_1.takew && prsvec_1.prsa != vindex_1.rubw) { goto L2200; } rspeak_(673); /* !HAND PASSES THRU. */ return ret_val; L2200: if (prsvec_1.prsa != vindex_1.killw && prsvec_1.prsa != vindex_1.attacw && prsvec_1.prsa != vindex_1.mungw) { goto L2400; } rspsub_(674, odi2); /* !PASSES THRU. */ return ret_val; L2400: if (prsvec_1.prsa != vindex_1.throww || prsvec_1.prsi != target) { goto L10; } if (play_1.here == rindex_1.bkbox) { goto L2600; } /* !THRU SCOL? */ newsta_(prsvec_1.prso, 0, rindex_1.bkbox, 0, 0); /* !NO, THRU WALL. */ rspsub_(675, odo2); /* !ENDS UP IN BOX ROOM. */ cevent_1.ctick[cindex_1.cevscl - 1] = 0; /* !CANCEL ALARM. */ screen_1.scolrm = 0; /* !RESET SCOL ROOM. */ return ret_val; L2600: if (screen_1.scolrm == 0) { goto L2900; } /* !TRIED TO GO THRU? */ newsta_(prsvec_1.prso, 0, screen_1.scolrm, 0, 0); /* !SUCCESS. */ rspsub_(676, odo2); /* !ENDS UP SOMEWHERE. */ cevent_1.ctick[cindex_1.cevscl - 1] = 0; /* !CANCEL ALARM. */ screen_1.scolrm = 0; /* !RESET SCOL ROOM. */ return ret_val; L2900: rspeak_(213); /* !CANT DO IT. */ return ret_val; /* NOBJS, PAGE 4 */ /* O34-- GNOME OF ZURICH */ L3000: if (prsvec_1.prsa != vindex_1.givew && prsvec_1.prsa != vindex_1.throww) { goto L3200; } if (objcts_1.otval[prsvec_1.prso - 1] != 0) { goto L3100; } /* !THROW A TREASURE? */ newsta_(prsvec_1.prso, 641, 0, 0, 0); /* !NO, GO POP. */ return ret_val; L3100: newsta_(prsvec_1.prso, 0, 0, 0, 0); /* !YES, BYE BYE TREASURE. */ rspsub_(642, odo2); newsta_(oindex_1.zgnom, 0, 0, 0, 0); /* !BYE BYE GNOME. */ cevent_1.ctick[cindex_1.cevzgo - 1] = 0; /* !CANCEL EXIT. */ moveto_(rindex_1.bkent, play_1.winner); /* !NOW IN BANK ENTRANCE. */ return ret_val; L3200: if (prsvec_1.prsa != vindex_1.attacw && prsvec_1.prsa != vindex_1.killw && prsvec_1.prsa != vindex_1.mungw) { goto L3300; } newsta_(oindex_1.zgnom, 643, 0, 0, 0); /* !VANISH GNOME. */ cevent_1.ctick[cindex_1.cevzgo - 1] = 0; /* !CANCEL EXIT. */ return ret_val; L3300: rspeak_(644); /* !GNOME IS IMPATIENT. */ return ret_val; /* O35-- EGG */ L4000: if (prsvec_1.prsa != vindex_1.openw || prsvec_1.prso != oindex_1.egg) { goto L4500; } if (! ((objcts_1.oflag2[oindex_1.egg - 1] & OPENBT) != 0)) { goto L4100; } /* !OPEN ALREADY? */ rspeak_(649); /* !YES. */ return ret_val; L4100: if (prsvec_1.prsi != 0) { goto L4200; } /* !WITH SOMETHING? */ rspeak_(650); /* !NO, CANT. */ return ret_val; L4200: if (prsvec_1.prsi != oindex_1.hands) { goto L4300; } /* !WITH HANDS? */ rspeak_(651); /* !NOT RECOMMENDED. */ return ret_val; L4300: i = 652; /* !MUNG MESSAGE. */ if ((objcts_1.oflag1[prsvec_1.prsi - 1] & TOOLBT) != 0 || ( objcts_1.oflag2[prsvec_1.prsi - 1] & WEAPBT) != 0) { goto L4600; } i = 653; /* !NOVELTY 1. */ if ((objcts_1.oflag2[prsvec_1.prso - 1] & FITEBT) != 0) { i = 654; } objcts_1.oflag2[prsvec_1.prso - 1] |= FITEBT; rspsub_(i, odi2); return ret_val; L4500: if (prsvec_1.prsa != vindex_1.openw && prsvec_1.prsa != vindex_1.mungw) { goto L4800; } i = 655; /* !YOU BLEW IT. */ L4600: newsta_(oindex_1.begg, i, objcts_1.oroom[oindex_1.egg - 1], objcts_1.ocan[oindex_1.egg - 1], objcts_1.oadv[oindex_1.egg - 1]) ; newsta_(oindex_1.egg, 0, 0, 0, 0); /* !VANISH EGG. */ objcts_1.otval[oindex_1.begg - 1] = 2; /* !BAD EGG HAS VALUE. */ if (objcts_1.ocan[oindex_1.canar - 1] != oindex_1.egg) { goto L4700; } /* !WAS CANARY INSIDE? */ rspeak_(objcts_1.odesco[oindex_1.bcana - 1]); /* !YES, DESCRIBE RESULT. */ objcts_1.otval[oindex_1.bcana - 1] = 1; return ret_val; L4700: newsta_(oindex_1.bcana, 0, 0, 0, 0); /* !NO, VANISH IT. */ return ret_val; L4800: if (prsvec_1.prsa != vindex_1.dropw || play_1.here != rindex_1.mtree) { goto L10; } newsta_(oindex_1.begg, 658, rindex_1.fore3, 0, 0); /* !DROPPED EGG. */ newsta_(oindex_1.egg, 0, 0, 0, 0); objcts_1.otval[oindex_1.begg - 1] = 2; if (objcts_1.ocan[oindex_1.canar - 1] != oindex_1.egg) { goto L4700; } objcts_1.otval[oindex_1.bcana - 1] = 1; /* !BAD CANARY. */ return ret_val; /* NOBJS, PAGE 5 */ /* O36-- CANARIES, GOOD AND BAD */ L5000: if (prsvec_1.prsa != vindex_1.windw) { goto L10; } /* !WIND EM UP? */ if (prsvec_1.prso == oindex_1.canar) { goto L5100; } /* !RIGHT ONE? */ rspeak_(645); /* !NO, BAD NEWS. */ return ret_val; L5100: if (! findex_1.singsf && (play_1.here == rindex_1.mtree || (play_1.here >= rindex_1.fore1 && play_1.here < rindex_1.clear))) { goto L5200; } rspeak_(646); /* !NO, MEDIOCRE NEWS. */ return ret_val; L5200: findex_1.singsf = TRUE_; /* !SANG SONG. */ i = play_1.here; if (i == rindex_1.mtree) { i = rindex_1.fore3; } /* !PLACE BAUBLE. */ newsta_(oindex_1.baubl, 647, i, 0, 0); return ret_val; /* O37-- WHITE CLIFFS */ L6000: if (prsvec_1.prsa != vindex_1.clmbw && prsvec_1.prsa != vindex_1.clmbuw && prsvec_1.prsa != vindex_1.clmbdw) { goto L10; } rspeak_(648); /* !OH YEAH? */ return ret_val; /* O38-- WALL */ L7000: if ((i__1 = play_1.here - findex_1.mloc, abs(i__1)) != 1 || mrhere_( play_1.here) != 0 || prsvec_1.prsa != vindex_1.pushw) { goto L7100; } rspeak_(860); /* !PUSHED MIRROR WALL. */ return ret_val; L7100: if ((rooms_1.rflag[play_1.here - 1] & RNWALL) == 0) { goto L10; } rspeak_(662); /* !NO WALL. */ return ret_val; /* NOBJS, PAGE 6 */ /* O39-- SONG BIRD GLOBAL */ L8000: if (prsvec_1.prsa != vindex_1.findw) { goto L8100; } /* !FIND? */ rspeak_(666); return ret_val; L8100: if (prsvec_1.prsa != vindex_1.examiw) { goto L10; } /* !EXAMINE? */ rspeak_(667); return ret_val; /* O40-- PUZZLE/SCOL WALLS */ L9000: if (play_1.here != rindex_1.cpuzz) { goto L9500; } /* !PUZZLE WALLS? */ if (prsvec_1.prsa != vindex_1.pushw) { goto L10; } /* !PUSH? */ for (i = 1; i <= 8; i += 2) { /* !LOCATE WALL. */ if (prsvec_1.prso == puzzle_1.cpwl[i - 1]) { goto L9200; } /* L9100: */ } bug_(80, prsvec_1.prso); /* !WHAT? */ L9200: // TODO Check the following error from cppcheck // [nobjs.c:396]: (error) Array 'puzzle_.cpwl[8]' accessed at index 9, which is out of bounds. // Possible solution change to i-1 j = puzzle_1.cpwl[i]; /* !GET DIRECTIONAL OFFSET. */ nxt = findex_1.cphere + j; /* !GET NEXT STATE. */ wl = puzzle_1.cpvec[nxt - 1]; /* !GET C(NEXT STATE). */ switch (wl + 4) { case 1: goto L9300; case 2: goto L9300; case 3: goto L9300; case 4: goto L9250; case 5: goto L9350; } /* !PROCESS. */ L9250: rspeak_(876); /* !CLEAR CORRIDOR. */ return ret_val; L9300: if (puzzle_1.cpvec[nxt + j - 1] == 0) { goto L9400; } /* !MOVABLE, ROOM TO MOVE? */ L9350: rspeak_(877); /* !IMMOVABLE, NO ROOM. */ return ret_val; L9400: i = 878; /* !ASSUME FIRST PUSH. */ if (findex_1.cpushf) { i = 879; } /* !NOT? */ findex_1.cpushf = TRUE_; puzzle_1.cpvec[nxt + j - 1] = wl; /* !MOVE WALL. */ puzzle_1.cpvec[nxt - 1] = 0; /* !VACATE NEXT STATE. */ cpgoto_(nxt); /* !ONWARD. */ cpinfo_(i, nxt); /* !DESCRIBE. */ princr_(1, play_1.here); /* !PRINT ROOMS CONTENTS. */ rooms_1.rflag[play_1.here - 1] |= RSEEN; return ret_val; L9500: if (play_1.here != screen_1.scolac) { goto L9700; } /* !IN SCOL ACTIVE ROOM? */ for (i = 1; i <= 12; i += 3) { target = screen_1.scolwl[i]; /* !ASSUME TARGET. */ if (screen_1.scolwl[i - 1] == play_1.here) { goto L2100; } /* !TREAT IF FOUND. */ /* L9600: */ } L9700: if (play_1.here != rindex_1.bkbox) { goto L10; } /* !IN BOX ROOM? */ target = oindex_1.wnort; goto L2100; /* NOBJS, PAGE 7 */ /* O41-- SHORT POLE */ L10000: if (prsvec_1.prsa != vindex_1.raisew) { goto L10100; } /* !LIFT? */ i = 749; /* !ASSUME UP. */ if (findex_1.poleuf == 2) { i = 750; } /* !ALREADY UP? */ rspeak_(i); findex_1.poleuf = 2; /* !POLE IS RAISED. */ return ret_val; L10100: if (prsvec_1.prsa != vindex_1.lowerw && prsvec_1.prsa != vindex_1.pushw) { goto L10; } if (findex_1.poleuf != 0) { goto L10200; } /* !ALREADY LOWERED? */ rspeak_(751); /* !CANT DO IT. */ return ret_val; L10200: if (findex_1.mdir % 180 != 0) { goto L10300; } /* !MIRROR N-S? */ findex_1.poleuf = 0; /* !YES, LOWER INTO */ rspeak_(752); /* !CHANNEL. */ return ret_val; L10300: if (findex_1.mdir != 270 || findex_1.mloc != rindex_1.mrb) { goto L10400; } findex_1.poleuf = 0; /* !LOWER INTO HOLE. */ rspeak_(753); return ret_val; L10400: i__1 = findex_1.poleuf + 753; rspeak_(i__1); /* !POLEUF = 1 OR 2. */ findex_1.poleuf = 1; /* !NOW ON FLOOR. */ return ret_val; /* O42-- MIRROR SWITCH */ L11000: if (prsvec_1.prsa != vindex_1.pushw) { goto L10; } /* !PUSH? */ if (findex_1.mrpshf) { goto L11300; } /* !ALREADY PUSHED? */ rspeak_(756); /* !BUTTON GOES IN. */ i__1 = objcts_1.olnt; for (i = 1; i <= i__1; ++i) { /* !BLOCKED? */ if (qhere_(i, rindex_1.mreye) && i != oindex_1.rbeam) { goto L11200; } /* L11100: */ } rspeak_(757); /* !NOTHING IN BEAM. */ return ret_val; L11200: cevent_1.cflag[cindex_1.cevmrs - 1] = TRUE_; /* !MIRROR OPENS. */ cevent_1.ctick[cindex_1.cevmrs - 1] = 7; findex_1.mrpshf = TRUE_; findex_1.mropnf = TRUE_; return ret_val; L11300: rspeak_(758); /* !MIRROR ALREADYOPEN. */ return ret_val; /* NOBJS, PAGE 8 */ /* O43-- BEAM FUNCTION */ L12000: if (prsvec_1.prsa != vindex_1.takew || prsvec_1.prso != oindex_1.rbeam) { goto L12100; } rspeak_(759); /* !TAKE BEAM, JOKE. */ return ret_val; L12100: i = prsvec_1.prso; /* !ASSUME BLK WITH DIROBJ. */ if (prsvec_1.prsa == vindex_1.putw && prsvec_1.prsi == oindex_1.rbeam) { goto L12200; } if (prsvec_1.prsa != vindex_1.mungw || prsvec_1.prso != oindex_1.rbeam || prsvec_1.prsi == 0) { goto L10; } i = prsvec_1.prsi; L12200: if (objcts_1.oadv[i - 1] != play_1.winner) { goto L12300; } /* !CARRYING? */ newsta_(i, 0, play_1.here, 0, 0); /* !DROP OBJ. */ rspsub_(760, objcts_1.odesc2[i - 1]); return ret_val; L12300: j = 761; /* !ASSUME NOT IN ROOM. */ if (qhere_(j, play_1.here)) { i = 762; } /* !IN ROOM? */ // TODO Check the following error from cppcheck // [nobjs.c:607]: (error) Array 'objcts_.odesc2[220]' accessed at index 761, which is out of bounds. rspsub_(j, objcts_1.odesc2[i - 1]); /* !DESCRIBE. */ return ret_val; /* O44-- BRONZE DOOR */ L13000: if (play_1.here == rindex_1.ncell || (findex_1.lcell == 4 && (play_1.here == rindex_1.cell || play_1.here == rindex_1.scorr))) { goto L13100; } rspeak_(763); /* !DOOR NOT THERE. */ return ret_val; L13100: if (! opncls_(oindex_1.odoor, 764, 765)) { goto L10; } /* !OPEN/CLOSE? */ if (play_1.here == rindex_1.ncell && (objcts_1.oflag2[oindex_1.odoor - 1] & OPENBT) != 0) { rspeak_(766); } return ret_val; /* O45-- QUIZ DOOR */ L14000: if (prsvec_1.prsa != vindex_1.openw && prsvec_1.prsa != vindex_1.closew) { goto L14100; } rspeak_(767); /* !DOOR WONT MOVE. */ return ret_val; L14100: if (prsvec_1.prsa != vindex_1.knockw) { goto L10; } /* !KNOCK? */ if (findex_1.inqstf) { goto L14200; } /* !TRIED IT ALREADY? */ findex_1.inqstf = TRUE_; /* !START INQUISITION. */ cevent_1.cflag[cindex_1.cevinq - 1] = TRUE_; cevent_1.ctick[cindex_1.cevinq - 1] = 2; findex_1.quesno = rnd_(8); /* !SELECT QUESTION. */ findex_1.nqatt = 0; findex_1.corrct = 0; rspeak_(768); /* !ANNOUNCE RULES. */ rspeak_(769); i__1 = findex_1.quesno + 770; rspeak_(i__1); /* !ASK QUESTION. */ return ret_val; L14200: rspeak_(798); /* !NO REPLY. */ return ret_val; /* O46-- LOCKED DOOR */ L15000: if (prsvec_1.prsa != vindex_1.openw) { goto L10; } /* !OPEN? */ rspeak_(778); /* !CANT. */ return ret_val; /* O47-- CELL DOOR */ L16000: ret_val = opncls_(oindex_1.cdoor, 779, 780); /* !OPEN/CLOSE? */ return ret_val; /* NOBJS, PAGE 9 */ /* O48-- DIALBUTTON */ L17000: if (prsvec_1.prsa != vindex_1.pushw) { goto L10; } /* !PUSH? */ rspeak_(809); /* !CLICK. */ if ((objcts_1.oflag2[oindex_1.cdoor - 1] & OPENBT) != 0) { rspeak_(810); } /* !CLOSE CELL DOOR. */ i__1 = objcts_1.olnt; for (i = 1; i <= i__1; ++i) { /* !RELOCATE OLD TO HYPER. */ if (objcts_1.oroom[i - 1] == rindex_1.cell && (objcts_1.oflag1[i - 1] & DOORBT) == 0) { i__2 = findex_1.lcell * hyper_1.hfactr; newsta_(i, 0, i__2, 0, 0); } if (objcts_1.oroom[i - 1] == findex_1.pnumb * hyper_1.hfactr) { newsta_(i, 0, rindex_1.cell, 0, 0); } /* L17100: */ } objcts_1.oflag2[oindex_1.odoor - 1] &= ~ OPENBT; objcts_1.oflag2[oindex_1.cdoor - 1] &= ~ OPENBT; objcts_1.oflag1[oindex_1.odoor - 1] &= ~ VISIBT; if (findex_1.pnumb == 4) { objcts_1.oflag1[oindex_1.odoor - 1] |= VISIBT; } if (advs_1.aroom[aindex_1.player - 1] != rindex_1.cell) { goto L17400; } /* !PLAYER IN CELL? */ if (findex_1.lcell != 4) { goto L17200; } /* !IN RIGHT CELL? */ objcts_1.oflag1[oindex_1.odoor - 1] |= VISIBT; moveto_(rindex_1.ncell, aindex_1.player); /* !YES, MOVETO NCELL. */ goto L17400; L17200: moveto_(rindex_1.pcell, aindex_1.player); /* !NO, MOVETO PCELL. */ L17400: findex_1.lcell = findex_1.pnumb; return ret_val; /* NOBJS, PAGE 10 */ /* O49-- DIAL INDICATOR */ L18000: if (prsvec_1.prsa != vindex_1.spinw) { goto L18100; } /* !SPIN? */ findex_1.pnumb = rnd_(8) + 1; /* !WHEE */ /* ! */ i__1 = findex_1.pnumb + 712; rspsub_(797, i__1); return ret_val; L18100: if (prsvec_1.prsa != vindex_1.movew && prsvec_1.prsa != vindex_1.putw && prsvec_1.prsa != vindex_1.trntow) { goto L10; } if (prsvec_1.prsi != 0) { goto L18200; } /* !TURN DIAL TO X? */ rspeak_(806); /* !MUST SPECIFY. */ return ret_val; L18200: if (prsvec_1.prsi >= oindex_1.num1 && prsvec_1.prsi <= oindex_1.num8) { goto L18300; } rspeak_(807); /* !MUST BE DIGIT. */ return ret_val; L18300: findex_1.pnumb = prsvec_1.prsi - oindex_1.num1 + 1; /* !SET UP NEW. */ i__1 = findex_1.pnumb + 712; rspsub_(808, i__1); return ret_val; /* O50-- GLOBAL MIRROR */ L19000: ret_val = mirpan_(832, 0); return ret_val; /* O51-- GLOBAL PANEL */ L20000: if (play_1.here != rindex_1.fdoor) { goto L20100; } /* !AT FRONT DOOR? */ if (prsvec_1.prsa != vindex_1.openw && prsvec_1.prsa != vindex_1.closew) { goto L10; } rspeak_(843); /* !PANEL IN DOOR, NOGO. */ return ret_val; L20100: ret_val = mirpan_(838, 1); return ret_val; /* O52-- PUZZLE ROOM SLIT */ L21000: if (prsvec_1.prsa != vindex_1.putw || prsvec_1.prsi != oindex_1.cslit) { goto L10; } if (prsvec_1.prso != oindex_1.gcard) { goto L21100; } /* !PUT CARD IN SLIT? */ newsta_(prsvec_1.prso, 863, 0, 0, 0); /* !KILL CARD. */ findex_1.cpoutf = TRUE_; /* !OPEN DOOR. */ objcts_1.oflag1[oindex_1.stldr - 1] &= ~ VISIBT; return ret_val; L21100: if ((objcts_1.oflag1[prsvec_1.prso - 1] & VICTBT) == 0 && ( objcts_1.oflag2[prsvec_1.prso - 1] & VILLBT) == 0) { goto L21200; } i__1 = rnd_(5) + 552; rspeak_(i__1); /* !JOKE FOR VILL, VICT. */ return ret_val; L21200: newsta_(prsvec_1.prso, 0, 0, 0, 0); /* !KILL OBJECT. */ rspsub_(864, odo2); /* !DESCRIBE. */ return ret_val; } /* nobjs_ */
void gdt_() { /* Initialized data */ const integer cmdmax = 38; const char *dbgcmd = "DRDODADCDXDHDLDVDFDSAFHENRNTNCNDRRRTRCRDTKEXARAOAAACAXAVD2DNANDMDTAHDPPDDZAZ"; static const integer argtyp[38] = { 2,2,2,2,2,0,0,2,2,0,1,0,0,0,0,0,0, 0,0,0,1,0,3,3,3,3,1,3,2,2,1,2,1,0,0,0,0,1 }; /* System generated locals */ integer i__1, i__2; /* Local variables */ integer i, j, k, l, l1; char cmd[3]; integer fmax, smax; char buf[80]; char *z; /* FIRST, VALIDATE THAT THE CALLER IS AN IMPLEMENTER. */ fmax = 46; /* !SET ARRAY LIMITS. */ smax = 22; if (debug_1.gdtflg != 0) { goto L2000; } /* !IF OK, SKIP. */ more_output("You are not an authorized user."); /* !NOT AN IMPLEMENTER. */ return; /* !BOOT HIM OFF */ /* GDT, PAGE 2A */ /* HERE TO GET NEXT COMMAND */ L2000: printf("GDT>"); /* !OUTPUT PROMPT. */ (void) fflush(stdout); if (NULL == fgets(buf, sizeof buf, stdin)) exit_(); more_input(); cmd[0] = ' '; cmd[1] = ' '; sscanf(buf, "%2s", cmd); /* !GET COMMAND. */ if (cmd[0] == '\0') goto L2000; /* !IGNORE BLANKS. */ if (islower(cmd[0])) cmd[0] = toupper(cmd[0]); if (islower(cmd[1])) cmd[1] = toupper(cmd[1]); i__1 = cmdmax; for (i = 1; i <= i__1; ++i) { /* !LOOK IT UP. */ if (cmd[0] == dbgcmd[(i - 1) << 1] && cmd[1] == dbgcmd[((i - 1) << 1) + 1]) { goto L2300; } /* !FOUND? */ /* L2100: */ } L2200: more_output("?"); /* !NO, LOSE. */ goto L2000; /* L230: */ /* L240: */ /* L225: */ /* L235: */ /* L245: */ L2300: switch (argtyp[i - 1] + 1) { case 1: goto L2400; case 2: goto L2500; case 3: goto L2600; case 4: goto L2700; } /* !BRANCH ON ARG TYPE. */ goto L2200; /* !ILLEGAL TYPE. */ L2700: printf("Idx,Ary: "); /* !TYPE 3, REQUEST ARRAY COORDS. */ (void) fflush(stdout); if (NULL == fgets(buf, sizeof buf, stdin)) exit_(); more_input(); for (z = buf; *z != '\0'; z++) if (*z == ',') *z = ' '; j = 0; k = 0; sscanf(buf, "%d %d", &j, &k); goto L2400; L2600: printf("Limits: "); /* !TYPE 2, READ BOUNDS. */ (void) fflush(stdout); if (NULL == fgets(buf, sizeof buf, stdin)) exit_(); more_input(); for (z = buf; *z != '\0'; z++) if (*z == ',') *z = ' '; j = 0; k = 0; sscanf(buf, "%d %d", &j, &k); if (k == 0) { k = j; } goto L2400; L2500: printf("Entry: "); /* !TYPE 1, READ ENTRY NO. */ (void) fflush(stdout); if (NULL == fgets(buf, sizeof buf, stdin)) exit_(); more_input(); j = 0; sscanf(buf, "%d", &j); L2400: switch (i) { case 1: goto L10000; case 2: goto L11000; case 3: goto L12000; case 4: goto L13000; case 5: goto L14000; case 6: goto L15000; case 7: goto L16000; case 8: goto L17000; case 9: goto L18000; case 10: goto L19000; case 11: goto L20000; case 12: goto L21000; case 13: goto L22000; case 14: goto L23000; case 15: goto L24000; case 16: goto L25000; case 17: goto L26000; case 18: goto L27000; case 19: goto L28000; case 20: goto L29000; case 21: goto L30000; case 22: goto L31000; case 23: goto L32000; case 24: goto L33000; case 25: goto L34000; case 26: goto L35000; case 27: goto L36000; case 28: goto L37000; case 29: goto L38000; case 30: goto L39000; case 31: goto L40000; case 32: goto L41000; case 33: goto L42000; case 34: goto L43000; case 35: goto L44000; case 36: goto L45000; case 37: goto L46000; case 38: goto L47000; } goto L2200; /* !WHAT??? */ /* GDT, PAGE 3 */ /* DR-- DISPLAY ROOMS */ L10000: if (! (j > 0 && j <= rooms_1.rlnt && (k > 0 && k <= rooms_1.rlnt) && j <= k)) { goto L2200; } /* !ARGS VALID? */ more_output("RM# DESC1 DESC2 EXITS ACTION VALUE FLAGS"); /* !COL HDRS. */ i__1 = k; for (i = j; i <= i__1; ++i) { more_output(NULL); printf("%3d", i); for (l = 1; l <= 6; ++l) printf(" %6d", eqr[i + l * 200 - 201]); printf("\n"); /* L10100: */ } goto L2000; /* DO-- DISPLAY OBJECTS */ L11000: if (! (j > 0 && j <= objcts_1.olnt && (k > 0 && k <= objcts_1.olnt) && j <= k)) { goto L2200; } /* !ARGS VALID? */ more_output("OB# DESC1 DESC2 DESCO ACT FLAGS1 FLAGS2 FVL TVL SIZE CAPAC ROOM ADV CON READ"); /* !COL HDRS */ i__1 = k; for (i = j; i <= i__1; ++i) { more_output(NULL); printf("%3d%6d%6d%6d%4d%7d%7d%4d%4d%6d%6d %4d%4d%4d%6d\n", i, eqo[i + 1 * 220 - 221], eqo[i + 2 * 220 - 221], eqo[i + 3 * 220 - 221], eqo[i + 4 * 220 - 221], eqo[i + 5 * 220 - 221], eqo[i + 6 * 220 - 221], eqo[i + 7 * 220 - 221], eqo[i + 8 * 220 - 221], eqo[i + 9 * 220 - 221], eqo[i + 10 * 220 - 221], eqo[i + 11 * 220 - 221], eqo[i + 12 * 220 - 221], eqo[i + 13 * 220 - 221], eqo[i + 14 * 220 - 221]); /* L11100: */ } goto L2000; /* DA-- DISPLAY ADVENTURERS */ L12000: if (! (j > 0 && j <= advs_1.alnt && (k > 0 && k <= advs_1.alnt) && j <= k) ) { goto L2200; } /* !ARGS VALID? */ more_output("AD# ROOM SCORE VEHIC OBJECT ACTION STREN FLAGS"); i__1 = k; for (i = j; i <= i__1; ++i) { more_output(NULL); printf("%3d", i); for (l = 1; l <= 7; ++l) printf(" %6d", eqa[i + (l << 2) - 5]); printf("\n"); /* L12100: */ } goto L2000; /* DC-- DISPLAY CLOCK EVENTS */ L13000: if (! (j > 0 && j <= cevent_1.clnt && (k > 0 && k <= cevent_1.clnt) && j <= k)) { goto L2200; } /* !ARGS VALID? */ more_output("CL# TICK ACTION FLAG"); i__1 = k; for (i = j; i <= i__1; ++i) { more_output(NULL); printf("%3d %6d %6d %c\n", i, eqc[i + 1 * 25 - 26], eqc[i + 2 * 25 - 26], cevent_1.cflag[i - 1] ? 'T' : 'F'); /* L13100: */ } goto L2000; /* DX-- DISPLAY EXITS */ L14000: if (! (j > 0 && j <= exits_1.xlnt && (k > 0 && k <= exits_1.xlnt) && j <= k)) { goto L2200; } /* !ARGS VALID? */ more_output(" RANGE CONTENTS"); /* !COL HDRS. */ i__1 = k; for (i = j; i <= i__1; i += 10) { /* !TEN PER LINE. */ /* Computing MIN */ i__2 = i + 9; l = min(i__2,k); /* !COMPUTE END OF LINE. */ more_output(NULL); printf("%3d-%3d ", i, l); for (l1 = i; l1 <= l; ++l1) printf("%7d", exits_1.travel[l1 - 1]); printf("\n"); /* L14100: */ } goto L2000; /* DH-- DISPLAY HACKS */ L15000: more_output(NULL); printf("THFPOS= %d, THFFLG= %c, THFACT= %c\n", hack_1.thfpos, hack_1.thfflg ? 'T' : 'F', hack_1.thfact ? 'T' : 'F'); more_output(NULL); printf("SWDACT= %c, SWDSTA= %d\n", hack_1.swdact ? 'T' : 'F', hack_1.swdsta); goto L2000; /* DL-- DISPLAY LENGTHS */ L16000: more_output(NULL); printf("R=%d, X=%d, O=%d, C=%d\n", rooms_1.rlnt, exits_1.xlnt, objcts_1.olnt, cevent_1.clnt); more_output(NULL); printf("V=%d, A=%d, M=%d, R2=%d\n", vill_1.vlnt, advs_1.alnt, rmsg_1.mlnt, oroom2_1.r2lnt); more_output(NULL); printf("MBASE=%d, STRBIT=%d\n", star_1.mbase, star_1.strbit); goto L2000; /* DV-- DISPLAY VILLAINS */ L17000: if (! (j > 0 && j <= vill_1.vlnt && (k > 0 && k <= vill_1.vlnt) && j <= k) ) { goto L2200; } /* !ARGS VALID? */ more_output("VL# OBJECT PROB OPPS BEST MELEE"); /* !COL HDRS */ i__1 = k; for (i = j; i <= i__1; ++i) { more_output(NULL); printf("%3d", i); for (l = 1; l <= 5; ++l) printf(" %6d", eqv[i + (l << 2) - 5]); printf("\n"); /* L17100: */ } goto L2000; /* DF-- DISPLAY FLAGS */ L18000: if (! (j > 0 && j <= fmax && (k > 0 && k <= fmax) && j <= k)) { goto L2200; } /* !ARGS VALID? */ i__1 = k; for (i = j; i <= i__1; ++i) { more_output(NULL); printf("Flag #%-2d = %c\n", i, flags[i - 1] ? 'T' : 'F'); /* L18100: */ } goto L2000; /* DS-- DISPLAY STATE */ L19000: more_output(NULL); printf("Parse vector= %6d %6d %6d %c %6d\n", prsvec_1.prsa, prsvec_1.prso, prsvec_1.prsi, prsvec_1.prswon ? 'T' : 'F', prsvec_1.prscon); more_output(NULL); printf("Play vector= %6d %6d %c\n", play_1.winner, play_1.here, play_1.telflg ? 'T' : 'F'); more_output(NULL); printf("State vector= %6d %6d %6d %6d %6d %6d %6d %6d %6d\n", state_1.moves, state_1.deaths, state_1.rwscor, state_1.mxscor, state_1.mxload, state_1.ltshft, state_1.bloc, state_1.mungrm, state_1.hs); more_output(NULL); printf(" %6d %6d\n", state_1.egscor, state_1.egmxsc); more_output(NULL); printf("Scol vector= %6d %6d %6d\n", screen_1.fromdr, screen_1.scolrm, screen_1.scolac); goto L2000; /* GDT, PAGE 4 */ /* AF-- ALTER FLAGS */ L20000: if (! (j > 0 && j <= fmax)) { goto L2200; } /* !ENTRY NO VALID? */ printf("Old= %c New= ", flags[j - 1] ? 'T' : 'F'); /* !TYPE OLD, GET NEW. */ (void) fflush(stdout); if (NULL == fgets(buf, sizeof buf, stdin)) exit_(); more_input(); for (z = buf; *z != '\0'; z++) { if (! isspace(*z)) { if (*z == 't' || *z == 'T') flags[j - 1] = 1; else if (*z == 'f' || *z == 'F') flags[j - 1] = 0; break; } } goto L2000; /* 21000-- HELP */ L21000: more_output("Valid commands are:"); more_output("AA- Alter ADVS DR- Display ROOMS"); more_output("AC- Alter CEVENT DS- Display state"); more_output("AF- Alter FINDEX DT- Display text"); more_output("AH- Alter HERE DV- Display VILLS"); more_output("AN- Alter switches DX- Display EXITS"); more_output("AO- Alter OBJCTS DZ- Display PUZZLE"); more_output("AR- Alter ROOMS D2- Display ROOM2"); more_output("AV- Alter VILLS EX- Exit"); more_output("AX- Alter EXITS HE- Type this message"); more_output("AZ- Alter PUZZLE NC- No cyclops"); more_output("DA- Display ADVS ND- No deaths"); more_output("DC- Display CEVENT NR- No robber"); more_output("DF- Display FINDEX NT- No troll"); more_output("DH- Display HACKS PD- Program detail"); more_output("DL- Display lengths RC- Restore cyclops"); more_output("DM- Display RTEXT RD- Restore deaths"); more_output("DN- Display switches RR- Restore robber"); more_output("DO- Display OBJCTS RT- Restore troll"); more_output("DP- Display parser TK- Take"); goto L2000; /* NR-- NO ROBBER */ L22000: hack_1.thfflg = FALSE_; /* !DISABLE ROBBER. */ hack_1.thfact = FALSE_; newsta_(oindex_1.thief, 0, 0, 0, 0); /* !VANISH THIEF. */ more_output("No robber."); goto L2000; /* NT-- NO TROLL */ L23000: findex_1.trollf = TRUE_; newsta_(oindex_1.troll, 0, 0, 0, 0); more_output("No troll."); goto L2000; /* NC-- NO CYCLOPS */ L24000: findex_1.cyclof = TRUE_; newsta_(oindex_1.cyclo, 0, 0, 0, 0); more_output("No cyclops."); goto L2000; /* ND-- IMMORTALITY MODE */ L25000: debug_1.dbgflg = 1; more_output("No deaths."); goto L2000; /* RR-- RESTORE ROBBER */ L26000: hack_1.thfact = TRUE_; more_output("Restored robber."); goto L2000; /* RT-- RESTORE TROLL */ L27000: findex_1.trollf = FALSE_; newsta_(oindex_1.troll, 0, rindex_1.mtrol, 0, 0); more_output("Restored troll."); goto L2000; /* RC-- RESTORE CYCLOPS */ L28000: findex_1.cyclof = FALSE_; findex_1.magicf = FALSE_; newsta_(oindex_1.cyclo, 0, rindex_1.mcycl, 0, 0); more_output("Restored cyclops."); goto L2000; /* RD-- MORTAL MODE */ L29000: debug_1.dbgflg = 0; more_output("Restored deaths."); goto L2000; /* GDT, PAGE 5 */ /* TK-- TAKE */ L30000: if (! (j > 0 && j <= objcts_1.olnt)) { goto L2200; } /* !VALID OBJECT? */ newsta_(j, 0, 0, 0, play_1.winner); /* !YES, TAKE OBJECT. */ more_output("Taken."); /* !TELL. */ goto L2000; /* EX-- GOODBYE */ L31000: prsvec_1.prscon = 1; return; /* AR-- ALTER ROOM ENTRY */ L32000: if (! (j > 0 && j <= rooms_1.rlnt && (k > 0 && k <= 5))) { goto L2200; } /* !INDICES VALID? */ printf("Old = %6d New = ", eqr[j + k * 200 - 201]); /* !TYPE OLD, GET NEW. */ (void) fflush(stdout); if (NULL == fgets(buf, sizeof buf, stdin)) exit_(); more_input(); sscanf(buf, "%d", &eqr[j + k * 200 - 201]); goto L2000; /* AO-- ALTER OBJECT ENTRY */ L33000: if (! (j > 0 && j <= objcts_1.olnt && (k > 0 && k <= 14))) { goto L2200; } /* !INDICES VALID? */ printf("Old = %6d New = ", eqo[j + k * 200 - 201]); (void) fflush(stdout); if (NULL == fgets(buf, sizeof buf, stdin)) exit_(); more_input(); sscanf(buf, "%d", &eqo[j + k * 220 - 221]); goto L2000; /* AA-- ALTER ADVS ENTRY */ L34000: if (! (j > 0 && j <= advs_1.alnt && (k > 0 && k <= 7))) { goto L2200; } /* !INDICES VALID? */ printf("Old = %6d New = ", eqa[j + (k << 2) - 5]); (void) fflush(stdout); if (NULL == fgets(buf, sizeof buf, stdin)) exit_(); more_input(); sscanf(buf, "%d", &eqa[j + (k << 2) - 5]); goto L2000; /* AC-- ALTER CLOCK EVENTS */ L35000: if (! (j > 0 && j <= cevent_1.clnt && (k > 0 && k <= 3))) { goto L2200; } /* !INDICES VALID? */ if (k == 3) { goto L35500; } /* !FLAGS ENTRY? */ printf("Old = %6d New = ", eqc[j + k * 25 - 26]); (void) fflush(stdout); if (NULL == fgets(buf, sizeof buf, stdin)) exit_(); more_input(); sscanf(buf, "%d", &eqc[j + k * 25 - 26]); goto L2000; L35500: (void) fflush(stdout); if (NULL == fgets(buf, sizeof buf, stdin)) exit_(); more_input(); for (z = buf; *z != '\0'; z++) { if (! isspace(*z)) { if (*z == 't' || *z == 'T') cevent_1.cflag[j - 1] = 1; else if (*z == 'f' || *z == 'F') cevent_1.cflag[j - 1] = 0; break; } } goto L2000; /* GDT, PAGE 6 */ /* AX-- ALTER EXITS */ L36000: if (! (j > 0 && j <= exits_1.xlnt)) { goto L2200; } /* !ENTRY NO VALID? */ printf("Old= %6d New= ", exits_1.travel[j - 1]); (void) fflush(stdout); if (NULL == fgets(buf, sizeof buf, stdin)) exit_(); more_input(); sscanf(buf, "%d", &exits_1.travel[j - 1]); goto L2000; /* AV-- ALTER VILLAINS */ L37000: if (! (j > 0 && j <= vill_1.vlnt && (k > 0 && k <= 5))) { goto L2200; } /* !INDICES VALID? */ printf("Old = %6d New= ", eqv[j + (k << 2) - 5]); (void) fflush(stdout); if (NULL == fgets(buf, sizeof buf, stdin)) exit_(); more_input(); sscanf(buf, "%d", &eqv[j + (k << 2) - 5]); goto L2000; /* D2-- DISPLAY ROOM2 LIST */ L38000: if (! (j > 0 && j <= oroom2_1.r2lnt && (k > 0 && k <= oroom2_1.r2lnt) && j <= k)) { goto L2200; } i__1 = k; for (i = j; i <= i__1; ++i) { more_output(NULL); printf("#%2d Room=%6d Obj=%6d\n", i, oroom2_1.rroom2[i - 1], oroom2_1.oroom2[i - 1]); /* L38100: */ } goto L2000; /* DN-- DISPLAY SWITCHES */ L39000: if (! (j > 0 && j <= smax && (k > 0 && k <= smax) && j <= k)) { goto L2200; } /* !VALID? */ i__1 = k; for (i = j; i <= i__1; ++i) { more_output(NULL); printf("Switch #%-2d = %d\n", i, switch_[i - 1]); /* L39100: */ } goto L2000; /* AN-- ALTER SWITCHES */ L40000: if (! (j > 0 && j <= smax)) { goto L2200; } /* !VALID ENTRY? */ printf("Old= %6d New= ", switch_[j - 1]); (void) fflush(stdout); if (NULL == fgets(buf, sizeof buf, stdin)) exit_(); more_input(); sscanf(buf, "%d", &switch_[j - 1]); goto L2000; /* DM-- DISPLAY MESSAGES */ L41000: if (! (j > 0 && j <= rmsg_1.mlnt && (k > 0 && k <= rmsg_1.mlnt) && j <= k) ) { goto L2200; } /* !VALID LIMITS? */ more_output(" RANGE CONTENTS"); i__1 = k; for (i = j; i <= i__1; i += 10) { more_output(NULL); /* Computing MIN */ i__2 = i + 9; l = min(i__2,k); printf("%3d-%3d ", i, l); for (l1 = i; l1 <= l; ++l1) printf(" %6d", rmsg_1.rtext[l1 - 1]); printf("\n"); /* L41100: */ } goto L2000; /* DT-- DISPLAY TEXT */ L42000: rspeak_(j); goto L2000; /* AH-- ALTER HERE */ L43000: printf("Old= %6d New= ", play_1.here); (void) fflush(stdout); if (NULL == fgets(buf, sizeof buf, stdin)) exit_(); more_input(); sscanf(buf, "%d", &play_1.here); eqa[0] = play_1.here; goto L2000; /* DP-- DISPLAY PARSER STATE */ L44000: more_output(NULL); printf("ORPHS= %7d%7d%7d%7d%7d%7d\n", orp[0], orp[1], orp[2], orp[3], orp[4], last_1.lastit); more_output(NULL); printf("PV= %7d%7d%7d%7d%7d\n", pvec[0], pvec[1], pvec[2], pvec[3], pvec[4]); more_output(NULL); printf("SYN= %7d%7d%7d%7d%7d%7d\n", syn[0], syn[1], syn[2], syn[3], syn[4], syn[5]); more_output(NULL); printf(" %7d%7d%7d%7d%7d\n", syn[6], syn[7], syn[8], syn[9], syn[10]); goto L2000; /* PD-- PROGRAM DETAIL DEBUG */ L45000: printf("Old= %6d New= ", debug_1.prsflg); /* !TYPE OLD, GET NEW. */ (void) fflush(stdout); if (NULL == fgets(buf, sizeof buf, stdin)) exit_(); more_input(); sscanf(buf, "%d", &debug_1.prsflg); goto L2000; /* DZ-- DISPLAY PUZZLE ROOM */ L46000: for (i = 1; i <= 64; i += 8) { /* !DISPLAY PUZZLE */ more_output(NULL); printf(" "); for (j = i; j <= i + 7; ++j) printf("%3d", puzzle_1.cpvec[j - 1]); printf("\n"); /* L46100: */ } goto L2000; /* AZ-- ALTER PUZZLE ROOM */ L47000: if (! (j > 0 && j <= 64)) { goto L2200; } /* !VALID ENTRY? */ printf("Old= %6d New= ", puzzle_1.cpvec[j - 1]); /* !OUTPUT OLD, */ (void) fflush(stdout); if (NULL == fgets(buf, sizeof buf, stdin)) exit_(); more_input(); sscanf(buf, "%d", &puzzle_1.cpvec[j - 1]); goto L2000; } /* gdt_ */
logical rappl1_(integer ri) { /* System generated locals */ integer i__1, i__2; logical ret_val; /* Local variables */ integer i; integer j; ret_val = TRUE_; /* !USUALLY IGNORED. */ if (ri == 0) { return ret_val; } /* !RETURN IF NAUGHT. */ /* !SET TO FALSE FOR */ /* !NEW DESC NEEDED. */ switch (ri) { case 1: goto L1000; case 2: goto L2000; case 3: goto L3000; case 4: goto L4000; case 5: goto L5000; case 6: goto L6000; case 7: goto L7000; case 8: goto L8000; case 9: goto L9000; case 10: goto L10000; case 11: goto L11000; case 12: goto L12000; case 13: goto L13000; case 14: goto L14000; case 15: goto L15000; case 16: goto L16000; case 17: goto L17000; case 18: goto L18000; case 19: goto L19000; case 20: goto L20000; case 21: goto L21000; case 22: goto L22000; case 23: goto L23000; case 24: goto L24000; case 25: goto L25000; case 26: goto L26000; case 27: goto L27000; case 28: goto L28000; case 29: goto L29000; case 30: goto L30000; case 31: goto L31000; case 32: goto L32000; case 33: goto L33000; case 34: goto L34000; case 35: goto L35000; case 36: goto L36000; case 37: goto L37000; } bug_(1, ri); /* R1-- EAST OF HOUSE. DESCRIPTION DEPENDS ON STATE OF WINDOW */ L1000: if (prsvec_1.prsa != vindex_1.lookw) { return ret_val; } /* !LOOK? */ i = 13; /* !ASSUME CLOSED. */ if ((objcts_1.oflag2[oindex_1.windo - 1] & OPENBT) != 0) { i = 12; } /* !IF OPEN, AJAR. */ rspsub_(11, i); /* !DESCRIBE. */ return ret_val; /* R2-- KITCHEN. SAME VIEW FROM INSIDE. */ L2000: if (prsvec_1.prsa != vindex_1.lookw) { return ret_val; } /* !LOOK? */ i = 13; /* !ASSUME CLOSED. */ if ((objcts_1.oflag2[oindex_1.windo - 1] & OPENBT) != 0) { i = 12; } /* !IF OPEN, AJAR. */ rspsub_(14, i); /* !DESCRIBE. */ return ret_val; /* R3-- LIVING ROOM. DESCRIPTION DEPENDS ON MAGICF (STATE OF */ /* DOOR TO CYCLOPS ROOM), RUG (MOVED OR NOT), DOOR (OPEN OR CLOSED) */ L3000: if (prsvec_1.prsa != vindex_1.lookw) { goto L3500; } /* !LOOK? */ i = 15; /* !ASSUME NO HOLE. */ if (findex_1.magicf) { i = 16; } /* !IF MAGICF, CYCLOPS HOLE. */ rspeak_(i); /* !DESCRIBE. */ i = findex_1.orrug + 17; /* !ASSUME INITIAL STATE. */ if ((objcts_1.oflag2[oindex_1.door - 1] & OPENBT) != 0) { i += 2; } /* !DOOR OPEN? */ rspeak_(i); /* !DESCRIBE. */ return ret_val; /* NOT A LOOK WORD. REEVALUATE TROPHY CASE. */ L3500: if (prsvec_1.prsa != vindex_1.takew && (prsvec_1.prsa != vindex_1.putw || prsvec_1.prsi != oindex_1.tcase)) { return ret_val; } advs_1.ascore[play_1.winner - 1] = state_1.rwscor; /* !SCORE TROPHY CASE. */ i__1 = objcts_1.olnt; for (i = 1; i <= i__1; ++i) { /* !RETAIN RAW SCORE AS WELL. */ j = i; /* !FIND OUT IF IN CASE. */ L3550: j = objcts_1.ocan[j - 1]; /* !TRACE OWNERSHIP. */ if (j == 0) { goto L3600; } if (j != oindex_1.tcase) { goto L3550; } /* !DO ALL LEVELS. */ advs_1.ascore[play_1.winner - 1] += objcts_1.otval[i - 1]; L3600: ; } scrupd_(0); /* !SEE IF ENDGAME TRIG. */ return ret_val; /* RAPPL1, PAGE 3 */ /* R4-- CELLAR. SHUT DOOR AND BAR IT IF HE JUST WALKED IN. */ L4000: if (prsvec_1.prsa != vindex_1.lookw) { goto L4500; } /* !LOOK? */ rspeak_(21); /* !DESCRIBE CELLAR. */ return ret_val; L4500: if (prsvec_1.prsa != vindex_1.walkiw) { return ret_val; } /* !WALKIN? */ if ((objcts_1.oflag2[oindex_1.door - 1] & (OPENBT + TCHBT)) != OPENBT) { return ret_val; } objcts_1.oflag2[oindex_1.door - 1] = (objcts_1.oflag2[oindex_1.door - 1] | TCHBT) & ~ OPENBT; rspeak_(22); /* !SLAM AND BOLT DOOR. */ return ret_val; /* R5-- MAZE11. DESCRIBE STATE OF GRATING. */ L5000: if (prsvec_1.prsa != vindex_1.lookw) { return ret_val; } /* !LOOK? */ rspeak_(23); /* !DESCRIBE. */ i = 24; /* !ASSUME LOCKED. */ if (findex_1.grunlf) { i = 26; } /* !UNLOCKED? */ if ((objcts_1.oflag2[oindex_1.grate - 1] & OPENBT) != 0) { i = 25; } /* !OPEN? */ rspeak_(i); /* !DESCRIBE GRATE. */ return ret_val; /* R6-- CLEARING. DESCRIBE CLEARING, MOVE LEAVES. */ L6000: if (prsvec_1.prsa != vindex_1.lookw) { goto L6500; } /* !LOOK? */ rspeak_(27); /* !DESCRIBE. */ if (findex_1.rvclr == 0) { return ret_val; } /* !LEAVES MOVED? */ i = 28; /* !YES, ASSUME GRATE CLOSED. */ if ((objcts_1.oflag2[oindex_1.grate - 1] & OPENBT) != 0) { i = 29; } /* !OPEN? */ rspeak_(i); /* !DESCRIBE GRATE. */ return ret_val; L6500: if (findex_1.rvclr != 0 || (qhere_(oindex_1.leave, rindex_1.clear) && (prsvec_1.prsa != vindex_1.movew)) || prsvec_1.prso != oindex_1.leave) { return ret_val; } rspeak_(30); /* !MOVE LEAVES, REVEAL GRATE. */ findex_1.rvclr = 1; /* !INDICATE LEAVES MOVED. */ return ret_val; /* RAPPL1, PAGE 4 */ /* R7-- RESERVOIR SOUTH. DESCRIPTION DEPENDS ON LOW TIDE FLAG. */ L7000: if (prsvec_1.prsa != vindex_1.lookw) { return ret_val; } /* !LOOK? */ i = 31; /* !ASSUME FULL. */ if (findex_1.lwtidf) { i = 32; } /* !IF LOW TIDE, EMPTY. */ rspeak_(i); /* !DESCRIBE. */ rspeak_(33); /* !DESCRIBE EXITS. */ return ret_val; /* R8-- RESERVOIR. STATE DEPENDS ON LOW TIDE FLAG. */ L8000: if (prsvec_1.prsa != vindex_1.lookw) { return ret_val; } /* !LOOK? */ i = 34; /* !ASSUME FULL. */ if (findex_1.lwtidf) { i = 35; } /* !IF LOW TIDE, EMTPY. */ rspeak_(i); /* !DESCRIBE. */ return ret_val; /* R9-- RESERVOIR NORTH. ALSO DEPENDS ON LOW TIDE FLAG. */ L9000: if (prsvec_1.prsa != vindex_1.lookw) { return ret_val; } /* !LOOK? */ i = 36; /* !YOU GET THE IDEA. */ if (findex_1.lwtidf) { i = 37; } rspeak_(i); rspeak_(38); return ret_val; /* R10-- GLACIER ROOM. STATE DEPENDS ON MELTED, VANISHED FLAGS. */ L10000: if (prsvec_1.prsa != vindex_1.lookw) { return ret_val; } /* !LOOK? */ rspeak_(39); /* !BASIC DESCRIPTION. */ i = 0; /* !ASSUME NO CHANGES. */ if (findex_1.glacmf) { i = 40; } /* !PARTIAL MELT? */ if (findex_1.glacrf) { i = 41; } /* !COMPLETE MELT? */ rspeak_(i); /* !DESCRIBE. */ return ret_val; /* R11-- FOREST ROOM */ L11000: if (prsvec_1.prsa == vindex_1.walkiw) { cevent_1.cflag[cindex_1.cevfor - 1] = TRUE_; } /* !IF WALK IN, BIRDIE. */ return ret_val; /* R12-- MIRROR ROOM. STATE DEPENDS ON MIRROR INTACT. */ L12000: if (prsvec_1.prsa != vindex_1.lookw) { return ret_val; } /* !LOOK? */ rspeak_(42); /* !DESCRIBE. */ if (findex_1.mirrmf) { rspeak_(43); } /* !IF BROKEN, NASTY REMARK. */ return ret_val; /* RAPPL1, PAGE 5 */ /* R13-- CAVE2 ROOM. BLOW OUT CANDLES WITH 50% PROBABILITY. */ L13000: if (prsvec_1.prsa != vindex_1.walkiw) { return ret_val; } /* !WALKIN? */ if (prob_(50, 50) || objcts_1.oadv[oindex_1.candl - 1] != play_1.winner || ! ((objcts_1.oflag1[oindex_1.candl - 1] & ONBT) != 0)) { return ret_val; } objcts_1.oflag1[oindex_1.candl - 1] &= ~ ONBT; rspeak_(47); /* !TELL OF WINDS. */ cevent_1.cflag[cindex_1.cevcnd - 1] = FALSE_; /* !HALT CANDLE COUNTDOWN. */ return ret_val; /* R14-- BOOM ROOM. BLOW HIM UP IF CARRYING FLAMING OBJECT. */ L14000: j = objcts_1.odesc2[oindex_1.candl - 1]; /* !ASSUME CANDLE. */ if (objcts_1.oadv[oindex_1.candl - 1] == play_1.winner && ( objcts_1.oflag1[oindex_1.candl - 1] & ONBT) != 0) { goto L14100; } j = objcts_1.odesc2[oindex_1.torch - 1]; /* !ASSUME TORCH. */ if (objcts_1.oadv[oindex_1.torch - 1] == play_1.winner && ( objcts_1.oflag1[oindex_1.torch - 1] & ONBT) != 0) { goto L14100; } j = objcts_1.odesc2[oindex_1.match - 1]; if (objcts_1.oadv[oindex_1.match - 1] == play_1.winner && ( objcts_1.oflag1[oindex_1.match - 1] & ONBT) != 0) { goto L14100; } return ret_val; /* !SAFE */ L14100: if (prsvec_1.prsa != vindex_1.trnonw) { goto L14200; } /* !TURN ON? */ rspsub_(294, j); /* !BOOM */ /* ! */ jigsup_(44); return ret_val; L14200: if (prsvec_1.prsa != vindex_1.walkiw) { return ret_val; } /* !WALKIN? */ rspsub_(295, j); /* !BOOM */ /* ! */ jigsup_(44); return ret_val; /* R15-- NO-OBJS. SEE IF EMPTY HANDED, SCORE LIGHT SHAFT. */ L15000: findex_1.empthf = TRUE_; /* !ASSUME TRUE. */ i__1 = objcts_1.olnt; for (i = 1; i <= i__1; ++i) { /* !SEE IF CARRYING. */ if (objcts_1.oadv[i - 1] == play_1.winner) { findex_1.empthf = FALSE_; } /* L15100: */ } if (play_1.here != rindex_1.bshaf || ! lit_(play_1.here)) { return ret_val; } scrupd_(state_1.ltshft); /* !SCORE LIGHT SHAFT. */ state_1.ltshft = 0; /* !NEVER AGAIN. */ return ret_val; /* RAPPL1, PAGE 6 */ /* R16-- MACHINE ROOM. DESCRIBE MACHINE. */ L16000: if (prsvec_1.prsa != vindex_1.lookw) { return ret_val; } /* !LOOK? */ i = 46; /* !ASSUME LID CLOSED. */ if ((objcts_1.oflag2[oindex_1.machi - 1] & OPENBT) != 0) { i = 12; } /* !IF OPEN, OPEN. */ rspsub_(45, i); /* !DESCRIBE. */ return ret_val; /* R17-- BAT ROOM. UNLESS CARRYING GARLIC, FLY AWAY WITH ME... */ L17000: if (prsvec_1.prsa != vindex_1.lookw) { goto L17500; } /* !LOOK? */ rspeak_(48); /* !DESCRIBE ROOM. */ if (objcts_1.oadv[oindex_1.garli - 1] == play_1.winner) { rspeak_(49); } /* !BAT HOLDS NOSE. */ return ret_val; L17500: if (prsvec_1.prsa != vindex_1.walkiw || objcts_1.oadv[oindex_1.garli - 1] == play_1.winner) { return ret_val; } rspeak_(50); /* !TIME TO FLY, JACK. */ moveto_(bats_1.batdrp[rnd_(9)], play_1.winner); /* !SELECT RANDOM DEST. */ ret_val = FALSE_; /* !INDICATE NEW DESC NEEDED. */ return ret_val; /* R18-- DOME ROOM. STATE DEPENDS ON WHETHER ROPE TIED TO RAILING. */ L18000: if (prsvec_1.prsa != vindex_1.lookw) { goto L18500; } /* !LOOK? */ rspeak_(51); /* !DESCRIBE. */ if (findex_1.domef) { rspeak_(52); } /* !IF ROPE, DESCRIBE. */ return ret_val; L18500: if (prsvec_1.prsa == vindex_1.leapw) { jigsup_(53); } /* !DID HE JUMP??? */ return ret_val; /* R19-- TORCH ROOM. ALSO DEPENDS ON WHETHER ROPE TIED TO RAILING. */ L19000: if (prsvec_1.prsa != vindex_1.lookw) { return ret_val; } /* !LOOK? */ rspeak_(54); /* !DESCRIBE. */ if (findex_1.domef) { rspeak_(55); } /* !IF ROPE, DESCRIBE. */ return ret_val; /* R20-- CAROUSEL ROOM. SPIN HIM OR KILL HIM. */ L20000: if (prsvec_1.prsa != vindex_1.lookw) { goto L20500; } /* !LOOK? */ rspeak_(56); /* !DESCRIBE. */ if (! findex_1.caroff) { rspeak_(57); } /* !IF NOT FLIPPED, SPIN. */ return ret_val; L20500: if (prsvec_1.prsa == vindex_1.walkiw && findex_1.carozf) { jigsup_(58); } /* !WALKED IN. */ return ret_val; /* RAPPL1, PAGE 7 */ /* R21-- LLD ROOM. HANDLE EXORCISE, DESCRIPTIONS. */ L21000: if (prsvec_1.prsa != vindex_1.lookw) { goto L21500; } /* !LOOK? */ rspeak_(59); /* !DESCRIBE. */ if (! findex_1.lldf) { rspeak_(60); } /* !IF NOT VANISHED, GHOSTS. */ return ret_val; L21500: if (prsvec_1.prsa != vindex_1.exorcw) { return ret_val; } /* !EXORCISE? */ if (objcts_1.oadv[oindex_1.bell - 1] == play_1.winner && objcts_1.oadv[ oindex_1.book - 1] == play_1.winner && objcts_1.oadv[ oindex_1.candl - 1] == play_1.winner && (objcts_1.oflag1[ oindex_1.candl - 1] & ONBT) != 0) { goto L21600; } rspeak_(62); /* !NOT EQUIPPED. */ return ret_val; L21600: if (qhere_(oindex_1.ghost, play_1.here)) { goto L21700; } /* !GHOST HERE? */ jigsup_(61); /* !NOPE, EXORCISE YOU. */ return ret_val; L21700: newsta_(oindex_1.ghost, 63, 0, 0, 0); /* !VANISH GHOST. */ findex_1.lldf = TRUE_; /* !OPEN GATE. */ return ret_val; /* R22-- LLD2-ROOM. IS HIS HEAD ON A POLE? */ L22000: if (prsvec_1.prsa != vindex_1.lookw) { return ret_val; } /* !LOOK? */ rspeak_(64); /* !DESCRIBE. */ if (findex_1.onpolf) { rspeak_(65); } /* !ON POLE? */ return ret_val; /* R23-- DAM ROOM. DESCRIBE RESERVOIR, PANEL. */ L23000: if (prsvec_1.prsa != vindex_1.lookw) { return ret_val; } /* !LOOK? */ rspeak_(66); /* !DESCRIBE. */ i = 67; if (findex_1.lwtidf) { i = 68; } rspeak_(i); /* !DESCRIBE RESERVOIR. */ rspeak_(69); /* !DESCRIBE PANEL. */ if (findex_1.gatef) { rspeak_(70); } /* !BUBBLE IS GLOWING. */ return ret_val; /* R24-- TREE ROOM */ L24000: if (prsvec_1.prsa != vindex_1.lookw) { return ret_val; } /* !LOOK? */ rspeak_(660); /* !DESCRIBE. */ i = 661; /* !SET FLAG FOR BELOW. */ i__1 = objcts_1.olnt; for (j = 1; j <= i__1; ++j) { /* !DESCRIBE OBJ IN FORE3. */ if (! qhere_(j, rindex_1.fore3) || j == oindex_1.ftree) { goto L24200; } rspeak_(i); /* !SET STAGE, */ i = 0; rspsub_(502, objcts_1.odesc2[j - 1]); /* !DESCRIBE. */ L24200: ; } return ret_val; /* RAPPL1, PAGE 8 */ /* R25-- CYCLOPS-ROOM. DEPENDS ON CYCLOPS STATE, ASLEEP FLAG, MAGIC FLAG. */ L25000: if (prsvec_1.prsa != vindex_1.lookw) { return ret_val; } /* !LOOK? */ rspeak_(606); /* !DESCRIBE. */ i = 607; /* !ASSUME BASIC STATE. */ if (findex_1.rvcyc > 0) { i = 608; } /* !>0? HUNGRY. */ if (findex_1.rvcyc < 0) { i = 609; } /* !<0? THIRSTY. */ if (findex_1.cyclof) { i = 610; } /* !ASLEEP? */ if (findex_1.magicf) { i = 611; } /* !GONE? */ rspeak_(i); /* !DESCRIBE. */ if (! findex_1.cyclof && findex_1.rvcyc != 0) { i__1 = abs(findex_1.rvcyc) + 193; rspeak_(i__1); } return ret_val; /* R26-- BANK BOX ROOM. */ L26000: if (prsvec_1.prsa != vindex_1.walkiw) { return ret_val; } /* !SURPRISE HIM. */ for (i = 1; i <= 8; i += 2) { /* !SCOLRM DEPENDS ON */ if (screen_1.fromdr == screen_1.scoldr[i - 1]) { screen_1.scolrm = screen_1.scoldr[i]; } /* L26100: */ } /* !ENTRY DIRECTION. */ return ret_val; /* R27-- TREASURE ROOM. */ L27000: if (prsvec_1.prsa != vindex_1.walkiw || ! hack_1.thfact) { return ret_val; } if (objcts_1.oroom[oindex_1.thief - 1] != play_1.here) { newsta_(oindex_1.thief, 82, play_1.here, 0, 0); } hack_1.thfpos = play_1.here; /* !RESET SEARCH PATTERN. */ objcts_1.oflag2[oindex_1.thief - 1] |= FITEBT; if (objcts_1.oroom[oindex_1.chali - 1] == play_1.here) { objcts_1.oflag1[oindex_1.chali - 1] &= ~ TAKEBT; } /* VANISH EVERYTHING IN ROOM */ j = 0; /* !ASSUME NOTHING TO VANISH. */ i__1 = objcts_1.olnt; for (i = 1; i <= i__1; ++i) { if (i == oindex_1.chali || i == oindex_1.thief || ! qhere_(i, play_1.here)) { goto L27200; } j = 83; /* !FLAG BYEBYE. */ objcts_1.oflag1[i - 1] &= ~ VISIBT; L27200: ; } rspeak_(j); /* !DESCRIBE. */ return ret_val; /* R28-- CLIFF FUNCTION. SEE IF CARRYING INFLATED BOAT. */ L28000: findex_1.deflaf = objcts_1.oadv[oindex_1.rboat - 1] != play_1.winner; /* !TRUE IF NOT CARRYING. */ return ret_val; /* RAPPL1, PAGE 9 */ /* R29-- RIVR4 ROOM. PLAY WITH BUOY. */ L29000: if (! findex_1.buoyf || objcts_1.oadv[oindex_1.buoy - 1] != play_1.winner) { return ret_val; } rspeak_(84); /* !GIVE HINT, */ findex_1.buoyf = FALSE_; /* !THEN DISABLE. */ return ret_val; /* R30-- OVERFALLS. DOOM. */ L30000: if (prsvec_1.prsa != vindex_1.lookw) { jigsup_(85); } /* !OVER YOU GO. */ return ret_val; /* R31-- BEACH ROOM. DIG A HOLE. */ L31000: if (prsvec_1.prsa != vindex_1.digw || prsvec_1.prso != oindex_1.shove) { return ret_val; } ++findex_1.rvsnd; /* !INCREMENT DIG STATE. */ switch (findex_1.rvsnd) { case 1: goto L31100; case 2: goto L31100; case 3: goto L31100; case 4: goto L31400; case 5: goto L31500; } /* !PROCESS STATE. */ bug_(2, findex_1.rvsnd); L31100: i__1 = findex_1.rvsnd + 85; rspeak_(i__1); /* !1-3... DISCOURAGE HIM. */ return ret_val; L31400: i = 89; /* !ASSUME DISCOVERY. */ if ((objcts_1.oflag1[oindex_1.statu - 1] & VISIBT) != 0) { i = 88; } rspeak_(i); objcts_1.oflag1[oindex_1.statu - 1] |= VISIBT; return ret_val; L31500: findex_1.rvsnd = 0; /* !5... SAND COLLAPSES */ jigsup_(90); /* !AND SO DOES HE. */ return ret_val; /* R32-- TCAVE ROOM. DIG A HOLE IN GUANO. */ L32000: if (prsvec_1.prsa != vindex_1.digw || prsvec_1.prso != oindex_1.shove) { return ret_val; } i = 91; /* !ASSUME NO GUANO. */ if (! qhere_(oindex_1.guano, play_1.here)) { goto L32100; } /* !IS IT HERE? */ /* Computing MIN */ i__1 = 4, i__2 = findex_1.rvgua + 1; findex_1.rvgua = min(i__1,i__2); /* !YES, SET NEW STATE. */ i = findex_1.rvgua + 91; /* !GET NASTY REMARK. */ L32100: rspeak_(i); /* !DESCRIBE. */ return ret_val; /* R33-- FALLS ROOM */ L33000: if (prsvec_1.prsa != vindex_1.lookw) { return ret_val; } /* !LOOK? */ rspeak_(96); /* !DESCRIBE. */ i = 97; /* !ASSUME NO RAINBOW. */ if (findex_1.rainbf) { i = 98; } /* !GOT ONE? */ rspeak_(i); /* !DESCRIBE. */ return ret_val; /* RAPPL1, PAGE 10 */ /* R34-- LEDGE FUNCTION. LEDGE CAN COLLAPSE. */ L34000: if (prsvec_1.prsa != vindex_1.lookw) { return ret_val; } /* !LOOK? */ rspeak_(100); /* !DESCRIBE. */ i = 102; /* !ASSUME SAFE ROOM OK. */ if ((rooms_1.rflag[rindex_1.msafe - 1] & RMUNG) != 0) { i = 101; } rspeak_(i); /* !DESCRIBE. */ return ret_val; /* R35-- SAFE ROOM. STATE DEPENDS ON WHETHER SAFE BLOWN. */ L35000: if (prsvec_1.prsa != vindex_1.lookw) { return ret_val; } /* !LOOK? */ rspeak_(104); /* !DESCRIBE. */ i = 105; /* !ASSUME OK. */ if (findex_1.safef) { i = 106; } /* !BLOWN? */ rspeak_(i); /* !DESCRIBE. */ return ret_val; /* R36-- MAGNET ROOM. DESCRIBE, CHECK FOR SPINDIZZY DOOM. */ L36000: if (prsvec_1.prsa != vindex_1.lookw) { goto L36500; } /* !LOOK? */ rspeak_(107); /* !DESCRIBE. */ return ret_val; L36500: if (prsvec_1.prsa != vindex_1.walkiw || ! findex_1.caroff) { return ret_val; } /* !WALKIN ON FLIPPED? */ if (findex_1.carozf) { goto L36600; } /* !ZOOM? */ rspeak_(108); /* !NO, SPIN HIS COMPASS. */ return ret_val; L36600: i = 58; /* !SPIN HIS INSIDES. */ if (play_1.winner != aindex_1.player) { i = 99; } /* !SPIN ROBOT. */ jigsup_(i); /* !DEAD. */ return ret_val; /* R37-- CAGE ROOM. IF SOLVED CAGE, MOVE TO OTHER CAGE ROOM. */ L37000: if (findex_1.cagesf) { moveto_(rindex_1.cager, play_1.winner); } /* !IF SOLVED, MOVE. */ return ret_val; } /* rappl1_ */