1
2
3
4
5 INTEGER WEIGHR(CN,AD)
6 IMPLICIT INTEGER (A-Z)
7 %include dparam
8 LOGICAL QHERE
9
10 WEIGHR=0
11 DO 100 I=1,OLNT
12 IF(OSIZE(I).GE.10000) GO TO 100
13 IF((OADV(I).EQ.AD).AND.(AD.NE.0)) GO TO 50
14 J=I
15 25 J=OCAN(J)
16 IF(J.EQ.0) GO TO 100
17 IF(((OADV(J).NE.AD).OR.(AD.EQ.0)) .AND.
18 & (J.NE.CN)) GO TO 25
19 50 WEIGHR=WEIGHR+OSIZE(I)
20 100 CONTINUE
21 RETURN
22
23
24
25
26
27
28
29 LOGICAL GHERE(OBJ,RM)
30 IMPLICIT INTEGER (A-Z)
31 %include dparam
32
33 GHERE=.TRUE.
34 IF(OBJ.LE.GLOBAL) RETURN
35 GO TO ( 100,1000,2000,3000,4000,5000,5000,5000,6000,
36 & 7000,8000,9000,9100,8000,10000,11000,12000,
37 & 13000,14000,15000),OBJ-GLOBAL
38 CALL BUG(60,OBJ)
39
40
41
42 100 GHERE=(RM.EQ.TEMP1).OR.(RM.EQ.TREAS).OR.(RM.EQ.SLIDE)
43 RETURN
44
45
46
47 1000 GHERE=((RM.GE.WHOUS).AND.(RM.LE.EHOUS)).OR.
48 & ((RM.GE.FORE1).AND.(RM.LE.CLEAR)).OR.(RM.EQ.MTREE)
49 RETURN
50
51
52
53 2000 GHERE=((RM.GE.FORE1).AND.(RM.LT.CLEAR)).OR.(RM.EQ.MTREE)
54 RETURN
55
56
57
58 3000 GHERE=((RM.GE.FORE1).AND.(RM.LT.CLEAR)).AND.(RM.NE.FORE3)
59 RETURN
60
61
62
63 4000 GHERE=((RM.GE.BKVW).AND.(RM.LE.BKBOX)).OR.(RM.EQ.CPUZZ)
64 RETURN
65
66
67
68 5000 GHERE=((RM.GE.BKVW).AND.(RM.LT.BKBOX)).OR.(RM.EQ.CPUZZ)
69 RETURN
70
71
72
73
74 6000 GHERE=AND(RFLAG(RM),(RWATER+RFILL)).NE.0
75 RETURN
76
77
78
79 7000 GHERE=((RM.GE.MRC).AND.(RM.LE.MRD)).OR.
80 & ((RM.GE.MRCE).AND.(RM.LE.MRDW)).OR.(RM.EQ.INMIR)
81 RETURN
82
83
84
85 8000 GHERE=((RM.GE.MRA).AND.(RM.LE.MRD)).OR.(RM.EQ.INMIR)
86 RETURN
87
88
89
90
91 9100 IF(RM.EQ.FDOOR) RETURN
92 9000 GHERE=((RM.GE.MRA).AND.(RM.LE.MRC)).OR.
93 & ((RM.GE.MRAE).AND.(RM.LE.MRCW))
94 RETURN
95
96
97
98 10000 GHERE=(RM.EQ.FDOOR).OR.(RM.EQ.NCORR).OR.(RM.EQ.PARAP).OR.
99 & (RM.EQ.CELL).OR.(RM.EQ.PCELL).OR.(RM.EQ.NCELL)
100 RETURN
101
102
103
104 11000 GHERE=(RM.EQ.CPUZZ)
105 RETURN
106
107
108
109 12000 GHERE=(RM.EQ.TWELL).OR.(RM.EQ.BWELL)
110 RETURN
111
112
113
114 13000 GHERE=(RM.GE.SLID1).AND.(RM.LE.SLEDG)
115 RETURN
116
117
118
119 14000 GHERE=(RM.GE.SLIDE).OR.((RM.GE.SLID1).AND.(RM.LE.SLEDG))
120 RETURN
121
122
123
124 15000 GHERE=.FALSE.
125 RETURN
126
127
128
129
130
131
132
133 INTEGER MRHERE(RM)
134 IMPLICIT INTEGER (A-Z)
135 %include dparam
136
137 IF((RM.LT.MRAE).OR.(RM.GT.MRDW)) GO TO 100
138
139
140
141 MRHERE=1
142 IF(MOD(RM-MRAE,2).EQ.(MDIR/180)) MRHERE=2
143 RETURN
144
145
146
147
148 100 MRHERE=0
149 IF((IABS(MLOC-RM).NE.1).OR.(MOD(MDIR,180).EQ.0)) RETURN
150
151
152
153 MRHERE=1
154 IF(((RM.LT.MLOC).AND.(MDIR.LT.180)).OR.
155 & ((RM.GT.MLOC).AND.(MDIR.GT.180))) MRHERE=2
156 RETURN
157
158
159
160
161
162
163
164 ENCRYP(INW,OUTW)
165 IMPLICIT INTEGER (A-Z)
166 %include dparam
167 CHARACTER*(WRDLNT) INW,OUTW,KEYW
168 INTEGER UINW(8),UKEYW(8)
169 DATA KEYW/'ECOVXRMS'/
170
171 ICHARA=ICHAR('A')-1
172 UINWS=0
173 UKEYWS=0
174 J=1
175 DO 100 I=1,WRDLNT
176 UKEYW(I)=ICHAR(KEYW(I:I))-ICHARA
177 IF(ICHAR(INW(J:J)).LE.ICHARA) J=1
178 UINW(I)=ICHAR(INW(J:J))-ICHARA
179 UKEYWS=UKEYWS+UKEYW(I)
180 UINWS=UINWS+UINW(I)
181 J=J+1
182 100 CONTINUE
183
184 USUM=MOD(UINWS,8)+(8*MOD(UKEYWS,8))
185 DO 200 I=1,8
186
187 J=AND(XOR(UINW(I),UKEYW(I),USUM),31)
188 USUM=MOD(USUM+1,32)
189 IF(J.GT.26) J=MOD(J,26)
190 OUTW(I:I)=CHAR(MAX0(1,J)+ICHARA)
191 200 CONTINUE
192 RETURN
193
194
195
196
197
198
199
200 CPGOTO(ST)
201 IMPLICIT INTEGER (A-Z)
202 %include dparam
203
204
205 RFLAG(CPUZZ)=AND(RFLAG(CPUZZ),COMPL(RSEEN))
206 DO 100 I=1,OLNT
207
208
209
210 IF((OROOM(I).EQ.CPUZZ).AND.
211 & ((AND(OFLAG2(I),(ACTRBT+VILLBT))).EQ.0))
212 & CALL NEWSTA(I,0,CPHERE*HFACTR,0,0)
213 IF(OROOM(I).EQ.(ST*HFACTR))
214 & CALL NEWSTA(I,0,CPUZZ,0,0)
215 100 CONTINUE
216 CPHERE=ST
217 RETURN
218
219
220
221
222
223
224
225 CPINFO(RMK,ST)
226 IMPLICIT INTEGER (A-Z)
227 %include dparam
228 INTEGER DGMOFT(8)
229 CHARACTER*2 DGM(8),PICT(5),QMK
230
231
232
233 DATA DGMOFT/-9,-8,-7,-1,1,7,8,9/
234 DATA PICT/'SS','SS','SS',' ','MM'/
235 DATA QMK/'??'/
236
237 CALL RSPEAK(RMK)
238 DO 100 I=1,8
239 J=DGMOFT(I)
240 DGM(I)=PICT(CPVEC(ST+J)+4)
241 IF((IABS(J).EQ.1).OR.(IABS(J).EQ.8)) GO TO 100
242 K=8
243 IF(J.LT.0) K=-8
244 L=J-K
245 IF((CPVEC(ST+K).NE.0).AND.(CPVEC(ST+L).NE.0))
246 & DGM(I)=QMK
247 100 CONTINUE
248 WRITE(OUTCH,10) DGM
249
250 IF(ST.EQ.10) CALL RSPEAK(870)
251 IF(ST.EQ.37) CALL RSPEAK(871)
252 I=872
253 IF(CPOUTF) I=873
254 IF(ST.EQ.52) CALL RSPEAK(I)
255 IF(CPVEC(ST+1).EQ.-2) CALL RSPEAK(874)
256 IF(CPVEC(ST-1).EQ.-3) CALL RSPEAK(875)
257 RETURN
258
259 10 FORMAT(' |',A,1X,A,1X,A,'|'/,
260 &' West |',A,' .. ',A,'| East'/,
261 &' |',A,1X,A,1X,A,'|')
262
263