# 2.11BSD#431 - /usr/src/new/PORT/dungeon/dso6.F

       1: C GHERE--	IS GLOBAL ACTUALLY IN THIS ROOM?
       2: C
       3: C COPYRIGHT 1980, INFOCOM COMPUTERS AND COMMUNICATIONS, CAMBRIDGE MA. 02142
       4: C ALL RIGHTS RESERVED, COMMERCIAL USAGE STRICTLY PROHIBITED
       5: C WRITTEN BY R. M. SUPNIK
       6: C
       7: C DECLARATIONS
       8: C
       9:         LOGICAL FUNCTION GHERE(OBJ,RM)
      10:         IMPLICIT INTEGER(A-Z)
      11: #include "rooms.h"
      12: #include "rflag.h"
      13: #include "rindex.h"
      14: C
      15:         COMMON /STAR/ MBASE,STRBIT
      16: C GHERE, PAGE 2
      17: C
      18:         GHERE=.TRUE.
      19: C						!ASSUME WINS.
      20:         GO TO (1000,1000,1000,1000,1000,1000,
      21: &               1000,1000,1000,1000,1000,
      22: &               2000,3000,4000,5000,5000,5000,6000,
      23: &               7000,8000,9000,9100,8000,10000,11000),OBJ-STRBIT
      24:         CALL BUG(60,OBJ)
      25: C
      26: C 1000--	STARS ARE ALWAYS HERE
      27: C
      28: 1000    RETURN
      29: C
      30: C 2000--	BIRD
      31: C
      32: 2000    GHERE=((RM.GE.FORE1).AND.(RM.LT.CLEAR)).OR.(RM.EQ.MTREE)
      33:         RETURN
      34: C
      35: C 3000--	TREE
      36: C
      37: 3000    GHERE=((RM.GE.FORE1).AND.(RM.LT.CLEAR)).AND.(RM.NE.FORE3)
      38:         RETURN
      39: C
      40: C 4000--	NORTH WALL
      41: C
      42: 4000    GHERE=((RM.GE.BKVW).AND.(RM.LE.BKBOX)).OR.(RM.EQ.CPUZZ)
      43:         RETURN
      44: C
      45: C 5000--	EAST, SOUTH, WEST WALLS
      46: C
      47: 5000    GHERE=((RM.GE.BKVW).AND.(RM.LT.BKBOX)).OR.(RM.EQ.CPUZZ)
      48:         RETURN
      49: C
      50: C 6000--	GLOBAL WATER
      51: C
      52: 6000    GHERE=and(RFLAG(RM),(RWATER+RFILL)).NE.0
      53:         RETURN
      54: C
      55: C 7000--	GLOBAL GUARDIANS
      56: C
      57: 7000    GHERE=((RM.GE.MRC).AND.(RM.LE.MRD)).OR.
      58: &               ((RM.GE.MRCE).AND.(RM.LE.MRDW)).OR.(RM.EQ.INMIR)
      59:         RETURN
      60: C
      61: C 8000--	ROSE/CHANNEL
      62: C
      63: 8000    GHERE=((RM.GE.MRA).AND.(RM.LE.MRD)).OR.(RM.EQ.INMIR)
      64:         RETURN
      65: C
      66: C 9000--	MIRROR
      67: C 9100		PANEL
      68: C
      69: 9100    IF(RM.EQ.FDOOR) RETURN
      70: C						!PANEL AT FDOOR.
      71: 9000    GHERE=((RM.GE.MRA).AND.(RM.LE.MRC)).OR.
      72: &               ((RM.GE.MRAE).AND.(RM.LE.MRCW))
      73:         RETURN
      74: C
      75: C 10000--	MASTER
      76: C
      77: 10000   GHERE=(RM.EQ.FDOOR).OR.(RM.EQ.NCORR).OR.(RM.EQ.PARAP).OR.
      78: &               (RM.EQ.CELL)
      79:         RETURN
      80: C
      81: C 11000--	LADDER
      82: C
      83: 11000   GHERE=(RM.EQ.CPUZZ)
      84:         RETURN
      85: C
      86:         END
      87: C MRHERE--	IS MIRROR HERE?
      88: C
      89: C DECLARATIONS
      90: C
      91:         INTEGER FUNCTION MRHERE(RM)
      92:         IMPLICIT INTEGER(A-Z)
      93: C
      94: C ROOMS
      95: #include "rindex.h"
      96: #include "flags.h"
      97: C MRHERE, PAGE 2
      98: C
      99:         IF((RM.LT.MRAE).OR.(RM.GT.MRDW)) GO TO 100
     100: C
     101: C RM IS AN E-W ROOM, MIRROR MUST BE N-S (MDIR= 0 OR 180)
     102: C
     103:         MRHERE=1
     104: C						!ASSUME MIRROR 1 HERE.
     105:         IF(MOD(RM-MRAE,2).EQ.(MDIR/180)) MRHERE=2
     106:         RETURN
     107: C
     108: C RM IS NORTH OR SOUTH OF MIRROR.  IF MIRROR IS N-S OR NOT
     109: C WITHIN ONE ROOM OF RM, LOSE.
     110: C
     111: 100     MRHERE=0
     112:         IF((IABS(MLOC-RM).NE.1).OR.(MOD(MDIR,180).EQ.0)) RETURN
     113: C
     114: C RM IS WITHIN ONE OF MLOC, AND MDIR IS E-W
     115: C
     116:         MRHERE=1
     117:         IF(((RM.LT.MLOC).AND.(MDIR.LT.180)).OR.
     118: &         ((RM.GT.MLOC).AND.(MDIR.GT.180))) MRHERE=2
     119:         RETURN
     120:         END

Last modified: 1988-10-21 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 630 |