Ejemplo n.º 1
0
logical walk_()
{
    /* System generated locals */
    logical ret_val;

    ret_val = TRUE_;
/* 						!ASSUME WINS. */
    if (play_1.winner != aindex_1.player || lit_(play_1.here) || prob_(25,
	    25)) {
	goto L500;
    }
    if (! findxt_(prsvec_1.prso, play_1.here)) {
	goto L450;
    }
/* 						!INVALID EXIT? GRUE */
/* 						! */
    switch (curxt_1.xtype) {
	case 1:  goto L400;
	case 2:  goto L200;
	case 3:  goto L100;
	case 4:  goto L300;
    }
/* 						!DECODE EXIT TYPE. */
    bug_(9, curxt_1.xtype);

L100:
    if (cxappl_(curxt_1.xactio) != 0) {
	goto L400;
    }
/* 						!CEXIT... RETURNED ROOM? */
    if (flags[*xflag - 1]) {
	goto L400;
    }
/* 						!NO, FLAG ON? */
L200:
    jigsup_(523);
/* 						!BAD EXIT, GRUE */
/* 						! */
    return ret_val;

L300:
    if (cxappl_(curxt_1.xactio) != 0) {
	goto L400;
    }
/* 						!DOOR... RETURNED ROOM? */
    if ((objcts_1.oflag2[curxt_1.xobj - 1] & OPENBT) != 0) {
	goto L400;
    }
/* 						!NO, DOOR OPEN? */
    jigsup_(523);
/* 						!BAD EXIT, GRUE */
/* 						! */
    return ret_val;

L400:
    if (lit_(curxt_1.xroom1)) {
	goto L900;
    }
/* 						!VALID ROOM, IS IT LIT? */
L450:
    jigsup_(522);
/* 						!NO, GRUE */
/* 						! */
    return ret_val;

/* ROOM IS LIT, OR WINNER IS NOT PLAYER (NO GRUE). */

L500:
    if (findxt_(prsvec_1.prso, play_1.here)) {
	goto L550;
    }
/* 						!EXIT EXIST? */
L525:
    curxt_1.xstrng = 678;
/* 						!ASSUME WALL. */
    if (prsvec_1.prso == xsrch_1.xup) {
	curxt_1.xstrng = 679;
    }
/* 						!IF UP, CANT. */
    if (prsvec_1.prso == xsrch_1.xdown) {
	curxt_1.xstrng = 680;
    }
/* 						!IF DOWN, CANT. */
    if ((rooms_1.rflag[play_1.here - 1] & RNWALL) != 0) {
	curxt_1.xstrng = 524;
    }
    rspeak_(curxt_1.xstrng);
    prsvec_1.prscon = 1;
/* 						!STOP CMD STREAM. */
    return ret_val;

L550:
    switch (curxt_1.xtype) {
	case 1:  goto L900;
	case 2:  goto L600;
	case 3:  goto L700;
	case 4:  goto L800;
    }
/* 						!BRANCH ON EXIT TYPE. */
    bug_(9, curxt_1.xtype);

L700:
    if (cxappl_(curxt_1.xactio) != 0) {
	goto L900;
    }
/* 						!CEXIT... RETURNED ROOM? */
    if (flags[*xflag - 1]) {
	goto L900;
    }
/* 						!NO, FLAG ON? */
L600:
    if (curxt_1.xstrng == 0) {
	goto L525;
    }
/* 						!IF NO REASON, USE STD. */
    rspeak_(curxt_1.xstrng);
/* 						!DENY EXIT. */
    prsvec_1.prscon = 1;
/* 						!STOP CMD STREAM. */
    return ret_val;

L800:
    if (cxappl_(curxt_1.xactio) != 0) {
	goto L900;
    }
/* 						!DOOR... RETURNED ROOM? */
    if ((objcts_1.oflag2[curxt_1.xobj - 1] & OPENBT) != 0) {
	goto L900;
    }
/* 						!NO, DOOR OPEN? */
    if (curxt_1.xstrng == 0) {
	curxt_1.xstrng = 525;
    }
/* 						!IF NO REASON, USE STD. */
    rspsub_(curxt_1.xstrng, objcts_1.odesc2[curxt_1.xobj - 1]);
    prsvec_1.prscon = 1;
/* 						!STOP CMD STREAM. */
    return ret_val;

L900:
    ret_val = moveto_(curxt_1.xroom1, play_1.winner);
/* 						!MOVE TO ROOM. */
    if (ret_val) {
	ret_val = rmdesc_(0);
    }
/* 						!DESCRIBE ROOM. */
    return ret_val;
} /* walk_ */
Ejemplo n.º 2
0
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_ */
Ejemplo n.º 3
0
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_ */
Ejemplo n.º 4
0
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_ */