-
Notifications
You must be signed in to change notification settings - Fork 128
/
objcts.c
1140 lines (1010 loc) · 23.8 KB
/
objcts.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/* OAPPLI- OBJECT SPECIAL ACTION ROUTINES */
/*COPYRIGHT 1980, INFOCOM COMPUTERS AND COMMUNICATIONS, CAMBRIDGE MA. 02142*/
/* ALL RIGHTS RESERVED, COMMERCIAL USAGE STRICTLY PROHIBITED */
/* WRITTEN BY R. M. SUPNIK */
#include "funcs.h"
#include "vars.h"
logical oappli_(ri, arg)
integer ri;
integer arg;
{
/* Initialized data */
const integer mxsmp = 99;
/* System generated locals */
integer i__1;
logical ret_val;
/* Local variables */
logical f;
integer flobts, i;
integer j, av, io, ir, iz;
integer odi2 = 0, odo2 = 0;
integer nloc;
if (ri == 0) {
goto L10;
}
/* !ZERO IS FALSE APP. */
if (ri <= mxsmp) {
goto L100;
}
/* !SIMPLE OBJECT? */
if (prsvec_1.prso > 220) {
goto L5;
}
if (prsvec_1.prso != 0) {
odo2 = objcts_1.odesc2[prsvec_1.prso - 1];
}
L5:
if (prsvec_1.prsi != 0) {
odi2 = objcts_1.odesc2[prsvec_1.prsi - 1];
}
av = advs_1.avehic[play_1.winner - 1];
flobts = FLAMBT + LITEBT + ONBT;
ret_val = TRUE_;
switch (ri - mxsmp) {
case 1: goto L2000;
case 2: goto L5000;
case 3: goto L10000;
case 4: goto L11000;
case 5: goto L12000;
case 6: goto L15000;
case 7: goto L18000;
case 8: goto L19000;
case 9: goto L20000;
case 10: goto L22000;
case 11: goto L25000;
case 12: goto L26000;
case 13: goto L32000;
case 14: goto L35000;
case 15: goto L39000;
case 16: goto L40000;
case 17: goto L45000;
case 18: goto L47000;
case 19: goto L48000;
case 20: goto L49000;
case 21: goto L50000;
case 22: goto L51000;
case 23: goto L52000;
case 24: goto L54000;
case 25: goto L55000;
case 26: goto L56000;
case 27: goto L57000;
case 28: goto L58000;
case 29: goto L59000;
case 30: goto L60000;
case 31: goto L61000;
case 32: goto L62000;
}
bug_(6, ri);
/* RETURN HERE TO DECLARE FALSE RESULT */
L10:
ret_val = FALSE_;
return ret_val;
/* SIMPLE OBJECTS, PROCESSED EXTERNALLY. */
L100:
if (ri < 32) {
ret_val = sobjs_(ri, arg);
}
else {
ret_val = nobjs_(ri, arg);
}
return ret_val;
/* OAPPLI, PAGE 3 */
/* O100-- MACHINE FUNCTION */
L2000:
if (play_1.here != rindex_1.mmach) {
goto L10;
}
/* !NOT HERE? F */
ret_val = opncls_(oindex_1.machi, 123, 124);
/* !HANDLE OPN/CLS. */
return ret_val;
/* O101-- WATER FUNCTION */
L5000:
if (prsvec_1.prsa != vindex_1.fillw) {
goto L5050;
}
/* !FILL X WITH Y IS */
prsvec_1.prsa = vindex_1.putw;
/* !MADE INTO */
i = prsvec_1.prsi;
prsvec_1.prsi = prsvec_1.prso;
prsvec_1.prso = i;
/* !PUT Y IN X. */
i = odi2;
odi2 = odo2;
odo2 = i;
L5050:
if (prsvec_1.prso == oindex_1.water || prsvec_1.prso == oindex_1.gwate) {
goto L5100;
}
rspeak_(561);
/* !WATER IS IND OBJ, */
return ret_val;
/* !PUNT. */
L5100:
if (prsvec_1.prsa != vindex_1.takew) {
goto L5400;
}
/* !TAKE WATER? */
if (objcts_1.oadv[oindex_1.bottl - 1] == play_1.winner && objcts_1.ocan[
prsvec_1.prso - 1] != oindex_1.bottl) {
goto L5500;
}
if (objcts_1.ocan[prsvec_1.prso - 1] == 0) {
goto L5200;
}
/* !INSIDE ANYTHING? */
if ((objcts_1.oflag2[objcts_1.ocan[prsvec_1.prso - 1] - 1] &
OPENBT) != 0) {
goto L5200;
}
/* !YES, OPEN? */
rspsub_(525, objcts_1.odesc2[objcts_1.ocan[prsvec_1.prso - 1] - 1]);
/* !INSIDE, CLOSED, PUNT. */
return ret_val;
L5200:
rspeak_(615);
/* !NOT INSIDE OR OPEN, */
return ret_val;
/* !SLIPS THRU FINGERS. */
L5400:
if (prsvec_1.prsa != vindex_1.putw) {
goto L5700;
}
/* !PUT WATER IN X? */
if (av != 0 && prsvec_1.prsi == av) {
goto L5800;
}
/* !IN VEH? */
if (prsvec_1.prsi == oindex_1.bottl) {
goto L5500;
}
/* !IN BOTTLE? */
rspsub_(297, odi2);
/* !WONT GO ELSEWHERE. */
newsta_(prsvec_1.prso, 0, 0, 0, 0);
/* !VANISH WATER. */
return ret_val;
L5500:
if ((objcts_1.oflag2[oindex_1.bottl - 1] & OPENBT) != 0) {
goto L5550;
}
/* !BOTTLE OPEN? */
rspeak_(612);
/* !NO, LOSE. */
return ret_val;
L5550:
if (qempty_(oindex_1.bottl)) {
goto L5600;
}
/* !OPEN, EMPTY? */
rspeak_(613);
/* !NO, ALREADY FULL. */
return ret_val;
L5600:
newsta_(oindex_1.water, 614, 0, oindex_1.bottl, 0);
/* !TAKE WATER TO BOTTLE. */
return ret_val;
L5700:
if (prsvec_1.prsa != vindex_1.dropw && prsvec_1.prsa != vindex_1.pourw &&
prsvec_1.prsa != vindex_1.givew) {
goto L5900;
}
if (av != 0) {
goto L5800;
}
/* !INTO VEHICLE? */
newsta_(prsvec_1.prso, 133, 0, 0, 0);
/* !NO, VANISHES. */
return ret_val;
L5800:
newsta_(oindex_1.water, 0, 0, av, 0);
/* !WATER INTO VEHICLE. */
rspsub_(296, objcts_1.odesc2[av - 1]);
/* !DESCRIBE. */
return ret_val;
L5900:
if (prsvec_1.prsa != vindex_1.throww) {
goto L10;
}
/* !LAST CHANCE, THROW? */
newsta_(prsvec_1.prso, 132, 0, 0, 0);
/* !VANISHES. */
return ret_val;
/* OAPPLI, PAGE 4 */
/* O102-- LEAF PILE */
L10000:
if (prsvec_1.prsa != vindex_1.burnw) {
goto L10500;
}
/* !BURN? */
if (objcts_1.oroom[prsvec_1.prso - 1] == 0) {
goto L10100;
}
/* !WAS HE CARRYING? */
newsta_(prsvec_1.prso, 158, 0, 0, 0);
/* !NO, BURN IT. */
return ret_val;
L10100:
newsta_(prsvec_1.prso, 0, play_1.here, 0, 0);
/* !DROP LEAVES. */
jigsup_(159);
/* !BURN HIM. */
return ret_val;
L10500:
if (prsvec_1.prsa != vindex_1.movew) {
goto L10600;
}
/* !MOVE? */
rspeak_(2);
/* !DONE. */
return ret_val;
L10600:
if (prsvec_1.prsa != vindex_1.lookuw || findex_1.rvclr != 0) {
goto L10;
}
rspeak_(344);
/* !LOOK UNDER? */
return ret_val;
/* O103-- TROLL, DONE EXTERNALLY. */
L11000:
ret_val = trollp_(arg);
/* !TROLL PROCESSOR. */
return ret_val;
/* O104-- RUSTY KNIFE. */
L12000:
if (prsvec_1.prsa != vindex_1.takew) {
goto L12100;
}
/* !TAKE? */
if (objcts_1.oadv[oindex_1.sword - 1] == play_1.winner) {
rspeak_(160);
}
/* !PULSE SWORD. */
goto L10;
L12100:
if ((prsvec_1.prsa != vindex_1.attacw && prsvec_1.prsa != vindex_1.killw
|| prsvec_1.prsi != oindex_1.rknif) && (prsvec_1.prsa !=
vindex_1.swingw && prsvec_1.prsa != vindex_1.throww ||
prsvec_1.prso != oindex_1.rknif)) {
goto L10;
}
newsta_(oindex_1.rknif, 0, 0, 0, 0);
/* !KILL KNIFE. */
jigsup_(161);
/* !KILL HIM. */
return ret_val;
/* OAPPLI, PAGE 5 */
/* O105-- GLACIER */
L15000:
if (prsvec_1.prsa != vindex_1.throww) {
goto L15500;
}
/* !THROW? */
if (prsvec_1.prso != oindex_1.torch) {
goto L15400;
}
/* !TORCH? */
newsta_(oindex_1.ice, 169, 0, 0, 0);
/* !MELT ICE. */
objcts_1.odesc1[oindex_1.torch - 1] = 174;
/* !MUNG TORCH. */
objcts_1.odesc2[oindex_1.torch - 1] = 173;
objcts_1.oflag1[oindex_1.torch - 1] &= ~ flobts;
newsta_(oindex_1.torch, 0, rindex_1.strea, 0, 0);
/* !MOVE TORCH. */
findex_1.glacrf = TRUE_;
/* !GLACIER GONE. */
if (! lit_(play_1.here)) {
rspeak_(170);
}
/* !IN DARK? */
return ret_val;
L15400:
rspeak_(171);
/* !JOKE IF NOT TORCH. */
return ret_val;
L15500:
if (prsvec_1.prsa != vindex_1.meltw || prsvec_1.prso != oindex_1.ice) {
goto L10;
}
if ((objcts_1.oflag1[prsvec_1.prsi - 1] & flobts) == flobts) {
goto L15600;
}
rspsub_(298, odi2);
/* !CANT MELT WITH THAT. */
return ret_val;
L15600:
findex_1.glacmf = TRUE_;
/* !PARTIAL MELT. */
if (prsvec_1.prsi != oindex_1.torch) {
goto L15700;
}
/* !MELT WITH TORCH? */
objcts_1.odesc1[oindex_1.torch - 1] = 174;
/* !MUNG TORCH. */
objcts_1.odesc2[oindex_1.torch - 1] = 173;
objcts_1.oflag1[oindex_1.torch - 1] &= ~ flobts;
L15700:
jigsup_(172);
/* !DROWN. */
return ret_val;
/* O106-- BLACK BOOK */
L18000:
if (prsvec_1.prsa != vindex_1.openw) {
goto L18100;
}
/* !OPEN? */
rspeak_(180);
/* !JOKE. */
return ret_val;
L18100:
if (prsvec_1.prsa != vindex_1.closew) {
goto L18200;
}
/* !CLOSE? */
rspeak_(181);
return ret_val;
L18200:
if (prsvec_1.prsa != vindex_1.burnw) {
goto L10;
}
/* !BURN? */
newsta_(prsvec_1.prso, 0, 0, 0, 0);
/* !FATAL JOKE. */
jigsup_(182);
return ret_val;
/* OAPPLI, PAGE 6 */
/* O107-- CANDLES, PROCESSED EXTERNALLY */
L19000:
ret_val = lightp_(oindex_1.candl);
return ret_val;
/* O108-- MATCHES, PROCESSED EXTERNALLY */
L20000:
ret_val = lightp_(oindex_1.match);
return ret_val;
/* O109-- CYCLOPS, PROCESSED EXTERNALLY. */
L22000:
ret_val = cyclop_(arg);
/* !CYCLOPS */
return ret_val;
/* O110-- THIEF, PROCESSED EXTERNALLY */
L25000:
ret_val = thiefp_(arg);
return ret_val;
/* O111-- WINDOW */
L26000:
ret_val = opncls_(oindex_1.windo, 208, 209);
/* !OPEN/CLS WINDOW. */
return ret_val;
/* O112-- PILE OF BODIES */
L32000:
if (prsvec_1.prsa != vindex_1.takew) {
goto L32500;
}
/* !TAKE? */
rspeak_(228);
/* !CANT. */
return ret_val;
L32500:
if (prsvec_1.prsa != vindex_1.burnw && prsvec_1.prsa != vindex_1.mungw) {
goto L10;
}
if (findex_1.onpolf) {
return ret_val;
}
/* !BURN OR MUNG? */
findex_1.onpolf = TRUE_;
/* !SET HEAD ON POLE. */
newsta_(oindex_1.hpole, 0, rindex_1.lld2, 0, 0);
jigsup_(229);
/* !BEHEADED. */
return ret_val;
/* O113-- VAMPIRE BAT */
L35000:
rspeak_(50);
/* !TIME TO FLY, JACK. */
f = moveto_(bats_1.batdrp[rnd_(9)], play_1.winner);
/* !SELECT RANDOM DEST. */
f = rmdesc_(0);
return ret_val;
/* OAPPLI, PAGE 7 */
/* O114-- STICK */
L39000:
if (prsvec_1.prsa != vindex_1.wavew) {
goto L10;
}
/* !WAVE? */
if (play_1.here == rindex_1.mrain) {
goto L39500;
}
/* !ON RAINBOW? */
if (play_1.here == rindex_1.pog || play_1.here == rindex_1.falls) {
goto L39200;
}
rspeak_(244);
/* !NOTHING HAPPENS. */
return ret_val;
L39200:
objcts_1.oflag1[oindex_1.pot - 1] |= VISIBT;
findex_1.rainbf = ! findex_1.rainbf;
/* !COMPLEMENT RAINBOW. */
i = 245;
/* !ASSUME OFF. */
if (findex_1.rainbf) {
i = 246;
}
/* !IF ON, SOLID. */
rspeak_(i);
/* !DESCRIBE. */
return ret_val;
L39500:
findex_1.rainbf = FALSE_;
/* !ON RAINBOW, */
jigsup_(247);
/* !TAKE A FALL. */
return ret_val;
/* O115-- BALLOON, HANDLED EXTERNALLY */
L40000:
ret_val = ballop_(arg);
return ret_val;
/* O116-- HEADS */
L45000:
if (prsvec_1.prsa != vindex_1.hellow) {
goto L45100;
}
/* !HELLO HEADS? */
rspeak_(633);
/* !TRULY BIZARRE. */
return ret_val;
L45100:
if (prsvec_1.prsa == vindex_1.readw) {
goto L10;
}
/* !READ IS OK. */
newsta_(oindex_1.lcase, 260, rindex_1.lroom, 0, 0);
/* !MAKE LARGE CASE. */
i = robadv_(play_1.winner, 0, oindex_1.lcase, 0) + robrm_(
play_1.here, 100, 0, oindex_1.lcase, 0);
jigsup_(261);
/* !KILL HIM. */
return ret_val;
/* OAPPLI, PAGE 8 */
/* O117-- SPHERE */
L47000:
if (findex_1.cagesf || prsvec_1.prsa != vindex_1.takew) {
goto L10;
}
/* !TAKE? */
if (play_1.winner != aindex_1.player) {
goto L47500;
}
/* !ROBOT TAKE? */
rspeak_(263);
/* !NO, DROP CAGE. */
if (objcts_1.oroom[oindex_1.robot - 1] != play_1.here) {
goto L47200;
}
/* !ROBOT HERE? */
f = moveto_(rindex_1.caged, play_1.winner);
/* !YES, MOVE INTO CAGE. */
newsta_(oindex_1.robot, 0, rindex_1.caged, 0, 0);
/* !MOVE ROBOT. */
advs_1.aroom[aindex_1.arobot - 1] = rindex_1.caged;
objcts_1.oflag1[oindex_1.robot - 1] |= NDSCBT;
cevent_1.ctick[cindex_1.cevsph - 1] = 10;
/* !GET OUT IN 10 OR ELSE. */
return ret_val;
L47200:
newsta_(oindex_1.spher, 0, 0, 0, 0);
/* !YOURE DEAD. */
rooms_1.rflag[rindex_1.cager - 1] |= RMUNG;
rrand[rindex_1.cager - 1] = 147;
jigsup_(148);
/* !MUNG PLAYER. */
return ret_val;
L47500:
newsta_(oindex_1.spher, 0, 0, 0, 0);
/* !ROBOT TRIED, */
newsta_(oindex_1.robot, 264, 0, 0, 0);
/* !KILL HIM. */
newsta_(oindex_1.cage, 0, play_1.here, 0, 0);
/* !INSERT MANGLED CAGE. */
return ret_val;
/* O118-- GEOMETRICAL BUTTONS */
L48000:
if (prsvec_1.prsa != vindex_1.pushw) {
goto L10;
}
/* !PUSH? */
i = prsvec_1.prso - oindex_1.sqbut + 1;
/* !GET BUTTON INDEX. */
if (i <= 0 || i >= 4) {
goto L10;
}
/* !A BUTTON? */
if (play_1.winner != aindex_1.player) {
switch (i) {
case 1: goto L48100;
case 2: goto L48200;
case 3: goto L48300;
}
}
jigsup_(265);
/* !YOU PUSHED, YOU DIE. */
return ret_val;
L48100:
i = 267;
if (findex_1.carozf) {
i = 266;
}
/* !SPEED UP? */
findex_1.carozf = TRUE_;
rspeak_(i);
return ret_val;
L48200:
i = 266;
/* !ASSUME NO CHANGE. */
if (findex_1.carozf) {
i = 268;
}
findex_1.carozf = FALSE_;
rspeak_(i);
return ret_val;
L48300:
findex_1.caroff = ! findex_1.caroff;
/* !FLIP CAROUSEL. */
if (! qhere_(oindex_1.irbox, rindex_1.carou)) {
return ret_val;
}
/* !IRON BOX IN CAROUSEL? */
rspeak_(269);
/* !YES, THUMP. */
objcts_1.oflag1[oindex_1.irbox - 1] ^= VISIBT;
if (findex_1.caroff) {
rooms_1.rflag[rindex_1.carou - 1] &= ~ RSEEN;
}
return ret_val;
/* O119-- FLASK FUNCTION */
L49000:
if (prsvec_1.prsa == vindex_1.openw) {
goto L49100;
}
/* !OPEN? */
if (prsvec_1.prsa != vindex_1.mungw && prsvec_1.prsa != vindex_1.throww) {
goto L10;
}
newsta_(oindex_1.flask, 270, 0, 0, 0);
/* !KILL FLASK. */
L49100:
rooms_1.rflag[play_1.here - 1] |= RMUNG;
rrand[play_1.here - 1] = 271;
jigsup_(272);
/* !POISONED. */
return ret_val;
/* O120-- BUCKET FUNCTION */
L50000:
if (arg != 2) {
goto L10;
}
/* !READOUT? */
if (objcts_1.ocan[oindex_1.water - 1] != oindex_1.bucke ||
findex_1.bucktf) {
goto L50500;
}
findex_1.bucktf = TRUE_;
/* !BUCKET AT TOP. */
cevent_1.ctick[cindex_1.cevbuc - 1] = 100;
/* !START COUNTDOWN. */
newsta_(oindex_1.bucke, 290, rindex_1.twell, 0, 0);
/* !REPOSITION BUCKET. */
goto L50900;
/* !FINISH UP. */
L50500:
if (objcts_1.ocan[oindex_1.water - 1] == oindex_1.bucke || !
findex_1.bucktf) {
goto L10;
}
findex_1.bucktf = FALSE_;
newsta_(oindex_1.bucke, 291, rindex_1.bwell, 0, 0);
/* !BUCKET AT BOTTOM. */
L50900:
if (av != oindex_1.bucke) {
return ret_val;
}
/* !IN BUCKET? */
f = moveto_(objcts_1.oroom[oindex_1.bucke - 1], play_1.winner);
/* !MOVE ADVENTURER. */
f = rmdesc_(0);
/* !DESCRIBE ROOM. */
return ret_val;
/* OAPPLI, PAGE 9 */
/* O121-- EATME CAKE */
L51000:
if (prsvec_1.prsa != vindex_1.eatw || prsvec_1.prso != oindex_1.ecake ||
play_1.here != rindex_1.alice) {
goto L10;
}
newsta_(oindex_1.ecake, 273, 0, 0, 0);
/* !VANISH CAKE. */
objcts_1.oflag1[oindex_1.robot - 1] &= ~ VISIBT;
ret_val = moveto_(rindex_1.alism, play_1.winner);
/* !MOVE TO ALICE SMALL. */
iz = 64;
ir = rindex_1.alism;
io = rindex_1.alice;
goto L52405;
/* O122-- ICINGS */
L52000:
if (prsvec_1.prsa != vindex_1.readw) {
goto L52200;
}
/* !READ? */
i = 274;
/* !CANT READ. */
if (prsvec_1.prsi != 0) {
i = 275;
}
/* !THROUGH SOMETHING? */
if (prsvec_1.prsi == oindex_1.bottl) {
i = 276;
}
/* !THROUGH BOTTLE? */
if (prsvec_1.prsi == oindex_1.flask) {
i = prsvec_1.prso - oindex_1.orice + 277;
}
/* !THROUGH FLASK? */
rspeak_(i);
/* !READ FLASK. */
return ret_val;
L52200:
if (prsvec_1.prsa != vindex_1.throww || prsvec_1.prso != oindex_1.rdice ||
prsvec_1.prsi != oindex_1.pool) {
goto L52300;
}
newsta_(oindex_1.pool, 280, 0, 0, 0);
/* !VANISH POOL. */
objcts_1.oflag1[oindex_1.saffr - 1] |= VISIBT;
return ret_val;
L52300:
if (play_1.here != rindex_1.alice && play_1.here != rindex_1.alism &&
play_1.here != rindex_1.alitr) {
goto L10;
}
if (prsvec_1.prsa != vindex_1.eatw && prsvec_1.prsa != vindex_1.throww ||
prsvec_1.prso != oindex_1.orice) {
goto L52400;
}
newsta_(oindex_1.orice, 0, 0, 0, 0);
/* !VANISH ORANGE ICE. */
rooms_1.rflag[play_1.here - 1] |= RMUNG;
rrand[play_1.here - 1] = 281;
jigsup_(282);
/* !VANISH ADVENTURER. */
return ret_val;
L52400:
if (prsvec_1.prsa != vindex_1.eatw || prsvec_1.prso != oindex_1.blice) {
goto L10;
}
newsta_(oindex_1.blice, 283, 0, 0, 0);
/* !VANISH BLUE ICE. */
if (play_1.here != rindex_1.alism) {
goto L52500;
}
/* !IN REDUCED ROOM? */
objcts_1.oflag1[oindex_1.robot - 1] |= VISIBT;
io = play_1.here;
ret_val = moveto_(rindex_1.alice, play_1.winner);
iz = 0;
ir = rindex_1.alice;
/* Do a size change, common loop used also by code at 51000 */
L52405:
i__1 = objcts_1.olnt;
for (i = 1; i <= i__1; ++i) {
/* !ENLARGE WORLD. */
if (objcts_1.oroom[i - 1] != io || objcts_1.osize[i - 1] == 10000) {
goto L52450;
}
objcts_1.oroom[i - 1] = ir;
objcts_1.osize[i - 1] *= iz;
L52450:
;
}
return ret_val;
L52500:
jigsup_(284);
/* !ENLARGED IN WRONG ROOM. */
return ret_val;
/* O123-- BRICK */
L54000:
if (prsvec_1.prsa != vindex_1.burnw) {
goto L10;
}
/* !BURN? */
jigsup_(150);
/* !BOOM */
/* ! */
return ret_val;
/* O124-- MYSELF */
L55000:
if (prsvec_1.prsa != vindex_1.givew) {
goto L55100;
}
/* !GIVE? */
newsta_(prsvec_1.prso, 2, 0, 0, aindex_1.player);
/* !DONE. */
return ret_val;
L55100:
if (prsvec_1.prsa != vindex_1.takew) {
goto L55200;
}
/* !TAKE? */
rspeak_(286);
/* !JOKE. */
return ret_val;
L55200:
if (prsvec_1.prsa != vindex_1.killw && prsvec_1.prsa != vindex_1.mungw) {
goto L10;
}
jigsup_(287);
/* !KILL, NO JOKE. */
return ret_val;
/* OAPPLI, PAGE 10 */
/* O125-- PANELS INSIDE MIRROR */
L56000:
if (prsvec_1.prsa != vindex_1.pushw) {
goto L10;
}
/* !PUSH? */
if (findex_1.poleuf != 0) {
goto L56100;
}
/* !SHORT POLE UP? */
i = 731;
/* !NO, WONT BUDGE. */
if (findex_1.mdir % 180 == 0) {
i = 732;
}
/* !DIFF MSG IF N-S. */
rspeak_(i);
/* !TELL WONT MOVE. */
return ret_val;
L56100:
if (findex_1.mloc != rindex_1.mrg) {
goto L56200;
}
/* !IN GDN ROOM? */
rspeak_(733);
/* !YOU LOSE. */
jigsup_(685);
return ret_val;
L56200:
i = 831;
/* !ROTATE L OR R. */
if (prsvec_1.prso == oindex_1.rdwal || prsvec_1.prso == oindex_1.ylwal) {
i = 830;
}
rspeak_(i);
/* !TELL DIRECTION. */
findex_1.mdir = (findex_1.mdir + 45 + (i - 830) * 270) % 360;
/* !CALCULATE NEW DIR. */
i__1 = findex_1.mdir / 45 + 695;
rspsub_(734, i__1);
/* !TELL NEW DIR. */
if (findex_1.wdopnf) {
rspeak_(730);
}
/* !IF PANEL OPEN, CLOSE. */
findex_1.wdopnf = FALSE_;
return ret_val;
/* !DONE. */
/* O126-- ENDS INSIDE MIRROR */
L57000:
if (prsvec_1.prsa != vindex_1.pushw) {
goto L10;
}
/* !PUSH? */
if (findex_1.mdir % 180 == 0) {
goto L57100;
}
/* !MIRROR N-S? */
rspeak_(735);
/* !NO, WONT BUDGE. */
return ret_val;
L57100:
if (prsvec_1.prso != oindex_1.pindr) {
goto L57300;
}
/* !PUSH PINE WALL? */
if (findex_1.mloc == rindex_1.mrc && findex_1.mdir == 180 ||
findex_1.mloc == rindex_1.mrd && findex_1.mdir == 0 ||
findex_1.mloc == rindex_1.mrg) {
goto L57200;
}
rspeak_(736);
/* !NO, OPENS. */
findex_1.wdopnf = TRUE_;
/* !INDICATE OPEN. */
cevent_1.cflag[cindex_1.cevpin - 1] = TRUE_;
/* !TIME OPENING. */
cevent_1.ctick[cindex_1.cevpin - 1] = 5;
return ret_val;
L57200:
rspeak_(737);
/* !GDN SEES YOU, DIE. */
jigsup_(685);
return ret_val;
L57300:
nloc = findex_1.mloc - 1;
/* !NEW LOC IF SOUTH. */
if (findex_1.mdir == 0) {
nloc = findex_1.mloc + 1;
}
/* !NEW LOC IF NORTH. */
if (nloc >= rindex_1.mra && nloc <= rindex_1.mrd) {
goto L57400;
}
rspeak_(738);
/* !HAVE REACHED END. */
return ret_val;
L57400:
i = 699;
/* !ASSUME SOUTH. */
if (findex_1.mdir == 0) {
i = 695;
}
/* !NORTH. */
j = 739;
/* !ASSUME SMOOTH. */
if (findex_1.poleuf != 0) {
j = 740;
}
/* !POLE UP, WOBBLES. */
rspsub_(j, i);
/* !DESCRIBE. */
findex_1.mloc = nloc;
if (findex_1.mloc != rindex_1.mrg) {
return ret_val;
}
/* !NOW IN GDN ROOM? */
if (findex_1.poleuf != 0) {
goto L57500;
}
/* !POLE UP, GDN SEES. */
if (findex_1.mropnf || findex_1.wdopnf) {
goto L57600;
}
/* !DOOR OPEN, GDN SEES. */
if (findex_1.mr1f && findex_1.mr2f) {
return ret_val;
}
/* !MIRRORS INTACT, OK. */
rspeak_(742);
/* !MIRRORS BROKEN, DIE. */
jigsup_(743);
return ret_val;
L57500:
rspeak_(741);
/* !POLE UP, DIE. */
jigsup_(743);